我遵循该网站以开始UI自动化。
http://blog.manbolo.com/2012/04/08/ios-automated-tests-with-uiautomation#1.2
我试图从命令行启动Instruments。不幸的是,我收到了一个错误:
这是我使用的命令:
2013-03-14 14:06:36.376 instruments[17854:1207] Connection to the remote device lost while launching target. Aborting...
2013-03-14 14:06:36.378 instruments[17854:1207] Recording cancelled : At least one target failed to launch; aborting run
Instruments Trace Error : Failed to start trace.
这是我使用的命令:
instruments -w {deviceId} -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate {appname} -e UIASCRIPT /Path/to/Script.js
目前我正在使用Xcode 4.6版本。
{appname}
作为参数。你不能只指定名称,必须指定由Xcode构建的应用程序包的完整路径。Instruments使用此路径来查找捆绑标识符,以便知道要在设备上启动哪个应用程序。 - Jonathan Penn