* Schedule a command to find a descendant of this element. If the element * cannot be found, the returned promise will be rejected with a * plain error.NoSuchElementError NoSuchElementError. * * The search criteria for an element may be defined using one of the static * factori
(locator)
| 2654 | * element will be invalidated and all scheduled commands aborted. |
| 2655 | */ |
| 2656 | findElement(locator) { |
| 2657 | locator = by.checkedLocator(locator) |
| 2658 | let id |
| 2659 | if (typeof locator === 'function') { |
| 2660 | id = this.driver_.findElementInternal_(locator, this) |
| 2661 | } else { |
| 2662 | let cmd = new command.Command(command.Name.FIND_CHILD_ELEMENT) |
| 2663 | .setParameter('using', locator.using) |
| 2664 | .setParameter('value', locator.value) |
| 2665 | id = this.execute_(cmd) |
| 2666 | } |
| 2667 | return new WebElementPromise(this.driver_, id) |
| 2668 | } |
| 2669 | |
| 2670 | /** |
| 2671 | * Locates all the descendants of this element that match the given search |
nothing calls this directly
no test coverage detected