Forum Discussion

kerriem's avatar
kerriem
Occasional Contributor
4 years ago
Solved

Is there a way to turn caps lock on and verify what is entered is in capitals?

I am testing a web interface login screen, which has a facility to detect if caps lock has been turned on when the user enters their password. 

From reading the documentation, it seems that TestComplete automatically turns off caps lock before test execution, which is fine, but I would really like to be able to check for the message we return of "caps lock is ON" under the password field.

I tried this code (i'm using python):

#Turn Caps Lock On
LoginPg.LoginPasswordField.Keys("[Caps]")
LoginPg.LoginPasswordField.Keys("pass")

but pausing the test at this point shows the password field has "pass" in it, not "PASS".

 

Any help appreciated!

  • Using LoginPg.LoginPasswordField.Keys("PASS") is not giving Expected message ?

2 Replies

  • Using LoginPg.LoginPasswordField.Keys("PASS") is not giving Expected message ?

    • kerriem's avatar
      kerriem
      Occasional Contributor

      That worked VeenaDevi ! Many thanks 🙂 

      Don't know why i didn't try that too! ğŸ™ˆ