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. <meta name="description"> 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 <head>
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 visible.

4. The paid tier is a <select> option like any other

Category dropdowns on these directories often include a paid placement tier. My
option picker scored options by keyword overlap with the product's own description,
so Paid Listing — $75 scored well: it contains "listing", which is a strong match
for a directory submission.

The fix is not better scoring. It is a hard veto on anything with a price in it:

const PRICE_RE = /(?:\$|€|£)\s?\d|\bpaid\b|\bpremium\b|\bsponsored\b/i; const usable = opts.filter(([, text]) => !PRICE_RE.test(text)); 

Anything that could cost money gets excluded before scoring. A false negative costs
one skipped dropdown; a false positive costs the user money.

5. input[type=file] is visually hidden by design

The visibility filter was correct for text fields and wrong for file inputs:

const vis = el => !!(el.offsetWidth || el.offsetHeight || el.getClientRects().length); // file inputs are styled to 0×0 and triggered by a <label> 

So every "upload a screenshot of your tool" field was invisible to the script, and
the form's required-field check then failed on submit. The classifier recorded
"unknown" — a submission that never left the browser.

Two changes: do not apply the visibility filter to input[type=file], and satisfy
the requirement instead of skipping it — screenshot the product page with
Playwright and upload that:

const shot = await page.screenshot({ clip: { x: 0, y: 0, width: 1200, height: 630 } }); for (const input of await page.$$('input[type=file]')) { await input.setInputFiles({ name: 'screenshot.png', mimeType: 'image/png', buffer: shot }) .catch(() => {}); } 

A 1200×630 image is the size every one of these directories wants for a card, so
the same file works everywhere.

The part that is not a bug

After all five fixes the rate went from 0% to about 4%, and the remaining failures
were real: login walls with magic-link auth, CAPTCHA, and pages that genuinely have
no form. That is the honest ceiling, and it is what the published dataset shows —
62% of 235 directories render a single input, usually a newsletter box.

The general lesson is uncomfortable: at scale, your measurement is the thing most
likely to be wrong, and it fails in the direction that looks like "the sites are
bad" rather than "my code is bad". Every one of these five bugs produced a plausible
verdict, saved an evidence screenshot, and moved on. None of them crashed.

If you automate forms, log the filled values, not just the verdict. The moment I
printed email= and saw it empty on a form that required an email, three of these
five bugs fell out in ten minutes.

The dataset from this run (235 directories, 2,700 attempts) is published under
CC BY 4.0: github.com/Louis24/ai-directory-index,
with the method and tables at
neonstack.net.