code: public static Predicate<WebDriver> ajaxCallsCompleted() {
  	return new Predicate<WebDriver>() {
  	    @Override
  	    public boolean apply(WebDriver driver) {
  		if (isVaadinActive(driver)) {
  		    return true;
  		} else {
  		    ensureBrowserRenderingTookPlace();
  		    return false;
  		}
  	    }
  
  	};
      }
docs: Waiting condition for selenium webdriver. Uses the vaadin js-api to see
  if rendering is done.
  <p>
  Taken, and fixed, from the (german) book "Vaadin".
  
  @see <a href="https://www.dpunkt.de/buecher/4526/vaadin.html">(german)
  Book: Vaadin</a>