diff --git a/History.txt b/History.txt index f861147..3dc5930 100644 --- a/History.txt +++ b/History.txt @@ -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 diff --git a/lib/webrat/core/configuration.rb b/lib/webrat/core/configuration.rb index 619ef7b..4e5bd9e 100755 --- a/lib/webrat/core/configuration.rb +++ b/lib/webrat/core/configuration.rb @@ -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 diff --git a/lib/webrat/selenium/selenium_rc_server.rb b/lib/webrat/selenium/selenium_rc_server.rb index 82aae31..46ce5aa 100644 --- a/lib/webrat/selenium/selenium_rc_server.rb +++ b/lib/webrat/selenium/selenium_rc_server.rb @@ -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