早教吧作业答案频道 -->英语-->
monkeyrunner脚本报错,不加foriinrange一切正常,加了就报错#Importsthemonkeyrunnermodulesusedbythisprogramfromcom.android.monkeyrunnerimportMonkeyRunner,MonkeyDevice,MonkeyImage#Connectstothecurrentdevice,returningaMon
题目详情
monkeyrunner脚本报错,不加for i in range一切正常,加了就报错
# 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()
# Runs the component
device.startActivity(component = "com.cyou.mrd.fk/cn.cmgame.billing.ui.GameOpenActivity")
MonkeyRunner.sleep(5)
device.touch(253,558,'DOWN_AND_UP')
MonkeyRunner.sleep(5)
device.touch(345,510,'DOWN_AND_UP')
MonkeyRunner.sleep(5)
device.touch(231,538,'DOWN_AND_UP')
MonkeyRunner.sleep(10)
for i in range(1,3):
device.drag((13,646),(462,646),0.1,1)
MonkeyRunner.sleep(1)
device.drag((462,646),(10,646),0.1,1)
MonkeyRunner.sleep(1)
device.touch(450,36,'DOWN_AND_UP')
MonkeyRunner.sleep(1)
device.touch(184,448,'DOWN_AND_UP')
# 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()
# Runs the component
device.startActivity(component = "com.cyou.mrd.fk/cn.cmgame.billing.ui.GameOpenActivity")
MonkeyRunner.sleep(5)
device.touch(253,558,'DOWN_AND_UP')
MonkeyRunner.sleep(5)
device.touch(345,510,'DOWN_AND_UP')
MonkeyRunner.sleep(5)
device.touch(231,538,'DOWN_AND_UP')
MonkeyRunner.sleep(10)
for i in range(1,3):
device.drag((13,646),(462,646),0.1,1)
MonkeyRunner.sleep(1)
device.drag((462,646),(10,646),0.1,1)
MonkeyRunner.sleep(1)
device.touch(450,36,'DOWN_AND_UP')
MonkeyRunner.sleep(1)
device.touch(184,448,'DOWN_AND_UP')
▼优质解答
答案和解析
for i in range(次数):
循环脚本
------------------------------------
报错了一定是你脚本写错了
循环脚本
------------------------------------
报错了一定是你脚本写错了
看了 monkeyrunner脚本...的网友还看了以下:
英语翻译ByEwe-LengLim,P.E.,ChiefKnowledgeOfficer,Inst 2020-05-17 …
1.若O(20°N,90°E)为太阳直射点,弧线EP、FP分别为晨线和昏线的一段,则 ( ) A. 2020-05-17 …
∵EM是⊙O的切线,怎么推出EB•EC=EM2①?,看题后回答.(2005•温州)如图,已知四边形 2020-05-21 …
已知点A(4,0)和圆B:x^2+(y-2)^2=1,若点P在圆B上运动,O是坐标原点,求使S三角 2020-06-14 …
英语单词填空1.时间状语:d-r-n-2.场所:b-s-s-o-f-r--e-a-t-e-t3.教 2020-07-14 …
设g(x)=px-q/x-2f(x),其中f(x)=lnx,且g(e)=qe-p/e-2.(e为自 2020-08-02 …
体育的英语是P.E.还是PE,我在一本书上怎么看到以P.E.结尾,却只打了一个点,没打句号啊?My 2020-08-03 …
若四边形ABCD为矩形,AB=10,BC=20,E、P分别为BC边和BD上一动点,求PC+PE的最 2020-08-03 …
请问英文人名后的P.E.,DEE中的DEE是什么意思?请问英文人名后的P.E.,如JOSEPHA.S 2020-11-05 …
二阶微分方程求解题目2xy''=y'令p=y',则y''=p'=>2xp'=p=>2*dp/p=dx 2020-11-16 …