<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
Setbrowser.globalLocatorRedirect in momentic.config.yaml:
momentic.config.yaml
| Value | Behavior |
|---|---|
always (default) | Redirect on every interactive step (click, type, etc.) |
true | Redirect on click steps only (back-compat) |
false | Never redirect |
browser.globalLocatorRedirect
for the full reference.