title: Setting cookies before browser.get
body: <p>Our (PHP) application requires certain cookies to be set in order to load an Angular.js client app. If the cookies are not set an exception is thrown and error page is shown.</p>
  
  <p>This means in order to run E2E tests we need to set the cookies, but the following fails because Protractor is trying to find Angular right after the <code>browser.get</code> call (it's not there because the exception was thrown).</p>
  
  <pre><code>browser.get('http://' + domain + '/');
  browser.manage().addCookie('foo', 'boo', '/', domain);
  </code></pre>
  
  <p>I tried to call <code>browser.get</code> after setting the cookies:</p>
  
  <pre><code>browser.manage().addCookie('foo', 'boo', '/', domain);
  browser.get('http://' + domain + '/');
  </code></pre>
  
  <p>But this produces the following error:</p>
  
  <blockquote>
    <p>Failed to set the 'cookie' property on 'Document': Cookies are
    disabled inside 'data:' URLs.</p>
  </blockquote>
  
  <p>Is there a way how to handle this situation? Perhaps to tell Protractor not to check for Angular when doing the first <code>browser.get</code> call or somehow set cookies for our domain before calling getting the URL?</p>