美文网首页
iOS UI Automation使用入门

iOS UI Automation使用入门

作者: Tom23 | 来源:发表于2016-07-20 15:34 被阅读688次

    1.打开Project,长按运行按钮,选择Profile

    1

    2.启动Instruments,选择Automation

    2

    3.打开Automation,点击左上角红色启动按钮

    3

    4.启动App,如下:

    4

    5.编辑Test脚本,点击底部运行按钮

    (脚本动作:来回点击"Home"和"Find"菜单,之间停留2秒)

    5

    6.Track log

    可以通过点选Trace Log区域,返回Script界面

    6

    附录:控件座标获取方法

    方法1:

    通过如下脚本,打印出来。在Log中查找控件属性

    target.logElementTree()

    方法2:

    选择Setting -> General -> Accessibility 开启Accessibility Inspector

    Thanks

    相关文章

      网友评论

          本文标题:iOS UI Automation使用入门

          本文链接:https://www.haomeiwen.com/subject/wspvjttx.html