AndroidInput
方法
drag
添加于:v1.9用法
await androidInput.drag(from, to, steps);
参数
返回
press
添加于:v1.9按下指定的 key。
用法
await androidInput.press(key);
参数
-
key[AndroidKey]#要按下的按键。
返回
swipe
添加于:v1.9沿着 segments 定义的路径进行滑动。
用法
await androidInput.swipe(from, segments, steps);
参数
-
滑动的起始点。
-
滑动过程中,from 点之后的后续路径点。
-
每个片段的步数。每一步耗时 5 毫秒,因此 100 步意味着每个片段耗时 0.5 秒。
返回
tap
添加于:v1.9在指定的 point 处进行点击。
用法
await androidInput.tap(point);
参数
返回
type
添加于:v1.9将 text 输入到当前聚焦的组件中。
用法
await androidInput.type(text);
参数
返回