1.编辑脚本:monkeyscript.txt
#启动测试
type = user
count = 49
speed = 1.0
start data >>
LaunchActivity(com.tencent.android.qqdownloader,com.tencent.assistant.activity.SplashActivity)
UserWait(2000)
Tap(463,150,1000)
UserWait(2000)
DispatchString(yyb)
UserWait(2000)
Tap(960,150,1000)
DispatchPress(KEYCODE_BACK)
2. 传入手机
adb push D:\monkeyscript.txt /sdcard/
3.执行
adb shell monkey -f /sdcard/monkeyscript.txt -v 10 >d:\monkey.txt
4.查看d盘的日志
存疑,似乎不能自动启动应用
时间: 2024-10-27 10:21:28