Skip to main content
Run a full form flow in Zenrows Browser, the browser for agents: search a catalog, open the product, pick options from dropdowns, set a quantity, submit, and confirm the site accepted it. The same building blocks cover sign-up flows, filters, quote requests and checkout steps. Uses: Browser with Playwright’s fill, select_option, press, click and wait_for

Ask your AI agent

With the Zenrows MCP server connected to Claude, Cursor or any MCP client, paste this prompt. Your agent picks the right Zenrows tools and settings on its own.

Run the form flow

The flow has three steps, and each one waits for proof that the previous one worked:
  1. Fill the search box and press Enter. Wait for the product form.
  2. Pick the size and color with select_option and set the quantity with fill.
  3. Click the submit button and wait for the confirmation message.
Use test sites or accounts you own when you practice form automation, and stop before final steps that create real orders, payments or messages.
select_option takes the option’s value attribute. For a select menu with labels that differ from values, pass label="Medium" (Python) or { label: "Medium" } (Node.js).

Submit forms that redirect

Logins and many sign-up forms answer with a redirect. For those, click with no_wait_after=True (noWaitAfter: true in Node.js) and wait for an element that exists on the result page. This is the pattern Log in once and reuse the session uses:
Python (Playwright)
Checking for a result element also catches validation errors early: if the success element never appears, read the form’s error message instead.

Example output

Output of the form flow:

Customize it

Troubleshooting

  • select_option finds no matching option: the value differs from the visible text. Inspect the <option value="..."> and pass that value, or use label=.
  • The submit button does nothing: the form enables it after a field changes. Fill every required field first, then click; select_option and fill fire the change events the page listens for.
  • The confirmation is in the page but wait_for() times out: the message is present but styled as hidden. Wait with state="attached" and read it with text_content().
  • page.goto times out on a heavy page: pass wait_until="domcontentloaded" and wait for the form element you need.

Log in once and reuse the session

Save the state after a login and skip the form on later runs.

Scroll and paginate to collect every item

Walk every page of results and export them to CSV.

Take screenshots and save pages as PDF

Capture proof of the submitted form.

Click, fill, and scroll before you scrape

Click and fill with js_instructions in a single Fetch request.