I'm getting the chrome didn't shut down correctly error message when I reopen a chrome browser in my selenium framework.
In the framework I'm opening the browser instance at the beginning for each of my test case using the below code
if (browserType.equalsIgnoreCase("Chrome")) {
try {
System.setProperty("webdriver.chrome.driver", curProj+"\\drivers\\chromedriver.exe");
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("useAutomationExtension", false);
options.addArguments("disable-infobars");
//options.addArguments("user-data-dir=C:/Users/xw20/AppData/Local/Google/Chrome/User Data");
options.addArguments(chromeProfile);
webdriver = new ChromeDriver(options);
logger.info("getWebDriver - Setting webdriver.chrome.driver system property as: " + System.getProperty("webdriver.chrome.driver"));
}
catch(IllegalStateException e) {
logger.error("The path to the driver executable must be set by the webdriver.chrome.driver system property. ",e.fillInStackTrace());
throw new IllegalStateException("The path to the driver executable must be set by the webdriver.chrome.driver system property.");
}
and closing at the end using the below code
driver.close();
driver.quit();
But when I open a browser for the second test case I'm getting "chrome didn't shut down correctly" popup message.
I tried updating the below in the Preferences file of chrome profile but no luck
exit_type:Crashed
exited_cleanly:true
Configuration :
Chrome Version: Version 64.0.3282.186 (Official Build) (32-bit)
Selenium Version: 3.11.0