YusukeIwaki / puppeteer-ruby

A Ruby port of Puppeteer
Apache License 2.0
290 stars 41 forks source link

Explicitly set captureBeyondViewport=false unless fullPage or clip is set #299

Closed YusukeIwaki closed 1 year ago

YusukeIwaki commented 1 year ago

resolves #298

Puppeteer.launch do |browser|
  page = browser.new_page
  page.viewport = Puppeteer::Viewport.new(width: 1280, height: 800)
  page.goto('https://github.com/YusukeIwaki')
  page.screenshot(path: 'YusukeIwaki.png', full_page: false)
end

outputs the image below YusukeIwaki