Skip to content

Instantly share code, notes, and snippets.

@textarcana
Created May 31, 2010 18:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save textarcana/420093 to your computer and use it in GitHub Desktop.
Save textarcana/420093 to your computer and use it in GitHub Desktop.
Selenium Rake tasks. Configure Selenium .jar file location as well as logfile name and location.
SELENIUM_JAR_FILE_PATH = 'c:/toolchain/selenium-server-1.0-beta-2/selenium-server.jar'
SELENIUM_SERVER_LOG_PATH = "log/selenium-server_#{Time.now.strftime "%C%y_%m_%d_%H%M%S"}.log"
VANILLA_SELENIUM_SERVER_LOG_PATH = "log/vanilla_selenium-server_#{Time.now.strftime "%C%y_%m_%d_%H%M%S"}.log"
# selenium:rc:start
Selenium::Rake::RemoteControlStartTask.new 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
Selenium::Rake::RemoteControlStartTask.new("selenium:rc:vanilla") 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment