title: Get values from a select list using xpath
body: <p>I'm trying to get the select list values using xpath because by id is giving me false in the exists function, but is not working</p>
  
  <pre><code>puts   $browser.select_list(:xpath,"//*[@id='numType']").exists?
  
  number = $browser.select_list(:xpath,"//*[@id='numType']").options.map(&amp;:text)
  
   number_list = Array.new
   number.each do |number_text|
        number_list &lt;&lt; "#{number_text}"
   end
  </code></pre>
  
  <p>HTML code:</p>
  
  <pre><code>&lt;div id="forwardRs"&gt;
  &lt;div class="forwardR"&gt;
  &lt;div id="forwardT" class="rc1"&gt;
    &lt;select id="forward_types" name="Foward Types" tabindex="5" onchange="changeForwardTypes(this);"&gt;
      &lt;option value="unconditional"&gt;unconditional&lt;/option&gt;
      &lt;option value="busy"&gt;busy&lt;/option&gt;
      &lt;option value="reply"&gt;reply&lt;/option&gt;
      &lt;option value="reachable"&gt;reachable&lt;/option&gt;
      &lt;option value="other"&gt;other&lt;/option&gt;
    &lt;/select&gt;
  &lt;/div&gt;
  &lt;div id="numtype" class="rc1" style=""&gt;
    &lt;select id="numType" onchange="changeNumType(this);" name="numbers" tabindex="5"&gt;
      &lt;option value="ex"&gt;Ex&lt;/option&gt;
      &lt;option value="in"&gt;In&lt;/option&gt;
    &lt;/select&gt;
  &lt;/div&gt;
  &lt;div id="rule" class="rc1" style=""&gt;
    &lt;input id="tel" type="text" value="" size="20" name="tel" tabindex="2" onchange="changeNumberRule(this);"&gt;
  &lt;/div&gt;
  &lt;div id="removeForwardRule" class="rc3"&gt;
    &lt;a onclick="removeForwardRule(this);"&gt;
     &lt;img src="../../images/delete.png"&gt;
    &lt;/a&gt;
  </code></pre>
  
  <p>
     </p>
  
  <p>How can i do this?</p>
  
  <p>Tanks</p>