Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Capybara select option not working

I've tried numerous ways to try and my capybara test to select an option from this form.

    <select id="mapping_midi_controller_id" name="mapping[midi_controller_id]"><option value="17">MIDI Fighter Classic</option>
      <option value="18">MIDI Fighter Pro</option>
      <option value="16">Traktor Control S2</option>
      <option value="15">Traktor Control S4</option>
      <option value="19">VCI-100</option>
      <option value="0">Other ...</option>
    </select>

I've tried
1)page.select "VCI-100", :from => "mapping_midi_controller_id"
2)select "19", :from => "mapping_midi_controller_id"

Any thoughts?

like image 284
rigelstpierre Avatar asked Sep 28 '12 21:09

rigelstpierre


1 Answers

I think the second command should be:

select "VCI-100", :from => "mapping_midi_controller_id"

like image 149
Pete Avatar answered Nov 15 '22 05:11

Pete