public void waitForElementToContainText(final By by,
			final int maximumSeconds) {
		(new WebDriverWait(driver, maximumSeconds))
				.until(new ExpectedCondition<Boolean>() {
					public Boolean apply(final WebDriver error1) {
						return !driver.findElement(by).getText().isEmpty();
					}
				});
	}
public void waitForElementToContainText ( final By by , final int maximumSeconds ) { ( new WebDriverWait ( driver , maximumSeconds ) ) . until ( new ExpectedCondition < Boolean > ( ) { public Boolean apply ( final WebDriver error1 ) { return ! driver . findElement ( by ) . getText ( ) . isEmpty ( ) ; } } ) ; }
Waits for an element to contain some text.

@param by
the method of identifying the element
@param maximumSeconds
the maximum number of seconds to wait