update for new uiauto command processing

This commit is contained in:
sebv
2014-06-18 22:15:15 +08:00
parent d7b63a6dc2
commit 7fd67af4e3
4 changed files with 13 additions and 5 deletions
+8
View File
@@ -230,6 +230,14 @@ iOSController.findUIElementsByXpath = function (selector, ctx, many, curRetry,
};
iOSController.getSourceForElementForXML = function (ctx, cb) {
var _cb = cb;
cb = function (err, res) {
if (err) return cb(err);
// TODO: all this json/xml logic is very expensive, we need
// to use a SAX parser instead.
if (res.value) res.value = JSON.stringify(res.value);
_cb(err, res);
};
if (!ctx) {
this.proxy("au.mainApp().getTreeForXML()", cb);
} else {