Class: Selenium::WebDriver::Keyboard Private
- Inherits:
-
Object
- Object
- Selenium::WebDriver::Keyboard
- Defined in:
- lib/selenium/webdriver/common/keyboard.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#initialize(bridge) ⇒ Keyboard
constructor
private
A new instance of Keyboard.
-
#press(key) ⇒ Object
private
Press a modifier key.
-
#release(key) ⇒ Object
private
Release a modifier key.
- #send_keys(*keys) ⇒ Object private
Constructor Details
#initialize(bridge) ⇒ Keyboard
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Keyboard.
29 30 31 |
# File 'lib/selenium/webdriver/common/keyboard.rb', line 29 def initialize(bridge) @bridge = bridge end |
Instance Method Details
#press(key) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Press a modifier key
43 44 45 46 47 |
# File 'lib/selenium/webdriver/common/keyboard.rb', line 43 def press(key) assert_modifier key @bridge.sendKeysToActiveElement Keys.encode([key]) end |
#release(key) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Release a modifier key
55 56 57 58 59 |
# File 'lib/selenium/webdriver/common/keyboard.rb', line 55 def release(key) assert_modifier key @bridge.sendKeysToActiveElement Keys.encode([key]) end |
#send_keys(*keys) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
33 34 35 |
# File 'lib/selenium/webdriver/common/keyboard.rb', line 33 def send_keys(*keys) @bridge.sendKeysToActiveElement Keys.encode(keys) end |