← 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"?
- A.selectByVisibleText("Web Development")
- B.selectByIndex("Web Development")
- C.sendKeys on the option
- 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 →