How can I test the show/hide password functionality on an android App

Hi everybody,

On real android device, my App under test offers the functionality to show / hide password on login screen.

I already write the java code to click the show / hide password button:
But I wonder how can I check that the password is is plain language or masked?

My actual failed code:
//Check that the password is masked => failed
//Click the show password button
//Check that the password is in plain language

Thank you for your help

Get the password from password field and match it with the text you have entered. If the text matches password is visible.

1 Like

Thanks, it’s worked perfectly.