Why am I seeing “An error occurred while trying to run the script.” in the UI Automation instrument?
When I try to run a UI Automation script on iOS 5 devices I am getting the following error: "An error occurred while trying to run the script." The same script is running perfectly in the simulator or on an iOS 4.3.3 device. How can I solve this problem? user1751511 This should fix this issue: sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer On devices you should explicity allow to run UI Automation scripts. Go to Settings -> Developer Switch Enable UI Automation to on After turning the option on, the error went away and everything worked as expected. I would try closing