MCPcopy Index your code
hub / github.com/SeleniumHQ/selenium / setSelected

Method setSelected

javascript/selenium-webdriver/lib/select.js:454–461  ·  view source on GitHub ↗
(option)

Source from the content-addressed store, hash-verified

452 }
453
454 async setSelected(option) {
455 if (!(await option.isSelected())) {
456 if (!(await option.isEnabled())) {
457 throw new error.UnsupportedOperationError(`You may not select a disabled option`)
458 }
459 await option.click()
460 }
461 }
462}
463
464function escapeQuotes(toEscape) {

Callers 5

selectByIndexMethod · 0.95
selectByValueMethod · 0.95
selectByVisibleTextMethod · 0.95
control.jsFile · 0.45
selectionmodel.jsFile · 0.45

Calls 3

isSelectedMethod · 0.65
isEnabledMethod · 0.65
clickMethod · 0.65

Tested by

no test coverage detected