We’re trying to test chrome extension using selenium 4. Extension creates a shadow root (closed) using content scripts. We need to somehow verify elements inside of it.
I’ve seen these questions:
- /a/77243136/4142087 But this doesn’t work for us, as extension operates in its own context.
- /a/54954525/4142087 This is basically the same (it says, that chrome extension’s content scripts operate in their own context).
Having all the necessary permissions for tests, how could we make shadow root open or access closed.
[UPDATE] Not a direct solution, but since we currently don’t need to make some actions like clicks, reading data can be enough. If chrome inspection window can read internal html, could we dump html and verify it manually? For example using beautiful-soup