🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Locators: all 10 questions

Quiz: Locators · Question 3 of 10

What can XPath do that CSS selectors cannot?

What can XPath do that CSS selectors cannot?

  1. A.Find by id
  2. B.Find by attribute
  3. C.Match an element by its visible text and move up to a parent
  4. D.Find descendants
Answer & explanation

Correct answer: Match an element by its visible text and move up to a parent

CSS can't select by text or go upward.

Can you get the rest right without peeking?

Take the timed Quiz: Locators quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →