The parent WebDriver instance for this element.
A promise that will resolve to the promised element.
Readonly
[toAttaches a callback for only the rejection of the Promise.
Optional
onrejected: null | ((reason) => TResult | PromiseLike<TResult>)The callback to execute when the Promise is rejected.
A Promise for the completion of the callback.
Schedules a command that targets this element with the parent WebDriver instance. Will ensure this element's ID is included in the command parameters under the "id" key.
The command to schedule.
A promise that will be resolved with the result.
WebDriver#schedule
Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.
Optional
onfinally: null | (() => void)The callback to execute when the Promise is settled (fulfilled or rejected).
A Promise for the completion of the callback.
Schedule a command to find a descendant of this ShadowROot. If the element cannot be found, the returned promise will be rejected with a error.NoSuchElementError NoSuchElementError.
The search criteria for an element may be defined using one of the static factories on the by.By class, or as a short-hand ./by.ByHash object. For example, the following two statements are equivalent:
var e1 = shadowroot.findElement(By.id('foo'));
var e2 = shadowroot.findElement({id:'foo'});
You may also provide a custom locator function, which takes as input this instance and returns a WebElement, or a promise that will resolve to a WebElement. If the returned promise resolves to an array of WebElements, WebDriver will use the first element. For example, to find the first visible link on a page, you could write:
var link = element.findElement(firstVisibleLink);
function firstVisibleLink(shadowRoot) {
var links = shadowRoot.findElements(By.tagName('a'));
return promise.filter(links, function(link) {
return link.isDisplayed();
});
}
The locator strategy to use when searching for the element.
A WebElement that can be used to issue commands against the located element. If the element is not found, the element will be invalidated and all scheduled commands aborted.
Locates all of the descendants of this element that match the given search criteria.
The locator strategy to use when searching for the element.
A promise that will resolve to an array of WebElements.
Attaches callbacks for the resolution and/or rejection of the Promise.
Optional
onfulfilled: null | ((value) => TResult1 | PromiseLike<TResult1>)The callback to execute when the Promise is resolved.
Optional
onrejected: null | ((reason) => TResult2 | PromiseLike<TResult2>)The callback to execute when the Promise is rejected.
A Promise for the completion of which ever callback is executed.
Static
extractStatic
isGenerated using TypeDoc
Implement ShadowRootPromise