[Wtr-general] [question] Accesing CHECKED propertie for Checkboxes?
Andy Sipe
andy__s at hotmail.com
Thu May 11 13:27:31 EDT 2006
isSet? is the method you are looking for -- it'll tell you if a radiobox or
checkbox is 'checked'.
-andy
----Original Message Follows----
From: "Rodrigo Julian Martin" <rodrigo.martin at enratio.com>
Reply-To: wtr-general at rubyforge.org
To: <wtr-general at rubyforge.org>
Subject: [Wtr-general] [question] Accesing CHECKED propertie for Checkboxes?
Date: Thu, 11 May 2006 14:00:51 -0300
Hi all!
I am using the iterator of checkboxes in order to clear all the
checkboxes in a page...
$browser.checkboxes.each do |check|
check.clear
end
But, this is taking too much processing time... I was thinking that
maybe if I check if the checkbox is CHECKED, this could be done in less
time...
But, I can't access the .checked propertie of a checkbox right?
I've tried this:
$browser.checkboxes.each do |check|
if check.checked==true then
check.clear
end
end
and the output was:
test_mejoratiempo:12: undefined method `checked' for
#<Watir::CheckBox:0x2e09620> (NoMethodError)
from test_mejoratiempo:11:in `each'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2108:in `upto'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2108:in `each'
from test_mejoratiempo:11
Execution completed with exit code 1.
Anyway, do you think this could reduce the processing time? Should I
touch Watir.rb in order to see this CHECKED propertie?
Thanks in Advance
Cheers, Rodrigo Julian Martin
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
More information about the Wtr-general
mailing list