Created
January 30, 2014 05:03
-
-
Save philtr/8702915 to your computer and use it in GitHub Desktop.
Save screenshot of a web page headlessly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'headless' | |
require 'selenium-webdriver' | |
Headless.ly(dimensions: "1920x1200x24") do | |
driver = Selenium::WebDriver.for :firefox | |
driver.navigate.to('http://hellohappy.org/beautiful-web-type/') | |
driver.save_screenshot('tmp/screenshot.png') | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment