Is there any way to simulate keyevent on "OK" or "CANCEL" buttons of Android dialogue box using adb commands?
One indirect way is:-
adb shell uiautomator dump /data/view.xml
adb shell cat /data/view.xml
calculate OK button coordinates from the relative coordinates given in the xml file. Then do
adb shell input tap <x> <y>
Hope works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With