Reputation: 63
I am trying to run a basic selenium code with python 2.7. I got the below exception. I have installed the latest selenium.
What should I do to fix it?
C:\Python27\python.exe D:/Python/Selenium/seleniumTest.py
Traceback (most recent call last):
File "D:/Python/Selenium/seleniumTest.py",
line 4, in <module> driver = webdriver.Firefox()
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\webdriver.py",
line 80, in __init__ self.binary, timeout)
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\extension_connection.py",
line 52, in __init__ self.binary.launch_browser(self.profile, timeout=timeout)
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py",
line 68, in launch_browser self._wait_until_connectable(timeout=timeout)
File "C:\Python27\lib\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: c:\users\venkat~1.ps\appdata\local\temp\tmpiht1hq
If you specified a log_file in the FirefoxBinary constructor, check it for details.
Upvotes: 2
Views: 3421
Reputation: 1590
If by latest version you mean the 2.53 you get with pip install selenium
, it's a known problem (https://github.com/SeleniumHQ/selenium/issues/2739), this version does not support the last versions of firefox, and it won't be fixed because the dev team focus on the version 3.0 (which works fine).
So you can either :
pip install selenium==3.0.0b3
. It should become the default version soon.Upvotes: 2