rubycdp / ferrum

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

feat: Supports capture area screenshot #410

Closed erickgskovik closed 11 months ago

erickgskovik commented 1 year ago

Fixes #389

I made selector and area optional arguments. In the implementation, I think that the pull requests shows the true intention of the screenshot region.

If full: true, It tries to capture full screenshot with full size browser window and then viewport if the full size is not accurate. If full: false, :selector is preferred if defined. Then :area. Otherwise, the default will be the viewport.

Applying default scale (1.0) will not affect the result anyway.

sandstrom commented 11 months ago

@route friendly ping 😄

route commented 11 months ago

I'm back and going one by one from top to bottom ;)

route commented 11 months ago

Thanks, nice job!