title: Wait for element to be visible in Protractor
body: <p>I spent a couple days trying to make Protractor click elements that are visible on the page appearing after a click on a button. But most of the time I have this error:</p>
  
  <pre><code>  Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
    Stack:
      Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
          at ontimeout (timers.js:498:11)
          at tryOnTimeout (timers.js:323:5)
          at Timer.listOnTimeout (timers.js:290:5)
  </code></pre>
  
  <p>I tried a couple things so far:</p>
  
  <ul>
  <li><code>browser.waitForAngular</code> was blocking the script, even though I could
  see I was on the second page. </li>
  <li><p>Multiple <code>browser.driver.wait</code> implementation, like this one:</p>
  
  <p>browser.driver.wait(EC.visibilityOf($('li.unsigned')), 10000).then(() => {
    element($('li.unsigned')).click();
  })</p></li>
  <li><p><code>protractor.ExpectedConditions</code> as you can see above, which did not work as well.</p></li>
  <li><p>I also added an option in my onPrepare script to manage implicitWait, like so:</p>
  
  <p>onPrepare: function () {
      browser.manage().timeouts().implicitlyWait(15000);</p></li>
  </ul>
  
  <p>The only way I got it to work was to remove everything I tried and use a browser.sleep(10000) before trying to click the element.</p>
  
  <p>If anybody has an idea of what could cause the issue, or what else I could try, you're welcome! </p>