Spec-Zone.ru › Playwright

BrowserServer

Methods​

close​

Added before v1.9

Closes the browser gracefully and makes sure the process is terminated.

Usage

await browserServer.close();

Returns

  • Promise<void>

kill​

Added before v1.9

Kills the browser process and waits for the process to exit.

Usage

await browserServer.kill();

Returns

  • Promise<void>

process​

Added before v1.9

Spawned browser application process.

Usage

browserServer.process();

Returns

  • ChildProcess

wsEndpoint​

Added before v1.9

Browser websocket url.

Browser websocket endpoint which can be used as an argument to browserType.connect() to establish connection to the browser.

Usage

browserServer.wsEndpoint();

Returns

  • string

Events​

on('close')​

Added before v1.9

Emitted when the browser server closes.

Usage

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

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

Spec-Zone.ru

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