Only reset session in selenium if browser is open
This commit is contained in:
parent
69b1d4ffdf
commit
ce2f73fde0
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue