Class: Selenium::WebDriver::Mouse Private
- Inherits:
-
Object
- Object
- Selenium::WebDriver::Mouse
- Defined in:
- rb/lib/selenium/webdriver/common/mouse.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)
- - (Object) click(element = nil) private
- - (Object) context_click(element = nil) private
- - (Object) double_click(element = nil) private
- - (Object) down(element = nil) private
-
- (Mouse) initialize(bridge)
constructor
private
A new instance of Mouse.
- - (Object) move_by(right_by, down_by) private
-
- (Object) move_to(element, right_by = nil, down_by = nil)
private
Move the mouse.
- - (Object) up(element = nil) private
Constructor Details
- (Mouse) 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 Mouse
11 12 13 |
# File 'rb/lib/selenium/webdriver/common/mouse.rb', line 11 def initialize(bridge) @bridge = bridge end |
Instance Method Details
- (Object) click(element = nil)
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.
15 16 17 18 |
# File 'rb/lib/selenium/webdriver/common/mouse.rb', line 15 def click(element = nil) move_if_needed element @bridge.click end |
- (Object) context_click(element = nil)
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.
25 26 27 28 |
# File 'rb/lib/selenium/webdriver/common/mouse.rb', line 25 def context_click(element = nil) move_if_needed element @bridge.contextClick end |
- (Object) double_click(element = nil)
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.
20 21 22 23 |
# File 'rb/lib/selenium/webdriver/common/mouse.rb', line 20 def double_click(element = nil) move_if_needed element @bridge.doubleClick end |
- (Object) down(element = nil)
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.
30 31 32 33 |
# File 'rb/lib/selenium/webdriver/common/mouse.rb', line 30 def down(element = nil) move_if_needed element @bridge.mouseDown end |
- (Object) move_by(right_by, down_by)
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.
55 56 57 |
# File 'rb/lib/selenium/webdriver/common/mouse.rb', line 55 def move_by(right_by, down_by) @bridge.mouseMoveTo nil, Integer(right_by), Integer(down_by) end |
- (Object) move_to(element, right_by = nil, down_by = nil)
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.
Move the mouse.
Examples:
driver.mouse.move_to(element)
driver.mouse.move_to(element, 5, 5)
49 50 51 52 53 |
# File 'rb/lib/selenium/webdriver/common/mouse.rb', line 49 def move_to(element, right_by = nil, down_by = nil) assert_element element @bridge.mouseMoveTo element.ref, right_by, down_by end |
- (Object) up(element = nil)
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.
35 36 37 38 |
# File 'rb/lib/selenium/webdriver/common/mouse.rb', line 35 def up(element = nil) move_if_needed element @bridge.mouseUp end |