1

In the earlier versions of the chromedriver, I used to see a process with the chromedriver.exe name in task manager. But now it seems in the newer version (87) they have renamed the chromedriver.exe process to Google Chrome.

So the point is i used to kill all the unused chromedriver.exe process with the below code - Runtime.getRuntime().exec("taskkill /F /IM ChromeDriver.exe");

Need to know it will still work? or we have to change the code to (Something like that) ? - Runtime.getRuntime().exec("taskkill /F /IM Google Chrome");

enter image description here

Please suggest.

Swaroop Humane
  • 1,770
  • 1
  • 7
  • 17
  • What are you trying to accomplish? Vs Driver.quit()? – DMart Nov 24 '20 at 16:43
  • @DMart - What i am trying to accomplish? - Closing all the chromedriver.exe process which are abandoned or say not used because my code broke down in between before reaching the driver.quit() code. And as per my knowledge i think the driver.quit() will close the current chromedriver and not the one which was running earlier. – Swaroop Humane Nov 24 '20 at 16:53

3 Answers3

1

Using the latest ChromeDriver 87.0.4280.20 (2020-10-15) with Google Chrome Version 87.0.4280.66 executing a simple test it is observed that the ChromeDriver executable process is still identified as chromedriver.exe

Snapshot:

chromedriver_executable_process


Conclusion

Hence there is no change to the process name of chromedriver.exe.

Perhaps the numerous processes of Google Chrome which can be seen are the result of Many process of Google Chrome (32 bit)

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
0

Looks into ProcessHandle, rather than using the command line:

https://docs.oracle.com/javase/9/docs/api/java/lang/ProcessHandle.html Get all handles, then filter on command name, then destroy the process:

ProcessHandle.allProcesses()
        .filter(ph -> ph.info().command().isPresent() && ph.info().command().get().contains("SomeJavaApp"))
        .forEach((process) -> {
            process.destroy();
        });
DMart
  • 2,401
  • 1
  • 14
  • 19
0

No, there wasn't any change in this direction. In 'Processes' you're actually seeing all chrome.exe processes. If you don't expect them, they're probably defunct processes. You can have a better overview in the 'Details' tab, with the actual process names. You can see also the chromedriver.exe running processes, if there are some.

Lorenzo Orsatti
  • 153
  • 1
  • 1
  • 10