how is this any different than ie.frame(:name, "mainFrame").exists?
On Fri, Aug 20, 2010 at 04:43, pierrelebai...@gmail.com < pierrelebai...@gmail.com> wrote: > Hi, > > I write a little procedure to test if a frame exists before access a > object and have an error by locate method if the frames doesn't exist. > > before having an exists? methode in the next watir version ? > > def existsFrame(myIe,frameName="") > begin > if frameName != "" > myFrame = myIe.frame(:name,frameName) > return true > else > # frameName is empty return false > return false > end > > rescue > return false # frameName doesn't exist return false > end > end > > > def main > ie=.... > ... > if existsFrame(ie,"mainFrame") > ..... > end > end > > -- > Before posting, please read http://watir.com/support. In short: search > before you ask, be nice. > > You received this message because you are subscribed to > http://groups.google.com/group/watir-general > To post: watir-general@googlegroups.com > To unsubscribe: > watir-general+unsubscr...@googlegroups.com<watir-general%2bunsubscr...@googlegroups.com> > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com