1

Using Mars.2 Release (4.5.2) and Firefox 47.0 to run my selenium code but every time I hit run I am getting this

StackTrace:

"Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: 
Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure."
Emdadul Sawon
  • 5,730
  • 3
  • 45
  • 48
Selenoor
  • 21
  • 2
  • Possible duplicate of [Can't open browser with selenium after firefox update](http://stackoverflow.com/questions/37761668/cant-open-browser-with-selenium-after-firefox-update) – Mobrockers Jun 14 '16 at 08:02
  • 1
    Agree above, possible duplicate. This issue is due to Firefox moving to multiprocess (code name e10), new drivers required to handle this. It is a known issue begining firefox developer edition that enable e10 . – mootmoot Jun 14 '16 at 08:21
  • 1
    MDN also revamp FF 47.0 , either downgrade to 46 use the new driver. https://github.com/seleniumhq/selenium/issues/2110 – mootmoot Jun 14 '16 at 08:34

2 Answers2

4

Firefox 47.0 came out recently and to use it a new driver must be used that is made by Mozilla instead of by Selenium. See Marionette Driver

Download this driver and make sure the executable file is in your system path. Now you need to change your program so that it uses this driver by setting a desired capability:

dc = DesiredCapabilities.FIREFOX
dc['marionette'] = True
driver = webdriver.Firefox(capabilities=dc)
RemcoW
  • 4,196
  • 1
  • 22
  • 37
0

Downgrade your firefox version to FF 46.0 as the FF 47.0 has no support for webdriver. once you downgrade the Firefox go and disable the auto upgrade option by following the below mentioned steps:

  1. Open firefox: Press F10 > Tools > options

  2. Go to the Advanced tab

  3. Navigate to the Update tab

  4. Uncheck the option 'Use a background service to install update'

  5. Uncheck 'Automatically install updates (recommended: improved security)' and click ok

Pankaj Dubey
  • 279
  • 2
  • 18