Python selenium webdriver problem (selenium.common.exceptions.WebDriverException: Message: "Unable to load profile. Dir profile :)

I am using Mac OS X 10.8.3, selenium 2.32.0, python 2.7, Firefox version 20 and get this error when python binding starts:

selenium.common.exceptions.WebDriverException: Message: "Can't load the profile. Profile Dir: /var/folders/vn/8h6w79td4p59l9h9xhx2986r0000gn/T/tmpTmsdul Firefox output: LOG addons.xpi: startup LOG addons.xpi: Skipping unavailable install location app-system-share LOG addons.xpi: checkForChanges LOG addons.xpi: No changes found 2013-04-11 21:59:09.107 firefox-bin[26167:707] invalid drawable" 

Firefox opens, but does not load the URL that I provided in my selenium python script. I saw many others with this problem, like this post:

stack overflow

But I tracked it to the point that I run the local development site from the local host. In my hosts file, I have:

 127.0.0.1 local.development.com 

When I return it back to the original:

 127.0.0.1 localhost 

Everything works great. Now it's easy to simply edit my hosts file to switch between this local development site and selenium. But I wanted to ask if there is a way so that I can maintain a local development site and work and still use selenium at the same time.

Any suggestions or details. Maybe some explanation of the internal work, too, please? Thanks in advance.

+4
source share
1 answer

You need an entry for localhost in your hosts file. But you can add your local.development.com.

So make sure you have:

 127.0.0.1 localhost 127.0.0.1 local.development.com 

In your hosts file. Instead of one or the other. The hosts file is a mapping from domain names to IP addresses. You can have many domain names pointing to the same IP address. But Selenium is clearly trying to connect to "localhost". And you deleted this entry.

+2
source

All Articles