Actions15
- Session Actions
- Page Actions
- Script Actions
Session → Close
AI-generatedSummary
Close the browser session, terminating its context and associated browser.
Inputs
- sessionId (required) — Identifier of the session to close. Must correspond to an active session managed by the Playwright manager.
- screenshotOnFail — When true, attaches a screenshot to the error if the operation fails. Defaults to false.
Output shape
object
Returns JSON with
success: trueand the closedsessionId. If the session is not found, a NodeOperationError is thrown before returning.
Examples
Example 1: Close an active Playwright session
Set sessionId to the ID returned by a prior Session Create operation. Optionally enable screenshotOnFail for error debugging.