workaround for cropped viewport (Playwright regression), fixes #277

This commit is contained in:
Ralf Vogler 2023-12-28 17:56:09 +01:00
parent 7ca79bd413
commit c3657f05ac
5 changed files with 5 additions and 0 deletions

View file

@ -41,6 +41,7 @@ await stealth(context);
if (!cfg.debug) context.setDefaultTimeout(cfg.timeout);
const page = context.pages().length ? context.pages()[0] : await context.newPage(); // should always exist
await page.setViewportSize({ width: cfg.width, height: cfg.height }); // TODO workaround for https://github.com/vogler/free-games-claimer/issues/277 until Playwright fixes it
// some debug info about the page (screen dimensions, user agent, platform)
// eslint-disable-next-line no-undef