You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UIATarget.onAlert = function onAlert(alert) {
var title = alert.name();
UIALogger.logWarning("Alert with title '" + title + "' encountered.");
// return false to use the default handler
return false;
}
var target = UIATarget.localTarget();
target.setDeviceOrientation(UIA_DEVICE_ORIENTATION_PORTRAIT);
target.frontMostApp().tabBar().buttons()["Special"].tap();
target.frontMostApp().mainWindow().elements()["special page"].buttons()["show alert"].tap();
UIALogger.logPass("alert: ".concat(target.frontMostApp().alert()))
// Alert detected. Expressions for handling alerts should be moved into the UIATarget.onAlert function definition.
UIALogger.logPass("button: ".concat(target.frontMostApp().alert().defaultButton().name()))
I found bug in the UIAAlert API.
This is an Apple bug.
Workaround
If your UIAlert has two buttons, you can do this:
Reproduce
Expected
Actual
Regression
Repeat with iOS 7.1
The text was updated successfully, but these errors were encountered: