There is a test, smth like:
import //needed imports
public class TestClass{
WebDriver driver;
@Before
public void setUp() {
//some code
}
@Test
public void test1() {
//some code, including init of driver (geckodriver)
}
//@After
// public void tearDown() {
// driver.quit();
//}
}
So, I inited geckodriver, and successfully running my tests, using firefox instances.
But I want Not to close firefox window after each run, because I just want to analyse what I have, and fix any needed, after test run(I'm going to unComment driver.quit() later).
At the same time, each calling without closing the driver leads to over-impact to RAM on my PC(and does not matter - did I close browser manually, or not, after test):
So, question is:
is there any way to close the process(more precisely - do smth, which will close geckodriver.exe process in taskmgr) of "geckodriver", but will NOT close the browser after test finished? e.g., adding some method in test itself, whatever... This not impacts my work/test itself, I just want to add some optimizing.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…