Method: Selenium::Client::GeneratedDriver#key_press

Defined in:
lib/selenium/client/legacy_driver.rb

#key_press(locator, keySequence) ⇒ Object

Simulates a user pressing and releasing a key.

‘locator’ is an element locator ‘keySequence’ is Either be a string(“" followed by the numeric keycode of the key to be pressed, normally the ASCII value of that key), or a single character. For example: ”w“, ”119“.



220
221
222
# File 'lib/selenium/client/legacy_driver.rb', line 220

def key_press(locator,keySequence)
    remote_control_command("keyPress", [locator,keySequence,])
end