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→确定,即可解决!!

 

posted @ 2018-10-25 16:58  怪盗积德  阅读(1396)  评论(0编辑  收藏  举报