3

这是正在发生的事情:

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

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

这将导致此输出和成功构建。现在,当我使用 运行 UIAutomation 脚本时instruments,出现以下错误:

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

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

4

0 回答 0