Python Selenium Webdriver停止为Firefox工作(令人费解)

时间:2016-07-05 23:31:40

标签: python selenium firefox selenium-webdriver python-3.5

我正在运行Python 3.5.0和Selenium 2.53.6。我有一个功能强大的网络刮刀,可以使用Firefox导航,但它突然停止工作。我承认计算机不会无缘无故地改变他们的行为,但我无法弄清楚发生了什么变化,这就是我在这里寻求帮助的原因:)

问题是,Firefox窗口将成功打开,但看起来它与webdriver之间的通信在某种形式上是不完整的。就好像网络驱动程序正在等待一些"好吧,我已经加载了。"来自Firefox的消息,但它没有得到它。我说的原因是我已经在IDLE中执行了这个操作,当我执行driver = webdriver.Firefox()时,浏览器窗口会打开,但不会出现新行(>>>)。如果我等了大约一分钟,我会在下面看到超时(我认为)错误。我看到有关加载个人资料的内容,但我没有改变任何我能想到的会导致功能发生变化的内容。

 Traceback (most recent call last):
       File "<pyshell#20>", line 1, in <module>
         driver = webdriver.Firefox()
       File "C:\Users\Dane\AppData\Local\Programs\Python\Python35-32\lib\site-packages\selenium\webdriver\firefox\webdriver.py",
 line 77, in __init__
         self.binary, timeout),
       File "C:\Users\Dane\AppData\Local\Programs\Python\Python35-32\lib\site-packages\selenium\webdriver\firefox\extension_connection.py",
 line 49, in __init__
         self.binary.launch_browser(self.profile)
       File "C:\Users\Dane\AppData\Local\Programs\Python\Python35-32\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py",
 line 68, in launch_browser
         self._wait_until_connectable()
       File "C:\Users\Dane\AppData\Local\Programs\Python\Python35-32\lib\site-packages\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.

我最初认为这是由于Firefox更新,但我检查了更新日志,我的刮刀在最新更新后工作了4周。我正在运行 Firefox 46.0.1 。感谢您提供的任何帮助。

0 个答案:

没有答案
相关问题