Appium - IOS 9.3 - "Open app" Alert view cannot be pressed

354 views Asked by At

I'm running automation tests on an iPhone app. When automating a simulator with ios > 9, In one of the testcases, the flow goes through the app and then to safari, at the end of the flow i get an Alert that redirects me back to the app.

I'm unable to interact with this alert no matter what i try to do, including capabilities like "autoAcceptAlerts", "autoDismissAlerts", also driver.swithTo().alert().confirm() and .tap() with coordinates.

Is there any way that I could interact with this system alert? Back to app Alert

2

There are 2 answers

5
Jasmine James On

I don't think that this is possible. I ran into this issue when a link within my app redirected me to Safari. When I tried to tap the Back To "MyAppName" button in the top left corner, the element could not be locator nor interacted with.

I believe because the application was not explicitly defined for Appium in the execution, that we are unable to interact with System alerts not initiated by the app being tested.

Hope that helps!

0
nmilosevic On

I know it's 2020 but just to let you know that I was able to interact with the "Open app in..." alert using driver.switchTo().alert().accept(). I'm currently running appium v1.19.0-beta.0 and my io.appium:java-client is v7.3.0.