Skip to content
CodeKruPro

deselect_all() and is_multiple on a single-choice dropdown (Python)

QuizMediumPython only

A dropdown has no multiple attribute. What do Select(el).is_multiple and Select(el).deselect_all() give?

  • is_multiple is a falsy value (one that counts as false in an if test; None in 4.47) and deselect_all() raises NotImplementedError
  • is_multiple is False and deselect_all() clears the choice
  • Both raise UnexpectedTagNameException
  • is_multiple is True for every select element

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