title: phantomjs doesn't scroll down using window.scollTo
body: <p>So I was using the most basic way in selenium/phantomjs to do the scroll down action.
  It seems to be all good in code, but doesn't work.
  I try to print "document.body.scrollHeight", after every scroll it stays the same. (e.g. height stays at 10532)</p>
  
  <p>I'm browsing twitter page of a certain person like "twitter.com/XXXXX"</p>
  
  <p>Can Any one give me a hint on what can I do here?</p>
  
  <p>The webdriver I'm using is phantomjs</p>
  
  <p>Here's the code:</p>
  
  <pre><code>def getfullpage(url):
      print "getting fullpage..."
      driver.get(url)
      time.sleep(2)
      reloads = 3000
      pause = 0
      driver.save_screenshot("what'shappening.jpg")
      for times in range(reloads):
          driver.execute_script("window.scrollTo(0,document.body.scrollHeight);")
          time.sleep(pause)
          newheight = driver.execute_script("return document.body.scrollHeight")
          print newheight
      page = driver.page_source.encode("utf-8","ignore")
      return page
  </code></pre>