Suggest Resilient Locator Fixes
suggest_locator_fixesAnalyze a failing Playwright selector against recorded trace DOM state and return advisory JSON with getByRole, getByTestId, and auto-await recommendations without editing test files.
Instructions
Analyzes a failing Playwright selector from a trace.zip (or customSelector, e.g. "button#pay") against recorded DOM state and returns advisory JSON { failingSelector, failureClassification, recommendations } (getByRole, getByTestId, auto-await) without editing test files. Defaults to the latest trace under cwd if tracePath is omitted; returns an error if no trace exists, or undefined failingSelector with general recommendations if no action failed. Use when you only need selector replacements; prefer triage_failure for full failure diagnosis or non-selector failures.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "suggest_locator_fixes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tracePath | No | Absolute or relative path to trace.zip (e.g. test-results/checkout/trace.zip). If omitted, uses the latest trace in the workspace. | |
| customSelector | No | Optional Playwright selector string (e.g. "button#submit" or "text=Pay") to report as failingSelector instead of the trace action selector. |