AndroidInput
方法
🌐 Methods
drag
Added in: v1.9🌐 Performs a drag between from and to points.
用法
await androidInput.drag(from, to, steps);
参数
-
拖动的起点。
-
拖动的终点。
-
拖动的步骤数。每一步完成需要5毫秒。
返回
press
Added in: v1.9按下 键。
🌐 Presses the key.
用法
await androidInput.press(key);
参数
-
key[AndroidKey]#要按下的键。
返回
swipe
Added in: v1.9滑动沿着由段定义的路径进行。
🌐 Swipes following the path defined by segments.
用法
await androidInput.swipe(from, segments, steps);
参数
-
开始滑动的点。
-
滑动手势中从 from 点开始的后续点。
-
每个段落的步数。每一步需要5毫秒完成,所以100步意味着每个段落需要半秒。
返回
tap
Added in: v1.9在指定的点轻击。
🌐 Taps at the specified point.
用法
await androidInput.tap(point);
参数
返回
type
Added in: v1.9将text输入到当前聚焦的小部件中。
🌐 Types text into currently focused widget.
用法
await androidInput.type(text);
参数
返回