I maintain a large pool of mac os machines for use in clustered UI testing of a mac OS app. One thing that constantly brings us pain is that Mac os has a seemingly limitless number of popups and dialogs that come without warning and no clear way to disable them.
Xcode Mac OS UI tests depend on taking full control of the machine, but are not smart enough to know when another application window is in front of the target application you are trying to test.
The two worst ones we deal with on a regular basis are:
Enter the name and password for this 802.1x network even though WiFi is totally off, and the machines are wired in.
and the crash reporter (when something crashes).
Is there a catch all way to ensure all dialogs, apps, anything that can come to the foreground can be disabled?