9

I am using selenium webdriver in python to drive Firefox automaticly, the python script is exported from the selenium IDE add-on in Firefox. But when I run the script it raise error:

        ======================================================================
    ERROR: test_selenium (__main__.SeleniumTest)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "selenium_test.py", line 8, in setUp
        self.driver = webdriver.Firefox()
      File "C:\Python26\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 46, in __init__

        self.binary, timeout),
      File "C:\Python26\lib\site-packages\selenium\webdriver\firefox\extension_connection.py", line 46,
    in __init__
        self.binary.launch_browser(self.profile)
      File "C:\Python26\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 44, in lau
    nch_browser
        self._wait_until_connectable()
      File "C:\Python26\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 87, in _wa
    it_until_connectable
        raise WebDriverException("Can't load the profile. Profile Dir : %s" % self.profile.path)
    WebDriverException: Can't load the profile. Profile Dir : c:\users\ataosky\appdata\local\temp\tmpwpz
    zrv

    ----------------------------------------------------------------------
    Ran 1 test in 67.876s

    FAILED (errors=1)

WebDriverException: Can't load the profile. Profile Dir : c:\users\ataosky\appdata\local\temp\tmpwpz

Have anybody encountered this problem? How to solve this? Thanks in advance.

EDIE:selenium 2.5 version has solve this problem.

Treper
  • 3,539
  • 2
  • 26
  • 48
  • Can we see the code? I've run into similar issues in C#, but can't really tell you anything without seeing your code... – Anders Nov 10 '11 at 19:34
  • +1 - same issue with selenium 2.9.0. Suspect it may be related to the recent Firefox 8 upgrade. – hwjp Nov 25 '11 at 13:42

1 Answers1

11

I had this issue after upgrading to Firefox 8, when running selenium v 2.9.0.

It was fixed by upgrading to the latest version of selenium (2.13).

 sudo pip install selenium --upgrade

(if you're using the Python flavour)

hwjp
  • 15,359
  • 7
  • 71
  • 70
  • I have the same issue, however I can't upgrade to Firefox 8 because of a bug in selenium 2.9+. I'll have to downgrade to Firefox 7, issue I have is this auto-updated during a nightly test run and I have my firefox preference set prompt before upgrading – Bob Evans Dec 06 '11 at 15:16
  • I've also just had this problem. Upgraded FF since last running selenium which was at v2.2. I've upgraded that to 2.24 and it executed firefox as the default profile & no errors. – markwalker_ Jun 21 '12 at 07:45