2

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.

  1. Can I imitate the scroll down action(lets think using scroll element). or
  2. Can i imitate it using j script.

if this can do please explain the way.

Thanks.

Lalith J.
  • 1,311
  • 4
  • 16
  • 25
  • You can find some more informations in [this][1] question [1]: http://stackoverflow.com/questions/12119610/crawl-dynamic-web-page-using-htmlunit – Srneczek May 01 '13 at 15:47

1 Answers1

2

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.

Krzysztof Atłasik
  • 18,129
  • 4
  • 42
  • 64
larry
  • 21
  • 2