set_scope
Add or replace a page-object scope using a Playwright locator, so nested locators only need uniqueness within that root.
Instructions
Add or replace a SCOPE on a page object -- a root-element locator other locators on the same page object can be nested under (see set_method_scope), so their own selectors only need to be unique within it instead of the whole page. Useful for a reusable section (a modal, a repeated table row) -- a page object already models either a full page or a section; scopes are what make the section case actually robust. scope is stored as a bare camelCase name (auto-sanitized, e.g. "results") -- "Scope" is appended only in generated code (e.g. resultsScope), not part of the stored name. selector is a Playwright locator-chain expression, same format as set_locator's own (e.g. "locator('.results')") -- a ${paramName} block inside one of its string-literal arguments makes it parametric, for a scope reused per row/instance -- rare in practice, most scopes are static.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | Yes | ||
| project | No | Path to the project root (same folder the side panel connects to). Defaults to the EASYSPEC_PROJECT environment variable if omitted. | |
| selector | Yes | ||
| pageObject | Yes |