Skip to content

Instantly share code, notes, and snippets.

@cbfrance
Created July 10, 2015 01:26
Show Gist options
  • Save cbfrance/346651208dce27157109 to your computer and use it in GitHub Desktop.
Save cbfrance/346651208dce27157109 to your computer and use it in GitHub Desktop.
screenshotting with our smartshot gem for multilingual QA
require "smartshot"
# see the capybara + poltergeist options listed at:
# https://github.com/teampoltergeist/poltergeist#taking-screenshots-with-some-extensions
fetcher = Smartshot::Screenshot.new(window_size: [1200, 900])
urls = ['meedan.com','meedan.checkdesk.org/en', 'meedan.checkdesk.org/ar']
urls.each do |u|
fetcher.take_screenshot! url: "http://#{u}", output: "./screenshots/#{u}.png", sleep: 10, timeout: 30, full: false
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment