Skip to content

AndroidInput

Source URL: https://playwright.dev/docs/api/class-androidinput


Added in: v1.9 androidInput.drag

Performs a drag between from and to points.

Usage

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

Arguments

The start point of the drag.

The end point of the drag.

The number of steps in the drag. Each step takes 5 milliseconds to complete.

Returns


Added in: v1.9 androidInput.press

Presses the key.

Usage

await androidInput.press(key);

Arguments

  • key [AndroidKey]#

Key to press.

Returns


Added in: v1.9 androidInput.swipe

Swipes following the path defined by segments.

Usage

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

Arguments

The point to start swiping from.

Points following the from point in the swipe gesture.

The number of steps for each segment. Each step takes 5 milliseconds to complete, so 100 steps means half a second per each segment.

Returns


Added in: v1.9 androidInput.tap

Taps at the specified point.

Usage

await androidInput.tap(point);

Arguments

The point to tap at.

Returns


Added in: v1.9 androidInput.type

Types text into currently focused widget.

Usage

await androidInput.type(text);

Arguments

Text to type.

Returns