@Test
public void withTextTest() {

    Path el = div.withText("AB");
    NodeList nodes = findAllByXpath("<div>ab</div><div>abc</div><div class='container'><div class='a'><div class='a.a'></div></div><span class='b'/></div><div>c</div><div></div><span class='abc'></span>", el);
    assertThat(nodes.getLength(), is(1));
    assertThat(getText(nodes.item(0)), equalTo("ab"));
    assertThat(el.toString(), is(equalTo("div, that has the text \"AB\"")));
}