From 8709311a7eaefe89d0752ebf1fabacb18e3b755f Mon Sep 17 00:00:00 2001 From: Caleb James DeLisle Date: Wed, 20 Apr 2016 19:18:31 +0200 Subject: [PATCH] Lets try running with multiple types of browsers --- .travis.yml | 4 ++++ TestSelenium.js | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 69e9cb72d..9f36eb562 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/TestSelenium.js b/TestSelenium.js index 55fb2a438..ece344cd2 100644 --- a/TestSelenium.js +++ b/TestSelenium.js @@ -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(); }