robotframework-appiumlibrary icon indicating copy to clipboard operation
robotframework-appiumlibrary copied to clipboard

Unable to interract with alerts on iOS simulator since xcuitest v6

Open zastress opened this issue 1 year ago • 1 comments

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'}

zastress avatar Mar 13 '24 11:03 zastress

Fix created here: https://github.com/serhatbolsu/robotframework-appiumlibrary/pull/420

zastress avatar Mar 13 '24 12:03 zastress