In Cnn.com, getting Accept Cookies .how to disable cookies please
thank you
System.setProperty(FirefoxDriver.SystemProperty.BROWSER_LOGFILE, "null");
FirefoxOptions ops=new FirefoxOptions();
FirefoxProfile profile=new FirefoxProfile();
profile.setPreference("network.cookie.cookieBehavior", 2);
ops.setProfile(profile);
WebDriver driver=new FirefoxDriver(ops);
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
driver.manage().window().maximize();
driver.get("http://cnn.com");
Above code is not workin
Instructor
Ashish Thakur Replied on 13/12/2019
profile.setPreference("network.cookie.cookieBehavior",2);
will disbable cookies
CNN is asking as its a website functionality. You cant stop them from asking you
is there any solution to accept cookies browser setting?
Instructor
Ashish Thakur Replied on 22/12/2019
click on yes button using selenium