1

I was working with selenium, opening firefox and closing clicking the X, like closing any browser. But at the end of the day I notice in the task manager that all the geckodrivers proccess where still running.

I know you need to call driver.close() or driver.quit() to propertly closeit but is there a way, to do it by closing the windows?

I could run

public class Kill_ChromeDriver_GeckoDriver_IEDriverserver 
{
    public static void main(String[] args) throws Exception 
    {
        Runtime.getRuntime().exec("taskkill /F /IM geckodriver.exe /T");
        Runtime.getRuntime().exec("taskkill /F /IM chromedriver.exe /T");
        Runtime.getRuntime().exec("taskkill /F /IM IEDriverServer.exe /T");
    }
}

but how do I capture that I close the windows?

0 Answers0