我正在尝试使用Android UI Automator工具双击视图,但没有双击的API。有没有其他方法可以使用ui automator双击。
提前谢谢。
发布于 2021-08-11 06:47:49
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))发布于 2021-09-18 02:22:30
我这样做:
img.click();
Thread.sleep(50);
img.click();https://stackoverflow.com/questions/22686655
复制相似问题