0

I write a testing automation for some android application and I want to tap on application elements like buttons by their ID, I know if it can be done by writing an android test application and install it on device (like Espresso, UIAutomator, etc...), but I don't want to use this approach.

Is there a way to do it from Android Debug Bridge? Maybe someone know some sort of tool similar to monkey-runner that can perform it? Basically what I ask - Is it possible to click buttons on Android by ID via ADB?

Chipopo
  • 47
  • 1
  • 9
  • it is not a duplicate i'm asking something different , i don't want just to tap locations or buttons with keycodes , i want to tap views by ID's via ADB – Chipopo May 03 '15 at 15:45

1 Answers1

1

This is possible by using AndroidViewClient, and it is basically done by creating a python script and executing it. Note that this works best if these buttons contain some text or an ID to differentiate them from others. More information can be found here: https://github.com/dtmilano/AndroidViewClient/

EVR
  • 346
  • 2
  • 7
  • Hi , i tried to dump some views info with "adb shell uiautomator dump" pulling it to my computer and then parsing it , it works but it have some troubles , which method is better ViewServer or UIAutomator ? Does ViewServer uses UIAutomator underneath ? Thanks in advance – Chipopo May 03 '15 at 15:26