Using ADB to access a particular UI control on the screen

后端 未结 5 1124
时光说笑
时光说笑 2021-02-01 07:12

Is it possible for adb shell console to access an Android app\'s specific button using its id? or text?

I\'m trying to automate the button click on the dev

5条回答
  •  孤城傲影
    2021-02-01 08:10

    I think the best you can do is to inject touch based on a coordinate.

    Please see send touch event from ADB to a device and simulating touch using ADB

    You might get a coordinate of a button from dumpsys window or activity.

    You could also check out Monkeyrunner.

提交回复
热议问题