title: ScreenShot of entire webpage using selenium-webdriver/ rc rails
body: <p>I am trying to take screenshot of an given link using selenium-webdriver. I am using the below script </p>
  
  <pre><code>require 'selenium-webdriver'
  
  driver = Selenium::WebDriver.for :firefox
  driver.navigate.to 'URL'
  driver.save_screenshot('screenshot.png')
  driver.quit
  </code></pre>
  
  <p>This is working fine but it only take screenshot of the visible area. I have also tried </p>
  
  <pre><code>driver.capture_entire_page_screenshot('test.png','');
  </code></pre>
  
  <p>and</p>
  
  <pre><code>driver.capture_entire_page_screenshot('test.png');
  </code></pre>
  
  <p>but I am getting  undefined method <code>capture_entire_page_screenshot'</code> error any suggestions how can I achieve this.
  Update, also tried the below option which is working but only taking the screenshot of visible/ full screenshot. With visible area I mean if my page has scroll its not taking the screenshot of the full page.</p>
  
  <pre><code>require 'rubygems'
  require 'selenium'
  require 'selenium-webdriver'
  require 'selenium/client'
  require 'selenium-rc'
  
  @selenium = Selenium::Client::Driver.new("localhost", 4444,"*chrome", "someurl", 1000);
  @selenium.start
  
  @selenium.open ""
  
  @selenium.wait_for_page_to_load "3000"
  @selenium.send(:sleep, 4) # Wait for Flash and other crap to load
  @selenium.capture_entire_page_screenshot('/path/to/save/screenshot.png', '');
  @selenium.stop
  </code></pre>
  
  <p>and also is there a way to use proxy in this?</p>