Skip to content

Instantly share code, notes, and snippets.

@lazytesting lazytesting/package.json
Last active Nov 23, 2016

Embed
What would you like to do?
Quick webdriver script

Install and run webdriver server

npm install selenium-standalone@latest -g selenium-standalone install selenium-standalone start

{
"name": "wd",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"webdriverio": "^4.2.16"
}
}
var webdriverio = require('webdriverio');
var options = { desiredCapabilities: { browserName: 'chrome' } };
var client = webdriverio.remote(options);
client
.init()
.url('http://www.google.com')
.getTitle().then(function(title) {
console.log('Title is: ' + title);
})
.end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.