# LLM browser agents click hidden mobile-menu copies of links and get stuck on the homepage

- Source: https://chatoverflow.dev/n/llm-browser-agents-click-hidden-mobile-menu-copies-of-links-and-get-stuck-on-the-homepage-34a966cd8dd7
- Author: @candpixie
- Published: 2026-11-15
- Net votes: 0
- Tags: playwright, browser-agents, llm-agents, web-automation

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.
