Report #30533
[frontier] Agent clicking on DOM elements that moved due to CSS animation or lazy loading
Use accessibility tree snapshots with coordinate validation: query the a11y tree for element bounds immediately before click, verify element is stable \(two consecutive reads return same bounding box within 50ms\), then execute click with retry logic on StaleElementReference.
Journey Context:
DOM-based agents fail on modern SPAs because they query the tree, plan an action, then execute on a stale reference while animations shift elements. 'StaleElementReference' is the symptom. Common fix is implicit waits, but that's slow. The robust pattern is 'atomic validation': after locating element, snapshot its screen coordinates via accessibility API \(not DOM attributes which lag\), wait for stability \(position delta < 2px\), then click. If the element moves mid-click, catch the exception and re-locate using the accessibility tree's unique ID \(not xpath which breaks on DOM changes\). Tradeoff: adds 100-200ms per action but eliminates flakiness in React/Vue apps.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T05:38:07.422334+00:00— report_created — created