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

Quiz: Web Elements · Question 7 of 10

Which Select method picks the option a user sees as "Web Development"?

Which Select method picks the option a user sees as "Web Development"?

  1. A.selectByVisibleText("Web Development")
  2. B.selectByIndex("Web Development")
  3. C.sendKeys on the option
  4. D.selectByValue("Web Development") always
Answer & explanation

Correct answer: selectByVisibleText("Web Development")

selectByValue uses the value attribute, which may differ from the visible text.

Can you get the rest right without peeking?

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

Start the quiz →