rubycdp / ferrum

Headless Chrome Ruby API
https://ferrum.rubycdp.com
MIT License
1.69k stars 120 forks source link

Allows set viewport for screenshot #406

Closed erickgskovik closed 9 months ago

erickgskovik commented 9 months ago

During screenshots, I found the window bounds doesn't change how the screenshot looks like.

And from my simple test for screenshoting a long page around 40000px height, Emulation.setDeviceMetricsOverride (8s) with deviceScaleFactor is faster than scale in Page.captureScreenshot (12s).

Fixes #389.

route commented 9 months ago

Looking good, thx!

erickgskovik commented 9 months ago

Thanks! I have last one for #screenshot that I need some time to work on.