Playwright Automation icon

Playwright Automation

Playwright Automation for n8n

Session → Close

AI-generated

Summary

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: true and the closed sessionId. 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.

Links

Discussion