From Mark.Hammond at derivco.com Tue Mar 1 04:03:59 2005 From: Mark.Hammond at derivco.com (Mark Hammond) Date: Tue, 1 Mar 2005 11:03:59 +0200 Subject: [Wtr-general] Keywords to be used in WATIR Message-ID: <0E839478EC690748ACC9A1B10DB0BCBC04C871B7@EXCHANGE.mgsops.net> Hi there I am very new to WATIR and I am going through it. My question is, is there a list of keywords that I can use in WATIR, for example I know I can use $ie.pageContainsText, how do I know if there is a keyword such as pageContainsButton? Thanks Mark :-) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050301/6fa19299/attachment.html From jkohl at telusplanet.net Tue Mar 1 04:33:07 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Tue, 1 Mar 2005 02:33:07 -0700 Subject: [Wtr-general] Keywords to be used in WATIR In-Reply-To: <0E839478EC690748ACC9A1B10DB0BCBC04C871B7@EXCHANGE.mgsops.net> Message-ID: <20050301093157.DOVF6544.priv-edtnes40.telusplanet.net@tintin> Have you looked at the User Guide? http://wtr.rubyforge.org/watir_user_guide.html It's also part of the install. There is also the RDoc that will be in the zip or tarball for the release. Rdoc/index.html The unit tests are also a good place to look for examples: watir_bonus/unitTests We are working on a more definitive user manual that should start appearing in the coming weeks. -Jonathan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mark Hammond Sent: March 1, 2005 2:04 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Keywords to be used in WATIR Hi there I am very new to WATIR and I am going through it. My question is, is there a list of keywords that I can use in WATIR, for example I know I can use $ie.pageContainsText, how do I know if there is a keyword such as pageContainsButton? Thanks Mark :-) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050301/efaa1315/attachment.html From paul.rogers at shaw.ca Tue Mar 1 10:23:59 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 01 Mar 2005 08:23:59 -0700 Subject: [Wtr-general] Keywords to be used in WATIR In-Reply-To: <20050301093157.DOVF6544.priv-edtnes40.telusplanet.net@tintin> Message-ID: <000a01c51e72$b1d0bfc0$6400a8c0@NewDell> Mark, A good place to look is also in the unit tests. The unit tests exercise all ( I hope) features of watir These would be normally be in c:\watir_bonus\unittests Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: 01 March 2005 02:33 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Keywords to be used in WATIR Have you looked at the User Guide? http://wtr.rubyforge.org/watir_user_guide.html It's also part of the install. There is also the RDoc that will be in the zip or tarball for the release. Rdoc/index.html The unit tests are also a good place to look for examples: watir_bonus/unitTests We are working on a more definitive user manual that should start appearing in the coming weeks. -Jonathan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mark Hammond Sent: March 1, 2005 2:04 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Keywords to be used in WATIR Hi there I am very new to WATIR and I am going through it. My question is, is there a list of keywords that I can use in WATIR, for example I know I can use $ie.pageContainsText, how do I know if there is a keyword such as pageContainsButton? Thanks Mark :-) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050301/1c507f19/attachment.html From bret at pettichord.com Tue Mar 1 10:52:04 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 01 Mar 2005 09:52:04 -0600 Subject: [Wtr-general] Keywords to be used in WATIR In-Reply-To: <20050301093157.DOVF6544.priv-edtnes40.telusplanet.net@tint in> References: <0E839478EC690748ACC9A1B10DB0BCBC04C871B7@EXCHANGE.mgsops.net> Message-ID: <5.1.0.14.2.20050301095055.02f596f8@127.0.0.1> At 03:33 AM 3/1/2005, Jonathan Kohl wrote: >There is also the RDoc that will be in the zip or tarball for the release. >Rdoc/index.html This should be the definitive source. I think it currently documents the camelcase methods and needs to be updated to only include the ruby-style methods. Although the camel case ones are still there, we are discouraging their use, esp to new users. Bret _____________________ Bret Pettichord www.pettichord.com From jkohl at telusplanet.net Tue Mar 1 10:54:54 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Tue, 1 Mar 2005 07:54:54 -0800 Subject: [Wtr-general] Keywords to be used in WATIR In-Reply-To: <5.1.0.14.2.20050301095055.02f596f8@127.0.0.1> References: <0E839478EC690748ACC9A1B10DB0BCBC04C871B7@EXCHANGE.mgsops.net> <5.1.0.14.2.20050301095055.02f596f8@127.0.0.1> Message-ID: <1109692494.4224904ee1b91@webmail.telus.net> > This should be the definitive source. I think it currently documents the > camelcase methods and needs to be updated to only include the ruby-style > methods. Although the camel case ones are still there, we are discouraging > their use, esp to new users. have we added this to the install so it ends up in the watir_bonus directory? Or is there a different idea for where to put these? -Jonathan From dallenusa at yahoo.com Tue Mar 1 11:36:42 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Tue, 1 Mar 2005 08:36:42 -0800 (PST) Subject: [Wtr-general] Form Titles In-Reply-To: <000f01c519c6$a3a70c20$6400a8c0@NewDell> Message-ID: <20050301163642.69565.qmail@web30508.mail.mud.yahoo.com> Paul, Trying to find the frames I get the following returned info for my different attempts. $ie.frame("MainBody").showFrames RETURNS: there are 0 frames $ie.showAllObjects RETURNS: -----------Objects in page ------------- HTML Document name=TopBar id=TopBar src=Main/TopBar.asp HTML Document name=LeftBar id=LeftBar src=Main/Navigator.asp HTML Document name=MainBody id=MainBody src=forms/DepartmentF.asp $ie.showFrames RETURNS: there are 3 frames frame index: 0 name: TopBar frame index: 1 name: LeftBar frame index: 2 name: MainBody $ie.frame("MainBody").showForms RETURNES There are 0 forms $ie.showFormes RETURNS c:/watir-v1_0_4/examples/TimeCentre.rb:112: undefined method `showFormes' for #(NoMethodError) --- Paul Rogers wrote: > Do you have a nested frame? From an earlier post, > you have > > "..If I view all objects I see: > src=forms/EditTimeCardF.asp" > > Which looks like a frame, so maybe try this: > > ie.frame('MainBody').show_frames > > And then use > > ie.frame('MainBody').frame('xxx').showAllObjects > > Where xxx is the name that you get from show_frames > above > > > My earlier post of > $ie.frame("MainBody").ie.document.title gives a nil > for document, which I think means a frameset. > > > Or can you post some html? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf > Of Richard Allen > Sent: 23 February 2005 08:14 > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] Form Titles > > > That returns 'There are 0 forms' > > --- Bret Pettichord wrote: > > > try ie.frame('MainBody').show_forms > > > > At 04:54 PM 2/22/2005, Richard Allen wrote: > > >We load forms into frames .. we mave a "MainBody" > > >frame and we load EditTimeCardF into it. If I > view > > src > > >I see EditTimeCardF at the very top in what I > would > > >call a Title. > > > > > >If I view all objects I see: > > > > > >src=forms/EditTimeCardF.asp > > > > > > > > >I want to verify that the title of the from > loaded > > is > > >EditTimeCardF. If I try to ShowForms, 0 are > found. > > >Titles doesn't seem to found either. > > > > > >Any thought? > > > > > > >__________________________________________________ > > >Do You Yahoo!? > > >Tired of spam? Yahoo! Mail has the best spam > > protection around > > >http://mail.yahoo.com > _______________________________________________ > > >Wtr-general mailing list > > >Wtr-general at rubyforge.org > > >http://rubyforge.org/mailman/listinfo/wtr-general > > > > _____________________ > > Bret Pettichord > > www.pettichord.com > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________ Do you Yahoo!? Yahoo! Mail - Easier than ever with enhanced search. Learn more. http://info.mail.yahoo.com/mail_250 From paul.rogers at shaw.ca Tue Mar 1 12:33:41 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 01 Mar 2005 10:33:41 -0700 Subject: [Wtr-general] Form Titles In-Reply-To: <20050301163642.69565.qmail@web30508.mail.mud.yahoo.com> Message-ID: <001701c51e84$cfb7c210$6400a8c0@NewDell> Ive kind of lost track of what we were trying to do - something about the title, but try this: $ie.frame("MainBody").showAllObjects Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Richard Allen Sent: 01 March 2005 09:37 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Form Titles Paul, Trying to find the frames I get the following returned info for my different attempts. $ie.frame("MainBody").showFrames RETURNS: there are 0 frames $ie.showAllObjects RETURNS: -----------Objects in page ------------- HTML Document name=TopBar id=TopBar src=Main/TopBar.asp HTML Document name=LeftBar id=LeftBar src=Main/Navigator.asp HTML Document name=MainBody id=MainBody src=forms/DepartmentF.asp $ie.showFrames RETURNS: there are 3 frames frame index: 0 name: TopBar frame index: 1 name: LeftBar frame index: 2 name: MainBody $ie.frame("MainBody").showForms RETURNES There are 0 forms $ie.showFormes RETURNS c:/watir-v1_0_4/examples/TimeCentre.rb:112: undefined method `showFormes' for #(NoMethodError) --- Paul Rogers wrote: > Do you have a nested frame? From an earlier post, > you have > > "..If I view all objects I see: > src=forms/EditTimeCardF.asp" > > Which looks like a frame, so maybe try this: > > ie.frame('MainBody').show_frames > > And then use > > ie.frame('MainBody').frame('xxx').showAllObjects > > Where xxx is the name that you get from show_frames > above > > > My earlier post of > $ie.frame("MainBody").ie.document.title gives a nil > for document, which I think means a frameset. > > > Or can you post some html? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Richard Allen > Sent: 23 February 2005 08:14 > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] Form Titles > > > That returns 'There are 0 forms' > > --- Bret Pettichord wrote: > > > try ie.frame('MainBody').show_forms > > > > At 04:54 PM 2/22/2005, Richard Allen wrote: > > >We load forms into frames .. we mave a "MainBody" > > >frame and we load EditTimeCardF into it. If I > view > > src > > >I see EditTimeCardF at the very top in what I > would > > >call a Title. > > > > > >If I view all objects I see: > > > > > >src=forms/EditTimeCardF.asp > > > > > > > > >I want to verify that the title of the from > loaded > > is > > >EditTimeCardF. If I try to ShowForms, 0 are > found. > > >Titles doesn't seem to found either. > > > > > >Any thought? > > > > > > >__________________________________________________ > > >Do You Yahoo!? > > >Tired of spam? Yahoo! Mail has the best spam > > protection around > > >http://mail.yahoo.com > _______________________________________________ > > >Wtr-general mailing list > > >Wtr-general at rubyforge.org > > >http://rubyforge.org/mailman/listinfo/wtr-general > > > > _____________________ > > Bret Pettichord > > www.pettichord.com > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________ Do you Yahoo!? Yahoo! Mail - Easier than ever with enhanced search. Learn more. http://info.mail.yahoo.com/mail_250 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From dallenusa at yahoo.com Tue Mar 1 12:55:41 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Tue, 1 Mar 2005 09:55:41 -0800 (PST) Subject: [Wtr-general] Form Titles In-Reply-To: <001701c51e84$cfb7c210$6400a8c0@NewDell> Message-ID: <20050301175541.35277.qmail@web30503.mail.mud.yahoo.com> I'm trying to veify that a particular form is displayed. I'd rather grab the form name than text on the form since I will know the form name before hand and will not have to worry that they changed the text on the form. I can't seem to locate any form name. The closest I get is with $ie.showAllObjects which shows me: src=forms/DepartmentF.asp I haven't been able to cature the forms title to verify. $ie.frame("MainBody").showForms RETURNES There are 0 forms $ie.showFormes RETURNS: c:/watir-v1_0_4/examples/TimeCentre.rb:112: undefined method `showFormes' for #(NoMethodError) $ie.showAllObjects RETURNS: -----------Objects in page ------------- HTML Document name=TopBar id=TopBar src=Main/TopBar.asp HTML Document name=LeftBar id=LeftBar src=Main/Navigator.asp HTML Document name=MainBody id=MainBody src=forms/DepartmentF.asp $ie.frame("MainBody").showAllObjects RETURNS: -----------Objects in page ------------- text/css id= id= src=/timecentre2/Common/Common.js id= src=/timecentre2/Common/Common.vbs id= src=/timecentre2/Common/DataBar.vbs id= src=/timecentre2/Common/DataBar.js id= src=/timecentre2/Common/Grid.vbs id= src=/timecentre2/Common/DatabarFunctions.vbs id= src=/timecentre2/Common/GridFunctions.vbs id=clientRoutines src= id=clientEventHandlersVBS src= name= id= alt= id= src= name= id=rdcData alt= id= src= name= id=rdcUserRights alt= id= src= name= id=Grid alt= button name= id=btnFirst value=   button name= id=btnPrev value=   button name= id=btnNext value=   button name= id=btnLast value=   button name= id=btnRefresh value=Refresh button name= id=btnSave value=Save button name= id=btnNew value=New button name= id=btnDelete value=Delete button name= id=btnCancel value=Cancel button name= id=btnPrint value=Print button name= id=btnHelp value=Help --- Paul Rogers wrote: > Ive kind of lost track of what we were trying to do > - something about > the title, but try this: > > $ie.frame("MainBody").showAllObjects > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf > Of Richard Allen > Sent: 01 March 2005 09:37 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Form Titles > > > Paul, > > Trying to find the frames I get the following > returned > info for my different attempts. > > > > $ie.frame("MainBody").showFrames > RETURNS: > there are 0 frames > > > $ie.showAllObjects > RETURNS: > -----------Objects in page ------------- > HTML Document name=TopBar id=TopBar > > src=Main/TopBar.asp > HTML Document name=LeftBar id=LeftBar > > src=Main/Navigator.asp > HTML Document name=MainBody id=MainBody > > src=forms/DepartmentF.asp > > > $ie.showFrames > RETURNS: > there are 3 frames > frame index: 0 name: TopBar > frame index: 1 name: LeftBar > frame index: 2 name: MainBody > > > $ie.frame("MainBody").showForms > RETURNES > There are 0 forms > > $ie.showFormes > RETURNS > c:/watir-v1_0_4/examples/TimeCentre.rb:112: > undefined > method `showFormes' for > #(NoMethodError) > > > > --- Paul Rogers wrote: > > > Do you have a nested frame? From an earlier post, > > you have > > > > "..If I view all objects I see: > > src=forms/EditTimeCardF.asp" > > > > Which looks like a frame, so maybe try this: > > > > ie.frame('MainBody').show_frames > > > > And then use > > > > ie.frame('MainBody').frame('xxx').showAllObjects > > > > Where xxx is the name that you get from > show_frames > > above > > > > > > My earlier post of > > $ie.frame("MainBody").ie.document.title gives a > nil > > for document, which I think means a frameset. > > > > > > Or can you post some html? > > > > Paul > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On > Behalf Of Richard Allen > > Sent: 23 February 2005 08:14 > > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] Form Titles > > > > > > That returns 'There are 0 forms' > > > > --- Bret Pettichord wrote: > > > > > try ie.frame('MainBody').show_forms > > > > > > At 04:54 PM 2/22/2005, Richard Allen wrote: > > > >We load forms into frames .. we mave a > "MainBody" > > > >frame and we load EditTimeCardF into it. If I > > view > > > src > > > >I see EditTimeCardF at the very top in what I > > would > > > >call a Title. > > > > > > > >If I view all objects I see: > > > > > > > >src=forms/EditTimeCardF.asp > > > > > > > > > > > >I want to verify that the title of the from > > loaded > > > is > > > >EditTimeCardF. If I try to ShowForms, 0 are > > found. > > > >Titles doesn't seem to found either. > > > > > > > >Any thought? > > > > > > > > > > >__________________________________________________ > > > >Do You Yahoo!? > > > >Tired of spam? Yahoo! Mail has the best spam > > > protection around > > > >http://mail.yahoo.com > > _______________________________________________ > > > >Wtr-general mailing list > > > >Wtr-general at rubyforge.org > > > > >http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > _____________________ > > > Bret Pettichord > > > www.pettichord.com > > > > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > > protection around > > http://mail.yahoo.com > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail - Easier than ever with enhanced search. > Learn more. > http://info.mail.yahoo.com/mail_250 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________ Do you Yahoo!? Yahoo! Sports - Sign up for Fantasy Baseball. http://baseball.fantasysports.yahoo.com/ From jkohl at telusplanet.net Tue Mar 1 13:18:57 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Tue, 1 Mar 2005 10:18:57 -0800 Subject: [Wtr-general] Form Titles In-Reply-To: <20050301175541.35277.qmail@web30503.mail.mud.yahoo.com> References: <20050301175541.35277.qmail@web30503.mail.mud.yahoo.com> Message-ID: <1109701137.4224b21108ef1@webmail.telus.net> Richard; Can you find the HTML tag for the form you are trying to get Watir to find by viewing the source of the page, and if so, can you email the tag to us? Also, can you figure out what frame name it is occurring in? (If you've already done this, disregard this email :) ) Thanks; -Jonathan Quoting Richard Allen : > I'm trying to veify that a particular form is > displayed. I'd rather grab the form name than text on > the form since I will know the form name before hand > and will not have to worry that they changed the text > on the form. > > I can't seem to locate any form name. The closest I > get is with $ie.showAllObjects which shows me: > src=forms/DepartmentF.asp > > I haven't been able to cature the forms title to > verify. > > $ie.frame("MainBody").showForms > RETURNES > There are 0 forms > > > $ie.showFormes > RETURNS: > c:/watir-v1_0_4/examples/TimeCentre.rb:112: > undefined method `showFormes' for > #(NoMethodError) > > > > $ie.showAllObjects > RETURNS: > -----------Objects in page ------------- > HTML Document name=TopBar id=TopBar > > src=Main/TopBar.asp > HTML Document name=LeftBar id=LeftBar > > src=Main/Navigator.asp > HTML Document name=MainBody id=MainBody > > src=forms/DepartmentF.asp > > > > > $ie.frame("MainBody").showAllObjects > RETURNS: > > -----------Objects in page ------------- > text/css id= > id= > src=/timecentre2/Common/Common.js > id= > src=/timecentre2/Common/Common.vbs > id= > src=/timecentre2/Common/DataBar.vbs > id= > src=/timecentre2/Common/DataBar.js > id= > src=/timecentre2/Common/Grid.vbs > id= > src=/timecentre2/Common/DatabarFunctions.vbs > id= > src=/timecentre2/Common/GridFunctions.vbs > id=clientRoutines src= > id=clientEventHandlersVBS src= > name= id= > alt= > id= src= > name= id=rdcData > alt= > id= src= > name= id=rdcUserRights > alt= > id= src= > name= id=Grid > alt= > button name= id=btnFirst > value=  eyed id=myImg > src="/timecentre2/images/datafirst.gif">  > button name= id=btnPrev > value=  eyed id=myImg > src="/timecentre2/images/dataprev.gif">  > button name= id=btnNext > value=   > button name= id=btnLast > value=   > button name= id=btnRefresh > value=Refresh > button name= id=btnSave > value=Save > button name= id=btnNew > value=New > button name= id=btnDelete > value=Delete > button name= id=btnCancel > value=Cancel > button name= id=btnPrint > value=Print > button name= id=btnHelp > value=Help > > --- Paul Rogers wrote: > > > Ive kind of lost track of what we were trying to do > > - something about > > the title, but try this: > > > > $ie.frame("MainBody").showAllObjects > > > > Paul > > > > > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf > > Of Richard Allen > > Sent: 01 March 2005 09:37 > > To: wtr-general at rubyforge.org > > Subject: RE: [Wtr-general] Form Titles > > > > > > Paul, > > > > Trying to find the frames I get the following > > returned > > info for my different attempts. > > > > > > > > $ie.frame("MainBody").showFrames > > RETURNS: > > there are 0 frames > > > > > > $ie.showAllObjects > > RETURNS: > > -----------Objects in page ------------- > > HTML Document name=TopBar id=TopBar > > > > src=Main/TopBar.asp > > HTML Document name=LeftBar id=LeftBar > > > > src=Main/Navigator.asp > > HTML Document name=MainBody id=MainBody > > > > src=forms/DepartmentF.asp > > > > > > $ie.showFrames > > RETURNS: > > there are 3 frames > > frame index: 0 name: TopBar > > frame index: 1 name: LeftBar > > frame index: 2 name: MainBody > > > > > > $ie.frame("MainBody").showForms > > RETURNES > > There are 0 forms > > > > $ie.showFormes > > RETURNS > > c:/watir-v1_0_4/examples/TimeCentre.rb:112: > > undefined > > method `showFormes' for > > #(NoMethodError) > > > > > > > > --- Paul Rogers wrote: > > > > > Do you have a nested frame? From an earlier post, > > > you have > > > > > > "..If I view all objects I see: > > > src=forms/EditTimeCardF.asp" > > > > > > Which looks like a frame, so maybe try this: > > > > > > ie.frame('MainBody').show_frames > > > > > > And then use > > > > > > ie.frame('MainBody').frame('xxx').showAllObjects > > > > > > Where xxx is the name that you get from > > show_frames > > > above > > > > > > > > > My earlier post of > > > $ie.frame("MainBody").ie.document.title gives a > > nil > > > for document, which I think means a frameset. > > > > > > > > > Or can you post some html? > > > > > > Paul > > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org > > > [mailto:wtr-general-bounces at rubyforge.org] On > > Behalf Of Richard Allen > > > Sent: 23 February 2005 08:14 > > > To: wtr-general at rubyforge.org > > > Subject: Re: [Wtr-general] Form Titles > > > > > > > > > That returns 'There are 0 forms' > > > > > > --- Bret Pettichord wrote: > > > > > > > try ie.frame('MainBody').show_forms > > > > > > > > At 04:54 PM 2/22/2005, Richard Allen wrote: > > > > >We load forms into frames .. we mave a > > "MainBody" > > > > >frame and we load EditTimeCardF into it. If I > > > view > > > > src > > > > >I see EditTimeCardF at the very top in what I > > > would > > > > >call a Title. > > > > > > > > > >If I view all objects I see: > > > > > > > > > >src=forms/EditTimeCardF.asp > > > > > > > > > > > > > > >I want to verify that the title of the from > > > loaded > > > > is > > > > >EditTimeCardF. If I try to ShowForms, 0 are > > > found. > > > > >Titles doesn't seem to found either. > > > > > > > > > >Any thought? > > > > > > > > > > > > > > >__________________________________________________ > > > > >Do You Yahoo!? > > > > >Tired of spam? Yahoo! Mail has the best spam > > > > protection around > > > > >http://mail.yahoo.com > > > _______________________________________________ > > > > >Wtr-general mailing list > > > > >Wtr-general at rubyforge.org > > > > > > >http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > _____________________ > > > > Bret Pettichord > > > > www.pettichord.com > > > > > > > > _______________________________________________ > > > > Wtr-general mailing list > > > > Wtr-general at rubyforge.org > > > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > __________________________________________________ > > > Do You Yahoo!? > > > Tired of spam? Yahoo! Mail has the best spam > > > protection around > > > http://mail.yahoo.com > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! Mail - Easier than ever with enhanced search. > > Learn more. > > http://info.mail.yahoo.com/mail_250 > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Sports - Sign up for Fantasy Baseball. > http://baseball.fantasysports.yahoo.com/ > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From dallenusa at yahoo.com Tue Mar 1 17:03:43 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Tue, 1 Mar 2005 14:03:43 -0800 (PST) Subject: [Wtr-general] Form Titles In-Reply-To: <1109701137.4224b21108ef1@webmail.telus.net> Message-ID: <20050301220343.73505.qmail@web30510.mail.mud.yahoo.com> The frame is: frame index: 2 name: MainBody The form is generated from an asp form. I don't get any HTML tag for it that I can see. --- jkohl at telusplanet.net wrote: > Richard; > > Can you find the HTML tag for the form you are > trying to get Watir to find by > viewing the source of the page, and if so, can you > email the tag to us? Also, > can you figure out what frame name it is occurring > in? (If you've already done > this, disregard this email :) ) > > Thanks; > > -Jonathan > > > Quoting Richard Allen : > > > I'm trying to veify that a particular form is > > displayed. I'd rather grab the form name than text > on > > the form since I will know the form name before > hand > > and will not have to worry that they changed the > text > > on the form. > > > > I can't seem to locate any form name. The closest > I > > get is with $ie.showAllObjects which shows me: > > src=forms/DepartmentF.asp > > > > I haven't been able to cature the forms title to > > verify. > > > > $ie.frame("MainBody").showForms > > RETURNES > > There are 0 forms > > > > > > $ie.showFormes > > RETURNS: > > c:/watir-v1_0_4/examples/TimeCentre.rb:112: > > undefined method `showFormes' for > > #(NoMethodError) > > > > > > > > $ie.showAllObjects > > RETURNS: > > -----------Objects in page ------------- > > HTML Document name=TopBar id=TopBar > > > > > src=Main/TopBar.asp > > HTML Document name=LeftBar id=LeftBar > > > > > src=Main/Navigator.asp > > HTML Document name=MainBody id=MainBody > > > > > src=forms/DepartmentF.asp > > > > > > > > > > $ie.frame("MainBody").showAllObjects > > RETURNS: > > > > -----------Objects in page ------------- > > text/css id= > > id= > > src=/timecentre2/Common/Common.js > > id= > > src=/timecentre2/Common/Common.vbs > > id= > > src=/timecentre2/Common/DataBar.vbs > > id= > > src=/timecentre2/Common/DataBar.js > > id= > > src=/timecentre2/Common/Grid.vbs > > id= > > src=/timecentre2/Common/DatabarFunctions.vbs > > id= > > src=/timecentre2/Common/GridFunctions.vbs > > id=clientRoutines src= > > id=clientEventHandlersVBS src= > > name= id= > > > alt= > > id= src= > > name= id=rdcData > > > alt= > > id= src= > > name= > id=rdcUserRights > > alt= > > id= src= > > name= id=Grid > > > alt= > > button name= id=btnFirst > > > value=  > eyed id=myImg > > src="/timecentre2/images/datafirst.gif">  > > button name= id=btnPrev > > > value=  > eyed id=myImg > > src="/timecentre2/images/dataprev.gif">  > > button name= id=btnNext > > > value=   > > button name= id=btnLast > > > value=   > > button name= > id=btnRefresh > > value=Refresh > > button name= id=btnSave > > > value=Save > > button name= id=btnNew > > > value=New > > button name= id=btnDelete > > > value=Delete > > button name= id=btnCancel > > > value=Cancel > > button name= id=btnPrint > > > value=Print > > button name= id=btnHelp > > > value=Help > > > > --- Paul Rogers wrote: > > > > > Ive kind of lost track of what we were trying to > do > > > - something about > > > the title, but try this: > > > > > > $ie.frame("MainBody").showAllObjects > > > > > > Paul > > > > > > > > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org > > > [mailto:wtr-general-bounces at rubyforge.org] On > Behalf > > > Of Richard Allen > > > Sent: 01 March 2005 09:37 > > > To: wtr-general at rubyforge.org > > > Subject: RE: [Wtr-general] Form Titles > > > > > > > > > Paul, > > > > > > Trying to find the frames I get the following > > > returned > > > info for my different attempts. > > > > > > > > > > > > $ie.frame("MainBody").showFrames > > > RETURNS: > > > there are 0 frames > > > > > > > > > $ie.showAllObjects > > > RETURNS: > > > -----------Objects in page ------------- > > > HTML Document name=TopBar id=TopBar > > > > > > > src=Main/TopBar.asp > > > HTML Document name=LeftBar id=LeftBar > > > > > > > src=Main/Navigator.asp > > > HTML Document name=MainBody > id=MainBody > > > > > > src=forms/DepartmentF.asp > > > > > > > > > $ie.showFrames > > > RETURNS: > > > there are 3 frames > > > frame index: 0 name: TopBar > > > frame index: 1 name: LeftBar > > > frame index: 2 name: MainBody > === message truncated === __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From jkohl at telusplanet.net Tue Mar 1 17:10:49 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Tue, 1 Mar 2005 14:10:49 -0800 Subject: [Wtr-general] Form Titles In-Reply-To: <20050301220343.73505.qmail@web30510.mail.mud.yahoo.com> References: <20050301220343.73505.qmail@web30510.mail.mud.yahoo.com> Message-ID: <1109715049.4224e86938b77@webmail.telus.net> > The frame is: > frame index: 2 name: MainBody > > The form is generated from an asp form. I don't get > any HTML tag for it that I can see. hmmm... there should be generated HTML for the form in the page source for that frame shouldn't there? -Jonathan > --- jkohl at telusplanet.net wrote: > > > Richard; > > > > Can you find the HTML tag for the form you are > > trying to get Watir to find by > > viewing the source of the page, and if so, can you > > email the tag to us? Also, > > can you figure out what frame name it is occurring > > in? (If you've already done > > this, disregard this email :) ) > > > > Thanks; > > > > -Jonathan > > > > > > Quoting Richard Allen : > > > > > I'm trying to veify that a particular form is > > > displayed. I'd rather grab the form name than text > > on > > > the form since I will know the form name before > > hand > > > and will not have to worry that they changed the > > text > > > on the form. > > > > > > I can't seem to locate any form name. The closest > > I > > > get is with $ie.showAllObjects which shows me: > > > src=forms/DepartmentF.asp > > > > > > I haven't been able to cature the forms title to > > > verify. > > > > > > $ie.frame("MainBody").showForms > > > RETURNES > > > There are 0 forms > > > > > > > > > $ie.showFormes > > > RETURNS: > > > c:/watir-v1_0_4/examples/TimeCentre.rb:112: > > > undefined method `showFormes' for > > > #(NoMethodError) > > > > > > > > > > > > $ie.showAllObjects > > > RETURNS: > > > -----------Objects in page ------------- > > > HTML Document name=TopBar id=TopBar > > > > > > > > src=Main/TopBar.asp > > > HTML Document name=LeftBar id=LeftBar > > > > > > > > src=Main/Navigator.asp > > > HTML Document name=MainBody id=MainBody > > > > > > > > src=forms/DepartmentF.asp > > > > > > > > > > > > > > > $ie.frame("MainBody").showAllObjects > > > RETURNS: > > > > > > -----------Objects in page ------------- > > > text/css id= > > > id= > > > src=/timecentre2/Common/Common.js > > > id= > > > src=/timecentre2/Common/Common.vbs > > > id= > > > src=/timecentre2/Common/DataBar.vbs > > > id= > > > src=/timecentre2/Common/DataBar.js > > > id= > > > src=/timecentre2/Common/Grid.vbs > > > id= > > > src=/timecentre2/Common/DatabarFunctions.vbs > > > id= > > > src=/timecentre2/Common/GridFunctions.vbs > > > id=clientRoutines src= > > > id=clientEventHandlersVBS src= > > > name= id= > > > > > alt= > > > id= src= > > > name= id=rdcData > > > > > alt= > > > id= src= > > > name= > > id=rdcUserRights > > > alt= > > > id= src= > > > name= id=Grid > > > > > alt= > > > button name= id=btnFirst > > > > > value=  > > eyed id=myImg > > > src="/timecentre2/images/datafirst.gif">  > > > button name= id=btnPrev > > > > > value=  > > eyed id=myImg > > > src="/timecentre2/images/dataprev.gif">  > > > button name= id=btnNext > > > > > value=   > > > button name= id=btnLast > > > > > value=   > > > button name= > > id=btnRefresh > > > value=Refresh > > > button name= id=btnSave > > > > > value=Save > > > button name= id=btnNew > > > > > value=New > > > button name= id=btnDelete > > > > > value=Delete > > > button name= id=btnCancel > > > > > value=Cancel > > > button name= id=btnPrint > > > > > value=Print > > > button name= id=btnHelp > > > > > value=Help > > > > > > --- Paul Rogers wrote: > > > > > > > Ive kind of lost track of what we were trying to > > do > > > > - something about > > > > the title, but try this: > > > > > > > > $ie.frame("MainBody").showAllObjects > > > > > > > > Paul > > > > > > > > > > > > > > > > -----Original Message----- > > > > From: wtr-general-bounces at rubyforge.org > > > > [mailto:wtr-general-bounces at rubyforge.org] On > > Behalf > > > > Of Richard Allen > > > > Sent: 01 March 2005 09:37 > > > > To: wtr-general at rubyforge.org > > > > Subject: RE: [Wtr-general] Form Titles > > > > > > > > > > > > Paul, > > > > > > > > Trying to find the frames I get the following > > > > returned > > > > info for my different attempts. > > > > > > > > > > > > > > > > $ie.frame("MainBody").showFrames > > > > RETURNS: > > > > there are 0 frames > > > > > > > > > > > > $ie.showAllObjects > > > > RETURNS: > > > > -----------Objects in page ------------- > > > > HTML Document name=TopBar id=TopBar > > > > > > > > > > src=Main/TopBar.asp > > > > HTML Document name=LeftBar id=LeftBar > > > > > > > > > > src=Main/Navigator.asp > > > > HTML Document name=MainBody > > id=MainBody > > > > > > > > src=forms/DepartmentF.asp > > > > > > > > > > > > $ie.showFrames > > > > RETURNS: > > > > there are 3 frames > > > > frame index: 0 name: TopBar > > > > frame index: 1 name: LeftBar > > > > frame index: 2 name: MainBody > > > === message truncated === > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From dallenusa at yahoo.com Tue Mar 1 17:21:18 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Tue, 1 Mar 2005 14:21:18 -0800 (PST) Subject: [Wtr-general] Form Titles In-Reply-To: <1109715049.4224e86938b77@webmail.telus.net> Message-ID: <20050301222118.81207.qmail@web30510.mail.mud.yahoo.com> I should say, no html that I can see that has the form name. If I try $ie.frame("MainBody").showForms I get: There are 0 forms If I try $ie.showFormes I get: c:/watir-v1_0_4/examples/TimeCentre.rb:112: undefined method `showFormes' for #(NoMethodError) I don't know what to do to capture the form name. --- jkohl at telusplanet.net wrote: > > > > The frame is: > > frame index: 2 name: MainBody > > > > The form is generated from an asp form. I don't > get > > any HTML tag for it that I can see. > hmmm... there should be generated HTML for the form > in the page source for that > frame shouldn't there? > > -Jonathan > > > > --- jkohl at telusplanet.net wrote: > > > > > Richard; > > > > > > Can you find the HTML tag for the form you are > > > trying to get Watir to find by > > > viewing the source of the page, and if so, can > you > > > email the tag to us? Also, > > > can you figure out what frame name it is > occurring > > > in? (If you've already done > > > this, disregard this email :) ) > > > > > > Thanks; > > > > > > -Jonathan > > > > > > > > > Quoting Richard Allen : > > > > > > > I'm trying to veify that a particular form is > > > > displayed. I'd rather grab the form name than > text > > > on > > > > the form since I will know the form name > before > > > hand > > > > and will not have to worry that they changed > the > > > text > > > > on the form. > > > > > > > > I can't seem to locate any form name. The > closest > > > I > > > > get is with $ie.showAllObjects which shows me: > > > > > src=forms/DepartmentF.asp > > > > > > > > I haven't been able to cature the forms title > to > > > > verify. > > > > > > > > $ie.frame("MainBody").showForms > > > > RETURNES > > > > There are 0 forms > > > > > > > > > > > > $ie.showFormes > > > > RETURNS: > > > > c:/watir-v1_0_4/examples/TimeCentre.rb:112: > > > > undefined method `showFormes' for > > > > #(NoMethodError) > > > > > > > > > > > > > > > > $ie.showAllObjects > > > > RETURNS: > > > > -----------Objects in page ------------- > > > > HTML Document name=TopBar > id=TopBar > > > > > > > > > > > src=Main/TopBar.asp > > > > HTML Document name=LeftBar > id=LeftBar > > > > > > > > > > > src=Main/Navigator.asp > > > > HTML Document name=MainBody > id=MainBody > > > > > > > > > > > src=forms/DepartmentF.asp > > > > > > > > > > > > > > > > > > > > $ie.frame("MainBody").showAllObjects > > > > RETURNS: > > > > > > > > -----------Objects in page ------------- > > > > text/css id= > > > > id= > > > > src=/timecentre2/Common/Common.js > > > > id= > > > > src=/timecentre2/Common/Common.vbs > > > > id= > > > > src=/timecentre2/Common/DataBar.vbs > > > > id= > > > > src=/timecentre2/Common/DataBar.js > > > > id= > > > > src=/timecentre2/Common/Grid.vbs > > > > id= > > > > src=/timecentre2/Common/DatabarFunctions.vbs > > > > id= > > > > src=/timecentre2/Common/GridFunctions.vbs > > > > id=clientRoutines src= > > > > id=clientEventHandlersVBS > src= > > > > name= id= > > > > > > > > alt= > > > > id= src= > > > > name= > id=rdcData > > > > > > > alt= > > > > id= src= > > > > name= > > > id=rdcUserRights > > > > alt= > > > > id= src= > > > > name= id=Grid > > > > > > > > alt= > > > > button name= > id=btnFirst > > > > > > > value=  > > > eyed id=myImg > > > > src="/timecentre2/images/datafirst.gif">  > > > > button name= > id=btnPrev > > > > > > > value=  > > > eyed id=myImg > > > > src="/timecentre2/images/dataprev.gif">  > > > > button name= > id=btnNext > > > > > > > value=   > > > > button name= > id=btnLast > > > > > > > value=   > > > > button name= > > > id=btnRefresh > > > > value=Refresh > > > > button name= > id=btnSave > > > > > > > value=Save > > > > button name= > id=btnNew > > > > > > > value=New > > > > button name= > id=btnDelete > > > > > > > value=Delete > > > > button name= > id=btnCancel > > > > > > > value=Cancel > > > > button name= > id=btnPrint > > > > > > > value=Print > > > > button name= > id=btnHelp > > > > > > > value=Help > > > > > > > > --- Paul Rogers wrote: > > > > > > > > > Ive kind of lost track of what we were > trying to > > > do > > > > > - something about > > > > > the title, but try this: > > > > > > > > > > $ie.frame("MainBody").showAllObjects > > > > > > > > > > Paul > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: wtr-general-bounces at rubyforge.org > > > > > [mailto:wtr-general-bounces at rubyforge.org] > On > === message truncated === __________________________________ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail From jkohl at telusplanet.net Tue Mar 1 17:27:16 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Tue, 1 Mar 2005 14:27:16 -0800 Subject: [Wtr-general] Form Titles In-Reply-To: <20050301222118.81207.qmail@web30510.mail.mud.yahoo.com> References: <20050301222118.81207.qmail@web30510.mail.mud.yahoo.com> Message-ID: <1109716036.4224ec44cf4ea@webmail.telus.net> > I should say, no html that I can see that has the form > name. > > If I try $ie.frame("MainBody").showForms > I get: > There are 0 forms > > If I try $ie.showFormes > I get: > c:/watir-v1_0_4/examples/TimeCentre.rb:112: > undefined method `showFormes' for > #(NoMethodError) > > I don't know what to do to capture the form name. In Internet Explorer, have you right-clicked on the frame that should contain the form, and selected View Source? If so, what do you see in the HTML? Are there no
tags? If there are, what do each of them look like? What order do they appear? We can key off of a unique attribute in the tag: etc. Or, if worse comes to worst, we can always find the form by its index. In your case that might not be as elegant solution. So once we know what that tag looks like once the VBScript or whatever scripting is creating the HTML to be shown in the DOM has completed, we can find an attribute for it. Or, in some cases I have asked the developers to add a tag attribute to make it easier for me. Does that make sense? -Jonathan > --- jkohl at telusplanet.net wrote: > > > > > > > > The frame is: > > > frame index: 2 name: MainBody > > > > > > The form is generated from an asp form. I don't > > get > > > any HTML tag for it that I can see. > > hmmm... there should be generated HTML for the form > > in the page source for that > > frame shouldn't there? > > > > -Jonathan > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > Richard; > > > > > > > > Can you find the HTML tag for the form you are > > > > trying to get Watir to find by > > > > viewing the source of the page, and if so, can > > you > > > > email the tag to us? Also, > > > > can you figure out what frame name it is > > occurring > > > > in? (If you've already done > > > > this, disregard this email :) ) > > > > > > > > Thanks; > > > > > > > > -Jonathan > > > > > > > > > > > > Quoting Richard Allen : > > > > > > > > > I'm trying to veify that a particular form is > > > > > displayed. I'd rather grab the form name than > > text > > > > on > > > > > the form since I will know the form name > > before > > > > hand > > > > > and will not have to worry that they changed > > the > > > > text > > > > > on the form. > > > > > > > > > > I can't seem to locate any form name. The > > closest > > > > I > > > > > get is with $ie.showAllObjects which shows me: > > > > > > > src=forms/DepartmentF.asp > > > > > > > > > > I haven't been able to cature the forms title > > to > > > > > verify. > > > > > > > > > > $ie.frame("MainBody").showForms > > > > > RETURNES > > > > > There are 0 forms > > > > > > > > > > > > > > > $ie.showFormes > > > > > RETURNS: > > > > > c:/watir-v1_0_4/examples/TimeCentre.rb:112: > > > > > undefined method `showFormes' for > > > > > #(NoMethodError) > > > > > > > > > > > > > > > > > > > > $ie.showAllObjects > > > > > RETURNS: > > > > > -----------Objects in page ------------- > > > > > HTML Document name=TopBar > > id=TopBar > > > > > > > > > > > > > > src=Main/TopBar.asp > > > > > HTML Document name=LeftBar > > id=LeftBar > > > > > > > > > > > > > > src=Main/Navigator.asp > > > > > HTML Document name=MainBody > > id=MainBody > > > > > > > > > > > > > > src=forms/DepartmentF.asp > > > > > > > > > > > > > > > > > > > > > > > > > $ie.frame("MainBody").showAllObjects > > > > > RETURNS: > > > > > > > > > > -----------Objects in page ------------- > > > > > text/css id= > > > > > id= > > > > > src=/timecentre2/Common/Common.js > > > > > id= > > > > > src=/timecentre2/Common/Common.vbs > > > > > id= > > > > > src=/timecentre2/Common/DataBar.vbs > > > > > id= > > > > > src=/timecentre2/Common/DataBar.js > > > > > id= > > > > > src=/timecentre2/Common/Grid.vbs > > > > > id= > > > > > src=/timecentre2/Common/DatabarFunctions.vbs > > > > > id= > > > > > src=/timecentre2/Common/GridFunctions.vbs > > > > > id=clientRoutines src= > > > > > id=clientEventHandlersVBS > > src= > > > > > name= id= > > > > > > > > > > > alt= > > > > > id= src= > > > > > name= > > id=rdcData > > > > > > > > > alt= > > > > > id= src= > > > > > name= > > > > id=rdcUserRights > > > > > alt= > > > > > id= src= > > > > > name= id=Grid > > > > > > > > > > > alt= > > > > > button name= > > id=btnFirst > > > > > > > > > value=  > > > > eyed id=myImg > > > > > src="/timecentre2/images/datafirst.gif">  > > > > > button name= > > id=btnPrev > > > > > > > > > value=  > > > > eyed id=myImg > > > > > src="/timecentre2/images/dataprev.gif">  > > > > > button name= > > id=btnNext > > > > > > > > > value=   > > > > > button name= > > id=btnLast > > > > > > > > > value=   > > > > > button name= > > > > id=btnRefresh > > > > > value=Refresh > > > > > button name= > > id=btnSave > > > > > > > > > value=Save > > > > > button name= > > id=btnNew > > > > > > > > > value=New > > > > > button name= > > id=btnDelete > > > > > > > > > value=Delete > > > > > button name= > > id=btnCancel > > > > > > > > > value=Cancel > > > > > button name= > > id=btnPrint > > > > > > > > > value=Print > > > > > button name= > > id=btnHelp > > > > > > > > > value=Help > > > > > > > > > > --- Paul Rogers wrote: > > > > > > > > > > > Ive kind of lost track of what we were > > trying to > > > > do > > > > > > - something about > > > > > > the title, but try this: > > > > > > > > > > > > $ie.frame("MainBody").showAllObjects > > > > > > > > > > > > Paul > > > > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > From: wtr-general-bounces at rubyforge.org > > > > > > [mailto:wtr-general-bounces at rubyforge.org] > > On > > > === message truncated === > > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail - You care about security. So do we. > http://promotions.yahoo.com/new_mail > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From dallenusa at yahoo.com Tue Mar 1 17:31:35 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Tue, 1 Mar 2005 14:31:35 -0800 (PST) Subject: [Wtr-general] Form Titles In-Reply-To: <1109715049.4224e86938b77@webmail.telus.net> Message-ID: <20050301223135.77346.qmail@web30504.mail.mud.yahoo.com> Actually .. both $ie.frame("MainBody").showForms and $ie.showFormes Return: There are 0 forms So maybe Form is the incorrect object but I'm not sure what else it would be. --- jkohl at telusplanet.net wrote: > > > > The frame is: > > frame index: 2 name: MainBody > > > > The form is generated from an asp form. I don't > get > > any HTML tag for it that I can see. > hmmm... there should be generated HTML for the form > in the page source for that > frame shouldn't there? > > -Jonathan > > > > --- jkohl at telusplanet.net wrote: > > > > > Richard; > > > > > > Can you find the HTML tag for the form you are > > > trying to get Watir to find by > > > viewing the source of the page, and if so, can > you > > > email the tag to us? Also, > > > can you figure out what frame name it is > occurring > > > in? (If you've already done > > > this, disregard this email :) ) > > > > > > Thanks; > > > > > > -Jonathan > > > > > > > > > Quoting Richard Allen : > > > > > > > I'm trying to veify that a particular form is > > > > displayed. I'd rather grab the form name than > text > > > on > > > > the form since I will know the form name > before > > > hand > > > > and will not have to worry that they changed > the > > > text > > > > on the form. > > > > > > > > I can't seem to locate any form name. The > closest > > > I > > > > get is with $ie.showAllObjects which shows me: > > > > > src=forms/DepartmentF.asp > > > > > > > > I haven't been able to cature the forms title > to > > > > verify. > > > > > > > > $ie.frame("MainBody").showForms > > > > RETURNES > > > > There are 0 forms > > > > > > > > > > > > $ie.showFormes > > > > RETURNS: > > > > c:/watir-v1_0_4/examples/TimeCentre.rb:112: > > > > undefined method `showFormes' for > > > > #(NoMethodError) > > > > > > > > > > > > > > > > $ie.showAllObjects > > > > RETURNS: > > > > -----------Objects in page ------------- > > > > HTML Document name=TopBar > id=TopBar > > > > > > > > > > > src=Main/TopBar.asp > > > > HTML Document name=LeftBar > id=LeftBar > > > > > > > > > > > src=Main/Navigator.asp > > > > HTML Document name=MainBody > id=MainBody > > > > > > > > > > > src=forms/DepartmentF.asp > > > > > > > > > > > > > > > > > > > > $ie.frame("MainBody").showAllObjects > > > > RETURNS: > > > > > > > > -----------Objects in page ------------- > > > > text/css id= > > > > id= > > > > src=/timecentre2/Common/Common.js > > > > id= > > > > src=/timecentre2/Common/Common.vbs > > > > id= > > > > src=/timecentre2/Common/DataBar.vbs > > > > id= > > > > src=/timecentre2/Common/DataBar.js > > > > id= > > > > src=/timecentre2/Common/Grid.vbs > > > > id= > > > > src=/timecentre2/Common/DatabarFunctions.vbs > > > > id= > > > > src=/timecentre2/Common/GridFunctions.vbs > > > > id=clientRoutines src= > > > > id=clientEventHandlersVBS > src= > > > > name= id= > > > > > > > > alt= > > > > id= src= > > > > name= > id=rdcData > > > > > > > alt= > > > > id= src= > > > > name= > > > id=rdcUserRights > > > > alt= > > > > id= src= > > > > name= id=Grid > > > > > > > > alt= > > > > button name= > id=btnFirst > > > > > > > value=  > > > eyed id=myImg > > > > src="/timecentre2/images/datafirst.gif">  > > > > button name= > id=btnPrev > > > > > > > value=  > > > eyed id=myImg > > > > src="/timecentre2/images/dataprev.gif">  > > > > button name= > id=btnNext > > > > > > > value=   > > > > button name= > id=btnLast > > > > > > > value=   > > > > button name= > > > id=btnRefresh > > > > value=Refresh > > > > button name= > id=btnSave > > > > > > > value=Save > > > > button name= > id=btnNew > > > > > > > value=New > > > > button name= > id=btnDelete > > > > > > > value=Delete > > > > button name= > id=btnCancel > > > > > > > value=Cancel > > > > button name= > id=btnPrint > > > > > > > value=Print > > > > button name= > id=btnHelp > > > > > > > value=Help > > > > > > > > --- Paul Rogers wrote: > > > > > > > > > Ive kind of lost track of what we were > trying to > > > do > > > > > - something about > > > > > the title, but try this: > > > > > > > > > > $ie.frame("MainBody").showAllObjects > > > > > > > > > > Paul > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: wtr-general-bounces at rubyforge.org > > > > > [mailto:wtr-general-bounces at rubyforge.org] > On > === message truncated === __________________________________ Do you Yahoo!? Yahoo! Sports - Sign up for Fantasy Baseball. http://baseball.fantasysports.yahoo.com/ From jkohl at telusplanet.net Tue Mar 1 17:35:58 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Tue, 1 Mar 2005 14:35:58 -0800 Subject: [Wtr-general] Form Titles In-Reply-To: <20050301222118.81207.qmail@web30510.mail.mud.yahoo.com> References: <20050301222118.81207.qmail@web30510.mail.mud.yahoo.com> Message-ID: <1109716558.4224ee4e2dd47@webmail.telus.net> Quoting Richard Allen : > I should say, no html that I can see that has the form > name. what other tag attributes are in the tag? > > If I try $ie.frame("MainBody").showForms > I get: > There are 0 forms > > If I try $ie.showFormes > I get: > c:/watir-v1_0_4/examples/TimeCentre.rb:112: > undefined method `showFormes' for > #(NoMethodError) This is from a typo: ie.showForms or ie.show_forms > I don't know what to do to capture the form name. There may not be a name - it's not a required attribute for a tag, so the developers may not have put the name attribute in it. Here's something to try: what does this do: ie.form(:index, 1).submit (if there are more than one form, increase the index number until the one you are looking for submits. Then you know you have the right one. This is one-based counting. If the 3rd one is the one you are looking for, find the 3rd tag in the HTML and see what attributes it has. Hope this helps. -Jonathan > > --- jkohl at telusplanet.net wrote: > > > > > > > > The frame is: > > > frame index: 2 name: MainBody > > > > > > The form is generated from an asp form. I don't > > get > > > any HTML tag for it that I can see. > > hmmm... there should be generated HTML for the form > > in the page source for that > > frame shouldn't there? > > > > -Jonathan > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > Richard; > > > > > > > > Can you find the HTML tag for the form you are > > > > trying to get Watir to find by > > > > viewing the source of the page, and if so, can > > you > > > > email the tag to us? Also, > > > > can you figure out what frame name it is > > occurring > > > > in? (If you've already done > > > > this, disregard this email :) ) > > > > > > > > Thanks; > > > > > > > > -Jonathan > > > > > > > > > > > > Quoting Richard Allen : > > > > > > > > > I'm trying to veify that a particular form is > > > > > displayed. I'd rather grab the form name than > > text > > > > on > > > > > the form since I will know the form name > > before > > > > hand > > > > > and will not have to worry that they changed > > the > > > > text > > > > > on the form. > > > > > > > > > > I can't seem to locate any form name. The > > closest > > > > I > > > > > get is with $ie.showAllObjects which shows me: > > > > > > > src=forms/DepartmentF.asp > > > > > > > > > > I haven't been able to cature the forms title > > to > > > > > verify. > > > > > > > > > > $ie.frame("MainBody").showForms > > > > > RETURNES > > > > > There are 0 forms > > > > > > > > > > > > > > > $ie.showFormes > > > > > RETURNS: > > > > > c:/watir-v1_0_4/examples/TimeCentre.rb:112: > > > > > undefined method `showFormes' for > > > > > #(NoMethodError) > > > > > > > > > > > > > > > > > > > > $ie.showAllObjects > > > > > RETURNS: > > > > > -----------Objects in page ------------- > > > > > HTML Document name=TopBar > > id=TopBar > > > > > > > > > > > > > > src=Main/TopBar.asp > > > > > HTML Document name=LeftBar > > id=LeftBar > > > > > > > > > > > > > > src=Main/Navigator.asp > > > > > HTML Document name=MainBody > > id=MainBody > > > > > > > > > > > > > > src=forms/DepartmentF.asp > > > > > > > > > > > > > > > > > > > > > > > > > $ie.frame("MainBody").showAllObjects > > > > > RETURNS: > > > > > > > > > > -----------Objects in page ------------- > > > > > text/css id= > > > > > id= > > > > > src=/timecentre2/Common/Common.js > > > > > id= > > > > > src=/timecentre2/Common/Common.vbs > > > > > id= > > > > > src=/timecentre2/Common/DataBar.vbs > > > > > id= > > > > > src=/timecentre2/Common/DataBar.js > > > > > id= > > > > > src=/timecentre2/Common/Grid.vbs > > > > > id= > > > > > src=/timecentre2/Common/DatabarFunctions.vbs > > > > > id= > > > > > src=/timecentre2/Common/GridFunctions.vbs > > > > > id=clientRoutines src= > > > > > id=clientEventHandlersVBS > > src= > > > > > name= id= > > > > > > > > > > > alt= > > > > > id= src= > > > > > name= > > id=rdcData > > > > > > > > > alt= > > > > > id= src= > > > > > name= > > > > id=rdcUserRights > > > > > alt= > > > > > id= src= > > > > > name= id=Grid > > > > > > > > > > > alt= > > > > > button name= > > id=btnFirst > > > > > > > > > value=  > > > > eyed id=myImg > > > > > src="/timecentre2/images/datafirst.gif">  > > > > > button name= > > id=btnPrev > > > > > > > > > value=  > > > > eyed id=myImg > > > > > src="/timecentre2/images/dataprev.gif">  > > > > > button name= > > id=btnNext > > > > > > > > > value=   > > > > > button name= > > id=btnLast > > > > > > > > > value=   > > > > > button name= > > > > id=btnRefresh > > > > > value=Refresh > > > > > button name= > > id=btnSave > > > > > > > > > value=Save > > > > > button name= > > id=btnNew > > > > > > > > > value=New > > > > > button name= > > id=btnDelete > > > > > > > > > value=Delete > > > > > button name= > > id=btnCancel > > > > > > > > > value=Cancel > > > > > button name= > > id=btnPrint > > > > > > > > > value=Print > > > > > button name= > > id=btnHelp > > > > > > > > > value=Help > > > > > > > > > > --- Paul Rogers wrote: > > > > > > > > > > > Ive kind of lost track of what we were > > trying to > > > > do > > > > > > - something about > > > > > > the title, but try this: > > > > > > > > > > > > $ie.frame("MainBody").showAllObjects > > > > > > > > > > > > Paul > > > > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > From: wtr-general-bounces at rubyforge.org > > > > > > [mailto:wtr-general-bounces at rubyforge.org] > > On > > > === message truncated === > > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail - You care about security. So do we. > http://promotions.yahoo.com/new_mail > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From jkohl at telusplanet.net Tue Mar 1 17:38:12 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Tue, 1 Mar 2005 14:38:12 -0800 Subject: [Wtr-general] Form Titles In-Reply-To: <20050301223135.77346.qmail@web30504.mail.mud.yahoo.com> References: <20050301223135.77346.qmail@web30504.mail.mud.yahoo.com> Message-ID: <1109716692.4224eed4b7ce0@webmail.telus.net> > Actually .. both > $ie.frame("MainBody").showForms and $ie.showFormes > > Return: > There are 0 forms > > So maybe Form is the incorrect object but I'm not sure > what else it would be. what do the HTML tags when viewing the source say? Can you find them in the source? Can you grab the section of HTML that you are trying to drive with Watir and email it? Feel free to create a zip file with each frame element if you have to, and a description of what area you are trying to interact with. You can email it to me personally if you prefer, and I can try it as well. -Jonathan > > --- jkohl at telusplanet.net wrote: > > > > > > > > The frame is: > > > frame index: 2 name: MainBody > > > > > > The form is generated from an asp form. I don't > > get > > > any HTML tag for it that I can see. > > hmmm... there should be generated HTML for the form > > in the page source for that > > frame shouldn't there? > > > > -Jonathan > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > Richard; > > > > > > > > Can you find the HTML tag for the form you are > > > > trying to get Watir to find by > > > > viewing the source of the page, and if so, can > > you > > > > email the tag to us? Also, > > > > can you figure out what frame name it is > > occurring > > > > in? (If you've already done > > > > this, disregard this email :) ) > > > > > > > > Thanks; > > > > > > > > -Jonathan > > > > > > > > > > > > Quoting Richard Allen : > > > > > > > > > I'm trying to veify that a particular form is > > > > > displayed. I'd rather grab the form name than > > text > > > > on > > > > > the form since I will know the form name > > before > > > > hand > > > > > and will not have to worry that they changed > > the > > > > text > > > > > on the form. > > > > > > > > > > I can't seem to locate any form name. The > > closest > > > > I > > > > > get is with $ie.showAllObjects which shows me: > > > > > > > src=forms/DepartmentF.asp > > > > > > > > > > I haven't been able to cature the forms title > > to > > > > > verify. > > > > > > > > > > $ie.frame("MainBody").showForms > > > > > RETURNES > > > > > There are 0 forms > > > > > > > > > > > > > > > $ie.showFormes > > > > > RETURNS: > > > > > c:/watir-v1_0_4/examples/TimeCentre.rb:112: > > > > > undefined method `showFormes' for > > > > > #(NoMethodError) > > > > > > > > > > > > > > > > > > > > $ie.showAllObjects > > > > > RETURNS: > > > > > -----------Objects in page ------------- > > > > > HTML Document name=TopBar > > id=TopBar > > > > > > > > > > > > > > src=Main/TopBar.asp > > > > > HTML Document name=LeftBar > > id=LeftBar > > > > > > > > > > > > > > src=Main/Navigator.asp > > > > > HTML Document name=MainBody > > id=MainBody > > > > > > > > > > > > > > src=forms/DepartmentF.asp > > > > > > > > > > > > > > > > > > > > > > > > > $ie.frame("MainBody").showAllObjects > > > > > RETURNS: > > > > > > > > > > -----------Objects in page ------------- > > > > > text/css id= > > > > > id= > > > > > src=/timecentre2/Common/Common.js > > > > > id= > > > > > src=/timecentre2/Common/Common.vbs > > > > > id= > > > > > src=/timecentre2/Common/DataBar.vbs > > > > > id= > > > > > src=/timecentre2/Common/DataBar.js > > > > > id= > > > > > src=/timecentre2/Common/Grid.vbs > > > > > id= > > > > > src=/timecentre2/Common/DatabarFunctions.vbs > > > > > id= > > > > > src=/timecentre2/Common/GridFunctions.vbs > > > > > id=clientRoutines src= > > > > > id=clientEventHandlersVBS > > src= > > > > > name= id= > > > > > > > > > > > alt= > > > > > id= src= > > > > > name= > > id=rdcData > > > > > > > > > alt= > > > > > id= src= > > > > > name= > > > > id=rdcUserRights > > > > > alt= > > > > > id= src= > > > > > name= id=Grid > > > > > > > > > > > alt= > > > > > button name= > > id=btnFirst > > > > > > > > > value=  > > > > eyed id=myImg > > > > > src="/timecentre2/images/datafirst.gif">  > > > > > button name= > > id=btnPrev > > > > > > > > > value=  > > > > eyed id=myImg > > > > > src="/timecentre2/images/dataprev.gif">  > > > > > button name= > > id=btnNext > > > > > > > > > value=   > > > > > button name= > > id=btnLast > > > > > > > > > value=   > > > > > button name= > > > > id=btnRefresh > > > > > value=Refresh > > > > > button name= > > id=btnSave > > > > > > > > > value=Save > > > > > button name= > > id=btnNew > > > > > > > > > value=New > > > > > button name= > > id=btnDelete > > > > > > > > > value=Delete > > > > > button name= > > id=btnCancel > > > > > > > > > value=Cancel > > > > > button name= > > id=btnPrint > > > > > > > > > value=Print > > > > > button name= > > id=btnHelp > > > > > > > > > value=Help > > > > > > > > > > --- Paul Rogers wrote: > > > > > > > > > > > Ive kind of lost track of what we were > > trying to > > > > do > > > > > > - something about > > > > > > the title, but try this: > > > > > > > > > > > > $ie.frame("MainBody").showAllObjects > > > > > > > > > > > > Paul > > > > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > From: wtr-general-bounces at rubyforge.org > > > > > > [mailto:wtr-general-bounces at rubyforge.org] > > On > > > === message truncated === > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Sports - Sign up for Fantasy Baseball. > http://baseball.fantasysports.yahoo.com/ > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Tue Mar 1 20:55:28 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 01 Mar 2005 18:55:28 -0700 Subject: [Wtr-general] Links object Message-ID: <004101c51eca$e8971650$6400a8c0@NewDell> Ive changed th links object ( I guess its more like a collection ) to yield a watir link object. Usage might be: ie.links.each do |link| if link.getProperty("href") == "http://google.com" puts "link goes to google!" puts link.getProperty("name") puts link.getProperty("id") puts link.getProperty("innerText") end linkToClick = link end # note, don't do a click inside the loop, as weird things happen in the OLE library linkToClick.click() unless linkToClick == nil From dallenusa at yahoo.com Wed Mar 2 13:34:19 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Wed, 2 Mar 2005 10:34:19 -0800 (PST) Subject: [Wtr-general] Form Titles In-Reply-To: <1109716692.4224eed4b7ce0@webmail.telus.net> Message-ID: <20050302183419.89622.qmail@web30510.mail.mud.yahoo.com> Here is the HTML for a form .. Job Codes. --- jkohl at telusplanet.net wrote: > > Actually .. both > > $ie.frame("MainBody").showForms and > $ie.showFormes > > > > Return: > > There are 0 forms > > > > So maybe Form is the incorrect object but I'm not > sure > > what else it would be. > what do the HTML tags when viewing the source say? > Can you find them in the source? > > Can you grab the section of HTML that you are trying > to drive with Watir and > email it? Feel free to create a zip file with each > frame element if you have to, > and a description of what area you are trying to > interact with. You can email it > to me personally if you prefer, and I can try it as > well. > > -Jonathan > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > > > > The frame is: > > > > frame index: 2 name: MainBody > > > > > > > > The form is generated from an asp form. I > don't > > > get > > > > any HTML tag for it that I can see. > > > hmmm... there should be generated HTML for the > form > > > in the page source for that > > > frame shouldn't there? > > > > > > -Jonathan > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > Richard; > > > > > > > > > > Can you find the HTML tag for the form you > are > > > > > trying to get Watir to find by > > > > > viewing the source of the page, and if so, > can > > > you > > > > > email the tag to us? Also, > > > > > can you figure out what frame name it is > > > occurring > > > > > in? (If you've already done > > > > > this, disregard this email :) ) > > > > > > > > > > Thanks; > > > > > > > > > > -Jonathan > > > > > > > > > > > > > > > Quoting Richard Allen : > > > > > > > > > > > I'm trying to veify that a particular form > is > > > > > > displayed. I'd rather grab the form name > than > > > text > > > > > on > > > > > > the form since I will know the form name > > > before > > > > > hand > > > > > > and will not have to worry that they > changed > > > the > > > > > text > > > > > > on the form. > > > > > > > > > > > > I can't seem to locate any form name. The > > > closest > > > > > I > > > > > > get is with $ie.showAllObjects which shows > me: > > > > > > > > > src=forms/DepartmentF.asp > > > > > > > > > > > > I haven't been able to cature the forms > title > > > to > > > > > > verify. > > > > > > > > > > > > $ie.frame("MainBody").showForms > > > > > > RETURNES > > > > > > There are 0 forms > > > > > > > > > > > > > > > > > > $ie.showFormes > > > > > > RETURNS: > > > > > > > c:/watir-v1_0_4/examples/TimeCentre.rb:112: > > > > > > undefined method `showFormes' for > > > > > > #(NoMethodError) > > > > > > > > > > > > > > > > > > > > > > > > $ie.showAllObjects > > > > > > RETURNS: > > > > > > -----------Objects in page ------------- > > > > > > HTML Document name=TopBar > > > id=TopBar > > > > > > > > > > > > > > > > > src=Main/TopBar.asp > > > > > > HTML Document name=LeftBar > > > id=LeftBar > > > > > > > > > > > > > > > > > src=Main/Navigator.asp > > > > > > HTML Document name=MainBody > > > id=MainBody > > > > > > > > > > > > > > > > > src=forms/DepartmentF.asp > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > $ie.frame("MainBody").showAllObjects > > > > > > RETURNS: > > > > > > > > > > > > -----------Objects in page ------------- > > > > > > text/css id= > > > > > > id= > > > > > > src=/timecentre2/Common/Common.js > > > > > > id= > > > > > > src=/timecentre2/Common/Common.vbs > > > > > > id= > > > > > > src=/timecentre2/Common/DataBar.vbs > > > > > > id= > > > > > > src=/timecentre2/Common/DataBar.js > > > > > > id= > > > > > > src=/timecentre2/Common/Grid.vbs > > > > > > id= > > > > > > > src=/timecentre2/Common/DatabarFunctions.vbs > > > > > > id= > > > > > > src=/timecentre2/Common/GridFunctions.vbs > > > > > > id=clientRoutines src= > > > > > > > id=clientEventHandlersVBS > > > src= > > > > > > name= id= > > > > > > > > > > > > > > > alt= > > > > > > id= src= > > > > > > name= > > > id=rdcData > > > > > > > > > > > alt= > > > > > > id= src= > > > > > > name= > > > > > id=rdcUserRights > > > > > > alt= > > > > > > id= src= > > > > > > name= > id=Grid > > > > > > > > > > > > > > alt= > > > > > > button name= > > > id=btnFirst > > > > > > > > > > > value=  class=rdsBarButtonImageGr > > > > > > eyed id=myImg > > > > > > > src="/timecentre2/images/datafirst.gif">  > > > > > > button name= > > > id=btnPrev > > > > > > > > > > > value=  class=rdsBarButtonImageGr > > > > > > eyed id=myImg > > > > > > > src="/timecentre2/images/dataprev.gif">  > > > > > > button name= > > > id=btnNext > > > > > > > > > > > value=  src=" > > > > > > /timecentre2/images/datanext.gif">  > > > > > > button name= > > > id=btnLast > > > > > > === message truncated === __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- A non-text attachment was scrubbed... Name: form.zip Type: application/x-zip-compressed Size: 2978 bytes Desc: form.zip Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050302/2840c358/attachment.bin From jkohl at telusplanet.net Wed Mar 2 13:55:34 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Wed, 2 Mar 2005 10:55:34 -0800 Subject: [Wtr-general] Form Titles In-Reply-To: <20050302183419.89622.qmail@web30510.mail.mud.yahoo.com> References: <20050302183419.89622.qmail@web30510.mail.mud.yahoo.com> Message-ID: <1109789734.42260c26f1f2e@webmail.telus.net> Thanks. I don't see any FORM HTML tags, so the "show" methods in Watir are giving you the correct output. This is a bit more tricky with all the scripting going on. I see a lot of includes for other files that will get called at the top of the file: and then CSS with this tag: It looks like there are DHTML actions with DIVs as well as a combination of VBScript and JavaScript. In the source of this file, can you find the objects you are trying to interact with, and send those tags back in a reply? Because of all the includes I noted above, all I see on this page when I save it and load it is: "Codes Loading Data..." These objects look like likely sources for submitting the data: Note that they are wired to scripting functions. Once can use the Watir "fire_event" method on these objects to kick off the "onclick" events. Are these some of the objects you are trying to interact with? Do you want to Save for example on this page? To do a Save on this page for example, you could do this: ie.button(:id, "btnSave").fire_event("onclick") That will call the "DoSave" method which handles the save and does the action. Does this help? -Jonathan Quoting Richard Allen : > Here is the HTML for a form .. Job Codes. > > > --- jkohl at telusplanet.net wrote: > > > > Actually .. both > > > $ie.frame("MainBody").showForms and > > $ie.showFormes > > > > > > Return: > > > There are 0 forms > > > > > > So maybe Form is the incorrect object but I'm not > > sure > > > what else it would be. > > what do the HTML tags when viewing the source say? > > Can you find them in the source? > > > > Can you grab the section of HTML that you are trying > > to drive with Watir and > > email it? Feel free to create a zip file with each > > frame element if you have to, > > and a description of what area you are trying to > > interact with. You can email it > > to me personally if you prefer, and I can try it as > > well. > > > > -Jonathan > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > > > > > > > > The frame is: > > > > > frame index: 2 name: MainBody > > > > > > > > > > The form is generated from an asp form. I > > don't > > > > get > > > > > any HTML tag for it that I can see. > > > > hmmm... there should be generated HTML for the > > form > > > > in the page source for that > > > > frame shouldn't there? > > > > > > > > -Jonathan > > > > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > > > Richard; > > > > > > > > > > > > Can you find the HTML tag for the form you > > are > > > > > > trying to get Watir to find by > > > > > > viewing the source of the page, and if so, > > can > > > > you > > > > > > email the tag to us? Also, > > > > > > can you figure out what frame name it is > > > > occurring > > > > > > in? (If you've already done > > > > > > this, disregard this email :) ) > > > > > > > > > > > > Thanks; > > > > > > > > > > > > -Jonathan > > > > > > > > > > > > > > > > > > Quoting Richard Allen : > > > > > > > > > > > > > I'm trying to veify that a particular form > > is > > > > > > > displayed. I'd rather grab the form name > > than > > > > text > > > > > > on > > > > > > > the form since I will know the form name > > > > before > > > > > > hand > > > > > > > and will not have to worry that they > > changed > > > > the > > > > > > text > > > > > > > on the form. > > > > > > > > > > > > > > I can't seem to locate any form name. The > > > > closest > > > > > > I > > > > > > > get is with $ie.showAllObjects which shows > > me: > > > > > > > > > > > src=forms/DepartmentF.asp > > > > > > > > > > > > > > I haven't been able to cature the forms > > title > > > > to > > > > > > > verify. > > > > > > > > > > > > > > $ie.frame("MainBody").showForms > > > > > > > RETURNES > > > > > > > There are 0 forms > > > > > > > > > > > > > > > > > > > > > $ie.showFormes > > > > > > > RETURNS: > > > > > > > > > c:/watir-v1_0_4/examples/TimeCentre.rb:112: > > > > > > > undefined method `showFormes' for > > > > > > > #(NoMethodError) > > > > > > > > > > > > > > > > > > > > > > > > > > > > $ie.showAllObjects > > > > > > > RETURNS: > > > > > > > -----------Objects in page ------------- > > > > > > > HTML Document name=TopBar > > > > id=TopBar > > > > > > > > > > > > > > > > > > > > src=Main/TopBar.asp > > > > > > > HTML Document name=LeftBar > > > > id=LeftBar > > > > > > > > > > > > > > > > > > > > src=Main/Navigator.asp > > > > > > > HTML Document name=MainBody > > > > id=MainBody > > > > > > > > > > > > > > > > > > > > src=forms/DepartmentF.asp > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > $ie.frame("MainBody").showAllObjects > > > > > > > RETURNS: > > > > > > > > > > > > > > -----------Objects in page ------------- > > > > > > > text/css id= > > > > > > > id= > > > > > > > src=/timecentre2/Common/Common.js > > > > > > > id= > > > > > > > src=/timecentre2/Common/Common.vbs > > > > > > > id= > > > > > > > src=/timecentre2/Common/DataBar.vbs > > > > > > > id= > > > > > > > src=/timecentre2/Common/DataBar.js > > > > > > > id= > > > > > > > src=/timecentre2/Common/Grid.vbs > > > > > > > id= > > > > > > > > > src=/timecentre2/Common/DatabarFunctions.vbs > > > > > > > id= > > > > > > > src=/timecentre2/Common/GridFunctions.vbs > > > > > > > id=clientRoutines src= > > > > > > > > > id=clientEventHandlersVBS > > > > src= > > > > > > > name= id= > > > > > > > > > > > > > > > > > > > alt= > > > > > > > id= src= > > > > > > > name= > > > > id=rdcData > > > > > > > > > > > > > alt= > > > > > > > id= src= > > > > > > > name= > > > > > > id=rdcUserRights > > > > > > > alt= > > > > > > > id= src= > > > > > > > name= > > id=Grid > > > > > > > > > > > > > > > > > alt= > > > > > > > button name= > > > > id=btnFirst > > > > > > > > > > > > > value=  > class=rdsBarButtonImageGr > > > > > > > eyed id=myImg > > > > > > > > > src="/timecentre2/images/datafirst.gif">  > > > > > > > button name= > > > > id=btnPrev > > > > > > > > > > > > > value=  > class=rdsBarButtonImageGr > > > > > > > eyed id=myImg > > > > > > > > > src="/timecentre2/images/dataprev.gif">  > > > > > > > button name= > > > > id=btnNext > > > > > > > > > > > > > value=  > src=" > > > > > > > /timecentre2/images/datanext.gif">  > > > > > > > button name= > > > > id=btnLast > > > > > > > > > === message truncated === > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com From dallenusa at yahoo.com Wed Mar 2 15:29:49 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Wed, 2 Mar 2005 12:29:49 -0800 (PST) Subject: [Wtr-general] Form Titles In-Reply-To: <1109789734.42260c26f1f2e@webmail.telus.net> Message-ID: <20050302202949.80789.qmail@web30505.mail.mud.yahoo.com> I can navigate most of the application other than the grids at this point. I wanted to find a way to verify the correct form loaded other than just grabing text from the form. We also use active x reports but the tool doesn't see those, so I'm not sure how to verify a report loaded and displayed correctly. --- jkohl at telusplanet.net wrote: > Thanks. I don't see any FORM HTML tags, so the > "show" methods in Watir are > giving you the correct output. This is a bit more > tricky with all the scripting > going on. I see a lot of includes for other files > that will get called at the > top of the file: > > > > > > > > > and then CSS with this tag: > HREF="/timecentre/Common/AppStyle.css"> > It looks like there are DHTML actions with DIVs as > well as a combination of > VBScript and JavaScript. > > In the source of this file, can you find the objects > you are trying to interact > with, and send those tags back in a reply? Because > of all the includes I noted > above, all I see on this page when I save it and > load it is: > "Codes Loading Data..." > > These objects look like likely sources for > submitting the data: > > > Note that they are wired to scripting functions. > Once can use the Watir > "fire_event" method on these objects to kick off the > "onclick" events. > > Are these some of the objects you are trying to > interact with? Do you want to > Save for example on this page? To do a Save on this > page for example, you could > do this: > ie.button(:id, "btnSave").fire_event("onclick") > That will call the "DoSave" method which handles the > save and does the action. > > Does this help? > > -Jonathan > > > > > Quoting Richard Allen : > > > Here is the HTML for a form .. Job Codes. > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > Actually .. both > > > > $ie.frame("MainBody").showForms and > > > $ie.showFormes > > > > > > > > Return: > > > > There are 0 forms > > > > > > > > So maybe Form is the incorrect object but I'm > not > > > sure > > > > what else it would be. > > > what do the HTML tags when viewing the source > say? > > > Can you find them in the source? > > > > > > Can you grab the section of HTML that you are > trying > > > to drive with Watir and > > > email it? Feel free to create a zip file with > each > > > frame element if you have to, > > > and a description of what area you are trying to > > > interact with. You can email it > > > to me personally if you prefer, and I can try it > as > > > well. > > > > > > -Jonathan > > > > > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > > > > > > > > > > > > The frame is: > > > > > > frame index: 2 name: MainBody > > > > > > > > > > > > The form is generated from an asp form. I > > > don't > > > > > get > > > > > > any HTML tag for it that I can see. > > > > > hmmm... there should be generated HTML for > the > > > form > > > > > in the page source for that > > > > > frame shouldn't there? > > > > > > > > > > -Jonathan > > > > > > > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > > > > > Richard; > > > > > > > > > > > > > > Can you find the HTML tag for the form > you > > > are > > > > > > > trying to get Watir to find by > > > > > > > viewing the source of the page, and if > so, > > > can > > > > > you > > > > > > > email the tag to us? Also, > > > > > > > can you figure out what frame name it is > > > > > occurring > > > > > > > in? (If you've already done > > > > > > > this, disregard this email :) ) > > > > > > > > > > > > > > Thanks; > > > > > > > > > > > > > > -Jonathan > > > > > > > > > > > > > > > > > > > > > Quoting Richard Allen > : > > > > > > > > > > > > > > > I'm trying to veify that a particular > form > > > is > > > > > > > > displayed. I'd rather grab the form > name > > > than > > > > > text > > > > > > > on > > > > > > > > the form since I will know the form > name > > > > > before > > > > > > > hand > > > > > > > > and will not have to worry that they > > > changed > > > > > the > > > > > > > text > > > > > > > > on the form. > > > > > > > > > > > > > > > > I can't seem to locate any form name. > The > > > > > closest > > > > > > > I > > > > > > > > get is with $ie.showAllObjects which > shows > > > me: > > > > > > > > > > > > > src=forms/DepartmentF.asp > > > > > > > > > > > > > > > > I haven't been able to cature the > forms > > > title > > > > > to > > > > > > > > verify. > > > > > > > > > > > > > > > > $ie.frame("MainBody").showForms > > > > > > > > RETURNES > > > > > > > > There are 0 forms > > > > > > > > > > > > > > > > > > > > > > > > $ie.showFormes > > > > > > > > RETURNS: > > > > > > > > > > > c:/watir-v1_0_4/examples/TimeCentre.rb:112: > > > > > > > > undefined method `showFormes' for > > > > > > > > #(NoMethodError) > === message truncated === __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From jkohl at telusplanet.net Wed Mar 2 16:05:35 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Wed, 2 Mar 2005 13:05:35 -0800 Subject: [Wtr-general] Form Titles In-Reply-To: <20050302202949.80789.qmail@web30505.mail.mud.yahoo.com> References: <20050302202949.80789.qmail@web30505.mail.mud.yahoo.com> Message-ID: <1109797535.42262a9f865a5@webmail.telus.net> > I can navigate most of the application other than the > grids at this point. I wanted to find a way to verify > the correct form loaded other than just grabing text > from the form. Based on the HTML you sent, I don't see an HTML form, maybe we are using the same word for two different things? There are no tags, so maybe the form you are talking about is something different. Are there HTML tags in the page you can identify that the right thing has loaded with? We can do something to make sure that the tags exist as long as there are attributes that are uniquely identifiable. > We also use active x reports but the tool doesn't see > those, so I'm not sure how to verify a report loaded > and displayed correctly. If in the end, they are displayed as HTML, Watir can see them. If they are an ActiveX plugin, it can't unfortunately. > > --- jkohl at telusplanet.net wrote: > > > Thanks. I don't see any FORM HTML tags, so the > > "show" methods in Watir are > > giving you the correct output. This is a bit more > > tricky with all the scripting > > going on. I see a lot of includes for other files > > that will get called at the > > top of the file: > > > > > > > > > > > > > > > > > > and then CSS with this tag: > > > HREF="/timecentre/Common/AppStyle.css"> > > It looks like there are DHTML actions with DIVs as > > well as a combination of > > VBScript and JavaScript. > > > > In the source of this file, can you find the objects > > you are trying to interact > > with, and send those tags back in a reply? Because > > of all the includes I noted > > above, all I see on this page when I save it and > > load it is: > > "Codes Loading Data..." > > > > These objects look like likely sources for > > submitting the data: > > > > > > Note that they are wired to scripting functions. > > Once can use the Watir > > "fire_event" method on these objects to kick off the > > "onclick" events. > > > > Are these some of the objects you are trying to > > interact with? Do you want to > > Save for example on this page? To do a Save on this > > page for example, you could > > do this: > > ie.button(:id, "btnSave").fire_event("onclick") > > That will call the "DoSave" method which handles the > > save and does the action. > > > > Does this help? > > > > -Jonathan > > > > > > > > > > Quoting Richard Allen : > > > > > Here is the HTML for a form .. Job Codes. > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > Actually .. both > > > > > $ie.frame("MainBody").showForms and > > > > $ie.showFormes > > > > > > > > > > Return: > > > > > There are 0 forms > > > > > > > > > > So maybe Form is the incorrect object but I'm > > not > > > > sure > > > > > what else it would be. > > > > what do the HTML tags when viewing the source > > say? > > > > Can you find them in the source? > > > > > > > > Can you grab the section of HTML that you are > > trying > > > > to drive with Watir and > > > > email it? Feel free to create a zip file with > > each > > > > frame element if you have to, > > > > and a description of what area you are trying to > > > > interact with. You can email it > > > > to me personally if you prefer, and I can try it > > as > > > > well. > > > > > > > > -Jonathan > > > > > > > > > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > > > > > > > > > > > > > > > > The frame is: > > > > > > > frame index: 2 name: MainBody > > > > > > > > > > > > > > The form is generated from an asp form. I > > > > don't > > > > > > get > > > > > > > any HTML tag for it that I can see. > > > > > > hmmm... there should be generated HTML for > > the > > > > form > > > > > > in the page source for that > > > > > > frame shouldn't there? > > > > > > > > > > > > -Jonathan > > > > > > > > > > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > > > > > > > Richard; > > > > > > > > > > > > > > > > Can you find the HTML tag for the form > > you > > > > are > > > > > > > > trying to get Watir to find by > > > > > > > > viewing the source of the page, and if > > so, > > > > can > > > > > > you > > > > > > > > email the tag to us? Also, > > > > > > > > can you figure out what frame name it is > > > > > > occurring > > > > > > > > in? (If you've already done > > > > > > > > this, disregard this email :) ) > > > > > > > > > > > > > > > > Thanks; > > > > > > > > > > > > > > > > -Jonathan > > > > > > > > > > > > > > > > > > > > > > > > Quoting Richard Allen > > : > > > > > > > > > > > > > > > > > I'm trying to veify that a particular > > form > > > > is > > > > > > > > > displayed. I'd rather grab the form > > name > > > > than > > > > > > text > > > > > > > > on > > > > > > > > > the form since I will know the form > > name > > > > > > before > > > > > > > > hand > > > > > > > > > and will not have to worry that they > > > > changed > > > > > > the > > > > > > > > text > > > > > > > > > on the form. > > > > > > > > > > > > > > > > > > I can't seem to locate any form name. > > The > > > > > > closest > > > > > > > > I > > > > > > > > > get is with $ie.showAllObjects which > > shows > > > > me: > > > > > > > > > > > > > > > src=forms/DepartmentF.asp > > > > > > > > > > > > > > > > > > I haven't been able to cature the > > forms > > > > title > > > > > > to > > > > > > > > > verify. > > > > > > > > > > > > > > > > > > $ie.frame("MainBody").showForms > > > > > > > > > RETURNES > > > > > > > > > There are 0 forms > > > > > > > > > > > > > > > > > > > > > > > > > > > $ie.showFormes > > > > > > > > > RETURNS: > > > > > > > > > > > > > c:/watir-v1_0_4/examples/TimeCentre.rb:112: > > > > > > > > > undefined method `showFormes' for > > > > > > > > > #(NoMethodError) > > > === message truncated === > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From dallenusa at yahoo.com Wed Mar 2 17:27:38 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Wed, 2 Mar 2005 14:27:38 -0800 (PST) Subject: [Wtr-general] Form Titles In-Reply-To: <1109797535.42262a9f865a5@webmail.telus.net> Message-ID: <20050302222738.98167.qmail@web30502.mail.mud.yahoo.com> If I use showObjects I get: src=reports/TimeSheetReportMenuRpx.asp Can I capture this? --- jkohl at telusplanet.net wrote: > > > I can navigate most of the application other than > the > > grids at this point. I wanted to find a way to > verify > > the correct form loaded other than just grabing > text > > from the form. > Based on the HTML you sent, I don't see an HTML > form, maybe we are using the > same word for two different things? There are no > tags, so maybe the form > you are talking about is something different. > > Are there HTML tags in the page you can identify > that the right thing has > loaded with? We can do something to make sure that > the tags exist as long as > there are attributes that are uniquely identifiable. > > > We also use active x reports but the tool doesn't > see > > those, so I'm not sure how to verify a report > loaded > > and displayed correctly. > If in the end, they are displayed as HTML, Watir can > see them. If they are an > ActiveX plugin, it can't unfortunately. > > > > > > --- jkohl at telusplanet.net wrote: > > > > > Thanks. I don't see any FORM HTML tags, so the > > > "show" methods in Watir are > > > giving you the correct output. This is a bit > more > > > tricky with all the scripting > > > going on. I see a lot of includes for other > files > > > that will get called at the > > > top of the file: > > > > > > > > > > > > > > > > > > > > > > > > > > > and then CSS with this tag: > > > > > HREF="/timecentre/Common/AppStyle.css"> > > > It looks like there are DHTML actions with DIVs > as > > > well as a combination of > > > VBScript and JavaScript. > > > > > > In the source of this file, can you find the > objects > > > you are trying to interact > > > with, and send those tags back in a reply? > Because > > > of all the includes I noted > > > above, all I see on this page when I save it and > > > load it is: > > > "Codes Loading Data..." > > > > > > These objects look like likely sources for > > > submitting the data: > > > > > > > > > Note that they are wired to scripting functions. > > > Once can use the Watir > > > "fire_event" method on these objects to kick off > the > > > "onclick" events. > > > > > > Are these some of the objects you are trying to > > > interact with? Do you want to > > > Save for example on this page? To do a Save on > this > > > page for example, you could > > > do this: > > > ie.button(:id, "btnSave").fire_event("onclick") > > > That will call the "DoSave" method which handles > the > > > save and does the action. > > > > > > Does this help? > > > > > > -Jonathan > > > > > > > > > > > > > > > Quoting Richard Allen : > > > > > > > Here is the HTML for a form .. Job Codes. > > > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > > Actually .. both > > > > > > $ie.frame("MainBody").showForms and > > > > > $ie.showFormes > > > > > > > > > > > > Return: > > > > > > There are 0 forms > > > > > > > > > > > > So maybe Form is the incorrect object but > I'm > > > not > > > > > sure > > > > > > what else it would be. > > > > > what do the HTML tags when viewing the > source > > > say? > > > > > Can you find them in the source? > > > > > > > > > > Can you grab the section of HTML that you > are > > > trying > > > > > to drive with Watir and > > > > > email it? Feel free to create a zip file > with > > > each > > > > > frame element if you have to, > > > > > and a description of what area you are > trying to > > > > > interact with. You can email it > > > > > to me personally if you prefer, and I can > try it > > > as > > > > > well. > > > > > > > > > > -Jonathan > > > > > > > > > > > > > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > The frame is: > > > > > > > > frame index: 2 name: MainBody > > > > > > > > > > > > > > > > The form is generated from an asp > form. I > > > > > don't > > > > > > > get > > > > > > > > any HTML tag for it that I can see. > > > > > > > hmmm... there should be generated HTML > for > > > the > > > > > form > > > > > > > in the page source for that > > > > > > > frame shouldn't there? > > > > > > > > > > > > > > -Jonathan > > > > > > > > > > > > > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > > > > > > > > > Richard; > > > > > > > > > > > > > > > > > > Can you find the HTML tag for the > form > > > you > > > > > are > > > > > > > > > trying to get Watir to find by > > > > > > > > > viewing the source of the page, and > if > > > so, > > > > > can > > > > > > > you > > > > > > > > > email the tag to us? Also, > > > > > > > > > can you figure out what frame name > it is > > > > > > > occurring > === message truncated === __________________________________ Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web http://birthday.yahoo.com/netrospective/ From jkohl at telusplanet.net Wed Mar 2 17:45:42 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Wed, 2 Mar 2005 14:45:42 -0800 Subject: [Wtr-general] Form Titles In-Reply-To: <20050302222738.98167.qmail@web30502.mail.mud.yahoo.com> References: <20050302222738.98167.qmail@web30502.mail.mud.yahoo.com> Message-ID: <1109803542.42264216bd335@webmail.telus.net> See if this works: assert($ie.link(:url, "reports/TimeSheetReportMenuRpx.asp").exists?) or use a regular expression: assert($ie.link(:url, /reports/TimeSheetReportMenuRpx.asp/).exists?) Can you find the tag in the source for this link? That helps narrow things down. There may be a different attribute to use. -Jonathan Quoting Richard Allen : > If I use showObjects I get: > > src=reports/TimeSheetReportMenuRpx.asp > > Can I capture this? > > --- jkohl at telusplanet.net wrote: > > > > > > I can navigate most of the application other than > > the > > > grids at this point. I wanted to find a way to > > verify > > > the correct form loaded other than just grabing > > text > > > from the form. > > Based on the HTML you sent, I don't see an HTML > > form, maybe we are using the > > same word for two different things? There are no > > tags, so maybe the form > > you are talking about is something different. > > > > Are there HTML tags in the page you can identify > > that the right thing has > > loaded with? We can do something to make sure that > > the tags exist as long as > > there are attributes that are uniquely identifiable. > > > > > We also use active x reports but the tool doesn't > > see > > > those, so I'm not sure how to verify a report > > loaded > > > and displayed correctly. > > If in the end, they are displayed as HTML, Watir can > > see them. If they are an > > ActiveX plugin, it can't unfortunately. > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > Thanks. I don't see any FORM HTML tags, so the > > > > "show" methods in Watir are > > > > giving you the correct output. This is a bit > > more > > > > tricky with all the scripting > > > > going on. I see a lot of includes for other > > files > > > > that will get called at the > > > > top of the file: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > and then CSS with this tag: > > > > > > > HREF="/timecentre/Common/AppStyle.css"> > > > > It looks like there are DHTML actions with DIVs > > as > > > > well as a combination of > > > > VBScript and JavaScript. > > > > > > > > In the source of this file, can you find the > > objects > > > > you are trying to interact > > > > with, and send those tags back in a reply? > > Because > > > > of all the includes I noted > > > > above, all I see on this page when I save it and > > > > load it is: > > > > "Codes Loading Data..." > > > > > > > > These objects look like likely sources for > > > > submitting the data: > > > > > > > > > > > > Note that they are wired to scripting functions. > > > > Once can use the Watir > > > > "fire_event" method on these objects to kick off > > the > > > > "onclick" events. > > > > > > > > Are these some of the objects you are trying to > > > > interact with? Do you want to > > > > Save for example on this page? To do a Save on > > this > > > > page for example, you could > > > > do this: > > > > ie.button(:id, "btnSave").fire_event("onclick") > > > > That will call the "DoSave" method which handles > > the > > > > save and does the action. > > > > > > > > Does this help? > > > > > > > > -Jonathan > > > > > > > > > > > > > > > > > > > > Quoting Richard Allen : > > > > > > > > > Here is the HTML for a form .. Job Codes. > > > > > > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > > > > Actually .. both > > > > > > > $ie.frame("MainBody").showForms and > > > > > > $ie.showFormes > > > > > > > > > > > > > > Return: > > > > > > > There are 0 forms > > > > > > > > > > > > > > So maybe Form is the incorrect object but > > I'm > > > > not > > > > > > sure > > > > > > > what else it would be. > > > > > > what do the HTML tags when viewing the > > source > > > > say? > > > > > > Can you find them in the source? > > > > > > > > > > > > Can you grab the section of HTML that you > > are > > > > trying > > > > > > to drive with Watir and > > > > > > email it? Feel free to create a zip file > > with > > > > each > > > > > > frame element if you have to, > > > > > > and a description of what area you are > > trying to > > > > > > interact with. You can email it > > > > > > to me personally if you prefer, and I can > > try it > > > > as > > > > > > well. > > > > > > > > > > > > -Jonathan > > > > > > > > > > > > > > > > > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > The frame is: > > > > > > > > > frame index: 2 name: MainBody > > > > > > > > > > > > > > > > > > The form is generated from an asp > > form. I > > > > > > don't > > > > > > > > get > > > > > > > > > any HTML tag for it that I can see. > > > > > > > > hmmm... there should be generated HTML > > for > > > > the > > > > > > form > > > > > > > > in the page source for that > > > > > > > > frame shouldn't there? > > > > > > > > > > > > > > > > -Jonathan > > > > > > > > > > > > > > > > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > > > > > > > > > > > Richard; > > > > > > > > > > > > > > > > > > > > Can you find the HTML tag for the > > form > > > > you > > > > > > are > > > > > > > > > > trying to get Watir to find by > > > > > > > > > > viewing the source of the page, and > > if > > > > so, > > > > > > can > > > > > > > > you > > > > > > > > > > email the tag to us? Also, > > > > > > > > > > can you figure out what frame name > > it is > > > > > > > > occurring > > > === message truncated === > > > > > > __________________________________ > Celebrate Yahoo!'s 10th Birthday! > Yahoo! Netrospective: 100 Moments of the Web > http://birthday.yahoo.com/netrospective/ > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Wed Mar 2 19:31:48 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 02 Mar 2005 17:31:48 -0700 Subject: [Wtr-general] Form Titles In-Reply-To: <20050302222738.98167.qmail@web30502.mail.mud.yahoo.com> Message-ID: <001601c51f88$6331d270$6400a8c0@NewDell> That looks like a document in a frame -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Richard Allen Sent: 02 March 2005 15:28 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Form Titles If I use showObjects I get: src=reports/TimeSheetReportMenuRpx.asp Can I capture this? --- jkohl at telusplanet.net wrote: > > > I can navigate most of the application other than > the > > grids at this point. I wanted to find a way to > verify > > the correct form loaded other than just grabing > text > > from the form. > Based on the HTML you sent, I don't see an HTML > form, maybe we are using the > same word for two different things? There are no > tags, so maybe the form > you are talking about is something different. > > Are there HTML tags in the page you can identify > that the right thing has > loaded with? We can do something to make sure that > the tags exist as long as > there are attributes that are uniquely identifiable. > > > We also use active x reports but the tool doesn't > see > > those, so I'm not sure how to verify a report > loaded > > and displayed correctly. > If in the end, they are displayed as HTML, Watir can > see them. If they are an > ActiveX plugin, it can't unfortunately. > > > > > > --- jkohl at telusplanet.net wrote: > > > > > Thanks. I don't see any FORM HTML tags, so the > > > "show" methods in Watir are > > > giving you the correct output. This is a bit > more > > > tricky with all the scripting > > > going on. I see a lot of includes for other > files > > > that will get called at the > > > top of the file: > > > > > > > > > > > > > > > > > > > > > > > > > > > and then CSS with this tag: > > > > > HREF="/timecentre/Common/AppStyle.css"> > > > It looks like there are DHTML actions with DIVs > as > > > well as a combination of > > > VBScript and JavaScript. > > > > > > In the source of this file, can you find the > objects > > > you are trying to interact > > > with, and send those tags back in a reply? > Because > > > of all the includes I noted > > > above, all I see on this page when I save it and > > > load it is: > > > "Codes Loading Data..." > > > > > > These objects look like likely sources for > > > submitting the data: > > > > > > > > > Note that they are wired to scripting functions. > > > Once can use the Watir > > > "fire_event" method on these objects to kick off > the > > > "onclick" events. > > > > > > Are these some of the objects you are trying to > > > interact with? Do you want to > > > Save for example on this page? To do a Save on > this > > > page for example, you could > > > do this: > > > ie.button(:id, "btnSave").fire_event("onclick") > > > That will call the "DoSave" method which handles > the > > > save and does the action. > > > > > > Does this help? > > > > > > -Jonathan > > > > > > > > > > > > > > > Quoting Richard Allen : > > > > > > > Here is the HTML for a form .. Job Codes. > > > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > > Actually .. both > > > > > > $ie.frame("MainBody").showForms and > > > > > $ie.showFormes > > > > > > > > > > > > Return: > > > > > > There are 0 forms > > > > > > > > > > > > So maybe Form is the incorrect object but > I'm > > > not > > > > > sure > > > > > > what else it would be. > > > > > what do the HTML tags when viewing the > source > > > say? > > > > > Can you find them in the source? > > > > > > > > > > Can you grab the section of HTML that you > are > > > trying > > > > > to drive with Watir and > > > > > email it? Feel free to create a zip file > with > > > each > > > > > frame element if you have to, > > > > > and a description of what area you are > trying to > > > > > interact with. You can email it > > > > > to me personally if you prefer, and I can > try it > > > as > > > > > well. > > > > > > > > > > -Jonathan > > > > > > > > > > > > > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > The frame is: > > > > > > > > frame index: 2 name: MainBody > > > > > > > > > > > > > > > > The form is generated from an asp > form. I > > > > > don't > > > > > > > get > > > > > > > > any HTML tag for it that I can see. > > > > > > > hmmm... there should be generated HTML > for > > > the > > > > > form > > > > > > > in the page source for that > > > > > > > frame shouldn't there? > > > > > > > > > > > > > > -Jonathan > > > > > > > > > > > > > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > > > > > > > > > Richard; > > > > > > > > > > > > > > > > > > Can you find the HTML tag for the > form > > > you > > > > > are > > > > > > > > > trying to get Watir to find by > > > > > > > > > viewing the source of the page, and > if > > > so, > > > > > can > > > > > > > you > > > > > > > > > email the tag to us? Also, > > > > > > > > > can you figure out what frame name > it is > > > > > > > occurring > === message truncated === __________________________________ Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web http://birthday.yahoo.com/netrospective/ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From dallenusa at yahoo.com Thu Mar 3 12:04:31 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Thu, 3 Mar 2005 09:04:31 -0800 (PST) Subject: [Wtr-general] Form Titles In-Reply-To: <001601c51f88$6331d270$6400a8c0@NewDell> Message-ID: <20050303170431.44866.qmail@web30506.mail.mud.yahoo.com> I don't see a 'document' method. Can Watir handle this? --- Paul Rogers wrote: > That looks like a document in a frame > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf > Of Richard Allen > Sent: 02 March 2005 15:28 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Form Titles > > > If I use showObjects I get: > > src=reports/TimeSheetReportMenuRpx.asp > > Can I capture this? > > --- jkohl at telusplanet.net wrote: > > > > > > I can navigate most of the application other > than > > the > > > grids at this point. I wanted to find a way to > > verify > > > the correct form loaded other than just grabing > > text > > > from the form. > > Based on the HTML you sent, I don't see an HTML > > form, maybe we are using the > > same word for two different things? There are no > > tags, so maybe the form > > you are talking about is something different. > > > > Are there HTML tags in the page you can identify > > that the right thing has > > loaded with? We can do something to make sure that > > the tags exist as long as > > there are attributes that are uniquely > identifiable. > > > > > We also use active x reports but the tool > doesn't > > see > > > those, so I'm not sure how to verify a report > > loaded > > > and displayed correctly. > > If in the end, they are displayed as HTML, Watir > can > > see them. If they are an > > ActiveX plugin, it can't unfortunately. > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > Thanks. I don't see any FORM HTML tags, so the > > > > "show" methods in Watir are > > > > giving you the correct output. This is a bit > > more > > > > tricky with all the scripting > > > > going on. I see a lot of includes for other > > files > > > > that will get called at the > > > > top of the file: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > and then CSS with this tag: > > > > > > > HREF="/timecentre/Common/AppStyle.css"> > > > > It looks like there are DHTML actions with > DIVs > > as > > > > well as a combination of > > > > VBScript and JavaScript. > > > > > > > > In the source of this file, can you find the > > objects > > > > you are trying to interact > > > > with, and send those tags back in a reply? > > Because > > > > of all the includes I noted > > > > above, all I see on this page when I save it > and > > > > load it is: > > > > "Codes Loading Data..." > > > > > > > > These objects look like likely sources for > > > > submitting the data: > > > > > > > > > > > > Note that they are wired to scripting > functions. > > > > Once can use the Watir > > > > "fire_event" method on these objects to kick > off > > the > > > > "onclick" events. > > > > > > > > Are these some of the objects you are trying > to > > > > interact with? Do you want to > > > > Save for example on this page? To do a Save on > > this > > > > page for example, you could > > > > do this: > > > > ie.button(:id, > "btnSave").fire_event("onclick") > > > > That will call the "DoSave" method which > handles > > the > > > > save and does the action. > > > > > > > > Does this help? > > > > > > > > -Jonathan > > > > > > > > > > > > > > > > > > > > Quoting Richard Allen : > > > > > > > > > Here is the HTML for a form .. Job Codes. > > > > > > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > > > > Actually .. both > > > > > > > $ie.frame("MainBody").showForms and > > > > > > $ie.showFormes > > > > > > > > > > > > > > Return: > > > > > > > There are 0 forms > > > > > > > > > > > > > > So maybe Form is the incorrect object > but > > I'm > > > > not > > > > > > sure > > > > > > > what else it would be. > > > > > > what do the HTML tags when viewing the > > source > > > > say? > > > > > > Can you find them in the source? > > > > > > > > > > > > Can you grab the section of HTML that you > > are > > > > trying > > > > > > to drive with Watir and > > > > > > email it? Feel free to create a zip file > > with > > > > each > > > > > > frame element if you have to, > > > > > > and a description of what area you are > > trying to > > > > > > interact with. You can email it > > > > > > to me personally if you prefer, and I can > > try it > > > > as > > > > > > well. > > > > > > > > > > > > -Jonathan > > > > > > > > > > > > > > > > > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > > > > > > > > > > > > > > > > === message truncated === __________________________________ Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web http://birthday.yahoo.com/netrospective/ From paul.rogers at shaw.ca Thu Mar 3 12:15:21 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 03 Mar 2005 10:15:21 -0700 Subject: [Wtr-general] Form Titles In-Reply-To: <20050303170431.44866.qmail@web30506.mail.mud.yahoo.com> Message-ID: <000801c52014$94db1e30$6400a8c0@NewDell> ie.frame("name_of_the_frame").xxxx You should get the name of the frame from the showallobjects method And xxx is the method you want to use on the frame, eg Ie.frame("main_page").button.click(:name, "myButton") Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Richard Allen Sent: 03 March 2005 10:05 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Form Titles I don't see a 'document' method. Can Watir handle this? --- Paul Rogers wrote: > That looks like a document in a frame > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Richard Allen > Sent: 02 March 2005 15:28 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Form Titles > > > If I use showObjects I get: > > src=reports/TimeSheetReportMenuRpx.asp > > Can I capture this? > > --- jkohl at telusplanet.net wrote: > > > > > > I can navigate most of the application other > than > > the > > > grids at this point. I wanted to find a way to > > verify > > > the correct form loaded other than just grabing > > text > > > from the form. > > Based on the HTML you sent, I don't see an HTML > > form, maybe we are using the > > same word for two different things? There are no > > tags, so maybe the form > > you are talking about is something different. > > > > Are there HTML tags in the page you can identify > > that the right thing has > > loaded with? We can do something to make sure that > > the tags exist as long as > > there are attributes that are uniquely > identifiable. > > > > > We also use active x reports but the tool > doesn't > > see > > > those, so I'm not sure how to verify a report > > loaded > > > and displayed correctly. > > If in the end, they are displayed as HTML, Watir > can > > see them. If they are an > > ActiveX plugin, it can't unfortunately. > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > Thanks. I don't see any FORM HTML tags, so the > > > > "show" methods in Watir are > > > > giving you the correct output. This is a bit > > more > > > > tricky with all the scripting > > > > going on. I see a lot of includes for other > > files > > > > that will get called at the > > > > top of the file: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > and then CSS with this tag: > > > > > > > HREF="/timecentre/Common/AppStyle.css"> > > > > It looks like there are DHTML actions with > DIVs > > as > > > > well as a combination of > > > > VBScript and JavaScript. > > > > > > > > In the source of this file, can you find the > > objects > > > > you are trying to interact > > > > with, and send those tags back in a reply? > > Because > > > > of all the includes I noted > > > > above, all I see on this page when I save it > and > > > > load it is: > > > > "Codes Loading Data..." > > > > > > > > These objects look like likely sources for > > > > submitting the data: > > > > > > > > > > > > Note that they are wired to scripting > functions. > > > > Once can use the Watir > > > > "fire_event" method on these objects to kick > off > > the > > > > "onclick" events. > > > > > > > > Are these some of the objects you are trying > to > > > > interact with? Do you want to > > > > Save for example on this page? To do a Save on > > this > > > > page for example, you could > > > > do this: > > > > ie.button(:id, > "btnSave").fire_event("onclick") > > > > That will call the "DoSave" method which > handles > > the > > > > save and does the action. > > > > > > > > Does this help? > > > > > > > > -Jonathan > > > > > > > > > > > > > > > > > > > > Quoting Richard Allen : > > > > > > > > > Here is the HTML for a form .. Job Codes. > > > > > > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > > > > Actually .. both > > > > > > > $ie.frame("MainBody").showForms and > > > > > > $ie.showFormes > > > > > > > > > > > > > > Return: > > > > > > > There are 0 forms > > > > > > > > > > > > > > So maybe Form is the incorrect object > but > > I'm > > > > not > > > > > > sure > > > > > > > what else it would be. > > > > > > what do the HTML tags when viewing the > > source > > > > say? > > > > > > Can you find them in the source? > > > > > > > > > > > > Can you grab the section of HTML that you > > are > > > > trying > > > > > > to drive with Watir and > > > > > > email it? Feel free to create a zip file > > with > > > > each > > > > > > frame element if you have to, > > > > > > and a description of what area you are > > trying to > > > > > > interact with. You can email it > > > > > > to me personally if you prefer, and I can > > try it > > > > as > > > > > > well. > > > > > > > > > > > > -Jonathan > > > > > > > > > > > > > > > > > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > > > > > > > > > > > > > > > > === message truncated === __________________________________ Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web http://birthday.yahoo.com/netrospective/ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Thu Mar 3 12:20:03 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Thu, 3 Mar 2005 09:20:03 -0800 Subject: [Wtr-general] Form Titles In-Reply-To: <20050303170431.44866.qmail@web30506.mail.mud.yahoo.com> References: <20050303170431.44866.qmail@web30506.mail.mud.yahoo.com> Message-ID: <1109870403.422747437bd58@webmail.telusplanet.net> > I don't see a 'document' method. Can Watir handle > this? > I don't see a 'document' method. Can Watir handle > this? What Paul is saying, is that in a frame, you have a parent HTML document or page, and the content on that page is made up of other documents, or in other words, HTML pages. So you have something that looks like this, the source of the parent HTML document: what you are seeing with the src property is one of these HTML documents in the frame set. show_all_objects on the above parent page looks like this: -----------Objects in page ------------- text/javascript id= src= HTML Document name=HeaderFrame id= src=page1.asp HTML Document name=ButtonFrame id= src=page2.asp HTML Document name=ContentFrame id= src=page3.asp Does that make sense? So Watir can handle frames, the document that is stored in the DTD of the DOM is a rendered HTML document. So you are dealing with frames, and need to use the Watir frame methods to access objects on that page. -Jonathan > --- Paul Rogers wrote: > > > That looks like a document in a frame > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf > > Of Richard Allen > > Sent: 02 March 2005 15:28 > > To: wtr-general at rubyforge.org > > Subject: RE: [Wtr-general] Form Titles > > > > > > If I use showObjects I get: > > > > src=reports/TimeSheetReportMenuRpx.asp > > > > Can I capture this? > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > I can navigate most of the application other > > than > > > the > > > > grids at this point. I wanted to find a way to > > > verify > > > > the correct form loaded other than just grabing > > > text > > > > from the form. > > > Based on the HTML you sent, I don't see an HTML > > > form, maybe we are using the > > > same word for two different things? There are no > > > tags, so maybe the form > > > you are talking about is something different. > > > > > > Are there HTML tags in the page you can identify > > > that the right thing has > > > loaded with? We can do something to make sure that > > > the tags exist as long as > > > there are attributes that are uniquely > > identifiable. > > > > > > > We also use active x reports but the tool > > doesn't > > > see > > > > those, so I'm not sure how to verify a report > > > loaded > > > > and displayed correctly. > > > If in the end, they are displayed as HTML, Watir > > can > > > see them. If they are an > > > ActiveX plugin, it can't unfortunately. > > > > > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > Thanks. I don't see any FORM HTML tags, so the > > > > > "show" methods in Watir are > > > > > giving you the correct output. This is a bit > > > more > > > > > tricky with all the scripting > > > > > going on. I see a lot of includes for other > > > files > > > > > that will get called at the > > > > > top of the file: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > and then CSS with this tag: > > > > > > > > > HREF="/timecentre/Common/AppStyle.css"> > > > > > It looks like there are DHTML actions with > > DIVs > > > as > > > > > well as a combination of > > > > > VBScript and JavaScript. > > > > > > > > > > In the source of this file, can you find the > > > objects > > > > > you are trying to interact > > > > > with, and send those tags back in a reply? > > > Because > > > > > of all the includes I noted > > > > > above, all I see on this page when I save it > > and > > > > > load it is: > > > > > "Codes Loading Data..." > > > > > > > > > > These objects look like likely sources for > > > > > submitting the data: > > > > > > > > > > > > > > > Note that they are wired to scripting > > functions. > > > > > Once can use the Watir > > > > > "fire_event" method on these objects to kick > > off > > > the > > > > > "onclick" events. > > > > > > > > > > Are these some of the objects you are trying > > to > > > > > interact with? Do you want to > > > > > Save for example on this page? To do a Save on > > > this > > > > > page for example, you could > > > > > do this: > > > > > ie.button(:id, > > "btnSave").fire_event("onclick") > > > > > That will call the "DoSave" method which > > handles > > > the > > > > > save and does the action. > > > > > > > > > > Does this help? > > > > > > > > > > -Jonathan > > > > > > > > > > > > > > > > > > > > > > > > > Quoting Richard Allen : > > > > > > > > > > > Here is the HTML for a form .. Job Codes. > > > > > > > > > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > > > > > > Actually .. both > > > > > > > > $ie.frame("MainBody").showForms and > > > > > > > $ie.showFormes > > > > > > > > > > > > > > > > Return: > > > > > > > > There are 0 forms > > > > > > > > > > > > > > > > So maybe Form is the incorrect object > > but > > > I'm > > > > > not > > > > > > > sure > > > > > > > > what else it would be. > > > > > > > what do the HTML tags when viewing the > > > source > > > > > say? > > > > > > > Can you find them in the source? > > > > > > > > > > > > > > Can you grab the section of HTML that you > > > are > > > > > trying > > > > > > > to drive with Watir and > > > > > > > email it? Feel free to create a zip file > > > with > > > > > each > > > > > > > frame element if you have to, > > > > > > > and a description of what area you are > > > trying to > > > > > > > interact with. You can email it > > > > > > > to me personally if you prefer, and I can > > > try it > > > > > as > > > > > > > well. > > > > > > > > > > > > > > -Jonathan > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- jkohl at telusplanet.net wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > === message truncated === > > > > > > __________________________________ > Celebrate Yahoo!'s 10th Birthday! > Yahoo! Netrospective: 100 Moments of the Web > http://birthday.yahoo.com/netrospective/ > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From upgundecha at yahoo.com Fri Mar 4 01:25:49 2005 From: upgundecha at yahoo.com (Unmesh Gundecha) Date: Thu, 3 Mar 2005 22:25:49 -0800 (PST) Subject: [Wtr-general] (no subject) Message-ID: <20050304062550.53418.qmail@web53909.mail.yahoo.com> Hi, I am trying to write a automation script in WTR, The Web application which I am testing requires a Network Login. Does anyone help me how to handle this window in WTR. Thanks in advance, Regards, Unmesh __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050303/3840a73a/attachment.html From lorenzo_jorquera at yahoo.com Fri Mar 4 06:44:03 2005 From: lorenzo_jorquera at yahoo.com (Lorenzo Jorquera) Date: Fri, 4 Mar 2005 05:44:03 -0600 (CST) Subject: [Wtr-general] comitting changes Message-ID: <20050304114403.17976.qmail@web21324.mail.yahoo.com> Hi, I am trying to commit some changes I've made to Watir::Table, but I am not sure about how to access the cvs repository (I am not very experimented with CVS). Can someone show me an example of this? Thanks in advance. Lorenzo. --------------------------------- Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050304/c082165b/attachment.html From paul.rogers at shaw.ca Fri Mar 4 11:07:28 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 04 Mar 2005 09:07:28 -0700 Subject: [Wtr-general] comitting changes In-Reply-To: <20050304114403.17976.qmail@web21324.mail.yahoo.com> Message-ID: <001601c520d4$43a09480$6400a8c0@NewDell> Lorenzo, take a look at this page: http://rubyforge.org/scm/?group_id=104 If you havent used cvs before, you may want to try Tortoise CVS which integrates with windows explorer Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Lorenzo Jorquera Sent: 04 March 2005 04:44 To: wtr Subject: [Wtr-general] comitting changes Hi, I am trying to commit some changes I've made to Watir::Table, but I am not sure about how to access the cvs repository (I am not very experimented with CVS). Can someone show me an example of this? Thanks in advance. Lorenzo. _____ Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050304/26f0887b/attachment.html From paul.rogers at shaw.ca Fri Mar 4 11:10:22 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 04 Mar 2005 09:10:22 -0700 Subject: [Wtr-general] (no subject) In-Reply-To: <20050304062550.53418.qmail@web53909.mail.yahoo.com> Message-ID: <001b01c520d4$ab5e0b70$6400a8c0@NewDell> It is possible to do this with the winClicker.rb w = WinClicker.new handle = w.getWindowHandle("Connect") w.makeWindowActive ( handle ) w.clickWindowsButton_hwnd (handle ,"OK" ) If you need to fill in text fields, you can use these methods setComboBoxText setTextBoxText in the winclicker file, which is normally in: C:\ruby\lib\ruby\site_ruby\1.8\watir\winClicker.rb Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Unmesh Gundecha Sent: 03 March 2005 23:26 To: wtr-general at rubyforge.org Cc: wtr_general at rubyforge.org Subject: [Wtr-general] (no subject) Hi, I am trying to write a automation script in WTR, The Web application which I am testing requires a Network Login. Does anyone help me how to handle this window in WTR. Thanks in advance, Regards, Unmesh __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050304/f03c55c0/attachment.html From paul.rogers at shaw.ca Fri Mar 4 20:34:11 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 04 Mar 2005 18:34:11 -0700 Subject: [Wtr-general] Winclicker replacement Message-ID: <000d01c52123$6edfa650$6400a8c0@NewDell> There was a thread on comp.lang.ruby about doing windows things, like the javascript clickers and security boxes. It pointed to this, http://www.rubygarden.org/ruby?AutoIt_For_Windows Which in turn goes to http://www.autoitscript.com/autoit3/ This may be a good solution for our immediate needs Paul From christopher.mcmahon at gmail.com Fri Mar 4 22:00:25 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 4 Mar 2005 20:00:25 -0700 Subject: [Wtr-general] Winclicker replacement In-Reply-To: <000d01c52123$6edfa650$6400a8c0@NewDell> References: <000d01c52123$6edfa650$6400a8c0@NewDell> Message-ID: <72799cd70503041900136acf36@mail.gmail.com> On Fri, 04 Mar 2005 18:34:11 -0700, Paul Rogers wrote: > There was a thread on comp.lang.ruby about doing windows things, like > the javascript clickers and security boxes. > > It pointed to this, http://www.rubygarden.org/ruby?AutoIt_For_Windows > Which in turn goes to http://www.autoitscript.com/autoit3/ > > This may be a good solution for our immediate needs > Elisabeth Hendrickson likes AutoIT: http://www.qualitytree.com/ruminate/061404.htm but I still would rather have win32::guitest brought up to date: http://raa.ruby-lang.org/list.rhtml?name=win32-guitest . There's been quite a lot of action on the Perl Win32::GuiTest module in the last year or so: http://sourceforge.net/projects/winguitest/ and it would be great to see the Ruby and Perl implementations helping each other out. Is anyone out there just itching to lead a development effort on Ruby's Win32::GuiTest module? -Chris From lorenzo_jorquera at yahoo.com Fri Mar 4 22:18:57 2005 From: lorenzo_jorquera at yahoo.com (Lorenzo Jorquera) Date: Fri, 4 Mar 2005 21:18:57 -0600 (CST) Subject: [Wtr-general] Watir::Table changes Message-ID: <20050305031857.22067.qmail@web21322.mail.yahoo.com> Hi, I've checked in some changes in Watir::Table (thanks Paul, TortoiseCVS rocks!). Now you can say table = $ie.table(:index,1) table[1][1].button.click in order to click a button within a table and table = $ie.table(:index,1) table[1][1].table[1][1].button.click to access objects within nested tables. Also, tables can be created from an object that belongs to the table (I've found this handy when an element of the table can be easily identified but not the table ) The syntax is: button = $ie.button(:id,"b1") table = Table.create_from_element($ie,button) TODO: Only buttons and textFields can be created from tables cells, I will add support for the other Watir objects. Bye, Lorenzo. --------------------------------- Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050304/c07081d9/attachment.html From paul.rogers at shaw.ca Fri Mar 4 22:29:15 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 04 Mar 2005 20:29:15 -0700 Subject: [Wtr-general] Winclicker replacement In-Reply-To: <72799cd70503041900136acf36@mail.gmail.com> Message-ID: <001301c52133$81cd20c0$6400a8c0@NewDell> I recently wrote to moonwolf ( the author of the ruby win32-gui) but his email address seemed to be dead. I think this is a very worthy thing to do. In my view, and many others, ruby is an excellent language for writing tests in. I hope we can extend to writing tests for windows applications as well as web ones. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: 04 March 2005 20:00 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Winclicker replacement On Fri, 04 Mar 2005 18:34:11 -0700, Paul Rogers wrote: > There was a thread on comp.lang.ruby about doing windows things, like > the javascript clickers and security boxes. > > It pointed to this, http://www.rubygarden.org/ruby?AutoIt_For_Windows > Which in turn goes to http://www.autoitscript.com/autoit3/ > > This may be a good solution for our immediate needs > Elisabeth Hendrickson likes AutoIT: http://www.qualitytree.com/ruminate/061404.htm but I still would rather have win32::guitest brought up to date: http://raa.ruby-lang.org/list.rhtml?name=win32-guitest . There's been quite a lot of action on the Perl Win32::GuiTest module in the last year or so: http://sourceforge.net/projects/winguitest/ and it would be great to see the Ruby and Perl implementations helping each other out. Is anyone out there just itching to lead a development effort on Ruby's Win32::GuiTest module? -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Fri Mar 4 22:37:30 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 04 Mar 2005 20:37:30 -0700 Subject: [Wtr-general] Watir::Table changes In-Reply-To: <20050305031857.22067.qmail@web21322.mail.yahoo.com> Message-ID: <001401c52134$a9115ab0$6400a8c0@NewDell> Thanks Lorenzo! I'd also like to make the cell and row objects children of the table object: If thats something you'd like to work on, please go ahead. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Lorenzo Jorquera Sent: 04 March 2005 20:19 To: wtr Subject: [Wtr-general] Watir::Table changes Hi, I've checked in some changes in Watir::Table (thanks Paul, TortoiseCVS rocks!). Now you can say table = $ie.table(:index,1) table[1][1].button.click in order to click a button within a table and table = $ie.table(:index,1) table[1][1].table[1][1].button.click to access objects within nested tables. Also, tables can be created from an object that belongs to the table (I've found this handy when an element of the table can be easily identified but not the table ) The syntax is: button = $ie.button(:id,"b1") table = Table.create_from_element($ie,button) TODO: Only buttons and textFields can be created from tables cells, I will add support for the other Watir objects. Bye, Lorenzo. _____ Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050304/a6000045/attachment.html From upgundecha at yahoo.com Sat Mar 5 07:11:29 2005 From: upgundecha at yahoo.com (Unmesh Gundecha) Date: Sat, 5 Mar 2005 04:11:29 -0800 (PST) Subject: [Wtr-general] (no subject) In-Reply-To: <001b01c520d4$ab5e0b70$6400a8c0@NewDell> Message-ID: <20050305121129.60521.qmail@web53908.mail.yahoo.com> Thanks Paul, I will try this.. Regards, Unmesh Paul Rogers wrote: It is possible to do this with the winClicker.rb w = WinClicker.new handle = w.getWindowHandle("Connect") w.makeWindowActive ( handle ) w.clickWindowsButton_hwnd (handle ,"OK" ) If you need to fill in text fields, you can use these methods setComboBoxText setTextBoxText in the winclicker file, which is normally in: C:\ruby\lib\ruby\site_ruby\1.8\watir\winClicker.rb Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Unmesh Gundecha Sent: 03 March 2005 23:26 To: wtr-general at rubyforge.org Cc: wtr_general at rubyforge.org Subject: [Wtr-general] (no subject) Hi, I am trying to write a automation script in WTR, The Web application which I am testing requires a Network Login. Does anyone help me how to handle this window in WTR. Thanks in advance, Regards, Unmesh __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050305/55440841/attachment.html From lorenzo_jorquera at yahoo.com Sat Mar 5 11:28:55 2005 From: lorenzo_jorquera at yahoo.com (Lorenzo Jorquera) Date: Sat, 5 Mar 2005 10:28:55 -0600 (CST) Subject: [Wtr-general] Watir::Table changes In-Reply-To: <001401c52134$a9115ab0$6400a8c0@NewDell> Message-ID: <20050305162855.75086.qmail@web21326.mail.yahoo.com> Hi Paul, I am not sure I understand... you mean make row and cell subclases of table? Paul Rogers wrote: Thanks Lorenzo! I'd also like to make the cell and row objects children of the table object: If thats something you'd like to work on, please go ahead. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Lorenzo Jorquera Sent: 04 March 2005 20:19 To: wtr Subject: [Wtr-general] Watir::Table changes Hi, I've checked in some changes in Watir::Table (thanks Paul, TortoiseCVS rocks!). Now you can say table = $ie.table(:index,1) table[1][1].button.click in order to click a button within a table and table = $ie.table(:index,1) table[1][1].table[1][1].button.click to access objects within nested tables. Also, tables can be created from an object that belongs to the table (I've found this handy when an element of the table can be easily identified but not the table ) The syntax is: button = $ie.button(:id,"b1") table = Table.create_from_element($ie,button) TODO: Only buttons and textFields can be created from tables cells, I will add support for the other Watir objects. Bye, Lorenzo. --------------------------------- Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050305/5c8f12c2/attachment.html From paul.rogers at shaw.ca Sat Mar 5 12:06:38 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sat, 05 Mar 2005 10:06:38 -0700 Subject: [Wtr-general] Watir::Table changes In-Reply-To: <20050305162855.75086.qmail@web21326.mail.yahoo.com> Message-ID: <000e01c521a5$b1f7e1a0$6400a8c0@NewDell> I think that row and cell are factory methods on the main watir object I think they should be methods under the table object too Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Lorenzo Jorquera Sent: 05 March 2005 09:29 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Watir::Table changes Hi Paul, I am not sure I understand... you mean make row and cell subclases of table? Paul Rogers wrote: Thanks Lorenzo! I'd also like to make the cell and row objects children of the table object: If thats something you'd like to work on, please go ahead. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Lorenzo Jorquera Sent: 04 March 2005 20:19 To: wtr Subject: [Wtr-general] Watir::Table changes Hi, I've checked in some changes in Watir::Table (thanks Paul, TortoiseCVS rocks!). Now you can say table = $ie.table(:index,1) table[1][1].button.click in order to click a button within a table and table = $ie.table(:index,1) table[1][1].table[1][1].button.click to access objects within nested tables. Also, tables can be created from an object that belongs to the table (I've found this handy when an element of the table can be easily identified but not the table ) The syntax is: button = $ie.button(:id,"b1") table = Table.create_from_element($ie,button) TODO: Only buttons and textFields can be created from tables cells, I will add support for the other Watir objects. Bye, Lorenzo. _____ Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _____ Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050305/b6f6dd58/attachment.html From jkohl at telusplanet.net Sat Mar 5 15:33:03 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Sat, 5 Mar 2005 13:33:03 -0700 Subject: [Wtr-general] new project home page Message-ID: <20050305203213.PQGQ6727.priv-edtnes56.telusplanet.net@tintin> http://wtr.rubyforge.org/ Content for each of the pages to follow. -Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050305/45c6e03e/attachment.html From chrismo at clabs.org Sun Mar 6 12:04:14 2005 From: chrismo at clabs.org (Chris Morris) Date: Sun, 06 Mar 2005 11:04:14 -0600 Subject: [Wtr-general] new project home page In-Reply-To: <20050305203213.PQGQ6727.priv-edtnes56.telusplanet.net@tintin> References: <20050305203213.PQGQ6727.priv-edtnes56.telusplanet.net@tintin> Message-ID: <422B380E.6080004@clabs.org> Jonathan Kohl wrote: > http://wtr.rubyforge.org/ > > > > Content for each of the pages to follow. > Wow, looks sharp. Excellent stuff. -- Chris http://clabs.org/blogki From Mike at MichaelDKelly.com Sun Mar 6 12:07:51 2005 From: Mike at MichaelDKelly.com (Michael Kelly) Date: Sun, 6 Mar 2005 12:07:51 -0500 Subject: [Wtr-general] new project home page Message-ID: <200503061707.DKL18096@ms2.netsolmail.com> >Wow, looks sharp. Excellent stuff. Ditto. Let me know if there is anything I can help with as you start throwing content out there. -Mike ---- Original message ---- >Date: Sun, 06 Mar 2005 11:04:14 -0600 >From: Chris Morris >Subject: Re: [Wtr-general] new project home page >To: wtr-general at rubyforge.org > >Jonathan Kohl wrote: > >> http://wtr.rubyforge.org/ >> >> >> >> Content for each of the pages to follow. >> > >-- >Chris >http://clabs.org/blogki > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general From dominique.plante at gmail.com Sun Mar 6 15:23:14 2005 From: dominique.plante at gmail.com (Dominique Plante) Date: Sun, 6 Mar 2005 12:23:14 -0800 Subject: [Wtr-general] new project home page In-Reply-To: <20050305203213.PQGQ6727.priv-edtnes56.telusplanet.net@tintin> References: <20050305203213.PQGQ6727.priv-edtnes56.telusplanet.net@tintin> Message-ID: Dear Jonathan: sorry I wasn't able to get back to you sooner to help you on this.... I had started working on something a week ago, but didn't have a chance to contact you. I think you did a great job, and I hope it didn't take up too much of your time. Thanks, Dominique On Sat, 5 Mar 2005 13:33:03 -0700, Jonathan Kohl wrote: > > > > http://wtr.rubyforge.org/ > > > > Content for each of the pages to follow. > > > > -Jonathan > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- ---------------------------------------------------------- dom.website = http://www.binaryshift.com From jkohl at telusplanet.net Sun Mar 6 20:45:29 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Sun, 6 Mar 2005 18:45:29 -0700 Subject: [Wtr-general] new project home page In-Reply-To: <422B380E.6080004@clabs.org> Message-ID: <20050307014423.PKJG24769.priv-edtnes27.telusplanet.net@tintin> Thanks for the kind words. > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Chris Morris > Sent: March 6, 2005 10:04 AM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] new project home page > > Jonathan Kohl wrote: > > > http://wtr.rubyforge.org/ > > > > > > > > Content for each of the pages to follow. > > > Wow, looks sharp. Excellent stuff. > > -- > Chris > http://clabs.org/blogki > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Sun Mar 6 20:46:01 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Sun, 6 Mar 2005 18:46:01 -0700 Subject: [Wtr-general] new project home page In-Reply-To: <200503061707.DKL18096@ms2.netsolmail.com> Message-ID: <20050307014455.PKQP24769.priv-edtnes27.telusplanet.net@tintin> Thanks. You will hear from me soon. :) > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Michael Kelly > Sent: March 6, 2005 10:08 AM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] new project home page > > >Wow, looks sharp. Excellent stuff. > > Ditto. Let me know if there is anything I can help with as > you start throwing content out there. > > -Mike > > ---- Original message ---- > >Date: Sun, 06 Mar 2005 11:04:14 -0600 > >From: Chris Morris > >Subject: Re: [Wtr-general] new project home page > >To: wtr-general at rubyforge.org > > > >Jonathan Kohl wrote: > > > >> http://wtr.rubyforge.org/ > >> > >> > >> > >> Content for each of the pages to follow. > >> > > > >-- > >Chris > >http://clabs.org/blogki > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Sun Mar 6 20:47:26 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Sun, 6 Mar 2005 18:47:26 -0700 Subject: [Wtr-general] new project home page In-Reply-To: Message-ID: <20050307014619.XAMG29897.priv-edtnes46.telusplanet.net@tintin> > sorry I wasn't able to get back to you sooner to help you on this.... No prob. > I had started working on something a week ago, but didn't have a > chance to contact you. Ah, that's too bad. > I think you did a great job, and I hope it didn't take up too much of your > time. Thanks. I had some spare time week before last, so I got the basic format together. The rest was just tweaking the CSS to get the layout where I wanted. It wasn't a lot of time, and my wife helped me get the layout to line up. :) Thanks; -Jonathan > Thanks, > Dominique > > > On Sat, 5 Mar 2005 13:33:03 -0700, Jonathan Kohl > wrote: > > > > > > > > http://wtr.rubyforge.org/ > > > > > > > > Content for each of the pages to follow. > > > > > > > > -Jonathan > > > > > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > -- > ---------------------------------------------------------- > dom.website = http://www.binaryshift.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Fri Mar 4 23:59:37 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 05 Mar 2005 10:29:37 +0530 Subject: [Wtr-general] comitting changes In-Reply-To: <001601c520d4$43a09480$6400a8c0@NewDell> References: <20050304114403.17976.qmail@web21324.mail.yahoo.com> Message-ID: <5.1.0.14.2.20050304225604.032316b8@127.0.0.1> I highly recommend the Pragmatic Programmer's CVS book. I forget the exact title, but i have a review of it on my blog. (I'm offline at the moment.) It describes the command-line interface to CVS. I don't recommend using the command-line on a daily basis, but i also don't think you can really understand CVS until you learn to use this interface. Whenever i am having trouble using one of the GUI front ends to CVS, i go back to using the command-line, which seems to be much better at giving informative error messages when things are working. Bret _____________________ Bret Pettichord www.pettichord.com From Anand.Vaitheeswaran at honeywell.com Sun Mar 6 22:59:47 2005 From: Anand.Vaitheeswaran at honeywell.com (Anand, Vaitheeswaran (IE10)) Date: Sun, 6 Mar 2005 20:59:47 -0700 Subject: [Wtr-general] new project home page Message-ID: <77ED2BF75D59D1439F90412CC5B109741A7111C1@ie10-sahara.hiso.honeywell.com> Hi, It has been an excellent resource and it has helped us immensely in our work. Thanks to all of you. Anand _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: Sunday, March 06, 2005 2:03 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] new project home page http://wtr.rubyforge.org/ Content for each of the pages to follow. -Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050306/b1e4f4eb/attachment.html From Ramya.Moorthy at honeywell.com Mon Mar 7 06:38:22 2005 From: Ramya.Moorthy at honeywell.com (Ramya Ramalinga, Moorthy (IE10)) Date: Mon, 7 Mar 2005 04:38:22 -0700 Subject: [Wtr-general] Problems bcoz of Multiple Thread using the same Instance Message-ID: <77ED2BF75D59D1439F90412CC5B109741A7BC571@ie10-sahara.hiso.honeywell.com> Hi , I have a problem when using multiple threads trying to open Explorer instances . Each thread needs to enter the user id & password & click on the Login Button. But the threads are not able to find its own instances..All the threads are entering the user id & Password in the same IE instance. How to make the threads to identify its own spawned IE instances. Can anyone help me to solve this issue. Here is my code: def getLoginPage(i) #$mutex.lock $ie = IE.new $ie.goto('http://199.63.37.18:13050/ECM/ecm/jsp/Login.jsp') $ie.textField(:name, "strUserName").set("E201418") $ie.textField(:name, "strPassword").set("PASSWORD") down_load_time1=time_it() { $ie.button(:name, "Button1").click } puts down_load_time1 #$mutex.unlock end def login() threads1 = [] 5.times do |i| threads1 << Thread.new{getLoginPage(i)} end threads1.each do |t| t.join end end > Regards, > Ramya > Honeywell > DES - SAIF > Extn : 8674 > From lorenzo_jorquera at yahoo.com Mon Mar 7 08:28:21 2005 From: lorenzo_jorquera at yahoo.com (Lorenzo Jorquera) Date: Mon, 7 Mar 2005 07:28:21 -0600 (CST) Subject: [Wtr-general] Problems bcoz of Multiple Thread using the same Instance In-Reply-To: <77ED2BF75D59D1439F90412CC5B109741A7BC571@ie10-sahara.hiso.honeywell.com> Message-ID: <20050307132821.332.qmail@web21322.mail.yahoo.com> I think your problem is that the $ie variable is global (that is what the $ means), shared by all the threads. Use a local variable (remove the $ prefix) and everything should work ok. "Ramya Ramalinga, Moorthy (IE10)" wrote:Hi , I have a problem when using multiple threads trying to open Explorer instances . Each thread needs to enter the user id & password & click on the Login Button. But the threads are not able to find its own instances..All the threads are entering the user id & Password in the same IE instance. How to make the threads to identify its own spawned IE instances. Can anyone help me to solve this issue. Here is my code: def getLoginPage(i) #$mutex.lock $ie = IE.new $ie.goto('http://199.63.37.18:13050/ECM/ecm/jsp/Login.jsp') $ie.textField(:name, "strUserName").set("E201418") $ie.textField(:name, "strPassword").set("PASSWORD") down_load_time1=time_it() { $ie.button(:name, "Button1").click } puts down_load_time1 #$mutex.unlock end def login() threads1 = [] 5.times do |i| threads1 << Thread.new{getLoginPage(i)} end threads1.each do |t| t.join end end > Regards, > Ramya > Honeywell > DES - SAIF > Extn : 8674 > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050307/afdba9fd/attachment.html From Ramya.Moorthy at honeywell.com Tue Mar 8 06:37:06 2005 From: Ramya.Moorthy at honeywell.com (Ramya Ramalinga, Moorthy (IE10)) Date: Tue, 8 Mar 2005 04:37:06 -0700 Subject: [Wtr-general] How to use WATIR to find out some texts in Word/Excel File Message-ID: <77ED2BF75D59D1439F90412CC5B109741A8C56CF@ie10-sahara.hiso.honeywell.com> Hi All, In some of our Projects we have used the ie.pageContainsText function for testing a Web page. We need to test such scenarios in a simple Word or Excel Document . Does win32ole library supports these types of functions. Can we check for the Texts with some specific constaraints like Bolded/underlined/Italic . Can it be done along with ie.pageContainsText Function ? > Regards, > Ramya > > From Muthiah.Chandrasekaran at honeywell.com Tue Mar 8 07:04:40 2005 From: Muthiah.Chandrasekaran at honeywell.com (Muthiah, Chandrasekaran (IE10)) Date: Tue, 8 Mar 2005 05:04:40 -0700 Subject: [Wtr-general] Frames not identified Message-ID: <77ED2BF75D59D1439F90412CC5B1097416206F16@ie10-sahara.hiso.honeywell.com> Hi, I am facing an issue like the frames in the page are not being identified. When I executed through irb, I got the frame names listed as shown below. $ie.showAllObjects -----------Objects in page ------------- HTML Document name=header id= src=/inc/ss/head.html HTML Document name=menu id= src=index.jsp But the following attempts, are throwing exceptions. :-( ================================================================== $ie.frame("menu").showFrames Watir::Exception::UnknownFrameException: Unable to locate a frame with name menu from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1279:in `getDocument' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:383:in `getDocument' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:501:in `showFrames' from (irb):7 $ie.frame("menu").textField(:name, "username").set("admin") c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1279:in `getDocument': Unable to locate a frame with name menu (Watir::Exception::UnknownFrameException) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:383:in `getDocument' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:669:in `getContainer' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:718:in `getObject' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2000:in `initialize' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1087:in `new' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1087:in `textField' from OpenIE_LMS.rb:15 >Exit code: 1 =================================================================== Looking for your inputs eagerly, Muthiah C -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050308/fc31fe67/attachment.html From upgundecha at yahoo.com Tue Mar 8 08:47:15 2005 From: upgundecha at yahoo.com (Unmesh Gundecha) Date: Tue, 8 Mar 2005 05:47:15 -0800 (PST) Subject: [Wtr-general] (no subject) In-Reply-To: <20050305121129.60521.qmail@web53908.mail.yahoo.com> Message-ID: <20050308134715.58283.qmail@web53910.mail.yahoo.com> Hi Paul, I am having difficulty in using the solution you provided. When I open a site using $ie.goto, Internet Explorer windows opens with a dialog box (Caption "Enter Network Password") which I need to handle. However, we I tried your solution it doesn't handle this dialog. What happens is, when goto method is invoked it waits for page to be loaded and at the same time this dialog appears. Please advice me further, I am attaching the code snippet and screen with this mail require 'watir' require 'watir/winClicker' #include winClicker include Watir $ie = IE.new w = WinClicker.new testSite = "http://dev4.eq.xxx.com:8095" $ie.goto(testSite) handle = w.getWindowHandle("Enter Network Password") puts "This is handle value",handle w.makeWindowActive(handle) w.clickWindowsButton_hwnd(handle,"OK") Thanks and Regards, Unmesh Unmesh Gundecha wrote: Thanks Paul, I will try this.. Regards, Unmesh Paul Rogers wrote: It is possible to do this with the winClicker.rb w = WinClicker.new handle = w.getWindowHandle("Connect") w.makeWindowActive ( handle ) w.clickWindowsButton_hwnd (handle ,"OK" ) If you need to fill in text fields, you can use these methods setComboBoxText setTextBoxText in the winclicker file, which is normally in: C:\ruby\lib\ruby\site_ruby\1.8\watir\winClicker.rb Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Unmesh Gundecha Sent: 03 March 2005 23:26 To: wtr-general at rubyforge.org Cc: wtr_general at rubyforge.org Subject: [Wtr-general] (no subject) Hi, I am trying to write a automation script in WTR, The Web application which I am testing requires a Network Login. Does anyone help me how to handle this window in WTR. Thanks in advance, Regards, Unmesh __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050308/1bf443dc/attachment.html From paul.rogers at shaw.ca Tue Mar 8 12:26:03 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 08 Mar 2005 10:26:03 -0700 Subject: [Wtr-general] How to use WATIR to find out some texts in Word/ExcelFile In-Reply-To: <77ED2BF75D59D1439F90412CC5B109741A8C56CF@ie10-sahara.hiso.honeywell.com> Message-ID: <001a01c52403$e729df30$6400a8c0@NewDell> Watir will only work for web applications, specifically through Internet explorer Both Word and Excel have OLE interfaces, I have written code for Excel, and its not too difficult. This page: http://www.rubygarden.org/ruby?ScriptingExcel gives details on how to get to excel via ruby You will have to write you own 'pageContains" method to do what you need Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ramya Ramalinga, Moorthy (IE10) Sent: 08 March 2005 04:37 To: wtr-general at rubyforge.org Subject: [Wtr-general] How to use WATIR to find out some texts in Word/ExcelFile Hi All, In some of our Projects we have used the ie.pageContainsText function for testing a Web page. We need to test such scenarios in a simple Word or Excel Document . Does win32ole library supports these types of functions. Can we check for the Texts with some specific constaraints like Bolded/underlined/Italic . Can it be done along with ie.pageContainsText Function ? > Regards, > Ramya > > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Tue Mar 8 12:32:12 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 08 Mar 2005 10:32:12 -0700 Subject: [Wtr-general] Frames not identified In-Reply-To: <77ED2BF75D59D1439F90412CC5B1097416206F16@ie10-sahara.hiso.honeywell.com> Message-ID: <001b01c52404$c3bd0120$6400a8c0@NewDell> interesting. Ive run the unit tests and they work, and the same code works in irb Are you using a recent version of watir ? I suggest checking out the latest from cvs ( Its time to do a new release!) Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Muthiah, Chandrasekaran (IE10) Sent: 08 March 2005 05:05 To: 'wtr-general at rubyforge.org' Subject: [Wtr-general] Frames not identified Hi, I am facing an issue like the frames in the page are not being identified. When I executed through irb, I got the frame names listed as shown below. $ie.showAllObjects -----------Objects in page ------------- HTML Document name=header id= src=/inc/ss/head.html HTML Document name=menu id= src=index.jsp But the following attempts, are throwing exceptions. :-( ================================================================== $ie.frame("menu").showFrames Watir::Exception::UnknownFrameException: Unable to locate a frame with name menu from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1279:in `getDocument' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:383:in `getDocument' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:501:in `showFrames' from (irb):7 $ie.frame("menu").textField(:name, "username").set("admin") c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1279:in `getDocument': Unable to locate a frame with name menu (Watir::Exception::UnknownFrameException) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:383:in `getDocument' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:669:in `getContainer' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:718:in `getObject' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2000:in `initialize' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1087:in `new' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1087:in `textField' from OpenIE_LMS.rb:15 >Exit code: 1 =================================================================== Looking for your inputs eagerly, Muthiah C -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050308/fe824a22/attachment.html From paul.rogers at shaw.ca Tue Mar 8 12:38:06 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 08 Mar 2005 10:38:06 -0700 Subject: [Wtr-general] (no subject) In-Reply-To: <20050308134715.58283.qmail@web53910.mail.yahoo.com> Message-ID: <002001c52405$969e2470$6400a8c0@NewDell> Im sorry, I misled you a little. You will have to use 2 scripts. Maybe like this: clicker.rb: require 'watir/winClicker' sleep 5 w = WinClicker.new handle = w.getWindowHandle("Enter Network Password") puts "This is handle value",handle w.makeWindowActive(handle) w.clickWindowsButton_hwnd(handle,"OK") and then your main.rb require 'watir' include Watir $ie = IE.new testSite = "http://dev4.eq.xxx.com:8095" system('clicker.rb') $ie.goto(testSite) What happens is we need to launch the script with the clicker for the network box before we gogoto the page that causes it to display. You may have problems with the system line - there are several other ways of launching a second script. In the winclicker file, there is a method called winSystem - that is probably the best approach to take: In main.rb require 'watir/winclicker' w=WinClicker.new w.winSystem('clicker.rb') # you may have to put the full path here Its very ugly code and we are working to make it better! -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Unmesh Gundecha Sent: 08 March 2005 06:47 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] (no subject) Hi Paul, I am having difficulty in using the solution you provided. When I open a site using $ie.goto, Internet Explorer windows opens with a dialog box (Caption "Enter Network Password") which I need to handle. However, we I tried your solution it doesn't handle this dialog. What happens is, when goto method is invoked it waits for page to be loaded and at the same time this dialog appears. Please advice me further, I am attaching the code snippet and screen with this mail require 'watir' require 'watir/winClicker' #include winClicker include Watir $ie = IE.new w = WinClicker.new testSite = "http://dev4.eq.xxx.com:8095" $ie.goto(testSite) handle = w.getWindowHandle("Enter Network Password") puts "This is handle value",handle w.makeWindowActive(handle) w.clickWindowsButton_hwnd(handle,"OK") Thanks and Regards, Unmesh Unmesh Gundecha wrote: Thanks Paul, I will try this.. Regards, Unmesh Paul Rogers wrote: It is possible to do this with the winClicker.rb w = WinClicker.new handle = w.getWindowHandle("Connect") w.makeWindowActive ( handle ) w.clickWindowsButton_hwnd (handle ,"OK" ) If you need to fill in text fields, you can use these methods setComboBoxText setTextBoxText in the winclicker file, which is normally in: C:\ruby\lib\ruby\site_ruby\1.8\watir\winClicker.rb Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Unmesh Gundecha Sent: 03 March 2005 23:26 To: wtr-general at rubyforge.org Cc: wtr_general at rubyforge.org Subject: [Wtr-general] (no subject) Hi, I am trying to write a automation script in WTR, The Web application which I am testing requires a Network Login. Does anyone help me how to handle this window in WTR. Thanks in advance, Regards, Unmesh __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From bobrjj at pacbell.net Wed Mar 9 00:34:01 2005 From: bobrjj at pacbell.net (Robert Jefferies) Date: Tue, 8 Mar 2005 21:34:01 -0800 Subject: [Wtr-general] Changing heap size for eclipse 3.1 Message-ID: <200503090529.j295TmdS023823@rubyforge.org> Hello I am trying to compile a java program that is bigger that 64k, but eclipse keep Saying that it has run out of memory. How can I increase the size of JVM's heap? I tried using -vmargs -Xmx256M, but eclipse did not like it. Robert Jefferies Thank You Very Much -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050308/2c10357e/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 862 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050308/2c10357e/attachment.gif From bret at pettichord.com Wed Mar 9 06:47:41 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 09 Mar 2005 17:17:41 +0530 Subject: [Wtr-general] table errors in unit tests Message-ID: <5.1.0.14.2.20050309171614.02e12330@127.0.0.1> 2) Error: test_complex_table_access(TC_Tables): NoMethodError: undefined method `[]' for nil:NilClass d:/workspace/watir/unittests/../watir.rb:1596:in `[]' d:/workspace/watir/unittests/../unittests/table_test.rb:99:in `test_complex_table_access' 3) Error: test_simple_table_access(TC_Tables): NoMethodError: undefined method `[]' for nil:NilClass d:/workspace/watir/unittests/../watir.rb:1596:in `[]' d:/workspace/watir/unittests/../unittests/table_test.rb:62:in `test_simple_table_access' 4) Error: test_simple_table_buttons(TC_Tables): NoMethodError: undefined method `[]' for nil:NilClass d:/workspace/watir/unittests/../watir.rb:1596:in `[]' d:/workspace/watir/unittests/../unittests/table_test.rb:74:in `test_simple_table_buttons' 5) Error: test_table_from_element(TC_Tables): NoMethodError: undefined method `[]' for nil:NilClass d:/workspace/watir/unittests/../watir.rb:1596:in `[]' d:/workspace/watir/unittests/../unittests/table_test.rb:89:in `test_table_from_element' _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Mar 9 06:55:21 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 09 Mar 2005 17:25:21 +0530 Subject: [Wtr-general] Keywords to be used in WATIR In-Reply-To: <1109692494.4224904ee1b91@webmail.telus.net> References: <5.1.0.14.2.20050301095055.02f596f8@127.0.0.1> <0E839478EC690748ACC9A1B10DB0BCBC04C871B7@EXCHANGE.mgsops.net> <5.1.0.14.2.20050301095055.02f596f8@127.0.0.1> Message-ID: <5.1.0.14.2.20050309171819.01176220@127.0.0.1> At 08:54 AM 3/2/2005, jkohl at telusplanet.net wrote: > > This should be the definitive source. I think it currently documents the > > camelcase methods and needs to be updated to only include the ruby-style > > methods. Although the camel case ones are still there, we are discouraging > > their use, esp to new users. >have we added this to the install so it ends up in the watir_bonus >directory? Or >is there a different idea for where to put these? I think we should be doing whatever other ruby libraries are doing. Does any one here know the standard practice for where to put the rdoc? In any case, i really would like to see this on our website. Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Mar 9 06:59:51 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 09 Mar 2005 17:29:51 +0530 Subject: [Wtr-general] Links object In-Reply-To: <004101c51eca$e8971650$6400a8c0@NewDell> Message-ID: <5.1.0.14.2.20050309172833.01a77360@127.0.0.1> At 06:55 PM 3/2/2005, Paul Rogers wrote: >ie.links.each do |link| > if link.getProperty("href") == "http://google.com" > puts "link goes to google!" > puts link.getProperty("name") > puts link.getProperty("id") > puts link.getProperty("innerText") > end > linkToClick = link >end Would it work to just do this in the loop? link.name link.id link.inner_text Seems like it should. Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Mar 9 07:09:59 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 09 Mar 2005 17:39:59 +0530 Subject: [Wtr-general] Watir::Table changes In-Reply-To: <000e01c521a5$b1f7e1a0$6400a8c0@NewDell> References: <20050305162855.75086.qmail@web21326.mail.yahoo.com> Message-ID: <5.1.0.14.2.20050309173859.027b18c8@127.0.0.1> The easiest way to make all this work is to move the factory methods into a container module and then make tables, rows and cells all use the module. At 10:36 PM 3/5/2005, Paul Rogers wrote: >I think that row and cell are factory methods on the main watir object >I think they should be methods under the table object too > >Paul >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Lorenzo Jorquera >Sent: 05 March 2005 09:29 >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Watir::Table changes > >Hi Paul, > > I am not sure I understand... you mean make row and cell subclases of table? > >Paul Rogers wrote: >Thanks Lorenzo! > >I'd also like to make the cell and row objects children of the table object: > >If thats something you'd like to work on, please go ahead. > >Paul >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Lorenzo Jorquera >Sent: 04 March 2005 20:19 >To: wtr >Subject: [Wtr-general] Watir::Table changes > >Hi, > > I've checked in some changes in Watir::Table (thanks Paul, TortoiseCVS > rocks!). Now you can say > > table = $ie.table(:index,1) > table[1][1].button.click > >in order to click a button within a table and > > table = $ie.table(:index,1) > table[1][1].table[1][1].button.click > >to access objects within nested tables. > >Also, tables can be created from an object that belongs to the table (I've >found this handy when an element of the table can be easily identified but >not the table ) >The syntax is: > > button = $ie.button(:id,"b1") > table = Table.create_from_element($ie,button) > >TODO: > > Only buttons and textFields can be created from tables cells, I will add > support for the other Watir objects. > > Bye, Lorenzo. > > > > > > > > >Do You Yahoo!? >Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del >Mundo. >Vis?ta >Yahoo! >Noticias. > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > >Do You Yahoo!? >Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del >Mundo. >Vis?ta >Yahoo! >Noticias. > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Mar 9 07:34:23 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 09 Mar 2005 18:04:23 +0530 Subject: [Wtr-general] How to use WATIR to find out some texts in Word/Excel File In-Reply-To: <77ED2BF75D59D1439F90412CC5B109741A8C56CF@ie10-sahara.hiso. honeywell.com> Message-ID: <5.1.0.14.2.20050309175858.02f5ccb8@127.0.0.1> At 05:07 PM 3/8/2005, Ramya Ramalinga, Moorthy (IE10) wrote: > In some of our Projects we have used the ie.pageContainsText function for >testing a Web page. > We need to test such scenarios in a simple Word or Excel Document . Does >win32ole library supports these types of functions. > Can we check for the Texts with some specific constaraints like >Bolded/underlined/Italic . > Can it be done along with ie.pageContainsText Function ? You will have to make your own calls directly to Ruby's OLE library. Watir won't help. Marick tells how: http://www.testing.com/writings/bypassing-the-gui.pdf _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Mar 9 07:38:40 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 09 Mar 2005 18:08:40 +0530 Subject: [Wtr-general] Winclicker replacement In-Reply-To: <001301c52133$81cd20c0$6400a8c0@NewDell> References: <72799cd70503041900136acf36@mail.gmail.com> Message-ID: <5.1.0.14.2.20050309175450.02dfa058@127.0.0.1> Shanko has built and offered a mswin version of the win32-guitest binary. http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/120057 Can we use this? Bret At 08:59 AM 3/5/2005, Paul Rogers wrote: >I recently wrote to moonwolf ( the author of the ruby win32-gui) but his >email address seemed to be dead. > >I think this is a very worthy thing to do. In my view, and many others, >ruby is an excellent language for writing tests in. I hope we can extend >to writing tests for windows applications as well as web ones. > >Paul > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon >Sent: 04 March 2005 20:00 >To: wtr-general at rubyforge.org >Subject: Re: [Wtr-general] Winclicker replacement > > >On Fri, 04 Mar 2005 18:34:11 -0700, Paul Rogers >wrote: > > There was a thread on comp.lang.ruby about doing windows things, like > > the javascript clickers and security boxes. > > > > It pointed to this, http://www.rubygarden.org/ruby?AutoIt_For_Windows > > Which in turn goes to http://www.autoitscript.com/autoit3/ > > > > This may be a good solution for our immediate needs > > > >Elisabeth Hendrickson likes AutoIT: >http://www.qualitytree.com/ruminate/061404.htm but I still would rather >have win32::guitest brought up to date: >http://raa.ruby-lang.org/list.rhtml?name=win32-guitest . There's >been quite a lot of action on the Perl Win32::GuiTest module in the last >year or so: http://sourceforge.net/projects/winguitest/ and it would be >great to see the Ruby and Perl implementations helping each other out. > >Is anyone out there just itching to lead a development effort on Ruby's >Win32::GuiTest module? -Chris >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From jkohl at telusplanet.net Wed Mar 9 07:53:52 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Wed, 9 Mar 2005 05:53:52 -0700 Subject: [Wtr-general] Keywords to be used in WATIR In-Reply-To: <5.1.0.14.2.20050309171819.01176220@127.0.0.1> Message-ID: <20050309125252.SHEW28453.priv-edtnes28.telusplanet.net@tintin> > In any case, i really would like to see this on our website. Ok. I'll put it in the documentation section. -Jonathan From christopher.mcmahon at gmail.com Wed Mar 9 09:51:01 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 9 Mar 2005 08:51:01 -0600 Subject: [Wtr-general] Winclicker replacement In-Reply-To: <5.1.0.14.2.20050309175450.02dfa058@127.0.0.1> References: <72799cd70503041900136acf36@mail.gmail.com> <001301c52133$81cd20c0$6400a8c0@NewDell> <5.1.0.14.2.20050309175450.02dfa058@127.0.0.1> Message-ID: <72799cd705030906516b1e4855@mail.gmail.com> On Wed, 09 Mar 2005 18:08:40 +0530, Bret Pettichord wrote: > Shanko has built and offered a mswin version of the win32-guitest binary. > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/120057 > > Can we use this? > > Bret > > At 08:59 AM 3/5/2005, Paul Rogers wrote: > >I recently wrote to moonwolf ( the author of the ruby win32-gui) but his > >email address seemed to be dead. > > One serious stumbling block is that Ruby's win32-guitest seems to absolutely demand that cygwin be installed. My gut reaction is that this is too much overhead for the casual user. (Or even the serious user-- I think programming a win32-guitest layer in Perl is easier than dealing with a cygwin install. Of course, I'm twisted that way...) -Chris From bret at pettichord.com Wed Mar 9 09:56:34 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 09 Mar 2005 20:26:34 +0530 Subject: [Wtr-general] Winclicker replacement In-Reply-To: <72799cd705030906516b1e4855@mail.gmail.com> References: <5.1.0.14.2.20050309175450.02dfa058@127.0.0.1> <72799cd70503041900136acf36@mail.gmail.com> <001301c52133$81cd20c0$6400a8c0@NewDell> <5.1.0.14.2.20050309175450.02dfa058@127.0.0.1> Message-ID: <5.1.0.14.2.20050309202551.030cee20@127.0.0.1> I guess i misread that mail thread. I agree that cygwin isn't the answer. It would be simpler to just use Selenium. Bret At 08:21 PM 3/9/2005, Chris McMahon wrote: >On Wed, 09 Mar 2005 18:08:40 +0530, Bret Pettichord >wrote: > > Shanko has built and offered a mswin version of the win32-guitest binary. > > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/120057 > > > > Can we use this? > > > > Bret > > > > At 08:59 AM 3/5/2005, Paul Rogers wrote: > > >I recently wrote to moonwolf ( the author of the ruby win32-gui) but his > > >email address seemed to be dead. > > > > >One serious stumbling block is that Ruby's win32-guitest seems to >absolutely demand that cygwin be installed. My gut reaction is that >this is too much overhead for the casual user. (Or even the serious >user-- I think programming a win32-guitest layer in Perl is easier >than dealing with a cygwin install. Of course, I'm twisted that >way...) >-Chris >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Wed Mar 9 10:12:13 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 09 Mar 2005 08:12:13 -0700 Subject: [Wtr-general] Keywords to be used in WATIR In-Reply-To: <5.1.0.14.2.20050309171819.01176220@127.0.0.1> Message-ID: <000c01c524ba$5f7b72d0$6400a8c0@NewDell> I either posted , or meant to post a message to comp.lang.ruby on what the standard for this is. I'll repost it. We cant generate the rdoc at install time, as some versions of ruby are missing rdoc.bat I generally havent been checking in new rdocs - is this something we want to do when we generate new code? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 09 March 2005 04:55 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Keywords to be used in WATIR At 08:54 AM 3/2/2005, jkohl at telusplanet.net wrote: > > This should be the definitive source. I think it currently documents > > the camelcase methods and needs to be updated to only include the > > ruby-style methods. Although the camel case ones are still there, we > > are discouraging their use, esp to new users. >have we added this to the install so it ends up in the watir_bonus >directory? Or >is there a different idea for where to put these? I think we should be doing whatever other ruby libraries are doing. Does any one here know the standard practice for where to put the rdoc? In any case, i really would like to see this on our website. Bret _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Wed Mar 9 10:13:27 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 09 Mar 2005 08:13:27 -0700 Subject: [Wtr-general] Links object In-Reply-To: <5.1.0.14.2.20050309172833.01a77360@127.0.0.1> Message-ID: <000d01c524ba$8b758920$6400a8c0@NewDell> No. I think we can do this ( similar to the form wrappers you did ?) Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 09 March 2005 05:00 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Links object At 06:55 PM 3/2/2005, Paul Rogers wrote: >ie.links.each do |link| > if link.getProperty("href") == "http://google.com" > puts "link goes to google!" > puts link.getProperty("name") > puts link.getProperty("id") > puts link.getProperty("innerText") > end > linkToClick = link >end Would it work to just do this in the loop? link.name link.id link.inner_text Seems like it should. Bret _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Wed Mar 9 10:18:16 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Wed, 9 Mar 2005 07:18:16 -0800 Subject: [Wtr-general] Keywords to be used in WATIR In-Reply-To: <000c01c524ba$5f7b72d0$6400a8c0@NewDell> References: <000c01c524ba$5f7b72d0$6400a8c0@NewDell> Message-ID: <1110381496.422f13b84b65d@webmail.telus.net> > I either posted , or meant to post a message to comp.lang.ruby on what > the standard for this is. > I'll repost it. > We cant generate the rdoc at install time, as some versions of ruby are > missing rdoc.bat I don't mean that, I mean we install the RDoc generated when we do a release version. When you unzip a release (say v1.0.3, there is an RDoc folder containing the RDoc. When we do the install, it doesn't go anywhere. I thought putting it in Watir_bonus along with the examples and unit tests would be a good idea. Eventually we could package it with the User Manual a la Pickaxe with the Ruby install. > I generally havent been checking in new rdocs - is this something we > want to do when we generate new code? Yes please. We can then post the latest version on the web site as I've been doing with the User Guide. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord > Sent: 09 March 2005 04:55 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Keywords to be used in WATIR > > > At 08:54 AM 3/2/2005, jkohl at telusplanet.net wrote: > > > > This should be the definitive source. I think it currently documents > > > > the camelcase methods and needs to be updated to only include the > > > ruby-style methods. Although the camel case ones are still there, we > > > > are discouraging their use, esp to new users. > >have we added this to the install so it ends up in the watir_bonus > >directory? Or > >is there a different idea for where to put these? > > I think we should be doing whatever other ruby libraries are doing. Does > > any one here know the standard practice for where to put the rdoc? > > In any case, i really would like to see this on our website. > > Bret > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Wed Mar 9 12:50:49 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 09 Mar 2005 10:50:49 -0700 Subject: [Wtr-general] table errors in unit tests In-Reply-To: <5.1.0.14.2.20050309171614.02e12330@127.0.0.1> Message-ID: <001201c524d0$87b17a40$6400a8c0@NewDell> Ive fixed these errors. Even with the unit tests it took me quite a while to figure this one. Please make sure all the unittests run before checking in code. I know im guilt of this too, so it's a reminder to all of us! Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 09 March 2005 04:48 To: wtr-general at rubyforge.org Subject: [Wtr-general] table errors in unit tests 2) Error: test_complex_table_access(TC_Tables): NoMethodError: undefined method `[]' for nil:NilClass d:/workspace/watir/unittests/../watir.rb:1596:in `[]' d:/workspace/watir/unittests/../unittests/table_test.rb:99:in `test_complex_table_access' 3) Error: test_simple_table_access(TC_Tables): NoMethodError: undefined method `[]' for nil:NilClass d:/workspace/watir/unittests/../watir.rb:1596:in `[]' d:/workspace/watir/unittests/../unittests/table_test.rb:62:in `test_simple_table_access' 4) Error: test_simple_table_buttons(TC_Tables): NoMethodError: undefined method `[]' for nil:NilClass d:/workspace/watir/unittests/../watir.rb:1596:in `[]' d:/workspace/watir/unittests/../unittests/table_test.rb:74:in `test_simple_table_buttons' 5) Error: test_table_from_element(TC_Tables): NoMethodError: undefined method `[]' for nil:NilClass d:/workspace/watir/unittests/../watir.rb:1596:in `[]' d:/workspace/watir/unittests/../unittests/table_test.rb:89:in `test_table_from_element' _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From upgundecha at yahoo.com Thu Mar 10 06:42:48 2005 From: upgundecha at yahoo.com (Unmesh Gundecha) Date: Thu, 10 Mar 2005 03:42:48 -0800 (PST) Subject: [Wtr-general] Security Login Window Message-ID: <20050310114248.46590.qmail@web53906.mail.yahoo.com> Hi Paul, I am having difficulty in using the solution you provided. When I open a site using $ie.goto, Internet Explorer windows opens with a dialog box (Caption "Enter Network Password") which I need to handle. However, we I tried your solution it doesn't handle this dialog. What happens is, when goto method is invoked it waits for page to be loaded and at the same time this dialog appears. Please advice me further, I am attaching the code snippet with this mail require 'watir' require 'watir/winClicker' #include winClicker include Watir $ie = IE.new w = WinClicker.new testSite = "http://dev4.eq.xxx.com:8095" $ie.goto(testSite) handle = w.getWindowHandle("Enter Network Password") puts "This is handle value",handle w.makeWindowActive(handle) w.clickWindowsButton_hwnd(handle,"OK") Thanks and Regards, Unmesh Unmesh Gundecha wrote: Thanks Paul, I will try this.. Regards, Unmesh Paul Rogers wrote: It is possible to do this with the winClicker.rb w = WinClicker.new handle = w.getWindowHandle("Connect") w.makeWindowActive ( handle ) w.clickWindowsButton_hwnd (handle ,"OK" ) If you need to fill in text fields, you can use these methods setComboBoxText setTextBoxText in the winclicker file, which is normally in: C:\ruby\lib\ruby\site_ruby\1.8\watir\winClicker.rb Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Unmesh Gundecha Sent: 03 March 2005 23:26 To: wtr-general at rubyforge.org Cc: wtr_general at rubyforge.org Subject: [Wtr-general] (no subject) Hi, I am trying to write a automation script in WTR, The Web application which I am testing requires a Network Login. Does anyone help me how to handle this window in WTR. Thanks in advance, Regards, Unmesh __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------- Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050310/ea039b63/attachment.html From upgundecha at yahoo.com Thu Mar 10 06:43:36 2005 From: upgundecha at yahoo.com (Unmesh Gundecha) Date: Thu, 10 Mar 2005 03:43:36 -0800 (PST) Subject: [Wtr-general] Security Login Window Message-ID: <20050310114336.46797.qmail@web53906.mail.yahoo.com> Hi Paul, I am having difficulty in using the solution you provided. When I open a site using $ie.goto, Internet Explorer windows opens with a dialog box (Caption "Enter Network Password") which I need to handle. However, we I tried your solution it doesn't handle this dialog. What happens is, when goto method is invoked it waits for page to be loaded and at the same time this dialog appears. Please advice me further, I am attaching the code snippet with this mail require 'watir' require 'watir/winClicker' #include winClicker include Watir $ie = IE.new w = WinClicker.new testSite = "http://dev4.eq.xxx.com:8095" $ie.goto(testSite) handle = w.getWindowHandle("Enter Network Password") puts "This is handle value",handle w.makeWindowActive(handle) w.clickWindowsButton_hwnd(handle,"OK") Thanks and Regards, Unmesh Unmesh Gundecha wrote: Thanks Paul, I will try this.. Regards, Unmesh Paul Rogers wrote: It is possible to do this with the winClicker.rb w = WinClicker.new handle = w.getWindowHandle("Connect") w.makeWindowActive ( handle ) w.clickWindowsButton_hwnd (handle ,"OK" ) If you need to fill in text fields, you can use these methods setComboBoxText setTextBoxText in the winclicker file, which is normally in: C:\ruby\lib\ruby\site_ruby\1.8\watir\winClicker.rb Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Unmesh Gundecha Sent: 03 March 2005 23:26 To: wtr-general at rubyforge.org Cc: wtr_general at rubyforge.org Subject: [Wtr-general] (no subject) Hi, I am trying to write a automation script in WTR, The Web application which I am testing requires a Network Login. Does anyone help me how to handle this window in WTR. Thanks in advance, Regards, Unmesh __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------- Do you Yahoo!? Yahoo! Small Business - Try our new resources site! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050310/b25354b6/attachment.html From paul.rogers at shaw.ca Thu Mar 10 11:09:32 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 10 Mar 2005 09:09:32 -0700 Subject: [Wtr-general] Security Login Window In-Reply-To: <20050310114336.46797.qmail@web53906.mail.yahoo.com> Message-ID: <001001c5258b$8bf10ec0$6400a8c0@NewDell> did you try using 2 scripts? What happened then? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Unmesh Gundecha Sent: 10 March 2005 04:44 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Security Login Window Hi Paul, I am having difficulty in using the solution you provided. When I open a site using $ie.goto, Internet Explorer windows opens with a dialog box (Caption "Enter Network Password") which I need to handle. However, we I tried your solution it doesn't handle this dialog. What happens is, when goto method is invoked it waits for page to be loaded and at the same time this dialog appears. Please advice me further, I am attaching the code snippet with this mail require 'watir' require 'watir/winClicker' #include winClicker include Watir $ie = IE.new w = WinClicker.new testSite = " http://dev4.eq.xxx.com:8095" $ie.goto(testSite) handle = w.getWindowHandle("Enter Network Password") puts "This is handle value",handle w.makeWindowActive(handle) w.clickWindowsButton_hwnd(handle,"OK") Thanks and Regards, Unmesh Unmesh Gundecha wrote: Thanks Paul, I will try this.. Regards, Unmesh Paul Rogers wrote: It is possible to do this with the winClicker.rb w = WinClicker.new handle = w.getWindowHandle("Connect") w.makeWindowActive ( handle ) w.clickWindowsButton_hwnd (handle ,"OK" ) If you need to fill in text fields, you can use these methods setComboBoxText setTextBoxText in the winclicker file, which is normally in: C:\ruby\lib\ruby\site_ruby\1.8\watir\winClicker.rb Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Unmesh Gundecha Sent: 03 March 2005 23:26 To: wtr-general at rubyforge.org Cc: wtr_general at rubyforge.org Subject: [Wtr-general] (no subject) Hi, I am trying to write a automation script in WTR, The Web application which I am testing requires a Network Login. Does anyone help me how to handle this window in WTR. Thanks in advance, Regards, Unmesh __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _____ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050310/fae8aee2/attachment.html From paul.rogers at shaw.ca Thu Mar 10 11:12:38 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 10 Mar 2005 09:12:38 -0700 Subject: [Wtr-general] Watir 1.1 released Message-ID: <001701c5258b$faefd270$6400a8c0@NewDell> Last night I did a new release of watir. From dallenusa at yahoo.com Fri Mar 11 17:09:30 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Fri, 11 Mar 2005 14:09:30 -0800 (PST) Subject: [Wtr-general] (no subject) Message-ID: <20050311220930.39217.qmail@web30505.mail.mud.yahoo.com> When I finish running a script I get the number of tests, assertions, failures and errors. What creates this? What would be the difference between an error and a failure? I noticed that if I just have: class TC_myTest < Test::Unit::TestCase def test_myTestCase assert($ie.frame("LeftBar").div(:title,"Edit Rime").exists?) end end I will show 1 failure. But if I have: class TC_myTest < Test::Unit::TestCase def test_myTestCase assert($ie.frame("LeftBar").div(:title,"Edit Time")) puts ("PASS") rescue => e puts("FAIL") end end I will get 0 failures, even if it fails. I assume it's because it really did pass since it found one of the options, in this case FAIL? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From jkohl at telusplanet.net Fri Mar 11 17:32:35 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Fri, 11 Mar 2005 14:32:35 -0800 Subject: [Wtr-general] (no subject) In-Reply-To: <20050311220930.39217.qmail@web30505.mail.mud.yahoo.com> References: <20050311220930.39217.qmail@web30505.mail.mud.yahoo.com> Message-ID: <1110580355.42321c834614f@webmail.telus.net> try this: class TC_myTest < Test::Unit::TestCase def test_myTestCase #watir method that sets up the unit under test condition go here begin assert($ie.frame("LeftBar").div(:title,"EditTime")) puts ("PASS") rescue => e puts("FAIL") end end Quoting Richard Allen : > When I finish running a script I get the number of > tests, assertions, failures and errors. What creates > this? What would be the difference between an error > and a failure? > > I noticed that if I just have: > class TC_myTest < Test::Unit::TestCase > def test_myTestCase > assert($ie.frame("LeftBar").div(:title,"Edit > Rime").exists?) > end > end > > I will show 1 failure. But if I have: > > > class TC_myTest < Test::Unit::TestCase > def test_myTestCase > assert($ie.frame("LeftBar").div(:title,"Edit > Time")) > puts ("PASS") > rescue => e > puts("FAIL") > end > end > > I will get 0 failures, even if it fails. I assume it's > because it really did pass since it found one of the > options, in this case FAIL? > > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Small Business - Try our new resources site! > http://smallbusiness.yahoo.com/resources/ > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From jkohl at telusplanet.net Fri Mar 11 17:37:11 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Fri, 11 Mar 2005 14:37:11 -0800 Subject: [Wtr-general] (no subject) In-Reply-To: <1110580355.42321c834614f@webmail.telus.net> References: <20050311220930.39217.qmail@web30505.mail.mud.yahoo.com> <1110580355.42321c834614f@webmail.telus.net> Message-ID: <1110580631.42321d97ca9ea@webmail.telus.net> oops. I think I missed an "end" there. This is how it should look: class TC_myTest < Test::Unit::TestCase def test_myTestCase #watir method that sets up the unit under test condition go here begin assert($ie.frame("LeftBar").div(:title,"EditTime")) puts ("PASS") rescue => e puts("FAIL") end #of rescue end # of test_myTestCase end #of class TC_myTest Hope that helps. -Jonathan Quoting jkohl at telusplanet.net: > try this: > class TC_myTest < Test::Unit::TestCase > def test_myTestCase > > #watir method that sets up the unit under test condition go here > > begin > assert($ie.frame("LeftBar").div(:title,"EditTime")) > puts ("PASS") > rescue => e > puts("FAIL") > end > end > > > > Quoting Richard Allen : > > > When I finish running a script I get the number of > > tests, assertions, failures and errors. What creates > > this? What would be the difference between an error > > and a failure? > > > > I noticed that if I just have: > > class TC_myTest < Test::Unit::TestCase > > def test_myTestCase > > assert($ie.frame("LeftBar").div(:title,"Edit > > Rime").exists?) > > end > > end > > > > I will show 1 failure. But if I have: > > > > > > class TC_myTest < Test::Unit::TestCase > > def test_myTestCase > > assert($ie.frame("LeftBar").div(:title,"Edit > > Time")) > > puts ("PASS") > > rescue => e > > puts("FAIL") > > end > > end > > > > I will get 0 failures, even if it fails. I assume it's > > because it really did pass since it found one of the > > options, in this case FAIL? > > > > > > > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! Small Business - Try our new resources site! > > http://smallbusiness.yahoo.com/resources/ > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Fri Mar 11 17:48:06 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 11 Mar 2005 15:48:06 -0700 Subject: [Wtr-general] Security Login Window In-Reply-To: <20050310114336.46797.qmail@web53906.mail.yahoo.com> Message-ID: <000201c5268c$647f7a00$6400a8c0@NewDell> I looked at this yesterday. It is much harder than I originally thought I'll see if I can do something over the weekend Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Unmesh Gundecha Sent: 10 March 2005 04:44 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Security Login Window Hi Paul, I am having difficulty in using the solution you provided. When I open a site using $ie.goto, Internet Explorer windows opens with a dialog box (Caption "Enter Network Password") which I need to handle. However, we I tried your solution it doesn't handle this dialog. What happens is, when goto method is invoked it waits for page to be loaded and at the same time this dialog appears. Please advice me further, I am attaching the code snippet with this mail require 'watir' require 'watir/winClicker' #include winClicker include Watir $ie = IE.new w = WinClicker.new testSite = " http://dev4.eq.xxx.com:8095" $ie.goto(testSite) handle = w.getWindowHandle("Enter Network Password") puts "This is handle value",handle w.makeWindowActive(handle) w.clickWindowsButton_hwnd(handle,"OK") Thanks and Regards, Unmesh Unmesh Gundecha wrote: Thanks Paul, I will try this.. Regards, Unmesh Paul Rogers wrote: It is possible to do this with the winClicker.rb w = WinClicker.new handle = w.getWindowHandle("Connect") w.makeWindowActive ( handle ) w.clickWindowsButton_hwnd (handle ,"OK" ) If you need to fill in text fields, you can use these methods setComboBoxText setTextBoxText in the winclicker file, which is normally in: C:\ruby\lib\ruby\site_ruby\1.8\watir\winClicker.rb Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Unmesh Gundecha Sent: 03 March 2005 23:26 To: wtr-general at rubyforge.org Cc: wtr_general at rubyforge.org Subject: [Wtr-general] (no subject) Hi, I am trying to write a automation script in WTR, The Web application which I am testing requires a Network Login. Does anyone help me how to handle this window in WTR. Thanks in advance, Regards, Unmesh __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _____ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050311/719c8bef/attachment.html From paul.rogers at shaw.ca Sat Mar 12 00:37:36 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 11 Mar 2005 22:37:36 -0700 Subject: [Wtr-general] Reset functionality Message-ID: <001701c526c5$98b293a0$6400a8c0@NewDell> Somebody asked for clicking reset buttons to be added. You can now do ie.reset(:index,1).click All the methods that apply to buttons now apply to reset buttons See the form_test.rb unit test for more From paul.rogers at shaw.ca Sat Mar 12 00:39:08 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 11 Mar 2005 22:39:08 -0700 Subject: [Wtr-general] Method names Message-ID: <001801c526c5$cfe807b0$6400a8c0@NewDell> We would like people to start using method names like: text_field() instead of the more java like textField() Ive updated many of the unit tests to use this. The java style names will disappear eventually Paul From bret at pettichord.com Sat Mar 12 09:52:15 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 12 Mar 2005 20:22:15 +0530 Subject: [Wtr-general] Report from Bangalore Message-ID: <5.1.0.14.2.20050312201210.03145720@127.0.0.1> The first meeting of the Ruby-India users group was held today at Itellix's offices in Bangalore. My collegue, Yogi Kulkarni presented an overview of Ruby, and i presented Watir and the Ruby bindings of Selenium. We had a few Ruby enthusiasts in the audience and maybe two dozen or more people who were new to Ruby, but interested in learning more. Many of them were Python programmers. My hope is to recruit some people to using these tools and helping out with development. I will be making additional demonstrations and workshops to my collegues in ThoughtWorks' office here in Bangalore next week. Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Mar 12 10:23:25 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 12 Mar 2005 20:53:25 +0530 Subject: [Wtr-general] Watir needs a Win32GUI library Message-ID: <5.1.0.14.2.20050312202219.0313d680@127.0.0.1> We've seen growing enthusiasm for Watir, a web-testing library that is good enough that it is convincing people to learn Ruby just so that they can use it. Here are some things people are saying about it: Watir Rocks! I have played with it for only about on hour and accomplished what I had wanted to do (but did not have the wherewithall) for ages. Truly awesome !! In my opinion, WATIR has no peer as a framework to drive functional test automation in Internet Explorer. I have been using watir for a few weeks and have been very productive in automating the testing of our Web based application. I downloaded Watir a few days ago, without having have any high hopes for it, but I have been very impressed by this tool. I have limited scripting experience and none with Ruby, but I was able to follow your examples and be productive in short order. My hat is off to all involved in this project, you're doing a great service for the testing community - mad props! Up until now, I'd managed to avoid learning the Ruby scripting language.... But after seeing what Watir could do and how neat Ruby is, I became a convert. See http://wtr.rubyforge.org/wiki/wiki.pl?WatirTestimonials for more comments. We've just release version 1.1 of Watir. http://rubyforge.org/frs/?group_id=104&release_id=1782 I'm writing to ask for help. The biggest problem with Watir is its support for various dialogs. These dialogs appear when you use a browser; for example, a login dialog or a security dialog or a javascript dialog. Watir mostly works by accessing the DOM via IE's COM interface. But there is no COM/DOM interface to these dialogs. We have some code that uses Win32 API calls, but it is buggy and needs work. Frankly, i think we would be better off using a general Win32 GUI testing library than trying to build a peice of it ourselves. Perl has a really good Win32-GuiTest library. http://cpan.uwinnipeg.ca/htdocs/Win32-GuiTest/ There is also a Ruby port of this, but it uses Cygwin and appears to have been abandoned. http://raa.ruby-lang.org/project/win32-guitest/ We need something that works with MSWIN. Can you help us? So far we have had some suggestions. One person suggested that we just use the Perl library. Another has suggested that we use AutoIt. But personally i would prefer a Ruby solution. Surely i'm not the only Ruby programmer left on the Windows platform. Do we want to let the Perl programmers dominate Windows? Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Mar 12 23:53:25 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sun, 13 Mar 2005 10:23:25 +0530 Subject: [Wtr-general] Ruby-India Trip Report Message-ID: <5.1.0.14.2.20050313102309.0311de10@127.0.0.1> http://www.swaroopch.info/archives/2005/03/12/ruby-india-first-meetup/ _____________________ Bret Pettichord www.pettichord.com From jared at kilmore.info Mon Mar 14 19:29:12 2005 From: jared at kilmore.info (Jared Quinert) Date: Tue, 15 Mar 2005 11:29:12 +1100 Subject: [Wtr-general] Watir 1.1 released In-Reply-To: <001701c5258b$faefd270$6400a8c0@NewDell> References: <001701c5258b$faefd270$6400a8c0@NewDell> Message-ID: <42362C58.7060108@kilmore.info> Hi, I was wondering about the reasons for taking out direct access to a text field: eg: @ie.textField(:name,'UserName').value=userName Is there a way to set the value of a field more quickly than the set method? Thanks, Jared >Last night I did a new release of watir. > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > > > From paul.rogers at shaw.ca Mon Mar 14 20:28:06 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 14 Mar 2005 18:28:06 -0700 Subject: [Wtr-general] Watir 1.1 released In-Reply-To: <42362C58.7060108@kilmore.info> Message-ID: <002b01c528fe$3d3bca60$6400a8c0@NewDell> I think its still there... I did some refactoring of the properties ( .name .id etc) so maybe it diasappeared in that, althought its still working in mine. I prefer to use the set method, as it will cause the javascript events to get fired ( keypress etc) Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jared Quinert Sent: 14 March 2005 17:29 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Watir 1.1 released Hi, I was wondering about the reasons for taking out direct access to a text field: eg: @ie.textField(:name,'UserName').value=userName Is there a way to set the value of a field more quickly than the set method? Thanks, Jared >Last night I did a new release of watir. > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > > > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jared at kilmore.info Mon Mar 14 21:45:37 2005 From: jared at kilmore.info (Jared Quinert) Date: Tue, 15 Mar 2005 13:45:37 +1100 Subject: [Wtr-general] Watir 1.1 released In-Reply-To: <002b01c528fe$3d3bca60$6400a8c0@NewDell> References: <002b01c528fe$3d3bca60$6400a8c0@NewDell> Message-ID: <42364C51.9040606@kilmore.info> Paul Rogers wrote: >I think its still there... I did some refactoring of the properties ( >.name .id etc) so maybe it diasappeared in that, althought its still >working in mine. > > If I roll back to 1.0.4, it works...When I install 1.1, I get this error: C:/eclipse/workspace/Origination Automation/Originations_quick.rb:107:in `login': private method `value=' called for # (NoMethodError) >I prefer to use the set method, as it will cause the javascript events >to get fired ( keypress etc) > > We don't have anything tied to keypress events, and the stuff I'm running is mostly to populate data for other tests, so it's quicker if I can just assign the value directly. I might just roll back to 1.0.4 for now... Jared From paul.rogers at shaw.ca Mon Mar 14 22:14:16 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 14 Mar 2005 20:14:16 -0700 Subject: [Wtr-general] Watir 1.1 released In-Reply-To: <42364C51.9040606@kilmore.info> Message-ID: <002c01c5290d$12626880$6400a8c0@NewDell> Ah ok! Bret made it private sometime between those releases. I made it public again, so the drag and drop tests would pass You can get the latest watir.rb from cvs and it will be fixed. Why do you want to use this rather than the set method? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jared Quinert Sent: 14 March 2005 19:46 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Watir 1.1 released Paul Rogers wrote: >I think its still there... I did some refactoring of the properties ( >.name .id etc) so maybe it diasappeared in that, althought its still >working in mine. > > If I roll back to 1.0.4, it works...When I install 1.1, I get this error: C:/eclipse/workspace/Origination Automation/Originations_quick.rb:107:in `login': private method `value=' called for # (NoMethodError) >I prefer to use the set method, as it will cause the javascript events >to get fired ( keypress etc) > > We don't have anything tied to keypress events, and the stuff I'm running is mostly to populate data for other tests, so it's quicker if I can just assign the value directly. I might just roll back to 1.0.4 for now... Jared _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jared at kilmore.info Mon Mar 14 22:25:28 2005 From: jared at kilmore.info (Jared Quinert) Date: Tue, 15 Mar 2005 14:25:28 +1100 Subject: [Wtr-general] Watir 1.1 released In-Reply-To: <002c01c5290d$12626880$6400a8c0@NewDell> References: <002c01c5290d$12626880$6400a8c0@NewDell> Message-ID: <423655A8.9090902@kilmore.info> Purely for speed reasons. Using 'value=' rather than 'set' is a lot faster and I have a lot of data entry to do... Paul Rogers wrote: >Ah ok! > >Bret made it private sometime between those releases. I made it public >again, so the drag and drop tests would pass >You can get the latest watir.rb from cvs and it will be fixed. > >Why do you want to use this rather than the set method? > >Paul > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jared Quinert >Sent: 14 March 2005 19:46 >To: wtr-general at rubyforge.org >Subject: Re: [Wtr-general] Watir 1.1 released > > >Paul Rogers wrote: > > > >>I think its still there... I did some refactoring of the properties ( >>.name .id etc) so maybe it diasappeared in that, althought its still >>working in mine. >> >> >> >> > >If I roll back to 1.0.4, it works...When I install 1.1, I get this >error: > >C:/eclipse/workspace/Origination Automation/Originations_quick.rb:107:in > >`login': private method `value=' called for ># (NoMethodError) > > > >>I prefer to use the set method, as it will cause the javascript events >>to get fired ( keypress etc) >> >> >> >> > >We don't have anything tied to keypress events, and the stuff I'm >running is mostly to populate data for other tests, so it's quicker if I > >can just assign the value directly. I might just roll back to 1.0.4 for > >now... > >Jared >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > > > From paul.rogers at shaw.ca Mon Mar 14 22:31:24 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 14 Mar 2005 20:31:24 -0700 Subject: [Wtr-general] Watir 1.1 released In-Reply-To: <423655A8.9090902@kilmore.info> Message-ID: <003301c5290f$77b29e10$6400a8c0@NewDell> So you are prepared to live with out exceptions, highlighting etc? There is an option: Ie.typingspeed (default is 0.08 ) that you can use to make it faster Ie.typingspeed = 0.0 # go REAL fast! Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jared Quinert Sent: 14 March 2005 20:25 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Watir 1.1 released Purely for speed reasons. Using 'value=' rather than 'set' is a lot faster and I have a lot of data entry to do... Paul Rogers wrote: >Ah ok! > >Bret made it private sometime between those releases. I made it public >again, so the drag and drop tests would pass You can get the latest >watir.rb from cvs and it will be fixed. > >Why do you want to use this rather than the set method? > >Paul > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jared Quinert >Sent: 14 March 2005 19:46 >To: wtr-general at rubyforge.org >Subject: Re: [Wtr-general] Watir 1.1 released > > >Paul Rogers wrote: > > > >>I think its still there... I did some refactoring of the properties ( >>.name .id etc) so maybe it diasappeared in that, althought its still >>working in mine. >> >> >> >> > >If I roll back to 1.0.4, it works...When I install 1.1, I get this >error: > >C:/eclipse/workspace/Origination >Automation/Originations_quick.rb:107:in > >`login': private method `value=' called for ># (NoMethodError) > > > >>I prefer to use the set method, as it will cause the javascript events >>to get fired ( keypress etc) >> >> >> >> > >We don't have anything tied to keypress events, and the stuff I'm >running is mostly to populate data for other tests, so it's quicker if I > >can just assign the value directly. I might just roll back to 1.0.4 >for > >now... > >Jared >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > > > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From aashishharsh at yahoo.com Mon Mar 14 22:50:53 2005 From: aashishharsh at yahoo.com (ashish harsh) Date: Mon, 14 Mar 2005 19:50:53 -0800 (PST) Subject: [Wtr-general] Re: Report from Bangalore In-Reply-To: <200503150024.j2F0OadT007241@rubyforge.org> Message-ID: <20050315035053.55430.qmail@web54006.mail.yahoo.com> Hi Brett, I'm a testing engineer working in Bangalore and from last 1 month ,also a user of Watir and Ruby.I want to know more about your seminars and demonstrations on Ruby specially Watir in India.is it possible for me to attend the Demo? Waiting for a positive reply Regds Aashish Kumar Harsh wtr-general-request at rubyforge.org wrote: Send Wtr-general mailing list submissions to wtr-general at rubyforge.org To subscribe or unsubscribe via the World Wide Web, visit http://rubyforge.org/mailman/listinfo/wtr-general or, via email, send a message with subject or body 'help' to wtr-general-request at rubyforge.org You can reach the person managing the list at wtr-general-owner at rubyforge.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Wtr-general digest..." Today's Topics: 1. Re: (no subject) (jkohl at telusplanet.net) 2. RE: Security Login Window (Paul Rogers) 3. Reset functionality (Paul Rogers) 4. Method names (Paul Rogers) 5. Report from Bangalore (Bret Pettichord) 6. Watir needs a Win32GUI library (Bret Pettichord) 7. Ruby-India Trip Report (Bret Pettichord) 8. Re: Watir 1.1 released (Jared Quinert) ---------------------------------------------------------------------- Message: 1 Date: Fri, 11 Mar 2005 14:37:11 -0800 From: jkohl at telusplanet.net Subject: Re: [Wtr-general] (no subject) To: wtr-general at rubyforge.org Message-ID: <1110580631.42321d97ca9ea at webmail.telus.net> Content-Type: text/plain; charset=ISO-8859-1 oops. I think I missed an "end" there. This is how it should look: class TC_myTest < Test::Unit::TestCase def test_myTestCase #watir method that sets up the unit under test condition go here begin assert($ie.frame("LeftBar").div(:title,"EditTime")) puts ("PASS") rescue => e puts("FAIL") end #of rescue end # of test_myTestCase end #of class TC_myTest Hope that helps. -Jonathan Quoting jkohl at telusplanet.net: > try this: > class TC_myTest < Test::Unit::TestCase > def test_myTestCase > > #watir method that sets up the unit under test condition go here > > begin > assert($ie.frame("LeftBar").div(:title,"EditTime")) > puts ("PASS") > rescue => e > puts("FAIL") > end > end > > > > Quoting Richard Allen : > > > When I finish running a script I get the number of > > tests, assertions, failures and errors. What creates > > this? What would be the difference between an error > > and a failure? > > > > I noticed that if I just have: > > class TC_myTest < Test::Unit::TestCase > > def test_myTestCase > > assert($ie.frame("LeftBar").div(:title,"Edit > > Rime").exists?) > > end > > end > > > > I will show 1 failure. But if I have: > > > > > > class TC_myTest < Test::Unit::TestCase > > def test_myTestCase > > assert($ie.frame("LeftBar").div(:title,"Edit > > Time")) > > puts ("PASS") > > rescue => e > > puts("FAIL") > > end > > end > > > > I will get 0 failures, even if it fails. I assume it's > > because it really did pass since it found one of the > > options, in this case FAIL? > > > > > > > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! Small Business - Try our new resources site! > > http://smallbusiness.yahoo.com/resources/ > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > ------------------------------ Message: 2 Date: Fri, 11 Mar 2005 15:48:06 -0700 From: Paul Rogers Subject: RE: [Wtr-general] Security Login Window To: wtr-general at rubyforge.org Message-ID: <000201c5268c$647f7a00$6400a8c0 at NewDell> Content-Type: text/plain; charset="us-ascii" I looked at this yesterday. It is much harder than I originally thought I'll see if I can do something over the weekend Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Unmesh Gundecha Sent: 10 March 2005 04:44 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Security Login Window Hi Paul, I am having difficulty in using the solution you provided. When I open a site using $ie.goto, Internet Explorer windows opens with a dialog box (Caption "Enter Network Password") which I need to handle. However, we I tried your solution it doesn't handle this dialog. What happens is, when goto method is invoked it waits for page to be loaded and at the same time this dialog appears. Please advice me further, I am attaching the code snippet with this mail require 'watir' require 'watir/winClicker' #include winClicker include Watir $ie = IE.new w = WinClicker.new testSite = " http://dev4.eq.xxx.com:8095" $ie.goto(testSite) handle = w.getWindowHandle("Enter Network Password") puts "This is handle value",handle w.makeWindowActive(handle) w.clickWindowsButton_hwnd(handle,"OK") Thanks and Regards, Unmesh Unmesh Gundecha wrote: Thanks Paul, I will try this.. Regards, Unmesh Paul Rogers wrote: It is possible to do this with the winClicker.rb w = WinClicker.new handle = w.getWindowHandle("Connect") w.makeWindowActive ( handle ) w.clickWindowsButton_hwnd (handle ,"OK" ) If you need to fill in text fields, you can use these methods setComboBoxText setTextBoxText in the winclicker file, which is normally in: C:\ruby\lib\ruby\site_ruby\1.8\watir\winClicker.rb Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Unmesh Gundecha Sent: 03 March 2005 23:26 To: wtr-general at rubyforge.org Cc: wtr_general at rubyforge.org Subject: [Wtr-general] (no subject) Hi, I am trying to write a automation script in WTR, The Web application which I am testing requires a Network Login. Does anyone help me how to handle this window in WTR. Thanks in advance, Regards, Unmesh __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _____ Do you Yahoo!? Yahoo! Small Business - Try ces/> our new resources site! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050311/719c8bef/attachment-0001.htm ------------------------------ Message: 3 Date: Fri, 11 Mar 2005 22:37:36 -0700 From: Paul Rogers Subject: [Wtr-general] Reset functionality To: wtr-general at rubyforge.org Message-ID: <001701c526c5$98b293a0$6400a8c0 at NewDell> Content-Type: text/plain; charset=US-ASCII Somebody asked for clicking reset buttons to be added. You can now do ie.reset(:index,1).click All the methods that apply to buttons now apply to reset buttons See the form_test.rb unit test for more ------------------------------ Message: 4 Date: Fri, 11 Mar 2005 22:39:08 -0700 From: Paul Rogers Subject: [Wtr-general] Method names To: wtr-general at rubyforge.org Message-ID: <001801c526c5$cfe807b0$6400a8c0 at NewDell> Content-Type: text/plain; charset=US-ASCII We would like people to start using method names like: text_field() instead of the more java like textField() Ive updated many of the unit tests to use this. The java style names will disappear eventually Paul ------------------------------ Message: 5 Date: Sat, 12 Mar 2005 20:22:15 +0530 From: Bret Pettichord Subject: [Wtr-general] Report from Bangalore To: wtr-general at rubyforge.org Message-ID: <5.1.0.14.2.20050312201210.03145720 at 127.0.0.1> Content-Type: text/plain; charset="us-ascii"; format=flowed The first meeting of the Ruby-India users group was held today at Itellix's offices in Bangalore. My collegue, Yogi Kulkarni presented an overview of Ruby, and i presented Watir and the Ruby bindings of Selenium. We had a few Ruby enthusiasts in the audience and maybe two dozen or more people who were new to Ruby, but interested in learning more. Many of them were Python programmers. My hope is to recruit some people to using these tools and helping out with development. I will be making additional demonstrations and workshops to my collegues in ThoughtWorks' office here in Bangalore next week. Bret _____________________ Bret Pettichord www.pettichord.com ------------------------------ Message: 6 Date: Sat, 12 Mar 2005 20:53:25 +0530 From: Bret Pettichord Subject: [Wtr-general] Watir needs a Win32GUI library To: ruby-talk at ruby-lang.org Cc: wtr-general at rubyforge.org Message-ID: <5.1.0.14.2.20050312202219.0313d680 at 127.0.0.1> Content-Type: text/plain; charset="us-ascii"; format=flowed We've seen growing enthusiasm for Watir, a web-testing library that is good enough that it is convincing people to learn Ruby just so that they can use it. Here are some things people are saying about it: Watir Rocks! I have played with it for only about on hour and accomplished what I had wanted to do (but did not have the wherewithall) for ages. Truly awesome !! In my opinion, WATIR has no peer as a framework to drive functional test automation in Internet Explorer. I have been using watir for a few weeks and have been very productive in automating the testing of our Web based application. I downloaded Watir a few days ago, without having have any high hopes for it, but I have been very impressed by this tool. I have limited scripting experience and none with Ruby, but I was able to follow your examples and be productive in short order. My hat is off to all involved in this project, you're doing a great service for the testing community - mad props! Up until now, I'd managed to avoid learning the Ruby scripting language.... But after seeing what Watir could do and how neat Ruby is, I became a convert. See http://wtr.rubyforge.org/wiki/wiki.pl?WatirTestimonials for more comments. We've just release version 1.1 of Watir. http://rubyforge.org/frs/?group_id=104&release_id=1782 I'm writing to ask for help. The biggest problem with Watir is its support for various dialogs. These dialogs appear when you use a browser; for example, a login dialog or a security dialog or a javascript dialog. Watir mostly works by accessing the DOM via IE's COM interface. But there is no COM/DOM interface to these dialogs. We have some code that uses Win32 API calls, but it is buggy and needs work. Frankly, i think we would be better off using a general Win32 GUI testing library than trying to build a peice of it ourselves. Perl has a really good Win32-GuiTest library. http://cpan.uwinnipeg.ca/htdocs/Win32-GuiTest/ There is also a Ruby port of this, but it uses Cygwin and appears to have been abandoned. http://raa.ruby-lang.org/project/win32-guitest/ We need something that works with MSWIN. Can you help us? So far we have had some suggestions. One person suggested that we just use the Perl library. Another has suggested that we use AutoIt. But personally i would prefer a Ruby solution. Surely i'm not the only Ruby programmer left on the Windows platform. Do we want to let the Perl programmers dominate Windows? Bret _____________________ Bret Pettichord www.pettichord.com ------------------------------ Message: 7 Date: Sun, 13 Mar 2005 10:23:25 +0530 From: Bret Pettichord Subject: [Wtr-general] Ruby-India Trip Report To: wtr-general at rubyforge.org Message-ID: <5.1.0.14.2.20050313102309.0311de10 at 127.0.0.1> Content-Type: text/plain; charset="us-ascii"; format=flowed http://www.swaroopch.info/archives/2005/03/12/ruby-india-first-meetup/ _____________________ Bret Pettichord www.pettichord.com ------------------------------ Message: 8 Date: Tue, 15 Mar 2005 11:29:12 +1100 From: Jared Quinert Subject: Re: [Wtr-general] Watir 1.1 released To: wtr-general at rubyforge.org Message-ID: <42362C58.7060108 at kilmore.info> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Hi, I was wondering about the reasons for taking out direct access to a text field: eg: @ie.textField(:name,'UserName').value=userName Is there a way to set the value of a field more quickly than the set method? Thanks, Jared >Last night I did a new release of watir. > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > > > ------------------------------ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general End of Wtr-general Digest, Vol 16, Issue 15 ******************************************* --------------------------------- Do you Yahoo!? Yahoo! Small Business - Try our new resources site! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050314/d5dc42ac/attachment.html From jared at kilmore.info Mon Mar 14 22:54:21 2005 From: jared at kilmore.info (Jared Quinert) Date: Tue, 15 Mar 2005 14:54:21 +1100 Subject: [Wtr-general] Watir 1.1 released In-Reply-To: <003301c5290f$77b29e10$6400a8c0@NewDell> References: <003301c5290f$77b29e10$6400a8c0@NewDell> Message-ID: <42365C6D.5050807@kilmore.info> For the stuff I'm doing at the moment, yes, as it's just a quick hack to get data in the system as quickly as possible before I then do some exploratory testing. Paul Rogers wrote: >So you are prepared to live with out exceptions, highlighting etc? >There is an option: > >Ie.typingspeed (default is 0.08 ) that you can use to make it faster >Ie.typingspeed = 0.0 # go REAL fast! > >Paul > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jared Quinert >Sent: 14 March 2005 20:25 >To: wtr-general at rubyforge.org >Subject: Re: [Wtr-general] Watir 1.1 released > > >Purely for speed reasons. Using 'value=' rather than 'set' is a lot >faster and I have a lot of data entry to do... > >Paul Rogers wrote: > > > >>Ah ok! >> >>Bret made it private sometime between those releases. I made it public >>again, so the drag and drop tests would pass You can get the latest >>watir.rb from cvs and it will be fixed. >> >>Why do you want to use this rather than the set method? >> >>Paul >> >>-----Original Message----- >>From: wtr-general-bounces at rubyforge.org >>[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jared Quinert >>Sent: 14 March 2005 19:46 >>To: wtr-general at rubyforge.org >>Subject: Re: [Wtr-general] Watir 1.1 released >> >> >>Paul Rogers wrote: >> >> >> >> >> >>>I think its still there... I did some refactoring of the properties ( >>>.name .id etc) so maybe it diasappeared in that, althought its still >>>working in mine. >>> >>> >>> >>> >>> >>> >>If I roll back to 1.0.4, it works...When I install 1.1, I get this >>error: >> >>C:/eclipse/workspace/Origination >>Automation/Originations_quick.rb:107:in >> >>`login': private method `value=' called for >># (NoMethodError) >> >> >> >> >> >>>I prefer to use the set method, as it will cause the javascript events >>>to get fired ( keypress etc) >>> >>> >>> >>> >>> >>> >>We don't have anything tied to keypress events, and the stuff I'm >>running is mostly to populate data for other tests, so it's quicker if >> >> >I > > >>can just assign the value directly. I might just roll back to 1.0.4 >>for >> >>now... >> >>Jared >>_______________________________________________ >>Wtr-general mailing list >>Wtr-general at rubyforge.org >>http://rubyforge.org/mailman/listinfo/wtr-general >> >>_______________________________________________ >>Wtr-general mailing list >>Wtr-general at rubyforge.org >>http://rubyforge.org/mailman/listinfo/wtr-general >> >> >> >> >> >> >> > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > > > From paul.rogers at shaw.ca Mon Mar 14 23:37:13 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 14 Mar 2005 21:37:13 -0700 Subject: [Wtr-general] New watir features Message-ID: <003b01c52918$a8e85700$6400a8c0@NewDell> This weekend Ive added some new features to watir ( as well as eventually adding unittests for it all) The first is properties for objects: $ie.link(:index, 1).name $ie.link(:index, 1).id $ie.link(:index, 1).innerText $ie.link(:index, 1).href Various different properties exist for each of the different objects Ive also completed the iterator objects: $ie.links.each do |link| puts link.innerText puts link.href End There are iterators for: span, div, link, button, radio, checkbox, select_list, text_field Im going to do a new release with all of this later in the week. In the meantime you can get the latest from cvs Paul From christopher.mcmahon at gmail.com Tue Mar 15 00:28:47 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 14 Mar 2005 23:28:47 -0600 Subject: [Wtr-general] New watir features In-Reply-To: <003b01c52918$a8e85700$6400a8c0@NewDell> References: <003b01c52918$a8e85700$6400a8c0@NewDell> Message-ID: <72799cd7050314212879c46f3a@mail.gmail.com> Very nifty. Thanks for doing this. I have a new job, but I would have used this in the old one, and I'm sure this will come in handy in the future. -Chris On Mon, 14 Mar 2005 21:37:13 -0700, Paul Rogers wrote: > This weekend Ive added some new features to watir ( as well as > eventually adding unittests for it all) > > The first is properties for objects: > > $ie.link(:index, 1).name > $ie.link(:index, 1).id > $ie.link(:index, 1).innerText > $ie.link(:index, 1).href > > Various different properties exist for each of the different objects > > Ive also completed the iterator objects: > > $ie.links.each do |link| > puts link.innerText > puts link.href > End > > There are iterators for: span, div, link, button, radio, checkbox, > select_list, text_field > > Im going to do a new release with all of this later in the week. In the > meantime you can get the latest from cvs > > Paul > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From Peter.Ch at NETeller.com Tue Mar 15 17:35:53 2005 From: Peter.Ch at NETeller.com (Peter Chau) Date: Tue, 15 Mar 2005 15:35:53 -0700 Subject: [Wtr-general] Watir 1.1 released Message-ID: Does 'set' work for UTF-8 encoded characters? I'm working with Japanese characters that show up correctly in my text editor but when I try to write to textFields it looks funny. My browser is configure (I can view Japanese pages). 'value=' produces the same results as 'set' Peter From kc.baltz at firefox.co.uk Tue Mar 15 17:52:36 2005 From: kc.baltz at firefox.co.uk (K.C. Baltz) Date: Tue, 15 Mar 2005 14:52:36 -0800 Subject: [Wtr-general] Any way around cross-site scripting protections? Message-ID: <42376734.5040702@firefox.co.uk> Our site mixes HTTP and HTTPS in frames and I've been getting "access denied" trying to access one of the HTTPS frames from an HTTP frame (same site, just different protocols). Is there any way around short of manually issuing goto() to the HTTP site? I can probably do most of my testing that way, but it's not quite the same thing users are doing. K.C. From irushton at olysoftit.com Tue Mar 15 20:12:56 2005 From: irushton at olysoftit.com (Ian Rushton) Date: Tue, 15 Mar 2005 20:12:56 -0500 Subject: [Wtr-general] Any way around cross-site scripting protections? In-Reply-To: <42376734.5040702@firefox.co.uk> Message-ID: <200503160108.j2G18hdS025348@rubyforge.org> K.C. What is the URL of the frame getting rejected? If site name (the part to the left of /) is different from the base html that sets up the frames, then you can't get around the problem. I had the same issue a month ago, and I just had to manually issue a goto to get around it. Was told this was a restriction in the IE interface related to security. Ian Rushton -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of K.C. Baltz Sent: Tuesday, March 15, 2005 5:53 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Any way around cross-site scripting protections? Our site mixes HTTP and HTTPS in frames and I've been getting "access denied" trying to access one of the HTTPS frames from an HTTP frame (same site, just different protocols). Is there any way around short of manually issuing goto() to the HTTP site? I can probably do most of my testing that way, but it's not quite the same thing users are doing. K.C. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Tue Mar 15 23:44:34 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 15 Mar 2005 21:44:34 -0700 Subject: [Wtr-general] Watir 1.1 released In-Reply-To: Message-ID: <000201c529e2$da348570$6400a8c0@NewDell> Can you send me some japanese to try! Can you do a screen shot of the 'funny' too - send it direct to me if you like Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Peter Chau Sent: 15 March 2005 15:36 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Watir 1.1 released Does 'set' work for UTF-8 encoded characters? I'm working with Japanese characters that show up correctly in my text editor but when I try to write to textFields it looks funny. My browser is configure (I can view Japanese pages). 'value=' produces the same results as 'set' Peter _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Wed Mar 16 00:06:04 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 15 Mar 2005 22:06:04 -0700 Subject: [Wtr-general] Any way around cross-site scripting protections? In-Reply-To: <200503160108.j2G18hdS025348@rubyforge.org> Message-ID: <000601c529e5$daf97bc0$6400a8c0@NewDell> As Ian has already said, I don't think there is anyway round this. I like the idea of using a goto as a work-around. Just so we're on the same page, I think this is called the cross-frame scripting vulnerability http://msdn.microsoft.com/library/default.asp?url=/workshop/author/om/xf rame_scripting_security.asp Cross-site is something slightly different: http://www.devshed.com/c/a/Security/A-Quick-Look-at-Cross-Site-Scripting -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ian Rushton Sent: 15 March 2005 18:13 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Any way around cross-site scripting protections? K.C. What is the URL of the frame getting rejected? If site name (the part to the left of /) is different from the base html that sets up the frames, then you can't get around the problem. I had the same issue a month ago, and I just had to manually issue a goto to get around it. Was told this was a restriction in the IE interface related to security. Ian Rushton -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of K.C. Baltz Sent: Tuesday, March 15, 2005 5:53 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Any way around cross-site scripting protections? Our site mixes HTTP and HTTPS in frames and I've been getting "access denied" trying to access one of the HTTPS frames from an HTTP frame (same site, just different protocols). Is there any way around short of manually issuing goto() to the HTTP site? I can probably do most of my testing that way, but it's not quite the same thing users are doing. K.C. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Wed Mar 16 02:36:08 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 16 Mar 2005 13:06:08 +0530 Subject: [Wtr-general] Any way around cross-site scripting protections? In-Reply-To: <42376734.5040702@firefox.co.uk> Message-ID: <5.1.0.14.2.20050316130411.02d7a718@127.0.0.1> At 04:22 AM 3/16/2005, K.C. Baltz wrote: >Our site mixes HTTP and HTTPS in frames and I've been getting "access >denied" trying to access one of the HTTPS frames from an HTTP frame (same >site, just different protocols). Is there any way around short of >manually issuing goto() to the HTTP site? No, not really. Well actually, if you install and test through a proxy server that is able to redirect calls to the correct server, then the browser wouldn't know that they were different sites. I haven't done this myself, but it has been done. It's not trival. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Mar 16 02:31:04 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 16 Mar 2005 13:01:04 +0530 Subject: [Wtr-general] Watir 1.1 released In-Reply-To: <002c01c5290d$12626880$6400a8c0@NewDell> References: <42364C51.9040606@kilmore.info> Message-ID: <5.1.0.14.2.20050316124724.0327d548@127.0.0.1> At 08:44 AM 3/15/2005, Paul Rogers wrote: >Bret made it private sometime between those releases. I made it public >again, so the drag and drop tests would pass >You can get the latest watir.rb from cvs and it will be fixed. I agree that set should be used instead of value= There are a lot of methods that are intended to only be used internally and which we may be not be able to continue to support in the future. This is why i am making them private. It turns out that there are in fact text_field test cases that fail, however, when value= is private. I was teaching Watir yesterday and my students were looking at our test cases and noticed this. Unfortunately, Paul commented out these test cases in revision 1.19 dated 1/24 (used in 1.0.4 and 1.1). So i didn't realize that we had internal dependencies on having TextField#value= public. Paul since has uncommented these test cases. I do plan to eventually make TextField::value= private again. This has not been a published interface. What we need to do is add speed settings to Watir to make it easy to run fast. You should have to use a different interface to get fastness. We should have one speed ("run") that runs as fast as can be done reliably. We need another that is pretty slow ("walk"). I would characterize the current setting as "jog". Instead of having people figure out the right delays. We should provide IE#run, IE#jog and IE#walk methods that allow specific speed settings to be set. We should also provide a command line switch which sets the default. This will allow a test to be run at different speeds. This is often very useful when checking and debugging a test. Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Mar 16 03:47:10 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 16 Mar 2005 14:17:10 +0530 Subject: [Wtr-general] Watir 1.1 released In-Reply-To: <5.1.0.14.2.20050316124724.0327d548@127.0.0.1> References: <002c01c5290d$12626880$6400a8c0@NewDell> <42364C51.9040606@kilmore.info> Message-ID: <5.1.0.14.2.20050316141635.03293d60@127.0.0.1> At 01:01 PM 3/16/2005, Bret Pettichord wrote: >What we need to do is add speed settings to Watir to make it easy to run >fast. You should have to use a different interface to get fastness. Er. That's: You should NOT have to use a different interface to get fastness. _____________________ Bret Pettichord www.pettichord.com From dallenusa at yahoo.com Wed Mar 16 11:38:49 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Wed, 16 Mar 2005 08:38:49 -0800 (PST) Subject: [Wtr-general] hidden text Message-ID: <20050316163849.95577.qmail@web30504.mail.mud.yahoo.com> I was searching for itmes on a menu and was getting a pass on the test even though the menu item was not visable. I realized that the items were in the html but just not made visable. I'm thinking I would have to make a test case that would .click on the menu item and test what's returned. Does that seem like the right path? __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From christopher.mcmahon at gmail.com Wed Mar 16 11:54:37 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 16 Mar 2005 10:54:37 -0600 Subject: [Wtr-general] hidden text In-Reply-To: <20050316163849.95577.qmail@web30504.mail.mud.yahoo.com> References: <20050316163849.95577.qmail@web30504.mail.mud.yahoo.com> Message-ID: <72799cd70503160854276f7baa@mail.gmail.com> Hi Richard... First, I'd like to see your code, so that I know just what's under discussion. That said, I've done some things like this: x = ie.getHTML.to_s and printed x to a "before click" file and then to an "after click" file. Look at the resulting files with WinDiff or some other diff tool to be certain that you understand what's changed in the HTML after the click. Finally, when you've got the test passing, double-check by commenting out the .click step and be certain that your test fails properly. Hope that helps... -Chris On Wed, 16 Mar 2005 08:38:49 -0800 (PST), Richard Allen wrote: > I was searching for itmes on a menu and was getting a > pass on the test even though the menu item was not > visable. I realized that the items were in the html > but just not made visable. > > I'm thinking I would have to make a test case that > would .click on the menu item and test what's > returned. > > Does that seem like the right path? > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From dallenusa at yahoo.com Wed Mar 16 12:14:36 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Wed, 16 Mar 2005 09:14:36 -0800 (PST) Subject: [Wtr-general] hidden text In-Reply-To: 6667 Message-ID: <20050316171436.81356.qmail@web30502.mail.mud.yahoo.com> I'm using the following to grab the html. What does the "to_s" do? I get the htlm with or without it. x = $ie.frame("LeftBar").getHTML.to_s puts " " puts x --- Chris McMahon wrote: > Hi Richard... > First, I'd like to see your code, so that I know > just what's under discussion. > That said, I've done some things like this: > > x = ie.getHTML.to_s > > and printed x to a "before click" file and then to > an "after click" > file. Look at the resulting files with WinDiff or > some other diff > tool to be certain that you understand what's > changed in the HTML > after the click. > > Finally, when you've got the test passing, > double-check by commenting > out the .click step and be certain that your test > fails properly. > > Hope that helps... > -Chris > > On Wed, 16 Mar 2005 08:38:49 -0800 (PST), Richard > Allen > wrote: > > I was searching for itmes on a menu and was > getting a > > pass on the test even though the menu item was not > > visable. I realized that the items were in the > html > > but just not made visable. > > > > I'm thinking I would have to make a test case that > > would .click on the menu item and test what's > > returned. > > > > Does that seem like the right path? > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > protection around > > http://mail.yahoo.com > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From christopher.mcmahon at gmail.com Wed Mar 16 12:21:30 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 16 Mar 2005 11:21:30 -0600 Subject: [Wtr-general] hidden text In-Reply-To: <20050316171436.81356.qmail@web30502.mail.mud.yahoo.com> References: <20050316171436.81356.qmail@web30502.mail.mud.yahoo.com> Message-ID: <72799cd7050316092199646f6@mail.gmail.com> to_s is "to string". Ruby also has a "to_a" method that generates an array and (so far) DWIM. If I remember correctly, you have to assign the output from getHTML to a variable in order to print it to a file. (I don't have code handy to demonstrate printing to a file, but it's fairly trivial.) -Chris On Wed, 16 Mar 2005 09:14:36 -0800 (PST), Richard Allen wrote: > I'm using the following to grab the html. What does > the "to_s" do? I get the htlm with or without it. > > x = $ie.frame("LeftBar").getHTML.to_s > puts " " > puts x > > --- Chris McMahon > wrote: > > Hi Richard... > > First, I'd like to see your code, so that I know > > just what's under discussion. > > That said, I've done some things like this: > > > > x = ie.getHTML.to_s > > > > and printed x to a "before click" file and then to > > an "after click" > > file. Look at the resulting files with WinDiff or > > some other diff > > tool to be certain that you understand what's > > changed in the HTML > > after the click. > > > > Finally, when you've got the test passing, > > double-check by commenting > > out the .click step and be certain that your test > > fails properly. > > > > Hope that helps... > > -Chris > > > > On Wed, 16 Mar 2005 08:38:49 -0800 (PST), Richard > > Allen > > wrote: > > > I was searching for itmes on a menu and was > > getting a > > > pass on the test even though the menu item was not > > > visable. I realized that the items were in the > > html > > > but just not made visable. > > > > > > I'm thinking I would have to make a test case that > > > would .click on the menu item and test what's > > > returned. > > > > > > Does that seem like the right path? > > > > > > __________________________________________________ > > > Do You Yahoo!? > > > Tired of spam? Yahoo! Mail has the best spam > > protection around > > > http://mail.yahoo.com > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > __________________________________ > Do you Yahoo!? > Yahoo! Small Business - Try our new resources site! > http://smallbusiness.yahoo.com/resources/ > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From dallenusa at yahoo.com Wed Mar 16 12:36:05 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Wed, 16 Mar 2005 09:36:05 -0800 (PST) Subject: [Wtr-general] hidden text In-Reply-To: 6667 Message-ID: <20050316173605.9988.qmail@web30507.mail.mud.yahoo.com> IF I edit the name of the menu item so it fails I get: c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1376:in `click': Unable to locate object , using id and divEdit (Watir::Exception::UnknownObjectException) from C:/watir/examples/TimeCentre.rb:94 Something like the following could be used, right? This is from your test cases. def test_Button_click assert_raises(UnknownObjectException , "UnknownObjectException was supposed to be thrown" ) { $ie.button(:caption, "Missing Caption").click } end --- Chris McMahon wrote: > to_s is "to string". Ruby also has a "to_a" method > that generates an > array and (so far) DWIM. > > If I remember correctly, you have to assign the > output from getHTML to > a variable in order to print it to a file. (I don't > have code handy > to demonstrate printing to a file, but it's fairly > trivial.) > -Chris > > > On Wed, 16 Mar 2005 09:14:36 -0800 (PST), Richard > Allen > wrote: > > I'm using the following to grab the html. What > does > > the "to_s" do? I get the htlm with or without it. > > > > x = $ie.frame("LeftBar").getHTML.to_s > > puts " " > > puts x > > > > --- Chris McMahon > > wrote: > > > Hi Richard... > > > First, I'd like to see your code, so that I know > > > just what's under discussion. > > > That said, I've done some things like this: > > > > > > x = ie.getHTML.to_s > > > > > > and printed x to a "before click" file and then > to > > > an "after click" > > > file. Look at the resulting files with WinDiff > or > > > some other diff > > > tool to be certain that you understand what's > > > changed in the HTML > > > after the click. > > > > > > Finally, when you've got the test passing, > > > double-check by commenting > > > out the .click step and be certain that your > test > > > fails properly. > > > > > > Hope that helps... > > > -Chris > > > > > > On Wed, 16 Mar 2005 08:38:49 -0800 (PST), > Richard > > > Allen > > > wrote: > > > > I was searching for itmes on a menu and was > > > getting a > > > > pass on the test even though the menu item was > not > > > > visable. I realized that the items were in the > > > html > > > > but just not made visable. > > > > > > > > I'm thinking I would have to make a test case > that > > > > would .click on the menu item and test what's > > > > returned. > > > > > > > > Does that seem like the right path? > > > > > > > > > __________________________________________________ > > > > Do You Yahoo!? > > > > Tired of spam? Yahoo! Mail has the best spam > > > protection around > > > > http://mail.yahoo.com > > > > > _______________________________________________ > > > > Wtr-general mailing list > > > > Wtr-general at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! Small Business - Try our new resources > site! > > http://smallbusiness.yahoo.com/resources/ > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From paul.rogers at shaw.ca Wed Mar 16 12:36:59 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 16 Mar 2005 10:36:59 -0700 Subject: [Wtr-general] hidden text In-Reply-To: <20050316163849.95577.qmail@web30504.mail.mud.yahoo.com> Message-ID: <001001c52a4e$c1b9eb90$6400a8c0@NewDell> This is probably done using a hidden div tag Take a look at the css_test.rb and csstest.html in the unittests directory Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Richard Allen Sent: 16 March 2005 09:39 To: Wtr-general at rubyforge.org Subject: [Wtr-general] hidden text I was searching for itmes on a menu and was getting a pass on the test even though the menu item was not visable. I realized that the items were in the html but just not made visable. I'm thinking I would have to make a test case that would .click on the menu item and test what's returned. Does that seem like the right path? __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Wed Mar 16 13:44:46 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 16 Mar 2005 11:44:46 -0700 Subject: [Wtr-general] hidden text In-Reply-To: <20050316171436.81356.qmail@web30502.mail.mud.yahoo.com> Message-ID: <002401c52a58$399630c0$6400a8c0@NewDell> to_s gives a string representation of the object. In this case getHTML already returns a string so it makes no difference. For other objects it will make a difference irb(main):001:0> a=2 => 2 irb(main):002:0> puts a.class Fixnum => nil irb(main):003:0> puts a.to_s 2 => nil irb(main):004:0> puts a.to_s.class String => nil irb(main):005:0> In this example, 2 is a fixnum, and then the to_s method makes it into a string -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Richard Allen Sent: 16 March 2005 10:15 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] hidden text I'm using the following to grab the html. What does the "to_s" do? I get the htlm with or without it. x = $ie.frame("LeftBar").getHTML.to_s puts " " puts x --- Chris McMahon wrote: > Hi Richard... > First, I'd like to see your code, so that I know > just what's under discussion. > That said, I've done some things like this: > > x = ie.getHTML.to_s > > and printed x to a "before click" file and then to > an "after click" > file. Look at the resulting files with WinDiff or > some other diff > tool to be certain that you understand what's > changed in the HTML > after the click. > > Finally, when you've got the test passing, > double-check by commenting > out the .click step and be certain that your test > fails properly. > > Hope that helps... > -Chris > > On Wed, 16 Mar 2005 08:38:49 -0800 (PST), Richard > Allen > wrote: > > I was searching for itmes on a menu and was > getting a > > pass on the test even though the menu item was not > > visable. I realized that the items were in the > html > > but just not made visable. > > > > I'm thinking I would have to make a test case that > > would .click on the menu item and test what's > > returned. > > > > Does that seem like the right path? > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > protection around > > http://mail.yahoo.com > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From kc.baltz at firefox.co.uk Wed Mar 16 14:34:18 2005 From: kc.baltz at firefox.co.uk (K.C. Baltz) Date: Wed, 16 Mar 2005 11:34:18 -0800 Subject: [Wtr-general] Any way around cross-site scripting protections? In-Reply-To: <42376734.5040702@firefox.co.uk> References: <42376734.5040702@firefox.co.uk> Message-ID: <42388A3A.5000908@firefox.co.uk> I'm not sure why, but I've received 6 copies of the message I sent to this list yesterday. I hope this hasn't happened to anyone else, but if it has, I apologize even though I have no idea what would have caused it. I have no trouble posting to any other mailing lists. K.C. K.C. Baltz wrote: > Our site mixes HTTP and HTTPS in frames and I've been getting "access > denied" trying to access one of the HTTPS frames from an HTTP frame > (same site, just different protocols). Is there any way around short > of manually issuing goto() to the HTTP site? I can probably do most > of my testing that way, but it's not quite the same thing users are > doing. > > K.C. > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From christopher.mcmahon at gmail.com Wed Mar 16 16:13:38 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 16 Mar 2005 15:13:38 -0600 Subject: [Wtr-general] OT-ish: "system (1, ...) command in Ruby? Message-ID: <72799cd705031613137bd9f613@mail.gmail.com> Hi... This is a little off-topic without a lot of context explanation, but here goes... Can Ruby launch a separate process that will return control to the calling script while leaving the newly-launched process running? I'm looking for something like *nix fork() or the (undocumented) Perl-for-Windows-and-OS2 system (1, ...). -Chris From lorenzo_jorquera at yahoo.com Wed Mar 16 16:24:29 2005 From: lorenzo_jorquera at yahoo.com (Lorenzo Jorquera) Date: Wed, 16 Mar 2005 15:24:29 -0600 (CST) Subject: [Wtr-general] OT-ish: "system (1, ...) command in Ruby? In-Reply-To: 6667 Message-ID: <20050316212429.21368.qmail@web21327.mail.yahoo.com> In ruby you can use Kernel.fork to run an independent process, but not in the windows version... There is a package that provides fork for windows at http://raa.ruby-lang.org/project/win32-process/ , but I have never used it. Lorenzo. Chris McMahon wrote: Hi... This is a little off-topic without a lot of context explanation, but here goes... Can Ruby launch a separate process that will return control to the calling script while leaving the newly-launched process running? I'm looking for something like *nix fork() or the (undocumented) Perl-for-Windows-and-OS2 system (1, ...). -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050316/c0bad240/attachment.html From dallenusa at yahoo.com Wed Mar 16 18:02:41 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Wed, 16 Mar 2005 15:02:41 -0800 (PST) Subject: [Wtr-general] table border Message-ID: <20050316230241.5614.qmail@web30508.mail.mud.yahoo.com> I thought at first I could just $ie.pageContainsText to grab the v1.2. I tried some table methods but there doesn't seem to be any unique identify. Any houghts?
v1.2
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From paul.rogers at shaw.ca Wed Mar 16 22:26:51 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 16 Mar 2005 20:26:51 -0700 Subject: [Wtr-general] table border In-Reply-To: <20050316230241.5614.qmail@web30508.mail.mud.yahoo.com> Message-ID: <003401c52aa1$292b9330$6400a8c0@NewDell> pageContainsText didn't find it? If there are no id tags on your tables, you will probably have to use :index -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Richard Allen Sent: 16 March 2005 16:03 To: Wtr-general at rubyforge.org Subject: [Wtr-general] table border I thought at first I could just $ie.pageContainsText to grab the v1.2. I tried some table methods but there doesn't seem to be any unique identify. Any houghts?
v1.2
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Wed Mar 16 22:29:19 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 16 Mar 2005 20:29:19 -0700 Subject: [Wtr-general] table border In-Reply-To: <20050316230241.5614.qmail@web30508.mail.mud.yahoo.com> Message-ID: <003501c52aa1$813061a0$6400a8c0@NewDell> Ah, This has caught me out too. Also note the change of method name. We want to move to the ruby style contains_text. You cant do If ie.contain_text("v1.2") == true Else End Because contains_text returns either a Match object or a nil. So you need to do: If ie.contains_text("v1.2") Else End -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Richard Allen Sent: 16 March 2005 16:03 To: Wtr-general at rubyforge.org Subject: [Wtr-general] table border I thought at first I could just $ie.pageContainsText to grab the v1.2. I tried some table methods but there doesn't seem to be any unique identify. Any houghts?
v1.2
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Wed Mar 16 22:34:47 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Wed, 16 Mar 2005 20:34:47 -0700 Subject: [Wtr-general] table border In-Reply-To: <003501c52aa1$813061a0$6400a8c0@NewDell> Message-ID: <20050317033335.WXSV27283.priv-edtnes46.telusplanet.net@tintin> I ran into this today during a Watir demo. :) We need to get the doc up to date with all the changes. I guess that means I need to get cracking... > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: March 16, 2005 8:29 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] table border > > Ah, > > This has caught me out too. Also note the change of method name. We want > to move to the ruby style contains_text. > > You cant do > > If ie.contain_text("v1.2") == true > > Else > > End > > Because contains_text returns either a Match object or a nil. So you > need to do: > > If ie.contains_text("v1.2") > > Else > > End > > > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Richard Allen > Sent: 16 March 2005 16:03 > To: Wtr-general at rubyforge.org > Subject: [Wtr-general] table border > > > I thought at first I could just $ie.pageContainsText > to grab the v1.2. I tried some table methods but there > doesn't seem to be any unique identify. Any houghts? > > > > > > >
> > v1.2 >
> > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From dallenusa at yahoo.com Thu Mar 17 15:46:45 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Thu, 17 Mar 2005 12:46:45 -0800 (PST) Subject: [Wtr-general] table border In-Reply-To: 6667 Message-ID: <20050317204645.64881.qmail@web30509.mail.mud.yahoo.com> Great ... that works. --- Paul Rogers wrote: > Ah, > > This has caught me out too. Also note the change of > method name. We want > to move to the ruby style contains_text. > > You cant do > > If ie.contain_text("v1.2") == true > > Else > > End > > Because contains_text returns either a Match object > or a nil. So you > need to do: > > If ie.contains_text("v1.2") > > Else > > End > > > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf > Of Richard Allen > Sent: 16 March 2005 16:03 > To: Wtr-general at rubyforge.org > Subject: [Wtr-general] table border > > > I thought at first I could just $ie.pageContainsText > to grab the v1.2. I tried some table methods but > there > doesn't seem to be any unique identify. Any houghts? > > > > > > >
> > v1.2 >
> > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From duane.waninger at gmail.com Thu Mar 17 22:27:25 2005 From: duane.waninger at gmail.com (Duane Waninger) Date: Thu, 17 Mar 2005 21:27:25 -0600 Subject: [Wtr-general] Session cookies sticking around. Message-ID: Our app creates session cookies. My watir script opens new IE windows using: $ie = Watir::IE.new $ie.goto("My web site") I've noticed that new IE windows contain the session cookie set earlier. The cookie stay around until ALL instances of IE are closed. This includes instances that Watir did not open. I'm wondering if anyone else has noticed this behavior? Thanks, Duane From kc.baltz at firefox.co.uk Thu Mar 17 23:41:16 2005 From: kc.baltz at firefox.co.uk (K.C. Baltz) Date: Thu, 17 Mar 2005 20:41:16 -0800 Subject: [Wtr-general] Session cookies sticking around. In-Reply-To: References: Message-ID: <423A5BEC.40007@firefox.co.uk> That's classic IE behavior. Windows that aren't opened by explicitly clicking on the IE icon generally use the same process and thus share session variables. Unfortunately, I have no suggestion for a Ruby work around except possibly finding some way to delete the cookie that's being used to track your session. K.C. Duane Waninger wrote: >Our app creates session cookies. My watir script opens new IE windows using: > >$ie = Watir::IE.new >$ie.goto("My web site") > >I've noticed that new IE windows contain the session cookie set >earlier. The cookie stay around until ALL instances of IE are closed. > This includes instances that Watir did not open. I'm wondering if >anyone else has noticed this behavior? > >Thanks, >Duane >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > From paul.rogers at shaw.ca Fri Mar 18 00:49:22 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 17 Mar 2005 22:49:22 -0700 Subject: [Wtr-general] Session cookies sticking around. In-Reply-To: <423A5BEC.40007@firefox.co.uk> Message-ID: <000601c52b7e$3c04ac20$6400a8c0@NewDell> There is a thing called cookiemanager. It can delete the cookies for you. Take a look in C:\ruby\lib\ruby\site_ruby\1.8\watir\cookiemanager.rb Assuming you install to the default. I don't know how it works though Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of K.C. Baltz Sent: 17 March 2005 21:41 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Session cookies sticking around. That's classic IE behavior. Windows that aren't opened by explicitly clicking on the IE icon generally use the same process and thus share session variables. Unfortunately, I have no suggestion for a Ruby work around except possibly finding some way to delete the cookie that's being used to track your session. K.C. Duane Waninger wrote: >Our app creates session cookies. My watir script opens new IE windows >using: > >$ie = Watir::IE.new >$ie.goto("My web site") > >I've noticed that new IE windows contain the session cookie set >earlier. The cookie stay around until ALL instances of IE are closed. >This includes instances that Watir did not open. I'm wondering if >anyone else has noticed this behavior? > >Thanks, >Duane >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From ati.ozgur at gmail.com Fri Mar 18 06:39:57 2005 From: ati.ozgur at gmail.com (Atilla Ozgur) Date: Fri, 18 Mar 2005 13:39:57 +0200 Subject: [Wtr-general] Session cookies sticking around. In-Reply-To: <000601c52b7e$3c04ac20$6400a8c0@NewDell> References: <423A5BEC.40007@firefox.co.uk> <000601c52b7e$3c04ac20$6400a8c0@NewDell> Message-ID: CookieManager only deletes Temp_Internet files folder for now. You can not use it to delete individual cookies. On Thu, 17 Mar 2005 22:49:22 -0700, Paul Rogers wrote: > There is a thing called cookiemanager. It can delete the cookies for > you. Take a look in > > C:\ruby\lib\ruby\site_ruby\1.8\watir\cookiemanager.rb > Assuming you install to the default. > > I don't know how it works though > > Paul > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of K.C. Baltz > Sent: 17 March 2005 21:41 > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] Session cookies sticking around. > > That's classic IE behavior. Windows that aren't opened by explicitly > clicking on the IE icon generally use the same process and thus share > session variables. > > Unfortunately, I have no suggestion for a Ruby work around except > possibly finding some way to delete the cookie that's being used to > track your session. > > K.C. > > Duane Waninger wrote: > > >Our app creates session cookies. My watir script opens new IE windows > >using: > > > >$ie = Watir::IE.new > >$ie.goto("My web site") > > > >I've noticed that new IE windows contain the session cookie set > >earlier. The cookie stay around until ALL instances of IE are closed. > > >This includes instances that Watir did not open. I'm wondering if > >anyone else has noticed this behavior? > > > >Thanks, > >Duane > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Fri Mar 18 10:19:50 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 18 Mar 2005 08:19:50 -0700 Subject: [Wtr-general] Session cookies sticking around. In-Reply-To: <423A5BEC.40007@firefox.co.uk> Message-ID: <001401c52bcd$edcea4c0$6400a8c0@NewDell> Here are 2 things to try In Windows Exploer ( NOT internet explorer) Explorer -> Tools -> Folder Options ->View tab -> check "Launch folder windows in a a separate process from http://www.codeproject.com/shell/shellextguide1.asp Goto the rgistry HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer and create a DWORD called DesktopProcess with a value of 1. This makes the desktop and Taskbar run in one process, and subsequent Explorer windows each run in its own process. This means that you can do your debugging with a single Explorer window, and when you close it, your DLL is automatically unloaded, avoiding any problems with the file being in use. You will need to log off and back on for these changes to take effect. Ive not tried either, but it may be worth a go Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of K.C. Baltz Sent: 17 March 2005 21:41 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Session cookies sticking around. That's classic IE behavior. Windows that aren't opened by explicitly clicking on the IE icon generally use the same process and thus share session variables. Unfortunately, I have no suggestion for a Ruby work around except possibly finding some way to delete the cookie that's being used to track your session. K.C. Duane Waninger wrote: >Our app creates session cookies. My watir script opens new IE windows >using: > >$ie = Watir::IE.new >$ie.goto("My web site") > >I've noticed that new IE windows contain the session cookie set >earlier. The cookie stay around until ALL instances of IE are closed. >This includes instances that Watir did not open. I'm wondering if >anyone else has noticed this behavior? > >Thanks, >Duane >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Mark_Cain at rl.gov Fri Mar 18 10:23:53 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Fri, 18 Mar 2005 07:23:53 -0800 Subject: [Wtr-general] Test Results in XML Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04E154E81@EX5V.rl.gov> I am trying to have the results of my test cases be spit-out in XML. I have looked (maybe I missed it) but could not find any examples on doing this. Is there something already written to do what I need-I don't want to reinvent the wheel after all-or do I need to do it myself? Thanks, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050318/56305315/attachment.html From paul.rogers at shaw.ca Fri Mar 18 10:31:36 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 18 Mar 2005 08:31:36 -0700 Subject: [Wtr-general] Test Results in XML In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04E154E81@EX5V.rl.gov> Message-ID: <001a01c52bcf$92bf1c70$6400a8c0@NewDell> I dont think anything currently exists. Jonathan Kohl has been looking into logging and xml, so he may have something ready. Depending upon what you are trying to do it shouldnt be too hard. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 18 March 2005 08:24 To: wtr-general at rubyforge.org Subject: [Wtr-general] Test Results in XML I am trying to have the results of my test cases be spit-out in XML. I have looked (maybe I missed it) but could not find any examples on doing this. Is there something already written to do what I need-I don't want to reinvent the wheel after all-or do I need to do it myself? Thanks, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050318/d6030711/attachment.html From Mark_Cain at rl.gov Fri Mar 18 10:38:27 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Fri, 18 Mar 2005 07:38:27 -0800 Subject: [Wtr-general] Test Results in XML Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04E154E82@EX5V.rl.gov> We have very specific CMMI level 3+ processes to follow and reporting is a really big deal. XML give many options. The only thing that might be a runner up option is writing those results directly to a database, but I didn't see any examples there either. XML is definitely my first choice. --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Friday, March 18, 2005 7:32 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Test Results in XML I dont think anything currently exists. Jonathan Kohl has been looking into logging and xml, so he may have something ready. Depending upon what you are trying to do it shouldnt be too hard. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 18 March 2005 08:24 To: wtr-general at rubyforge.org Subject: [Wtr-general] Test Results in XML I am trying to have the results of my test cases be spit-out in XML. I have looked (maybe I missed it) but could not find any examples on doing this. Is there something already written to do what I need-I don't want to reinvent the wheel after all-or do I need to do it myself? Thanks, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050318/3a0389e0/attachment.html From jkohl at telusplanet.net Fri Mar 18 10:48:02 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Fri, 18 Mar 2005 07:48:02 -0800 Subject: [Wtr-general] Test Results in XML In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04E154E82@EX5V.rl.gov> References: <9C0BD1E3DAF1204D842D72E2DCE2A04E154E82@EX5V.rl.gov> Message-ID: <1111160882.423af83213884@webmail.telusplanet.net> I'm working on something using logger to log results to HTML and to a database. I haven't got to XML logging yet, but have a bit of a start as Paul mentioned. I have a bug in my code right now; we'll see where I get in the next couple of days. I may just send what I have to the list if I don't get it working the way I want. If you don't want to use logger and log everything Watir is doing, but just log results, I can send something for that. I'm having trouble logging everything to both a trace file and another source like an HTML or XM Lfile at the same time. -Jonathan Quoting "Cain, Mark" : > We have very specific CMMI level 3+ processes to follow and reporting is > a really big deal. XML give many options. The only thing that might be > a runner up option is writing those results directly to a database, but > I didn't see any examples there either. XML is definitely my first > choice. > > > > --Mark > > ________________________________ > > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Friday, March 18, 2005 7:32 AM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Test Results in XML > > > > I dont think anything currently exists. Jonathan Kohl has been looking > into logging and xml, so he may have something ready. > > > > Depending upon what you are trying to do it shouldnt be too hard. > > > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark > Sent: 18 March 2005 08:24 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Test Results in XML > > I am trying to have the results of my test cases be spit-out in > XML. I have looked (maybe I missed it) but could not find any examples > on doing this. Is there something already written to do what I need-I > don't want to reinvent the wheel after all-or do I need to do it myself? > > > > Thanks, > > > > Mark > > From Peter.Ch at NETeller.com Fri Mar 18 11:15:58 2005 From: Peter.Ch at NETeller.com (Peter Chau) Date: Fri, 18 Mar 2005 09:15:58 -0700 Subject: [Wtr-general] Test Results in XML Message-ID: This is how I do it from a Windows box. I have an ODBC datasource setup to a mySQL database. require 'dbi' begin @dbh = DBI.connect("dbi:ODBC:myODBC") # establish a connection to myODBC @result = @dbh.execute("") # execute some sort of insert into the database rescue DBI::DatabaseError => e puts "An error occurred with code: #{e.err} and message #{e.errstr}\n\n" ensure @dbh.disconnect if @dbh # disconnect end Here's a link for more using the DBI module http://www.kitebird.com/articles/ruby-dbi.html Peter ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: Friday, March 18, 2005 8:38 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Test Results in XML We have very specific CMMI level 3+ processes to follow and reporting is a really big deal. XML give many options. The only thing that might be a runner up option is writing those results directly to a database, but I didn't see any examples there either. XML is definitely my first choice. --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Friday, March 18, 2005 7:32 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Test Results in XML I dont think anything currently exists. Jonathan Kohl has been looking into logging and xml, so he may have something ready. Depending upon what you are trying to do it shouldnt be too hard. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 18 March 2005 08:24 To: wtr-general at rubyforge.org Subject: [Wtr-general] Test Results in XML I am trying to have the results of my test cases be spit-out in XML. I have looked (maybe I missed it) but could not find any examples on doing this. Is there something already written to do what I need-I don't want to reinvent the wheel after all-or do I need to do it myself? Thanks, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050318/85e5e791/attachment.html From paul.rogers at shaw.ca Fri Mar 18 12:10:05 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 18 Mar 2005 10:10:05 -0700 Subject: [Wtr-general] Test Results in XML In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04E154E82@EX5V.rl.gov> Message-ID: <003801c52bdd$54a08560$6400a8c0@NewDell> there are several options available. We purposely didnt enforce any sort of logging to allow this sort of flexibility. There are several xml packages available for ruby. If you are using test::unit, you ma want to check out that site to see if there are any xml formats available ( http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/index.html ) or contact nathaniel directly If you want the low level Watir logs to go to xml, you need to override the logging with your own Class MyLogger def debug #do xml logging here end def log_test_result( test_description, result) # do xml logging here too end end and then logger=MyLogger.new ie.set_logger( logger) Watir will use the debug method of the logger, so you can do anything you like, as long as there is a debug method. Since you probably dont want to log the low level stuff, but just results from tests it should be even easier. For example, using the logger above: ie = IE.new ie.set_logger(logger) ie.goto("test_site") if ie.contains_text("Welcome To Test Site") logger.log_test_result("Go to Site" , "pass") else logger.log_test_result("Go to Site" , "fail") end Now there are obviously less verbose, more ruby-like ways of doing this, but this should get you going! -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 18 March 2005 08:38 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Test Results in XML We have very specific CMMI level 3+ processes to follow and reporting is a really big deal. XML give many options. The only thing that might be a runner up option is writing those results directly to a database, but I didn't see any examples there either. XML is definitely my first choice. --Mark _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Friday, March 18, 2005 7:32 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Test Results in XML I dont think anything currently exists. Jonathan Kohl has been looking into logging and xml, so he may have something ready. Depending upon what you are trying to do it shouldnt be too hard. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 18 March 2005 08:24 To: wtr-general at rubyforge.org Subject: [Wtr-general] Test Results in XML I am trying to have the results of my test cases be spit-out in XML. I have looked (maybe I missed it) but could not find any examples on doing this. Is there something already written to do what I need-I don't want to reinvent the wheel after all-or do I need to do it myself? Thanks, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050318/a6ae6730/attachment.html From ati.ozgur at gmail.com Fri Mar 18 15:11:20 2005 From: ati.ozgur at gmail.com (Atilla Ozgur) Date: Fri, 18 Mar 2005 22:11:20 +0200 Subject: [Wtr-general] Session cookies sticking around. Fundamental Ruby Question In-Reply-To: <001401c52bcd$edcea4c0$6400a8c0@NewDell> References: <423A5BEC.40007@firefox.co.uk> <001401c52bcd$edcea4c0$6400a8c0@NewDell> Message-ID: I am sorry but this is a fundamental question about ruby, How can I call a function in a module. I tried several things but nothing worked. This is the definition in cookieManager.rb module Watir module CookieManager require 'win32ole' class WatirHelper ...... def WatirHelper.getSpecialFolderLocation(specFolderName) I would like to call this function getSpecialFolderLocation like puts xxxx.getSpecialFolderLocation(0x0021) But I was unable to do so. c:/ruby/lib/ruby/site_ruby/1.8/watir/CookieManager.rb:42:in `getSpecialFolderLocation': uninitialized constant Watir::CookieManager::WatirHelper::WIN32OLE (NameError) this is the error I get. If I am able to call this function from outside, I would like to add function to delete cookies about sites. For example deleting only cookies from www.rubyforge.com As I understand this function is a class function, therefore I should be able to call it, without instatianiting any object (static function). From john.lloydjones at gmail.com Fri Mar 18 17:12:59 2005 From: john.lloydjones at gmail.com (John Lloyd-Jones) Date: Fri, 18 Mar 2005 14:12:59 -0800 Subject: [Wtr-general] Tables Message-ID: <6fcd26f10503181412f38c669@mail.gmail.com> Tables are still problematic for me 1) The Table class has an attribute table_body that assumes that the TBODY tag is the first child of the table. Not necessarily true (very likley to be a THEAD where I come from). And what about a table that has multiple TBODY tags (yes, I use them as well? 2) There is an assumption that the only thing you would want to click on is a "button". Not necessarily true. In this neck of the woods, users click on rows (or rather cells in rows) to select them (Just like they would with a list element). I use the follow hack (Ruby lets me extend a class): class Watir::Table # Add a method to get raw table elements def getRow( index ) raise UnknownTableException , "Unable to locate a table using #{@how} and #{@what} " if @o == nil table_rows = @o.getElementsByTagName("TR") table_row = table_rows[ (index - 1).to_s ] elements = [] for td in table_row.children elements << td end return TableRow.new(elements, at ieController) end def debug puts "table_body.nodeName is #{table_body.invoke('nodeName')}" puts "table_body has #{table_body.children().length} child nodes" end end class Watir::TableCell # Add a method to click directly on a table cell def click @o.click end end gerRows() returns an array of cells and the click method gets me where I need to be. t = $ie.frame("results").table(:index, 1) # get the row as raw cell elements row = t.getRow(2) puts " There are #{row.length} cells in the table row" row[ 2 ].click sleep(1) $ie.frame("results").link(:text, "Edit").click # Sleep for one second sleep(1) ... The click business is perhaps just me, but I am sure many folks must trip up over the TBODY as first child assumption. From paul.rogers at shaw.ca Fri Mar 18 19:10:17 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 18 Mar 2005 17:10:17 -0700 Subject: [Wtr-general] Tables In-Reply-To: <6fcd26f10503181412f38c669@mail.gmail.com> Message-ID: <005601c52c18$07e60700$6400a8c0@NewDell> I came across several of these problems yesterday. Im in the process of fixing them. I may use some of this code if that's ok Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of John Lloyd-Jones Sent: 18 March 2005 15:13 To: Wtr-general at rubyforge.org Subject: [Wtr-general] Tables Tables are still problematic for me 1) The Table class has an attribute table_body that assumes that the TBODY tag is the first child of the table. Not necessarily true (very likley to be a THEAD where I come from). And what about a table that has multiple TBODY tags (yes, I use them as well? 2) There is an assumption that the only thing you would want to click on is a "button". Not necessarily true. In this neck of the woods, users click on rows (or rather cells in rows) to select them (Just like they would with a list element). I use the follow hack (Ruby lets me extend a class): class Watir::Table # Add a method to get raw table elements def getRow( index ) raise UnknownTableException , "Unable to locate a table using #{@how} and #{@what} " if @o == nil table_rows = @o.getElementsByTagName("TR") table_row = table_rows[ (index - 1).to_s ] elements = [] for td in table_row.children elements << td end return TableRow.new(elements, at ieController) end def debug puts "table_body.nodeName is #{table_body.invoke('nodeName')}" puts "table_body has #{table_body.children().length} child nodes" end end class Watir::TableCell # Add a method to click directly on a table cell def click @o.click end end gerRows() returns an array of cells and the click method gets me where I need to be. t = $ie.frame("results").table(:index, 1) # get the row as raw cell elements row = t.getRow(2) puts " There are #{row.length} cells in the table row" row[ 2 ].click sleep(1) $ie.frame("results").link(:text, "Edit").click # Sleep for one second sleep(1) ... The click business is perhaps just me, but I am sure many folks must trip up over the TBODY as first child assumption. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From john.lloydjones at gmail.com Fri Mar 18 19:21:05 2005 From: john.lloydjones at gmail.com (John Lloyd-Jones) Date: Fri, 18 Mar 2005 16:21:05 -0800 Subject: [Wtr-general] Tables Message-ID: <6fcd26f10503181621ef5477f@mail.gmail.com> Paul You may assume that any code I post can be freely used. But, I'm not sure you want to use that stuff. As you see below, I have tidied / generalised it a tad. Right now it looks like this: def getTbody( index = 0 ) elms = @o.getElementsByTagName("TBODY") raise UnknownObjectException, "Table appears not to have a body (TBODY) with index = #{index} " if elms.length <= index return elms[ index.to_s ] # Return the tbody element end # Add a method to get raw table elements def getRow( index ) raise UnknownTableException , "Unable to locate a table using #{@how} and #{@what} " if @o == nil table_rows = @o.getElementsByTagName("TR") table_row = table_rows[ (index - 1).to_s ] elements = [] for td in table_row.children elements << td end return TableRow.new(elements, at ieController) end def table_body return getTbody end John ---------- Forwarded message ---------- From: Paul Rogers To: wtr-general at rubyforge.org Date: Fri, 18 Mar 2005 17:10:17 -0700 Subject: RE: [Wtr-general] Tables I came across several of these problems yesterday. Im in the process of fixing them. I may use some of this code if that's ok Paul From bret at pettichord.com Sat Mar 19 05:15:52 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 19 Mar 2005 15:45:52 +0530 Subject: [Wtr-general] Test Results in XML In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04E154E81@EX5V.rl.gov> Message-ID: <5.1.0.14.2.20050319154510.02d76b58@127.0.0.1> At 08:53 PM 3/18/2005, Cain, Mark wrote: >I am trying to have the results of my test cases be spit-out in XML. I >have looked (maybe I missed it) but could not find any examples on doing >this. Is there something already written to do what I need I don t want >to reinvent the wheel after all or do I need to do it myself? I suggest you use REXML. There are plenty of examples in the documentation. http://www.germane-software.com/software/rexml/docs/tutorial.html _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Mar 19 04:59:33 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 19 Mar 2005 15:29:33 +0530 Subject: [Wtr-general] Session cookies sticking around. Fundamental Ruby Question In-Reply-To: References: <001401c52bcd$edcea4c0$6400a8c0@NewDell> <423A5BEC.40007@firefox.co.uk> <001401c52bcd$edcea4c0$6400a8c0@NewDell> Message-ID: <5.1.0.14.2.20050319152840.02d68370@127.0.0.1> Seems like your call is right, but the module is buggy. At 01:41 AM 3/19/2005, Atilla Ozgur wrote: >I am sorry but this is a fundamental question about ruby, How can I >call a function in a module. I tried several things but nothing >worked. This is the definition in cookieManager.rb > >module Watir > module CookieManager > require 'win32ole' > class WatirHelper >...... > def WatirHelper.getSpecialFolderLocation(specFolderName) > >I would like to call this function getSpecialFolderLocation like >puts xxxx.getSpecialFolderLocation(0x0021) > > >But I was unable to do so. >c:/ruby/lib/ruby/site_ruby/1.8/watir/CookieManager.rb:42:in >`getSpecialFolderLocation': uninitialized constant >Watir::CookieManager::WatirHelper::WIN32OLE (NameError) > >this is the error I get. If I am able to call this function from >outside, I would like to add function to delete cookies about sites. >For example deleting only cookies from www.rubyforge.com >As I understand this function is a class function, therefore I should >be able to call it, without instatianiting any object (static >function). >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Mar 19 05:33:32 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 19 Mar 2005 16:03:32 +0530 Subject: [Wtr-general] Tables In-Reply-To: <6fcd26f10503181412f38c669@mail.gmail.com> Message-ID: <5.1.0.14.2.20050319160310.0331cf28@127.0.0.1> At 03:42 AM 3/19/2005, John Lloyd-Jones wrote: >Tables are still problematic for me These kinds of comments are very helpful. Thanks. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Mar 19 05:36:19 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 19 Mar 2005 16:06:19 +0530 Subject: [Wtr-general] table border In-Reply-To: <20050317033335.WXSV27283.priv-edtnes46.telusplanet.net@tin tin> References: <003501c52aa1$813061a0$6400a8c0@NewDell> Message-ID: <5.1.0.14.2.20050319160513.02d586c0@127.0.0.1> At 09:04 AM 3/17/2005, Jonathan Kohl wrote: >We need to get the doc up to date with all the changes. I guess that means I >need to get cracking... The rdoc needs work. I dunno about the rest. I was the one who changed the semantics of contains_text without updating the rdoc. My bad. _____________________ Bret Pettichord www.pettichord.com From lorenzo_jorquera at yahoo.com Sat Mar 19 08:23:11 2005 From: lorenzo_jorquera at yahoo.com (Lorenzo Jorquera) Date: Sat, 19 Mar 2005 07:23:11 -0600 (CST) Subject: [Wtr-general] Tables In-Reply-To: 6667 Message-ID: <20050319132311.17895.qmail@web21325.mail.yahoo.com> Hi, The problem I found using getElementsByTagName("TR") to find the rows of a Table is that it does not work with nested tables (If you have a 2 rows table with a 3 rows table within this method will work as if you had a 5 rows table). I was wrong in assuming that the TBODY will be always the first child of the table. Would it be ok to search for a TBODY object in the children of the table, instead of just assuming that the first one will be? Lorenzo John Lloyd-Jones wrote: Tables are still problematic for me 1) The Table class has an attribute table_body that assumes that the TBODY tag is the first child of the table. Not necessarily true (very likley to be a THEAD where I come from). And what about a table that has multiple TBODY tags (yes, I use them as well? 2) There is an assumption that the only thing you would want to click on is a "button". Not necessarily true. In this neck of the woods, users click on rows (or rather cells in rows) to select them (Just like they would with a list element). I use the follow hack (Ruby lets me extend a class): class Watir::Table # Add a method to get raw table elements def getRow( index ) raise UnknownTableException , "Unable to locate a table using #{@how} and #{@what} " if @o == nil table_rows = @o.getElementsByTagName("TR") table_row = table_rows[ (index - 1).to_s ] elements = [] for td in table_row.children elements << td end return TableRow.new(elements, at ieController) end def debug puts "table_body.nodeName is #{table_body.invoke('nodeName')}" puts "table_body has #{table_body.children().length} child nodes" end end class Watir::TableCell # Add a method to click directly on a table cell def click @o.click end end gerRows() returns an array of cells and the click method gets me where I need to be. t = $ie.frame("results").table(:index, 1) # get the row as raw cell elements row = t.getRow(2) puts " There are #{row.length} cells in the table row" row[ 2 ].click sleep(1) $ie.frame("results").link(:text, "Edit").click # Sleep for one second sleep(1) ... The click business is perhaps just me, but I am sure many folks must trip up over the TBODY as first child assumption. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050319/79c94db5/attachment.html From john.lloydjones at gmail.com Sat Mar 19 09:47:18 2005 From: john.lloydjones at gmail.com (John Lloyd-Jones) Date: Sat, 19 Mar 2005 09:47:18 -0500 Subject: [Wtr-general] %5BWtr-general%5D%20Tables&In-Reply-To=Lorenzo Jorquera Message-ID: <6fcd26f10503190647353803ca@mail.gmail.com> Hi, > The problem I found using getElementsByTagName("TR") to find the rows of > a Table is that it does not work with nested tables (If you have a 2 rows table >with a 3 rows table within this method will work as if you had a 5 rows table). Never use nested tables, so this worked fine for me. Can you use the rows array property of the table object instead? (btw: thead and tbody have a rows array too) > I was wrong in assuming that the TBODY will be always the first child of > the table. Would it be ok to search for a TBODY object in the children of > the table, instead of just assuming that the first one will be? Ah, there's the problem. For XHtml, a well formed table must must have rows in either a thead or a tbody. Still a table may have only a thead and no tbody. Watir users would know which, so it's no crisis. Html 4 tables are similar -- but the browser must supply the tbody if none is given. Tables written for earlier DTD won't have a tbody at all. My suggestion: Search the children. If you find thead and tbody tags, take the first tbody. Do you want to cope with non well formed tables that have TR tags directly in the TABLE? People like me still need a wy to get multiple tbody tags. Maybe I need to wite a Tbody class and a Thead class to handle them. And Tfoot, I suupose. Lorenzo From john.lloydjones at gmail.com Sat Mar 19 11:51:54 2005 From: john.lloydjones at gmail.com (John Lloyd-Jones) Date: Sat, 19 Mar 2005 08:51:54 -0800 Subject: [Wtr-general] Tables Message-ID: <6fcd26f105031908511d60f21f@mail.gmail.com> Lorenzo I just did a quick test with the rows attribute: # Add a method to get raw table elements def getRow( index ) raise UnknownTableException , "Unable to locate a table using #{@how} and #{@what} " if @o == nil table_rows = @o.invoke("rows") table_row = table_rows[ (index - 1).to_s ] elements = [] for td in table_row.children elements << td end return TableRow.new(elements, at ieController) end This works fine for me. It gives the array ofall rows in teh table, which is what you want in the general case. John From john.lloydjones at gmail.com Sat Mar 19 16:02:46 2005 From: john.lloydjones at gmail.com (John Lloyd-Jones) Date: Sat, 19 Mar 2005 13:02:46 -0800 Subject: [Wtr-general] Tables -- a suggestion for improvement Message-ID: <6fcd26f1050319130261fd9c20@mail.gmail.com> Paul, Laurenzo Here's my suggestion for improving table functionality. I include it in my test file, so it modifies the Watir classes. It copes better with tables that have multiple tbody tags but retains similar funtionality as before. In addition, it gives the difficult people (like myself) openings to get at raw rows and a new Tbody object. class Watir::Table def getThead elms = @o.getElementsByTagName("THEAD") return elms.length > 0 ? elms[ '0' ] : nil # Return the thead element end def getTbody( index = 0 ) elms = @o.getElementsByTagName("TBODY") raise UnknownObjectException, "Table appears not to have a body (TBODY) with index = #{index} " if elms.length <= index return elms[ index.to_s ] # Return the tbody element end # get a tbody def tbody( index = 0 ) return Tbody.new(@ieController,:from_object, getTbody( index )) end # This method returns the number of rows in the tbody. # Raises an UnknownTableException if the table doesnt exist. def tbody_count raise UnknownTableException , "Unable to locate a body (TBODY) using #{@how} and #{@what} " if @o == nil elms = @o.getElementsByTagName("TBODY") return elms.length end # Add a method to get raw table elements def getRow( index ) raise UnknownTableException , "Unable to locate a table using #{@how} and #{@what} " if @o == nil table_rows = @o.invoke("rows") table_row = table_rows[ (index - 1).to_s ] elements = [] for td in table_row.children elements << td end return TableRow.new(elements, at ieController) end # This method overrides the original method, to fix the flawed assumption # that the first child of a table is the tbody element def table_body return getTbody end end class IE def tbody( how, what ) return Tbody.new( self , how, what) end end class Watir::Tbody < ObjectActions # Returns an initialized instance of the table object to wich anElement # belongs # * ieController - an instance of an IEController # * anElement - a Watir object (TextField, Button, etc.) def Tbody.create_from_element(ieController,anElement) o = anElement.getOLEObject.parentElement while(o && o.tagName != 'TBODY') o = o.parentElement end return Tbody.new(ieController,:from_object,o) end # Returns an initialized instance of a table object # * ieController - an instance of an IEController # * how - symbol - how we access the table # * what - what we use to access the table - id, name index etc def initialize( parent, how , what ) @ieController = parent allTbodies = parent.getDocument.getElementsByTagName("TBODY") parent.log "There are #{ allTbodies.length } tbody elements" tbody = nil tbodyIndex = 1 if(how != :from_object) then allTbodies.each do |t| next unless tbody == nil case how when :id if t.invoke("id").to_s == what.to_s tbody = t end when :index if tbodyIndex == what.to_i tbody = t end end tbodyIndex = tbodyIndex + 1 end else tbody = what end parent.log "tbody - #{what}, #{how} Not found " if tbody == nil @o = tbody super( @o ) @how = how @what = what end # Returns a row in the tbody # * index - the index of the row def [](index) raise UnknownTableException , "Unable to locate a table using #{@how} and #{@what} " if @o == nil elements = [] for td in row(index).children if(td.children.length > 0) then elements << td.children(0) else elements << td end end return TableRow.new(elements, at ieController) end # Add a method to get raw table elements def getRow( index ) raise UnknownTableException , "Unable to locate a tbody using #{@how} and #{@what} " if @o == nil tbody_rows = @o.invoke("rows") tbody_row = tbody_rows[ (index - 1).to_s ] elements = [] for td in tbody_row.children elements << td end return TableRow.new(elements, at ieController) end # This method returns the number of rows in the tbody. # Raises an UnknownTableException if the table doesnt exist. def row_count raise UnknownTableException , "Unable to locate a tbody using #{@how} and #{@what} " if @o == nil return @o.children.length end # This method returns the number of columns in a row of the tbody. # Raises an UnknownTableException if the table doesn't exist. # * index - the index of the row def column_count(index=1) raise UnknownTableException , "Unable to locate a tbody using #{@how} and #{@what} " if @o == nil columns = 0 for td in row(index).children columns += td.colSpan end return columns end # This method returns the table as a 2 dimensional array. Dont expect too much if there are nested tables, colspan etc. # Raises an UnknownTableException if the table doesn't exist. def to_a raise UnknownTableException , "Unable to locate a table using #{@how} and #{@what} " if @o == nil y = [] table_rows = @o.children for row in table_rows x = [] for td in row.children x << td.innerText.strip end y << x end return y end def row(index) return @o.children(index - 1) end private :row end Please feel free to use any or all of this code in Watir John From paul.rogers at shaw.ca Sat Mar 19 16:30:07 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sat, 19 Mar 2005 14:30:07 -0700 Subject: [Wtr-general] Tables -- a suggestion for improvement In-Reply-To: <6fcd26f1050319130261fd9c20@mail.gmail.com> Message-ID: <002601c52cca$d2b96af0$6400a8c0@NewDell> Thanks for that John. Im looking at ths right now, so I will probably take this code and use it ( you'll obviously get credited in the readme) I may change some of the method names as we are trying to use the snake_case naming convention that rubyists like Thanks again for this Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of John Lloyd-Jones Sent: 19 March 2005 14:03 To: Wtr-general at rubyforge.org Subject: [Wtr-general] Tables -- a suggestion for improvement Paul, Laurenzo Here's my suggestion for improving table functionality. I include it in my test file, so it modifies the Watir classes. It copes better with tables that have multiple tbody tags but retains similar funtionality as before. In addition, it gives the difficult people (like myself) openings to get at raw rows and a new Tbody object. class Watir::Table def getThead elms = @o.getElementsByTagName("THEAD") return elms.length > 0 ? elms[ '0' ] : nil # Return the thead element end def getTbody( index = 0 ) elms = @o.getElementsByTagName("TBODY") raise UnknownObjectException, "Table appears not to have a body (TBODY) with index = #{index} " if elms.length <= index return elms[ index.to_s ] # Return the tbody element end # get a tbody def tbody( index = 0 ) return Tbody.new(@ieController,:from_object, getTbody( index )) end # This method returns the number of rows in the tbody. # Raises an UnknownTableException if the table doesnt exist. def tbody_count raise UnknownTableException , "Unable to locate a body (TBODY) using #{@how} and #{@what} " if @o == nil elms = @o.getElementsByTagName("TBODY") return elms.length end # Add a method to get raw table elements def getRow( index ) raise UnknownTableException , "Unable to locate a table using #{@how} and #{@what} " if @o == nil table_rows = @o.invoke("rows") table_row = table_rows[ (index - 1).to_s ] elements = [] for td in table_row.children elements << td end return TableRow.new(elements, at ieController) end # This method overrides the original method, to fix the flawed assumption # that the first child of a table is the tbody element def table_body return getTbody end end class IE def tbody( how, what ) return Tbody.new( self , how, what) end end class Watir::Tbody < ObjectActions # Returns an initialized instance of the table object to wich anElement # belongs # * ieController - an instance of an IEController # * anElement - a Watir object (TextField, Button, etc.) def Tbody.create_from_element(ieController,anElement) o = anElement.getOLEObject.parentElement while(o && o.tagName != 'TBODY') o = o.parentElement end return Tbody.new(ieController,:from_object,o) end # Returns an initialized instance of a table object # * ieController - an instance of an IEController # * how - symbol - how we access the table # * what - what we use to access the table - id, name index etc def initialize( parent, how , what ) @ieController = parent allTbodies = parent.getDocument.getElementsByTagName("TBODY") parent.log "There are #{ allTbodies.length } tbody elements" tbody = nil tbodyIndex = 1 if(how != :from_object) then allTbodies.each do |t| next unless tbody == nil case how when :id if t.invoke("id").to_s == what.to_s tbody = t end when :index if tbodyIndex == what.to_i tbody = t end end tbodyIndex = tbodyIndex + 1 end else tbody = what end parent.log "tbody - #{what}, #{how} Not found " if tbody == nil @o = tbody super( @o ) @how = how @what = what end # Returns a row in the tbody # * index - the index of the row def [](index) raise UnknownTableException , "Unable to locate a table using #{@how} and #{@what} " if @o == nil elements = [] for td in row(index).children if(td.children.length > 0) then elements << td.children(0) else elements << td end end return TableRow.new(elements, at ieController) end # Add a method to get raw table elements def getRow( index ) raise UnknownTableException , "Unable to locate a tbody using #{@how} and #{@what} " if @o == nil tbody_rows = @o.invoke("rows") tbody_row = tbody_rows[ (index - 1).to_s ] elements = [] for td in tbody_row.children elements << td end return TableRow.new(elements, at ieController) end # This method returns the number of rows in the tbody. # Raises an UnknownTableException if the table doesnt exist. def row_count raise UnknownTableException , "Unable to locate a tbody using #{@how} and #{@what} " if @o == nil return @o.children.length end # This method returns the number of columns in a row of the tbody. # Raises an UnknownTableException if the table doesn't exist. # * index - the index of the row def column_count(index=1) raise UnknownTableException , "Unable to locate a tbody using #{@how} and #{@what} " if @o == nil columns = 0 for td in row(index).children columns += td.colSpan end return columns end # This method returns the table as a 2 dimensional array. Dont expect too much if there are nested tables, colspan etc. # Raises an UnknownTableException if the table doesn't exist. def to_a raise UnknownTableException , "Unable to locate a table using #{@how} and #{@what} " if @o == nil y = [] table_rows = @o.children for row in table_rows x = [] for td in row.children x << td.innerText.strip end y << x end return y end def row(index) return @o.children(index - 1) end private :row end Please feel free to use any or all of this code in Watir John _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Sun Mar 20 22:08:32 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sun, 20 Mar 2005 20:08:32 -0700 Subject: [Wtr-general] tables Message-ID: <005c01c52dc3$43783070$6400a8c0@NewDell> The latest cvs has some of the table fixes we talked about on the list. I havent had time to add the code for the tbody, thead and there is a failing unittest (caused by line 2012 of watir.rb I think) Im not sure if I will be able to do much on it this week, so maybe someone else can take a look. And also add the tbody, thead that John has suggested - it will probably have to change a bit though I would like to do a release this week, with all the iterator objects, updated rdocs and updated table stuff Thanks Paul From jkohl at telusplanet.net Mon Mar 21 19:33:17 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Mon, 21 Mar 2005 16:33:17 -0800 Subject: [Wtr-general] re: Test Results in XML Message-ID: <1111451597.423f67cdbf9d2@webmail.telusplanet.net> I'm working on an example for logging which logs both to a default logger (everything with a "log" method in Watir and the test scripts logs to it), and to an XML file (this gets logged to both the XML file and the default logger for tracing and debugging). What kind of document format would you like to see for XML file results? Does anyone have a rough tag structure they'd like to see? I'm a complete newbie with XML, so I'm just dreaming things up, which may not be correct. I was thinking of something along these lines: This is the test case that tests foo. This test case is for testing foo. This test case passed (or failed) any thoughts of what people would like to see? I'll try to get something together for this in the next couple of days. Feel free to speak up and let me know what you'd like to see. I'll just throw something out there. :) -Jonathan From christopher.mcmahon at gmail.com Mon Mar 21 22:35:35 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 21 Mar 2005 21:35:35 -0600 Subject: [Wtr-general] re: Test Results in XML In-Reply-To: <1111451597.423f67cdbf9d2@webmail.telusplanet.net> References: <1111451597.423f67cdbf9d2@webmail.telusplanet.net> Message-ID: <72799cd705032119356b77d4e8@mail.gmail.com> > any thoughts of what people would like to see? I'll try to get something > together for this in the next couple of days. Feel free to speak up and let me > know what you'd like to see. I'll just throw something out there. :) Could you throw the timer info in there? Performance data for free is always a good thing... -Chris From jkohl at telusplanet.net Mon Mar 21 22:59:05 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Mon, 21 Mar 2005 20:59:05 -0700 Subject: [Wtr-general] re: Test Results in XML In-Reply-To: <72799cd705032119356b77d4e8@mail.gmail.com> Message-ID: <20050322035743.WYAA17092.priv-edtnes40.telusplanet.net@tintin> What would you like the tags to look like? > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Chris McMahon > Sent: March 21, 2005 8:36 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] re: Test Results in XML > > > any thoughts of what people would like to see? I'll try to get something > > together for this in the next couple of days. Feel free to speak up and > let me > > know what you'd like to see. I'll just throw something out there. :) > > Could you throw the timer info in there? Performance data for free is > always a good thing... > -Chris > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Tue Mar 22 06:12:22 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 22 Mar 2005 05:12:22 -0600 Subject: [Wtr-general] re: Test Results in XML In-Reply-To: <1111451597.423f67cdbf9d2@webmail.telusplanet.net> Message-ID: <5.1.0.14.2.20050322051157.03537550@127.0.0.1> At 06:33 PM 3/21/2005, jkohl at telusplanet.net wrote: >What kind of document format would you like to see for XML file results? Compatability with Cruise Control would be nice. _____________________ Bret Pettichord www.pettichord.com From jkohl at telusplanet.net Tue Mar 22 09:48:53 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Tue, 22 Mar 2005 07:48:53 -0700 Subject: [Wtr-general] re: Test Results in XML In-Reply-To: <5.1.0.14.2.20050322051157.03537550@127.0.0.1> Message-ID: <20050322144725.BDWB4159.priv-edtnes57.telusplanet.net@tintin> > Compatability with Cruise Control would be nice. I was hoping to get somewhere with this soon. I have a couple of developers who are really excited about Watir who asked me if they could work with me on getting Watir tests into a Cruise Control environment. I'll add a task for this. -Jonathan From Mark_Cain at rl.gov Tue Mar 22 10:18:16 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Tue, 22 Mar 2005 07:18:16 -0800 Subject: [Wtr-general] re: Test Results in XML Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04E154E8B@EX5V.rl.gov> Individual tests would log to something like: Test Case: Search Inactive Pay Type Test File: bvt_searchInactivePayType.cfm Test Support File(s): No Suppport Files Expected content: InactivePT Compare results: InactivePT Test Passed: Target content matches the Expected Content This would get spit out using "Test File" and '.xml' extension: e.g. bvt_searchInactivePayType.xml And this next would be a summary view (for reporting) created once all the tests have run. bvt_addExistingDocumentType pass ... ... ... bvt_searchInactivePayType pass 19 17 2 Both are then formatted using XSLT in a XSL style sheet. Hope this helps, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of jkohl at telusplanet.net Sent: Monday, March 21, 2005 4:33 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] re: Test Results in XML I'm working on an example for logging which logs both to a default logger (everything with a "log" method in Watir and the test scripts logs to it), and to an XML file (this gets logged to both the XML file and the default logger for tracing and debugging). What kind of document format would you like to see for XML file results? Does anyone have a rough tag structure they'd like to see? I'm a complete newbie with XML, so I'm just dreaming things up, which may not be correct. I was thinking of something along these lines: This is the test case that tests foo. This test case is for testing foo. This test case passed (or failed) any thoughts of what people would like to see? I'll try to get something together for this in the next couple of days. Feel free to speak up and let me know what you'd like to see. I'll just throw something out there. :) -Jonathan _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Tue Mar 22 10:23:55 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Tue, 22 Mar 2005 08:23:55 -0700 Subject: [Wtr-general] re: Test Results in XML In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04E154E8B@EX5V.rl.gov> Message-ID: <20050322152226.CMXM29734.priv-edtnes28.telusplanet.net@tintin> Thanks. I'll do a simple example and send it out. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Cain, Mark > Sent: March 22, 2005 8:18 AM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] re: Test Results in XML > > Individual tests would log to something like: > > > > > > Test Case: Search Inactive Pay Type > > Test File: bvt_searchInactivePayType.cfm > > Test Support File(s): No Suppport Files > > > > > > Expected content: InactivePT > > Compare results: InactivePT > > > > > Test Passed: Target content matches the Expected > Content > > > > > This would get spit out using "Test File" and '.xml' extension: > e.g. bvt_searchInactivePayType.xml > > And this next would be a summary view (for reporting) created once all > the tests have run. > > > > > > > > bvt_addExistingDocumentType > pass > > ... > ... > ... > > bvt_searchInactivePayType > pass > > > > > 19 > 17 > 2 > > > > Both are then formatted using XSLT in a XSL style sheet. > > Hope this helps, > > --Mark > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of > jkohl at telusplanet.net > Sent: Monday, March 21, 2005 4:33 PM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] re: Test Results in XML > > I'm working on an example for logging which logs both to a default > logger > (everything with a "log" method in Watir and the test scripts logs to > it), and > to an XML file (this gets logged to both the XML file and the default > logger for > tracing and debugging). > > What kind of document format would you like to see for XML file results? > Does > anyone have a rough tag structure they'd like to see? I'm a complete > newbie with > XML, so I'm just dreaming things up, which may not be correct. > > I was thinking of something along these lines: > > > > This is the test case that tests foo. > > > This test case is for testing foo. > > > This test case passed (or failed) > > > > > any thoughts of what people would like to see? I'll try to get something > together for this in the next couple of days. Feel free to speak up and > let me > know what you'd like to see. I'll just throw something out there. :) > > -Jonathan > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From jfry at lyris.com Tue Mar 22 15:33:03 2005 From: jfry at lyris.com (Jeff Fry) Date: Tue, 22 Mar 2005 12:33:03 -0800 Subject: [Wtr-general] http authentication question & general call for suggestions In-Reply-To: <20050322152226.CMXM29734.priv-edtnes28.telusplanet.net@tintin> References: <20050322152226.CMXM29734.priv-edtnes28.telusplanet.net@tintin> Message-ID: <424080FF.1010304@lyris.com> Hi, I am just getting started with watir and am liking it so far. One specific question: Is there a class or method (and possibly a unit test with example code) for http authentication (user/pw)? (If it exists and there isn't a unit test for it yet, I'd be happy to contribute one after I learn it.) Second, generally speaking, when one doesn't know a class or method for something, what are useful ways of finding them? In this case I: - Looked through the User Guide - Browsed through the unit tests - Browsed through watir.rb ...but since I failed to find what I was looking for, I'd love general suggestions of how folks are learning (or can) learn classes within watir. I have done some automation in the past using httpunit, and loved using http://httpunit.sourceforge.net/doc/api/index.html Perhaps there's a way that watir.rb has been or can be parsed to make an easily browseable list of classes? Thanks in advance for your suggestions on either item, Jeff Fry From jkohl at telusplanet.net Tue Mar 22 15:48:33 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Tue, 22 Mar 2005 13:48:33 -0700 Subject: [Wtr-general] http authentication question & general call forsuggestions In-Reply-To: <424080FF.1010304@lyris.com> Message-ID: <20050322204701.BEFK3408.priv-edtnes56.telusplanet.net@tintin> Hi Jeff; > I am just getting started with watir and am liking it so far. Good to hear. >One > specific question: Is there a class or method (and possibly a unit test > with example code) for http authentication (user/pw)? (If it exists and > there isn't a unit test for it yet, I'd be happy to contribute one after > I learn it.) I'm not sure what you mean by http authentication (user/pw). Can you provide an example of what you'd like to see? Watir isn't going against the http stream; it is going against a web browser, so doing what you would like may require something different than what you are used to with httpunit. Normally what I do, is attempt a login, and if it passes, I key on some text on the page I'm expecting to see. If I want to test that a login fails, I do something like this: require 'watir' include Watir ie = IE.new #create a browser instance ie.goto("mytestpage") #navigate to test page #enter in user information and click button to attempt login ie.text_field(:name, "username").set("my_user_name") ie.text_field(:name, "password").set("my_password") ie.button(:value, "Log In").click # check that I logged in by seeing this message I'm expecting ie.contains_text("Logged in successfully") Is that what you are looking for, or something different? > Second, generally speaking, when one doesn't know a class or method for > something, what are useful ways of finding them? In this case I: > - Looked through the User Guide > - Browsed through the unit tests > - Browsed through watir.rb > ...but since I failed to find what I was looking for, I'd love general > suggestions of how folks are learning (or can) learn classes within watir. > I have done some automation in the past using httpunit, and loved using > http://httpunit.sourceforge.net/doc/api/index.html Perhaps there's a > way that watir.rb has been or can be parsed to make an easily browseable > list of classes? There is RDoc for Watir, but we haven't figured out the installation details. If you go to the Watir zip file that you downloaded, go to the "rdoc" folder. ie. C:\watir-v1_1\watir\rdoc and click on "index.html" This will give you the api in the format that you see on the httpunit site. Paul, Bret, have we figured out if we want to put the rdoc folder in the "watir_bonus" directory during install or not? -Jonathan > Thanks in advance for your suggestions on either item, > Jeff Fry > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Tue Mar 22 15:52:48 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Tue, 22 Mar 2005 13:52:48 -0700 Subject: [Wtr-general] http authentication question & general callforsuggestions In-Reply-To: <20050322204701.BEFK3408.priv-edtnes56.telusplanet.net@tintin> Message-ID: <20050322205117.BLYK3408.priv-edtnes56.telusplanet.net@tintin> The formatting is all off on that example. This is what it should look like. If I want to check that I logged in successfully: equire 'watir' include Watir ie = IE.new #create a browser instance ie.goto("mytestpage") #navigate to test page #enter in user information and click button to attempt login ie.text_field(:name, "username").set("my_user_name") ie.text_field(:name, "password").set("my_password") ie.button(:value, "LogIn").click # check that I logged in by seeing this message I'm expecting a = ie.contains_text("Logged in successfully") if !a puts "Watir test user didn't log in" else puts " Watir test user logged in successfully" end > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Jonathan Kohl > Sent: March 22, 2005 1:49 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] http authentication question & general > callforsuggestions > > Hi Jeff; > > > I am just getting started with watir and am liking it so far. > Good to hear. > > >One > > specific question: Is there a class or method (and possibly a unit test > > with example code) for http authentication (user/pw)? (If it exists and > > there isn't a unit test for it yet, I'd be happy to contribute one after > > I learn it.) > I'm not sure what you mean by http authentication (user/pw). Can you > provide > an example of what you'd like to see? Watir isn't going against the http > stream; it is going against a web browser, so doing what you would like > may > require something different than what you are used to with httpunit. > > Normally what I do, is attempt a login, and if it passes, I key on some > text > on the page I'm expecting to see. If I want to test that a login fails, I > do > something like this: > > require 'watir' > include Watir > > ie = IE.new #create a browser instance > ie.goto("mytestpage") #navigate to test page > > #enter in user information and click button to attempt login > ie.text_field(:name, "username").set("my_user_name") > ie.text_field(:name, "password").set("my_password") > ie.button(:value, "Log In").click > > # check that I logged in by seeing this message I'm expecting > ie.contains_text("Logged in successfully") > > > Is that what you are looking for, or something different? > > > Second, generally speaking, when one doesn't know a class or method for > > something, what are useful ways of finding them? In this case I: > > - Looked through the User Guide > > - Browsed through the unit tests > > - Browsed through watir.rb > > ...but since I failed to find what I was looking for, I'd love general > > suggestions of how folks are learning (or can) learn classes within > watir. > > I have done some automation in the past using httpunit, and loved using > > http://httpunit.sourceforge.net/doc/api/index.html Perhaps there's a > > way that watir.rb has been or can be parsed to make an easily browseable > > list of classes? > There is RDoc for Watir, but we haven't figured out the installation > details. If you go to the Watir zip file that you downloaded, go to the > "rdoc" folder. ie. C:\watir-v1_1\watir\rdoc and click on "index.html" > This will give you the api in the format that you see on the httpunit > site. > > Paul, Bret, have we figured out if we want to put the rdoc folder in the > "watir_bonus" directory during install or not? > > -Jonathan > > > Thanks in advance for your suggestions on either item, > > Jeff Fry > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From jfry at lyris.com Tue Mar 22 16:37:32 2005 From: jfry at lyris.com (Jeff Fry) Date: Tue, 22 Mar 2005 13:37:32 -0800 Subject: [Wtr-general] http authentication question In-Reply-To: <20050322204701.BEFK3408.priv-edtnes56.telusplanet.net@tintin> References: <20050322204701.BEFK3408.priv-edtnes56.telusplanet.net@tintin> Message-ID: <4240901C.2000608@lyris.com> Jonathan Kohl wrote: >Is that what you are looking for, or something different? > > Hi Jonathan, Thanks for the speedy reply! I just opened up the RDoc and look forward to exploring it. I see that my question was ambiguous. Here's an example: goto http://clio.lyris.com/ You will be prompted to enter a username and password. How does one tell watir to enter those? Thanks again, Jeff From jkohl at telusplanet.net Tue Mar 22 16:43:06 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Tue, 22 Mar 2005 14:43:06 -0700 Subject: [Wtr-general] http authentication question In-Reply-To: <4240901C.2000608@lyris.com> Message-ID: <20050322214134.SSDX29734.priv-edtnes28.telusplanet.net@tintin> > I see that my question was ambiguous. Here's an example: goto > http://clio.lyris.com/ > You will be prompted to enter a username and password. How does one tell > watir to enter those? Ah, I see what you mean. That box you see is not part of Internet Explorer, so we have to use a different mechanism to control that. Watir comes with Winclickers which we have used for some of these windows, but if I recall, it isn't as simple as the other windows to deal with. I know there was a question about this a few days ago and Paul was looking into it. So I don't think there is a solution for this yet. Someone else can chime in if they have a fix for it. -Jonathan From christopher.mcmahon at gmail.com Tue Mar 22 17:31:44 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 22 Mar 2005 16:31:44 -0600 Subject: [Wtr-general] http authentication question In-Reply-To: <20050322214134.SSDX29734.priv-edtnes28.telusplanet.net@tintin> References: <4240901C.2000608@lyris.com> <20050322214134.SSDX29734.priv-edtnes28.telusplanet.net@tintin> Message-ID: <72799cd7050322143162914701@mail.gmail.com> Watir comes with > Winclickers which we have used for some of these windows, but if I recall, > it isn't as simple as the other windows to deal with. I know there was a > question about this a few days ago and Paul was looking into it. So I don't > think there is a solution for this yet. Someone else can chime in if they > have a fix for it. As of now, the fix is to integrate AutoIT or Perl's Win32::GuiTest or VBScript SendKeys functions with your WATIR tests. We're looking hard for somebody willing to port Perl's Win32::GuiTest module to Ruby. It's non-trivial, but would make WATIR a lot more powerful. -Chris From chrismo at clabs.org Tue Mar 22 18:05:03 2005 From: chrismo at clabs.org (Chris Morris) Date: Tue, 22 Mar 2005 17:05:03 -0600 Subject: [Wtr-general] http authentication question In-Reply-To: <20050322214134.SSDX29734.priv-edtnes28.telusplanet.net@tintin> References: <20050322214134.SSDX29734.priv-edtnes28.telusplanet.net@tintin> Message-ID: <4240A49F.1020504@clabs.org> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050322/3948400e/attachment.html From bret at pettichord.com Tue Mar 22 18:10:03 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 22 Mar 2005 17:10:03 -0600 Subject: [Wtr-general] http authentication question & general call forsuggestions In-Reply-To: <20050322204701.BEFK3408.priv-edtnes56.telusplanet.net@tint in> References: <424080FF.1010304@lyris.com> Message-ID: <5.1.0.14.2.20050322170744.034f92c8@127.0.0.1> At 02:48 PM 3/22/2005, Jonathan Kohl wrote: >Paul, Bret, have we figured out if we want to put the rdoc folder in the >"watir_bonus" directory during install or not? Definitely yes. When i visited the Honeywell group in Bangalore, they were eager for this documentation and thrilled when i showed them how to find it. We need to make it easier to find. In fact, we also need to post it to our website. If directory access to rubyforge is still stalled, we should post to kohl.ca or pettichord.com and link to it. Bret _____________________ Bret Pettichord www.pettichord.com From jkohl at telusplanet.net Tue Mar 22 18:34:58 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Tue, 22 Mar 2005 16:34:58 -0700 Subject: [Wtr-general] http authentication question & general callforsuggestions In-Reply-To: <5.1.0.14.2.20050322170744.034f92c8@127.0.0.1> Message-ID: <20050322233325.HRXW21373.priv-edtnes46.telusplanet.net@tintin> > In fact, we also need to post it to our website. If directory access to > rubyforge is still stalled, we should post to kohl.ca or pettichord.com > and > link to it. Good call. I'm looking into the wtr web space for our rdoc. -Jonathan From jfry at lyris.com Tue Mar 22 19:22:49 2005 From: jfry at lyris.com (Jeff Fry) Date: Tue, 22 Mar 2005 16:22:49 -0800 Subject: [Wtr-general] http authentication question In-Reply-To: <72799cd7050322143162914701@mail.gmail.com> References: <4240901C.2000608@lyris.com> <20050322214134.SSDX29734.priv-edtnes28.telusplanet.net@tintin> <72799cd7050322143162914701@mail.gmail.com> Message-ID: <4240B6D9.2080801@lyris.com> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050322/5a5722b7/attachment.html From paul.rogers at shaw.ca Tue Mar 22 20:34:32 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 22 Mar 2005 18:34:32 -0700 Subject: [Wtr-general] http authentication question & general callforsuggestions In-Reply-To: <20050322204701.BEFK3408.priv-edtnes56.telusplanet.net@tintin> Message-ID: <005b01c52f48$77602e70$6400a8c0@NewDell> In 1.2 (which will be as soon as that remaining unit test failure is fixed) will install the rdoc to watir bonus Unfortunaetly I still havent figured out a way to easily add it to cvs. But you can run rdoc on your own. There is a batch file ( build_rdoc.bat or similar) run that an dit will create a new rdoc. Some versions of ruby have this broken, so you need to go to c:\ruby\bin and rename rdoc to rdoc.bat -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: 22 March 2005 13:49 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] http authentication question & general callforsuggestions Hi Jeff; > I am just getting started with watir and am liking it so far. Good to hear. >One > specific question: Is there a class or method (and possibly a unit test > with example code) for http authentication (user/pw)? (If it exists and > there isn't a unit test for it yet, I'd be happy to contribute one after > I learn it.) I'm not sure what you mean by http authentication (user/pw). Can you provide an example of what you'd like to see? Watir isn't going against the http stream; it is going against a web browser, so doing what you would like may require something different than what you are used to with httpunit. Normally what I do, is attempt a login, and if it passes, I key on some text on the page I'm expecting to see. If I want to test that a login fails, I do something like this: require 'watir' include Watir ie = IE.new #create a browser instance ie.goto("mytestpage") #navigate to test page #enter in user information and click button to attempt login ie.text_field(:name, "username").set("my_user_name") ie.text_field(:name, "password").set("my_password") ie.button(:value, "Log In").click # check that I logged in by seeing this message I'm expecting ie.contains_text("Logged in successfully") Is that what you are looking for, or something different? > Second, generally speaking, when one doesn't know a class or method for > something, what are useful ways of finding them? In this case I: > - Looked through the User Guide > - Browsed through the unit tests > - Browsed through watir.rb > ...but since I failed to find what I was looking for, I'd love general > suggestions of how folks are learning (or can) learn classes within watir. > I have done some automation in the past using httpunit, and loved using > http://httpunit.sourceforge.net/doc/api/index.html Perhaps there's a > way that watir.rb has been or can be parsed to make an easily browseable > list of classes? There is RDoc for Watir, but we haven't figured out the installation details. If you go to the Watir zip file that you downloaded, go to the "rdoc" folder. ie. C:\watir-v1_1\watir\rdoc and click on "index.html" This will give you the api in the format that you see on the httpunit site. Paul, Bret, have we figured out if we want to put the rdoc folder in the "watir_bonus" directory during install or not? -Jonathan > Thanks in advance for your suggestions on either item, > Jeff Fry > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Tue Mar 22 20:38:50 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 22 Mar 2005 18:38:50 -0700 Subject: [Wtr-general] http authentication question & generalcallforsuggestions In-Reply-To: <005b01c52f48$77602e70$6400a8c0@NewDell> Message-ID: <005d01c52f49$10a983b0$6400a8c0@NewDell> Oh, and it also gets installed on the start menu Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: 22 March 2005 18:35 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] http authentication question & generalcallforsuggestions In 1.2 (which will be as soon as that remaining unit test failure is fixed) will install the rdoc to watir bonus Unfortunaetly I still havent figured out a way to easily add it to cvs. But you can run rdoc on your own. There is a batch file ( build_rdoc.bat or similar) run that an dit will create a new rdoc. Some versions of ruby have this broken, so you need to go to c:\ruby\bin and rename rdoc to rdoc.bat -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: 22 March 2005 13:49 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] http authentication question & general callforsuggestions Hi Jeff; > I am just getting started with watir and am liking it so far. Good to hear. >One > specific question: Is there a class or method (and possibly a unit test > with example code) for http authentication (user/pw)? (If it exists and > there isn't a unit test for it yet, I'd be happy to contribute one after > I learn it.) I'm not sure what you mean by http authentication (user/pw). Can you provide an example of what you'd like to see? Watir isn't going against the http stream; it is going against a web browser, so doing what you would like may require something different than what you are used to with httpunit. Normally what I do, is attempt a login, and if it passes, I key on some text on the page I'm expecting to see. If I want to test that a login fails, I do something like this: require 'watir' include Watir ie = IE.new #create a browser instance ie.goto("mytestpage") #navigate to test page #enter in user information and click button to attempt login ie.text_field(:name, "username").set("my_user_name") ie.text_field(:name, "password").set("my_password") ie.button(:value, "Log In").click # check that I logged in by seeing this message I'm expecting ie.contains_text("Logged in successfully") Is that what you are looking for, or something different? > Second, generally speaking, when one doesn't know a class or method for > something, what are useful ways of finding them? In this case I: > - Looked through the User Guide > - Browsed through the unit tests > - Browsed through watir.rb > ...but since I failed to find what I was looking for, I'd love general > suggestions of how folks are learning (or can) learn classes within watir. > I have done some automation in the past using httpunit, and loved using > http://httpunit.sourceforge.net/doc/api/index.html Perhaps there's a > way that watir.rb has been or can be parsed to make an easily browseable > list of classes? There is RDoc for Watir, but we haven't figured out the installation details. If you go to the Watir zip file that you downloaded, go to the "rdoc" folder. ie. C:\watir-v1_1\watir\rdoc and click on "index.html" This will give you the api in the format that you see on the httpunit site. Paul, Bret, have we figured out if we want to put the rdoc folder in the "watir_bonus" directory during install or not? -Jonathan > Thanks in advance for your suggestions on either item, > Jeff Fry > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Tue Mar 22 21:09:47 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 22 Mar 2005 19:09:47 -0700 Subject: [Wtr-general] http authentication question In-Reply-To: <20050322214134.SSDX29734.priv-edtnes28.telusplanet.net@tintin> Message-ID: <005e01c52f4d$63a8eed0$6400a8c0@NewDell> I did look into it, but made no real progress. I'll take another look eventually, although I would rather get something nicer to deal with all the pop ups Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: 22 March 2005 14:43 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] http authentication question > I see that my question was ambiguous. Here's an example: goto > http://clio.lyris.com/ You will be prompted to enter a username and > password. How does one tell watir to enter those? Ah, I see what you mean. That box you see is not part of Internet Explorer, so we have to use a different mechanism to control that. Watir comes with Winclickers which we have used for some of these windows, but if I recall, it isn't as simple as the other windows to deal with. I know there was a question about this a few days ago and Paul was looking into it. So I don't think there is a solution for this yet. Someone else can chime in if they have a fix for it. -Jonathan _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From christopher.mcmahon at gmail.com Tue Mar 22 21:31:01 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 22 Mar 2005 20:31:01 -0600 Subject: Yo Hedges Re: [Wtr-general] http authentication question In-Reply-To: <4240B6D9.2080801@lyris.com> References: <4240901C.2000608@lyris.com> <20050322214134.SSDX29734.priv-edtnes28.telusplanet.net@tintin> <72799cd7050322143162914701@mail.gmail.com> <4240B6D9.2080801@lyris.com> Message-ID: <72799cd705032218313f21ec03@mail.gmail.com> As of now, the fix is to integrate AutoIT or Perl's > Win32::GuiTest or VBScript SendKeys functions with your WATIR tests. We're > looking hard for somebody willing to port Perl's Win32::GuiTest module to > Ruby. It's non-trivial, but would make WATIR a lot more powerful. -Chris > Thanks. Do you (or does anyone) know of an example of how someone has > integrated any of the above? Code snippets would be fantastic. > > Jeff Hi Jeff... I left my snippets behind at my last job, but I had a conversation tonight with a friend there (Chris Hedges), and I think he'll post (soon) a little cleaned-up version of the Perl I wrote to do this. In a nutshell, it's kick off the WATIR script from Perl (the secret is Perl's (undocumented) system (1, ...) which does a quasi-fork) start a loop looking for the popup window in question find and diddle the window with Perl's Win32::GuiTest until you stop the Perl loop either with CTRL-C or programatically. I promise it's elegant. Pettichord doesn't believe me. =) -CM From sgtn2000 at gmail.com Wed Mar 23 02:24:32 2005 From: sgtn2000 at gmail.com (sean) Date: Tue, 22 Mar 2005 23:24:32 -0800 Subject: [Wtr-general] Access is denied error Message-ID: <7f8ae47d0503222324a578585@mail.gmail.com> Hello. I am new to Watir (and Ruby) and need some help understanding an error that I am getting since installing v1.1. Here is a snippet from IRB: irb(main):001:0> require "watir" => true irb(main):002:0> $ie = Watir::IE.new => #>, @lev el=2, @datetime_format="%d-%b-%Y %H:%M:%S", @progname=nil>, @form=nil, @defaultS leepTime=0.1, @ie=#, @activeObjectHighLightColor="yellow"> irb(main):003:0> $ie.goto("http://losangeles.citysearch.com") |W, [22-Mar-2005 23:15:40#212] WARN -- : frame error in waitdocument OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:465:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:465:in `waitForIE' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:464:in `upto' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:464:in `waitForIE' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:336:in `goto' (irb):3:in `irb_binding' c:/ruby/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding' c:/ruby/lib/ruby/1.8/irb/workspace.rb:52 => 5.047 irb(main):004:0> I checked bach through many of the digests and haven't seen anything about this error. Can anyone help? Thanks! -Sean From c.r.mcgrath at gmail.com Wed Mar 23 05:05:39 2005 From: c.r.mcgrath at gmail.com (Chris McGrath) Date: Wed, 23 Mar 2005 10:05:39 +0000 Subject: [Wtr-general] http authentication question & generalcallforsuggestions In-Reply-To: <005d01c52f49$10a983b0$6400a8c0@NewDell> References: <005b01c52f48$77602e70$6400a8c0@NewDell> <005d01c52f49$10a983b0$6400a8c0@NewDell> Message-ID: Is there any thoughts about making watir a gem? That way the docs would be available on the http://localhost:8808 when gem_server is started. Chris On Tue, 22 Mar 2005 18:38:50 -0700, Paul Rogers wrote: > Oh, and it also gets installed on the start menu > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: 22 March 2005 18:35 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] http authentication question & > generalcallforsuggestions > > In 1.2 (which will be as soon as that remaining unit test failure is > fixed) will install the rdoc to watir bonus > Unfortunaetly I still havent figured out a way to easily add it to cvs. > But you can run rdoc on your own. There is a batch file ( build_rdoc.bat > or similar) run that an dit will create a new rdoc. Some versions of > ruby have this broken, so you need to go to c:\ruby\bin and rename rdoc > to rdoc.bat > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl > Sent: 22 March 2005 13:49 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] http authentication question & general > callforsuggestions > > Hi Jeff; > > > I am just getting started with watir and am liking it so far. > Good to hear. > > >One > > specific question: Is there a class or method (and possibly a unit > test > > with example code) for http authentication (user/pw)? (If it exists > and > > there isn't a unit test for it yet, I'd be happy to contribute one > after > > I learn it.) > I'm not sure what you mean by http authentication (user/pw). Can you > provide an example of what you'd like to see? Watir isn't going against > the http stream; it is going against a web browser, so doing what you > would like may require something different than what you are used to > with httpunit. > > Normally what I do, is attempt a login, and if it passes, I key on some > text on the page I'm expecting to see. If I want to test that a login > fails, I do something like this: > > require 'watir' > include Watir > > ie = IE.new #create a browser instance > ie.goto("mytestpage") #navigate to test page > > #enter in user information and click button to attempt login > ie.text_field(:name, "username").set("my_user_name") > ie.text_field(:name, "password").set("my_password") ie.button(:value, > "Log In").click > > # check that I logged in by seeing this message I'm expecting > ie.contains_text("Logged in successfully") > > Is that what you are looking for, or something different? > > > Second, generally speaking, when one doesn't know a class or method > for > > something, what are useful ways of finding them? In this case I: > > - Looked through the User Guide > > - Browsed through the unit tests > > - Browsed through watir.rb > > ...but since I failed to find what I was looking for, I'd love general > > > suggestions of how folks are learning (or can) learn classes within > watir. > > I have done some automation in the past using httpunit, and loved > using > > http://httpunit.sourceforge.net/doc/api/index.html Perhaps there's a > > way that watir.rb has been or can be parsed to make an easily > browseable > > list of classes? > There is RDoc for Watir, but we haven't figured out the installation > details. If you go to the Watir zip file that you downloaded, go to the > "rdoc" folder. ie. C:\watir-v1_1\watir\rdoc and click on "index.html" > This will give you the api in the format that you see on the httpunit > site. > > Paul, Bret, have we figured out if we want to put the rdoc folder in the > "watir_bonus" directory during install or not? > > -Jonathan > > > Thanks in advance for your suggestions on either item, > > Jeff Fry > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From bret at pettichord.com Wed Mar 23 09:05:18 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 23 Mar 2005 08:05:18 -0600 Subject: [Wtr-general] Access is denied error In-Reply-To: <7f8ae47d0503222324a578585@mail.gmail.com> Message-ID: <5.1.0.14.2.20050323080336.036d5718@127.0.0.1> You should be able to ignore this error message and use Watir. We should probably fix Watir so that it doesn't show this warning message. Bret At 01:24 AM 3/23/2005, sean wrote: >Hello. > >I am new to Watir (and Ruby) and need some help understanding an error >that I am getting since installing v1.1. > >Here is a snippet from IRB: > >irb(main):001:0> require "watir" >=> true >irb(main):002:0> $ie = Watir::IE.new >=> #@enable_spinner= >true, @logger=#@logdev=#9088 @shift_size=nil, @shift_age=nil, @filename=nil, >@dev=#>, @lev >el=2, @datetime_format="%d-%b-%Y %H:%M:%S", @progname=nil>, @form=nil, >@defaultS >leepTime=0.1, @ie=#, @activeObjectHighLightColor="yellow"> >irb(main):003:0> $ie.goto("http://losangeles.citysearch.com") >|W, [22-Mar-2005 23:15:40#212] WARN -- : frame error in waitdocument > OLE error code:80070005 in > Access is denied. > > HRESULT error code:0x80020009 > Exception occurred. >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:465:in `method_missing' >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:465:in `waitForIE' >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:464:in `upto' >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:464:in `waitForIE' >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:336:in `goto' >(irb):3:in `irb_binding' >c:/ruby/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding' >c:/ruby/lib/ruby/1.8/irb/workspace.rb:52 >=> 5.047 >irb(main):004:0> > >I checked bach through many of the digests and haven't seen anything >about this error. > >Can anyone help? > >Thanks! > >-Sean >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From jkohl at telusplanet.net Tue Mar 22 21:56:10 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Tue, 22 Mar 2005 19:56:10 -0700 Subject: [Wtr-general] logging take 1 Message-ID: <20050323025435.XIFD25189.priv-edtnes51.telusplanet.net@tintin> This is a simple logger to do some bare bones XML logging, while logging everything to a text file. I'm not terribly happy with the way I worked it in with test::unit. However, I did discover that this doesn't work if the test fails: begin assert($ie.contains_text("my test string") ) puts("TEST PASSED. Found test string 'my test string' ") rescue => e puts("TEST FAILED." + e.message + "\n" + e.backtrace.join("\n")) #This doesn't print on a failure! end Anyone want to take a crack at why this won't print the failure line when the test fails? It just stops in test::unit; maybe the test::unit failure isn't an exception? Here is my first attempt at a logger. Feel free to improve the code and post it back to the mailing list. I called it "example_logger.rb", and saved it and the test case in the same directory. Feel free to make improvements and post them to the list. I'll take a crack at using REXML tomorrow night with something more along what Mark sent as an example. The default logger logs everything to a text file, and the XML logger just prints out each tag, it is very basic, but hopefully this gives you an idea on how to do logging with Watir. Here is "example_logger.rb": require 'watir' include Watir #we start the logger by calling these Class (static) methods class LoggerFactory def LoggerFactory.start_default_logger(fileNamePrefix) time = Time.now.strftime("%m %d %Y %H %M %s") logger = CoreLogger.new(File.join(File.dirname(__FILE__), "#{fileNamePrefix}_#{time}.txt") ,2, 1000000) return logger end def LoggerFactory.start_xml_logger(fileNamePrefix) time = Time.now.strftime("%m %d %Y %H %M %s") logger = XMLLogger.new(File.join(File.dirname(__FILE__), "#{fileNamePrefix}_#{time}.txt") ,2, 1000000, "#{fileNamePrefix}_#{time}.XML") return logger end end #this logs anything that Watir.rb tries to log, and everything with a "log" method to a text #file that can be used for debugging. class CoreLogger < WatirLogger def initialize(fileName, logsToKeep, maxLogSize) super(fileName , logsToKeep, maxLogSize) self.level = Logger::INFO self.datetime_format = "%d-%b-%Y %H:%M:%S" self.info("Core Logger starting...") end #overloaded "log" from logger.rb to something more intuitive. def log(message) puts "log #{message}\n" #optional. comment out if you don't want to see logging in the console info(message) #calls info in logger.rb -- would be good to use different logging levels end end #use object inheritance to fire up the corelogger to log everything to #create a new XML file we can log to as well class XMLLogger < CoreLogger def initialize(fileName, logsToKeep, maxLogSize, xmlFileName ) #start the core logger super(fileName ,logsToKeep, maxLogSize) self.level = Logger::INFO self.datetime_format = "%d-%b-%Y %H:%M:%S" #start an XML logger log "Starting XMLLogger..." #log calls the parent method "log" in CoreLogger class @logfile = File.new(xmlFileName, "w") @logfile.puts "" @logfile.puts "" end #hackish method to log results without aid of REXML or other XML Ruby tools def log_results(name, input, expected, test_status) log("XML file output: Test case" + name + " input: " + input + " expected: " + expected + " status: " + test_status) @logfile.puts'' @logfile.puts test_status @logfile.puts"" end #hack to close the tag and the file def end_log @logfile.puts"" @logfile.close end end Here is a test file that uses it. Most of the logging goes to the core logger text file. In the results, the call to log_results logs results in the XML file. This is "google_logger.rb": #includes require 'watir' # the controller include Watir #test::unit includes require 'test/unit' require 'test/unit/ui/console/testrunner' #logger includes require 'example_logger' class TC_google_logging < Test::Unit::TestCase def start #open the IE browser $ie = IE.new filePrefix = "google_logging" #create a logger by calling the static method in LoggerFactory $logger = LoggerFactory.start_xml_logger(filePrefix) $ie.set_logger($logger) end def test_a_simplesearch #call start method... start #fires up the IE browser and a logger object #variables test_site = 'http://www.google.com' # $logger.log("") $logger.log("## Beginning of test: Google search") #logs only to corelogger file $logger.log("Step 1: Go to the Google site: www.google.com") $ie.goto(test_site) $logger.log(" Action: entered " + test_site + " in the address bar.") $logger.log("Step 2: Enter 'pickaxe' in the search text field") $ie.text_field(:name, "q").set("pickaxe") $logger.log(" Action: entered pickaxe in the search field") $logger.log("Step 3: Click the 'Google Search' button") $ie.button(:name, "btnG").click $logger.log(" Action: clicked the Google Search button.") $logger.log("Expected Result: ") $logger.log(" - A Google page with results should be shown. 'Programming Ruby' should be high on the list.") $logger.log("Actual Result: Check that the 'Programming Ruby' link actually appears on the page by using an assertion") begin assert($ie.contains_text("Programming Ruby") ) $logger.log("Passed. Found test string 'Programming Ruby' ") $logger.log_results("test_a_simplesearch", "pickaxe", "Programming Ruby", "TEST PASSED.") #logs to both the XML file and corelogger rescue => e $logger.log("*FAILED*." + e.message + "\n" + e.backtrace.join("\n")) $logger.log_results("test_a_simplesearch", "pickaxe", "Programming Ruby", "TEST FAILED.") #logs to both the XML file and corelogger end $logger.log "## End of test: google search\n" end # end of test_simplesearch def test_b_googlenews #variables test_site = 'http://news.google.com' $logger.log("## Beginning of test: Google News") $logger.log("Step 1: go to the Google news site: news.google.com") $ie.goto(test_site) $logger.log(" Action: entered " + test_site + " in the address bar.") $logger.log("Step 2: Select Canada from the Top Stories drop-down list") $ie.select_list( :index , 1).select("Canada English") $logger.log(" Action: selected Canada from the drop-down list.") $logger.log("Step 3: click the 'Go' button") $ie.button(:caption, "Go").click $logger.log(" Action: clicked the Go button.") $logger.log("Expected Result: ") $logger.log(" - The Google News Canada site should be displayed") $logger.log(" Actual Result: Check that 'Canada' appears on the page by using an assertion") begin assert($ie.contains_text("Canada") ) $logger.log("TEST PASSED. Found test string 'Canada' ") $logger.log_results("test_b_googlenews", "Canada English", "Canada", "TEST PASSED.") #logs to both the XML file and corelogger rescue => e $logger.log("TEST FAILED." + e.message + "\n" + e.backtrace.join("\n")) $logger.log_results("test_b_googlenews", "Canada English", "Canada", "TEST FAILED.") #logs to both the XML file and corelogger end $logger.log '## End of test: Google news selection' $logger.end_log #close XML log file end # end of test_googlenews end #end of class TC_google_logging -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050322/545cd7c4/attachment.html From bret at pettichord.com Wed Mar 23 10:13:28 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 23 Mar 2005 09:13:28 -0600 Subject: [Wtr-general] http authentication question & general callforsuggestions In-Reply-To: <005b01c52f48$77602e70$6400a8c0@NewDell> References: <20050322204701.BEFK3408.priv-edtnes56.telusplanet.net@tintin> Message-ID: <5.1.0.14.2.20050323091239.035d6520@127.0.0.1> At 07:34 PM 3/22/2005, Paul Rogers wrote: >Unfortunaetly I still havent figured out a way to easily add it to cvs. I just updated the rdoc in cvs using eclipse. It was pretty painless. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Mar 23 10:16:19 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 23 Mar 2005 09:16:19 -0600 Subject: [Wtr-general] gem In-Reply-To: References: <005d01c52f49$10a983b0$6400a8c0@NewDell> <005b01c52f48$77602e70$6400a8c0@NewDell> <005d01c52f49$10a983b0$6400a8c0@NewDell> Message-ID: <5.1.0.14.2.20050323091526.0308bcc8@127.0.0.1> At 04:05 AM 3/23/2005, Chris McGrath wrote: >Is there any thoughts about making watir a gem? That way the docs >would be available on the http://localhost:8808 when gem_server is >started. > >Chris We would love to see this, but i don't think any of us have figured out how to make a gem yet. Do you know? _____________________ Bret Pettichord www.pettichord.com From Mark_Cain at rl.gov Wed Mar 23 13:52:53 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Wed, 23 Mar 2005 10:52:53 -0800 Subject: [Wtr-general] Qustion about a Possible Problem Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04E154E93@EX5V.rl.gov> I am fairly new to Ruby and so if this is one of those 'Stupid Question' please forgive with me. I was looking at the WinClicker.rd and the following three lines of code had everything past 'if /' commented out-at least the SciTE editor indicated they we comments. Line 194: if / #{winclass} / =~ rs[1].to_s Line 208: if / #{title} / =~ textCaption[1].to_s Line 325: if / #{childCaption} / =~ textCaption[1].to_s then Shouldn't the '#{...}' section in the between the '/../' be in quotes? E.g. if / "#{winclass}" / =~ rs [1].to_s if / "#{title}" / =~ textCaption[1].to_s if / "#{childCaption}" / =~ textCaption[1].to_s then I couldn't get 'getWindowHandle' to work-could this be why? Thanks, ____________________ Mark L. Cain LMIT - E*STARS(r) ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99352 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050323/ebf62608/attachment.html From paul.rogers at shaw.ca Wed Mar 23 15:26:54 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 23 Mar 2005 13:26:54 -0700 Subject: [Wtr-general] http authentication question & generalcallforsuggestions In-Reply-To: <5.1.0.14.2.20050323091239.035d6520@127.0.0.1> Message-ID: <003f01c52fe6$a7274780$6400a8c0@NewDell> Does it add the newly created files? The command line cvs tells me that a rdoc directory already exists and stops. SO I had no way of adding th emultiple new files in many sub-dirs. This is an easy fix ! Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 23 March 2005 08:13 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] http authentication question & generalcallforsuggestions At 07:34 PM 3/22/2005, Paul Rogers wrote: >Unfortunaetly I still havent figured out a way to easily add it to cvs. I just updated the rdoc in cvs using eclipse. It was pretty painless. _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Wed Mar 23 15:31:25 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 23 Mar 2005 13:31:25 -0700 Subject: [Wtr-general] Qustion about a Possible Problem In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04E154E93@EX5V.rl.gov> Message-ID: <004101c52fe7$48b0e2f0$6400a8c0@NewDell> the /#[xxxx}/ is making the supplied string into a reg exp. that winclicker code is really rough, Im not at all surprised it didnt work! -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 23 March 2005 11:53 To: wtr-general at rubyforge.org Subject: [Wtr-general] Qustion about a Possible Problem I am fairly new to Ruby and so if this is one of those 'Stupid Question' please forgive with me. I was looking at the WinClicker.rd and the following three lines of code had everything past 'if /' commented out-at least the SciTE editor indicated they we comments. Line 194: if / #{winclass} / =~ rs[1].to_s Line 208: if / #{title} / =~ textCaption[1].to_s Line 325: if / #{childCaption} / =~ textCaption[1].to_s then Shouldn't the '#{.}' section in the between the '/../' be in quotes? E.g. if / "#{winclass}" / =~ rs [1].to_s if / "#{title}" / =~ textCaption[1].to_s if / "#{childCaption}" / =~ textCaption[1].to_s then I couldn't get 'getWindowHandle' to work-could this be why? Thanks, ____________________ Mark L. Cain LMIT - E*STARSR ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99352 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050323/3f592d77/attachment.html From wmamed at comcast.net Wed Mar 23 15:50:13 2005 From: wmamed at comcast.net (wmamed at comcast.net) Date: Wed, 23 Mar 2005 20:50:13 +0000 Subject: [Wtr-general] popups & clicker Message-ID: <032320052050.29545.4241D684000BB6DC0000736922069997350B0A030E0399@comcast.net> Greetings! Four weeks creating Wtr scripts part-time and I already used them as the core tests after deployment to production last weekend... Stable, repeatable, increased test coverage and a timesaver!! Keep up the great work! Revisiting the popups and clicker posts from December and early March. I have the individual pieces working but not when run together. It appears to me that when I initiate the clicker.rb it is running in the foreground, completes and then returns to main.rb which invokes the 'confirm' button to initiate the popup dialogue box. Is there a step I am missing to invoke the clicker.rb as a background task so that the main.rb can continue as a foregound process? MAIN.RB # using popups_test.rb as a reference $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'unittests/setup' require 'watir/winClicker' class TC_PopUps < Test::Unit::TestCase include Watir def gotoPopUpPage() $ie.goto("file://#{$myDir}/html/popups1.html") end def test_confirm gotoPopUpPage() w = WinClicker.new w.winsystem('clicker.rb') $ie.button("Confirm").click assert( $ie.textField(:name , "confirmtext").verify_contains("OK") ) end end CLICKER.RB $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'watir/winClicker' puts " *** clicker ready to sleep.." sleep 5 puts " *** clicker waking up..." w = WinClicker.new handle = w.getWindowHandle("Microsoft Internet Explorer") puts "This is handle value", handle w.makeWindowActive(handle) w.clickWindowsButton_hwnd(handle, "OK") OUTPUT: C:\watir_bonus\unitTests>popup1 Loaded suite C:/watir_bonus/unitTests/popup1 Started *** clicker ready to sleep.. *** clicker waking up... getWindowHandle - looking for: Microsoft Internet Explorer . . . Found Window with correct caption (Test page for pop ups - Microsoft Internet Ex plorer hwnd=1180316) This is handle value 1180316 Found window: WorkerW Handle: 4588012 Caption = clickWindowsButton: handle for button: OK is 4588012 posting mesage return 1 458801224500 how is a string - Confirm . Finished in 12.879 seconds. 1 tests, 1 assertions, 0 failures, 0 errors C:\watir_bonus\unitTests> If I initiate main.rb (with clicker commented out) and initiate clicker.rb manually while the popup is visible, all works fine. Thanks in advance, Walt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050323/558be03a/attachment.html From paul.rogers at shaw.ca Wed Mar 23 16:18:51 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 23 Mar 2005 14:18:51 -0700 Subject: [Wtr-general] popups & clicker In-Reply-To: <032320052050.29545.4241D684000BB6DC0000736922069997350B0A030E0399@comcast.net> Message-ID: <005001c52fed$eb43f060$6400a8c0@NewDell> If you add that comment about "4 weeks and now being used for core tests" to our testimonital page ( http://wtr.rubyforge.org/wiki/wiki.pl?WatirTestimonials ) I'll tell you the answer! ok, I'll tell you anyway: chane this line w.winsystem('clicker.rb') to w.winsystem('start clicker.rb') it will now launch as a new process Glad you like Watir Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of wmamed at comcast.net Sent: 23 March 2005 13:50 To: wtr-general at rubyforge.org Subject: [Wtr-general] popups & clicker Greetings! Four weeks creating Wtr scripts part-time and I already used them as the core tests after deployment to production last weekend... Stable, repeatable, increased test coverage and a timesaver!! Keep up the great work! Revisiting the popups and clicker posts from December and early March. I have the individual pieces working but not when run together. It appears to me that when I initiate the clicker.rb it is running in the foreground, completes and then returns to main.rb which invokes the 'confirm' button to initiate the popup dialogue box. Is there a step I am missing to invoke the clicker.rb as a background task so that the main.rb can continue as a foregound process? MAIN.RB # using popups_test.rb as a reference $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'unittests/setup' require 'watir/winClicker' class TC_PopUps < Test::Unit::TestCase include Watir def gotoPopUpPage() $ie.goto("file://#{$myDir}/html/popups1.html") end def test_confirm gotoPopUpPage() w = WinClicker.new w.winsystem('clicker.rb') $ie.button("Confirm").click assert( $ie.textField(:name , "confirmtext").verify_contains("OK") ) end end CLICKER.RB $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'watir/winClicker' puts " *** clicker ready to sleep.." sleep 5 puts " *** clicker waking up..." w = WinClicker.new handle = w.getWindowHandle("Microsoft Internet Explorer") puts "This is handle value", handle w.makeWindowActive(handle) w.clickWindowsButton_hwnd(handle, "OK") OUTPUT: C:\watir_bonus\unitTests>popup1 Loaded suite C:/watir_bonus/unitTests/popup1 Started *** clicker ready to sleep.. *** clicker waking up... getWindowHandle - looking for: Microsoft Internet Explorer . . . Found Window with correct caption (Test page for pop ups - Microsoft Internet Ex plorer hwnd=1180316) This is handle value 1180316 Found window: WorkerW Handle: 4588012 Caption = clickWindowsButton: handle for button: OK is 4588012 posting mesage return 1 458801224500 how is a string - Confirm . Finished in 12.879 seconds. 1 tests, 1 assertions, 0 failures, 0 errors C:\watir_bonus\unitTests> If I initiate main.rb (with clicker commented out) and initiate clicker.rb manually while the popup is visible, all works fine. Thanks in advance, Walt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050323/e13ab13a/attachment.html From paul.rogers at shaw.ca Wed Mar 23 16:33:29 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 23 Mar 2005 14:33:29 -0700 Subject: [Wtr-general] Clicker replacement Message-ID: <005c01c52fef$f4903d70$6400a8c0@NewDell> On comp.lang.ruby good things are being said about autoit http://groups.google.ca/groups?hl=en&lr=&safe=off&threadm=TtKdnQ6LaLn4xd zfSa8jmw%40karoo.co.uk&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26oe% 3DUTF-8%26group%3Dcomp.lang.ruby http://www.autoitscript.com/autoit3/index.php Does anyone have time to create a wrapper for us to try out as a replacement for the clickers? Paul From lorenzo_jorquera at yahoo.com Wed Mar 23 19:43:25 2005 From: lorenzo_jorquera at yahoo.com (Lorenzo Jorquera) Date: Wed, 23 Mar 2005 18:43:25 -0600 (CST) Subject: [Wtr-general] Fixed nested tables unittest Message-ID: <20050324004325.82024.qmail@web21327.mail.yahoo.com> I've fixed the code to make the failing test work , using John Lloyd-Jones code. There were 3 other failing test, not related to tables: 1) Error: test_page_nostatus(TC_JSEvents): NameError: uninitialized constant Watir::IE::NoStatusBarException ./watir.rb:323:in `status' ./unittests/js_events_test.rb:47:in `test_page_nostatus' 2) Error: test_page_status(TC_JSEvents): NameError: uninitialized constant Watir::IE::NoStatusBarException ./watir.rb:323:in `status' ./unittests/js_events_test.rb:59:in `test_page_status' 3) Error: test_newWindows(TC_Links): NoMethodError: undefined method `title' for nil:NilClass ./unittests/newWindow_test.rb:15:in `test_newWindows' --------------------------------- Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050323/7fe3e3bf/attachment.html From john.lloydjones at gmail.com Wed Mar 23 20:05:51 2005 From: john.lloydjones at gmail.com (John Lloyd-Jones) Date: Wed, 23 Mar 2005 17:05:51 -0800 Subject: [Wtr-general] Fixed nested tables unittest In-Reply-To: <20050324004325.82024.qmail@web21327.mail.yahoo.com> References: <20050324004325.82024.qmail@web21327.mail.yahoo.com> Message-ID: <6fcd26f10503231705737e5b1f@mail.gmail.com> Lorenzo Good, but as far as I can see, there are still unresolved issues: def row_count raise UnknownTableException , "Unable to locate a table using #{@how} and #{@what} " if @o == nil return table_body.children.length end will return the number of children to the element returned by table_body: def table_body return @o.children(0) end Alas, this is based on the broken assuption that the tbody element is the first child of the table. In fact, a table may have a caption, a tfoot and a thead element (or all of the above try this test page: ) as it's first child element. Another point is that the to_a method assumes that the row contains only TD elements, so it will skip row headers (which will properly use a TH tag). John From wmamed at comcast.net Wed Mar 23 22:14:03 2005 From: wmamed at comcast.net (Walter Mamed) Date: Wed, 23 Mar 2005 21:14:03 -0600 Subject: [Wtr-general] popups & clicker Message-ID: <000501c5301f$88e0a3f0$6501a8c0@TopGun> Paul, Thanks for the solution - now I can automate my test case cleanup :^) Walt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050323/71c28fd2/attachment.html From jfry at lyris.com Thu Mar 24 01:54:19 2005 From: jfry at lyris.com (Jeff Fry) Date: Wed, 23 Mar 2005 22:54:19 -0800 Subject: [Wtr-general] http authentication question In-Reply-To: <4240B6D9.2080801@lyris.com> References: <4240901C.2000608@lyris.com> <20050322214134.SSDX29734.priv-edtnes28.telusplanet.net@tintin> <72799cd7050322143162914701@mail.gmail.com> <4240B6D9.2080801@lyris.com> Message-ID: <4242641B.7070308@lyris.com> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050323/40ac7165/attachment.html From c.r.mcgrath at gmail.com Thu Mar 24 05:15:39 2005 From: c.r.mcgrath at gmail.com (Chris McGrath) Date: Thu, 24 Mar 2005 10:15:39 +0000 Subject: [Wtr-general] gem In-Reply-To: <5.1.0.14.2.20050323091526.0308bcc8@127.0.0.1> References: <005b01c52f48$77602e70$6400a8c0@NewDell> <005d01c52f49$10a983b0$6400a8c0@NewDell> <5.1.0.14.2.20050323091526.0308bcc8@127.0.0.1> Message-ID: Well, I've got the pickaxe book with it's gem chapter, but I've never created a gem before. It is on my list of things to try, and I wouldn't mind doing it for watir. However, I know I'll not have time to even start looking at it for a few weeks . If is still not done by then I'll try and pick it up. The gems chapter in pickaxe is actually available online, and includes how to make a gem. http://www.pragmaticprogrammer.com/titles/ruby/gems.pdf Cheers, Chris On Wed, 23 Mar 2005 09:16:19 -0600, Bret Pettichord wrote: > At 04:05 AM 3/23/2005, Chris McGrath wrote: > >Is there any thoughts about making watir a gem? That way the docs > >would be available on the http://localhost:8808 when gem_server is > >started. > > > >Chris > > We would love to see this, but i don't think any of us have figured out how > to make a gem yet. Do you know? > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From wkruse at sars.gov.za Thu Mar 24 05:23:17 2005 From: wkruse at sars.gov.za (Walter Kruse) Date: Thu, 24 Mar 2005 12:23:17 +0200 Subject: [Wtr-general] Radio button name Message-ID: <373AA889F642934D8983245F7A514588B1D49F@gaptarcbnt00002.sars.prod> Hi guys, Thanks for a wonderful tool ! I have been using SAMIE a lot, and am actually now learning Ruby, so that I can have a closer look at Watir and Systir. The use of open-source test tools is still in its infancy here in South Africa, and while we have a vibrant testing industry, I consider myself somewhat of a pioneer in the use of homebrewed test automation. One little problem I require assistance with, please. The page has two radio buttons, one selected by default. How do I check the other one ? Here is the source. Using $ie.radio(:name, "radUserType").set selects the default one, While $ie.radio(:name, "radUserType_1").set gives: c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1959:in `assert_exists': Unable to locate a radio button using name and radUserType_1 (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1997:in `set' from watir_KPE.rb:4 krgds Walter Kruse Senior test analyst Test and Data Services 082 660 7288 http://www.ou-ryperd.net From wkruse at sars.gov.za Thu Mar 24 05:58:09 2005 From: wkruse at sars.gov.za (Walter Kruse) Date: Thu, 24 Mar 2005 12:58:09 +0200 Subject: [Wtr-general] Radio button name Message-ID: <373AA889F642934D8983245F7A514588B1D4A1@gaptarcbnt00002.sars.prod> You reminded me to read the source when I get stuck....it's well commented too. I am CC'ing the list so they can see that my question was answered, thanks Zeljko. -----Original Message----- From: Zeljko Filipin [mailto:zeljko.filipin at tkoznazna.hr] Sent: 24 March 2005 12:53 To: 'Walter Kruse' Subject: RE: [Wtr-general] Radio button name I am also new in Watir, so I know how it is to get stuck. :) I will post my first reply to Wtr-general in some time, I have trided it before, but it did not work, so I sent it to you directly. _____ From: Walter Kruse [mailto:wkruse at sars.gov.za] Sent: Thursday, March 24, 2005 11:49 AM To: Zeljko Filipin Subject: RE: [Wtr-general] Radio button name Fantastic, thanks Zeljko. -----Original Message----- From: Zeljko Filipin [mailto:zeljko.filipin at tkoznazna.hr] Sent: 24 March 2005 12:48 To: wkruse at sars.gov.za Subject: RE: [Wtr-general] Radio button name I have tried this and it worked. :) ie.radio(:id, 'radUserType_1').set This is from watir.rb # The ways that are available to identify an html object depend upon the object type. # :id used for an object that has an ID attribute -- this is the best way! # :name used for an object that has a name attribute. # :value value of text fields, captions of buttons # :index finds the nth object of the specified type - eg button(:index , 2) finds the second button. This is 1 based.
Zeljko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050324/2c4a4ac5/attachment.html From zeljko.filipin at tkoznazna.hr Thu Mar 24 05:59:35 2005 From: zeljko.filipin at tkoznazna.hr (=?iso-8859-2?Q?=AEeljko_Filipin?=) Date: Thu, 24 Mar 2005 11:59:35 +0100 Subject: [Wtr-general] Radio button name In-Reply-To: <373AA889F642934D8983245F7A514588B1D49F@gaptarcbnt00002.sars.prod> Message-ID: <200503241059.j2OAx7AI030432@ls413.htnet.hr> I have tried this and it worked. :) ie.radio(:id, 'radUserType_1').set This is from watir.rb # The ways that are available to identify an html object depend upon the object type. # :id used for an object that has an ID attribute -- this is the best way! # :name used for an object that has a name attribute. # :value value of text fields, captions of buttons # :index finds the nth object of the specified type - eg button(:index , 2) finds the second button. This is 1 based.
Zeljko From bret at pettichord.com Thu Mar 24 06:14:32 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 24 Mar 2005 05:14:32 -0600 Subject: [Wtr-general] gem In-Reply-To: References: <5.1.0.14.2.20050323091526.0308bcc8@127.0.0.1> <005b01c52f48$77602e70$6400a8c0@NewDell> <005d01c52f49$10a983b0$6400a8c0@NewDell> <5.1.0.14.2.20050323091526.0308bcc8@127.0.0.1> Message-ID: <5.1.0.14.2.20050324051405.012bc690@127.0.0.1> At 04:15 AM 3/24/2005, Chris McGrath wrote: >I wouldn't mind doing it for watir. That would be great. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Mar 24 07:51:37 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 24 Mar 2005 06:51:37 -0600 Subject: [Wtr-general] typing speed Message-ID: <5.1.0.14.2.20050324064901.031a14c8@127.0.0.1> Paul, I turned typing speed to 0, but text entry was still pretty slow. I'm inclined to change the TextField#set code (namely doKeyPress) to skip the the character by character text entry when speed is 0. Our tests are running painfully slow even still. Is there a problem with this. I see the calls to javascript events and all the calls to wait. Why would these ever be necessary? Bret _____________________ Bret Pettichord www.pettichord.com From c.r.mcgrath at gmail.com Thu Mar 24 09:34:49 2005 From: c.r.mcgrath at gmail.com (Chris McGrath) Date: Thu, 24 Mar 2005 14:34:49 +0000 Subject: [Wtr-general] gem In-Reply-To: <5.1.0.14.2.20050324051405.012bc690@127.0.0.1> References: <005b01c52f48$77602e70$6400a8c0@NewDell> <005d01c52f49$10a983b0$6400a8c0@NewDell> <5.1.0.14.2.20050323091526.0308bcc8@127.0.0.1> <5.1.0.14.2.20050324051405.012bc690@127.0.0.1> Message-ID: I'll do my best to get to it as soon as I can. Chris On Thu, 24 Mar 2005 05:14:32 -0600, Bret Pettichord wrote: > At 04:15 AM 3/24/2005, Chris McGrath wrote: > >I wouldn't mind doing it for watir. > > That would be great. > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From christopher.mcmahon at gmail.com Thu Mar 24 14:07:49 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 24 Mar 2005 13:07:49 -0600 Subject: [Wtr-general] logging take 1 In-Reply-To: <20050323025435.XIFD25189.priv-edtnes51.telusplanet.net@tintin> References: <20050323025435.XIFD25189.priv-edtnes51.telusplanet.net@tintin> Message-ID: <72799cd705032411072c82fa54@mail.gmail.com> On Tue, 22 Mar 2005 19:56:10 -0700, Jonathan Kohl wrote: > This is a simple logger to do some bare bones XML logging, while logging > everything to a text file. I'm not terribly happy with the way I worked it > in with test::unit. Hi Jonathan... Is your cut at XML logging going to be checked in on Rubyforge? Conveniently enough, I need to get some XML logging going for a project of my own, and I wanted to steal the latest and greatest...=) -Chris From jkohl at telusplanet.net Thu Mar 24 14:20:38 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Thu, 24 Mar 2005 11:20:38 -0800 Subject: [Wtr-general] logging take 1 In-Reply-To: <72799cd705032411072c82fa54@mail.gmail.com> References: <20050323025435.XIFD25189.priv-edtnes51.telusplanet.net@tintin> <72799cd705032411072c82fa54@mail.gmail.com> Message-ID: <1111692038.424313069eb8e@webmail.telus.net> > Hi Jonathan... > Is your cut at XML logging going to be checked in on Rubyforge? > Conveniently enough, I need to get some XML logging going for a > project of my own, and I wanted to steal the latest and greatest...=) > -Chris I could make a logging folder in "examples" if you like. I've been working with REXML, so when I have something with that I'll post it as well. -Jonathan From christopher.mcmahon at gmail.com Thu Mar 24 14:31:02 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 24 Mar 2005 13:31:02 -0600 Subject: [Wtr-general] logging take 1 In-Reply-To: <1111692038.424313069eb8e@webmail.telus.net> References: <20050323025435.XIFD25189.priv-edtnes51.telusplanet.net@tintin> <72799cd705032411072c82fa54@mail.gmail.com> <1111692038.424313069eb8e@webmail.telus.net> Message-ID: <72799cd70503241131170c76f1@mail.gmail.com> > I could make a logging folder in "examples" if you like. I've been working with > REXML, so when I have something with that I'll post it as well. If you don't mind adding to the examples folder, that would be really convenient. Thanks! -Chris From jkohl at telusplanet.net Thu Mar 24 14:54:09 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Thu, 24 Mar 2005 11:54:09 -0800 Subject: [Wtr-general] logging take 1 In-Reply-To: <72799cd70503241131170c76f1@mail.gmail.com> References: <20050323025435.XIFD25189.priv-edtnes51.telusplanet.net@tintin> <72799cd705032411072c82fa54@mail.gmail.com> <1111692038.424313069eb8e@webmail.telus.net> <72799cd70503241131170c76f1@mail.gmail.com> Message-ID: <1111694049.42431ae156990@webmail.telus.net> > If you don't mind adding to the examples folder, that would be really > convenient. Thanks! ok, I'll try and do that tonight. -Jonathan From paul.rogers at shaw.ca Thu Mar 24 20:47:30 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 24 Mar 2005 18:47:30 -0700 Subject: [Wtr-general] http authentication question In-Reply-To: <4242641B.7070308@lyris.com> Message-ID: <002401c530dc$9b75e3a0$6400a8c0@NewDell> I would guess the reason it 'spins' is that ie is waiting for the pop up to clear, ruby is waiting for the browser to continue, and the thing that gets rid of the pop up hasnt been called. You probably need the au3 lines ( marked up below) to be in a new thread or process Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Fry Sent: 23 March 2005 23:54 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] http authentication question Chris McMahon wrote: Watir comes with Winclickers which we have used for some of these windows, but if I recall, it isn't as simple as the other windows to deal with. I know there was a question about this a few days ago and Paul was looking into it. So I don't think there is a solution for this yet. Someone else can chime in if they have a fix for it. As of now, the fix is to integrate AutoIT or Perl's Win32::GuiTest or VBScript SendKeys functions with your WATIR tests. We're looking hard for somebody willing to port Perl's Win32::GuiTest module to Ruby. It's non-trivial, but would make WATIR a lot more powerful. -Chris Hmmm, I can now get AutoIT (running solo) to handle the login window, and am hoping someone here can help me to integrate my code into my watir script. If I bring up the login page manually, the following works perfectly as a .au3 file (finding the right window even when it is not the active window and sucessfully logging me on): AU3: WinActivate("Connect to clio.lyris.com") Send("user{TAB}password{ENTER}") On the otherhand, when I run this, I get to the authentication popup, but then it just spins and never seems to engage the popup: require 'watir' include Watir require 'test/unit' require 'win32ole' class TC_view_members < Test::Unit::TestCase def test_check_members au3 = WIN32OLE.new("AutoItX3.Control") # pmr try a new thread or process??? ie = Watir::IE.start('http://clio.lyris.com') au3.WinActivate("Connect to clio.lyris.com") # pmr try a new thread or process??? # au3.WinWaitActive("Connect to clio.lyris.com","",5) # tried this before & after WinActivate to see if it would help au3.send("user{TAB}password{ENTER}") end end I suspect that I am missing something basic (re:watir or re:autoit integration) but I can't spot it right now. As an aside, I tried Chris Morris's suggestion to sidestep this for now by logging in with http://clio.lyris.com at user:password/ or http://user:password at clio.lyris.com/ . For some reason, I can't get that to work. Thanks again for the help. Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050324/b5483f59/attachment.html From paul.rogers at shaw.ca Thu Mar 24 20:52:26 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 24 Mar 2005 18:52:26 -0700 Subject: [Wtr-general] typing speed In-Reply-To: <5.1.0.14.2.20050324064901.031a14c8@127.0.0.1> Message-ID: <002901c530dd$4bf23f80$6400a8c0@NewDell> You could conceivably have a page reload on a javascript onKeyPressEvent: