🎙 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 2 of 10

Which XPath finds the marks cell next to the cell containing "Neha"?

Which XPath finds the marks cell next to the cell containing "Neha"?

  1. A.//td[text()='Neha']/parent::td
  2. B.//td[text()='Neha']/following-sibling::td
  3. C.//td[@value='Neha']
  4. D./html/body/table/tr[3]/td[2]
Answer & explanation

Correct answer: //td[text()='Neha']/following-sibling::td

following-sibling moves to the next cells in the same row.

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 →