← 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?
- A.Find by id
- B.Find by attribute
- C.Match an element by its visible text and move up to a parent
- 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 →