Skip to main content


Showing posts from July, 2012

Simulating Keyboard strokes using Selenium1

Many a times we want to simulate keyboard strokes in our selenium tests. Here is how you can do this using Selenium1. Command: selenium.keyPressNative(<KeyEvent_TobePassed>);For Ex: If you want to simulate pressing Tab then you need to pass the command: selenium.keyPressNative(java.awt.event.KeyEvent.VK_TAB+"");View the list of KeyEvents here: this helps!