When I'm done with automating, the chrome webdriver stays running in the background, is there anyway to automatically close it without the need of doing it via task manager?
Asked
Active
Viewed 69 times
1
-
1Does this answer your question? [how to close Python selenium webdriver window](https://stackoverflow.com/questions/42591175/how-to-close-python-selenium-webdriver-window) – Klaus D. Aug 10 '20 at 03:14
1 Answers
0
driver.close()
=> It will shut the focused browser window.
driver.quit()
=> It will shut all opened browser window and terminates the WebDriver session.

Just for fun
- 4,102
- 1
- 5
- 11
-
-
But i already don't know where to write that's why i'm asking, i automate in vs code, then i don't know where to write this command to kill the webdriver task? – Abdulrahman Zaytoun Aug 10 '20 at 03:23
-
-
the linter gives me a redline under the driver word and it doesn't execute.. – Abdulrahman Zaytoun Aug 10 '20 at 03:31
-
driver should be what you defined webdriver.Chrome() or Firefox() to – Just for fun Aug 10 '20 at 03:33