diff --git a/lib/capybara/node/simple.rb b/lib/capybara/node/simple.rb index 5049893d..7bf09373 100644 --- a/lib/capybara/node/simple.rb +++ b/lib/capybara/node/simple.rb @@ -108,6 +108,15 @@ module Capybara native[:checked] end + ## + # + # Whether or not the element is disabled. + # + # @return [Boolean] Whether the element is disabled + def disabled? + native[:disabled] + end + ## # # Whether or not the element is selected. diff --git a/spec/basic_node_spec.rb b/spec/basic_node_spec.rb index 0897326c..6832ba96 100644 --- a/spec/basic_node_spec.rb +++ b/spec/basic_node_spec.rb @@ -10,6 +10,11 @@ describe Capybara do

Yes it is

+
+ + +
+