Skip to content

Instantly share code, notes, and snippets.

@crossbrowsertesting
Created May 21, 2015 02:40
Show Gist options
  • Save crossbrowsertesting/fc731ac3f73561aac89d to your computer and use it in GitHub Desktop.
Save crossbrowsertesting/fc731ac3f73561aac89d to your computer and use it in GitHub Desktop.
webdriverio example
var webdriverio = require('webdriverio');
var webdriverio =
client = webdriverio.remote({
desiredCapabilities: {
name : 'Selenium Test Example',
build : '1.0',
browser_api_name : 'FF35',
os_api_name : 'WinXPSP2-C2',
screen_resolution : '1024x768',
record_video : "true",
record_network : "true",
record_snapshot : "false",
browserName : "firefox", // <---- this needs to be the browser type in lower case: firefox, internet explorer, chrome, opera, or safari
username : "CROSSBROWSER USER NAME",
password : "CROSSBROWSER AUTH KEY"
},
host: 'hub.crossbrowsertesting.com',
port: 80,
user: "CROSSBROWSER USER NAME",
key: "CROSSBROWSER AUTH KEY",
logLevel: 'silent'
}).init();
client
.url('http://www.google.com')
.getTitle(function(err, title) {
console.log('Title was: ' + title);
})
.end();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment