Skip to content

Instantly share code, notes, and snippets.

@marianfoo
Created February 3, 2016 10:01
Show Gist options
  • Save marianfoo/c285667d4f4daf544d2b to your computer and use it in GitHub Desktop.
Save marianfoo/c285667d4f4daf544d2b to your computer and use it in GitHub Desktop.
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
import commands
import sys
import time
# starting script
print "start"
# connection to the current device, and return a MonkeyDevice object
device = MonkeyRunner.waitForConnection()
for i in range(400000):
device.touch(750, 1000, 'DOWN_AND_UP')
time.sleep(0.01)
if(i%4000 == 0 ):
print "%d %%" % (i/4000)
print "end of script"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment