code: public void assertText(final By by, final String text) {
  		WebElement element = driver.findElement(by);
  
  		Assert.assertEquals("Element: " + element
  				+ " does NOT contain the given text: " + text, text,
  				element.getText());
  	}
docs: Verifies that the given element contains the given text. Please not that
  the method will do a JUNIT Assert causing the test to fail.
  
  @param by
  the method of identifying the element
  @param text
  the text to be matched