selenium2.53.1启动火狐47.0报错

>>> br=webdriver.Firefox()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Python27\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 103, in __init__
    self.binary, timeout)
  File "D:\Python27\lib\site-packages\selenium\webdriver\firefox\extension_connection.py", line 51, in __init__
    self.binary.launch_browser(self.profile, timeout=timeout)
  File "D:\Python27\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 67, in launch_browser
    self._start_from_profile_path(self.profile.path)
  File "D:\Python27\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 90, in _start_from_profile_path
    env=self._firefox_env)
  File "D:\Python27\lib\subprocess.py", line 710, in __init__
    errread, errwrite)
  File "D:\Python27\lib\subprocess.py", line 958, in _execute_child
    startupinfo)
WindowsError: [Error 2]

请问这个怎么解决呀?

阅读 3.3k
2 个回答

其实selenium 2.53.1已经支持Firefox 47.0.1版本了,看情况是firefox的可执行路径无法被找到。

换个版本低一点的firfox就行了

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题