code: public void isElementVisible(By locator, boolean visible) {
  		waitForLoaders();
  		if (visible) {
  			try {
  				WebElement found = new WebDriverWait(getWebDriver(), getSeleniumManager().getTimeout())
  						.until(ExpectedConditions.visibilityOfElementLocated(locator));
  			} catch (WebDriverException e) {
  				fail("The element " + locator.toString()
  						+ " is not found or invisible where it is expected as present and visible");
  			}
  		} else {
  			try {
  				boolean invisible = new WebDriverWait(getWebDriver(), getSeleniumManager().getTimeout())
  						.until(ExpectedConditions.invisibilityOfElementLocated(locator));
  			} catch (WebDriverException e) {
  				fail("The element " + locator.toString() + " is visible where it is expected as invisible");
  			}
  		}
  	}
docs: Check if the passed element is visible/invisible
  
  @param by {@link By} to be matched
  @param visible
  should the element be visible (true) or invisible (false)