76

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.

starball
  • 20,030
  • 7
  • 43
  • 238
dayuloli
  • 16,205
  • 16
  • 71
  • 126

6 Answers6

44

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

//*[@class="item"]

informatik01
  • 16,038
  • 10
  • 74
  • 104
dayuloli
  • 16,205
  • 16
  • 71
  • 126
  • XPath is hard. It is essentially a programming language. It is not suitable for routine needs like "this particular image fails to lazyload, I must find it by a string present in one of its attributes, but I don't know which one exactly because this is what I am yet to debug". – Szczepan Hołyszewski Jun 21 '22 at 11:16
18

Late answer but pretty sure .item would've worked.

Amauri
  • 540
  • 3
  • 15
8

Search bar only supports string, CSS selectors or XPath selectors.

I recommend you use CSS selectors: [class="item"]

innomerphey
  • 191
  • 2
  • 5
1

Just use CSS selectors. Just .item would work here.

If you need some particular element with a specific class name, just do div.item.

Custom attributes work, too: a[aria-label="Test Text"].

KulaGGin
  • 943
  • 2
  • 12
  • 27
0

Dayuloli's fix is a good one, you can also just search for "item" although that won't work if there are multiple classes on that element.

Ben Crook
  • 607
  • 9
  • 15
-1

This seems like it might be a bug. You can report it on http://crbug.com.

If you were to search for 'item' you should be able to find the elements that have the class item on them.

jaredwilli
  • 11,762
  • 6
  • 42
  • 41