80,351
社区成员
发帖
与我相关
我的任务
分享
from com.android.monkeyrunner import MonkeyRunner,MonkeyDevice,MonkeyImage
device=MonkeyRunner.waitForConnection(1.0,'5069b007')
device.startActivity(component='com.android.contacts/com.android.contacts.DialtactsContactsEntryActivity')
MonkeyRunner.sleep(3)
for i in range(1,999999):
MonkeyRunner.sleep(4)
device.touch(23,36,MonkeyDevice.downAndUp)
MonkeyRunner.sleep(4)
device.touch(241,,906,MonkeyDevice.downAndUp)
MonkeyRunner.sleep(4)
print i
else:
print('end')
from com.android.monkeyrunner import MonkeyRunner,MonkeyDevice,MonkeyImage
print('import success')
device=MonkeyRunner.waitForConnection(1.0,'5069b007')
if device:
print("Connect device successful!")
else:
print("Connect device failed!")
for i in range(1,99):
device=MonkeyRunner.waitForConnection(1.0,'5069b007')
if device:
print('Connect device successful!')
else:
print('Connect device failed!')
device.touch(243,348,MonkeyDevice.DOWN_AND_UP)
print('please upload sfz a')
MonkeyRunner.sleep(1)
device.touch(224,378,MonkeyDevice.DOWN_AND_UP)
print('use the photo a')
MonkeyRunner.sleep(1)
device.touch(210,222,MonkeyDevice.DOWN_AND_UP)
print('click photo group')
MonkeyRunner.sleep(1)
device.touch(460,150,MonkeyDevice.DOWN_AND_UP)
print('selcet sfz a')
MonkeyRunner.sleep(1)
device.touch(264,574,MonkeyDevice.DOWN_AND_UP)
print('please upload sfz b')
MonkeyRunner.sleep(1)
device.touch(271,476,MonkeyDevice.DOWN_AND_UP)
print('use the photo b')
MonkeyRunner.sleep(1)
device.touch(204,202,MonkeyDevice.DOWN_AND_UP)
print('select sfz b')
MonkeyRunner.sleep(1)
device.touch(271,160,MonkeyDevice.DOWN_AND_UP)
print('click ready read')
MonkeyRunner.sleep(1)
device.touch(45,830,MonkeyDevice.DOWN_AND_UP)
print('next1')
MonkeyRunner.sleep(1)
device.touch(114,910,MonkeyDevice.DOWN_AND_UP)
print('next2')
MonkeyRunner.sleep(1)
device.touch(138,874,MonkeyDevice.DOWN_AND_UP)
print('next3')
MonkeyRunner.sleep(1)
device.touch(23,36,MonkeyDevice.DOWN_AND_UP)
print('retern1')
MonkeyRunner.sleep(1)
device.touch(23,36,MonkeyDevice.DOWN_AND_UP)
print('retern2')
MonkeyRunner.sleep(1)
print('truned') ,i
else:
print('end')
运行错误
150714 20:40:47.769:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions]Inden
tationError: ('unindent does not match any outer indentation level', ('D:\\adt-b
undle-windows\\sdk\\tools\\3456.py', 16, 5, ' MonkeyRunner.sleep(1)\n'))