Last active
December 21, 2015 19:59
-
-
Save christian-bromann/6357801 to your computer and use it in GitHub Desktop.
Use Webdriverjs with Browserstack (example)
This file contains 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 webdriverjs = require('../index'), | |
client = webdriverjs.remote({ | |
host: 'hub.browserstack.com', | |
port: 80, | |
logLevel: 'silent', | |
desiredCapabilities: { | |
'browser': 'IE', | |
'browser_version': '7.0', | |
'os': 'Windows', | |
'os_version': 'XP', | |
'browserstack.debug': 'true', | |
'browserstack.user' : 'test1359', | |
'browserstack.key': 'rRz7rSR24gUy446CpJB9' | |
} | |
}).init(); | |
client | |
.url('http://google.com') | |
.setValue('*[name="q"]','webdriverjs') | |
.click('*[name="btnG"]') | |
.pause(1000) | |
.getTitle(function(err,title) { | |
console.log(title); | |
}) | |
.end(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment