I want to run through a set of checkboxes on an input page and press the [Submit] button in the shortest amount of lines.  Using the API reference, I came up with the following that works for me:

> ie.frame('MainWindow').checkboxes.each { |x| x.set }

The only problem is that sometimes a checkbox *may* be disabled when you enter this page.  In that case, when the loop above gets to the disabled checkbox, it spits out an 'ObjectDisabledException' error (as expected).  Is there a quick and easy way that I can get this loop to just skip any disabled checkboxes and continue?

I can't think of any way to use an 'if' or 'unless' argument that will capture the exception and continue.  Do I have to expand out the loop and insert 'rescue' lines?

Paul.

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to