Puppeteer - Use a modern scroll method for screenshot stitching

This commit is contained in:
dgtlmoon
2026-02-18 10:01:22 +01:00
committed by GitHub
parent a6e55aaba9
commit 352c91c619
@@ -86,8 +86,8 @@ async def capture_full_page(page, screenshot_format='JPEG', watch_uuid=None, loc
# better than scrollTo incase they override it in the page
await page.evaluate(
"""(y) => {
document.documentElement.scrollTop = y;
document.body.scrollTop = y;
const el = document.scrollingElement;
if (el) el.scrollTop = y;
}""",
y
)