title: Unable to set cookies in Selenium Webdriver
body: <p>I'm trying to add cookies to a link before I open it with webdriver but it keeps giving me this error:</p>
  
  <blockquote>
    <p>org.openqa.selenium.UnableToSetCookieException: Unable to set cookie (WARNING: The server did not provide any stacktrace information)</p>
  </blockquote>
  
  <p>Please find my code below: </p>
  
  <pre><code>System.setProperty("webdriver.edge.driver","C:\\Program Files\\Latest Webdriver\\MicrosoftWebDrive.exe" );
  EdgeDriver = new EdgeDriver();
  Thread.sleep(2000);
  Cookie cookie = new Cookie("Testing", "11111");
  EdgeDriver.manage().addCookie(cookie);
  EdgeDriver.get("https://www.google.ca/?gws_rd=ssl"); // The link is an example
  </code></pre>
  
  <p>Please help with a relevant solution. </p>