Sha256: ea491266acb718c842bafe95329c51f7a8ac6d27a0d97dfa0bfcf26ec823db0d

Contents?: true

Size: 1.04 KB

Versions: 7

Compression:

Stored size: 1.04 KB

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)
puts "Inside Help Open"
        @selenium.open url
      end
    
      # Overrides default type method to actually delegates to @selenium
      def type(locator, value)
puts "Inside Help type"
        @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

7 entries across 7 versions & 1 rubygems

Version Path
selenium-selenese-1.1.13 lib/selenium/client/selenium_helper.rb
selenium-selenese-1.1.12 lib/selenium/client/selenium_helper.rb
selenium-selenese-1.1.11 lib/selenium/client/selenium_helper.rb
selenium-selenese-1.1.10 lib/selenium/client/selenium_helper.rb
selenium-selenese-1.1.6 lib/selenium/client/selenium_helper.rb
selenium-selenese-1.1.4 lib/selenium/client/selenium_helper.rb
selenium-selenese-1.1.3 lib/selenium/client/selenium_helper.rb