rigelstpierre
rigelstpierre

Reputation: 544

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?

Upvotes: 6

Views: 2317

Answers (1)

Pete
Pete

Reputation: 2246

I think the second command should be:

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

Upvotes: 5

Related Questions