code: public CrawlElement withText(String text) {
  		if (this.underXpath == null || this.underXpath.isEmpty()) {
  			this.underXpath = "//" + this.tagName + "[text()=" + escapeApostrophes(text) + "]";
  		} else {
  			this.underXpath = this.underXpath + " | " + "//" + this.tagName + "[text()="
  					+ escapeApostrophes(text) + "]";
  		}
  		return this;
  	}
docs: Restrict CrawlElement to include only HTML elements which have the specified text For example 1)
  &lt;a&gt;Foo&lt;/a&gt; 2) &lt;a&gt;Bar&lt;/a&gt; 3) &lt;a&gt;Example 3a&lt;/a&gt;
  withText("Foo") will include element 1 withText("Example %") will include elements3 Text can
  support wild-card characters. Use % in to represent a wild-card string. e.g (% is the regex
  .*)
  
  @param text Text that should be inside the element.
  @return CrawlElement with text