【发布时间】:2022-10-13 02:04:59
【问题描述】:
我正在尝试自动化我的android手机上的一些应用程序,我需要从A点(140、950)滑动到B点(140、1200),然后再到C点(400、1200)而不释放。
而且我已经尝试过输入滑动
adb shell "input touchscreen swipe 126 459 413 472 & input touchscreen swipe 413 472 407 769"
但这会导致同时执行 2 次滑动,而不是连续执行。
Sendevent 需要 root 访问权限
Appium、Robotium 和 Monkeyrunner 不是解决方案,因为我不是在测试自己的应用程序,而是想自动化现有的应用程序。
由于scrcpy 设法发送此类输入,因此可能有 adb 的非 root 解决方案,但我无法理解源代码
谢谢!
【问题讨论】:
-
看看openapi.yaml中的CulebraTester2-public
swipe,它可以处理复杂的滑动模式,还有多点触控的API。