Firefox crashes on driver last window close

Viewed 502

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
2 Answers
Related