* Schedule a command to find a descendant of this ShadowROot. 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 * fact
(locator)
| 3305 | * element will be invalidated and all scheduled commands aborted. |
| 3306 | */ |
| 3307 | findElement(locator) { |
| 3308 | locator = by.checkedLocator(locator) |
| 3309 | let id |
| 3310 | if (typeof locator === 'function') { |
| 3311 | id = this.driver_.findElementInternal_(locator, this) |
| 3312 | } else { |
| 3313 | let cmd = new command.Command(command.Name.FIND_ELEMENT_FROM_SHADOWROOT) |
| 3314 | .setParameter('using', locator.using) |
| 3315 | .setParameter('value', locator.value) |
| 3316 | id = this.execute_(cmd) |
| 3317 | } |
| 3318 | return new ShadowRootPromise(this.driver_, id) |
| 3319 | } |
| 3320 | |
| 3321 | /** |
| 3322 | * Locates all the descendants of this element that match the given search |
nothing calls this directly
no test coverage detected