What auto-heal can fix
- Locator tweaks: Adjust attributes, inner text, or roles when labels change.
- Minor UI shifts: Handle new containers or re-ordered elements without rewriting the flow.
- Exploratory retries: Add or skip intermediate clicks if a dialog or confirmation page appears.
- Full regenerations: Propose rewritten steps when the intent is still valid but the journey changed. See Maintenance agents for the full automation loop.

Choose the right step mode
Every step can run under one of three modes:- Strict: Replays the exact recorded actions—ideal for deterministic API calls or admin screens that must never change.
- Auto-heal (default): Attempts minimal fixes to locators and UI position while preserving the original flow.
- AI: Regenerates the step from its description each run, great for highly dynamic content such as “Select the last day of the current month”.

Configure healing sensitivity
Open Step settings → Auto-heal to pick how aggressively Stably should adapt:- Locator only: Update selectors, attributes, or nearby hierarchy—no extra actions.
- Minor UI changes: Allow layout adjustments, new frames, or renamed buttons.
- User flow changes: Explore alternate routes, including adding new actions discovered during the run.

Review and apply changes
When auto-heal intervenes, you’ll receive a diff that highlights the proposed edits:- Open the Auto-heal tab in the test run results or within the editor’s Review panel.
- Inspect each suggestion—updated selectors, inserted steps, or regenerated descriptions.
- Approve to merge the change into the saved test, or reject to keep the prior version.
Project-level defaults
- Set organization-wide defaults in Settings → AI Agents to pick auto-heal behavior, default exploration limits, and fallback models.
- Connect Knowledge Base articles so the AI references your product terminology when healing flows.
- Use run tags or environments to scope aggressive healing to staging while keeping production suites conservative.
Best practices
- Keep step descriptions concise but descriptive—mention business intent, not just the UI element.
- Mark critical gateway steps as Strict so you are alerted when the contract truly breaks.
- Combine auto-heal with AI Assertions so validations remain resilient even as UI text changes.
- Regularly review pending suggestions; early acceptance keeps your test suite aligned with the current experience.
If a test regularly needs deep rewrites, consider promoting the scenario to code with the Stably Playwright SDK where you can version-control bespoke recovery logic.