title: Retrieving 3rd party and All Cookies using Selenium Webdriver Java
body: <p>i want to retrieve all cookies names and domains from an URl using selenium webdriver xx.21 with java,</p>
  
  <p>i am using this below code:</p>
  
  <pre><code>driver.navigate().to("http://www.nextag.com");
  Set&lt;Cookie&gt; cookies = driver.manage().getCookies();
  Iterator&lt;Cookie&gt; 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());
      }
  </code></pre>
  
  <p>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   </p>