frame does not support exists?(). However, you can *monkey-patch* as followed.
module Watir class Frame alias_method :_locate, :locate def locate begin return _locate rescue return nil end end def exists? return @o != nil end end end Michael ________________________________ From: Niharika Patro <niharikapa...@gmail.com> To: watir-general@googlegroups.com Sent: Thursday, January 29, 2009 4:57:13 AM Subject: [wtr-general] Unable to work with IFrame Hi, In my application, when I click on a link it opens a "Iframe". I am trying to verify whether the iframe appears or not with the following code: @@browser.frame("loginframe").exist?() or @@browser.frame(:id, "loginframe").exist?() It throws the following error: test_au_in_utility_panel(VideoPortal_Commenting_Notify): Watir::Exception::UnknownFrameException: Unable to locate a frame with name loginframe Please help in handling this. Regards Niharika --~--~---------~--~----~------------~-------~--~----~ 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 watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---