Class: Selenium::WebDriver::Interactions::PointerInput Private
Do not use. This class is for internal use only.
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
InputDevice
|
|
Instance Chain:
self,
InputDevice
|
|
Inherits: |
Selenium::WebDriver::Interactions::InputDevice
|
Defined in: | rb/lib/selenium/webdriver/common/interactions/pointer_input.rb |
Overview
Creates actions specific to Pointer Input devices
Constant Summary
-
KIND =
# File 'rb/lib/selenium/webdriver/common/interactions/pointer_input.rb', line 30{mouse: :mouse, pen: :pen, touch: :touch}.freeze
Class Method Summary
Instance Attribute Summary
Instance Method Summary
- #assert_kind(pointer) Internal use only
- #create_pointer_cancel Internal use only
- #create_pointer_down(button, **opts) Internal use only
- #create_pointer_move(duration: 0, x: 0, y: 0, origin: nil, **opts) Internal use only
- #create_pointer_up(button, **opts) Internal use only
- #encode Internal use only
InputDevice
- Inherited
Constructor Details
.new(kind, name: nil) ⇒ PointerInput
# File 'rb/lib/selenium/webdriver/common/interactions/pointer_input.rb', line 34
def initialize(kind, name: nil) super(name) @kind = assert_kind(kind) @type = Interactions::POINTER end
Instance Attribute Details
#kind (readonly)
[ GitHub ]# File 'rb/lib/selenium/webdriver/common/interactions/pointer_input.rb', line 32
attr_reader :kind
Instance Method Details
#assert_kind(pointer)
#create_pointer_cancel
[ GitHub ]# File 'rb/lib/selenium/webdriver/common/interactions/pointer_input.rb', line 64
def create_pointer_cancel add_action(PointerCancel.new(self)) end
#create_pointer_down(button, **opts)
[ GitHub ]# File 'rb/lib/selenium/webdriver/common/interactions/pointer_input.rb', line 56
def create_pointer_down(, **opts) add_action(PointerPress.new(self, :down, , **opts)) end
#create_pointer_move(duration: 0, x: 0, y: 0, origin: nil, **opts)
[ GitHub ]# File 'rb/lib/selenium/webdriver/common/interactions/pointer_input.rb', line 52
def create_pointer_move(duration: 0, x: 0, y: 0, origin: nil, **opts) add_action(PointerMove.new(self, duration, x, y, origin: origin, **opts)) end
#create_pointer_up(button, **opts)
[ GitHub ]# File 'rb/lib/selenium/webdriver/common/interactions/pointer_input.rb', line 60
def create_pointer_up(, **opts) add_action(PointerPress.new(self, :up, , **opts)) end
#encode
[ GitHub ]# File 'rb/lib/selenium/webdriver/common/interactions/pointer_input.rb', line 40
def encode output = super output[:parameters] = {pointerType: kind} if output output end