Skip to main content
Many UIs hide a semantic element (e.g. <input type="checkbox">) behind a styled wrapper users actually click. Momentic’s AI chooses elements from the accessibility tree, but Playwright needs to click the visible, interactive element. Global locator redirect bridges the two.

How it works

Momentic hit-tests points inside the original element’s bounds to find the topmost visible, interactive element. If the original element is visible, it’s used as-is. Otherwise, Momentic picks the most-overlapping nearby element whose DOM position and bounding box look similar, ensuring it doesn’t accidentally redirect to an unrelated overlay.

Configuration

Set browser.globalLocatorRedirect in momentic.config.yaml:
momentic.config.yaml
browser:
  globalLocatorRedirect: always
ValueBehavior
always (default)Redirect on every interactive step (click, type, etc.)
trueRedirect on click steps only (back-compat)
falseNever redirect
See browser.globalLocatorRedirect for the full reference.