I have a simple python script which does not work:
#!/usr/bin/env python
from selenium import webdriver
browser = webdriver.Firefox()
browser.get('http://seleniumhq.org/')
However I receive this error when I try to run it:
Traceback (most recent call last):
File "./test.py", line 5, in <module>
browser = webdriver.Firefox()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/webdriver.py", line 103, in __init__
self.binary, timeout)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/extension_connection.py", line 51, in __init__
self.binary.launch_browser(self.profile, timeout=timeout)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_binary.py", line 68, in launch_browser
self._wait_until_connectable(timeout=timeout)
File "/usr/local/lib/python2.7/dist-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.
I am running selenium version:
Name: selenium
Version: 2.53.2
Firefox version:
ii firefox-mozilla-build 14.0.1-0ubuntu1 amd64 Mozilla Firefox, official Mozilla build, packaged for Ubuntu by the Ubuntuzilla project.