Last updated: Nov 26, 2019 10:04
With iOS 13, Apple has introduced further hardening of privacy and security settings. Part of this is the addition of new system popups that give users better control over their privacy. This includes popup notifications to verify that users approve app access to location, contacts, and photos while the app is open or working in the background. Because these popups may disrupt automation flows, your implementation should be aware of such popups and have an effective handling mechanism.
These are examples of the most common prompts, followed by proposed solutions:
To mitigate such behavior in your automated tests with Perfecto, you can:
autoDismissAlertscapability to the driver with a value of
truethat accepts (or rejects) all access requests during test execution.
Use a simple try-catch pattern to accept alerts when they are expected to pop up in your test by finding the Allow buttons with a generic locator.
Use the Java class discussed in the Pop-up eliminator framework article as a model for a popup eliminator class in an application test script or as a framework for general popup elimination.