0

I have a little challenge when testing a website. Just wanted to see if you folks have any suggestions on this. The story behind this is that I need to mask the input fields for the screenshots when the test has been executed as we are sharing the data with other teams. Before the script I am running JS with 'document***.type="password";', but when script starts to type, then input type is changed back to the type of text. Also, class changes from class="is-invalid" to class="is-focused is-invalid" when it's active. Also, I could of course change the type after I have typed the value, but even tho when I click the next field, the class changes. When I have filled the first input field it checks the data against the server and the class is of course changed.

I have an input field when inactive:

<input ref="input" value="input field" id="id-for-unified-text-input--14fe" name="unified-text-input-14fe" type="text" autocomplete="off" spellcheck="false" placeholder="ABC123" class="is-invalid">

And the input field when active"

<input ref="input" value="input field" id="id-for-unified-text-input--14fe" name="unified-text-input-14fe" type="text" autocomplete="off" spellcheck="false" placeholder="ABC123" class="is-focused   is-invalid">

Any suggestions from a fellow testers, how could I fix this? Thanks a lot in advance!

1 Answers1

0

As pretty much evident from the HTML the <input> field whenever recieves the focus_ the classname is-focused added.

This addition of classname is pretty much controled through the attributes, presumably the css_properties of the parent elements.

As as conclusion, it would be difficult to mask the password field characters from the clientside and have to be controled from the Application Server side.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352