Hi All,

I wondered if anyone could help me? I'm writing a script to test the 
functions on a login page for a website. One of the checks I need to make 
is that a warning is displayed when a user starts to enter a password with 
caps lock set to on. Is there any way of forcing the caps lock key to on if 
it is not already set? I was planning on using an if statement to check the 
state of this key and enable it if it is off and do nothing if it is 
already on. The second part of this would be the opposite, enter a password 
when it is off and make sure the warning is not displayed.

My only problem is I'm not sure how to capture or interact with the 
keyboard in this way or what the code would be, if at all possible, to 
force this to occur.

Forcing lowercase letters into uppercase in this test will not work as the 
browser will be checking the state of the caps lock key itself rather than 
the characters being entered. I need to change the state of keyboard caps 
lock key properly. Hopefully it's just a simple "just use this" but I don't 
know what the "this" is.

Thanks in advance for any help anyone can give me.

Many thanks,

Dan.

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to