I have the issue that I could not close the notification, location, photo access permission alert in iOS10 simulator, Xcode 9, UITests, but it works well in iOS11 simulator.
I found the thread that discuss about the similar issue, but there is not any useful workaround to fix it.
Did you try
in the place you expect the dialog?
Or this method : https://useyourloaf.com/blog/handling-system-alerts-in-ui-tests/
This worked for me in setup method after app.launch()