UI Automation unable to see second alert after dismissing one system alert

Originator:jarod
Number:rdar://29882536 Date Originated:1/5/17
Status:Open Resolved:
Product: Product Version:
Classification:Bug Reproducible:Always
 
Summary:
When launching an app that requires Notifications and Location privileges UI Automation is unable to remove the second system notification when running a test.

Steps to Reproduce:
To replicate in attached project.
1) open in Xcode
2) set project to build to iPhone 5s on iOS 9.3
3) open simulator for iPhone 5s on iOS 9.3 and reset all content and settings
4) in Xcode go to UITestProjectUITests.swift and run testExample()
5) when tests run see that two alerts are presented. The first one is dismissed by the system but the second one is not see and can not be removed by the tests or the system

I also tried adding addUIInterruptionMonitor(withDescription:) but that did not catch it either. 

Expected Results:
the UI Automation should be able to dismiss all the system alerts

Actual Results:
UI automation only dismisses the first system alert and can't see the next one.

Version:
Xcode Version 8.2.1 (8C1002)

Notes:


Configuration:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!