Get page snapshot
get_page_snapshotReturns a YAML accessibility-tree snapshot of the current page, listing roles, names, and states. Use it to identify accessible elements to target with getByRole, getByText, or getByLabel.
Instructions
Returns a YAML accessibility-tree snapshot of the session page (roles, names, states). Use it to discover roles/names to target with getByRole/getByText/getByLabel in click/type/check.
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": {
"sessionId": "<sessionId>"
},
"name": "get_page_snapshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | Session id returned by start_session. Required on every stateful tool call. |