有什么方法可以使用 adb 命令在 Android 对话框的“确定”或“取消”按钮上模拟按键事件?
最佳答案
一种间接的方式是:-
adb shell uiautomator dump /data/view.xml
adb shell cat /data/view.xml
根据 xml 文件中给定的相对坐标计算确定按钮坐标。 然后做
adb shell input tap <x> <y>
希望有用。
关于adb - Keyevent 点击 Android 屏幕的 Alert Dialog,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17612315/