Method: Selenium::WebDriver::Mouse#move_to
- Defined in:
- lib/selenium/webdriver/common/mouse.rb
#move_to(element, down_by = nil, right_by = nil) ⇒ 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.
Move the mouse.
Examples:
driver.mouse.move_to(element)
driver.mouse.move_to(element, 5, 5)
45 46 47 48 49 50 51 |
# File 'lib/selenium/webdriver/common/mouse.rb', line 45 def move_to(element, down_by = nil, right_by = nil) unless element.kind_of? Element raise TypeError, "expected #{Element}, got #{element.inspect}:#{element.class}" end @bridge.mouseMoveTo element.ref, down_by, right_by end |