Command line 从命令行运行UIAutomation instruments会导致NSInvalidArgumentException

Command line 从命令行运行UIAutomation instruments会导致NSInvalidArgumentException,command-line,instruments,xcode4.5,ios-ui-automation,ios6,Command Line,Instruments,Xcode4.5,Ios Ui Automation,Ios6,以下是正在发生的事情: 我在Xcode 4.5.1中创建了一个全新的“单视图”应用程序,使用以下命令行进行构建: xcodebuild -sdk iphonesimulator6.0 clean build CONFIGURATION_BUILD_DIR=/tmp/AutomationBugRepro 和一个成功的构建。现在,当我使用仪器运行UIAutomation脚本时,我得到以下错误: 2012-10-04 11:27:33.930 instruments[4707:f07] Automa

以下是正在发生的事情:

我在Xcode 4.5.1中创建了一个全新的“单视图”应用程序,使用以下命令行进行构建:

xcodebuild -sdk iphonesimulator6.0 clean build CONFIGURATION_BUILD_DIR=/tmp/AutomationBugRepro
和一个成功的构建。现在,当我使用
仪器运行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");
在尝试在instruments GUI中执行任何自动化操作时,我也遇到了一个未指明的错误,我在apple dev论坛的帖子中对此进行了详细介绍:


非常感谢您的帮助。

如果我不清楚,我正在尝试在模拟器中运行应用程序,没有安装在设备上。您是否安装了任何其他版本的Xcode?它在使用示例javascript文件时运行良好,但当我添加新的自定义脚本文件时,它开始出现错误,甚至设置回示例脚本文件也不起作用。