androidscriptingandroid-monkey

Send only one click to monkeyrunner at specified position


Here is a more typical command line, which will launch your application and send 500 pseudo-random events to it:

$ adb shell monkey -p your.package.name -v 500

but I am wondering how can I send only one click to my app at position 50,50


Solution

  • I found the answer

    device.press('KEYCODE_MENU', MonkeyDevice.DOWN_AND_UP)