//    /**
 //     * Constructor.
 //     */
 //    protected SiteCalendarDashlet(WebDriver driver)
 //    {
 //        super(driver, DASHLET_CONTAINER_PLACEHOLDER);
 //        setResizeHandle(By.cssSelector("div.dashlet.calendar .yui-resize-handle"));
 //    }
 @SuppressWarnings("unchecked")
 public SiteCalendarDashlet render(RenderTime timer) {
   try {
     setResizeHandle(By.cssSelector("div.dashlet.calendar .yui-resize-handle"));
     while (true) {
       timer.start();
       synchronized (this) {
         try {
           this.wait(50L);
         } catch (InterruptedException e) {
         }
       }
       try {
         scrollDownToDashlet();
         getFocus();
         this.dashlet = driver.findElement(DASHLET_CONTAINER_PLACEHOLDER);
         break;
       } catch (NoSuchElementException e) {
         logger.info("The placeholder for SiteCalendarDashlet dashlet was not found  " + e);
       } catch (StaleElementReferenceException ste) {
         logger.error("DOM has changed therefore page should render once change", ste);
       } finally {
         timer.end();
       }
     }
   } catch (PageRenderTimeException te) {
     throw new NoSuchDashletExpection(
         this.getClass().getName() + " failed to find site notice dashlet", te);
   }
   return this;
 }
  @SuppressWarnings("unchecked")
  @Override
  public PeopleFinderPage render(RenderTime timer) {
    while (true) {
      timer.start();
      synchronized (this) {
        try {
          this.wait(100L);
        } catch (InterruptedException e) {
        }
      }
      try {
        // Check button is displayed and is not disabled
        WebElement searchBtn = driver.findElement(SEARCH_BUTTON);
        if (searchBtn.isEnabled()) {
          if (hasNoResultMessage()) {
            break;
          }
          if (isVisibleResults()) {
            break;
          }
          // This is the default html content hence it left to last.
          if (isHelpScreenDisplayed()) {
            if (!isVisibleResults() && !hasNoResultMessage()) {
              break;
            }
          }
        }
      } catch (NoSuchElementException nse) {
        // Repeat till we see it
      } finally {
        timer.end();
      }
    }

    return this;
  }