* 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)
| 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_ |
nothing calls this directly
no test coverage detected