I want launch browsers(FF, CHROME) for the test with disabled cookies, I tried this:
service =
new ChromeDriverService.Builder()
.usingDriverExecutable(new File("src/test/resources/chromedriver"))
.usingAnyFreePort().build();
try {
service.start();
} catch (IOException e1) {
e1.printStackTrace();
}
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability("disable-restore-session-state", true);
driver = new ChromeDriver(service, capabilities);