I am not able to completely delete a project, because the chromedriver instance is running in the background, even when there is no code is being executed. Please see the below image.
The error I get while the project deletion is:
Take the below code for instance:
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class Test {
public static void main(String[] args) throws Exception {
String url = "https://www.google.com";
System.setProperty("webdriver.chrome.driver", "src/driver/chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.get(url);
System.out.println(driver.getTitle());
}
}
Try running this code, say 5 times, and there will be 5 background running instances. Tried restarting Eclipse, with no luck.
I understand this is happening because I am not writing this line:
driver.close();
But normally, when the main-thread dies, all supporting running instances should die with it.
Is this a known issue, or I am scripting something wrong.
Thanks in advance.