title: How do I select an option from a select box using Capybara in Rails 4?
body: <p>I'm trying to select an option from a select box using Capybara and I've tried multiple combinations and ways to select the item but Capybara says it can't find the element.  Here is the HTML that it is selecting from:</p>
  
  <pre><code>   &lt;select id="subject_id" name="subject[id]"&gt;&lt;option value=""&gt;Select a subject&lt;/option&gt;
      &lt;option value="25"&gt;Biology &amp;amp; Life Sciences&lt;/option&gt;
      &lt;option value="26"&gt;Business &amp;amp; Management&lt;/option&gt;
      &lt;option value="27"&gt;Chemistry&lt;/option&gt;
      &lt;option value="28"&gt;Communication&lt;/option&gt;
      &lt;option value="29"&gt;Computer Science&lt;/option&gt;
     &lt;/select&gt;
  </code></pre>
  
  <p>I've tried multiple combinations such as these to select "Computer Science" which has a value of "29" from the list:</p>
  
  <pre><code>select "Computer Science", from: "subject_id"
  
  find('subject_id').find(:xpath, 'option[29]').select_option
  
  find('subject_id').find("option[value='29']").click
  
  select "29", from: "subject[id]"
  </code></pre>
  
  <p>I know this doesn't have to do with being on the right page as I am logged in and I've run similar tests that require authentication but don't require the use of select boxes.</p>
  
  <p>Those are just among the 9 or 10 different combinations I have tried so far.  What is it that I am doing wrong and what can I do to stop getting this <code>Capybara::ElementNotFound</code> error?</p>