这是一段使用python关闭谷歌浏览器的简单代码
import os, sys
# linux系统
if "win" not in sys.platform:
browserName = "chrome"
cmd = "pkill {}".format(browserName)
else:
#windows系统
browserName = "chrome.exe"
cmd = "taskkill /f /t /im {}".format(browserName)
os.system(cmd)