Skip to main content

AndroidWebView

AndroidWebView represents a WebView open on the AndroidDevice. WebView is usually obtained using androidDevice.webView().


方法 (Methods)

page

Added in: v1.9 androidWebView.page

Connects to the WebView and returns a regular Playwright Page to interact with.

使用方式

await androidWebView.page();

傳回值


pid

Added in: v1.9 androidWebView.pid

WebView process PID.

使用方式

androidWebView.pid();

傳回值


pkg

Added in: v1.9 androidWebView.pkg

WebView package identifier.

使用方式

androidWebView.pkg();

傳回值


事件 (Events)

on('close')

Added in: v1.9 androidWebView.on('close')

Emitted when the WebView is closed.

使用方式

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