title: Selenium PhantomJS Scrolling Down
body: <p>I tried to scrolling down with selenium, But i use webdriver PhantomJS. I tried selenium for test javascript instagram. As you know, on instagram there have button "Load More", after click button "Load More", we don't have to click again becouse it will auto refresh and it will show more image.</p>
  
  <p>I tried like this :</p>
  
  <pre><code>driver.find_element_by_xpath("//a[@class='_8ioip _glw1t']").click()
  time.sleep(5)
  
  driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
  time.sleep(3.6)
  </code></pre>
  
  <p>Actually this code it's work, but not really work, i mean something weird happening at the "time.sleep". If i give 2, the result  are few and if i give 3 the result are just pretty much, But if i give 5, the result same like i give 2.</p>
  
  <p>The question is, How to make teh Scroll get all data</p>