Alert box for location permissions causes mainWindow() to return UIAElementNil

Originator:iFreeCarve
Number:rdar://18486571 Date Originated:29-Sep-2014 10:20 AM
Status:Closed Resolved:Fixed in 8.1 simulator
Product:Xcode Product Version:6.0.1
Classification:Major Reproducible:Always
 
Summary:
Xcode 6.0.1: Alert box for location permissions causes mainWindow() to return UIAElementNil in instruments -- UIAutomation becomes inoperable.

Steps to Reproduce:
1. Have iOS app with 2 screens: "log in", and "log out".  The "log out" screen requests location information (triggering a location permissions alert)
2. Have a UIAutomation script that logs in, handles the alert, prints the value of UIATarget.frontMostApp().mainWindow(), then logs out
3. Run the script using instruments
4. Note that the UIAutomation script can interact with the "log in" screen normally
5. Note that the location alert is handled properly
6. Note that the value of UIATarget.frontMostApp().mainWindow() is printed as [object UIAElementNil]
7. Note that the script fails; it cannot find the "log out" button because the mainWindow() object is nil

Expected Results:
UIATarget.frontMostApp().mainWindow() should never be [object UIAElementNil] while an app is running

Actual Results:
UIATarget.frontMostApp().mainWindow() correctly returns an [object UIAWindow], until the point at which the location permissions alert is shown.  After this point, it only returns [object UIAElementNil]

Version:
Xcode 6.0.1/6A317 & OS X 10.9.5 (13F34)

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!