Why am I seeing "An error occurred while trying to run the script." in the UI Automation instrument?
Asked Answered
P

4

14

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."

enter image description here

The same script is running perfectly in the simulator or on an iOS 4.3.3 device.

How can I solve this problem?

Pickings answered 18/1, 2012 at 7:1 Comment(0)
P
6

This should fix this issue:

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
Papagena answered 16/10, 2012 at 22:31 Comment(1)
Worked for me too, after I downloaded an ran, an ahem, more up-to-date version of xcode, then when back to old version.Alexandraalexandre
B
6

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.

Developer Settings - enable UI Automation

Bushy answered 30/3, 2015 at 15:58 Comment(0)
M
0

I would try closing xcode and starting the automation script without xcode running. I had an issue where the process was attached to xcode, when I attempted to run from instruments, xcode got stuck on a breakpoint/crash and I couldn't proceed.

The solution I'm proposing is run Instruments independent of xcode.

Mighell answered 25/1, 2012 at 2:13 Comment(1)
i am getting the same error but no success yet. i have tried all possible hit & trial method but nothing worked yet :(Solange
B
0

Might be you are having more than one Xcode in your machine either delete others or Just follow these steps

1 Open Xcode and go to its preferences. 2 Then open Location tab 3 In command line tools select the Xcode version that you are using . it might be possible that this entry is wrong

Biracial answered 9/12, 2013 at 7:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.