从命令行运行UI Automation时出错

时间:2013-02-22 19:26:21

标签: ios ui-automation ios-ui-automation

我认为这是第一次 - 我收到了一个错误,当我在Google上搜索时,我收到的异常常量没有返回。

基本上我正试图从我的iOS应用程序上运行UI自动化,并收到以下错误消息:

  

2013-02-22 13:12:17.820 ScriptAgent [16626:2e07] + [UIAXElement initialize]:UIAutomation从未收到过kAXAccessibilityLoaded。等了20.02秒。

     

2013-02-22 13:12:17.826 ScriptAgent [16626:2e07] - [UIAXElement_0xad343c initialize],/ 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 0x866d 0x2925)   libc ++ abi.dylib:terminate调用抛出异常

     

2013-02-22 13:12:18.264 instruments [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“。”

对我可能做错的任何建议都非常感激。

3 个答案:

答案 0 :(得分:10)

我们在"启用UI自动化"时看到了这个错误。并没有在"开发人员" "设置"的部分应用程序。打开设置解决了错误。

答案 1 :(得分:0)

我有类似的东西,试试

sudo rm /tmp/instruments_sock

您可以在此处查看https://github.com/appium/appium/issues/172

答案 2 :(得分:0)

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