Class: Selenium::WebDriver::Interactions::Pause

Inherits:
Interaction
  • Object
show all
Defined in:
lib/selenium/webdriver/common/interactions/interaction.rb

Constant Summary

Constants inherited from Interaction

Interaction::PAUSE

Instance Attribute Summary

Attributes inherited from Interaction

#source

Instance Method Summary collapse

Constructor Details

#initialize(source, duration = nil) ⇒ Pause

Returns a new instance of Pause.



35
36
37
38
# File 'lib/selenium/webdriver/common/interactions/interaction.rb', line 35

def initialize(source, duration = nil)
  super(source)
  @duration = duration
end

Instance Method Details

#encodeObject



44
45
46
47
48
# File 'lib/selenium/webdriver/common/interactions/interaction.rb', line 44

def encode
  output = {type: type}
  output[:duration] = (@duration * 1000).to_i if @duration
  output
end

#typeObject



40
41
42
# File 'lib/selenium/webdriver/common/interactions/interaction.rb', line 40

def type
  PAUSE
end