I'm using playwright and vscode, especially the "debug test" function which pops up a real browser window to run the test. When it fails the test auto closes, how can I make it not auto close so that I can modify the test and also visually see what the state of the test is?
I think how they managed it is a disaster if compared with cypress. If they would have added a simple option in config files (as cypress does) everything would have been much easier.
Anyway, you have to use one of these solutions, not nice, but working: you have to add at the end of the last function executed one of the following
await this.page.waitForTimeout(120000); // will close the browser after 120 secondsawait new Promise(() => {}) // will stay open forever until timeout occurs, usually 120 secondsIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With