I set up a java HttpServlet code to run Selenium chromedriver(Ubuntu 16.4) ,if call more than 30 times at the same time,I find some chromedriver process do not exit,and the exception shows "No such session",I hope there is a way I can quit all chromedriver process and raise concurrency.Thanks
WebDriver driver = null;
try {
DesiredCapabilities caps = DesiredCapabilities.chrome();
ChromeOptions options = new ChromeOptions();
options.addArguments("ignore-certificate-errors");
options.addArguments("disable-gpu");
options.addArguments("no-sandbox");
options.addArguments("--disable-impl-side-painting");//Paint content on the main thread instead of the compositor thread.
options.addArguments("--test-type", "--start-maximized", "no-default-browser-check");
caps.setCapability("chrome.switches", Arrays.asList("--start-maximized"));
caps.setCapability(ChromeOptions.CAPABILITY, options);
driver = new ChromeDriver(caps);
driver.get(url);
webDriverWait = (WebDriverWait) new WebDriverWait(driver, timeOutInSeconds, interval);
} catch (Exception e) { //can not catch
PageSource = e.getMessage();
System.err.println(PageSource);
} finally {
if(null != driver){
driver.close();
driver.quit();
driver = null;
}
}