Last active
January 3, 2016 14:59
-
-
Save mcranston18/8479358 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var webdriver = require('browserstack-webdriver'); | |
var browserNameList : ['firefox', 'chrome', 'opera']; | |
for(i = 0; i < browserList; i++) { | |
// Input capabilities | |
var capabilities = { | |
'browserName' : browserNameList[i], | |
'browserstack.user' : 'xxx', | |
'browserstack.key' : 'xxx' | |
} | |
var driver = new webdriver.Builder(). | |
usingServer('http://hub.browserstack.com/wd/hub'). | |
withCapabilities(capabilities). | |
build(); | |
driver.get('http://www.google.com/ncr'); | |
driver.findElement(webdriver.By.name('q')).sendKeys('BrowserStack'); | |
driver.findElement(webdriver.By.name('btnG')).click(); | |
test('this is my test condition', function() { | |
driver.getTitle().then(function(title) { | |
title.should.equal(myExpectition); | |
}); | |
}); | |
driver.quit(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment