Spec-Zone.ru › Playwright

AndroidSocket

AndroidSocket is a way to communicate with a process launched on the AndroidDevice. Use androidDevice.open() to open a socket.

Methods​

close​

Closes the socket.

Usage

await androidSocket.close();

Returns

  • Promise<void>

write​

Writes some data to the socket.

Usage

await androidSocket.write(data);

Arguments

  • data Buffer

    Data to write.

Returns

  • Promise<void>

Events​

on('close')​

Emitted when the socket is closed.

Usage

androidSocket.on('close', data => {});

on('data')​

Emitted when data is available to read from the socket.

Usage

androidSocket.on('data', data => {});

Event data

  • Buffer

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

Spec-Zone.ru

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