I am new to puppeteer, so forgive if this is a noob mistake.
puppeteer versions: 6.0.0 / 9.0.0 / 10.0.0
I am taking a page.screenshot with puppeteer in headless:false mode. For a flicker of a second the viewport seems to resize (gets almost half as small) in the moment it takes the screenshot, and then we are back to full size until the next screenshot.
These are my relevant code bits:
const browser = await puppeteer.launch({
args: ['--disable-features=site-per-process'],
ignoreDefaultArgs: ["--hide-scrollbars"],
headless: false
});
...
await page.setViewport({
width: 1000,
height: 500,
deviceScaleFactor: 1
});
...
await page.screenshot({
encoding: "base64",
captureBeyondViewport: false
});
I have found this issue online, which they claim to have fixed though if you set captureBeyondViewport: false : https://github.com/puppeteer/puppeteer/issues/7043
I have tested with three different version of puppeteer (see above). The flickering behavior happens everywhere. Is there something I am doing wrong here?