Lets try running with multiple types of browsers

pull/1/head
Caleb James DeLisle 9 years ago
parent 2a0b3a007d
commit 8709311a7e

@ -1,4 +1,8 @@
language: node_js language: node_js
env:
matrix:
- "TEST_SUITE=saucelabs BROWSER='firefox:19:Windows 2012'"
- "TEST_SUITE=saucelabs BROWSER='chrome::Windows 2008'"
branches: branches:
only: only:
- master - master

@ -3,6 +3,7 @@ const WebDriver = require("selenium-webdriver");
let driver; let driver;
if (process.env.SAUCE_USERNAME != undefined) { if (process.env.SAUCE_USERNAME != undefined) {
const browserArray = process.env.BROWSER.split(':');
driver = new WebDriver.Builder().usingServer( driver = new WebDriver.Builder().usingServer(
'http://'+ process.env.SAUCE_USERNAME+':'+process.env.SAUCE_ACCESS_KEY+'@ondemand.saucelabs.com:80/wd/hub' 'http://'+ process.env.SAUCE_USERNAME+':'+process.env.SAUCE_ACCESS_KEY+'@ondemand.saucelabs.com:80/wd/hub'
).withCapabilities({ ).withCapabilities({
@ -10,8 +11,7 @@ if (process.env.SAUCE_USERNAME != undefined) {
"build": process.env.TRAVIS_BUILD_NUMBER, "build": process.env.TRAVIS_BUILD_NUMBER,
"username": process.env.SAUCE_USERNAME, "username": process.env.SAUCE_USERNAME,
"accessKey": process.env.SAUCE_ACCESS_KEY, "accessKey": process.env.SAUCE_ACCESS_KEY,
"browserName": "chrome" }).forBrowser(browserArray[0], browserArray[1], browserArray[2]).build();
}).build();
} else { } else {
driver = new WebDriver.Builder().withCapabilities({ browserName: "chrome" }).build(); driver = new WebDriver.Builder().withCapabilities({ browserName: "chrome" }).build();
} }

Loading…
Cancel
Save