fogwolf
fogwolf

Reputation: 941

Error running UI Automation from command line

I think this is a first - I'm getting an error and the exception constant that I'm getting back returns nothing when I search for it on Google.

Basically I'm trying to run UI Automation on my iOS app from the CLI and am getting the following error message:

2013-02-22 13:12:17.820 ScriptAgent[16626:2e07] +[UIAXElement initialize]: UIAutomation never received kAXAccessibilityLoaded. Waited 20.02 seconds.

2013-02-22 13:12:17.826 ScriptAgent[16626:2e07] Unexpected error in -[UIAXElement_0xad343c initialize], /SourceCache/UIAutomation_Sim/UIAutomation-271/Framework/UIAXElement.m line 165, kAXErrorServerNotFound

2013-02-22 13:12:17.828 ScriptAgent[16626:2e07] Terminating app due to uncaught exception 'kUIAExeceptionAccessibilityError', reason: 'Unexpected error in -[UIAXElement_0xad343c initialize], /SourceCache/UIAutomation_Sim/UIAutomation-271/Framework/UIAXElement.m line 165, kAXErrorServerNotFound'

First throw call stack: (0x491012 0x1b78e7e 0x490deb 0xa8a55b 0x1b797cf 0x1b80a0d 0x1b77aeb 0x1b77e22 0x1b8a0e1 0xaa2605 0xa847 0x5d8d 0x866d 0x2925) libc++abi.dylib: terminate called throwing an exception

2013-02-22 13:12:18.264 instruments[16585:2227] Automation Instrument ran into an exception while trying to run the script. UIAScriptAgentSignaledException

2013-02-22 19:12:18 +0000 Fail: An error occurred while trying to run the script. Instruments Trace Complete (Duration : 41.326542s; Output : /Users/newmanp/Work/iOS/CMAiPad/CMA.Mobile/UIScripts/instrumentscli3.trace)

I search on kAXAccessibilityLoaded or kAXErrorServerNotFound and get no hits at all. Here's what my command line call looks like:

instruments -t ~/Work/iOS/Platforms/iPhoneOS.platform//Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate /Users/newmanp/Library/Application\ Support/iPhone\ Simulator/6.0/Applications/B60B9BD7-357D-49AA-9E6F-986929C5D151/CMA.app -e UIASCRIPT ./cmaAutomationTests.js -e UIARESULTSPATH "."

Any suggestions of what I might be doing wrong greatly appreciated.

Upvotes: 3

Views: 3641

Answers (3)

bILL
bILL

Reputation: 1

My UIAScriptAgentSignaledException is resolved by enabling the 'Enable UI Automation' option in iPhone/Settings/Developer/UI Automation section.

Upvotes: 0

Bob Warwick
Bob Warwick

Reputation: 201

We saw this error when "Enable UI Automation" wasn't turned on in the "Developer" section of the "Settings" app. Turning on the setting resolved the error.

Upvotes: 10

Alexander McConaughey
Alexander McConaughey

Reputation: 19

I had something similar, try

sudo rm /tmp/instruments_sock

You can see it here https://github.com/appium/appium/issues/172

Upvotes: 0

Related Questions