0

I am using selenium to launch firefox here is my code:

from selenium import webdriver
browser = webdriver.Firefox()
browser.get('http://localhost:8000')
assert 'Django' in browser.title    

it works for a few moment then firefox close and i get this error:

Traceback (most recent call last):
File "functional_tests.py", line 2, in <module>
browser = webdriver.Firefox()
File "/home/hossam/anaconda3/lib/python3.5/site-packages/selenium  /webdriver/firefox/webdriver.py", line 80, in __init__
self.binary, timeout)
File "/home/hossam/anaconda3/lib/python3.5/site-packages/selenium/webdriver/firefox/extension_connection.py", line 52, in __init__
self.binary.launch_browser(self.profile, timeout=timeout)
File "/home/hossam/anaconda3/lib/python3.5/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 68, in launch_browser
self._wait_until_connectable(timeout=timeout)
File "/home/hossam/anaconda3/lib/python3.5/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 108, in _wait_until_connectable
% (self.profile.path))
selenium.common.exceptions.WebDriverException: Message: Can't load the profile. Profile Dir: /tmp/tmp7xr9w1rw If you specified a log_file in the FirefoxBinary constructor, check it for details.

can anyone explain this?

Hossam Salah
  • 185
  • 1
  • 13
  • 2
    Possible duplicate of [Selenium: FirefoxProfile exception Can't load the profile](http://stackoverflow.com/questions/6682009/selenium-firefoxprofile-exception-cant-load-the-profile) – ZdaR Mar 02 '17 at 13:42
  • no different problem .. here it works for few seconds then crashes – Hossam Salah Mar 02 '17 at 13:45
  • The stacktrace is literally the same as in the other issue. You should try the suggestions there – Tamas Hegedus Mar 02 '17 at 13:58
  • ok i tried the suggestion but it installed selenium 3 which already has a problem of it's own and i solved it by installing selenium 2.53.6 – Hossam Salah Mar 02 '17 at 14:18

0 Answers0