【问题标题】:Android - Uiautomatorviewer - How to view uiautomator dump view.xml file using Uiautomatorviewer?Android - Uiautomatorviewer - 如何使用 Uiautomatorviewer 查看 uiautomator 转储 view.xml 文件?
【发布时间】:2022-07-21 21:39:03
【问题描述】:
我打算捕获 uiautomator 转储 view.xml 文件并尝试使用 Uiautomatorviewer 查看。
adb shell uiautomator dump view.xml
有没有办法在测试运行时从命令行捕获 uiautomatorsnapshots 并能够使用 Uiautomatorviewer 查看这些文件?
【问题讨论】:
标签:
android
android-studio
android-testing
android-uiautomator
uiautomatorviewer
【解决方案1】:
adb pull /sdcard/view.xml ./view.uix
- 使用
Open > UI xml dump 导入
- 截图:
adb exec-out screencap -p > screen.png
- 使用
Open > Screenshot 导入