Skip to content

Commit

Permalink
fix wait to paint on screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Lazar committed Nov 4, 2024
1 parent 11094b7 commit deb603f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libs/playwright-interface/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mapgrab/playwright",
"version": "0.0.2",
"version": "0.0.3",
"description": "The playwright interface to MapGrab",
"repository": {
"type": "git",
Expand Down
2 changes: 2 additions & 0 deletions libs/playwright-interface/src/lib/map-locator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ export class MapLocator {
);
}

await this.waitToMapStable();

const bbox = await this.boundingBox({ padding: opts?.padding, offset: opts?.offset, relativeTo: 'rootWindow' }),
screenshot = await this.page.screenshot({ clip: bbox, fullPage: true });

Expand Down

0 comments on commit deb603f

Please sign in to comment.