cancel
Showing results for 
Search instead for 
Did you mean: 

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

SOLVED
kerriem
Occasional Contributor

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!

1 ACCEPTED SOLUTION

Accepted Solutions
VeenaDevi
Occasional Contributor

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

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

View solution in original post

2 REPLIES 2
VeenaDevi
Occasional Contributor

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

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

View solution in original post

kerriem
Occasional Contributor

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

That worked @VeenaDevi ! Many thanks 🙂 

Don't know why i didn't try that too! 🙈

New Here?
Join us and watch the welcome video:
Announcements