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

Method findElements

javascript/selenium-webdriver/lib/webdriver.js:3330–3341  ·  view source on GitHub ↗

* Locates all the descendants of this element that match the given search * criteria. * * @param {!(by.By|Function)} locator The locator strategy to use when * searching for the element. * @return {!Promise<!Array<!WebElement>>} A promise that will resolve to an * array of

(locator)

Source from the content-addressed store, hash-verified

3328 * array of WebElements.
3329 */
3330 async findElements(locator) {
3331 locator = by.checkedLocator(locator)
3332 if (typeof locator === 'function') {
3333 return this.driver_.findElementsInternal_(locator, this)
3334 } else {
3335 let cmd = new command.Command(command.Name.FIND_ELEMENTS_FROM_SHADOWROOT)
3336 .setParameter('using', locator.using)
3337 .setParameter('value', locator.value)
3338 let result = await this.execute_(cmd)
3339 return Array.isArray(result) ? result : []
3340 }
3341 }
3342
3343 getId() {
3344 return this.id_

Callers

nothing calls this directly

Calls 3

execute_Method · 0.95
findElementsInternal_Method · 0.80
setParameterMethod · 0.80

Tested by

no test coverage detected