Module: Selenium::Client::SeleniumHelper

Defined in:
lib/selenium/client/selenium_helper.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *args) ⇒ Object

Delegates to @selenium on method missing



28
29
30
31
32
# File 'lib/selenium/client/selenium_helper.rb', line 28

def method_missing(method_name, *args)
  return super unless @selenium.respond_to?(method_name)
  
  @selenium.send(method_name, *args)
end

Instance Method Details

#open(url) ⇒ Object

Overrides default open method to actually delegates to @selenium



11
12
13
14
# File 'lib/selenium/client/selenium_helper.rb', line 11

def open(url)
puts "Inside Help Open"
  @selenium.open url
end

#select(input_locator, option_locator) ⇒ Object

Overrides default select method to actually delegates to @selenium



23
24
25
# File 'lib/selenium/client/selenium_helper.rb', line 23

def select(input_locator, option_locator)
  @selenium.select input_locator, option_locator
end

#type(locator, value) ⇒ Object

Overrides default type method to actually delegates to @selenium



17
18
19
20
# File 'lib/selenium/client/selenium_helper.rb', line 17

def type(locator, value)
puts "Inside Help type"
  @selenium.type locator, value
end