Fill Forms Automatically

Fill web forms automatically by mapping your data to fields dynamically without selectors

Fill Forms Automatically demo
TypeScript
Source code
npx create-browser-app --template form-filling
uvx create-browser-app --template form-filling

Automate form filling without brittle selectors

Fill web forms reliably without hard-coding selectors. This template analyzes form fields, matches your data to the right inputs, and fills them dynamically, making automations more durable across different layouts. Perfect for lead capture, QA testing, bulk registrations, and survey submissions.

Steps

  1. Create a Browserbase session and navigate to the form URL.
  2. Stagehand scans the page to detect all input fields and build a field schema.
  3. Provide your data object (e.g., name, email, company), and Stagehand maps values to the right fields.
  4. The script fills inputs, handles validation, and submits the form.