从命令行运行UIAutomation仪器会导致NSInvalidArgumentException

时间:2012-10-04 15:32:01

标签: command-line instruments xcode4.5 ios-ui-automation ios6

以下是发生的事情:

我在Xcode 4.5.1中创建了一个全新的“Single View”应用程序,使用它在命令行上构建它:

xcodebuild -sdk iphonesimulator6.0 clean build CONFIGURATION_BUILD_DIR=/tmp/AutomationBugRepro

Which results in this output并成功构建。现在,当我使用instruments运行UIAutomation脚本时,出现以下错误:

2012-10-04 11:27:33.930 instruments[4707:f07] Automation Instrument ran into an exception while trying to run the script.  NSInvalidArgumentException
2012-10-04 15:27:33 +0000 Fail: An error occurred while trying to run the script.

我用来运行它的命令:

instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -D ./trace /tmp/AutomationBugRepro/AutomationBugRepro2.app -e UIARESULTSPATH ./automation_results -e UIASCRIPT automation.js

automation.js只包含以下一行:

UIALogger.logMessage("Testing UIAutomation from the command line");

当我尝试在仪器GUI中执行任何自动化操作时,我也会收到一个未指定的错误,我在这篇苹果开发论坛帖子中详细介绍过:

https://devforums.apple.com/thread/169338

任何帮助将不胜感激,谢谢。

0 个答案:

没有答案