Now with AI-Only Mode

Self-Healing Tests for Playwright

Don't let broken selectors break your build. Healwright uses AI to understand your intent and fix locators at runtime.

$ npm install healwright
test('login flow', async ({ page }) => {
  // Self-healing locator with fallback
  await page.heal.locator(
    '.submit-btn',
    'Submit button on form'
  ).click();
  
  // Or just describe it, no selector needed!
  await page.heal.fill(
    '', 
    'Email input field', 
    'user@example.com'
  );
});
AI Healing Active...
No more broken locators
No more flaky tests
No more time to waste

Forward-Thinking Testing

Self-Healing Locators

When formatted structure changes, our AI analyzes the DOM to find the element you actually meant.

Chainable Locators

Use heal.locator(selector, desc) for clean, chainable syntax with built-in fallback.

Too Lazy? No Problem

Leave the locator empty and just describe the element. Healwright will find it for you.

Force Click Hidden

Click hover-dependent elements with { force: true }. No more flaky hover tests.

Smart Caching

Healed selectors are cached locally. You don't burn API credits on subsequent runs.

Drop-in Replacement

Works seamlessly with your existing Playwright setup. Mix and match healed and standard locators.

Supported AI Providers

Use the cloud or go fully offline. Pick the model that fits your team, budget, and privacy needs.

OpenAI
Anthropic
Gemini
Ollama Local LLM

How It Works

Your locator breaks — Healwright fixes it automatically.

Test Runs

Your test calls an action — click, fill, hover, etc. Healwright tries the original locator first. If it works, the test continues with zero overhead.

Locator Breaks

When the locator can't find the element, the healing pipeline kicks in. A local cache is checked first — if the element was healed before, it's reused instantly.

AI Finds the Element

DOM candidates are sent to your AI provider. It returns the best matching locator strategy, which is validated to ensure it resolves to exactly one visible element.

OpenAI Claude Gemini Ollama (Local)
testid role label placeholder text css

Healed & Cached

The action executes with the healed locator and the strategy is cached to disk. Future runs skip AI entirely — your CI stays green.

See It in Action

Watch healwright detect and fix broken locators in real time.