UI Shadow Root (sui:shadow-root)
UI Shadow Root (sui:shadow-root)
The ShadowRoot interface of the Shadow DOM API is the root node of a DOM subtree that is rendered separately from a document's main DOM tree.
You can retrieve a reference to an element by defining the elemet below sui:shadow-root tag in the same way as for the non shadow root elements.
Usage
<sui:page id=""! schema="html">
<sui:shadow-root >
<div id=""! remoteId=""?>
<button id=""! attribute:xx=""? text=""? method=""? />
<element id=""! type=""? xPath=""? attribute:xx=""? method=""? />
<ul id=""? attribute:xx=""? method=""?>
<li id=""! attribute:xx=""? text=""? method=""? index=""? sibling=""? directChild=""? />
</ul>
</sui:shadow-root>
</sui:page>
! - mandatory, ? - optional
Example
HTML | CAST Page Object |
---|---|
<div remoteId="shadowDomComponent">
<h1 id="shadowDomComponentHeader" directChild="true"/>
<sui:shadow-root type="app-shadow-dom">
<button remoteId="shadowRootShowButton" id="shadowRootShowButton"/>
<button remoteId="shadowRootHideButton" id="shadowRootHideButton"/>
<div remoteId="petImageContainer">
<img id="shadowImage"/>
</div>
</sui:shadow-root>
</div> |
, multiple selections available,
Related content
Counting elements in shadow-root
Counting elements in shadow-root
More like this
UI Element State (sui:element-state)
UI Element State (sui:element-state)
More like this
UI Page Object (sui:page-object)
UI Page Object (sui:page-object)
More like this
UI Get Attribute (sui:get-attribute)
UI Get Attribute (sui:get-attribute)
More like this
UI Action key (sui:action-key)
UI Action key (sui:action-key)
Read with this
UI Get Text (sui:get-text)
UI Get Text (sui:get-text)
More like this