shadow$$
Access elements inside a given element's shadowRoot. If you are working
with lots of nested shadow roots, an alternative approach to shadow$$
is to use the deep selector.
Usage
$(selector).shadow$$(selector)
Parameters
Name | Type | Details |
---|---|---|
selector | String , Function | selector or JS Function to fetch a certain element |
Example
shadow$$.js
it('should return elements inside a shadowRoot', async () => {
const innerEl = await $('.input').shadow$$('#innerEl');
console.log(await innerEl.getValue()); // outputs: 'test123'
});