docs: public static Element getAncestor(Element element, String className) {
  
          if (hasClass(className, element)) {
              return element;
          }
          if (element.getTagName().equalsIgnoreCase(Tag.body.name())) {
              return null;
          }
          return getAncestor(element.getParentElement(), className);
      }