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(); }