Locator Lens
Overview
Click any element to get a ranked, verified locator for your Playwright tests. Unofficial; not affiliated with Microsoft.
Locator Lens turns "click an element" into a Playwright locator you can paste straight into a test — scored, explained, and verified against the page before you copy it. WHY IT IS DIFFERENT Most selector pickers hand-roll their own matching, so the locator they show is a guess at what Playwright would do. Locator Lens bundles Playwright's own injected selector engine — the same code that powers `npx playwright codegen` and the Inspector. The suggestion is literally what codegen would emit, and match counts come from Playwright's real resolver, including strict mode and shadow-DOM piercing. "1 match" in the panel means 1 match in the test. WHAT YOU GET • Ranked candidates — every viable locator scored 0-100, with each deduction named ("Uses a positional index", "Targets a machine-generated id") • Live selector editor — paste any locator, with or without the page. prefix, including frameLocator() chains, and see the match count and every match highlighted on the page as you type • Element inspector — computed role, accessible name, attributes, state and a DOM breadcrumb, so a ranking is explainable rather than magic • CSS and XPath reference forms, both absolute and anchored to a nearby named element, for DevTools and non-Playwright tools • Element and viewport screenshots, cropped from a real capture • Page object export — collect several picks and export a *.page.ts class • iframe support — picks inside frames come back with the full frameLocator() chain already applied PRIVACY Nothing leaves your machine. The extension makes no network requests: no analytics, no telemetry, no accounts, no servers. The only thing it stores is your own test-id attribute setting. PERMISSIONS It ships with activeTab only, so there is no "read your data on all websites" warning at install. Chrome grants access when you click the toolbar icon and revokes it when the page navigates to a different origin. If you are working through a flow that crosses origins, an optional "Stay connected" button in the panel requests all-sites access for the session — entirely opt-in, and revocable from the same button. Requires Chrome 114 or later. Source: https://github.com/RonelBG1213/locator-lens Unofficial. Not affiliated with, endorsed by, or sponsored by Microsoft or the Playwright project. Bundles playwright-core, licensed under Apache-2.0; the full notice ships inside the extension as THIRD_PARTY_NOTICES.txt.
0 out of 5No ratings
Details
- Version0.1.0
- UpdatedAugust 8, 2026
- Size99.04KiB
- LanguagesEnglish (United States)
- Developer
Email
ronelbautistageronimo@gmail.com - Non-traderThis developer has not identified itself as a trader. For consumers in the European Union, please note that consumer rights do not apply to contracts between you and this developer.
Privacy
This developer declares that your data is
- Not being sold to third parties, outside of the approved use cases
- Not being used or transferred for purposes that are unrelated to the item's core functionality
- Not being used or transferred to determine creditworthiness or for lending purposes