I am trying to get selenium webdriver to work, but even with a simple python script like this:
from selenium import webdriver
driver = webdriver.Firefox()
driver.get('http://www.google.com')
driver.quit()
I am getting:
Traceback (most recent call last):
File "test.py", line 14, in <module>
driver.get('http://www.google.com')
File "C:\Python34\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 207, in get
self.execute(Command.GET, {'url': url})
File "C:\Python34\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 193, in execute
response = self.command_executor.execute(driver_command, params)
File "C:\Python34\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 358, in execute
return self._request(command_info[0], url, body=data)
File "C:\Python34\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 389, in _request
resp = self._conn.getresponse()
File "C:\Python34\lib\http\client.py", line 1171, in getresponse
response.begin()
File "C:\Python34\lib\http\client.py", line 351, in begin
version, status, reason = self._read_status()
File "C:\Python34\lib\http\client.py", line 321, in _read_status
raise BadStatusLine(line)
http.client.BadStatusLine: ''
This has been going on with all the scripts I am trying. Firefox will open and attempt to open the website and then close and then another Firefox instance opens up but is a completely new blank page. I am currently on the latest version of everything. Firefox 31.7.0 ESR (up to date according to Firefox), Selenium 2.46.0, and Python 3.4. Any help would be appreciated!
Thanks
Use Firefox stable releases. Version 38 should work.