Method
SetSelected
(IWebElement option, bool select)
Source from the content-addressed store, hash-verified
| 433 | } |
| 434 | |
| 435 | private static void SetSelected(IWebElement option, bool select) |
| 436 | { |
| 437 | if (select && !option.Enabled) |
| 438 | { |
| 439 | throw new InvalidOperationException("You may not select a disabled option"); |
| 440 | } |
| 441 | |
| 442 | bool isSelected = option.Selected; |
| 443 | if ((!isSelected && select) || (isSelected && !select)) |
| 444 | { |
| 445 | option.Click(); |
| 446 | } |
| 447 | } |
| 448 | } |
Callers
nothing calls this directly
Tested by
no test coverage detected