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:- Fill the search box and press Enter. Wait for the product form.
- Pick the size and color with
select_optionand set the quantity withfill. - Click the submit button and wait for the confirmation message.
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 withno_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)
Example output
Output of the form flow:Customize it
Troubleshooting
select_optionfinds no matching option: the value differs from the visible text. Inspect the<option value="...">and pass that value, or uselabel=.- The submit button does nothing: the form enables it after a field changes. Fill every required field first, then click;
select_optionandfillfire 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 withstate="attached"and read it withtext_content(). page.gototimes out on a heavy page: passwait_until="domcontentloaded"and wait for the form element you need.
Related recipes
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.