Saturday, 27 April 2013

Key press events using selenium RC

To handle key press events like to press page down, tab key or other keys selenium RC supports this by passing ASCII code of keys to keyDownNative function.

Syntax:

keyDownNative(String keycode);

Example:
  • For page down/scroll: keyDownNative("32"); //32 is ASCII code for space bar.
  • To press tab key: keyDownNative("9"); // 9 is ASCII code for Tab. 

No comments:

Post a Comment

Angular JS Protractor Installation process - Tutorial Part 1

                     Protractor, formally known as E2E testing framework, is an open source functional automation framework designed spe...