set_locator
Add or replace a locator expression on a page object method for precise element targeting in Playwright automation.
Instructions
Add or replace a locator on a page object. selector is a Playwright locator-chain EXPRESSION -- the text that goes after "page." (or the assigned scope's own expression, if this method has one via set_method_scope) -- e.g. "getByRole('button', { name: 'Submit' })" or "locator('#submit')", never a bare selector-engine string. A ${paramName} block (bare names only, not expressions) inside one of the expression's own string-literal arguments becomes a parametric method automatically -- see extractPoParams.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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. | |
| selector | Yes | ||
| pageObject | Yes |