Skip to content

Instantly share code, notes, and snippets.

@christian-bromann
Last active December 21, 2015 19:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christian-bromann/6357801 to your computer and use it in GitHub Desktop.
Save christian-bromann/6357801 to your computer and use it in GitHub Desktop.
Use Webdriverjs with Browserstack (example)
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