title: ProtractorJS: Error while waiting for Protractor to sync with the page: "Could not find testability for element."
body: <p>I'm trying to end-to-end test my Angular 2 project with ProtractorJS.
  When I run <code>protractor conf.js</code> in my console, I get: </p>
  
  <pre><code> Failed: Error while waiting for Protractor to sync with the page: "Could not
   find testability for element."
  </code></pre>
  
  <p>Inside the config file:</p>
  
  <pre><code>exports.config = {
      seleniumAddress: "http://localhost:4444/wd/hub",
      framework:"jasmine2",
      capabilities: {"browserName": "chrome"},
      specs: ["todo-spec.js"]
  };
  </code></pre>
  
  <p>My root component:</p>
  
  <pre><code>&lt;section&gt;
      &lt;h1&gt;Employee Payroll Information Directory&lt;/h1&gt;
      &lt;employee-searchform&gt;&lt;/employee-searchform&gt;
  &lt;/section&gt;
  </code></pre>
  
  <p>This is the test I'm trying to run:</p>
  
  <pre><code>describe('modal component', function () {
      it('should output the employee and delete it from the array', function () {
          browser.get('http://localhost:80/Fourth/Fourth/');
          var searchField = element(by.className('.ng-valid'));
          searchField.click();
          searchField.sendKeys('Skye');
          searchField.getText().then(function (text) {
              console.log(text);
          });
          var employeeListItem = element(by.id('employee-list'));
      });
  });
  </code></pre>
  
  <p>This is what I get on the webDriver Selenium server:</p>
  
  <pre><code>23:57:25.816 INFO - Done: [execute async script: try { return (function (rootSel
  ector, callback) {
    var el = document.querySelector(rootSelector);
  
    try {
      if (window.getAngularTestability) {
        window.getAngularTestability(el).whenStable(callback);
        return;
      }
      if (!window.angular) {
        throw new Error('angular could not be found on the window');
      }
      if (angular.getTestability) {
        angular.getTestability(el).whenStable(callback);
      } else {
        if (!angular.element(el).injector()) {
          throw new Error('root element (' + rootSelector + ') has no injector.' +
  
             ' this may mean it is not inside ng-app.');
        }
        angular.element(el).injector().get('$browser').
            notifyWhenNoOutstandingRequests(callback);
      }
    } catch (err) {
      callback(err.message);
    }
  }).apply(this, arguments); }
  catch(e) { throw (e instanceof Error) ? e : new Error(e); }, [body]]
  23:57:25.899 INFO - Executing: [delete session: 35adb055-eee3-419e-b3c1-461b65b4
  18aa])
  23:57:29.157 INFO - Done: [delete session: 35adb055-eee3-419e-b3c1-461b65b418aa]
  </code></pre>