class Selenium::WebDriver::Interactions::Pause
Action to create a waiting period between actions Also used for synchronizing actions across devices
@api private
Public Class Methods
new(source, duration = nil)
click to toggle source
Calls superclass method
Selenium::WebDriver::Interactions::Interaction::new
# File lib/selenium/webdriver/common/interactions/pause.rb, line 31 def initialize(source, duration = nil) super(source) @duration = duration @type = :pause end
Public Instance Methods
assert_source(source)
click to toggle source
# File lib/selenium/webdriver/common/interactions/pause.rb, line 37 def assert_source(source) raise TypeError, "#{source.type} is not a valid input type" unless source.is_a? InputDevice end
encode()
click to toggle source
# File lib/selenium/webdriver/common/interactions/pause.rb, line 41 def encode output = {type: type} output[:duration] = (@duration * 1000).to_i if @duration output end