Back to Puppeteer

Browser.wsEndpoint() method

website/versioned_docs/version-24.40.0/api/puppeteer.browser.wsendpoint.md

19.2.2600 B
Original Source

Browser.wsEndpoint() method

Gets the WebSocket URL to connect to this browser.

This is usually used with Puppeteer.connect().

You can find the debugger URL (webSocketDebuggerUrl) from http://HOST:PORT/json/version.

See browser endpoint for more information.

Signature

typescript
class Browser {
  abstract wsEndpoint(): string;
}

Returns:

string

Remarks

The format is always ws://HOST:PORT/devtools/browser/<id>.