I have this code:

if (browser.frame(:name, "viewer").exists?)
        puts("Found viewer frame")
        viewerFrame = browser.frame(:name, "viewer")
        puts("Did not find viewer frame")
        viewerFrame = nil

When the frame is not found I am getting an exception;

Exception running test "test_all" Message: Unable to locate a frame
using name and viewer.
htmlelements.rb:43:in `locate'

I am expecting a nil / false value.

I upgraded to 1.6.1 gems

Looking at htmlelements, it seems to me that the locate method for
Frame is the only locate method with the the code to throw the

Is it intended to have that exception?  Or is the intention that I
need to modify all my frame code to use begin/rescue in the event the
frame does not exist?


You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 

Reply via email to