Replies: 1 comment 1 reply
-
See the existing thread here: #3362 (comment). |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey,
We’re trying to capture full-page screenshots in headed Chrome (not headless), using SeleniumBase/Selenium with Python in a Robot Framework setup. Here are the few ways that I have tried
Produces accurate full-page screenshots, but becomes unstable under load. We’ve encountered intermittent CDP socket failures and driver crashes on heavier or slower-rendering pages.
Resize + driver.save_screenshot() using scrollHeight/scrollWidth
This approach works in headless mode only. In headed mode, Chrome silently clips the output to the visible viewport, even after resizing.
Scroll-and-stitch approaches (manual or JS-based)
These are inconsistent and often fail on complex pages, especially those with sticky headers, floating elements, or dynamically loaded sections. Issues observed include duplicate content, overlapping, or cropped results.
SeleniumBase save_screenshot(..., selector="body")
This works well in some cases, but on some sites the resulting screenshot is mostly blank or missing content, likely due to the selector not including the visible layout.
Also, this method uses CDP internally via activate_cdp_mode(), so it may inherit the same CDP stability issues under load.
Is there a more reliable technique or any enhancement to the above methods that you'd recommend for capturing full-page screenshots in headed Chrome?
Beta Was this translation helpful? Give feedback.
All reactions