I have a page that contains few document fragments. I want to get all elemnts from the page taht matches the selector, like this.
document.querySelectorAll('iframe')
But it no returns elements from inner document fragments. I found that I can use this:
hostElement.shadowRoot.querySelectorAll('iframe')
But I need all elements and have no idea what elements on page are hosts. How can I get all matched elements across document fragments from "top" doucment? I am using selenium webdriver, so if there is some solution related with it, it also would be enough.