Fix phone country code search input being flagged as unknown

Skip inputs with placeholder="Search" or pre-filled values when
they have a "Phone" label — these are country code pickers, not
the actual phone input.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 21:01:53 -08:00
parent f586c6d091
commit c680105bc8

View File

@@ -587,8 +587,11 @@ Answer:`;
const lbl = field.label; const lbl = field.label;
const ll = lbl.toLowerCase(); const ll = lbl.toLowerCase();
// Phone — always overwrite // Phone — fill if empty or tel type, skip country code search inputs
if (ll.includes('phone') || ll.includes('mobile')) { if (ll.includes('phone') || ll.includes('mobile')) {
if (field.placeholder === 'Search' || field.value?.trim()) {
continue; // country code search or already filled
}
const el = await byTag(field.tag); const el = await byTag(field.tag);
if (!el) continue; if (!el) continue;
await el.click({ clickCount: 3 }).catch(() => {}); await el.click({ clickCount: 3 }).catch(() => {});