a convenience in API to locate an element in the (open) shadow dom
Is your feature request related to a problem? Please describe.
We use Custom Elements (with open mode for shadow root) Would be nice if there was a convenience to locate these elements for testing with Flood Element api.
Describe the solution you'd like
Maybe a special selector, like that provided with Stencil JS? https://stenciljs.com/docs/end-to-end-testing#find-an-element-in-the-shadow-dom
// Use the "piercing" selector >>> to query for an object inside a component's shadow root:
const el = await page.find('foo-component >>> .close-button');
Describe alternatives you've considered
Could use Browser.evaluate to find the element with js by getting element.shadowRoot and running a querySelector on that.
Hi @evaneus, we'll release this soon but for now, you can work around by the following: https://www.npmjs.com/package/query-selector-shadow-dom, they have some examples at https://github.com/Georgegriff/query-selector-shadow-dom/blob/master/examples/puppeteer. Thanks
How do we apply this solution to Flood Element 2.0? I cannot figure out how to register a custom selector with the 'browser' model versus the 'page' model.