Speed and caching
How the multi-modal cache works
A cached step stores more than one way to find the target: where it sits on screen, what it looks like, what text it contains, and the structural and accessibility attributes around it. Which of those signals matters for a given step is inferred from the natural-language description. “The red Cancel button below the Order Summary header” leans on visual and positional signals; “the Submit button in the form” leans on structure and role. When a step replays, the runner checks the stored signals against the live page and runs the action without invoking the LLM when there’s a match. On a miss, the locator agent (auto-heal) re-resolves the original description against the live page, updates the cache entry in place, and the run continues. A heal event is recorded against the run.What happens on replay
Take a passing Selenium test suite, then the next day the team ships two changes: the welcome banner copy changes fromWelcome, Ada to
Hi Ada, welcome back, and the submit button’s id is renamed from submit to
submit-btn.
Selenium replay:
driver.find_element(By.ID, "submit")issues a lookup. With an implicit wait, the driver polls until the timeout, finds nothing because the id was renamed, and raisesNoSuchElementException.- The explicit wait for the old welcome copy
(
WebDriverWait(...).until(EC.text_to_be_present_in_element(...))) elapses and raisesTimeoutException. - The CI job fails. A maintainer edits the selectors and the waits, opens a PR, gets it reviewed, and re-runs CI. If the broken locator was an XPath, the edit can cascade across steps.
clicksteps hit the cache. On the renamed button the cached locator misses, so the locator agent re-resolves the original descriptionSign inagainst the live page, binds, and updates the entry in place. A heal event is recorded.assert: The dashboard chart is visible and not cut offis evaluated by the assertion agent against the current page state. The agent reasons over the intent of the assertion, not a literal string match, so the reworded banner doesn’t trip it.- The test passes. No code review needed.
Technical details
Technical details
Momentic smart waitingThe default smart wait is 3000ms and configurable per test. The runner waits on
a combination of navigation,
load, screenshots, DOM mutations, and same-origin
requests until the page is quiet or the timeout elapses.Selenium waiting, for contrastimplicitlyWaitis global per driver. Too low causes flakes; too high pads every run.- Explicit waits (
WebDriverWait+ExpectedConditions.visibility_of_element_located,presence_of,element_to_be_clickable) are per query. It is common to layer several explicit waits per logical step. - There is no notion of network quiescence; teams poll the DOM or instrument their own request hooks.
Locators and AI primitives
Selenium locator trade-offs
Selenium locator trade-offs
By.id/By.nameare stable when present, but break under refactors and A/B testing, and dynamic content frequently lacks them.By.cssSelectorbreaks on restyle or restructure.By.xpathis the catch-all but is slow on large DOMs and breaks on any structural change.- No locator carries semantic intent. A failing step has no description to recover from.
Recovery, quarantine, and CI
Authoring side-by-side
A more realistic test
The hello-world above doesn’t show the full simplified format surface. A representative checkout regression with module reuse, parameter inputs, typed extraction, and a conditional looks like this:checkout.test.yaml
../modules/sign-in.module.yaml
if in the host language; assertions and visual checks need the host framework
or third-party plugins.