Created
March 18, 2015 00:06
-
-
Save samccone/babb69f679b485743522 to your computer and use it in GitHub Desktop.
sauce connect basic test setup
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
beforeEach(function() { | |
if (process.env.SAUCE_USERNAME != undefined) { | |
this.browser = new webdriver.Builder() | |
.usingServer('http://'+ process.env.SAUCE_USERNAME+':'+process.env.SAUCE_ACCESS_KEY+'@ondemand.saucelabs.com:80/wd/hub') | |
.withCapabilities({ | |
'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER, | |
build: process.env.TRAVIS_BUILD_NUMBER, | |
username: process.env.SAUCE_USERNAME, | |
accessKey: process.env.SAUCE_ACCESS_KEY, | |
browserName: "chrome" | |
}).build(); | |
} else { | |
this.browser = new webdriver.Builder() | |
.withCapabilities({ | |
browserName: "chrome" | |
}).build(); | |
} | |
return this.browser.get("http://localhost:8000/page/index.html"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment