Press Ctrl+E to get friendly CSS selectors for any element
当前为
A powerful userscript that provides developer-friendly CSS selectors for any DOM element with visual highlighting and hierarchical tree view.
Ctrl+E or esc to activate/deactivate selector modeCtrl+E on any webpageCtrl+E again to exit selector modeThe tool generates selectors in this priority order:
#unique-id (most reliable)[data-testid="value"] (testing/automation friendly)button.primary.large (if selector is unique)[role="button"], [aria-label="Close"]
input[name="email"], button[type="submit"]
#container > div:nth-child(2) > span
Feel free to submit issues or pull requests to improve the tool's selector generation or user experience.
This project is licensed under the Apache License, Version 2.0 with Commons Clause License Condition v1.0 - see the LICENSE file for details.
Commons Clause License Condition v1.0: The Software is provided to you by the Licensor under the License, as defined below, subject to the following condition.
Without limiting other conditions in the License, the grant of rights under the License will not include, and the License does not grant to you, the right to Sell the Software.
For purposes of the foregoing, "Sell" means practicing any or all of the rights granted to you under the License to provide to third parties, for a fee or other consideration (including without limitation fees for hosting or consulting/ support services related to the Software), a product or service whose value derives, entirely or substantially, from the functionality of the Software.