code: public void waitForElementToContainSpecificText(final By by,
  			final String text, final int maximumSeconds) {
  		WebDriverWait wait = new WebDriverWait(driver, maximumSeconds);
  		wait.until(ExpectedConditions.textToBePresentInElement(by, text));
  	}
docs: Waits until an element contains a specific text.
  
  @param by
  method of identifying the element
  @param text
  the element text to wait for
  @param maximumSeconds
  the maximum number of seconds to wait for