Parent

Webrat::Configuration

Webrat can be configured using the Webrat.configure method. For example:

Webrat.configure do |config|
  config.mode = :sinatra
end

Attributes

application_address[RW]

Which server the application is running on for selenium testing? Defaults to localhost

application_environment[RW]

Which rails environment should the selenium tests be run in? Defaults to test.

application_framework[RW]

Which underlying app framework we're testing with selenium

application_port[RW]

Which port is the application running on for selenium testing? Defaults to 3001.

application_port_for_selenium[W]

Which port should selenium use to access the application. Defaults to application_port

infinite_redirect_limit[RW]

How many redirects to the same URL should be halted as an infinite redirect loop? Defaults to 10

open_error_files[W]

Save and open pages with error status codes (500-599) in a browser? Defualts to true.

saved_pages_dir[RW]

Save and open page storage directory, defaults to "tmp" under current directory if exists, otherwise current directory

selenium_browser_key[RW]

Set the key that Selenium uses to determine the browser running. Default *firefox

selenium_browser_startup_timeout[RW]

Set the timeout for waiting for the browser process to start

selenium_firefox_profile[RW]

Set the firefox profile for selenium to use

selenium_server_address[RW]

Which server Selenium server is running on. Defaults to nil(server starts in webrat process and runs locally)

selenium_server_port[RW]

Which server Selenium port is running on. Defaults to 4444

selenium_verbose_output[RW]

Print out the full HTML on wait failure Defaults to false

Public Instance Methods

application_port_for_selenium() click to toggle source
# File lib/webrat/core/configuration.rb, line 46
def application_port_for_selenium
  @application_port_for_selenium || self.application_port
end
mode=(mode) click to toggle source

Allows setting of webrat's mode, valid modes are: :rails, :selenium, :rack, :sinatra, :mechanize, :merb

# File lib/webrat/core/configuration.rb, line 101
def mode=(mode)
  @mode = mode.to_sym

  begin
    require("webrat/integrations/#{mode}")
  rescue LoadError
    # Only some modes have integration code that needs to
    # be loaded, so this is OK
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.