Class: Selenium::WebDriver::Keyboard Private
- Inherits:
-
Object
- Object
- Selenium::WebDriver::Keyboard
- Defined in:
- rb/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.
Constant Summary
Instance Method Summary (collapse)
-
- (Keyboard) initialize(bridge)
constructor
private
A new instance of Keyboard.
-
- (Object) press(key)
private
Press a modifier key.
-
- (Object) release(key)
private
Release a modifier key.
- - (Object) send_keys(*keys) private
Constructor Details
- (Keyboard) initialize(bridge)
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
10 11 12 |
# File 'rb/lib/selenium/webdriver/common/keyboard.rb', line 10 def initialize(bridge) @bridge = bridge end |
Instance Method Details
- (Object) press(key)
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
24 25 26 27 28 |
# File 'rb/lib/selenium/webdriver/common/keyboard.rb', line 24 def press(key) assert_modifier key @bridge.sendKeysToActiveElement Keys.encode([key]) end |
- (Object) release(key)
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
36 37 38 39 40 |
# File 'rb/lib/selenium/webdriver/common/keyboard.rb', line 36 def release(key) assert_modifier key @bridge.sendKeysToActiveElement Keys.encode([key]) end |
- (Object) send_keys(*keys)
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.
14 15 16 |
# File 'rb/lib/selenium/webdriver/common/keyboard.rb', line 14 def send_keys(*keys) @bridge.sendKeysToActiveElement Keys.encode(keys) end |