undetected-chromedriver
undetected-chromedriver copied to clipboard
Doesn't kill the chrome after each try.
I have try many things but idk why it doesn't close. maybe I am doing something wrong.
driver.quit() driver.close() I used both but it just doesn't close anything.
Hey @RexSalazar77 ,
driver.quit()
is the function you should be using to terminate properly.
Here is some more information on this issue: https://github.com/ultrafunkamsterdam/undetected-chromedriver/issues/793#issuecomment-1255736732
I have same problem, i always use driver.quit() function, but seems that it's doesn't work. I'm using headless=True, also tested on debian and windows machine, and have the same problem
try to run it on a daemon thread and exit when finished like this:
finished = False
def main():
# Your Code here
finished = True
if __name__ == "__main__":
import threading
threading.Thread(target=main, daemon=True).start()
import time
while not finished:
time.sleep(1)
or replace the while not finished line
with input("Press Enter to Exit...")