BrowserServer
Source URL: https://playwright.dev/docs/api/class-browserserver
BrowserServer | Playwright
Section titled “BrowserServer | Playwright”Methods
Section titled “Methods”Added before v1.9 browserServer.close
Closes the browser gracefully and makes sure the process is terminated.
Usage
await browserServer.close();Returns
Added before v1.9 browserServer.kill
Kills the browser process and waits for the process to exit.
Usage
await browserServer.kill();Returns
process
Section titled “process”Added before v1.9 browserServer.process
Spawned browser application process.
Usage
browserServer.process();Returns
wsEndpoint
Section titled “wsEndpoint”Added before v1.9 browserServer.wsEndpoint
Browser websocket url.
Browser websocket endpoint which can be used as an argument to browserType.connect() to establish connection to the browser.
Note that if the listen host option in launchServer options is not specified, localhost will be output anyway, even if the actual listening address is an unspecified address.
Usage
browserServer.wsEndpoint();Returns
on(‘close’)
Section titled “on(‘close’)”Added before v1.9 browserServer.on(‘close’)
Emitted when the browser server closes.
Usage
browserServer.on('close', data => {});