1 Star2 Stars3 Stars4 Stars5 Stars
Loading ... Loading ...

By Rafaela Azevedo
Turn on/off the Caps lock with Selenium RC and key press and key up:
selenium.keyUpNative(KeyEvent.VK_CAPS_LOCK.toString()); // Turn off the caps Lock, you can use this if ou don’t know if the caps lock is on or off. So you can turn off before you press the key.
selenium.keyPressNative(KeyEvent.VK_CAPS_LOCK.toString()); // Turn on the caps lock
With the Robot:
Robot robo = new Robot();
Very easy, and if one way doesn`t work, you can try another :)
Bye bye !


Category: Programming, QA, Test and Automation Stuffs, caps lock key event, caps lock key press, caps lock key up, caps lock off, caps lock on, caps lock robot, caps lock selenium rc, caps lock turn on/off, identify caps lock on/off

Você também pode querer ler

Comments are off for this post.