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