jonathanpenn / AutomationExample

Sample code for how to run UI Automation from the command line.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UIAutomation never received kAXAccessibilityLoaded

ryan-mars opened this issue · comments

When I run this using Xcode 5.1 beta 5 it fails to properly start ScriptAgent.

2014-03-07 14:49:24.367 ScriptAgent[3654:2f07] CLTilesManagerClient: initialize, sSharedTilesManagerClient
2014-03-07 14:49:24.367 ScriptAgent[3654:2f07] CLTilesManagerClient: init
2014-03-07 14:49:24.367 ScriptAgent[3654:2f07] CLTilesManagerClient: reconnecting, 0x109e0aba0
2014-03-07 14:49:54.443 ScriptAgent[3654:2f07] +[UIAXElement initializeAccessibility]: UIAutomation never received kAXAccessibilityLoaded.  Waited 30.03 seconds.
2014-03-07 14:49:54.444 ScriptAgent[3654:2f07] AXError: Could not auto-register for pid status change
2014-03-07 14:49:54.452 ScriptAgent[3654:2f07] Failed to enable accessiblity, kAXErrorServerNotFound
2014-03-07 14:49:54.831 instruments[3648:581f] Automation Instrument ran into an exception while trying to run the script.  UIAScriptAgentSignaledException
2014-03-07 20:49:54 +0000 Fail: An error occurred while trying to run the script.

If you restart your machine, does the issue still happen?

Yes, when I reboot I still have the issue. I rebooted once after reading some forum posts and it worked once, but never again. Subsequent reboots no longer solve the problem. I'm skeptical that the first reboot actually cleared it and that it wasn't something else.

If I switch back to Xcode 5 then the problem goes away. If I switch back to 5.1b5 it happens again. Very strange.

@jonathanpenn I'm wondering if (hoping really) it's just my computer. Would you mind giving it a shot?

@ryanwmarsh just tried it on my machine with beta 5. I don't get your error. However, the script runs but errors for another reason. It seems that UI Automation isn't able to find table cells right now in this beta release. :/

@jonathanpenn Well that's a relief then. At least it works and it's only my box. Thanks for going to the trouble to look into this.

I'll go ahead and close this for now. There's no use trying to search for workarounds for the betas anyway, since things could change. When Xcode 5.1 gets released, we'll see what happens.

I just installed Xcode 5.1 (final) and everything works fine!