0 votes
1 view
in Devops and Agile by (23.1k points)

driver.quit() causes 'Firefox to stop working'

  1. The tests do not fail, but every time driver.quit is called browser crashes as in the image below.
  2. My code:

public void quitDriver() throws Exception {

    if (null != webdriver) {

        getDriver().manage().deleteAllCookies();

        webdriver.quit();

        webdriver = null;

    }

}

Factory Class:

case "firefox":

    if (null == webdriver) {

        System.setProperty("webdriver.gecko.driver", Constant.GECKO_DRIVER_DIRECTORY);

        webdriver = new FirefoxDriver();

    }

enter image description here

enter image description here

  <dependency>

        <groupId>org.seleniumhq.selenium</groupId>

        <artifactId>selenium-java</artifactId>

        <version>3.0.1</version>

    </dependency>

1 Answer

0 votes
by (58.7k points)

I suggest referring this mozilla/geckodriver releases page.

v0.14.0

Changed

Firefox process is now terminated and the session ended when the last window is closed

WebDriver library updated to version 0.20.0

Did you close the last window before calling quit?

Also, geckodriver is still dicey. Try moving to:

  • Webdriver v3.3.1

  • geckodriver v0.15.0

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...