Hi,
With the latest version of Appium, I am unable to interact with alert boxes, such as those for permissions.
Class name - XCUIElementTypeAlert
Could someone please help with this issue or suggest a workaround?
Thanks.
Hi,
With the latest version of Appium, I am unable to interact with alert boxes, such as those for permissions.
Class name - XCUIElementTypeAlert
Could someone please help with this issue or suggest a workaround?
Thanks.
Example to try
// Java
@Step("Tap 'Accept permissions' button")
public boolean tapAcceptPermissionsButton() {
Logger.log();
final String iosLocator = "**/XCUIElementTypeButton[`name == \"Allow While Using App\" OR name == \"Allow\"`]";
boolean bool = false;
// https://appium.github.io/appium-xcuitest-driver/7.3/reference/settings/
try {
driver.setSetting("acceptAlertButtonSelector", iosLocator);
} catch (Exception ignored) {
}
try {
driver.switchTo().alert().accept();
bool = true;
} catch (Exception ignored) {
}
return bool;
}