1

Last week I created and ran a test script

from selenium import webdriver
from selenium.webdriver.common.keys import Keys

driver = webdriver.Firefox()
driver.get("http://www.python.org")
client = "Python"
if client not in driver.current_url:
    print("Wrong Client")
else:
    print("Continue")

Which was working fine, opening a firefox window and navigating to Python.org

Today I have ran both my script and the test one and there I get a timeout error, which means that there is no navigation.

I have tried opening the webpage using

driver = webdriver.Firefox()

and then manually opening Python.org and then running a test

client = "Python"
if client not in driver.current_url:
    print("Wrong Client")
else:
    print("Continue")

I get an error saying driver not defined, However I had tested this last week and it worked fine.

I am not sure why I am not being able to navigate as the commands have not changed from the script that previously worked.

Below error message from Python

WebDriverException Traceback (most recent call last) in () 2 from selenium.webdriver.common.keys import Keys 3 ----> 4 driver = webdriver.Firefox() 5 driver.get("http://www.python.org") 6 assert "Python" in driver.title

C:\Users\bca\AppData\Local\Continuum\Anaconda3\lib\site-packages\selenium\webdriver\firefox\webdriver.py in init(self, firefox_profile, firefox_binary, timeout, capabilities, proxy, executable_path, firefox_options) 78 79 executor = ExtensionConnection("127.0.0.1", self.profile, ---> 80 self.binary, timeout) 81 RemoteWebDriver.init( 82 self,

C:\Users\bca\AppData\Local\Continuum\Anaconda3\lib\site-packages\selenium\webdriver\firefox\extension_connection.py in init(self, host, firefox_profile, firefox_binary, timeout) 50 self.profile.add_extension() 51 ---> 52 self.binary.launch_browser(self.profile, timeout=timeout) 53 _URL = "http://%s:%d/hub" % (HOST, PORT) 54 RemoteConnection.init(

C:\Users\bca\AppData\Local\Continuum\Anaconda3\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py in launch_browser(self, profile, timeout) 66 67 self._start_from_profile_path(self.profile.path) ---> 68 self._wait_until_connectable(timeout=timeout) 69 70 def kill(self):

C:\Users\bca\AppData\Local\Continuum\Anaconda3\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py in _wait_until_connectable(self, timeout) 106
"Dir: %s If you specified a log_file in the " 107
"FirefoxBinary constructor, check it for details." --> 108 % (self.profile.path)) 109 count += 1 110 time.sleep(1)

WebDriverException: Message: Can't load the profile. Profile Dir: C:\Users\bca\AppData\Local\Temp\tmpzejv0ejm If you specified a log_file in the FirefoxBinary constructor, check it for details.

BDM
  • 554
  • 2
  • 7
  • 16
  • Possible duplicate of [Selenium: FirefoxProfile exception Can't load the profile](http://stackoverflow.com/questions/6682009/selenium-firefoxprofile-exception-cant-load-the-profile) – Random Davis Oct 17 '16 at 16:19
  • what versions are you using for Firefox and Selenium? – ddavison Oct 17 '16 at 16:31
  • @sircapsalot I am using Python 3.5.2 Selenium 3.0.1 Firefox 49.0.1 and running the script through Jupyter notebooks from Anaconda 4.2.0 – BDM Oct 18 '16 at 13:39
  • @RandomDavis I had not seen that answer and it does look like a very similar issue, however from the info the issue should not be happening with the versions I am using. As well I don't see why if I have not updated Firefox since the first time I ran the code and it worked why the problem would be taking place. – BDM Oct 18 '16 at 13:48
  • ok, and do you have `geckodriver` properly configured? additionally, there is no `3.0.1` version of selenium. i'll assume `3.0.0` stable – ddavison Oct 18 '16 at 15:21
  • @sircapsalot I downgraded firefox and the error that I am getting is regarding the geckodriver as you are mentioning. No sure what the correct configuration should be, so need to look into that. – BDM Oct 19 '16 at 08:51
  • @sircapsalot update has taken place for selenium they are no on to 3.0.1 if you check http://www.seleniumhq.org/download/ – BDM Oct 19 '16 at 16:22
  • @BDM. You opened this question two days ago. 3.0.1 was released [just yesterday](https://github.com/SeleniumHQ/selenium/releases/tag/selenium-3.0.1) :P – ddavison Oct 20 '16 at 01:30

0 Answers0