Skip to content

Commit

Permalink
fix mobile safari alert issues (fix appium#850)
Browse files Browse the repository at this point in the history
  • Loading branch information
teragoon committed Jul 8, 2013
1 parent 4484a1a commit 8ea541d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/ios.js
Expand Up @@ -581,14 +581,21 @@ IOS.prototype.push = function(elem) {
this.queue.push(elem);
var me = this;

//logger.info(("elem : " + elem).green);
if (typeof elem === "object") {
elem = elem[0];
}

var next = function() {
if (me.selectingNewPage && me.curWindowHandle) {
logger.info("We're in the middle of selecting a new page, " +
"waiting to run next command until done");
setTimeout(next, 500);
return;
} else if (me.curWindowHandle && me.processingRemoteCmd &&
elem !== "au.alertIsPresent()") {
elem !== "au.alertIsPresent()" && elem !== "au.getAlertText()" &&
elem !== "au.acceptAlert()" && elem !== "au.dismissAlert()" &&
elem !== "au.setAlertText()" && elem !== "au.waitForAlertToClose") {
logger.info("We're in the middle of processing a remote debugger " +
"command, waiting to run next command until done");
setTimeout(next, 500);
Expand Down

0 comments on commit 8ea541d

Please sign in to comment.