browser_generate_locator
Generates a Playwright locator for an element using its reference from a page snapshot, aiding test creation.
Instructions
Generate a Playwright locator for an element (useful for writing tests)
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": {
"ref": "<ref>"
},
"name": "browser_generate_locator"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | Element reference from page snapshot | |
| element | No | Human-readable element description |