Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Use Webdriverjs with Sauce Labs (example)
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