5 Form Automation Bugs That Skewed Success Rates

ملخص

Pixel’s announcement highlights five classifier bugs that made a Playwright bot’s form submissions appear to have only a 3% acceptance rate across 235 sites. It explains how mixing nearby container text with field identity can wrongly exclude inputs, and why reviewing evidence and separating context from identity matters for reliable automation.

DEV Community

Five bugs that made my form-filling bot look like it had a 0% success rate

I built a Playwright script that fills submission forms on AI directories. It ran for six hours across 235 sites and reported a 3% acceptance rate. Then I read the evidence files and found five bugs in the classifier, not the forms. Fixing them took an evening; finding them took a night of staring at screenshots. If you are automating any form at scale, you will hit all five. They are not framework bugs, they are the failure modes of asking a DOM questions in English. 1. A container's text is not the field's identity My field descriptor collected, for each input, everything that might describe it: const labelFor = el.id ? document.querySelector(label[for="${el.id}"]) : null;
const wrap = el.closest('label');
return {
name: el.getAttribute('name') || '',
label: ((labelFor && labelFor.textContent) || (wrap && wrap.textContent) || '').trim(),
};
Then a negative filter ran over the concatenation of those strings, to skip newsletter boxes, search fields, and honeypots: if (FIELD_EXCLUDE_RE.search(hay)) return null; // hay includes container text
The bug: on layouts where the input sits inside a large card, el.closest('label') walks up to a wrapper that contains the entire form's copy — including the words "search", "newsletter" and "password". Every field in that form matched the exclusion regex and got dropped. The script filled nothing, then reported "only recognised 0 fillable fields", which my code classified as needs a human. The fix is to separate the two jobs the text was doing: // identity: what this field IS
const ident = [name, id, placeholder, aria, label].join(' ');
if (FIELD_EXCLUDE_RE.search(ident)) return null;
// context: what is NEAR it, used only to improve matching, never to exclude
const near = (el.closest('div,form,section')?.textContent || '').slice(0, 200);
Exclusion runs on identity. Context only helps positive matching. Mixing them means one word in the surrounding prose can veto the whole form. 2. "Email address" is not a postal address The same filter excluded anything containing address, because shipping forms ask for street addresses and you should not fill those. But the most common email field name on these forms is fields[email] with the label "Your email address". So the filter deleted the email input, on nearly every form, and the script submitted without an email. The site either rejected it or accepted it silently and the confirmation went nowhere. The fix is a three-way test instead of a two-way one — exclude address only when it is neither a URL nor an email: const ADDRESS_RE = /address|street|city|zip|postal/;
const URLISH = /(url|uri|website|link|domain|homepage|site)/;
const MAILISH = /(e-?mail|mail)/;

if (ADDRESS_RE.test(ident) && !URLISH.test(ident) && !MAILISH.test(ident)) return null;
Two lessons, and the second one is the general one: negation rules need an escape hatch, and any substring rule will eventually eat the field you care about most. "Your product address" is a URL field. "Your email address" is email. Both contain the word that was supposed to mean "physical address". 3. is not the page The receipt classifier looked for login-wall phrases in the page source: const low = html.toLowerCase();
if (LOGIN_KEYS.some(k => low.includes(k))) return 'needs login';
One directory had a meta description reading "Sign in to submit your tool and get listed in front of 40,000 makers". The submission had actually succeeded — the thank-you text was in the DOM — but the classifier saw "Sign in to" inside and recorded needs login. Strip the invisible parts before reading text, always: function visibleText(html) {
return html
.replace(/<head[\s\S]?<\/head>/i, ' ')
.replace(/<script[\s\S]
?<\/script>/gi, ' ')
.replace(/<style[\s\S]?<\/style>/gi, ' ')
.replace(/<[^>]+>/g, ' ')
.replace(/\s+/g, ' ');
}
Better still: read document.body.innerText from the page instead of re-parsing the HTML. The browser already knows what is...
5 Form Automation Bugs That Skewed Success Rates
Powered by Readybot.io*

الأحدث من Pixel

Incident Response: Look Beyond the Red Alert

Pixel’s DEV Community announcement explores how teams can fixate on one failing service while overlooking the real cause of an outage, such as a full …

Sach: AI Fact-Checks WhatsApp Forwards in India

Pixel’s announcement introduces Sach, a tool that checks forwarded messages in English, Hindi, Telugu, and 14 other Indian languages against official sources. It gives cited …

Java 25 Removes SecurityManager: What to Fix

Pixel’s announcement explains how Java 24’s JEP 486 permanently disabled the SecurityManager, breaking test workarounds that intercept System.exit. It recommends returning exit codes or throwing …

Why a Java HPA Got Stuck at 20 Kubernetes Pods

Pixel shares how a Spring Boot pricing service autoscaled to 20 Kubernetes pods and stayed there because the JVM retained committed heap memory after traffic …