Windows下selenium出错Can not connect to the Service chromedriver

具体报错信息如下:
selenium.common.exceptions.WebDriverException:Message: Can not connect to the Service chromedriver

遇见这个坑爹的问题,卡了我一天多,卸载重装了python 和浏览器N边,还是不行,最后发现问题出现在了 hosts文件里面 少了127.0.0.1 localhost

localhost name resolution is handled within DNS itself.

127.0.0.1 localhost

::1 localhost

::1 localhost
1
2
3
4
5
把 # 127.0.0.1 localhost前面的#号去掉就OK了


作者:L-O-S-E-R
来源:CSDN
原文:https://blog.csdn.net/qq_32151639/article/details/78457921
版权声明:本文为博主原创文章,转载请附上博文链接!

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容