Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jan 20, 2023

Conversation

YusukeIwaki
Copy link
Owner

@YusukeIwaki YusukeIwaki commented Jan 20, 2023

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

@YusukeIwaki YusukeIwaki merged commit 3b91cd9 into main Jan 20, 2023
@YusukeIwaki YusukeIwaki deleted the fix-298 branch January 20, 2023 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

screenshots with full_page: false are returning full page screenshots
1 participant