AndroidInput
方法 (Methods)
drag
Added in: v1.9Performs a drag between from and to points.
使用方式
await androidInput.drag(from, to, steps);
參數
-
The start point of the drag.
-
The end point of the drag.
-
The number of steps in the drag. Each step takes 5 milliseconds to complete.
傳回值
press
Added in: v1.9Presses the key.
使用方式
await androidInput.press(key);
參數
-
key
[AndroidKey]#Key to press.
傳回值
swipe
Added in: v1.9Swipes following the path defined by segments.
使用方式
await androidInput.swipe(from, segments, steps);
參數
-
The point to start swiping from.
-
Points following the from point in the swipe gesture.
-
The number of steps for each segment. Each step takes 5 milliseconds to complete, so 100 steps means half a second per each segment.
傳回值
tap
Added in: v1.9Taps at the specified point.
使用方式
await androidInput.tap(point);
參數
傳回值
type
Added in: v1.9Types text into currently focused widget.
使用方式
await androidInput.type(text);
參數
傳回值