Well, I think I’m pretty aware of promises but whatever.
While returning the promise (I now execute tests with a light configuration), I’m stuck on an error during the execution.
onPrepare: function() {
var wd = require('wd'),
protractor = require('protractor'),
wdBridge = require('wd-bridge')(protractor, wd);
wdBridge.initFromProtractor(exports.config);
browser.params.mobile = true;
browser.params.isNative = true;
browser.params.iOS = true;
return wdBrowser.contexts().then(function(contexts) {
console.log('#contexts');
console.log(contexts);
});
}
Throw this error on Protractor’s console
Using the selenium server at http://localhost:4723/wd/hub
[launcher] Running 1 instances of WebDriver
[launcher] Error: Error: connect ECONNREFUSED
at exports._errnoException (util.js:746:11)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1000:19)
[launcher] Process exited with error code 100
On Appium side, I can’t see any weird error or something else. Here is an extract :
info: --> GET /wd/hub/session/1fdd24c5-94e9-4142-ae7e-3945f9495d18 {}
info: [debug] Responding to client with success: {"status":0,"value":{"webStorageEnabled":false,"locationContextEnabled":false,"browserName":"","platform":"MAC","javascriptEnabled":true,"databaseEnabled":false,"takesScreenshot":true,"networkConnectionEnabled":false,"warnings":{},"desired":{"browserName":"","appium-version":"1.4.0","platformName":"iOS","platformVersion":"8.1.3","deviceName":"MACIT’s iPad","seleniumAddress":"http://localhost:4723/wd/hub","isMobile":true,"isNative":true,"app":"/Users/nudo/Work/bla/PIC/workspace/mybla/test/e2e/native/blaiOSWrapper.zip","udid":"d271dd9020ed0bd356a8d0a5ee70bf102b4893d6","count":1},"appium-version":"1.4.0","platformName":"iOS","platformVersion":"8.1.3","deviceName":"MACIT’s iPad","seleniumAddress":"http://localhost:4723/wd/hub","isMobile":true,"isNative":true,"app":"/Users/nudo/Work/bla/PIC/workspace/mybla/test/e2e/native/blaiOSWrapper.zip","udid":"d271dd9020ed0bd356a8d0a5ee70bf102b4893d6","count":1},"sessionId":"1fdd24c5-94e9-4142-ae7e-3945f9495d18"}
info: <-- GET /wd/hub/session/1fdd24c5-94e9-4142-ae7e-3945f9495d18 200 1.076 ms - 964 {"status":0,"value":{"webStorageEnabled":false,"locationContextEnabled":false,"browserName":"","platform":"MAC","javascriptEnabled":true,"databaseEnabled":false,"takesScreenshot":true,"networkConnectionEnabled":false,"warnings":{},"desired":{"browserName":"","appium-version":"1.4.0","platformName":"iOS","platformVersion":"8.1.3","deviceName":"MACIT’s iPad","seleniumAddress":"http://localhost:4723/wd/hub","isMobile":true,"isNative":true,"app":"/Users/nudo/Work/bla/PIC/workspace/mybla/test/e2e/native/blaiOSWrapper.zip","udid":"d271dd9020ed0bd356a8d0a5ee70bf102b4893d6","count":1},"appium-version":"1.4.0","platformName":"iOS","platformVersion":"8.1.3","deviceName":"MACIT’s iPad","seleniumAddress":"http://localhost:4723/wd/hub","isMobile":true,"isNative":true,"app":"/Users/nudo/Work/bla/PIC/workspace/mybla/test/e2e/native/blaiOSWrapper.zip","udid":"d271dd9020ed0bd356a8d0a5ee70bf102b4893d6","count":1},"sessionId":"1fdd24c5-94e9-4142-ae7e-3945f9495d18"}
info: --> POST /wd/hub/session/1fdd24c5-94e9-4142-ae7e-3945f9495d18/timeouts/async_script {"ms":11000}
info: [debug] Set iOS async script timeout to 11000ms
info: [debug] Responding to client with success: {"status":0,"value":null,"sessionId":"1fdd24c5-94e9-4142-ae7e-3945f9495d18"}
info: <-- POST /wd/hub/session/1fdd24c5-94e9-4142-ae7e-3945f9495d18/timeouts/async_script 200 1.133 ms - 76 {"status":0,"value":null,"sessionId":"1fdd24c5-94e9-4142-ae7e-3945f9495d18"}
info: --> DELETE /wd/hub/session/1fdd24c5-94e9-4142-ae7e-3945f9495d18 {}
info: Shutting down appium session
info: [debug] Stopping ios
info: [debug] Destroying instruments client socket.
info: [debug] Closing socket server.
info: [debug] Instruments socket server was closed
info: [debug] Sending sigterm to instruments
info: [debug] [INST] 2015-06-05 12:46:44 +0000 Stopped: Script was stopped by the user
info: [debug] [INST STDERR] 2015-06-05 14:46:44.572 instruments[84399:4053340] Attempting to set event horizon when core is not engaged, request ignored
info: [debug] [INST STDERR] 2015-06-05 14:46:44.573 instruments[84399:4053340] Attempting to set event horizon when core is not engaged, request ignored
info: [debug] [INST] Instruments Trace Complete (Duration : 7.409178s; Output : /tmp/appium-instruments/instrumentscli0.trace)
info: [debug] [INSTSERVER] Instruments exited with code 0
info: [debug] Cleaning up after instruments exit
info: [debug] Stopping iOS log capture
info: [debug] Running ios sim reset flow
info: [debug] Killing the simulator process
info: [debug] Killing any other simulator daemons
info: [debug] Killall iOS Simulator
I tried to call contexts()
on wdBrowser, but also currentContext()
and wdBrowser.setAsyncScriptTimeout(12000)
but the’yre all throwing the error.