|
|
|
@ -28,8 +28,7 @@ public class SelectorTest {
|
|
|
|
|
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"));
|
|
|
|
|
}
|
|
|
|
|
assertThat(links.get(0).xpath("/@href").get()).isEqualTo("http://whatever.com/aaa");
|
|
|
|
|
assertThat(links.get(1).xpath("/@href").get()).isEqualTo("http://whatever.com/bbb");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|