简体   繁体   中英

Prevent to close browser after @After

I am trying to prevent browser to close after my test scenario, I have tried several things found from online resources but nothing worked so far.

The goal is to prevent the browser to get closed and keep manually from a certain point, like a 'checkpoint', is there any way to do this?

I have tried :

@After("@leave_window_open")

but seems it is working only if the Scenario is failing.

is there any simple way to block this behavior, and avoiding debugging?

The browser won't close unless you call .close() or .quit() . You must have those calls somewhere... just remove them. If you are looking for a intermittent fix, just add a breakpoint where you want the script to stop. Once the run breaks, stop the execution and continue manually. I do this all the time for debugging purposes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM