开发者

Does HtmlUnit parse HTML before getting an element. How to get the request generated by HtmlUnit

1) Does HtmlUnit parse HTML before getting an element (by sth. like HtmlWebPage.getElementBy... )? Can it be turn off? It seems to be one of the longest operations . I'd like to parse whole response by myself, not really to create HtmlElement (but if someone Could tell me how to do that , it'd be useful ) , but just to get acontent开发者_如何学Python.


2) Is there a way to get the request send to host by HtmlUnit?


3) Does setting new setStatusHandler 'distables' throwing ExceptionOnFailingStatusCode? Is there any defoult StatusHandler ? Can We extend it?


The parsing of HTML into testable objects is exactly what HtmlUnit adds, and if you don't need that, then you don't need the extra layer of HtmlUnit. Perhaps you really only need to be using HttpClient, which is what HtmlUnit uses to handle all of the communication with sites?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜