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

Method setSelected

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

Select or deselect specified option @param option The option which state needs to be changed @param select Indicates whether the option needs to be selected (true) or deselected (false)

(WebElement option, boolean select)

Source from the content-addressed store, hash-verified

328 * @param select Indicates whether the option needs to be selected (true) or deselected (false)
329 */
330 private void setSelected(WebElement option, boolean select) {
331 assertOptionIsEnabled(option, select);
332 if (option.isSelected() != select) {
333 option.click();
334 }
335 }
336
337 /**
338 * @param text The visible text to match against. It can be a partial match of the option if

Callers 7

selectByValueMethod · 0.95
deselectAllMethod · 0.95
deselectByValueMethod · 0.95
deselectByVisibleTextMethod · 0.95
setSelectedByIndexMethod · 0.95
selectByVisibleTextMethod · 0.95

Calls 3

assertOptionIsEnabledMethod · 0.95
isSelectedMethod · 0.65
clickMethod · 0.65

Tested by

no test coverage detected