New webrat configuration option selenium_firefox_profile which is passed to selenium server

This commit is contained in:
Noah Davis 2010-02-26 15:50:00 -05:00
parent d9d9cc1fcc
commit 2f12422ae8
3 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,9 @@
== 0.7.1
* Minor enhancements
* Added application_port_for_selenium to webrat configuration. The use case is when you want to test through a web server sitting in front of your application server. (Luke Melia)
* New webrat configuration option selenium_firefox_profile which is passed to selenium server
== 0.7.0 / 2010-01-17

View File

@ -65,6 +65,9 @@ module Webrat
# Set the timeout for waiting for the browser process to start
attr_accessor :selenium_browser_startup_timeout
# Set the firefox profile for selenium to use
attr_accessor :selenium_firefox_profile
# How many redirects to the same URL should be halted as an infinite redirect
# loop? Defaults to 10
attr_accessor :infinite_redirect_limit

View File

@ -31,10 +31,13 @@ module Webrat
def remote_control
return @remote_control if @remote_control
server_options = { :timeout => Webrat.configuration.selenium_browser_startup_timeout }
server_options[:firefox_profile] = Webrat.configuration.selenium_firefox_profile if Webrat.configuration.selenium_firefox_profile
@remote_control = ::Selenium::RemoteControl::RemoteControl.new("0.0.0.0",
Webrat.configuration.selenium_server_port,
:timeout => Webrat.configuration.selenium_browser_startup_timeout)
server_options)
@remote_control.jar_file = jar_path
return @remote_control