Locate optimized XPath and CSS selectors for any element, explore/search CSS selectors
XPath CSS Explorer
This tool is designed to provide web developers ability to explore the structure of a web page and generate optimized and robust XPath and CSS selectors to be used in their tests and other use cases. Other than the absolute XPath, the other paths are optimized to be short and generic enough to withstand certain changes to the page playout. This is accomplished by utilizing ID and unique class information along with certain robust attributes such as name, title etc.
Explore Selectors
This section is a fantastic way to explore the structure of a web page. It provides a search box to enter a CSS or XPath expression. On entering, it outlines all web elements matching the criteria. For example, type and enter "div", to find and outline all the divs in the page. Any legal CSS/XPath expression works here. Navigation UI shows all matched selectors along with the current one. It allows to cycle through the found matches.
Current Selector
This section is designed to provide robust and optimized selector paths for any web element in a web page using a set of heuristics. Such paths can be embedded into Selenium or similar tools to create tests that are robust to changes in the UI. This panel automatically generates paths for current selected web item in the Elements panel.
Page CSS Information
This section provides a way of knowing all ID and Class elements available on the current page. A numbered badge denotes the count if there is more than one element. Explore each item by clicking on it, which propagates it to the search box to generate outlines.
Please provide feedback to incorporate into future releases. Hope the tool is of help!
Latest reviews
- (2020-08-23) Hari Krishna: broken
- (2019-04-12) Sreechand Boppudi: This is a really cool and useful extension. I like how you can search for a selector and it highlights all elements matching the selector. Also shows a simplified selector for element currently being inspected. I find myself using this extension particularly when studying the CSS design and organization of websites that I like.