自动化iPhone模拟器上的截图? [英] Automate Screenshots on iPhone Simulator?

查看:101
本文介绍了自动化iPhone模拟器上的截图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次我为iPhone应用程序更改UI时,我都厌倦了拍摄新的屏幕截图。我希望能够在模拟器上运行脚本/程序/任何加载我的二进制文件,然后拍摄一些截图。

I'm tired of taking new screenshots everytime I change my UI for my iPhone application. I would like to be able to run a script/program/whatever to load my binary on the simulator and then take a few screenshots.

解决方案可以是任何语言......对我来说无关紧要。

The solution can be in any language... it doesn't matter to me.

谢谢!

推荐答案

使用iPhone SDK 4,您可以自动执行GUI测试,并且可以为您截取屏幕截图。

With iPhone SDK 4 you can automate GUI tests, and it can take screenshots for you.

基本上,您编写了一个Javascript脚本,然后Instruments(使用自动化模板)可以在设备上运行它来测试UI,并且可以记录数据,屏幕截图等,并且还可以发出警报有些东西坏了。

Basically, you write a Javascript script, and then Instruments (using Automation template) can run it on the device to test the UI, and can Log data, screenshot, etc., and also can alert if something's broken.

我找不到它的参考指南,但是在SDK参考库中搜索 UIA * 类(如 UIAElement )。

I couldn't find a reference guide for it, but in the SDK reference library search for UIA* classes (like UIAElement).

此外,还有一个视频演示来自WWDC,会话306。

There's also a video demoing this from WWDC, session 306.

这篇关于自动化iPhone模拟器上的截图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆