Sha256: e2001a31e3543176bb33f3526cb29fd0ed83157e827717fa682e69a03e20edec

Contents?: true

Size: 1020 Bytes

Versions: 42

Compression:

Stored size: 1020 Bytes

Contents

# Defines a mixin module that you can use to write Selenium tests
# without typing "@selenium." in front of every command.  Every
# call to a missing method will be automatically sent to the @selenium
# object.
module Selenium
  module Client
    
    module SeleniumHelper
    
      # Overrides default open method to actually delegates to @selenium
      def open(url)
        @selenium.open url
      end
    
      # Overrides default type method to actually delegates to @selenium
      def type(locator, value)
        @selenium.type locator, value
      end
    
      # Overrides default select method to actually delegates to @selenium
      def select(input_locator, option_locator)
        @selenium.select input_locator, option_locator
      end

      # Delegates to @selenium on method missing 
      def method_missing(method_name, *args)
        return super unless @selenium.respond_to?(method_name)
        
        @selenium.send(method_name, *args)
      end                  
    end
    
  end
end

Version data entries

42 entries across 42 versions & 5 rubygems

Version Path
selenium-webdriver-2.18.0 lib/selenium/client/selenium_helper.rb
selenium-webdriver-2.18.0.rc3 lib/selenium/client/selenium_helper.rb
selenium-webdriver-2.18.0.rc2 lib/selenium/client/selenium_helper.rb
selenium-webdriver-2.18.0.rc1 lib/selenium/client/selenium_helper.rb
bbc-selenium-webdriver-1.17.0 lib/selenium/client/selenium_helper.rb
selenium-webdriver-2.17.0 lib/selenium/client/selenium_helper.rb
selenium-webdriver-2.16.0 lib/selenium/client/selenium_helper.rb
selenium-webdriver-2.15.0 lib/selenium/client/selenium_helper.rb
selenium-webdriver-2.14.0 lib/selenium/client/selenium_helper.rb
selenium-webdriver-2.13.0 lib/selenium/client/selenium_helper.rb
selenium-webdriver-2.12.2 lib/selenium/client/selenium_helper.rb
selenium-webdriver-2.12.1 lib/selenium/client/selenium_helper.rb
selenium-webdriver-2.12.0 lib/selenium/client/selenium_helper.rb
selenium-webdriver-2.10.0 lib/selenium/client/selenium_helper.rb
selenium-webdriver-2.9.1 lib/selenium/client/selenium_helper.rb
selenium-webdriver-2.9.0 lib/selenium/client/selenium_helper.rb
selenium-webdriver-2.8.0 lib/selenium/client/selenium_helper.rb
selenium-webdriver-2.7.0 lib/selenium/client/selenium_helper.rb
selenium-webdriver-2.6.0 lib/selenium/client/selenium_helper.rb
selenium-webdriver-2.5.0 lib/selenium/client/selenium_helper.rb