From b375a1c9889de31049964bc1d584540dd57ac197 Mon Sep 17 00:00:00 2001 From: benlovell Date: Tue, 29 Jan 2013 08:54:14 +0000 Subject: [PATCH] Added disabled? to simple node --- lib/capybara/node/simple.rb | 9 +++++++++ spec/basic_node_spec.rb | 14 ++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) 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

+
+ + +
+