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: http://docs.oracle.com/javase/1.4.2/docs/api/java/awt/event/KeyEvent.html Hope this helps!
Being in the industry for almost two decades, one thing that's been constant is change and my curiosity. I In this fast world of IT...being curious, learning and learning by doing is quintessential :) Here is my way of learning and sharing what I learnt!!! Author: Sirisha Reddy G V