Password fields in UserInput class

Is there any option to mark a particular field as “password” while using UserInput class within OpenTAP? Basically while user tries to enter values in it, it should be masked with dots/asterics. Ive tried using the ‘PasswordPropertyText’ attribute available within the DotNet framework but that doesnt work.

Hi @shwethakh, yes, you can use the SecureString instead of a regular string. Then it will show to the user as a password box.

It is a bit hard to get back the string that the user wrote, but just search the internet to find out how.

Thanks @rolf_madsen , I was able to get it working

1 Like

Sorry another question. Can we have a field which will have a list of allowed values in a dropdown but still be editable? As a user enters values, the dropdown should get filtered based on the user’s inputs

Hi @shwethakh, yes! You can use the [SuggestedValues] attribute. I think it is mentioned in the examples.

Thanks @rolf_madsen, works like a charm!

1 Like