master
yihua.huang 2014-06-04 22:28:27 +08:00
parent 2a15bc0289
commit eb89d66566
1 changed files with 1 additions and 5 deletions

View File

@ -27,11 +27,7 @@ public class SelectorTest {
@Test
public void testNodes() throws Exception {
Html selectable = new Html(html);
List<Selectable> divs = html.xpath("//div").nodes();
for (Selectable div : divs) {
System.out.println(div.xpath("//h2").get());
}
List<Selectable> links = selectable.xpath("//a").nodes();
assertThat(links.get(0).links().get()).isEqualTo("http://whatever.com/aaa");
}
}