思路是:在屏幕上某个位置按着不放:device.touch(x,y,md.DOWN)
然后再做一个滑动的操作:device.drap((x1,y1),(x2,y2),0.2,10)
然后再松开按键:device.touch(x,y,md.UP)
#codeing:utf-8
from com.android.monkeyrunner import MonkeyRunner as mr ,MonkeyDevice as md
device=mr.waitForConnection()
#点击“Home键”
print '------------------Back Home Screen-------------------------------------'
device.press('KEYCODE_HOME',md.DOWN_AND_UP)
mr.sleep(1)
#打开“更多设置”
print '------------------Open More Settings-------------------------------------'
device.touch(87,1516,md.DOWN)
mr.sleep(1)
device.drag((931,412),(560,956),0.5,5)
device.touch(87,1516,md.UP)