As you might have recognized, you could use document.getElementById(‘NiceElementID’) for iframe selection as well.
A more complex example is the following one, which selects the iframe inside the right preview pane of this page:
As you can see, this technique also works within cascaded iframes.
One thought on “Create Screenshot of an scrollable iframe”
Nice solution. But unfortunately it doesn’t work in all cases. (Only prints 1st page on the iframe on my page: https://pmk65.github.io/jedemov2/dist/demo.html)
Another way to use it, is to create a bookmarklet, and add it as a browser bookmark: