早教吧作业答案频道 -->英语-->
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脚本...的网友还看了以下:
提示:D-C=0A-B,A-D,D-C,D-E,E-F=1A-D,C-F=2A-B,D-E,E-F 2020-04-06 …
有a、b、c、d、e、f、g七种物质.a为HCl,f的元素质量比为7:3.a能与b、f、d反应,c 2020-05-02 …
mathematica解一元六次方程Solve[{b==f+a,c+d==b,f+g==d,40- 2020-05-16 …
数学分析题》》关于连续的设f:D->实数,|f|:D->实数因为|f|(x)=|f(x)|举一个例 2020-06-03 …
设f(x)具有连续的导数,下列关系式正确的是?A、d∫f(x)dx=f(x)B、∫f`(x)dx= 2020-06-10 …
若f(x)的导数连续,下列正确的是()A.∫df(x)=f(x)B.∫f,(x)dx=f(x)C. 2020-07-01 …
求理由.下列等式正确的是A.∫f'(x)dx=f(x)B.d∫f(x)dx=f(x)C.∫df(x 2020-07-01 …
设f(x)是增函数,分别指出d>0或d<0时[f(Xo+d)-f(Xo)]/d的符号.设f(x)是 2020-07-09 …
已知集合A{a,b,c,d,e},B{0,1,…2014},f为A→B映射,且满足f(已知集合A{ 2020-07-30 …
EXCEL循环或计算问题。F=A+B+C+D+E。(A.B.C.D.E.F.均要大于零)E=A*10 2020-11-01 …