title: Capybara can find but not fill_in
body: <p>I am having some very strange behaviour with Capybara. It stubbornly refuses to fill in the fields of my login form.</p>
  
  <pre><code>&lt;fieldset&gt;
    &lt;div class="clearfix"&gt;
      &lt;label for="user_email"&gt;E-Mail Adresse&lt;/label&gt;
      &lt;div class="input"&gt;
        &lt;input id="user_email" name="user[email]" size="30" type="email" value=""&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  
    &lt;div class="clearfix"&gt;
      &lt;label for="user_password"&gt;Passwort&lt;/label&gt;
      &lt;div class="input"&gt;
        &lt;input id="user_password" name="user[password]" size="30" type="password" value=""&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  
    &lt;div class="clearfix"&gt;
      &lt;div class="input"&gt;
        &lt;input name="user[remember_me]" type="hidden" value="0"&gt;
        &lt;input id="user_remember_me" name="user[remember_me]" type="checkbox" value="1"&gt;
        &lt;label for="user_remember_me"&gt;angemeldet bleiben&lt;/label&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/fieldset&gt;
  </code></pre>
  
  <p>And here is where the fun begins:</p>
  
  <pre><code>within("#login_form"){ find("#user_email")}                                              
  =&gt; #&lt;Capybara::Element tag="input" path="/html/body/div[2]/div[@id='content']/div/div[1]/form[@id='login_form']/fieldset/div[1]/div/input[@id='user_email']"&gt;
  within("#login_form"){ fill_in("#user_email", with: "foo@example.com")}                  
  Capybara::ElementNotFound: Unable to find field "#user_email"
  </code></pre>
  
  <p>I don't quite understand how it is possible to be able to find, and yet not find, an element.
  Another pair of eyes on this would be appreciated.</p>