Fix weird offset bug in screenshots

This commit is contained in:
Jordan Eldredge 2018-08-02 20:41:53 -07:00
parent 3ef93e28ab
commit 1f4e4b3a03

View file

@ -68,7 +68,9 @@ class Shooter {
});
await this._page.screenshot({
path: screenshotPath,
omitBackground: true // Make screenshot transparent
omitBackground: true, // Make screenshot transparent
// https://github.com/GoogleChrome/puppeteer/issues/703#issuecomment-366041479
clip: { x: 0, y: 0, width: 275, height: 116 * 3 }
});
console.log("Wrote screenshot to", screenshotPath);
if (minify) {