0

I execute python-selenium script to open chrome browser.

If I "pkill -f python", Chrome windows opened by script will be closed. (In MacOS 10.12.6)

But after updated MacOS to Catalina 10.15.3, chrome browser would not disappear.

And I try to kill chromedriver in terminal, it still keep in dock.

How can I solve this issue?

Yun
  • 1,032
  • 7
  • 20

1 Answers1

1

You should not kill the python script as it will keep chromedriver running in the background which will eventually keep browser running.

In your script you need to call close browser gracefully which will make sure to stop chromedriver and chrome.

In any case you fail to call close browser than it will have the same behavior, hence you also need to handle in any exception close browser should be called as cleanup before exiting the script.

Sariq Shaikh
  • 940
  • 8
  • 29