标签:__name__ selenium RoCE ret 失败 proc sele roc windows
结束Windows中浏览器的进程
#-*- coding:utf-8 #结束Windows中浏览器的进程 from selenium import webdriver import unittest class TestDemo(unittest.TestCase): def test_killWindowsProcess(self): #启动浏览器 firefoxDiver = webdriver.Firefox(executable_path="C:\webdriver_firefox_driver") import os #结束Firefox进程 returnCode = os.system("taskfill/F/iM firefox.exe") if returnCode == 0: print "成功结束Firefox进程" else: print u"结束进程失败" if __name__ == "__main__": unittest.main()
selenium高级应用 - 结束Windows中浏览器的进程
标签:__name__ selenium RoCE ret 失败 proc sele roc windows
原文地址:https://www.cnblogs.com/aszeno/p/10340009.html