Selenium support for Firefox is limited to specific versions combinations. The official documentation says
Support for Firefox is the latest release, the previous release, the latest ESR release and the previous ESR release.
This means that, when a version of Selenium is released, it will support the current version of Firefox, the previous version of Firefox, the latest ESR version of Firefox and the previous ESR version of firefox on that release date. If a new version of Firefox is released or the ESR version changes, even the next day, they may not work with that version of Selenium.
Here are the the default Selenium versions used for the respective Firefox browser versions.
Firefox Browser 'beta' or 'dev' = Selenium 2.46.0
Firefox Browser >= 44 = Selenium 2.51.0
Firefox Browser >= 41 = Selenium 2.48.0
Firefox Browser >= 39 = Selenium 2.47.0
Firefox Browser >= 38 = Selenium 2.46.0
Firefox Browser >= 32 = Selenium 2.45.0
Firefox Browser >= 26 = Selenium 2.40.0
Firefox Browser >= 23 = Selenium 2.35.0
Firefox Browser >= 21 = Selenium 2.33.0
Firefox Browser >= 20 = Selenium 2.31.0
Firefox Browser >= 19 = Selenium 2.30.0
Firefox Browser >= 17 = Selenium 2.29.0
Firefox Browser >= 12 = Selenium 2.27.0
All other Firefox Browser versions = Selenium 2.40.0
If you would like to request a specific Selenium version (e.g Selenium version 2.46.0) for your test, try using the following desired capability:
'selenium-version' : '2.46.0'