1 什么是uiautomator

uiautomator工具使用(7) 随笔 第1张

uiautomator工具使用(7) 随笔 第2张

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

 

 

2 uiautomator组成

uiautomator工具使用(7) 随笔 第3张

 uiautomator工具使用(7) 随笔 第4张

 

 

3 uiautomator viewer

D:\SDK\tools\uiautomatorviewer.bat 打开此文件

uiautomator工具使用(7) 随笔 第5张

 uiautomator工具使用(7) 随笔 第6张

 

 

连接设备

uiautomator工具使用(7) 随笔 第7张

 uiautomator工具使用(7) 随笔 第8张

 

 

升级方法

下载升级包

  https://github.com/lazytestteam/lazyuiautomatorviewer

 

替换文件

1. 将所有jar包拷贝到%SDK%/tools\lib目录下,覆盖原来的uiautomatorviewer.jar ,

2 替换tools/lib目录下的文件

uiautomator工具使用(7) 随笔 第9张

 uiautomator工具使用(7) 随笔 第10张

 

3 把com,image 文件新增到tools目录下

uiautomator工具使用(7) 随笔 第11张

 

uiautomator工具使用(7) 随笔 第12张

4 启动 uiautomatorviewer.bat工具

uiautomator工具使用(7) 随笔 第13张

 

uiautomator工具使用(7) 随笔 第14张

 使用注意事项:

  获取app屏幕元素的时候,屏幕必须为静态数据,视频必须暂停.

  如果第一个获取屏幕的工具报错,我们可以使用第二个工具.

  

 

  

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄