How to prevent SeleniumJupiter from quit the driver?

23 Views Asked by At

Selenium Jupiter run driver.quit() automatically after every test. But in some cases I would like to look at the browser after the test manually. In Selenium it's easy, don't call driver.quit(). But how does I can do that in Selenium Jupiter?

1

There are 1 best solutions below

1
Boni García On

This is not possible in the current implementation of Selenium Manager, since browsers are always disposed after each test. But you can introduce a custom wait after each test to manually inspect your browser, for instance, as follows:

@AfterEach
void teardown() throws InterruptedException {
    Thread.sleep(60000);
}