title: Getting "Error while waiting for Protractor to sync with the page: "both angularJS testability and angular testability are undefined ....""
body: <p>I'm fairly new to Protractor and JS. I wrote a simple code to add few numbers using an online calculator. Add I am doing by calling a add() function where I am returning a Promise. This Promise I am handling in my it block where it is causing issue and giving above error.</p>
  
  <p>Tried updating the versions but no help</p>
  
  <pre><code>describe("Using Protractor and working", function(){
  
      var resultsExpected = [];
  
      function add(a,b){
          return new Promise(function(resolve, reject){
              element(by.model("first")).sendKeys(String(a));
              element(by.model("second")).sendKeys(String(b));
              element(by.id("gobutton")).click();     
  
              var len=0;
              len = resultsExpected.length;
              resultsExpected[len] = {value:String(a+b)};
               console.log("Length is: "+resultsExpected.length);
               console.log("Item inside: "+resultsExpected[len].value);
               resolve();
          });
  
      }
  
  it("Addition from calc should give correct result", function(){
          browser.get('http://juliemr.github.io/protractor-demo/');        
  
          add(2,4).then(function(ff){
              expect(element(by.css("h2.ng-binding")).getText()).toEqual("6");
              return add(5,3);
          }).then(function(ff){
              expect(element(by.css("h2.ng-binding")).getText()).toEqual("8");
              return add(5,8);
          }).then(function(ff){
              expect(element(by.css("h2.ng-binding")).getText()).toEqual("13");
          })
  
      })
  })
  </code></pre>
  
  <pre><code>Failures:
  1) Using Protractor and working Addition from calc should give correct result
    Message:
  [31m    Error: Error while waiting for Protractor to sync with the page: "both angularJS testability and angular testability are undefined.  This could be either because this is a non-angular page or because your test involves client-side navigation, which can interfere with Protractor's bootstrapping.  See http://git.io/v4gXM for details"[0m
    Stack:
      Error: Error while waiting for Protractor to sync with the page: "both angularJS testability and angular testability are undefined.  This could be either because this is a non-angular page or because your test involves client-side navigation, which can interfere with Protractor's bootstrapping.  See http://git.io/v4gXM for details"
          at runWaitForAngularScript.then (D:\JavaScriptWorkSpace\FirstProtractor\protractor\built\browser.js:463:23)
          at ManagedPromise.invokeCallback_ (D:\JavaScriptWorkSpace\FirstProtractor\protractor\node_modules\selenium-webdriver\lib\promise.js:1376:14)
          at TaskQueue.execute_ (D:\JavaScriptWorkSpace\FirstProtractor\protractor\node_modules\selenium-webdriver\lib\promise.js:3084:14)
          at TaskQueue.executeNext_ (D:\JavaScriptWorkSpace\FirstProtractor\protractor\node_modules\selenium-webdriver\lib\promise.js:3067:27)
          at asyncRun (D:\JavaScriptWorkSpace\FirstProtractor\protractor\node_modules\selenium-webdriver\lib\promise.js:2927:27)
          at D:\JavaScriptWorkSpace\FirstProtractor\protractor\node_modules\selenium-webdriver\lib\promise.js:668:7
          at process._tickCallback (internal/process/next_tick.js:68:7)Error
          at ElementArrayFinder.applyAction_ (D:\JavaScriptWorkSpace\FirstProtractor\protractor\built\element.js:459:27)
          at ElementArrayFinder.(anonymous function).args [as getText] (D:\JavaScriptWorkSpace\FirstProtractor\protractor\built\element.js:91:29)
          at ElementFinder.(anonymous function).args [as getText] (D:\JavaScriptWorkSpace\FirstProtractor\protractor\built\element.js:831:22)
          at D:\JavaScriptWorkSpace\FirstProtractor\WorkinWithDropDown.js:55:45
          at process._tickCallback (internal/process/next_tick.js:68:7)
  </code></pre>