MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / deselectAll

Method deselectAll

java/src/org/openqa/selenium/support/ui/Select.java:204–214  ·  view source on GitHub ↗

Clear all selected entries. This is only valid when the SELECT supports multiple selections. @throws UnsupportedOperationException If the SELECT does not support multiple selections

()

Source from the content-addressed store, hash-verified

202 * @throws UnsupportedOperationException If the SELECT does not support multiple selections
203 */
204 @Override
205 public void deselectAll() {
206 if (!isMultiple()) {
207 throw new UnsupportedOperationException(
208 "You may only deselect all options of a multi-select");
209 }
210
211 for (WebElement option : getOptions()) {
212 setSelected(option, false);
213 }
214 }
215
216 /**
217 * Deselect all options that have a value matching the argument. That is, when given "foo" this

Calls 3

isMultipleMethod · 0.95
getOptionsMethod · 0.95
setSelectedMethod · 0.95