在monkeyrunner中鼠标和键盘可以同时使用吗?

发布于 2024-11-27 10:49:26 字数 78 浏览 3 评论 0原文

我们可以在monkeyrunner中测试时同时执行鼠标单击事件和键盘按下事件吗? 如果是的话怎么办?请告诉我。

提前谢谢...

Can we perform mouseclick event and keyboard press event at once testing time in monkeyrunner?
If yes then how? Please tell me.

Thanx in advance...

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

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

发布评论

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

评论(2

只有影子陪我不离不弃 2024-12-04 10:49:26

我得到了这个问题的答案。 Monkeyrunner 中无法使用鼠标单击。在 Monkeyrunner 中我们只能获取键盘按下事件。

I got the solution of this question. There is no way to use the mouseclick in Monkeyrunner. We can get only keyboard press event in the Monkeyrunner.

回忆凄美了谁 2024-12-04 10:49:26

您将需要使用 MonkeyRunner.DOWN 执行这两个操作,然后执行类似 MonkeyRunner.sleep(.25) 的操作,并使用 MonkeyRunner.UP 执行这些相同的操作。

您需要选择首先发生的事件之一,但是两者都应该发生得足够快,以至于无关紧要。

You will need to use MonkeyRunner.DOWN for both actions then do something like MonkeyRunner.sleep(.25) and use MonkeyRunner.UP for those same actions.

You will need to pick one of the events to happen first, however both should happen fast enough that it won't matter.

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