Search code examples
androidmonkeyrunnerandroidviewclient

AndroidViewClient tap specific X,Y coordinate


What is the correct way to touch a specific X,Y coordinate on screen using AndroidViewClient?


Solution

  • A simple way of discovering and learning AndroidViewClient is by using culebra as a script generator.

    Start culebra GUI as

    culebra -uG --scale=0.5
    

    click with the alternate button to open the context menu and select Touch using DIP or Touch using PX and the autogenerated script will contains something like

    device.touchDip(139.33, 426.0, 0)
    

    or

    device.touch(250.0, 1242.0, 0)