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
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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('../index'),
client = webdriverjs.remote({
desiredCapabilities: {
browserName: 'chrome',
version: '27',
platform: 'XP',
tags: ['examples'],
name: 'This is an example test'
},
host: 'ondemand.saucelabs.com',
port: 80,
user: process.env.SAUCE_USERNAME,
key: process.env.SAUCE_ACCESS_KEY,
logLevel: 'silent'
}).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