-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如何实现长按并拖动 #21
Comments
目前还没有这种组合,下一个大版本会加上 |
好的 谢谢! |
@NateRiverNaz 你好,目前版本已经提供了MotionEvent,可以自己拼装任意操作 https://github.com/AirtestProject/Airtest/blob/master/playground/android_motionevents.py |
@Meteorix from airtest.core.api import *
from airtest.core.android.minitouch import *
connect_device("Android:///")
swipe_event = [DownEvent((500, 500)), SleepEvent(1),MoveEvent((0, 0)),UpEvent(0)]
device().minitouch.perform(swipe_event) 我的问题是: thanks in advanced!! |
|
如果使用poco的话,可以用以下简单写法,实现将一个图标拖拽到另一个图标上面 telephone = poco(text='电话')
folder = poco(text='文件夹')
telephone.start_gesture().hold(1).to(folder).hold(1).up() # 最后面的up别忘了,hold时长根据实际情况调节 |
@Meteorix |
@IcyW |
查看了api,发现只有swipe 和 pinch
是否可以实现swipe_press
The text was updated successfully, but these errors were encountered: