|
|
@ -23,4 +23,13 @@ public class SelectorTest {
|
|
|
|
assertThat(linksWithoutChain).hasSameSizeAs(linksWithChainFirstCall);
|
|
|
|
assertThat(linksWithoutChain).hasSameSizeAs(linksWithChainFirstCall);
|
|
|
|
assertThat(linksWithChainFirstCall).hasSameSizeAs(linksWithChainSecondCall);
|
|
|
|
assertThat(linksWithChainFirstCall).hasSameSizeAs(linksWithChainSecondCall);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
|
|
public void testNodes() throws Exception {
|
|
|
|
|
|
|
|
Html selectable = new Html(html);
|
|
|
|
|
|
|
|
List<Selectable> links = selectable.xpath("//a").nodes();
|
|
|
|
|
|
|
|
for (Selectable link : links) {
|
|
|
|
|
|
|
|
System.out.println(link.xpath("/@href"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|