Skip to content

Instantly share code, notes, and snippets.

@olmstadfm
Created August 7, 2016 16:24
Show Gist options
  • Save olmstadfm/54a235739603fd96c248623092d19742 to your computer and use it in GitHub Desktop.
Save olmstadfm/54a235739603fd96c248623092d19742 to your computer and use it in GitHub Desktop.
watir + chrome + headless
require 'watir-webdriver'
require 'headless'
headless = Headless.new
headless.start
browser = Watir::Browser.new :chrome
browser.goto 'ya.ru'
browser.screenshot.save 'screenshot.png'
puts browser.title
browser.close
headless.destroy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment