Skip to content
Browse files

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

… optgroup elements
  • Loading branch information...
1 parent 170ffee commit 948de9e6d9ff152c8686e19481e74c272ef300c4 @twalpole committed Mar 15, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/capybara/rack_test/node.rb
View
6 lib/capybara/rack_test/node.rb
@@ -73,7 +73,11 @@ def selected?
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

0 comments on commit 948de9e

Please sign in to comment.
Something went wrong with that request. Please try again.