← 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"?
- A.//td[text()='Neha']/parent::td
- B.//td[text()='Neha']/following-sibling::td
- C.//td[@value='Neha']
- 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 →