module Selenium::WebDriver::WheelActions
def scroll_from(scroll_origin, delta_x, delta_y, device: nil)
-
(Error::MoveTargetOutOfBoundsError)
- If the origin with offset is outside the viewport.
Returns:
-
(Selenium::WebDriver::WheelActions)
- A self reference.
Parameters:
-
delta_y
(Integer
) -- Distance along Y axis to scroll using the wheel. A negative value scrolls up. -
delta_x
(Integer
) -- Distance along X axis to scroll using the wheel. A negative value scrolls left. -
scroll_origin
(ScrollOrigin
) -- Where scroll originates (viewport or element center) plus provided offsets.
Other tags:
- Example: Scroll viewport by a specified amount with an offset -
Example: Scroll from element by a specified amount with an offset -
Example: Scroll from element by a specified amount -
def scroll_from(scroll_origin, delta_x, delta_y, device: nil) raise TypeError, "#{scroll_origin.inspect} isn't a valid ScrollOrigin" unless scroll_origin.is_a?(ScrollOrigin) scroll(x: scroll_origin.x_offset, y: scroll_origin.y_offset, delta_x: delta_x, delta_y: delta_y, origin: scroll_origin.origin, device: device) end