8.0.0 how to take a screenshot without blinking viewport
See original GitHub issueSteps to reproduce
Tell us about your environment:
- Puppeteer version: 8.0.0
- Platform / OS version: macOS
- URLs (if applicable): -
- Node.js version: 14
What steps will reproduce the problem?
Please include code that reproduces the issue.
- Open browser with changed
defaultViewport - Open page
- Take a screenshot
const browser = await puppeteer.launch({
headless: true,
defaultViewport: {
// MacBook PRO 13"
width: 1366,
height: 900,
deviceScaleFactor: 2,
},
});
const page = await browser.newPage();
await page.goto(link);
await page.screenshot({
type: 'jpeg',
quality: 80,
});
What is the expected result?
Normal screenshot as it was in version 6.0.0
What happens instead?
Sometimes it is ok, sometimes page is resized to some small dimension, sometimes screenshot it seems to taken in the middle of page resize O_o
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8
Top Results From Across the Web
How to enable/disable screenshot flash on ... - AddictiveTips
Open the Settings app. · Go to the Ease of Access group of settings. · Select the Display tab. · Look for the...
Read more >How to Take a Screenshot on Windows (7, 8, 10), and Save ...
Taking a screenshot with LightShot. To save the files, you can either press the save icon or use the Windows standard Ctrl +...
Read more >How to Enable/Disable Screenshot Flash on Windows 10
How to Enable/Disable Screenshot Flash on Windows 10. Windows 10 supports two different methods for taking screenshots ; PrntScrn, ...
Read more >1493742 - Flickering of (some) sticky elements on Twitter and ...
For some weeks I see some flickering and invalidating issue on some pages that use position:fixed (and maybe position: sticky too), while scrolling....
Read more >HelpScribble Version History
If you ever hit a snag with HelpScribble, check here whether you have the ... help compilers now shows its progress without flickering...
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

Setting
captureBeyondViewporttofalsesolves the issue: https://github.com/puppeteer/puppeteer/blob/v8.0.0/src/common/Page.ts#L1727-L1732How to set this option from
page.screenshot? 🤔We are closing this issue. If the issue still persists in the latest version of Puppeteer, please reopen the issue and update the description. We will try our best to accomodate it!