Webrat can be configured using the Webrat.configure method. For example:
Webrat.configure do |config| config.mode = :sinatra end
Which server the application is running on for selenium testing? Defaults to localhost
Which rails environment should the selenium tests be run in? Defaults to test.
Which underlying app framework we're testing with selenium
Which port is the application running on for selenium testing? Defaults to 3001.
Which port should selenium use to access the application. Defaults to #application_port
How many redirects to the same URL should be halted as an infinite redirect loop? Defaults to 10
Save and open pages with error status codes (500-599) in a browser? Defualts to true.
Save and open page storage directory, defaults to “tmp” under current directory if exists, otherwise current directory
Set the key that Selenium uses to determine the browser running. Default *firefox
Set the timeout for waiting for the browser process to start
Set the firefox profile for selenium to use
Which server Selenium server is running on. Defaults to nil(server starts in webrat process and runs locally)
Which server Selenium port is running on. Defaults to 4444
Print out the full HTML on wait failure Defaults to false
# File lib/webrat/core/configuration.rb, line 46 def application_port_for_selenium @application_port_for_selenium || self.application_port end
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