Skip to content

Instantly share code, notes, and snippets.

@tjsingleton
Created July 13, 2010 17:52
Show Gist options
  • Save tjsingleton/474236 to your computer and use it in GitHub Desktop.
Save tjsingleton/474236 to your computer and use it in GitHub Desktop.
# selenium-webclient does not clean up cookies unless your currently on that page.
module CookieRemover
def self.delete_all(path)
Capybara.current_session.driver.visit(path)
Capybara.reset_sessions!
end
end
After("@external-site") do
CookieRemover.delete_all("http://www.external-site.com")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment