title: How to select option in drop down using Capybara
body: <p>I'm trying to select an item from a drop down menu using Capybara (2.1.0).</p>
  
  <p>I want to select by number (meaning select the second, third, etc option).</p>
  
  <p>I've Googled like crazy trying all sorts of things but no luck. </p>
  
  <p>I was able to select it by using the value:</p>
  
  <pre><code> find("option[value='4c430d62-f1ba-474f-8e8a-4452c55ea0a8']").click
  </code></pre>
  
  <p>But I don't want to use that method b/c the value is something that will change and that will make my test brittle.</p>
  
  <p>The HTML for the drop down is:</p>
  
  <pre><code>&lt;td class="value"&gt;
      &lt;select name="organizationSelect" id="organizationSelect" class="required"&gt;
       &lt;option value="NULL"&gt;Choose...&lt;/option&gt;
       &lt;option value="4c430d62-f1ba-474f-8e8a-4452c55ea0a8"&gt;&amp;nbsp;Institution1&lt;/option&gt;
       &lt;option value="e1a4efa7-352d-410a-957e-35c8a3b92944"&gt;&amp;nbsp;Institution / test&lt;/option&gt;
      &lt;/select&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>I also tried this:</p>
  
  <pre><code>  option = find(:xpath, "//*[@id='organizationSelect']/option[2]").text  
    select(option, :from =&gt; organizationSelect)
  </code></pre>
  
  <p>But it results in this error:</p>
  
  <pre><code>Ambiguous match, found 2 elements matching option "Institution" (Capybara::Ambiguous)
  </code></pre>
  
  <p>So how can I select the first, second, third, etc option from the drop down (using Capybara) ?</p>