Commit eb89d665 authored by yihua.huang's avatar yihua.huang

fix test

parent 2a15bc02
...@@ -27,11 +27,7 @@ public class SelectorTest { ...@@ -27,11 +27,7 @@ public class SelectorTest {
@Test @Test
public void testNodes() throws Exception { public void testNodes() throws Exception {
Html selectable = new Html(html); Html selectable = new Html(html);
List<Selectable> divs = html.xpath("//div").nodes(); List<Selectable> links = selectable.xpath("//a").nodes();
for (Selectable div : divs) {
System.out.println(div.xpath("//h2").get());
}
assertThat(links.get(0).links().get()).isEqualTo("http://whatever.com/aaa"); assertThat(links.get(0).links().get()).isEqualTo("http://whatever.com/aaa");
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment