跳到主要内容

AndroidInput


方法

drag

新增于: v1.9 androidInput.drag

fromto 点之间执行拖动。

用法

await androidInput.drag(from, to, steps);

参数

返回值


press

新增于: v1.9 androidInput.press

按下 key

用法

await androidInput.press(key);

参数

  • key [AndroidKey]#

    要按下的键。

返回值


swipe

新增于: v1.9 androidInput.swipe

按照 segments 定义的路径滑动。

用法

await androidInput.swipe(from, segments, steps);

参数

返回值


tap

新增于: v1.9 androidInput.tap

在指定的 point 处点击。

用法

await androidInput.tap(point);

参数

返回值


type

新增于: v1.9 androidInput.type

text 输入到当前聚焦的组件中。

用法

await androidInput.type(text);

参数

  • text string#

    要输入的文本。

返回值