Lets try running with multiple types of browsers
This commit is contained in:
parent
2a0b3a007d
commit
8709311a7e
@ -1,4 +1,8 @@
|
||||
language: node_js
|
||||
env:
|
||||
matrix:
|
||||
- "TEST_SUITE=saucelabs BROWSER='firefox:19:Windows 2012'"
|
||||
- "TEST_SUITE=saucelabs BROWSER='chrome::Windows 2008'"
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
@ -3,6 +3,7 @@ const WebDriver = require("selenium-webdriver");
|
||||
|
||||
let driver;
|
||||
if (process.env.SAUCE_USERNAME != undefined) {
|
||||
const browserArray = process.env.BROWSER.split(':');
|
||||
driver = new WebDriver.Builder().usingServer(
|
||||
'http://'+ process.env.SAUCE_USERNAME+':'+process.env.SAUCE_ACCESS_KEY+'@ondemand.saucelabs.com:80/wd/hub'
|
||||
).withCapabilities({
|
||||
@ -10,8 +11,7 @@ if (process.env.SAUCE_USERNAME != undefined) {
|
||||
"build": process.env.TRAVIS_BUILD_NUMBER,
|
||||
"username": process.env.SAUCE_USERNAME,
|
||||
"accessKey": process.env.SAUCE_ACCESS_KEY,
|
||||
"browserName": "chrome"
|
||||
}).build();
|
||||
}).forBrowser(browserArray[0], browserArray[1], browserArray[2]).build();
|
||||
} else {
|
||||
driver = new WebDriver.Builder().withCapabilities({ browserName: "chrome" }).build();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user