.getShadowRoot() Suggest edits
Since: 2.0.0Returns the shadowRoot
read-only property which represents the shadow root hosted by the element. This can further be used to retrieve elements part of the shadow root element.
Usage
browser.getShadowRoot(selector, [callback])
browser.getShadowRoot(selector)
Example
Or run locally with:
Parameters
Name | Type | description |
---|---|---|
using Optional |
string | The locator strategy to use. See W3C Webdriver - locator strategies |
selector |
string|object|WebElement|By | The selector (CSS/Xpath) used to locate the element. Can either be a string or an object which specifies element properties. |
callback |
function | Callback function which is called with the result value. |