Monkey命令一次执行所有包

发布于 2024-10-09 12:12:20 字数 290 浏览 0 评论 0原文

我使用以下命令来执行特定包:

adb shell Monkey -v -p com.google.android.apps.maps 500

adb shell Monkey -p com.google.android.voicesearch 10

Q-1:但我想执行所有批处理模式的软件包,有人可以建议吗? 我使用了一个过程,例如将所有单独的命令放入批处理文件中并执行,但在第一个命令执行后它不起作用。

Q-2:您能否建议仅通过手机进行随机击键的命令是什么?

提前致谢 !!!

I am using following command to execute specific package:

adb shell monkey -v -p com.google.android.apps.maps 500

adb shell monkey -p com.google.android.voicesearch 10

Q-1: But I want to execute all the packages in batch mode,can anyone please suggest?
I have used a process like putting all the individual commands in batch file and executing but it is not working after first command execution.

Q-2: Can you please suggest what is the command only to put random key strokes through out the phone?

Thanks in Advance !!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

萌︼了一个春 2024-10-16 12:12:20

您可以尝试编写一个猴子脚本(例如test.txt):

# Start of Script
type= user
count= 1
speed= 1.0
UserWait(200)
start data >>

LaunchActivity(com.company.application1.Activity, com.company.application1.Activity)
UserWait(2000)
# Do stuff

LaunchActivity(com.company.application2.Activity, com.company.application2.Activity)
UserWait(2000)
# Do stuff

LaunchActivity(com.company.application3.Activity, com.company.application3.Activity)
UserWait(2000)
# Do stuff

然后通过调用运行它

monkey -f test.txt 1

You could try writing a monkey script (eg. test.txt):

# Start of Script
type= user
count= 1
speed= 1.0
UserWait(200)
start data >>

LaunchActivity(com.company.application1.Activity, com.company.application1.Activity)
UserWait(2000)
# Do stuff

LaunchActivity(com.company.application2.Activity, com.company.application2.Activity)
UserWait(2000)
# Do stuff

LaunchActivity(com.company.application3.Activity, com.company.application3.Activity)
UserWait(2000)
# Do stuff

and then run it by calling

monkey -f test.txt 1
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文