A crawler maps a web app so that AI-generated tests stop inventing selectors. A small pilot points that way, but is not significant yet.
Schematic, not the measured site. One generated test in red
The problem
Ask a language model to write end-to-end tests for a web app and it will happily click on buttons that do not exist. It guesses selectors from what a page like this usually looks like, and the tests fail for reasons that have nothing to do with the app.
What I built
A crawler that walks through the app read-only, with every request that could change data blocked, and turns what it finds into a graph of states, transitions and selectors that were verified on the real page. The model only gets that graph as context when it writes tests. A dashboard shows the map, and a benchmark checks every generated selector against it.
What came out
0 / 12invented selectors with the graph, 4 of 21 without, pilot
Pilot on the company website (5 tasks, one run): invented selectors 0 of 12 with the graph vs. 4 of 21 without (Wilson 95 % CI 0 to 24 % vs. 8 to 40 %). Judge-rated faithfulness (GEval, 0 to 1) 0.82 vs. 0.12. Not significant at this size (Fisher p = 0.27).
Tech
Python
Playwright
Crawlee
FastAPI
LLMs via Ollama Cloud
Built at work. The code is not public, so no screenshots here.