Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@vickyg3
Created August 8, 2011 18:15
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/1132336 to your computer and use it in GitHub Desktop.
Save vickyg3/1132336 to your computer and use it in GitHub Desktop.
Take Snapshot
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
filename = '1.png'
device = MonkeyRunner.waitForConnection()
device.takeSnapshot().getSubImage((10, 10, 220, 40)).writeToFile(filename, 'png')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment