title: How do I set a cookie in the selenium webdriver javascript script?
body: <p>I want to set a cookie on a simple webdriver script:</p>
  
  <pre><code>WDS.sampleResult.sampleStart();
  
  
  //WDS.driver.manage().addCookie(new Cookie("connect.sid", "s%3AeexeZcd_-S23Uh30e3Dmd4X9PskWF08s6m5hDurDa5Jj66SupmmiqvKEjAg6HGigl0o0V%2B9R7m4", "api." + rootdomain, "/", null));
  
  // start test
  WDS.browser.get("https://api." + rootdomain);
  waitForVisible(pkg.By.linkText("Log In"));
  WDS.browser.findElement(pkg.By.linkText("Log In")).click()
  </code></pre>
  
  <p>How do I do that?</p>