diff --git a/lib/appium.js b/lib/appium.js index 55ca2c295..462ad7484 100644 --- a/lib/appium.js +++ b/lib/appium.js @@ -290,7 +290,7 @@ Appium.prototype.invoke = function (cb) { cb(null, this.device); }.bind(this); - this.device.start(onStart, this.cleanupSession.bind(this)); + this.device.start(onStart, _.once(this.cleanupSession.bind(this))); } }; diff --git a/test/functional/common/webview/cookies-base.js b/test/functional/common/webview/cookies-base.js index ed2196546..d186f85c9 100644 --- a/test/functional/common/webview/cookies-base.js +++ b/test/functional/common/webview/cookies-base.js @@ -23,7 +23,7 @@ module.exports = function (desired) { }); describe('within webview', function () { function _ignoreEncodingBug(value) { - if (isChrome) { + if (isChrome(desired)) { console.warn('Going round android bug: whitespace in cookies.'); return encodeURI(value); } else return value; diff --git a/test/functional/ios/uicatalog/move-specs.js b/test/functional/ios/uicatalog/move-specs.js index 76b8c5c6e..12c406b76 100644 --- a/test/functional/ios/uicatalog/move-specs.js +++ b/test/functional/ios/uicatalog/move-specs.js @@ -11,9 +11,9 @@ describe('uicatalog - move', function () { it('should be able to click on arbitrary x-y elements', function (done) { driver - .elementByClassName('UIATableCell').moveTo(10, 10).click() - .elementByXPath("//UIAButton[@name='Rounded']") - .should.eventually.exist + .elementByXPath("//UIAStaticText[contains(@name, 'Buttons')]").moveTo(10, 10).click() + .elementByXPath("//UIAElement['SYSTEM (CONTACT ADD)']") + .should.eventually.exist .should.eventually.exist .nodeify(done); }); });