问题
I have a web page which continues to loading the contents when ONLY scrolling down the page.
So I want a way to scroll down the page pragmatically using HtmlUnit or PanthomJS.
- Can I imitate the scroll down action(lets think using scroll element). or
- Can i imitate it using j script.
if this can do please explain the way.
Thanks.
回答1:
You can set InnerHeight a large value. like this:
webClient.getCurrentWindow().setInnerHeight(60000);
the webcontrol will load all element,because of the webcontrol enough heigt.
来源:https://stackoverflow.com/questions/13779369/how-to-scrolldwon-a-web-page-using-htmlunit-or-panthomjs