How get content under URL with executed js

时间:2015-06-30 13:55:27

标签: java htmlunit

I have problems with getting content by URL. I'm using HtmlUnit for parsing an HTML page, but when I run my application I don't get content without filling after executed js.

I getting html without needed me content.

Who can help me please ?

Example code:

try (final WebClient webClient = new WebClient(BrowserVersion.FIREFOX_38)) { 
    webClient.waitForBackgroundJavaScript(30 * 1000); 
    final HtmlPage page = webClient.getPage("http://.....some url"); 
    final String pageAsXml = page.asXml(); 
    final String pageAsText = page.asText(); 
 } –

0 个答案:

没有答案