selenium: [🐛 Bug]: driver.quit doesn't kill all Chrome processes

What happened?

there are a lot of chrome processes in the task manager tab. This is a reason why test-suite hangs and even can’t be ended

How can we reproduce the issue?

open task manager processes tab and run your tests-suite
bug: driver.quit doesn't kill chrome processes

Operating System

Windows 10+

Selenium version

latest

What are the browser(s) and version(s) where you see this issue?

Chrome 124+

What are the browser driver(s) and version(s) where you see this issue?

latest

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 23 (7 by maintainers)

Most upvoted comments

Works for me (Win 11, Chrome 124.0.6367.92, Driver: 124.0.6367.91)

  1. Added argument: “disable-renderer-backgrounding”
  2. Make this: Driver.Close(); Driver.Quit(); Driver.Dispose();

You need to call driver.close() before driver.quit() otherwise you get lingering chrome processes with high resource usage. This is an issue with recent chrome versions (124+).

created issue for chrome team: https://issues.chromium.org/issues/336164423

@asolntsev i’m not sure about this comment because another users have the same issue as me on the Chrome 124+…

Just for the record, I cannot reproduce this problem in MacOS. Both Chrome 123 and 124 work well.

@diemol from javadoc

Close the browser if it's open.
NB! Method quits this driver, closing every associated window.
See Also:
WebDriver. quit()