I am developing a website that runs selenium tests on Firefox, Chrome, IE... Although the tests pass perfectly on Chrome and IE, I have the problem that follows with Mozilla Firefox:
This appears at the end of a run when the driver closes the firefox window.
I did some research on the internet but most of the answers are quite old and about downgrading firefox to its version 48.0 and that it was fixed with later versions such as v50. It does work with v48 but I am using v51 and still have the same problem...
Here's the driver code:
package Driver.Firefox;
import Driver.Driver;
import org.apache.commons.lang3.SystemUtils;
import org.openqa.selenium.WebDriver;
import org.testng.Assert;
public class FirefoxDriver extends Driver {
public FirefoxDriver(){
if (SystemUtils.IS_OS_WINDOWS) {
System.setProperty("webdriver.gecko.driver", this.basePath + "/src/test/java/Driver/Firefox/geckodriver-win64.exe");
}
else if (SystemUtils.IS_OS_LINUX) {
System.setProperty("webdriver.gecko.driver", this.basePath + "/src/test/java/Driver/Firefox/geckodriver-linux");
}
else if (SystemUtils.IS_OS_MAC) {
System.setProperty("webdriver.gecko.driver", this.basePath + "/src/test/java/Driver/Firefox/geckodriver-macos");
}
else {
Assert.assertTrue(false, "This platform is not supported for the moment.");
}
driver = new org.openqa.selenium.firefox.FirefoxDriver();
driver.manage().window().maximize();
}
}
It appears to be a compatibility issue. Please give a try with the latest gecko driver.
Ok so it looks like it's fixed... I just downgraded to v48 and then installed the last version (that I already had) and the issue is gone...
User contributions licensed under CC BY-SA 3.0