code: private static int getButtonTop(Element element) {
  
          int top = element.getAbsoluteTop();
          int height = element.getClientHeight();
          if ((height < REQUIRED_BUTTON_HEIGHT) && (top > REQUIRED_BUTTON_HEIGHT)) {
              top = top - REQUIRED_BUTTON_HEIGHT;
          }
          return top;
      }
docs: Returns the button top position for the given reference element.<p>
  
  @param element the reference element
  
  @return the button position