Articles by Vitalii Holben
Screenshot API rate limiting strategies in production
Most rate limiting guides only cover retry strategies. That's only half the problem. Five concrete strategies — proactive (token bucket, queue) and reactive (Retry-After, exponential backoff, circuit breaker) — with Node.js code.
Read more →Headless Chrome "net::ERR_CONNECTION_REFUSED" in Docker: causes and fixes
ERR_CONNECTION_REFUSED in headless Chrome inside Docker isn't one error — it's five different network problems sharing the same message. Diagnose with one curl from inside the container, then fix per cause.
Read more →How to take screenshots of pages with infinite scroll feeds
Infinite scroll pages don't have a bottom — so "scroll to the end, then screenshot" doesn't work by definition. Five strategies for deciding when to stop, with code for Puppeteer and Playwright.
Read more →Why your Puppeteer and Playwright screenshots come out blank or white
"Blank screenshot" isn't one problem — it's at least five different ones. Compare your image against five visual patterns to find the right cause and the right fix.
Read more →How to take screenshots of single-page applications (SPAs) correctly
SPAs break screenshot tools in their own way — content rendering across several phases, networkidle that never settles, hydration mismatches. Here are the five common problems and how to fix each.
Read more →Puppeteer "Protocol error (Page.captureScreenshot): Target closed": causes and fixes
Puppeteer's "Protocol error (Page.captureScreenshot): Target closed" almost always means Chromium crashed during the actual rendering — not before, not after. Here are the five real causes and how to fix each.
Read more →Playwright "Target page, context or browser has been closed": causes and fixes
Playwright's "Target page, context or browser has been closed" almost always comes from a lifecycle bug, not a Playwright bug. Here are the five real causes — from premature browser.close to Chromium crashes — and how to fix each.
Read more →Puppeteer "Navigation timeout of 30000 ms exceeded": causes and fixes
Puppeteer's "Navigation timeout of 30000 ms exceeded" rarely comes from a slow page. It comes from a waitUntil condition that never gets satisfied. Here are the five real causes and how to fix each.
Read more →Wait for page to fully load before screenshot: 4 strategies
I took a screenshot of a public dashboard and got back an image with empty tables. Here are four strategies to wait for a page to fully load, with a real Puppeteer walkthrough.
Read more →How to Generate PDF Invoices and Receipts from HTML Templates with a Screenshot API
Most SaaS apps eventually need to generate invoices programmatically, and most start with a PDF library that fights them on layout. Here's a simpler approach: build your invoice as plain HTML and CSS, then render it to PDF or PNG through Playwright or a screenshot API. Full template, code examples in Node.js, webhook automation with Stripe/Paddle, and tips on fonts, multi-currency formatting, and page breaks.
Read more →How to Use Screenshots for Visual Regression Testing in CI/CD
Visual regression testing catches the UI bugs that unit tests and functional tests miss entirely — broken layouts, shifted buttons, wrong colors. Here's how to build a screenshot-based visual testing pipeline that runs on every pull request, with real code and practical advice on dealing with flaky tests.
Read more →How to take website screenshots with Ruby — Selenium, Ferrum, and API
Ruby doesn't ship with a browser rendering engine, so taking website screenshots requires an external tool. This article covers three approaches — Selenium WebDriver with headless Chrome, Ferrum via DevTools Protocol, and the Screenshotrun API — with working code and a production comparison.
Read more →