Saturday, December 17, 2011

Disabling caching in ChromeDriver

For disabling caching in ChromeDriver we can use the chrome switches with  DesiredCapabilities

DesiredCapabilities dc = DesiredCapabilities.chrome();
                ArrayList<String> switches = new ArrayList<String>();
                switches.add("--proxy-server="+InetAddress.getLocalHost().getHostAddress()+ ":" + Integer.parseInt(port));
                switches.add("--proxy-bypass-list=local.addthis.com");
                switches.add("--disable-application-cache");
                dc.setCapability("chrome.switches", switches);

More details about chrome switches

No comments:

Post a Comment