How to ignore system dialogs for IOS platforms when running tests in test cloud

During the test execution for IOS platform a system alert dialog popup before the test step one is finished (see attached picture) . Since it is ”outside” of the application itself and out of our control, how can you ignore the system dialog regarding, permissions, assertions and alerts dialog that IOS populates?

Can you set some value in the project solution in the class ”AppInitializer” before the actual test starts, or some method to ignore all systems dialog windows during test execution?

We identify these dialogs with text matching so if it is an alert we have not coded for or in a language we have not provided for we won't identify it and dismiss it. Current languages we identify are USEnglish, Danish, Dutch, German, EUSpanish, ES419Spanish, French, and Russian. Some of these languages only "know" certain dialogs so we may miss some even in these languages. If you need to add one or more DM me or contact testcloud support.

If an iOS system dialog was dismissed automatically with UITest and Xcode 7 it should also be automatically dismissed with UITest 2.0.0 and Xcode 8 (but note the second bullet below). If that is not the case give us the particulars here or in a support case.

We recognize system dialogs to dismiss by partial text matching. There are two categories of dialogs we miss.

Those we have not encountered before. This is typically a dialog in a language we have not addressed. If you suspect this is the case tell us the language it is in and give us the text of the dialog.

tl; dr: Still an issue on latest with these phrases of permissions:
"[our app]" Would Like to Access the Camera
"[our app]" Would Like to Access Your Photos

On latest stable UITest 2.0.0 and Agent 0.20.3, this still appears to be an issue in our case with two of our tests.

We have a third party barcode scanning plugin that needs access to the camera. We had to add explicit camera permission to the info.plist to avoid crashing at this point in XCode 8 / iOS 10. This occurs in the middle of using our app, when a user presses a 'scan' button, so I don't think this is a startup timing issue as we are in the middle of working automation control and the automation has already performed several steps at this point.

The camera case looks like this:

The test 'user' presses the 'Scan' button, activating the third party camera based barcode scanner.

The dialog pops up immediately.

The dialog reads: "[our app]" Would Like to Access the Camera

The two options are: Don't Allow | OK

The test eventually times out.

Also note an App.Repl() at this point can't see or interact with the dialog, which may be expected.

We also see this in a 'add photo from gallery' case.

The test 'user' pushes a button to 'add photo'

The dialog pop up immediately.

the dialog reads: "[our app]" Would Like to Access Your Photos

The two options are: Don't Allow | OK

The test eventually times out looking for the next screen, which hasn't appeared yet.

If I manually add permissions in these cases, the tests then run without issue.

Let me know if you need screenshots or supporting details. I am sometimes on the Xamarin Slack in #TestCloud as well.

Thank you so much for your quick response to such a large platform change! We appreciate the updates greatly.

@MattiasEdman The dialog you show in a screenshot is not one we automatically dismiss with Xcode 7 or Xcode 8. I'll DM you to get more information about the language and text in the dialog so we can add it.

@ColinDabritz I believe that the dialogs you are describing "should" be automatically detected and dismissed already. I'll DM you to get more info.

And yes, it is normal that you can not "see" the alert dialog in Repl.

We identify these dialogs with text matching so if it is an alert we have not coded for or in a language we have not provided for we won't identify it and dismiss it. Current languages we identify are USEnglish, Danish, Dutch, German, EUSpanish, ES419Spanish, French, and Russian. Some of these languages only "know" certain dialogs so we may miss some even in these languages. If you need to add one or more DM me or contact testcloud support.

Im running a test app for IOS "10.1.1", "10.0.3" and "10.0.2". But, in 10.1.1 I got this popup (see file). This seems to be a new behavior when running test apps for this specific iOS version. How to handle this? Message says "Developers for this app need to update this app so compability is improved" Any workaround for this?

Hi. My specific issue with this problem was resolved a while ago, in the latest Xamarin.UITest. If you ensure your test support packages are up to date you should not be seeing this issue any more. If you have the latest packages and have verified that this is still consistently an issue for you, I think it's time for a support ticket, and possibly more details here.

My workaround was simply to use 'categories' to tag any test that caused the problematic dialogs, and ignored those tests in my submission to test cloud.

We did a custom implementation of google sign-in for android app. The issue that we are having is that we don't see the open dialog message. So we cannot access to the app. Also we tried to press the coordinate of the bottom but we have the same problem.

We are having a similar issue to this. When running our app we get a system alert popup asking for access to the camera. This is being dismissed automatically for all languages correctly apart from German.
When the device is set to German language and region the alert appears and is not being accepted so the test now fails.
Is this a known problem and is there a workaround?
Thanks.