Class: Selenium::WebDriver::WheelActions::ScrollOrigin

Inherits:
Object
  • Object
show all
Defined in:
rb/lib/selenium/webdriver/common/interactions/scroll_origin.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(origin, x_offset, y_offset) ⇒ ScrollOrigin

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.

Use a static method to access



40
41
42
43
44
# File 'rb/lib/selenium/webdriver/common/interactions/scroll_origin.rb', line 40

def initialize(origin, x_offset, y_offset)
  @origin = origin
  @x_offset = x_offset
  @y_offset = y_offset
end

Instance Attribute Details

#originObject (readonly)

Returns the value of attribute origin.



34
35
36
# File 'rb/lib/selenium/webdriver/common/interactions/scroll_origin.rb', line 34

def origin
  @origin
end

#x_offsetObject (readonly)

Returns the value of attribute x_offset.



34
35
36
# File 'rb/lib/selenium/webdriver/common/interactions/scroll_origin.rb', line 34

def x_offset
  @x_offset
end

#y_offsetObject (readonly)

Returns the value of attribute y_offset.



34
35
36
# File 'rb/lib/selenium/webdriver/common/interactions/scroll_origin.rb', line 34

def y_offset
  @y_offset
end

Class Method Details

.element(element, x_offset = 0, y_offset = 0) ⇒ Object



25
26
27
# File 'rb/lib/selenium/webdriver/common/interactions/scroll_origin.rb', line 25

def element(element, x_offset = 0, y_offset = 0)
  new(element, x_offset, y_offset)
end

.viewport(x_offset = 0, y_offset = 0) ⇒ Object



29
30
31
# File 'rb/lib/selenium/webdriver/common/interactions/scroll_origin.rb', line 29

def viewport(x_offset = 0, y_offset = 0)
  new(:viewport, x_offset, y_offset)
end