diff --git a/webmagic-core/src/test/java/us/codecraft/webmagic/selector/SelectorTest.java b/webmagic-core/src/test/java/us/codecraft/webmagic/selector/SelectorTest.java index 16b1b48f..04158aab 100644 --- a/webmagic-core/src/test/java/us/codecraft/webmagic/selector/SelectorTest.java +++ b/webmagic-core/src/test/java/us/codecraft/webmagic/selector/SelectorTest.java @@ -28,8 +28,7 @@ public class SelectorTest { public void testNodes() throws Exception { Html selectable = new Html(html); List 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"); } }