今天运行selenium脚本,出现Can not connect to the Service chromedriver 这个错误。

我大概百度一下,主要两种解决方法:

第一种、修改hosts里面的内容:

把 取消 127.0.0.1       localhost 注释

运行selenium脚本,出现Can not connect to the Service chromedriver解决方法汇总!

第二种,修改防火墙

  关闭防火墙功能

运行selenium脚本,出现Can not connect to the Service chromedriver解决方法汇总!

以上两种方法,都可以实现,

但是,如果不想关闭防火墙,还想运行selenium脚本,有没有其他办法??

小鱼试了一下, 就是先把防火墙关闭→运行脚本→再开启防火墙→继续运行脚本!

就这种操作,脚本还是可以继续执行的!!!

就这种骚操作,即不用关闭防火墙,又可以运行脚本,这叫 一箭双雕啊~~~

 

相关文章:

  • 2021-05-15
  • 2021-06-10
  • 2021-08-12
  • 2022-03-06
  • 2022-12-23
  • 2021-08-14
  • 2021-11-04
  • 2021-09-01
猜你喜欢
  • 2021-12-10
  • 2021-05-19
  • 2021-12-07
  • 2022-12-23
  • 2021-07-21
  • 2022-02-27
  • 2021-11-16
相关资源
相似解决方案