title: Selenium: Wait for element's width to be greater than X
body: <p>I have a page that does some processing and displays a progress bar.</p>
  
  <p>I want to press the cancel button when the filling of the progress bar has at least 50% width. </p>
  
  <p>How can I create a custom wait condition ?</p>
  
  <pre><code>    driver.findElement(By.id('bar')).then(function (stateEl) {
        // driver.wait(until. ?? By.xpath? 
      }).then(done);
  </code></pre>