I have this code: if (browser.frame(:name, "viewer").exists?) puts("Found viewer frame") viewerFrame = browser.frame(:name, "viewer") else puts("Did not find viewer frame") viewerFrame = nil end
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. C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.1/lib/firewatir/ 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 exception. 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? Thank-you Brian --~--~---------~--~----~------------~-------~--~----~ 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: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---