RE: What is the exact command or a way around to close the Firefox browser without an error in Selenium webdriver?

Hi, I am getting following error when quiting Firefox browser (driver.quit();) using Selenium Webdriver (Selenium-java-2.42.0.jar). I am using Firefox 30.0 version and Windows server 2012 standard (windows 8). Please provide me a correct way to close the FF browser.

Sep 25, 2014 4:19:32 PM org.openqa.selenium.os.UnixProcess$SeleniumWatchDog destroyHarder
INFO: Command failed to close cleanly. Destroying forcefully (v2). org.openqa.selenium.os.UnixProcess$SeleniumWatchDog@e3226

Charles Default Asked on September 25, 2014 in Selenium WebDriver.

Could you please post your code.

on September 26, 2014.
Add Comment
1 Answers

Hi Charles,

Please try these three solutions for the same.

1. Downgrade your FF version.

2. Delete plugin-container.exe from C:\Program Files\Mozilla Firefox\plugin-container.exe.

3. Use the code below

public void closeBrowserSession() throws IOException {
Runtime.getRuntime().exec(“taskkill /F /IM chrome.exe”);
Runtime.getRuntime().exec(“taskkill /F /IM iexplorer.exe”);
Runtime.getRuntime().exec(“taskkill /F /IM firefox.exe”);
}

This will run on windows only.

Thanks,
Vishal

Doctor Answered on September 26, 2014.

I mean one of the above 3 solutions

on September 26, 2014.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.