Mark, I see you are correct. Frame does not have a flash method. I was trying this just as a debug step because an 'ie.text.include?' is not finding the text that I want it to. There are six frames in the page and I was trying to verify that the focus was on the one that contained the text...
What I want Watir to find is FIND THIS TEXT in the following HTML code. <TR ID="t_3_FNHR"><TD style="HEIGHT:3.18mm" class="a26" style="background-color:Beige;"><DIV class="r11">C7654321 </ DIV></TD><TD class="a27" style="background-color:Beige;"><DIV class="r11">29153207 </DIV></TD><TD class="a28" style="background-color:Beige;"><DIV class="r11">John Q Public</DIV></ TD><TD class="a29" style="background-color:Beige;"><DIV class="r11">09/13/2008</DIV></TD><TD class="a30" style="background- color:Beige;"><DIV class="r11">09/17/2008</DIV></TD><TD class="a31" style="background-color:Beige;"><DIV class="r11">FIND THIS TEXT</DIV></ TD><TD class="a32" style="background-color:Beige;"><DIV class="r11">8110</DIV></TD><TD class="a33" style="background- color:Beige;"><DIV class="r11">09/17/2008</DIV></TD><TD class="a34" style="background-color:Beige;"><DIV class="r11">Re-Open</DIV></TD><TD class="a35" style="background-color:Beige;"><DIV class="r11">Santa Fe</ DIV></TD></TR> The following Watir code says it isn't found: ie.frame(:name,"NameOfFrame") if ie.text.include? 'FIND THIS TEXT' puts " FIND THIS TEXT Found" else puts " FIND THIS TEXT Not Found" end I'm trying this for each of the six frames. I don't know if the ie.frame command should be necessary or not (or even if it's actually bringing focus to the frame). On Jan 27, 11:19 am, "Mark Anderson" <[email protected]> wrote: > Last I looked Frame objects do not have a flash method. What are you > attempting to do - beyond make a frame flash? > > I generally only use the flash methods when I am working interactively with > irb. I have not found them to be useful in my test scripts. In working > interactively with frames, I can generally ask it to show me the text or > html and be able to determine that I have a handle to the correct frame. > > /\/\ark > > > > > > > -----Original Message----- > > From: [email protected] [mailto:watir- > > [email protected]] On Behalf Of Monkeybuns > > Sent: Tuesday, January 27, 2009 11:04 AM > > To: Watir General > > Subject: [wtr-general] undefined method `flash' > > > I'm getting the following error when I try to call the 'flash' method: > > > NoMethodError: undefined method `flash' for #<Watir::Frame: > > 0x47d42dc> > > > My attempted call to 'flash' looks like this: > > > $browser = Watir::IE.new > > <...many intermediate $browser commands not included here...> > > $browser.frame(:name,"ctl140_ctl00_ctl03_ctl01").flash > > > I wonder if I'm not requiring/including something I should be. What I > > currently have is the following: > > > require 'rubygems' > > require 'watir' > > require 'test/unit/assertions' > > include Test::Unit::Assertions > > > Is there something else I should do so 'flash' will be defined? > > > __________ Information from ESET NOD32 Antivirus, version of virus > > signature database 3804 (20090127) __________ > > > The message was checked by ESET NOD32 Antivirus. > > >http://www.eset.com > > __________ Information from ESET NOD32 Antivirus, version of virus signature > database 3804 (20090127) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
