首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用Android UI Automator进行DoubleTap

如何使用Android UI Automator进行DoubleTap
EN

Stack Overflow用户
提问于 2014-03-27 19:46:35
回答 2查看 1.6K关注 0票数 5

我正在尝试使用Android UI Automator工具双击视图,但没有双击的API。有没有其他方法可以使用ui automator双击。

提前谢谢。

EN

回答 2

Stack Overflow用户

发布于 2021-08-11 06:47:49

代码语言:javascript
复制
Gesture interaction with the device
Click on the screen

d.click(x, y)
Double click

d.double_click(x, y)
d.double_click(x, y, 0.1) # default duration between two click is 0.1s
Long click on the screen

d.long_click(x, y)
d.long_click(x, y, 0.5) # long click 0.5s (default)
Swipe

d.swipe(sx, sy, ex, ey)
d.swipe(sx, sy, ex, ey, 0.5) # swipe for 0.5s(default)

d.drag(sx, sy, ex, ey)
d.drag(sx, sy, ex, ey, 0.5) # swipe for 0.5s(default)
Swipe points

# swipe from point(x0, y0) to point(x1, y1) then to point(x2, y2)
# time will speed 0.2s bwtween two points
d.swipe_points([(x0, y0), (x1, y1), (x2, y2)], 0.2))
票数 0
EN

Stack Overflow用户

发布于 2021-09-18 02:22:30

我这样做:

代码语言:javascript
复制
img.click();
Thread.sleep(50);
img.click();
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22686655

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档