Automate online form filling

Automates forms by mapping fields dynamically.

Demo preview
1
npx create-browser-app --template form-filling
1
uvx create-browser-app --template form-filling

Get started automating online forms

This template shows how to use Browserbase + Stagehand to reliably complete online forms. Instead of hard-coding selectors, Stagehand analyzes fields, matches your data, and fills them dynamically—making automations faster, more durable, and less brittle across different layouts. It's perfect for lead capture, QA testing, bulk registrations, and surveys.

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.