导入selenium后,使用出错,困扰好久的问题,请求大佬帮助
Traceback (most recent call last):File "C:/Users/东东/PycharmProjects/untitled/23.py", line 2, in <module>
driver = webdriver.Firefox()
File "D:\py35\lib\site-packages\selenium-2.48.0-py3.5.egg\selenium\webdriver\firefox\webdriver.py", line 77, in __init__
self.binary, timeout),
File "D:\py35\lib\site-packages\selenium-2.48.0-py3.5.egg\selenium\webdriver\firefox\extension_connection.py", line 49, in __init__
self.binary.launch_browser(self.profile)
File "D:\py35\lib\site-packages\selenium-2.48.0-py3.5.egg\selenium\webdriver\firefox\firefox_binary.py", line 68, in launch_browser
self._wait_until_connectable()
File "D:\py35\lib\site-packages\selenium-2.48.0-py3.5.egg\selenium\webdriver\firefox\firefox_binary.py", line 103, in _wait_until_connectable
raise WebDriverException("Can't load the profile. Profile "
selenium.common.exceptions.WebDriverException: Message: Can't load the profile. Profile Dir: %s If you specified a log_file in the FirefoxBinary constructor, check it for details.以上是报错信息,下面是我使用的一些版本 python 3.5.4 selenium2.48.0 firfox 35
https://img-bbs.csdn.net/upload/202006/20/1592645908_598879.png
:):):):) 配置文件加载失败。检查下路径呢。 来学习 配置文件地址检查下 权限是否有问题 先看下火狐浏览器是否是默认安装的,如果不是的话,需要修改配置路径
driver=webdriver.Firefox(executable_path="浏览器exe文件路径")
页:
[1]