# -*- coding: UTF-8 -*-
'''
Created on 2016年6月8日
@author: lh9281
'''
import os,time,profile
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
from com.android.monkeyrunner.easy import EasyMonkeyDevice,By
from itertools import count
from os import path
device = MonkeyRunner.waitForConnection()
if not device:
print("please connect a device to start.")
else:
print("Start~")
i=0
print"******************Strat***************************"
device.touch(274,1041,'DOWN_AND_UP')#点击应用图标
while(i<100):
MonkeyRunner.sleep(3);
result = device.takeSnapshot()
result.writeToFile('E:\\shot\\shot%d.jpg'%i,'jpg')
print"this is number "+str(i)
i=i+1;
print"end"
monkeyrunner 对手机批量截屏。