set_method_scope
Assign a locator to a page object's scope so generated code reads it from that scope's element instead of the whole page. Pass an empty scope to unassign and revert to page-wide.
Instructions
Nest an existing locator under one of its OWN page object's scopes (create the scope first with set_scope) -- generated code then reads it off that scope's own element instead of the whole page. Omit/pass an empty scope to unassign, going back to page-wide.
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": {
"pageObject": "<pageObject>",
"method": "<method>"
},
"name": "set_method_scope"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | ||
| method | Yes | ||
| project | No | Path to the project root (same folder the side panel connects to). Defaults to the EASYSPEC_PROJECT environment variable if omitted. | |
| pageObject | Yes |