Traceback (most recent call last):
File "D:/web自动化/scripts.py", line 4, in <module>
driver = webdriver.Firefox()
File "D:\python\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 174, in __init__
keep_alive=True)
File "D:\python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "D:\python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "D:\python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "D:\python\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line
使用pycharm打开火狐浏览器报错,有大佬说说是什么问题么?
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
2条回答 默认 最新
CSDN专家-孙老师 2021-04-10 22:44关注根据错误提示,unable to find binary in default location,未找到浏览器的位置。
检查一下,下载的ChromeDriver配置环境变量了没。
解决 无用评论 打赏 举报