Capture locator baselines
capture_baselineRecords an element fingerprint for each locator while tests pass, so heal_locator can restore broken locators after UI changes. Supports logged-in pages via saved sessions.
Instructions
While tests pass, record a fingerprint (role, name, test id, id, classes, text...) of the element each locator matches, saved in .qa-mcp/baselines.json under the page reached. heal_locator uses these after the UI changes. Accepts the same session as explore_page for pages behind a login.
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>",
"locators": "<locators>"
},
"name": "capture_baseline"
}
}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) | |
| session | No | Reach pages behind a login or several steps into a flow | |
| locators | Yes |