我认为这是第一次 - 我收到一个错误,当我在 Google 上搜索它时,我返回的异常常量什么也没返回。
基本上我正在尝试从 CLI 在我的 iOS 应用程序上运行 UI 自动化,并收到以下错误消息:
2013-02-22 13:12:17.820 ScriptAgent [16626:2e07] + [UIAXElement 初始化]:UIAutomation 从未收到 kAXAccessibilityLoaded。等了 20.02 秒。
2013-02-22 13:12:17.826 ScriptAgent [16626:2e07] -[UIAXElement_0xad343c 初始化]、/SourceCache/UIAutomation_Sim/UIAutomation-271/Framework/UIAXElement.m 第 165 行、kAXErrorServerNotFound 中的意外错误
2013-02-22 13:12:17.828 ScriptAgent [16626:2e07] 由于未捕获的异常“kUIAExeceptionAccessibilityError”而终止应用程序,原因:“-[UIAXElement_0xad343c 初始化]、/SourceCache/UIAutomation_Sim/UIAutomation-271/Framework/UIAXElement 中出现意外错误.m 第 165 行,kAXErrorServerNotFound'
第一次抛出调用堆栈:(0x491012 0x1b78e7e 0x490deb 0xa8a55b 0x1b797cf 0x1b80a0d 0x1b77aeb 0x1b77e22 0x1b8a0e1 0xaa2605 0xa847 0x5d8d 0x86++6d 0x2925)
2013-02-22 13:12:18.264 仪器 [16585:2227] 自动化仪器在尝试运行脚本时遇到异常。UIAScriptAgentSignaledException
2013-02-22 19:12:18 +0000 失败:尝试运行脚本时出错。仪器跟踪完成(持续时间:41.326542s;输出:/Users/newmanp/Work/iOS/CMAiPad/CMA.Mobile/UIScripts/instrumentscli3.trace)
我在 kAXAccessibilityLoaded 或 kAXErrorServerNotFound 上搜索并没有得到任何结果。这是我的命令行调用的样子:
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 "."
任何关于我可能做错的建议都非常感谢。