webdriver之raise WebDriverException("Can not connect to the Service %s" % self.path) selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service geckodriver
以上就是我写了以下代码的时候,出现了异常;就是打不开火狐浏览器;
如果和我一样遇到以上问题的小伙伴,可以尝试以下几种方式:
1、看看你的 hosts文件中,localhost地址对不对;
在cmd下,ping localhost;
出现一般故障的这个,就是防火墙没关,关闭防火墙再次去ping,就ping通了;
把“# 127.0.0.1 localhost”前面的#去掉;