Class: Selenium::WebDriver::Interactions::Pause Private
- Inherits:
-
Interaction
- Object
- Interaction
- Selenium::WebDriver::Interactions::Pause
- Defined in:
- rb/lib/selenium/webdriver/common/interactions/pause.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Action to create a waiting period between actions Also used for synchronizing actions across devices
Instance Attribute Summary
Attributes inherited from Interaction
Instance Method Summary collapse
- #assert_source(source) ⇒ Object private
- #encode ⇒ Object private
-
#initialize(source, duration = nil) ⇒ Pause
constructor
private
A new instance of Pause.
Constructor Details
#initialize(source, duration = nil) ⇒ Pause
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Pause.
31 32 33 34 35 |
# 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) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
37 38 39 |
# 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 ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
41 42 43 44 45 |
# 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 |