TA的每日心情 | 郁闷 2016-11-23 12:02 |
---|
签到天数: 1 天 连续签到: 1 天 [LV.1]测试小兵
|
5测试积点
# coding:utf-8
from com.android.monkeyrunner import MonkeyRunner,MonkeyDevice
device=MonkeyRunner.waitForConnection(6,'emulator-5554')
for i in range(1,10):
device.startActivity(component="com.xs.cn/.activitys.LoadingActivity")
MonkeyRunner.sleep(2)
device.touch(280,470,"DOWN_AND_UP")
MonkeyRunner.sleep(1)
device.press('KEYCODE_BACK','DOWN_AND_UP')
MonkeyRunner.sleep(1)
device.touch(485,1072,"DOWN_AND_UP")
print i
else:
print('end')
在CMD执行后出现一大串,是哪里不对呢 |
最佳答案
查看完整内容
# Imports the monkeyrunner modules used by this program
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice, MonkeyImage
# Connects to the current device, returning a MonkeyDevice object
device = MonkeyRunner.waitForConnection()
# Installs the Android package. Notice that this method returns a boolean, so you can test
i=2
while i>0:
device.touch(119,568,"DOWN_AND_UP")
devic ...
|