Skip to content

Instantly share code, notes, and snippets.

@sebv
Created October 23, 2014 05:53
Show Gist options
  • Save sebv/ad538e1db3d6a479f847 to your computer and use it in GitHub Desktop.
Save sebv/ad538e1db3d6a479f847 to your computer and use it in GitHub Desktop.
"use strict";
var wd = require('wd');
require('colors');
var browser = wd.promiseChainRemote({host:'localhost', port:'4444'});
// optional extra logging
browser.on('status', function(info) {
console.log(info.cyan);
});
browser.on('command', function(eventType, command, response) {
console.log(' > ' + eventType.cyan, command, (response || '').grey);
});
browser.on('http', function(meth, path, data) {
console.log(' > ' + meth.magenta, path, (data || '').grey);
});
var caps = {
deviceName: 'selendroid',
aut: 'com.example.hello:0.0.1'
};
browser
.init(caps)
.windowHandles()
.window('WEBVIEW_0')
.source()
.quit()
.done();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment