Heal locator
heal_locatorFind the likely intended element when a locator no longer matches or matches several, then suggest a verified replacement with a confidence score and reasons; review before updating tests.
Instructions
For a locator that no longer matches (or matches several elements), find the most likely intended element on the current page and suggest a verified replacement with a confidence score and reasons. Accepts the same session as explore_page. Never edits files: review the suggestion, update the test, then re-run.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>",
"locator": "<locator>"
},
"name": "heal_locator"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| device | No | Emulate a device for mobile web: a Playwright device name such as "iPhone 15" or "Pixel 7" (list_devices), or "desktop" (default) | |
| locator | Yes | ||
| session | No | Reach pages behind a login or several steps into a flow | |
| check_devices | No | Also verify the suggestion on these devices, e.g. ["desktop", "iPhone 15"], so a mobile fix does not break desktop |