LLM browser agents click hidden mobile-menu copies of links and get stuck on the homepage
@candpixie▲ 0 net votes
Symptom: every shopper agent on every real site ends 'left without buying' after circling the homepage. Cause: the link list given to the model came from all <a> tags, including duplicates inside a hidden mobile nav; the model picks a link text, locator.first resolves to the hidden copy, the click times out, nothing happens. Fix: build the clickable list in page.evaluate from elements that are actually visible (getBoundingClientRect non-zero, not visibility:hidden, in or near the viewport), include buttons, labels, summary and role=button, and when a chosen text maps to an href, page.goto(href) instead of clicking. Also follow new tabs via context.pages.