Firefox Browser Add-ons
  • Extensions
  • Themes
    • for Firefox
    • Dictionaries & Language Packs
    • Other Browser Sites
    • Add-ons for Android
Log in
Preview of Web Element Selector Generator

Web Element Selector Generator by Cotetiu Madalin

Generate CSS/XPath selectors for elements or a whole page, with ready-to-paste Selenium, Playwright, and Cypress code snippets.

0 (0 reviews)0 (0 reviews)
Download Firefox and get the extension
Download file

Extension Metadata

Screenshots
About this extension
Web Element Selector Generator instantly turns any element — or an entire page — into ready-to-use CSS selectors, XPath, and test automation code for Selenium, Playwright, Cypress, and WebdriverIO.

Stop hand-crafting locators in DevTools. Click one element, or scan a whole page at once, and get every selector strategy you need plus copy-paste-ready code in the language and framework you already use — Java, Python, JavaScript/TypeScript, or C#.

PICK AN ELEMENT
• Click an element (with Inspect mode on) or Alt+Click anywhere without blocking navigation
• Right-click any element and choose "Generate selectors for this element"
• Jump straight into Inspect mode with the Alt+Shift+E shortcut

SCAN AN ENTIRE PAGE AT ONCE — NEW
• Open the side panel and scan every link, button, input, form, and test-id-tagged element on the page in a single pass
• Reaches cross-origin iframes, not just your own frame — something most selector tools can't do
• Filter by element category, search by text/tag/selector, and hover any result to highlight it live on the page
• Multi-select elements and export them together as a ready-to-paste Page Object class

GET 8 LOCATOR STRATEGIES PER ELEMENT
• CSS — relative (shortest unique path) and absolute
• XPath — relative and absolute
• CSS attribute-contains and XPath text-contains, for elements with dynamic classes/IDs
• ARIA role/name selector, for accessibility-first testing
• A "recommended" badge automatically highlights the most robust option

GENERATE READY-TO-PASTE TEST CODE — NEW
• Selenium WebDriver: Java, Python, C#, JavaScript
• Playwright: JavaScript/TypeScript, Python, Java, C#
• Cypress and WebdriverIO
• Copy a single locator line, or export a full Page Object class skeleton from a batch of scanned elements

BUILT FOR REAL-WORLD PAGES
• Works inside open shadow roots and same-origin iframes, with clear notes when a selector's scope is limited
• "Validate All" checks every generated selector live against the page and reports match counts
• Keeps a history of your last 25 picks per tab so you can revisit earlier selections
• Configurable attribute priority — prefer data-testid, data-qa, or your own custom attributes
• Export your selection history, or a full page scan, as JSON or CSV

PRIVACY FIRST
Everything runs locally in your browser. No element data, page content, or selectors are ever sent anywhere — history, scan results, and settings are stored only in your own Chrome profile.

Built for QA engineers, SDETs, and automation testers writing Selenium, Playwright, Cypress, or WebdriverIO tests, developers debugging dynamic UIs, and anyone scraping data or auditing pages for accessibility.
Rated 0 by 0 reviewers
Sign in to rate this extension
There are no ratings yet

Star rating saved

5
0
4
0
3
0
2
0
1
0
No reviews yet
Permissions and data

Required permissions:

  • Access browser activity during navigation
  • Access your data for all websites

Data collection:

  • The developer says this extension doesn't require data collection.
Learn more
More information
Add-on Links
  • Copy add-on ID
Version
1.2
Size
37.09 KB
Last updated
4 days ago (Jul 31, 2026)
Related Categories
  • Web Development
License
All Rights Reserved
Version History
  • See all versions
Add to collection
Report this add-on
Go to Mozilla’s homepage

Add-ons

  • About
  • Firefox Add-ons Blog
  • Extension Workshop
  • Developer Hub
  • Developer Policies
  • Community Blog
  • Forum
  • Report a bug
  • Review Guide

Download

  • Download Firefox
  • Windows
  • macOS
  • iOS
  • Android
  • Linux
  • All

Latest Builds

  • Nightly
  • Beta

Firefox for Business

  • Enterprise

Community

  • Connect
  • Contribute
  • Developer

Follow

  • Instagram
  • YouTube
  • TikTok
  • Bluesky
  • Podcast
  • Privacy
  • Cookies
  • Legal

Except where otherwise noted, content on this site is licensed under the Creative Commons Attribution Share-Alike License v3.0 or any later version.