How to take full page screenshot of backoffice page using Playwright

Hi

I’m trying to do some automated screenshots of pages in the backoffice. I can get them to work but they don’t do the full page.

await page.screenshot({
            path: path.join(screenshotsDir, screenshotName),
            fullPage: true,
          });

Can anyone help please?

kind regards

Paul Seal

If using the NodeJS approach then its this

await page.screenshot({ path: 'screenshot.png', fullPage: true });

Or using .NET its this

await Page.ScreenshotAsync(new()
{
    Path = "screenshot.png",
    FullPage = true,
});

Docs