tested HTML:
<select>
<option value="html">html</option>
<option value="css">css</option>
<option value="JavaScript">JavaScript</option>
<option value="php">php</option>
</select>
there's no method like
isMultiple()
under Classselenium.webdriver.support.select.Select(webelement)
, also noselect_all()
methodwhen I select these 4 options one by one
Select(lang).select_by_visible_text("html")
Select(lang).select_by_visible_text("css")
Select(lang).select_by_visible_text("JavaScript")
Select(lang).select_by_visible_text("php")
and then try to get all selected options
Select(lang).all_selected_options
I can only get the last option 'php', which means when I select one option, the other one is deselected automatically. What's the meaning of all_selected_options
, options
is useful enough. And I can't deselect any option as there's only one selected, an error reported:
NotImplementedError: You may only deselect options of a multi-select