如何从命令行运行 UIAutomation 脚本到模拟器
我使用 UIAutomation 自动化了我的 iOS 应用程序,为了运行它,我启动 iOS Instruments 并运行脚本。如果我想在设备上运行相同的自动化脚本,我使用以下命令作为所需的
工具 -w -t /Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/ Automation.tracetemplate myapp -e UIASCRIPT regression.js
但如何从命令行运行它到 iOS 模拟器?
请建议。
谢谢 早形
I have automated my iOS application using UIAutomation, To run this I launch iOS Instruments and run the script. If Same automation script I want to run to the device I use the below command which works as desired
instruments -w -t /Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate myapp -e UIASCRIPT regression.js
But how do I run this from the command line to iOS Simulator ?
Please suggest.
Thanks
Sougata
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 Xcode 6.0.1 中,使用
-w
开关运行并传入模拟器的符号名称 现在似乎是必需的(至少这是我让它工作的唯一方法,而且我'曾经有过其他人验证并指出我这个解决方案)。请参阅我的答案 来自另一个 帖子 有一个明确的示例。
您还可以找到 bash shell 脚本 将为您处理调用,自动解析模拟器应用程序路径中的 UDID 和 GUID。
In Xcode 6.0.1, running with the
-w
switch and passing in the symbolic name of the simulator appears to now be required (at least that's the only way I got it to work, and I've had others verify and point me to this solution).See my answer from another post that has an explicit example.
You can also find a bash shell script that will handle invocation for you, automating the resolution of UDID and GUIDs in your simulator app paths.
如果您不提供“-w”参数并为模拟器 sdk 构建应用程序,它应该在模拟器上启动。
If you don't supply the '-w' argument and build your app for the simulator sdk it should launch on the simulator.