Sha256: 4367bf610a50110472ea4cb223640fc3a67d7ffa6c8dad42284d0c5188127562

Contents?: true

Size: 882 Bytes

Versions: 1

Compression:

Stored size: 882 Bytes

Contents

module Polonium
  module SeleniumDsl
    # The Configuration object.
    def configuration
      @configuration ||= Configuration.instance
    end
    attr_writer :configuration
    attr_accessor :selenium_driver  
    include WaitFor

    # Download a file from the Application Server
    def download(path)
      uri = URI.parse(configuration.browser_url + path)
      puts "downloading #{uri.to_s}"
      Net::HTTP.get(uri)
    end

    # Open the home page of the Application and wait for the page to load.
    def open_home_page
      selenium_driver.open(configuration.browser_url)
    end

    protected
    Driver.public_instance_methods(false).each do |method_name|
      delegate method_name, :to => :selenium_driver
    end

    def should_stop_driver?
      return false unless configuration.test_browser_mode?
      configuration.stop_driver?(passed?)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
polonium-0.1.0 lib/polonium/dsl/selenium_dsl.rb