Clear all selected entries. This is only valid when the SELECT supports multiple selections. Thrown when attempting to deselect all options from a SELECT that does not support multiple selections.
()
| 252 | /// <exception cref="WebDriverException">Thrown when attempting to deselect all options from a SELECT |
| 253 | /// that does not support multiple selections.</exception> |
| 254 | public void DeselectAll() |
| 255 | { |
| 256 | if (!this.IsMultiple) |
| 257 | { |
| 258 | throw new InvalidOperationException("You may only deselect all options if multi-select is supported"); |
| 259 | } |
| 260 | |
| 261 | foreach (IWebElement option in this.Options) |
| 262 | { |
| 263 | SetSelected(option, false); |
| 264 | } |
| 265 | } |
| 266 | |
| 267 | /// <summary> |
| 268 | /// Deselect the option by the text displayed. |
no outgoing calls