I'm using Puppeteer to take automated screenshots of webpages for regression tests. Puppeteer allows you to set the viewport size by passing a height and width to it.
Instead of passing a static height (for example, '1080' pixels), is it possible for Puppeteer to automatically set the height to be the full height of the content that is rendered?
For example, let's say you have a webpage that is 3000px height when the viewport is 1000px wide. In a normal non-headless browser on your desktop it would require vertical scrolling to reach the bottom of the page. Can puppeteer automatically determine this maximum 100% height of the page when the content is rendered? That way I can take a screenshot of the ENTIRE page no matter how tall it is?
With fullPage option I am taking screenshots of webpages to the 100% height of the page independent from viewport height.
await page.screenshot({path: "./blabla/blablalbal.png", fullPage: true})
https://devdocs.io/puppeteer/ says:
fullPage <boolean> When true, takes a screenshot of the full scrollable page. Defaults to false.