robotframework-appiumlibrary
robotframework-appiumlibrary copied to clipboard
Unable to interract with alerts on iOS simulator since xcuitest v6
Appium recently changed the way xcuitest driver interracts with iOS devices and we are unable to click alert buttons from the app.
The change is documented here:
- https://github.com/appium/appium-xcuitest-driver/blob/master/CHANGELOG.md#600-2024-02-01
- https://appium.github.io/appium-xcuitest-driver/latest/guides/troubleshooting/#interact-with-dialogs-managed-by-comapplespringboard
I believe the solution is to create a keyword called Click Alert Button to only handle alerts.
Examples:
driver.settings.update({acceptAlertButtonSelector: '**/XCUIElementTypeButton[label=="Allow Once"]'}) driver.switch_to.alert.accept
driver.execute_script 'mobile: alert', {action: 'accept', buttonLabel: 'Allow Once'}
Fix created here: https://github.com/serhatbolsu/robotframework-appiumlibrary/pull/420