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

Method findElements

javascript/selenium-webdriver/lib/webdriver.js:2679–2690  ·  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

2677 * array of WebElements.
2678 */
2679 async findElements(locator) {
2680 locator = by.checkedLocator(locator)
2681 if (typeof locator === 'function') {
2682 return this.driver_.findElementsInternal_(locator, this)
2683 } else {
2684 let cmd = new command.Command(command.Name.FIND_CHILD_ELEMENTS)
2685 .setParameter('using', locator.using)
2686 .setParameter('value', locator.value)
2687 let result = await this.execute_(cmd)
2688 return Array.isArray(result) ? result : []
2689 }
2690 }
2691
2692 /**
2693 * Clicks on this element.

Callers

nothing calls this directly

Calls 3

execute_Method · 0.95
findElementsInternal_Method · 0.80
setParameterMethod · 0.80

Tested by

no test coverage detected