I am trying to get Selenium to run with Firefox and can't get the most basic script to run. My script is:
from selenium import webdriver
# create a new Firefox session
driver = webdriver.Firefox()
driver.maximize_window()
# navigate to the application home page
driver.get("http://www.google.com/")
When that runs the browser opens but the URL is never loaded and I get the error:
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.
I have done a lot of searching for answers on this, and they all seem to revolve around version issues that are resolved for older versions of Firefox/Selenium. Generally updating Selenium with pip install -U selenium is the solution. But this is a new machine that I just set up and everything is up-to-date already.
- Firefox (43.0.4)
- Selenium (2.48.0)
Pip tells me Selenium is already up-to-date. So I am wondering what other problems might cause this and what solutions I can try.