How can I get the CSS Selector in Chrome?

Chrome Dev Tools CSS Path

If Chrome Dev tools if you select the element in the source pane and right click, then you will see the “Copy CSS Path” option.

In newer versions of Chrome, this is (right-click) > Copy > Copy selector.
You can also get the XPath with (right-click) > Copy > Copy XPath

Leave a Comment