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

Method deselectAll

javascript/selenium-webdriver/lib/select.js:349–361  ·  view source on GitHub ↗

* Deselects all selected options * @returns {Promise }

()

Source from the content-addressed store, hash-verified

347 * @returns {Promise<void>}
348 */
349 async deselectAll() {
350 if (!this.isMultiple()) {
351 throw new Error('You may only deselect all options of a multi-select')
352 }
353
354 const options = await this.getOptions()
355
356 for (let option of options) {
357 if (await option.isSelected()) {
358 await option.click()
359 }
360 }
361 }
362
363 /**
364 *

Callers

nothing calls this directly

Calls 4

isMultipleMethod · 0.95
getOptionsMethod · 0.95
isSelectedMethod · 0.65
clickMethod · 0.65

Tested by

no test coverage detected