inkling/Subliminal — pull request #228 by justinseanmartin (2014-07-06 20:07:28+00:00)
Title: [WIP] Fix UIA path for elements within an Alert's view

There is a missing element that appears in the UIA path that is being trimmed in Subliminal. This change is needed in order to find elements in an alert window. I'm not sure if my solution is acceptable of comparing against the class name of _UIModalItemAlertContentView as a string.

The reason for doing this is because we have two alerts that pop up back to back in a particular case. When this happens, we need to ensure that the alerts are handled in a specific order, as the second alert pops in front of the first one while UIA is trying to tap on the first one. This leads to a timing issue and causes the tests to fail randomly. Ignoring the first alert and handling it manually seemed like a simpler solution than trying to modify the alert handler's behavior to respect insertion order.