Unable to run Firefox with selenium webdriver

343 views
Skip to first unread message

Yogesh Tyagi

unread,
Jun 18, 2016, 10:35:24 PM6/18/16
to Selenium Users
I am running selenium IDE generated python unit test but it's not getting started only:

Either I get following error:

ERROR: test_aa (__main__.Aa)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "aa", line 20, in test_aa
    driver.get(self.base_url + "/")
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 245, in get
    self.execute(Command.GET, {'url': url})
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 231, in execute
    response = self.command_executor.execute(driver_command, params)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/remote_connection.py", line 395, in execute
    return self._request(command_info[0], url, body=data)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/remote_connection.py", line 426, in _request
    resp = self._conn.getresponse()
  File "/usr/lib/python2.7/httplib.py", line 1051, in getresponse
    response.begin()
  File "/usr/lib/python2.7/httplib.py", line 415, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.7/httplib.py", line 379, in _read_status
    raise BadStatusLine(line)
BadStatusLine: ''

or this error:

python aa
E
======================================================================
ERROR: test_aa (__main__.Aa)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "aa", line 12, in setUp
    self.driver = 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 "
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.


----------------------------------------------------------------------
Ran 1 test in 3.053s

FAILED (errors=1)


Earlier this test was working fine. But I don't know what happened suddenly to firefox?

I am using Mozilla Firefox for Ubuntu 47.0 and Python 2.7.6

Shawn McCarthy

unread,
Jun 18, 2016, 10:59:05 PM6/18/16
to Selenium Users
Downgrade to Firefox 46.

Ram

unread,
Jun 18, 2016, 11:13:42 PM6/18/16
to Selenium Users
m using Firefox 32 version  and tunred off updates,just in case if you wanted to try it out 


On Saturday, June 18, 2016 at 7:35:24 PM UTC-7, Yogesh Tyagi wrote:

Harald Koschinski

unread,
Jun 20, 2016, 3:22:14 AM6/20/16
to Selenium Users
Use FF46. Install it anywhere and set it up with something like

    binary = FirefoxBinary(....where is the ff bin ....)
    driver = webdriver.Firefox(firefox_binary=binary)
Reply all
Reply to author
Forward
0 new messages