Open RussianPostman opened 7 months ago
The only way I fixed this issue was calling close()
before quit()
like:
driver.close()
driver.quit()
I too am experiencing the same thing. I tried the above suggestions, but it didn't solve the problem.
In my case, two process keep running after driver.quit()
.
I found os.kill(chrome-pid, 15)
will got this result, even chrome is started from the icon.
However, windows command taskkill /pid chrome-pid
works perfect. So this is my solution:
os.system("taskkill /pid " + driver.browser_pid)
while psutil.pid_exists(driver.browser_pid):
time.sleep(0.1)
driver.quit()
After successful completion of any program using undetected-chromedriver, the Chrome process remains. This process consumes a lot of CPU resources and does not do anything visible. driver.quit() closes the window, but the process remains and continues to consume resources. How do I shut down the program correctly? This problem is only with undetected-chromedriver