AndroidSocket
Source URL: https://playwright.dev/docs/api/class-androidsocket
AndroidSocket | Playwright
Section titled “AndroidSocket | Playwright”AndroidSocket is a way to communicate with a process launched on the AndroidDevice. Use androidDevice.open() to open a socket.
Methods
Section titled “Methods”Added in: v1.9 androidSocket.close
Closes the socket.
Usage
await androidSocket.close();Returns
Added in: v1.9 androidSocket.write
Writes some data to the socket.
Usage
await androidSocket.write(data);Arguments
Data to write.
Returns
on(‘close’)
Section titled “on(‘close’)”Added in: v1.9 androidSocket.on(‘close’)
Emitted when the socket is closed.
Usage
androidSocket.on('close', data => {});on(‘data’)
Section titled “on(‘data’)”Added in: v1.9 androidSocket.on(‘data’)
Emitted when data is available to read from the socket.
Usage
androidSocket.on('data', data => {});Event data