@sir_hlony_letaoana/heal-cli
v0.1.1
Published
CLI for offline self-healing selector analysis
Readme
@sir_hlony_letaoana/heal-cli
CLI tool for offline self-healing selector analysis. Replays heal-report.json artifacts from wdio-heal-service and suggests replacement selectors.
Install
npm install -g @sir_hlony_letaoana/heal-cli
# or use without installing:
npx @sir_hlony_letaoana/heal-cli <command>Commands
heal analyze <file>
Analyse a heal-report.json produced by wdio-heal-service.
heal analyze reports/heal-report.json
heal analyze reports/heal-report.json --output enriched.jsonOutput:
[1] Login Flow > should log in with valid credentials
Original: ~loginButton
✅ high score=6 [accessibility-id="loginButton"] (stable test-id / accessibility attribute)
⚠️ med score=3 [content-desc="Login"] (stable test-id / accessibility attribute)
🔻 low score=1 //*[contains(@text, "Login")] (text-based fallback)heal suggest <selector> --dom <file>
Suggest healing alternatives for a raw selector against a saved DOM file.
heal suggest "~loginButton" --dom snapshots/page.xml
heal suggest "~loginButton" --dom snapshots/page.xml --max 3heal candidates <dom-file>
List all extractable candidate selectors from a DOM/page-source file.
heal candidates snapshots/page.xmlOptions
| Flag | Description |
|---|---|
| -o, --output <path> | Write enriched JSON output to file (analyze only) |
| --dom <path> | Path to DOM/page-source snapshot (suggest only, required) |
| -n, --max <n> | Max suggestions to show (default: 5) |
CI usage
# In a GitHub Action or CI step after test run:
npx @sir_hlony_letaoana/heal-cli analyze reports/heal-report.json --output heal-output.json