When I run the below code the notification
iOS notification popup is display & then the test is failing before i can handle the popup (pressing the OK button).
Any suggestion how to either avoid the popup or code handle the exception?
Thanks! in advance…
Is it possible to enable / disable it autoAcceptAlerts during run time?
At one point I want to enable this capability.
Is it possible without initiate the driver (I don’t want that the test will stop running when disable / enable this capability)?
Thanks again for the help!
Using driver capability i think NO as it will blindly accept or reject the pop up else you have some specific condition set to ignore a specific alert .
I am not sure in mobile testing but if you are using EventFiring driver in on Alert() you can adda if statement on alert text to ignore.
Add a sleep e.g. Sleep(5); in the actual source code and then build the app, the sleep is to be placed before the code that executes the Notification popup. This allows Appium to find the popup and the test will continue.
I bet the Notification in Appium Desktop will give an id for ok or Allow. Use this to target and click. Give a wait until the object shows. You can use auto allow or disallow in your Desired Capabilities.