Playwright Locator Assistant
2 ratings
)Overview
Generate, verify and record stable Playwright locators for any element. Python, JS/TS, Java and C#.
Playwright Locator Assistant generates the locator Playwright itself would choose, checks it against the live page, and turns it into ready-to-paste test code — without opening DevTools. WHY IT'S DIFFERENT The uniqueness badge is built on an engine that mirrors Playwright's own role, accessible-name and text semantics. When the extension says "✓ 1", real Playwright finds exactly that element. Every release is verified by running the generated locators through the real Playwright API. GENERATE • Click an element, or hover it and press Alt+Shift+L (⌘+Shift+L on Mac) so menus and dropdowns stay open • Strategies in Playwright's recommended order: getByTestId → getByLabel → getByRole + name → getByPlaceholder → getByText → getByTitle → scoped chains → .nth() → CSS, first unique wins • Dynamic values (prices, rates, dates, times, counters) are never baked into a locator; names with a live part become regex names • Table cells are anchored to their row and name their column • Same-origin iframes get the full contentFrame() chain; open Shadow DOM elements are picked directly • Stability tag on every locator: strong, good or fragile • Up to 5 alternatives, each with its own match count USE • Copy the locator, the action (.click(), .fill(""), .check(), .selectOption("…")) or the assertion (toHaveText, toHaveValue, toBeChecked, toBeVisible) • { } turns row anchors, cell values and options into variables for parameterised tests • Output in Python (pytest), JavaScript/TypeScript, Java or C# • Configure your testIdAttribute and whether exact: true is always emitted or only when needed PAGE OBJECTS Collect elements with "+ Page object", rename them, and copy a complete class: TypeScript getters, a Python class with properties, a Java class or a C# class. RECORD A FLOW Start recording, use the page, stop. Clicks, typed values, Enter presses, checkbox changes, selections and navigations become steps with the generated locators, rendered as a test skeleton in your language. VERIFY Paste any locator — or a whole test — and matching elements are highlighted with a count. Understands JS and Python syntax, await and expect() wrappers, filter({ hasText, has }), nth/first/last, and/or, frameLocator, regex names, CSS (including :has-text), XPath and text= shorthands. Unparseable input is reported as an error, not as "0 matches". MORE • DevTools sidebar in the Elements panel for the inspected node • Recent locators are re-checked against the current page every time the popup opens • Keyboard-only picking: Tab to move, Enter to capture, Esc to cancel • Light and dark mode PRIVACY Everything runs locally in your browser. Nothing is sent anywhere.
5 out of 52 ratings
Details
- Version2.1.0
- UpdatedSeptember 7, 2026
- Size4.71MiB
- LanguagesEnglish
- Developer
Email
khatskevich.mv@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
Playwright Locator Assistant has disclosed the following information regarding the collection and usage of your data. More detailed information can be found in the developer's privacy policy.
Playwright Locator Assistant handles the following:
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