Created
October 23, 2014 05:53
-
-
Save sebv/ad538e1db3d6a479f847 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
"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