3

我认为这是第一次 - 我收到一个错误,当我在 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 "."

任何关于我可能做错的建议都非常感谢。

4

3 回答 3

10

当“设置”应用程序的“开发人员”部分中未打开“启用 UI 自动化”时,我们看到了此错误。打开设置解决了错误。

于 2014-11-22T21:11:30.560 回答
0

我也有类似的,试试

sudo rm /tmp/instruments_sock

你可以在这里看到它https://github.com/appium/appium/issues/172

于 2013-03-19T17:43:08.003 回答
0

我的 UIAScriptAgentSignaledException 通过启用 iPhone/Settings/Developer/UI 自动化部分中的“启用 UI 自动化”选项来解决。

于 2016-04-21T05:52:49.237 回答