webdriverio/query-selector-shadow-dom

Playwright example not similar to Playwright "Custom Selector Engine" docs

thernstig opened this issue · 3 comments

References:
https://github.com/microsoft/playwright/blob/master/docs/api.md#selectorsregistername-script
https://github.com/microsoft/playwright/blob/master/docs/selectors.md#custom-selector-engines

Both show the API like await selectors.register('tag', createTagNameEngine); but the docs here show await playwright.selectors.register(selectorEngine, { name: 'shadow' }). The inconsistency is how the name and engine is set and in which order.

Actually I see that what you have now is correct! See:
https://github.com/microsoft/playwright/blob/v0.11.1/docs/api.md#class-selectors

I assume the above code from master is how it soon will look. I assume it'd be good to keep this issue open to track that change?

Sure keep it open :)

Closing as playwright custom selector engine is not really needed anymore, since playwright added their own awesome shadow dom support