Firefox crashes on driver last window close

Hans :

I have a project that sometimes uses multiple FF windows and sometimes multiple FF drivers. During init, I create a custom FirefoxProfile (or load a default from Selenium without any changes), add it to DesiredCapabilities, add capabilities to FirefoxOptions and start FF with FirefoxOptions.

Test case executes fine, until I need to close the window:

driver.getWindowHandles().forEach(name -> driver.switchTo().window(name).close());

or

driver.quit();

After either one of these pass, FF shuts down and "Firefox has crashed" popup appears. No exception is shown in logs.

enter image description here

If I remove FirefoxProfile, no crash popup appears, but FirefoxProfile is needed to enable Flash support and do more.

Using:

  • Selenium 3.4.0
  • Firefox 54 (32 bit)
  • Geckodriver 0.17 (32 bit)
  • Windows 10, 64bit // Windows 7, 64bit
Florent B. :

The driver is failing to properly terminate the sub processes created by Firefox like flash.

https://github.com/mozilla/geckodriver/issues/285

To avoid the dialogue box, you can set the environemnt variable XRE_NO_WINDOWS_CRASH_DIALOG to 1.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=441971&siteId=1
Recommended