Using cucumber and capybara to test a rails app. Assuming I cannot change the markup, can I use capybara to select the following select in a page full of similar tds and selects?
<td>
<select name="attributes[ruby][category]">
<option value="2" selected="selected">Languages</option>
<option value="3">Communication</option>
</select>
</td>
This seems to fail (I assume because of the nested “[” and “]”).
find("select[name=attributes[ruby][category]]")
Escaping doesn’t work either. Thoughts?
You can try
find('select', :name => 'attributes[ruby][category]')orfind_field('attributes[ruby][category]').