Skip to content
CodeKruPro

deselectAll() on a single-choice dropdown (Java)

QuizMediumJava only

The dropdown allows only one choice (it has no multiple attribute). What does new Select(dropdown).deselectAll() do?

  • It throws UnsupportedOperationException
  • It clears the selection and shows the placeholder
  • It does nothing and returns
  • It selects every option

This question is part of Pro+

Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.

See Pro+

Already have Pro+? Sign in