特点:
- uiautomatorviewer是android-sdk自带的元素定位工具
- uiautomatorviewer只能用于安卓系统;
- 它是通过截屏分析XML布局文件方式,来提供控件信息的查看服务
uiautomatorviewer.bat 基本使用
路径:这个工具是Android SDK中自带,在tools文件夹下:

1.1、获取移动设备页面元素
第一步:点击如图所示图标

这时工具会获取模拟器或移动设备,当前页面

第二步:定位页面元素
页面变更后,点击这里获取最新页面

然后你双击页面元素,就可以在右边找到对应的元素属性进行定位了

1.2、保存页面元素信息
保存的文件有改页面的一些元素等相关信息,可以打开直接获取使用

