I have a select box, with a label:
<label for="slide_orientation">Slide orientation</label>
<select disabled="" class="property" id="slide_orientation" name="slide_orientation">
<option value="horizontal">Horizontal</option>
<option value="vertical" selected="selected">Vertical</option>
</select>
As you can see the select box is disabled. When I try to find it with field_labeled("Slide orientation")
, it returns an error:
Capybara::ElementNotFound: Unable to find field "Slide orientation"
from /Users/pascal/.rvm/gems/ruby-1.9.3-p392/gems/capybara-2.0.2/lib/capybara/result.rb:22:in `find!'
When the select box is not disabled, field_labeled("Slide orientation")
returns the select element just fine.
Is this expected behavior? And if so, how would I go about finding a disabled element? In my case I need it to test if it's disabled or not.