1

I hope this is something simple, it feels like it. But it is beyond me at the moment. I am a new starter with Selenium, I want to automatically extract information from a website and this seems a good method. For a change I have started doing this on Windows 10 and I want program in Python so I am using PyCharm. I have installed Selenium using pip install selenium and if I use the python command line shell with the following:

from selenium import webdriver
driver = webdriver.Firefox()

I get the following error message:

Python 3.5.1 (v3.5.1:37a07cee5969, Dec  6 2015, 01:38:48) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from selenium import webdriver
>>> driver = webdriver.Firefox()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Damo\AppData\Local\Programs\Python\Python35-32\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 81, in __init__
self.binary, timeout)
  File "C:\Users\Damo\AppData\Local\Programs\Python\Python35-32\lib\site-packages\selenium\webdriver\firefox\extension_connection.py", line 51, in __init__
self.binary.launch_browser(self.profile, timeout=timeout)
  File "C:\Users\Damo\AppData\Local\Programs\Python\Python35-32\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 68, in launch_browser
self._wait_until_connectable(timeout=timeout)
  File "C:\Users\Damo\AppData\Local\Programs\Python\Python35-32\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 98, in _wait_until_connectable
raise WebDriverException("The browser appears to have exited "
selenium.common.exceptions.WebDriverException: Message: The browser appears to have exited before we could connect. If you specified a log_file in the FirefoxBinary constructor, check it for details.

When I type the same within PyCharm the IDE tells me that this term webdriver.Fiefox results in Firefox is not callable

Have I failed to install something?

>

fatherdamo
  • 165
  • 1
  • 2
  • 13
  • Can you try downgrading your firefox to version 45 and rerunning the script? Also, disable the setting in firefox to auto update. – Mukesh Takhtani Jul 03 '16 at 18:53
  • I moved back to Firefox 45.0 and the `webdriver.Firefox()` command now launches a Firefox window. Does this mean there is an issue between Selenium and Firefox 47? – fatherdamo Jul 04 '16 at 13:33
  • I think there is an answer [here](http://stackoverflow.com/questions/37761668/cant-open-browser-with-selenium-after-firefox-update). I will have a proper look at it tomorrow, I'm a bit busy today. – fatherdamo Jul 04 '16 at 14:35
  • Yes, its an issue with firefox 47, and its fixed in version 47.0.1. (https://www.mozilla.org/en-US/firefox/47.0.1/releasenotes/) – Mukesh Takhtani Jul 06 '16 at 07:49

1 Answers1

0

Not meant as a silly reaction, but do you have the latest version of Firefox installed on your machine?

ejah
  • 121
  • 6