In this post, we are going to explain how to kill chrome driver background process or release chromedriver.exe from memory with help of selenium webdriver.
As per the Selenium API, you really should call browser.quit() as this method will close all windows and kills the process. However most of time, we have noticed a huge problem when trying to execute chromedriver tests in the Java platform, where the chromedriver.exe actually still exists. To overcome such problem you need to apply below command in commands prompt.
Kill Multiple Processes From the Command Line
The first thing you’ll need to do is open up a command prompt, and then use the taskkill command with the following syntax:
taskkill /F /IM /T
These parameters will forcibly kill any process matching the name of the executable that you specify. For instance, to kill all iexplore.exe processes, we’d use:
taskkill /F /IM iexplore.exe