How-to
Automated lead form testing in about 2 hours
Automated lead form testing with Chrome DevTools MCP lets a coding agent click your contact form and confirm it still submits. Here is the setup, a per-step time budget of about two hours, and the parts the documentation does not cover.
A broken lead form looks exactly like a slow week. The page loads, the button clicks, the thank you note appears, and nothing reaches the inbox.
What does automated lead form testing check?
It checks four things: the form renders, the submit produces a successful request, the console stays clean, and a tagged test record arrives at the other end.
Chrome DevTools MCP lets a coding agent control and inspect a live Chrome browser, and ships as both an MCP server and a CLI. Google's Chrome DevTools documentation describes it as connecting an AI agent to a live browser instance using the open-source Model Context Protocol, for reliable automation and in-depth debugging.
The agent sees the first three by itself. The fourth needs a second step, and that is where most write-ups stop. The table below shows what a pass looks like for each.
| Check | Pass | Fail looks like |
|---|---|---|
| Fields | all fields present and fillable | selector missing after a deploy |
| Submit | one request, 2xx status | no request, or 4xx and 5xx |
| Console | no new errors during submit | a script error blocking the handler |
| Delivery | tagged record visible in inbox or CRM | request fine, nothing arrived |
The last row catches silent lead loss, and the tool cannot do it alone. If the form feeds an automation, add monitoring on the pipeline itself.
The two hour setup
Every time below is my own estimate from the documentation.
Step 1, install and connect, about 20 minutes. The CLI docs say the package can start the MCP server and the browser in the background if they are not already running. Check that your agent can open one page.
Step 2, write the check, about 25 minutes. Keep it in the repo so every run is identical:
## lead form check
open https://yoursite.com/contact
fill name, email, phone, message with test values
click submit
wait for the submit request to finish
report request url, status, console errors, screenshot
fail if there is no request or the status is not 2xx
Step 3, first real run, about 30 minutes. Use a tagged identity (test+formcheck@yourdomain.com, company FORMCHECK) so sales can filter it and you can prove the record arrived.
Step 4, evidence, about 20 minutes. Save the request, the status code and the console output for every run. A bare pass or fail tells you nothing at 7am.
Step 5, schedule and route failures, about 25 minutes. The configuration docs list flags such as --headless and --autoConnect, and say --autoConnect can attach to an active Chrome instance once remote debugging is enabled and a permission dialog is approved. Run it daily, send failures to one named person, and put it beside your uptime check on the same forms.
How much does this cost to set up
Two hours of someone's time, then a few minutes of review a week. Run your own numbers: if the form brings L enquiries a month and one is worth V to you, a week of silence costs about (L / 4) x V. If that is less than two hours of your time, check the form by hand on Fridays instead.
Limitations
- I have not tested this on a production form. The steps come from the repository and the Chrome DevTools documentation.
- The project documents browser control, not form QA. Scheduling, test data and the delivery check are yours.
- An agent driving a real browser is not deterministic. Expect false failures from timeouts and cookie banners.
- Submitting a real form writes a real record, so tag it or your automations fire on a fake lead.
- Captcha is a wall by design, and anything behind a login is closer to browser automation with no API.
My take
Do the delivery check even if you skip the rest. My guess is that most silent lead loss is a working button in front of a broken handoff, and only the last row of that table sees it.
Questions people ask
Is automated lead form testing the same as uptime monitoring?
No. Uptime monitoring tells you the page answered, while a form check tells you the submit produced a successful request, the console stayed clean, and the lead arrived at the other end. A form can fail every one of those while the page returns 200.
What does Chrome DevTools MCP do?
It is an official open source project that lets a coding agent control and inspect a live Chrome browser, and it is available as both an MCP server and a CLI. The Chrome DevTools documentation presents it as a way to connect an AI agent to a live browser instance over the Model Context Protocol for automation and debugging.
Will testing my contact form create a fake lead in my CRM?
Yes, if you submit the real form it writes a real record and any follow-up automation will fire. Use a tagged test identity, such as a plus-address email and a fixed company name, so the record is easy to filter and easy to confirm.
Have a process like this leaking time or leads?Thirty minutes, no deck, and you leave with a plan.
Book a call