Clear all selected entries. This is only valid when the SELECT supports multiple selections. @throws UnsupportedOperationException If the SELECT does not support multiple selections
()
| 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 |