On this page
AndroidInput
Methods
drag
Performs a drag between from and to points.
Usage
await androidInput.drag(from, to, steps);
Arguments
fromObjectThe start point of the drag.
toObjectThe end point of the drag.
stepsnumberThe number of steps in the drag. Each step takes 5 milliseconds to complete.
Returns
press
Presses the key.
Usage
await androidInput.press(key);
Arguments
key[AndroidKey]Key to press.
Returns
swipe
Swipes following the path defined by segments.
Usage
await androidInput.swipe(from, segments, steps);
Arguments
fromObjectThe point to start swiping from.
-
Points following the
frompoint in the swipe gesture. stepsnumberThe number of steps for each segment. Each step takes 5 milliseconds to complete, so 100 steps means half a second per each segment.
Returns
tap
Taps at the specified point.
Usage
await androidInput.tap(point);
Arguments
Returns
type
Types text into currently focused widget.
Usage
await androidInput.type(text);
Arguments
textstringText to type.
Returns
© 2024 Microsoft
Licensed under the Apache License, Version 2.0.
https://playwright.dev/docs/api/class-androidinput