title: Protractor - Ignore Synchronisation flag
body: <p>I have started doing a POC on Protractor as our e2e automation testing tool.
  Our application is designed in angular which makes it a perfect fit.</p>
  
  <p>However, I need to login via google which is a non-angular website and therefore at the start of my test I state</p>
  
  <blockquote>
    <p>browser.ignoreSynchronization = true;</p>
  </blockquote>
  
  <p>Then I go to </p>
  
  <blockquote>
    <p>'<a href="https://accounts.google.com/ServiceLogin" rel="nofollow">https://accounts.google.com/ServiceLogin</a>'</p>
  </blockquote>
  
  <p>Enter my google credentials and click on signin</p>
  
  <p>At this point I try to go to my application's URL, which is an angular application so I was hoping to turn</p>
  
  <blockquote>
    <p>browser.ignoreSynchronization = false;</p>
  </blockquote>
  
  <p>All the the above steps are part of a beforeEach so that I can login before each test</p>
  
  <p>But when I turn ignoreSynchronization to false, all my tests start failing.
  On the other hand, if I don't turn it to false,  I am compelled to use a lot of browser.sleeps as Protractor is still treating it as a non-angular app and does not wait for angular to load fully</p>
  
  <p>I have also tried to put the ignoreSynchronization = false in each individual test as opposed to beforeEach but even then all my tests start failing.</p>
  
  <p>Below is my beforeEach code</p>
  
  <pre><code>      browser.ignoreSynchronization = true;
        browser.driver.manage().window().setSize(1280, 1024);
        browser.get(googlelogin);
        email.sendKeys('username');
        next.click();
        browser.wait(EC.visibilityOf(pwd), 5000);
        pwd.sendKeys('pwd');
        signin.click();
        browser.ignoreSynchronization = false;
        browser.driver.get(tdurl);
  </code></pre>