Skip to content

Instantly share code, notes, and snippets.

@vickyg3
Created June 23, 2012 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vickyg3/2978932 to your computer and use it in GitHub Desktop.
Save vickyg3/2978932 to your computer and use it in GitHub Desktop.
Sample monkeyrunner code
#! /path_to_sdk/tools/monkeyrunner
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
print 'waiting for device'
device = MonkeyRunner.waitForConnection()
print 'device attached'
# the body will probably go like this
while True:
input = sys.stdin.read(1)
# perform one of the actions based on input
# various actions include swipe, tap, double tap, etc.
# done !
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment