class Selenium::WebDriver::Interactions::PointerMove

Constants

ORIGINS
POINTER
VIEWPORT

Public Class Methods

new(source, duration, x, y, element: nil, origin: nil) click to toggle source
# File lib/selenium/webdriver/common/interactions/pointer_input.rb, line 109
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

Public Instance Methods

encode() click to toggle source
# File lib/selenium/webdriver/common/interactions/pointer_input.rb, line 121
def encode
  output = {type: type, duration: @duration.to_i, x: @x_offset, y: @y_offset}
  output[:origin] = @origin
  output
end
type() click to toggle source
# File lib/selenium/webdriver/common/interactions/pointer_input.rb, line 117
def type
  :pointerMove
end