13

I'm trying to scrape and print the HTML of a page using Selenium in Python, but every time I run it I get the error message

Firefox quit unexpectedly.

I'm new to Selenium, so any help would be greatly appreciated. I'm hoping for the simplest fix possible. Thank you!

My code:

import selenium
from selenium import webdriver
browser = webdriver.Firefox()
browser.get('http://seleniumhq.org/')
print browser.page_source
2
  • 1
    Using Selenium 2.53.0 and Firefox 47.0 the same problem happens, Firefox 46.0.1 runs okay. Commented Jun 23, 2016 at 5:24
  • Having the same problem, how did you fix it? Commented Jul 9, 2016 at 18:00

3 Answers 3

7

My experience since the upgrade to Firefox 38.x on Windows a couple of weeks back has been that it has a problem with Selenium 2.45.x. When invoking the browser it produces a "Firefox has stopped working" error which I have to close manually, at which point the test runs. Others have reported similar issues.

The solution that worked for me (apart from manually closing the error each time, which got old after a few days) was to uninstall the latest version of Firefox and downgrade to version 37.0.2 on the machine where I run the tests. Not ideal for security reasons, but OK if you're careful.

Sign up to request clarification or add additional context in comments.

Comments

2

Upgrading Selenium from 2.45 to 2.47 worked for me.

Selenium 2.46 fixes support for Firefox 38 (and looks like 39 as well). See the release notes

Comments

1

What version of firefox are you using? firefox 36 started breaking for me with selenium version 2.43.0 . You can upgrade to 2.45 and check. https://code.google.com/p/selenium/issues/detail?id=8399 They mention at the end that there are fixes for ff 36 in 2.45. For ff 37 and beyond I'm not sure. I downgraded my ff to work with the version of selenium I had.

3 Comments

Firefox version is the latest, 38.0.1 (I just downloaded it today). Selenium version is also the latest, 2.45 (also downloaded today). Any ideas for what I should do?
Your can refer to this link
Latest FF 45 and selenium 2.53 didn't work for me as well

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.