With latest chromedriver.exe running into out of disk space issues as chromedriver is not deleting the folder named scoped_* at the end of the execution. It is occupying almost
I managed this by adding deletion of temp folders that begins with "scoped_dir" after quitting driver like:
public static void teardown_()
{
// quit driver
if (driver != null)
driver.Quit();
// delete all "scoped_dir" temp folders
string tempfolder = System.IO.Path.GetTempPath();
string[] tempfiles = Directory.GetDirectories(tempfolder, "scoped_dir*", SearchOption.AllDirectories);
foreach (string tempfile in tempfiles)
{
try
{
System.IO.DirectoryInfo directory = new System.IO.DirectoryInfo(tempfolder);
foreach (System.IO.DirectoryInfo subDirectory in directory.GetDirectories()) subDirectory.Delete(true);
}
catch (Exception ex)
{
writeEx("File '" + tempfile + "' could not be deleted:\r\n" +
"Exception: " + ex.Message + ".");
}
}
}
Hope it helps!