Spec-Zone.ru › Playwright

AndroidInput

Methods​

drag​

Performs a drag between from and to points.

Usage

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

Arguments

  • from Object

    • x number

    • y number

    The start point of the drag.

  • to Object

    • x number

    • y number

    The end point of the drag.

  • steps number

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

Returns

  • Promise<void>

press​

Presses the key.

Usage

await androidInput.press(key);

Arguments

  • key [AndroidKey]

    Key to press.

Returns

  • Promise<void>

swipe​

Swipes following the path defined by segments.

Usage

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

Arguments

  • from Object

    • x number

    • y number

    The point to start swiping from.

  • segments Array<Object>

    • x number

    • y number

    Points following the from point in the swipe gesture.

  • steps number

    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

  • Promise<void>

tap​

Taps at the specified point.

Usage

await androidInput.tap(point);

Arguments

  • point Object

    • x number

    • y number

    The point to tap at.

Returns

  • Promise<void>

type​

Types text into currently focused widget.

Usage

await androidInput.type(text);

Arguments

  • text string

    Text to type.

Returns

  • Promise<void>

© 2026 Microsoft
Licensed under the Apache License, Version 2.0.
https://playwright.dev/docs/api/class-androidinput

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API