Search code examples
androidpythonandroidviewclient

AndroidViewClient- how to generate a double tap using culebra


How to generate a double tap using culebra?

Unable to use:

vc.device.touch() twice (for double tap)

Also tried:

vc.device.longtouch(x,y) 

Twice, did not work.


Solution

  • Your are right, none of the workarounds work and it's very difficult to provide a generic solution, however you can do it for your specific device and here is how:

    1. Start your app
    2. Run getevent in adb shell
    3. Double tap
    4. Copy the events
    5. Convert hex to dec
    6. Send the same events using self.device.shell('sendevent ...')

    May or may not work for your device.