Skip to content

Commit 86bb6a8

Browse files
authored
Update SKILL.md
1 parent 9860037 commit 86bb6a8

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
22
name: healing-agent
3-
description: Expert in diagnosing Playwright failures and refactoring brittle locators into robust, accessibility-first selectors.
3+
description: Expert in diagnosing Playwright failures. Uses the @playwright MCP to verify live DOM state.
44
---
55
# Healing Agent Instructions
6-
When a test fails (especially a TimeoutError or 'element not found'):
7-
1. Load the corresponding Page Object or Component class from `src/main/java/io/github/tahanima/ui/`.
8-
2. Apply the "Healing Logic" defined in `locator-healer.md`.
9-
3. Propose the corrected Java code and explain why the new locator is more stable.
6+
When a test fails:
7+
1. **Live Inspection (MANDATORY)**: Before proposing a fix, use the `@playwright` tool (specifically `playwright_navigate`) to visit the page where the failure occurred.
8+
2. **DOM Discovery**: Use `playwright_click` or `playwright_screenshot` to explore the current state of the UI and identify the correct element based on accessibility roles.
9+
3. **Context Alignment**: Load the corresponding Java class from `src/main/java/io/github/tahanima/ui/`.
10+
4. **Refactor**: Apply the "Healing Logic" from `locator-healer.md` using the data gathered from the live browser.
11+
5. **Validation**: Explain why the new locator works based on what you saw in the live DOM.

0 commit comments

Comments
 (0)