Make RackTest::Node#disabled? behavior match webdriver for option and optgroup elements

This commit is contained in:
Thomas Walpole 2013-03-15 12:11:12 -07:00
parent 170ffee951
commit 948de9e6d9
1 changed files with 5 additions and 1 deletions

View File

@ -73,7 +73,11 @@ class Capybara::RackTest::Node < Capybara::Driver::Node
end
def disabled?
string_node.disabled?
if %w(option optgroup).include? tag_name
string_node.disabled? || find_xpath("parent::*")[0].disabled?
else
string_node.disabled?
end
end
def path