I keep getting Python errors trying to execute the following simple Selenium Python code for Firefox on a Windows 7 system.
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Firefox()
driver.get("http://www.python.org")
I could not find any previous questions related to Windows, and so I am trying to find out if anyone can help me solve this problem.
I uninstalled Python 3.4 and installed the latest Python 3.5 to no avail.
Here's the complete error message:
=================================================== =========== RESTART: C: \ PythonScripts \ selenium \ firefox.py last): File "C: \ PythonScripts \ selenium \ firefox.py", line 4, in driver = webdriver.Firefox ( ) File "C: \ Python35 \ lib \ site-packages \ selenium", line 78, in init self.binary, timeout) File "C: \ Python35 \ lib \ site-packages \ selenium \ webdriver \ firefox \ webdriver.py" \ webdriver \ firefox \ extension_connection.py ", line 51, in init self.binary.launch_browser (self.profile, timeout = timeout) File "C: \ Python35 \ lib \ site-packages \ selenium \ webdriver \ firefox \ firefox_binary.py", line 68, in launch_browser self._wait_until_connectable (timeout = timeout ) File "C: \ Python35 \ lib \ site-packages \ selenium \ webdriver \ firefox \ firefox_binary.py", line 98, in _wait_until_connectable raise WebDriverException ("The browser seems to be out" selenium.common.exceptions.WebDriverException: Message: the browser seems to be gone before we can connect in. If you specified log_file in the FirefoxBinary constructor, check it out for details.
- Python Version - 3.5.1
- Selenium Version - 2.51.0
- Firefox Version - 44.0.2
- Windows Version - 7 Professional SP1
Appreciate any help on this.