/ Published in: Ruby
URL: http://github.com/ph7/selenium-client
Expand |
Embed | Plain Text
require 'selenium/rake/tasks' selenium_jar_file_path = 'selenium-server-1.0-beta-2/selenium-server.jar' selenium_server_log_path = "rc_at_#{Time.now.strftime "%C%y_%m_%d_%H%M%S"}.log" vanilla_selenium_server_log_path = "vanilla_rc_at_#{Time.now.strftime "%C%y_%m_%d_%H%M%S"}.log" desc "start a selenium-rc server that can handle SSL and cross-domain requests" Selenium::Rake::RemoteControlStartTask.new("rc:proxy") do |rc| rc.port = 4444 rc.timeout_in_seconds = 2 * 60 rc.background = true rc.wait_until_up_and_running = true rc.jar_file = selenium_jar_file_path rc.log_to = selenium_server_log_path rc.additional_args << "-proxyInjectionMode" rc.additional_args << "-trustAllSSLCertificates" rc.additional_args << "-avoidProxy" end desc "start the selenium-rc server" Selenium::Rake::RemoteControlStartTask.new("rc") do |rc| rc.port = 4444 rc.timeout_in_seconds = 2 * 60 rc.background = true rc.wait_until_up_and_running = true rc.jar_file = selenium_jar_file_path rc.log_to = vanilla_selenium_server_log_path end Selenium::Rake::RemoteControlStopTask.new("rc:stop") do |rc| rc.host = "localhost" rc.port = 4444 rc.timeout_in_seconds = 3 * 60 end
You need to login to post a comment.
