关于from selenium import name 的报错,及火狐浏览器打不开

      1.之前不知道怎么回事,把__init__.py 文件写错了,导致一直报from  selenium  import  name的错误,。网上找了很多方法,找不到解决的方案,最后看报错信息,找到储存__init__.py文件的文件 from selenium import webdriver 给删掉,重新保存,。然后在次运行,就可以了

2.      要用selenium打开fiefox浏览器。首先需要去下载一个driver插件geckodriver.exe, 下载地址https://github.com/mozilla/geckodriver/releases,下载好这个exe文件后,把这个文件放到你的python安装目录下,例如:C:\Python27\geckdriver.exe。
 

猜你喜欢

转载自blog.csdn.net/weixin_42346330/article/details/81172152
今日推荐