contributor
parent
db0195babb
commit
5e8ca02ec6
|
@ -146,6 +146,7 @@ Thanks these people for commiting source code, reporting bugs or suggesting for
|
||||||
* [seveniu](https://github.com/seveniu)
|
* [seveniu](https://github.com/seveniu)
|
||||||
* [sebastian1118](https://github.com/sebastian1118)
|
* [sebastian1118](https://github.com/sebastian1118)
|
||||||
* [codev777](https://github.com/codev777)
|
* [codev777](https://github.com/codev777)
|
||||||
|
* [fengwuze](https://github.com/fengwuze)
|
||||||
|
|
||||||
|
|
||||||
### Thanks:
|
### Thanks:
|
||||||
|
|
|
@ -27,7 +27,11 @@ 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> links = selectable.xpath("//a").nodes();
|
List<Selectable> divs = html.xpath("//div").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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue