What it is?
A Session represents a running instance of a remote browser controlled by you or the LAM API. Sessions are primarily used with the Fleet API.Lifecycle
- Creation: You initiate a session using the
/sessions/create
API endpoint (or the equivalent method in the SDKs). - Running: During the session’s active state, you can interact with it through a WebSocket connection. This is typically done using browser automation frameworks like Playwright and Puppeteer.
- Termination: You can terminate a session in a few ways:
- Explicitly: Using the
fleet.terminate()
endpoint. - Implicitly: By closing the playwright connection.
- Timeout: Sessions might have a predefined timeout, after which they automatically terminate.