跳到正文
本页尚未翻译成中文,以下为英文原文。 查看英文版

AndroidWebView ​

Added in: v1.9

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

Methods ​

androidWebView.page() ​

Added in: v1.9 async

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

Returns

  • Promise<Page>

androidWebView.pid() ​

Added in: v1.9

WebView process PID.

Returns

  • int

androidWebView.pkg() ​

Added in: v1.9

WebView package identifier.

Returns

  • string

Events ​

androidWebView.on('close') ​

Added in: v1.9

Emitted when the WebView is closed.

Event data

  • void

基于 Apache 2.0 许可证发布。