code: private boolean isPopupPresent() {
          boolean isPresent = false;
          try {
              driver.switchTo().alert();
              isPresent = true;
          } catch (NoAlertPresentException e) {
              log.info(e);
          }
          return isPresent;
      }
docs: Determines if any popup is present on the page
  
  @return Boolean: is a popup present on the page