map_locator
Convert PageSnap YAML locators into Playwright, Selenium, or Cypress snippets with score and stability.
Instructions
Map a PageSnap YAML locator {by, value} to a Playwright, Selenium, or Cypress snippet with score and stability. Sauce Demo data-test ids still emit getByTestId (configure testIdAttribute in Playwright). Never maps testid to getByRole('generic').
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": {
"by": "<by>",
"value": "<value>"
},
"name": "map_locator"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | Yes | YAML by strategy: testid, role, label, id, name, placeholder, linkText, css, xpath. | |
| name | No | Accessible name, used with role locators. | |
| value | Yes | Locator value from the YAML snapshot. | |
| framework | No | Target test framework. Default: playwright. | playwright |