Skip to content

Instantly share code, notes, and snippets.

@rgarver
Created August 14, 2010 17:41
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 rgarver/524520 to your computer and use it in GitHub Desktop.
Save rgarver/524520 to your computer and use it in GitHub Desktop.
# When in @javascript mode this will simulate clicking the back button on the browser. Uses capybara.
Then /^(?:|I )click the browser(?:|\'s)? back button$/ do
page.execute_script("history.back()")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment