oliyh / kamera

UI testing via image comparison and devcards
91 stars 7 forks source link

Make screenshots full page on Linux #8

Closed oliyh closed 5 years ago

oliyh commented 5 years ago

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.

oliyh commented 5 years ago

Command / Dom / boxmodel of root node Has dimensions

Set dimensions using command / emulation / setDeviceMetricsOverride

oliyh commented 5 years ago

There are other things to set, see https://jonathanmh.com/taking-full-page-screenshots-headless-chrome/

oliyh commented 5 years ago

Also ensure to get body node, not root node