Class: Selenium::WebDriver::Interactions::Interaction

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

Constant Summary collapse

PAUSE =
:pause

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source) ⇒ Interaction

Returns a new instance of Interaction.


28
29
30
31
32
33
34
35
# File 'lib/selenium/webdriver/common/interactions/interaction.rb', line 28

def initialize(source)
  unless Interactions::SOURCE_TYPES.include? source.type
    raise TypeError,
          "#{source.type} is not a valid input type"
  end

  @source = source
end

Instance Attribute Details

#sourceObject (readonly)

Returns the value of attribute source.


26
27
28
# File 'lib/selenium/webdriver/common/interactions/interaction.rb', line 26

def source
  @source
end