i want to retrieve all cookies names and domains from an URl using selenium webdriver xx.21 with java,
i am using this below code:
driver.navigate().to("http://www.nextag.com");
Set<Cookie> cookies = driver.manage().getCookies();
Iterator<Cookie> itr = cookies.iterator();
while (itr.hasNext()){
Cookie c = itr.next();
System.out.println("Cookie Name: " + c.getName() + " --- " + "Cookie Domain: " + c.getDomain() + " --- " + "Cookie Value: " + c.getValue());
}
From the above code i am getting only some but when i check manually there are some more cookies has to be dropped by advertisements, like (scorecardresearch.com) cookies which is expected, How to get all those by selenium code? Any answer would be really helpful. Thank you