Try this:

ie.checkbox(:id, 'checkbox_id').checked?

I found it here http://wtr.rubyforge.org/rdoc/ (Classes >
Watir::RadioCheckCommon
http://wtr.rubyforge.org/rdoc/classes/Watir/RadioCheckCommon.html)

Zeljko

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Terry Peppers
Sent: Wednesday, October 26, 2005 3:36 PM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] Testing If a Checkbox is Checked by Default


Is there anyway in Watir to test a webpage to see if a Checkbox is checked
by default?

I can access the checkbox name and verfy that there's a value with the
following:

------------- BEGIN CODE -------------------

assert(@ie.checkbox(:name, "other_offers"))
assert(@is.checkbox(:value, "other_offers).exists?)

------------- END CODE -------------------

But how can I tell if the box is checked? I tried using 'set' - but I don't
think that's correct. Can this be tested?


_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to