verify_locators
Counts Playwright locator expressions against a live page to return match counts, uniqueness, and the first matched element per expression for test validation and CI drift checks.
Instructions
Count every given Playwright expression against the live page (same engine that verified the extraction). Use after writing a test: paste the spec's getBy*/locator expressions and get matches, uniqueness, and the first matched element per expression, plus a summary. Also the drift check to run in CI against a page.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The page to extract. Must be http/https and on an allowlisted host. | |
| locators | Yes | Playwright expressions as written in the test (getByRole(...), getByTestId(...), scoped forms, .nth(i)). | |
| viewport | No | Viewport preset — 'mobile' is 375x812 with touch, for responsive states. | desktop |
| wait_for | No | Navigation wait. 'auto' (default) waits for load, then until the DOM has been quiet for 500ms (max 6s) — works on SPAs that render after load and on pages whose analytics never let the network go idle. 'networkidle' times out on such pages. | auto |
| wait_selector | No | Optional selector to await before extracting (for SPA content). |