Playwright Remote icon

Playwright Remote

Automate browser actions on a remote Playwright server. Navigate to URLs, take screenshots, extract text, click elements, fill forms, or run custom Playwright scripts via WebSocket connection.

Fill Form

AI-generated

Summary

Fill a form field on a web page by entering the specified text into an input element identified by a CSS selector or XPath expression at a given URL.

Inputs

  • URL (required) — The URL of the web page where the form field to fill is located. The page will be navigated to this URL before filling the form.
  • Selector Type (required) — Choose whether to identify the form field using a CSS selector or an XPath expression.
  • CSS Selector — A CSS selector string identifying the form field element to fill. Required if Selector Type is 'CSS Selector'.
  • XPath — An XPath expression identifying the form field element to fill. Required if Selector Type is 'XPath'.
  • Value (required) — The string value to type into the form field element.

Output shape

a single JSON object per input item

The output JSON includes 'success' (boolean true), the used 'selectorType', the 'selector' string, and the 'value' filled. The output is paired to the input item index to maintain input-output relation.

Examples

Example 1: Fill a text input on a login page

Set 'URL' to the login page URL, choose 'Selector Type' as CSS or XPath, provide the selector of the username input field, and enter the desired username in 'Value'. The node navigates to the page and fills the username field accordingly.

Links

Discussion