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

Method findElements

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

2803 * array of WebElements.
2804 */
2805 async findElements(locator) {
2806 locator = by.checkedLocator(locator)
2807 if (typeof locator === 'function') {
2808 return this.driver_.findElementsInternal_(locator, this)
2809 } else {
2810 let cmd = new command.Command(command.Name.FIND_CHILD_ELEMENTS)
2811 .setParameter('using', locator.using)
2812 .setParameter('value', locator.value)
2813 let result = await this.execute_(cmd)
2814 return Array.isArray(result) ? result : []
2815 }
2816 }
2817
2818 /**
2819 * 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