Skip to content

Commit

Permalink
Break stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
DaemonCahill committed May 1, 2024
1 parent 4cd1376 commit 1f30a7f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/page-objects/screenshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ export default class ScreenshotPageObject extends BasePageObject {
const screenshot = options.viewportOnly ? await this.browser.takeScreenshot() : await this.fullPageScreenshot();
const image = await parsePng(screenshot);

const offset: ElementOffset = { top: box.top, left: box.left };
// const offset: ElementOffset = { top: box.top, left: box.left };
const offset: ElementOffset = {
top: 0,
left: 0,
};
if (!options.viewportOnly) {
// Correct potential scrolling offsets when using a full page screenshot
offset.top += top;
Expand Down

0 comments on commit 1f30a7f

Please sign in to comment.