Created
July 9, 2010 20:49
-
-
Save scytacki/470037 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rubygems" | |
require "selenium/client" | |
# browser = Selenium::Client::Driver.new( | |
# :host => 'localhost', | |
# :port => 4444, | |
# :browser => '*safari', | |
# :url => "http://testswarm.dev.concord.org", | |
# :timeout_in_seconds => 90) | |
browser = Selenium::Client::Driver.new( | |
:host => 'saucelabs.com', | |
:port => 4444, | |
:browser => '{"username": "scytacki",' + | |
# put a valid access-key in here: | |
'"access-key": "",' + | |
'"os": "Windows 2003",' + | |
'"browser": "iexplore",' + | |
'"browser-version": "8.",' + | |
# '"browser": "opera",' + | |
# '"browser-version": "10.",' + | |
'"job-name": "TestSwarm test"}', | |
:url => "http://testswarm.dev.concord.org", | |
:timeout_in_seconds => 90) | |
browser.start_new_browser_session | |
# open a browser to watch the job in real time as it is executed | |
# and watch the video of the job when it is done | |
# this requires being logged into saucelabs as the user specified above | |
`open http://saucelabs.com/jobs/#{browser.session_id}` | |
browser.open "http://testswarm.dev.concord.org/run/saucelabs/?service=true" | |
begin | |
browser.wait_for( :wait_for => :text, :element => 'id=msg', :text => /No new tests to run/, :timeout_in_seconds => 30) | |
rescue | |
end | |
browser.close_current_browser_session |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment