title: Protractor wait for element on a non-angular page
body: <p>I am testing a page using protractor. Of the various test cases, I need to wait until the objects have loaded. The following are excerpts from the scripts. While this does not display any errors, it fails to wait for the object to appear and the test cases fail until the page is able to catch up.</p>
  
  <p>login.e2e-spec.ts</p>
  
  <pre><code>  it('should display company logo', () =&gt; {
      page.navigateTo();
      page.clickImplicitGrantButton()
        .then(() =&gt; browser.wait(ExpectedConditions.visibilityOf(browser.getLogo()), 10000))
        .then(() =&gt; page.isLogoVisible()
        .then((isVisible) =&gt; {
          expect(isVisible).toBe(true);
      }));
    });
  </code></pre>
  
  <p>login.po.ts</p>
  
  <pre><code>clickImplicitGrantButton() {
      return $('button.mat-button#implicit').click();
    }
  
  getLogo() {
      return browser.driver.findElement(by.className('main-logo'));
    }
  
  isLogoVisible() {
      return this.getLogo().isDisplayed();
    }
  </code></pre>