selenium没有连接到Firefox

时间:2015-09-18 18:48:30

标签: python firefox selenium

我正在尝试使用Selenium绑定Python。当我执行webdriver.Firefox()时,窗口会打开,但方法永远不会返回。一段时间后,窗口再次关闭,我得到以下异常:

>>> driver = webdriver.Firefox()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 77, in __init__
    self.binary, timeout),
  File "/usr/lib/python2.7/site-packages/selenium/webdriver/firefox/extension_connection.py", line 49, in __init__
    self.binary.launch_browser(self.profile)
  File "/usr/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 68, in launch_browser
    self._wait_until_connectable()
  File "/usr/lib/python2.7/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.

this question我检查了我的版本。我正在运行selenium版本2.47.3和Firefox版本40.0.3。两者都是最新版本,因此它们应该兼容。

0 个答案:

没有答案