0

In my code I have added this:

os.system("./usr/bin/google-chrome")

However, I want it to shut off google chrome after a certain amount of time. I have tried this:

os.system("killall -15 chrome")

The problem I am having right now is that it will not continue unless I close google chrome manually.

1 Answers1

0

Try with pkill:

os.system('pkill chrome')

In windows:

os.system(r'taskkill /im chrome.exe /f')
Wasif
  • 14,755
  • 3
  • 14
  • 34
  • I was able to do this, but I meant that the python code would not move on to the part where it kills the task until I closed google chrome. –  Nov 20 '20 at 16:03