[Question] FullPageScreenshot is not capturing the full page
See original GitHub issueHi - I have the following script to capture the full page screenshot
@Test
public void googleTest(){
Playwright playwright = Playwright.create();
BrowserType.LaunchOptions launchOptions = new BrowserType.LaunchOptions();
launchOptions.setHeadless(false)
.setChannel(BrowserChannel.CHROME);
Browser browser = playwright.chromium().launch(launchOptions);
BrowserContext browserContext = browser.newContext();
Page page = browserContext.newPage();
page.navigate("https://google.com");
page.click("text=I agree");
System.out.println(page.title());
page.screenshot(new Page.ScreenshotOptions()
.setPath(Paths.get("colosseum-pixel2.png"))
.setFullPage(true)
);
}
The script runs fine and it takes the screenshot at the end. But the screenshot is not full page. Please refer attached the screenshot.
I am running this script using Playwright 1.10.0 OS - Ubuntu 20.04.2
Issue Analytics
- State:
- Created 2 years ago
- Comments:18 (9 by maintainers)
Top Results From Across the Web
Full Page Screenshot function not working. - Apple Community
I took a screenshot from safari to take a full page but it does not give me the option to a full page....
Read more >Not able to run puppeteer-full page screenshot npm package
You need to call the default() function of fullPageScreenshot to make it work: import puppeteer from 'puppeteer'; import fullPageScreenshot ...
Read more >iPhone: Fix Full-Page Screenshots on Safari Not Working ...
Learn how you can fix the full page screenshots on Safari not working or the option is missing on iPhone.Gears I use:iPhone 13...
Read more >screenshot enabled … but does not 'capture' full page.
There seems to be a size limit for full page screenshots, so a very very large page a full page screenshot won't work...
Read more >Full page screenshot does not work properly when a ... - GitHub
I'm suppose the best way to capture that page is to just capture the fixed position item at the end of the page....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Below is a simple test (using 1.11.0) that illustrates the issue.
Here’s the images outputted: https://imgur.com/a/O3C0Dw7
I can confirm that this is happening. It looks like the viewport gets squashed right before the screenshot is rendered