Skip to content

Instantly share code, notes, and snippets.

@nakajima
Created February 26, 2009 17:20
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 nakajima/dff2a429afff1c212416 to your computer and use it in GitHub Desktop.
Save nakajima/dff2a429afff1c212416 to your computer and use it in GitHub Desktop.
World do |world|
def take_screenshot!
Webrat.configuration.mode == :selenium ?
save_and_open_screengrab :
save_and_open_page
end ; world
end
When /^I take a screenshot$/ do
take_screenshot!
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment