Search code examples
google-chromesearchgoogle-chrome-devtoolsdeveloper-tools

Searching for HTML elements in Chrome DevTools


On this website, there's a div with the attribute class="item". When I clicked F12 to bring up the Developer Tools. I pressed Ctrl + F and typed in class="item" and no results came back. I also tried Ctrl + Shift + F but nothing returned. Here is a screenshot:

enter image description here

Even if I search for class=, only text within HTML comments are found.


Solution

  • I searched for the XPath of the element instead and it worked:

    //*[@class="item"]