Class: Selenium::WebDriver::Interactions::PointerMove
- Inherits:
-
Interaction
- Object
- Interaction
- Selenium::WebDriver::Interactions::PointerMove
- Defined in:
- lib/selenium/webdriver/common/interactions/pointer_input.rb
Overview
PointerPress
Constant Summary collapse
Constants inherited from Interaction
Instance Attribute Summary
Attributes inherited from Interaction
Instance Method Summary collapse
- #encode ⇒ Object
-
#initialize(source, duration, x, y, element: nil, origin: nil) ⇒ PointerMove
constructor
A new instance of PointerMove.
- #type ⇒ Object
Constructor Details
#initialize(source, duration, x, y, element: nil, origin: nil) ⇒ PointerMove
Returns a new instance of PointerMove.
102 103 104 105 106 107 108 |
# File 'lib/selenium/webdriver/common/interactions/pointer_input.rb', line 102 def initialize(source, duration, x, y, element: nil, origin: nil) super(source) @duration = duration * 1000 @x_offset = x @y_offset = y @origin = element || origin end |
Instance Method Details
#encode ⇒ Object
114 115 116 117 118 |
# File 'lib/selenium/webdriver/common/interactions/pointer_input.rb', line 114 def encode output = {type: type, duration: @duration.to_i, x: @x_offset, y: @y_offset} output[:origin] = @origin output end |
#type ⇒ Object
110 111 112 |
# File 'lib/selenium/webdriver/common/interactions/pointer_input.rb', line 110 def type :pointerMove end |