Make compatable with latest version of "selenium-client" gem, version 1.2.16

This commit is contained in:
Brian Landau 2009-07-06 13:50:00 -04:00
parent 7f36cf472a
commit dd98b33713
2 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,5 @@
require "webrat" require "webrat"
gem "selenium-client", ">=1.2.14" gem "selenium-client", ">=1.2.16"
require "selenium/client" require "selenium/client"
require "webrat/selenium/silence_stream" require "webrat/selenium/silence_stream"
require "webrat/selenium/selenium_session" require "webrat/selenium/selenium_session"

View File

@ -34,7 +34,7 @@ module Webrat
@remote_control = ::Selenium::RemoteControl::RemoteControl.new("0.0.0.0", @remote_control = ::Selenium::RemoteControl::RemoteControl.new("0.0.0.0",
Webrat.configuration.selenium_server_port, Webrat.configuration.selenium_server_port,
Webrat.configuration.selenium_browser_startup_timeout) :timeout => Webrat.configuration.selenium_browser_startup_timeout)
@remote_control.jar_file = jar_path @remote_control.jar_file = jar_path
return @remote_control return @remote_control
@ -74,7 +74,9 @@ module Webrat
def stop def stop
silence_stream(STDOUT) do silence_stream(STDOUT) do
::Selenium::RemoteControl::RemoteControl.new("0.0.0.0", Webrat.configuration.selenium_server_port, 5).stop ::Selenium::RemoteControl::RemoteControl.new("0.0.0.0",
Webrat.configuration.selenium_server_port,
:timeout => 5).stop
end end
end end