Class: Selenium::WebDriver::Interactions::PointerMove Private
Do not use. This class is for internal use only.
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Interaction
|
|
Instance Chain:
|
|
Inherits: |
Selenium::WebDriver::Interactions::Interaction
|
Defined in: | rb/lib/selenium/webdriver/common/interactions/pointer_move.rb |
Overview
Action related to moving the pointer.
Constant Summary
-
ORIGINS =
# File 'rb/lib/selenium/webdriver/common/interactions/pointer_move.rb', line 34[VIEWPORT, POINTER].freeze
-
POINTER =
# File 'rb/lib/selenium/webdriver/common/interactions/pointer_move.rb', line 33:pointer
-
VIEWPORT =
# File 'rb/lib/selenium/webdriver/common/interactions/pointer_move.rb', line 32:
PointerEventProperties
- Included
Class Method Summary
- .new(source, duration, x, y, **opts) ⇒ PointerMove constructor Internal use only
Interaction
- Inherited
Instance Attribute Summary
Interaction
- Inherited
Instance Method Summary
- #assert_source(source) Internal use only
- #encode Internal use only
PointerEventProperties
- Included
Interaction
- Inherited
Constructor Details
.new(source, duration, x, y, **opts) ⇒ PointerMove
# File 'rb/lib/selenium/webdriver/common/interactions/pointer_move.rb', line 36
def initialize(source, duration, x, y, **opts) super(source) @duration = duration * 1000 @x_offset = x @y_offset = y @origin = opts.delete(:element) || opts.delete(:origin) || : @type = :pointerMove @opts = opts end
Instance Method Details
#assert_source(source)
# File 'rb/lib/selenium/webdriver/common/interactions/pointer_move.rb', line 46
def assert_source(source) raise TypeError, "#{source.type} is not a valid input type" unless source.is_a? PointerInput end
#encode
[ GitHub ]# File 'rb/lib/selenium/webdriver/common/interactions/pointer_move.rb', line 50
def encode process_opts.merge('type' => type.to_s, 'duration' => @duration.to_i, 'x' => @x_offset, 'y' => @y_offset, 'origin' => @origin) end