Skip to content

Instantly share code, notes, and snippets.

@bfaloona
Created December 28, 2009 08:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bfaloona/264588 to your computer and use it in GitHub Desktop.
Save bfaloona/264588 to your computer and use it in GitHub Desktop.
screenshot of active window from watir
require 'watir/screen_capture'
include Watir::ScreenCapture
# http://wtr.rubyforge.org/rdoc/classes/Watir/ScreenCapture.html
screen_capture('screenshot.jpg', true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment