How do I stop E2E tests from breaking after every UI change?
E2E tests break after a UI change because they find elements by a class, an id, a piece of text or a position, and those are the things a redesign changes. Nexus Studio, by Verdict System LLC, handles it in three steps: it proposes a new locator and asks before it changes the test, it marks a run that a repaired selector saved as AUTO_RECOVER instead of a clean pass, and it lists the weak locators so you can fix them first.
By the Nexus Studio team, Verdict System LLC. October 7, 2026.
Why do Playwright and Selenium tests fail when the UI changes?
A locator is the address a test uses to find an element. When the address depends on something that is not part of what the element does, such as a build-generated class, a position in the page or the wording of a label, a change to the page makes the address wrong and the test fails on that line, even though the application still works.
The cost is not the single failure. It is the time a team spends reading red runs, finding the line, finding a new locator and editing the file, again after every release.
What is wrong with self-healing that fixes tests silently?
A tool that swaps a broken locator without telling anyone keeps the suite green, but it also hides the change. The test now clicks something the author did not choose, and nobody reviewed it. If the new match is the wrong element, the test can pass while it checks the wrong thing.
Nexus Studio is built on the opposite rule: nothing is repaired behind your back.
How does Nexus Studio repair a broken locator?
- With self-healing on its default setting, Suggest, a test that fails makes the Studio open a background browser, replay the test up to the failed line and read the page. The candidates are ready when you open the failure. This uses no AI, and the test stays red.
- From the gutter of the failed line, the Repair line lets you re-record just that step, or swap the selector for one of the candidates. The candidates are ordered strongest first, and XPath comes last.
- The change lands in the editor unsaved. Saving it is your approval.
- You can also ask your AI which candidate to pick. It can reorder the candidates, never add one, and the previous version of the file stays in the file's timeline.
What does it mean when a test passes with a repaired selector?
The verdict is AUTO_RECOVER: the run passed, but self-healing had to replace a selector in that test. It is never reported as SECURE, the clean pass. The locator the author wrote is dead, and the next change to the page breaks the suite for real, so the reservation stays visible in the report and in History until someone fixes the original selector.
AUTO_RECOVER is one of the seven passing verdicts, so a CI job exits 0 on it. The reservation shows in the report, not as a broken build. The full order of checks is in How Nexus Studio decides 14 test verdicts.
How can I find weak selectors before they break?
- Locator health lists the open test's weak locators, with the line of each, and repairs them through the same dialog as the Repair line.
- Selector Maps scan a page without AI, grade each selector HIGH, MEDIUM or LOW, and keep the map on your disk.
- The Vet, the seven checks every AI-written test must pass, includes the rule that the test has no fragile locators.
Which locators does the Recorder choose?
The Nexus Recorder writes what you click as test code, with no AI in the loop. It can use a test id attribute: when you choose data-testid for a JavaScript take, it reads data-testid and also data-qa. Python and Selenium takes keep the one attribute name of their runner. Selectors written against these attributes are graded as robust, while a build-generated class name, a deep CSS chain and a bare tag name are graded as fragile.
Does the test stay a standard Playwright or Selenium file?
Yes. Every test the Studio writes or imports is framework code your team already knows: a Playwright Test file, or Selenium in JavaScript or Python. A repair edits a line of that file, so there is no proprietary format to migrate out of if you stop using the Studio.
Limits
- Self-healing in Suggest mode does not fix anything by itself. A person still approves each repair, so a large UI change still takes review time.
- The automatic read after a failure needs free memory on the machine. When there is not enough, it does not start, and you can still ask for the candidates by hand.
- Locator health reads the file line by line, so a locator split over several lines is not seen.
- A weak locator that still works is not a failure. Locator health tells you about it, but nothing forces you to change it.
Where can I see it working?
The Studio tour shows the Repair line and locator health on screen, the verdicts guide explains AUTO_RECOVER next to the other 13 verdicts, and the 30-day trial runs the same engine on your own tests.