Self-healing Playwright operations
Helix Heal fixes broken Playwright locators before they stall the release.
Helix Heal reads failed reports, trace evidence, and DOM snapshots, then returns confidence-ranked locator repairs as reviewable dry-run patches. Local-first by default. No account. No artifact upload.
auto-ready threshold for confident locator replacements
maintenance drag targeted by the MVP painkiller
review first with optional automation after validation
no lock-in with report, cache, and trace evidence on disk
Real Report Ingestion
Playwright JSON, failed tests, retries, attachments
- Inputs
- Reports + traces
- Failure map
- Spec path + locator
- Output
- Evidence bundle
DOM-Aware Candidates
Accessibility-first selector generation
- Preferred
- role/name
- Fallback
- label/text/test id
- Noise guard
- ranked confidence
Validation Probe
Static plus live uniqueness checks
- Resolve
- unique match
- Actionable
- visible + enabled
- Risk
- ambiguous flagged
Dry-Run Patch Generator
AST-safe diff suggestions for review
- Mode
- review-first
- Scope
- matched locator only
- Diagnostics
- unsupported cases
GitHub PR Comment
Readable repair summary where developers work
- Comment
- failure reason
- Patch
- candidate diff
- Artifacts
- Markdown + HTML
Report Preview
Confidence, reasoning, and patch output
No matching Helix module found.
Fail
Playwright CI turns red and saves the report, trace, and source context.
Analyze
Helix extracts locator evidence and ranks safer replacements.
Validate
Candidate selectors are checked for uniqueness and actionability.
Patch
Developers receive a dry-run diff and PR comment with confidence signals.
Broken selector
The fixture expects Sign in, but the page renders a safer accessible Log in button.
Evidence collected
Helix reads the Playwright JSON report and trace snapshot to find the failed locator context.
Reviewable diff
The dry-run patch recommends a stable test-id or role/name locator instead of a brittle text selector.
Rerun clean
After applying the reviewed locator, the same Playwright flow can rerun against the changed UI.
npx playwright test
npx helix-heal analyze --report examples/basic-playwright/fixtures/playwright-report.json --trace examples/basic-playwright/fixtures/real-trace --source-root examples/basic-playwright
npx helix-heal patch --dry-run --report examples/basic-playwright/fixtures/playwright-report.json --trace examples/basic-playwright/fixtures/real-trace --source-root examples/basic-playwright
npx playwright test
Operating boundaries
Clear limits, fewer surprises
Helix is built to make locator repair safer, not magical. It flags uncertainty so teams can decide when a human review is the right engineering move.
Unsupported selectors
Complex dynamic locators may receive diagnostics instead of an automatic patch.
Ambiguous DOM
Multiple matching elements lower confidence and require review before a change is trusted.
Live validation
Browser-backed validation needs an installed Playwright browser and a reachable app URL.
Local CLI, dry-run patches, Markdown reports, static dashboard, and community support.
Planned hosted validation, team dashboard, repair analytics, and priority support.
Planned client workspaces, white-label reporting, branded exports, and delivery support.
Install Flow
Run this after a failed Playwright job
Helix stays easy to evaluate from npm: no hosted account, no vendor lock-in, and no framework migration before the first repair suggestion.
npx helix-heal analyze \
--report playwright-report.json \
--trace test-results \
--source-root .
npx helix-heal patch --dry-run \
--report playwright-report.json \
--trace test-results \
--source-root .
CI Handoff
Publish a repair plan in the pull request
The action is designed to run only after failure, preserving CI speed while turning breakage into a focused, developer-readable next step.
- name: Run Playwright
id: playwright
run: npx playwright test --reporter=json
continue-on-error: true
- uses: martjustin/helix-heal@main
if: steps.playwright.outcome == 'failure'
with:
playwright-report: playwright-report.json
trace: test-results
source-root: .