Validate selector or locator
validate-selectorCheck a CSS or Playwright selector on a live page to verify validity, count matches, view samples, and get a sturdier verified locator for actions that require exactly one match.
Instructions
Check a CSS selector, Playwright selector or locator (getByRole/getByTestId…, .first(), .filter()) on a live page: validity, match count (actions need exactly 1), sample matches and a sturdier verified locator for each. Accepts storageState/headers/actions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Full URL of the live page to test against (http/https) | |
| actions | No | Steps run after load to reach a state (modal, step 3) | |
| headers | No | Extra HTTP headers, e.g. Authorization | |
| selector | Yes | Selector or locator, e.g. getByRole('button', { name: 'Save' }) | |
| viewport | No | ||
| timeoutMs | No | Overall limit in ms (default 45000) | |
| projectRoot | No | Project whose Playwright launches the browser (default: server root) | |
| storageState | No | Logged-in session: storageState JSON inside the project, e.g. playwright/.auth/user.json |