From 9f0eebecfa9989d86de2c0db15f1aa2675c01afe Mon Sep 17 00:00:00 2001 From: Jonathan Lipps Date: Tue, 25 Feb 2014 18:52:20 -0800 Subject: [PATCH] update use of au.mainApp to make it a function --- lib/devices/ios/ios-controller.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/devices/ios/ios-controller.js b/lib/devices/ios/ios-controller.js index 6dde2eac730..415cdcf94f9 100644 --- a/lib/devices/ios/ios-controller.js +++ b/lib/devices/ios/ios-controller.js @@ -49,9 +49,9 @@ iOSController.findUIElementOrElements = function (strategy, selector, ctx, many, command = ["au.getElement", ext, "ByXpath('", selector, "'", ctx, ")"].join(''); } else if (strategy === "id") { selector = selector.replace(/'/g, "\\\\'"); // must escape single quotes - command = ["var exact = au.mainApp.getFirstWithPredicateWeighted(\"name == '", selector, + command = ["var exact = au.mainApp().getFirstWithPredicateWeighted(\"name == '", selector, "' || label == '", selector, "' || value == '", selector, "'\");"].join(''); - command += ["exact && exact.status == 0 ? exact : au.mainApp.getFirstWith", + command += ["exact && exact.status == 0 ? exact : au.mainApp().getFirstWith", "PredicateWeighted(\"name contains[c] '", selector, "' || label contains[c] '", selector, "' || value contains[c] '", selector, "'\");"].join(''); } else { @@ -89,7 +89,7 @@ iOSController.handleFindCb = function (err, res, many, findCb) { iOSController.findElementNameContains = function (name, cb) { var doFind = function (findCb) { - this.proxy(['au.mainApp.getNameContains("', name, '")'].join(''), function (err, res) { + this.proxy(['au.mainApp().getNameContains("', name, '")'].join(''), function (err, res) { if (err || res.status !== 0) { findCb(false, err, res); } else {