Last active
December 30, 2015 21:10
-
-
Save christian-bromann/6358232 to your computer and use it in GitHub Desktop.
Use Webdriverjs with Sauce Labs (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({ | |
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