Wait before taking screenshot with Ruby and Puppeteer

Install Puppeteer and Grover

npm i puppeteer
gem install grover

Configure Grover

Wait for the specified number of milliseconds before taking the screenshot.

require 'grover'

Grover.configure do |config|
  config.options = {
    wait_for_timeout: 3000

Take a screenshot and save to file

File.open("clip.png", "wb") do |f|

Find out how to take a full-page screenshot with Ruby and Puppeteer.

We created Urlbox to make converting HTML to images easy

Learn more about our website screenshot API.