我有一个包含以下内容的html文件:
<td> <a href="/romarin/detail.do?ID=0"> NAME </a> </td>
如何使用HtmlUnit在
href
上打开链接?我的代码如下:
final WebClient webClient = new WebClient(BrowserVersion.INTERNET_EXPLORER_11);
final HtmlPage page1 = webClient.getPage("file:\\" + newrfile);
final HtmlSubmitInput button = form.getInputByName("submit");
final HtmlPage page2 = button.click();
System.out.println(page2.asText());
final HtmlForm form2 = page2.getFormByName("SearchForm");