[REGRESSION]: Tall screenshots in chromium get corrupted at bottom
See original GitHub issueContext:
- GOOD Playwright Version: 1.3.0
- BAD Playwright Version: 1.4.0
- Operating System: OSx mojave (10.14.5)
Code Snippet
This small project just takes a 1250*8440px screenshot of a div with a linear gradient to expose the problem.
const {chromium, webkit, firefox} = require('playwright');
const playwright = require("playwright");
const playwrightP = require("playwright/package.json");
const path = require("path");
const { cwd, exit } = require("process");
// allow await
(async () => {
const options = {
headless: true,
};
const chrome = await playwright["chromium"].launch(options);
const newPage = async (browser) => {
const context = await browser.newContext({
viewport: { width: 1280, height: 800 },
}),
page = await context.newPage();
return page;
};
newPage(chrome).then(async (page) => {
await page.evaluate((body) => {
const div = document.createElement("div");
div.style.width = "1250px";
div.style.height = "8440px";
div.style.background = "linear-gradient(#e66465, #9198e5)";
document.body.appendChild(div);
});
const divHandle = await page.$("div");
const dest = path.join(
process.cwd(),
"screenshots",
`${playwrightP.version}.png`
);
await divHandle.screenshot({ path: dest });
exit();
});
})();
Describe the bug
In Chromium, when the screenshot is taller than ~8200px then the bottom of the screenshot is a repeat of the top instead of whatever it is supposed to be.
screenshot with 1.3.0 screenshot with 1.4.0
I haven’t tried width wise if the same issue happens.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
90264 – [Regression, bisected] Tooltip corruption in Chrome
The screenshot I linked to is from the glowing-bear web IRC client, and I just need to mouse over 2 or 3 items...
Read more >1164757 - Capture full size screenshot is broken - Monorail
The resulting screenshot pixel dimensions are incorrect. That fact is observable at the clipped bottom of the image.
Read more >103 messages from Google Code - Google Groups
Re: Issue 115491 in chromium: Maps GL crashes and Chrome can't recover from the error ... Re: Issue 106139 in chromium: REGRESSION: Facebook...
Read more >How to take a scrolling screenshot on Chrome and Chrome OS
There are some options here for the pixel density (PPI), height, ... Another interesting approach to scrolling screenshots on Chrome and ...
Read more >439763 - New filter dialog broken - Bugzilla@Mozilla
I get a search dialog that fails. Main symptom: the "Search for messages in " field is always blank, regardless of what I...
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 FreeTop 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
Top GitHub Comments
For the record: upstream issue has been fixed in r817038.
@dgozman I don’t really as our use of playwright is for a visual regression tool which is used by a bunch of teams internally. I’ve discovered it with 8440px but could see people trying to screenshot apps with longer body. If there is a limitation in terms of allowing any size then knowing the max size will be good so we can work around it by splitting screenshots