UI Automator Viewer操作

版本:24.4.1

使用UI Automator Viewer报错如下:

Error obtaining Ul hierarchy
Reason:
Error while obtaining Ul hierarchy XML file:
com.android.ddmlib.SyncException: Remote object doesn't exist!

可以使用指令:

  1. 保存uix文件
adb shell uiautomator dump /sdcard/sc.uix
  1. pull到PC端
adb pull /sdcard/sc.uix C:\Users\xxx\Downloads\files\cs.uix
  1. 截图
adb shell screencap -p /sdcard/yuyue.png
  1. pull到PC端
 adb pull /sdcard/yuyue.png  C:\Users\changsheng_jiang\Downloads\files\yuyue.png
  1. 在tools\bin下打开终端,输入
uiautomatorviewer

UI
点击open,出现一个小的界面
dump
但是该界面不能拉伸,可以使用 Tab 键切换按钮,然后按Enter选中,分别上传刚才保存在PC的png(仅该后缀)以及uix文件,如下:
screenshot
注:需开启USB调试模式

常用指令

  • 重启服务
    adb kill-server
    adb start-server

  • 查看连接设备
    adb devices

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值