Overview
BrowserSessionInfo contains runtime details about a browser session, including the CDP endpoint URL, the live-view URL, and the debug port. You typically access this through the info property on a running BrowserSession.
Import
Fields
Unique identifier for the browser session.
ID of the underlying SmolVM sandbox.
Chrome DevTools Protocol WebSocket URL. Connect Playwright or any CDP client to this endpoint. Available after the session starts.
noVNC live-view URL. Open this in a browser to watch the session in real time. Only available when the session is started in headed mode.
Localhost port exposing the CDP endpoint on the host.
Current session lifecycle state.
BrowserSessionState
Enum representing the lifecycle state of a browser session.| Value | Description |
|---|---|
CREATED | Session object exists but has not been started |
STARTING | Session is booting the sandbox and launching the browser |
RUNNING | Browser is running and ready for connections |
STOPPING | Session is shutting down |
STOPPED | Session has been stopped |
ERROR | Session encountered an error |
Example
Related
- BrowserSession - Launch and control browser sessions
- BrowserSessionConfig - Configure session options