-1

I am trying to use the Selenium bindings for Python. When I execute webdriver.Firefox(), the windows opens, but the method never returns. After a while, the window closes again and I get the following exception:

>>> 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.

Per this question I checked my version. I'm running selenium version 2.47.3, and Firefox version 40.0.3. Both are the most recent available versions, so they should be compatible.

Community
  • 1
  • 1
ewok
  • 20,148
  • 51
  • 149
  • 254

1 Answers1

3

as the exception says, it looks like your Firefox profile folder is missing or inaccessible.

The profile folder was either moved, renamed or deleted.

By default the profile folder is under the ~/.mozilla/firefox

Please follow this guide to recover it. Also check this other Q&A

Pynchia
  • 10,996
  • 5
  • 34
  • 43