py+selenium運行時報錯Can not connect to the Service IEDriverServer.exe

問題:

運行用例時,出現報錯(host文件已加入127.0.0.1 localhost):

raise WebDriverException("Can not connect to the Service %s" % self.path) selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service IEDriverServer.exe

而右下角event log也報錯。

15:54 Cannot start internal HTTP server. Git integration, JavaScript debugger and LiveEdit may operate with errors. Please check your firewall settings and restart PyCharm

解決:控制面板-windows防火牆-允許程序通過防火牆

勾選IEdriverserver.exe→確定,即可解決!!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章