title: Can't find element to click on using Capybara + Rails3
body: <p><strong>Background</strong>: I'm using Capybara with Rspec to test a Rails 3 app.
  <strong>Driver used</strong>: Selenium</p>
  
  <p><strong>Problem</strong>:
  I can't find the "Sign in" button in order to click on from within my test.</p>
  
  <p><strong>HTML code:</strong></p>
  
  <pre><code>&lt;form accept-charset="UTF-8" action="/" class="filter_form" id="login" method="post"&gt;
          &lt;fieldset&gt;
            &lt;div class="modal-body"&gt;
              &lt;div class="clearfix login-fields"&gt;
                &lt;label for="user_email"&gt;Email&lt;/label&gt;
                &lt;div class="input login-inputs"&gt;
                  &lt;input class="input-text" id="user_email" name="user[email]" placeholder="email" size="30" type="email" value=""&gt;
                &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="clearfix login-fields"&gt;
                &lt;label for="user_password"&gt;Password&lt;/label&gt;
                &lt;div class="input login-inputs"&gt;
                  &lt;input class="input-text" id="user_password" name="user[password]" placeholder="password" size="30" type="password"&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="modal-footer"&gt;
              &lt;input class="btn btn-primary login_btn" id="btn_login" name="commit" type="submit" value="Sign in"&gt;
              &lt;a href="/lms/forgot_password" class="btn"&gt;Forgot password...&lt;/a&gt;
              &lt;a href="#" class="btn close cancel" data-dismiss="modal"&gt;Cancel&lt;/a&gt;
            &lt;/div&gt;
          &lt;/fieldset&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>Failing test</strong></p>
  
  <pre><code>it "should login correctly if the right credentials are given", :js =&gt; true do
  
      Capybara.default_wait_time = 5
      Capybara.reset_sessions!
      visit '/'
      click_link('login_link') #this will bring a modal window with the code posted above using js
      within("#login") do
        fill_in 'user_email', :with =&gt; "my-email@example.com"
        fill_in 'user_password', :with =&gt; "mypwd"
      end
  
      response.should have_selector('input#btn_login') #This passes
      click_on("input#btn_login") #Here it fails, saying it can't find an element with that selector
      response.should have_selector(:xpath, '//div[@class="alert-message block-message info"]')
    end
  </code></pre>
  
  <p>My test file is inside <code>spec/requests</code>.</p>
  
  <p>Any ideas?
  Thanks!</p>