code: public WebElement findExpectedElement(By by, boolean includeHiddenElements) {
  		log.debug("findExpectedElement() called with: " + by);
  		
  		waitForLoaders();
  		try {
  			WebElement foundElement = new WebDriverWait(getWebDriver(), getSeleniumManager().getTimeout())
  					.until(ExpectedConditions.presenceOfElementLocated(by));
  			if (includeHiddenElements || foundElement.isDisplayed()) {
  				return foundElement;
  			} else {
  				// the element is found but not visible. Wait to see if it
  				// becomes visible
  				try {
  					new WebDriverWait(getWebDriver(), getSeleniumManager().getTimeout()).until(ExpectedConditions
  							.visibilityOfElementLocated(by));
  					return foundElement;
  				} catch (WebDriverException toe) {
  					fail("Element: " + by.toString() + " is found but not visible");
  				}
  			}
  		} catch (WebDriverException wde) {
  			log.error("Expected element not found: ", wde);
  			fail("Element: " + by.toString() + " not found after waiting for " +  getSeleniumManager().getTimeout() + " seconds. Webdriver though exception: " + wde.getClass().getCanonicalName() + " with error message: " + wde.getMessage());
  		}
  
  		return null;
  	}
docs: Find an element that is expected to be on the page
  
  @param by
  - the {@link By} to find
  @param includeHiddenElements
  - should hidden elements on the page be included or not
  @return the matched {@link WebElement}
  @throws AssertionError
  if no {@link WebElement} is found or the search times out