[Bug]: page.screenshot with a width set via setViewport, returns an image px narrower than expected
Closed this issue · 2 comments
KoanLeeroy commented
Bug description
Steps to reproduce the problem:
const page = await browser.newPage();
await page.setCacheEnabled(false);
await page.setViewport({ width: 1000, height: 1 });
const response = await page.goto("https://www.google.com");
await page.screenshot({ fullPage: true, omitBackground: true });
The screenshot returned is 990px wide. Other URL's exhibit the same behaviour.
Puppeteer version
latest Cloudflare puppeteer version
Node.js version
Workers
npm version
Workers
What operating system are you seeing the problem on?
Linux
Relevant log output
No response
rahulkumarsingh73690 commented
+1 also height doesn't work
danielgek commented
@KoanLeeroy and @rahulkumarsingh73690 fixed in the latest release