update xsoup to 0.3.1
parent
7586e3d75c
commit
5706bb90af
2
pom.xml
2
pom.xml
|
@ -88,7 +88,7 @@
|
|||
<dependency>
|
||||
<groupId>us.codecraft</groupId>
|
||||
<artifactId>xsoup</artifactId>
|
||||
<version>0.2.4</version>
|
||||
<version>0.3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
|
|
|
@ -39,11 +39,11 @@ public class HtmlTest {
|
|||
assertThat(html.links().all()).contains("/xx/xx");
|
||||
}
|
||||
|
||||
@Test(expected = NullPointerException.class)
|
||||
@Test
|
||||
public void testNthNodesGet(){
|
||||
Html html = new Html("<a data-tip=\"p$t$xxx\" href=\"/xx/xx\">xx</a>");
|
||||
assertThat(html.xpath("//a[1]/@href").get()).isEqualTo("/xx/xx");
|
||||
Selectable selectable = html.xpath("//a[1]").nodes().get(0);
|
||||
assertThat(selectable.xpath("@href").get()).isEqualTo("/xx/xx");
|
||||
assertThat(selectable.xpath("/a/@href").get()).isEqualTo("/xx/xx");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue