How to Take a Full-Page Screenshot with Vibium
Capture an entire scrolling web page as a single PNG with Vibium in Python — the full-page screenshot pattern, runnable code, and a step-by-step breakdown.
To take a full-page screenshot with Vibium, launch the browser, go() to the URL, then call screenshot(full_page=True) to get PNG bytes of the entire scrolling page and write them to a file. Vibium auto-waits for the page to load, so the capture is complete and not half-rendered. The whole thing is about eight lines of Python.
What is the full-page screenshot script?
from vibium import browser_sync as browser
vibe = browser.launch()
vibe.go("https://example.com")
png = vibe.screenshot(full_page=True)
with open("full-page.png", "wb") as f:
f.write(png)
vibe.quit()Run it and you get a full-page.png in your working directory. No driver setup, no Chrome download step — Vibium is a single Go binary that pulls its own browser on first run.
How does each line work?
browser.launch()— starts Chrome over WebDriver BiDi and returns avibeobject you drive the page with.vibe.go(url)— navigates and returns once the load event fires, so you are not screenshotting a blank page.vibe.screenshot(full_page=True)— captures the full scrolling document (not just the viewport) and returns it as PNG bytes. Vibium hands you the raw data instead of hiding it behind a file path. Drop thefull_pageflag and you get just the visible viewport.open(...).write(png)— you decide where the bytes land: disk, an upload, or an in-memory buffer.vibe.quit()— closes the browser and cleans up the process.
The key idea: because screenshot() returns bytes, the image is trivial to pipe somewhere else — a visual-regression baseline, an S3 object, or an AI vision model for verification.
How do I capture the entire scrolling page?
Pass full_page=True to screenshot(). Vibium captures the whole document from top to bottom — everything below the fold included — instead of just the visible viewport. (In the JavaScript client the same option is screenshot({ fullPage: true }).)
from vibium import browser_sync as browser
vibe = browser.launch()
vibe.go("https://example.com/long-article")
png = vibe.screenshot(full_page=True)
with open("article-full.png", "wb") as f:
f.write(png)
vibe.quit()Vibium's auto-wait on go() returns once the load event fires, so most pages are ready to capture. If extra content streams in after load, wait for a late-rendering element before you capture — for example, find the footer and read its text, which makes Vibium wait for that element to be present:
footer = vibe.find("footer")
footer.text() # waits for the footer, then you can screenshot(full_page=True)Can I screenshot just one element?
Yes. Find the element first, then call screenshot() on it to capture only that region — handy for grabbing a single card, chart, or hero banner:
header = vibe.find("h1")
png = header.screenshot()
with open("header.png", "wb") as f:
f.write(png)When should you use full-page screenshots?
- Visual regression — capture a baseline image and diff it on every deploy.
- Bug reports — attach the exact state of the page when something breaks.
- AI verification — pass the PNG bytes to a vision model and ask whether the layout looks right.
Next steps
Frequently asked questions
How do I take a full-page screenshot with Vibium?
Launch the browser, navigate with go(), then call screenshot() to get PNG bytes of the rendered page and write them to a .png file. Vibium waits for the page to load before capturing, so you get a clean, complete image.
Does Vibium capture the whole scrolling page or just the viewport?
A plain screenshot() captures the current viewport. To grab the entire scrolling document beyond the fold, pass full_page=True: screenshot(full_page=True). Vibium returns raw PNG bytes either way, so you control exactly where the image is saved.
What format does Vibium use for screenshots?
Vibium returns screenshots as PNG image bytes. You write those bytes straight to a .png file, or stream them to an S3 bucket, a visual-diff tool, or a vision model without ever touching the disk.
Vibium is created by Jason Huggins. This is an independent tutorial — see the official Vibium site and GitHub repo for canonical docs.
Related guides
How to Download a File with Vibium
Trigger and save a browser download with Vibium in Python — use capture.download() to grab the file, read its name, and save it with save_as().
2 min read→How-To RecipesHow to Fill and Submit a Form with Vibium
Automate an HTML form with Vibium in Python — type into text fields, check boxes, pick dropdown options, submit, and verify the result with auto-waiting.
2 min read→How-To RecipesHow to Scrape a Table with Vibium
Extract rows and cells from an HTML table with Vibium in Python — find the rows with findAll(), read each cell's text with a scoped find, and build clean structured data.
3 min read→How-To RecipesHow to Test a Single-Page App (SPA) with Vibium
Test a React, Vue, or Angular SPA with Vibium in Python — handle client-side routing, wait for async content, and assert on dynamically rendered elements.
3 min read→