Closed oliyh closed 5 years ago
Command / Dom / boxmodel of root node Has dimensions
Set dimensions using command / emulation / setDeviceMetricsOverride
There are other things to set, see https://jonathanmh.com/taking-full-page-screenshots-headless-chrome/
Also ensure to get body node, not root node
Weirdly seems to not be an issue on Windows, or maybe that's just older Chrome.
In any case it seems the suggested method is to read the document size and then set the screenshot to be that size explicitly.