I am currently using Cucumber and Selenium WebDriver in Java to test a web application. I am not very happy that the browser is closed and reopened between each test case.
Firstly, it is rather slow and, in addition, it makes no sense to me.
What I want to do is exit the application between each test and leave the browser open.
I thought this line could do the job, but it does not work properly:
driver.navigate().to("http://myurl.url");
Instead:
driver.get("http://myurl.url");
He opens a new browser. I understand why he does this, but I want to connect to the previous session of my browser.
source
share