获取坐标的方法:
1.使用手机的指针位置来实现
系统设置---开发者选项---勾选指针位置,然后开启后,点击界面需要点击的控件
from com.android.monkeyrunner import MonkeyRunner,MonkeyDevice,MonkeyImage
device=MonkeyRunner.waitForConnection(1.0,'82627d4b')device.startActivity(component='com.android.contacts/com.android.contacts.DialtactsContactsEntryActivity')
MonkeyRunner.sleep(3)
device.touch(470,659,MonkeyDevice.DOWN_AND_UP)
for i in range(1,999999):
MonkeyRunner.sleep(4)
device.touch(1136,361,MonkeyDevice.DOWN_AND_UP)
MonkeyRunner.sleep(5)
device.touch(1196,363,MonkeyDevice.DOWN_AND_UP)
MonkeyRunner.sleep(4)
device.touch(150,412,MonkeyDevice.DOWN_AND_UP)
MonkeyRunner.sleep(4)
print i
else:
print('end')