Created
April 5, 2016 23:21
-
-
Save javidjamae/3c002c20b3b31413ee5e1a1b8e6d70a4 to your computer and use it in GitHub Desktop.
Set up Selenium to use Sauce Labs without a gem
This file contains 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
capabilities_config = { | |
:version => "43", | |
:browserName => "firefox", | |
:platform => "OS X 10.9", | |
:name => "Whatever name I want" | |
} | |
sauce_username = ENV['SAUCE_LABS_USERNAME'] | |
sauce_api_key = ENV['SAUCE_LABS_API_KEY'] | |
sauce_url = "http://#{sauce_username}:#{sauce_api_key}@ondemand.saucelabs.com:80/wd/hub".strip | |
driver = Selenium::WebDriver.for(:remote, :url => sauce_url, :desired_capabilities => capabilities_config) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment