Playwright Automation icon

Playwright Automation

Playwright Automation for n8n

Page → Type/Fill

AI-generated

Summary

Fill an input field identified by a CSS or XPath selector on a Playwright page within a browser session.

Inputs

  • sessionId (required) — The session ID identifying the browser page context.
  • selector (required) — CSS or XPath selector targeting the input element to fill.
  • value — The text value to fill into the selected element. Defaults to empty string if omitted.
  • screenshotOnFail — Whether to capture and attach a screenshot to the error if the operation fails.

Output shape

An object with fields: success (boolean), action (string

The fill operation result as returned by the PageController.

Examples

Example 1: Fill a username field

sessionId: 'session_123', selector: '#username', value: 'myuser'

Links

Discussion