title: how to scroll with selenium
body: <p>I have here a challenge that I spent some time addressing.</p>
  
  <p>Selenium tells me that it cannot click a link that is not visible, so that means I need to scroll my canvas? I am using ubuntu 10, firefox 3, selenium 0.1, ruby 1.9.2, and selenium-webdriver 2.5.0</p>
  
  <p>My code is</p>
  
  <pre><code>driver = Selenium::WebDriver.for :firefox;
  driver.get login_url
  
  wait = Selenium::WebDriver::Wait.new(:timeout =&gt; 2)
  
  wait.until {
      driver.find_element(:name =&gt; 'j_password')
  }
  
  driver.find_element(:name =&gt; 'j_username').send_keys(username)
  
  driver.focus(:name =&gt; 'j_username')`
  </code></pre>
  
  <p>and it says that <code>focus()</code> is not defined. How should I modify my code to put the input element on screen?</p>
  
  <p>Um, this is a hypothetical example, I really need to scroll so that some other element is on the screen, but for simplicity I would like to be able to scroll s.t. <em>any</em> element is on the screen, even </p>