Only reset session in selenium if browser is open

This commit is contained in:
Nicklas Ramhöj 2010-09-07 18:35:09 +02:00
parent 69b1d4ffdf
commit ce2f73fde0
1 changed files with 2 additions and 1 deletions

View File

@ -128,7 +128,8 @@ class Capybara::Driver::Selenium < Capybara::Driver::Base
end
def reset!
browser.manage.delete_all_cookies
# Use instance variable directly so we avoid starting the browser just to reset the session
@browser.manage.delete_all_cookies if @browser
end
def within_frame(frame_id)