title: Capture dynamic list to an array using Ruby
body: <p>I've re-written this question so that it makes more sense.</p>
  
  <p>Is there a way to enable Ruby to listen for a newly created (dynamic) select-list on a webpage and save that list into an array?</p>
  
  <p>This would be the scenario:</p>
  
  <ol>
  <li>User Selects a Branch number, 02</li>
  <li>User selects a person type, missionary</li>
  <li>A new dynamic select list of missionary names is generated</li>
  </ol>
  
  <p>Ruby would need to capture the dynamically created list of names and save them into an array.  This is the code thus far:</p>
  
  <pre><code>missionaries = Array.new
  
  browser.select_list(:id,'branch_select').select_value('02')
  browser.select_list(:id,'user_type_select').select_value('1') # 1 = Missionary
  browser.select_list(:index,2).click # &lt;-This is the dynamically created list
  missionaries = browser.select_list(:index,2) # &lt;-This is just a guess, doesn't work
  puts "Missionary List: " + missionaires.to_s # &lt;-Prints to verify list saved
  </code></pre>
  
  <p>What this actually prints to screen is this:</p>
  
  <pre><code> Missionary List: #&lt;Watir::Select:0x147e54e&gt;
  </code></pre>