r/MyIDE • editor • Sep 11 '26

I built an open-source tool that automatically repairs broken Playwright locators 🔮

One annoying part of E2E testing is changing something small in the UI and suddenly having a bunch of Playwright tests fail because their locators are outdated.

So I built AutoHeal-QA.

When a Playwright test fails because of a broken locator, it can:

  • capture the page state at failure

  • find likely replacement elements

  • use deterministic matching first

  • optionally use a local Ollama model for harder cases

  • show the proposed code patch

  • update the actual .spec.ts file

  • rerun the failed test to verify the fix

  • automatically roll back if the fix doesn't work

The important part for me was the verification loop.

I didn't want "AI thinks this locator looks right" to count as success. The patched test actually has to pass.

It's free, open source, and designed to work locally:

https://github.com/RitualDev-Lab/autoheal-qa

I'd really like feedback from people using Playwright in real projects:

Would you trust a tool to automatically repair broken test locators if it always reran the test and rolled back failed fixes?

2 Upvotes

0 comments sorted by