Class: Selenium::WebDriver::Interactions::Pause 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:
self,
Interaction
|
|
Inherits: |
Selenium::WebDriver::Interactions::Interaction
|
Defined in: | rb/lib/selenium/webdriver/common/interactions/pause.rb |
Overview
Action to create a waiting period between actions Also used for synchronizing actions across devices
Class Method Summary
Instance Attribute Summary
Interaction
- Inherited
Instance Method Summary
- #assert_source(source) Internal use only
- #encode Internal use only
Interaction
- Inherited
Constructor Details
.new(source, duration = nil) ⇒ Pause
# File 'rb/lib/selenium/webdriver/common/interactions/pause.rb', line 31
def initialize(source, duration = nil) super(source) @duration = duration @type = :pause end
Instance Method Details
#assert_source(source)
# File 'rb/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
[ GitHub ]# File 'rb/lib/selenium/webdriver/common/interactions/pause.rb', line 41
def encode output = {type: type} output[:duration] = (@duration * 1000).to_i if @duration output end