Skip to content

Commit

Permalink
update use of au.mainApp to make it a function
Browse files Browse the repository at this point in the history
  • Loading branch information
jlipps committed Feb 26, 2014
1 parent a061bcd commit 9f0eebe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/devices/ios/ios-controller.js
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 9f0eebe

Please sign in to comment.