Skip to content

Instantly share code, notes, and snippets.

@michaelBenin
Forked from christian-bromann/webdriver.js
Created March 11, 2014 05:14
Show Gist options
  • Save michaelBenin/9479875 to your computer and use it in GitHub Desktop.
Save michaelBenin/9479875 to your computer and use it in GitHub Desktop.
var webdriverjs = require('webdriverjs'),
client = webdriverjs.remote({
desiredCapabilities: {
browserName: 'chrome',
version: '27',
platform: 'XP',
tags: ['examples'],
name: 'This is an example test'
},
host: 'ondemand.saucelabs.com',
user: '<username>',
key: '<key>'
}).init();
client
.url('http://google.com')
.setValue('*[name="q"]','webdriverjs')
.click('*[name="btnG"]')
.pause(1000)
.getTitle(function(err,title) {
return title === 'webdriverjs - Google Search';
})
.end();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment