Locator healed? Put the fix back into your Playwright test.
Your Playwright test runs again after successful healing? You can optionally save the verified replacement locator in the TypeScript test file so the same change does not need repeated attention.
// TestZombie healed locator // await page.locator('#checkout-v1').click(); await page.getByTestId('checkout').click();
Save the run
A suitable locator fix can stop a Playwright test from repeatedly failing because of a simple UI change.
Keep the fix
The successful locator can optionally be written back into the affected test file.
Keep it traceable
Original locator, replacement and healing context remain visible for review and later analysis.
Four steps from failure to durable repair.
The code-update flow connects runtime recovery with normal engineering review instead of hiding healing in a black box.
Go deeper with Playwright
Playwright Automatic Code Update FAQ
Does every healing have to be written into code automatically?
No. Automatic Code Update is an optional workflow; teams can combine runtime healing and durable code changes with their own review process.
Does the original locator remain traceable?
The code-update approach is designed for traceability: original locator, healing context and replacement should remain reviewable.
Does code update replace code review?
No. The value is in preparing and documenting repetitive locator repairs while normal quality and review processes can remain in place.
Playwright healing should not end with the current run.
Turn validated healings into durable TypeScript fixes inside the Playwright project you already use.