How can I clear the cache of a new instance of a chromedriver in java? I am trying this but im not too sure what else to do? Would it be possible to create a javascript hack to clear the cache in JS which I can call from my driver?
private static WebDriver makeDriver() {
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability(CapabilityType.ForSeleniumServer.ENSURING_CLEAN_SESSION, true);
System.setProperty("webdriver.chrome.driver", "chromedriver.exe");
ChromeDriver driver = new ChromeDriver();
driver.manage().deleteAllCookies();
return driver;
}