Method: Selenium::WebDriver::PointerActions#move_by
- Defined in:
- lib/selenium/webdriver/common/interactions/pointer_actions.rb
#move_by(right_by, down_by, device: nil, duration: default_move_duration) ⇒ ActionBuilder
Moves the pointer from its current position by the given offset.
The viewport is not scrolled if the coordinates provided are outside the viewport. MoveTargetOutOfBoundsError will be raised if the offsets are outside the viewport
125 126 127 128 129 130 131 132 133 134 |
# File 'lib/selenium/webdriver/common/interactions/pointer_actions.rb', line 125 def move_by(right_by, down_by, device: nil, duration: default_move_duration, **) pointer = pointer_input(device) pointer.create_pointer_move(duration: duration, x: Integer(right_by), y: Integer(down_by), origin: Interactions::PointerMove::POINTER, **) tick(pointer) self end |