class Selenium::WebDriver::TouchActionBuilder
Public Class Methods
new(mouse, keyboard, touch_screen)
click to toggle source
@api private
Calls superclass method
Selenium::WebDriver::ActionBuilder.new
# File lib/selenium/webdriver/common/touch_action_builder.rb, line 9 def initialize(mouse, keyboard, touch_screen) super(mouse, keyboard) @devices[:touch_screen] = touch_screen end
Public Instance Methods
double_tap(element)
click to toggle source
# File lib/selenium/webdriver/common/touch_action_builder.rb, line 37 def double_tap(element) @actions << [:touch_screen, :double_tap, [element]] self end
down(x, y = nil)
click to toggle source
# File lib/selenium/webdriver/common/touch_action_builder.rb, line 47 def down(x, y = nil) @actions << [:touch_screen, :down, [x, y]] self end
flick(*args)
click to toggle source
# File lib/selenium/webdriver/common/touch_action_builder.rb, line 23 def flick(*args) unless [2,4].include? args.size raise ArgumentError, "wrong number of arguments, expected 2 or 4, got #{args.size}" end @actions << [:touch_screen, :flick, args] self end
long_press(element)
click to toggle source
# File lib/selenium/webdriver/common/touch_action_builder.rb, line 42 def long_press(element) @actions << [:touch_screen, :long_press, [element]] self end
move(x, y = nil)
click to toggle source
# File lib/selenium/webdriver/common/touch_action_builder.rb, line 57 def move(x, y = nil) @actions << [:touch_screen, :move, [x, y]] self end
scroll(*args)
click to toggle source
# File lib/selenium/webdriver/common/touch_action_builder.rb, line 14 def scroll(*args) unless [2,3].include? args.size raise ArgumentError, "wrong number of arguments, expected 2..3, got #{args.size}" end @actions << [:touch_screen, :scroll, args] self end
single_tap(element)
click to toggle source
# File lib/selenium/webdriver/common/touch_action_builder.rb, line 32 def single_tap(element) @actions << [:touch_screen, :single_tap, [element]] self end
up(x, y = nil)
click to toggle source
# File lib/selenium/webdriver/common/touch_action_builder.rb, line 52 def up(x, y = nil) @actions << [:touch_screen, :up, [x, y]] self end