By thekkadath on Apr 08, 2009
Requirement : Need to press "Page Down" key during one of the selenium tests
Solution: Use typeKeys(locator,value) command to generate a keystroke event.
In some cases, you may need to use the simple "type" command to set the value of the field and then the "typeKeys" command to send the keystroke events corresponding to what you just typed.
locator can be '//' in this case
value can be the ASCII value of the keyboard keys. Refer the below table for examples
|8||Brower Back Button|
|32||SpaceBar Key (also Page Down key)|
|33||Shift+SpaceBar key (also Page Up key)|
|34 (or) 35 (or) 36||Page Down key
|112||Opens a new browser page
|116||F5 key (Refresh Browser Page)
|118||F7 key (Caret Browsing On)