On this page
AndroidInput
Methods
drag
Performs a drag between from
and to
points.
Usage
await androidInput.drag(from, to, steps);
Arguments
from
ObjectThe start point of the drag.
to
ObjectThe end point of the drag.
steps
numberThe 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
from
ObjectThe point to start swiping from.
-
Points following the
from
point in the swipe gesture. steps
numberThe 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
text
stringText to type.
Returns
© 2024 Microsoft
Licensed under the Apache License, Version 2.0.
https://playwright.dev/docs/api/class-androidinput