我对编程非常陌生,最近学了一点python。作为我的项目的一部分,我需要打开,提供一个网页表单和下载一个图像,因为我必须做无数次,我看了看是否有任何方法可以使用Python自动化它。我刚刚在它的文档中运行了这个例子,在使用firefox时遇到了一些问题。
我得到一个很大的错误,如下所示:
driver = webdriver.Firefox()
File "/usr/lib/python2.7/dist-packages/selenium/webdriver/firefox/webdriver.py", line 51, in __init__
self.binary, timeout),
File "/usr/lib/python2.7/dist-packages/selenium/webdriver/firefox/extension_connection.py", line 47, in __init__
self.binary.launch_browser(self.profile)
File "/usr/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_binary.py", line 44, in launch_browser
self._wait_until_connectable()
File "/usr/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_binary.py", line 81, in _wait_until_connectable
self._get_firefox_output())
selenium.common.exceptions.WebDriverException: Message: 'The browser appears to have exited before we could connect. 我怎么才能绕过这个。我使用的是python 2.7.6,Firefox版本是40.0.3
发布于 2015-09-16 16:26:59
Selenium v2.25不支持火狐v40。可以降级浏览器,也可以升级selenium版本。
https://stackoverflow.com/questions/32602447
复制相似问题