From alex at verk.info Wed Feb 1 22:53:13 2006 From: alex at verk.info (Alexey Verkhovsky) Date: Wed, 01 Feb 2006 20:53:13 -0700 Subject: [Wtr-general] Anyone use Test::Unit::Reporter? Fwd: Help with File.join(File.dirname(__FILE__), '..') ? In-Reply-To: <72799cd70601311217h757f0d0bk347dc7ef4c42fca2@mail.gmail.com> References: <72799cd70601301337y444c7299vcc0f9ee8b5df29f2@mail.gmail.com> <43DEDBF8.1000906@verk.info> <72799cd70601302002l7fa0aec3g11e6d3bb157f1151@mail.gmail.com> <72799cd70601311217h757f0d0bk347dc7ef4c42fca2@mail.gmail.com> Message-ID: <43E18229.8000207@verk.info> Chris McMahon wrote: >Seriously, I thought I might have missed some sort of super-brainless >CruiseControl integration. I'm definitely going to be studying on >Reporter in the very near future. > Chris, In terms of CruiseControl connection, it should be entirely brainless, because I wrote it for CruiseControl connection, and used it that way. The Reporter produces XML output conforming to the same schema as JUnit. You treat it exactly the same way as you do JUnit output. It's putting the test suite together that is a little more complicated than it should be - you need to actually assemble a TestSuite object, can't just write a list of require statements in a file. I've also heard that there is a "require 'stringio'" missing, and README has some wrong (in fact, obsolete) module names. All going well, weather permitting, you should be able to figure it all out in under an hour. If you get it working, please at least write some "how-to". Apparently, I'm going to need the same thing soon :))) Best regards, Alex From bret at pettichord.com Wed Feb 1 00:43:13 2006 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 31 Jan 2006 23:43:13 -0600 Subject: [Wtr-general] My Tab Click problem In-Reply-To: <20060201012551.1632.qmail@web42108.mail.yahoo.com> References: <20060201012551.1632.qmail@web42108.mail.yahoo.com> Message-ID: I suggest you email us the entire html for the page, possibly as an attachment. On 1/31/06, Gavazn Vahshi wrote: > > Hi All, > > I went through the recent email thread for the tab > click problem, but unfortunately was unable to solve > my problem. I'm knida new to Ruby and Watir and any > help is greatly appreciated. > > It's about a JS pop-up wizard with 4 tabs which opens > up when I click on a gif image in main UI. > > HTML source for the wizard looks like this (... > instead of some tags & extras): > > border='0'... >
class='tsc' border='0' cellpadding... > title_for_tab1
height='19'>... class='sel' style='background...>... href='#?ctrl=pstabset&action=TabClick¶m=tab1'> > title_for_tab2 height='19'>... class='unsel' style...>... href='#?ctrl=pstabset&action=TabClick¶m=tab2'> > ... (total of 4 tabs on page) >
> > For my testing purposes I need to click on each tab > and visit each page. There're some text fields that I > need to modify. > > Thanks in advance, > gavazn > > __________________________________________________ > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060131/e14051a0/attachment.html From buggins at byte-force.com Wed Feb 1 04:55:16 2006 From: buggins at byte-force.com (Yury Krasavin) Date: Wed, 1 Feb 2006 12:55:16 +0300 Subject: [Wtr-general] Anyone use Test::Unit::Reporter? Fwd: Help with File.join(File.dirname(__FILE__), '..') ? In-Reply-To: Message-ID: <001501c62715$9afd0ef0$5864bbd5@byteforce.yar.ru> > It's putting the test suite together that is a little more > complicated > than it should be - you need to actually assemble a TestSuite object, > can't just write a list of require statements in a file. > I've also heard that there is a "require 'stringio'" missing, > and README > has some wrong (in fact, obsolete) module names. > > If you get it working, please at least write some "how-to". > Apparently, > I'm going to need the same thing soon :))) > > Best regards, > Alex Hi, Alexey. I was previously asked here to give a sample of usage of the Reporter. So I did it in my blog: http://blogs.byte-force.com/buggins/archive/2005/11/29/704.aspx Reporter, as it is now, seems to suppose replacement of the autorunner. I didn't like the idea. I would prefer to call runner implicitly, because running test for xml is not really a common case. Although I haven't assembled a TestSuite in my sample runner. Cases executed in random order are enough for me. So I left it simplest yet. Best regards, Yury From carl.l.shaulis at convergys.com Wed Feb 1 08:47:46 2006 From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com) Date: Wed, 1 Feb 2006 07:47:46 -0600 Subject: [Wtr-general] method In-Reply-To: Message-ID: Hi Gina, Something like this should give you a start. # Creates the array of elements in the list myList = ie2.select_list(:name, "").getAllContents # Prints the elements in the list puts connections[1] puts connections[2] puts connections[3] puts connections[4] puts connections[5] puts connections[6] puts connections[7] puts connections[8] puts connections[9] puts connections[10] puts connections[11] puts connections[12] puts connections[13] # Asserts that specific values are present assert(connections.include?("")) assert(connections.include?("")) assert_false(connections.include?("")) Good luck! Carl L. Shaulis Convergys - Senior Analyst "Rexhina Alickolli" Sent by: cc wtr-general-bounc es at rubyforge.org Subject [Wtr-general] method 01/31/2006 04:07 PM Please respond to wtr-general at rubyf orge.org How can I verify the presence of an item in an item list (checklist/dropdown list etc)? I am trying to find the method but no being successful. Thanks-- gina _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From carl.l.shaulis at convergys.com Wed Feb 1 08:49:19 2006 From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com) Date: Wed, 1 Feb 2006 07:49:19 -0600 Subject: [Wtr-general] method In-Reply-To: Message-ID: Sorry I forgot to edit the print statements! Probably obvious, but they should be puts myList[1] etc... Carl L. Shaulis Convergys - Senior Analyst Carl L Shaulis/CIMG/CVG To 02/01/2006 07:47 wtr-general at rubyforge.org AM cc Subject Re: [Wtr-general] method(Document link: Carl L Shaulis) Hi Gina, Something like this should give you a start. # Creates the array of elements in the list myList = ie2.select_list(:name, "").getAllContents # Prints the elements in the list puts connections[1] puts connections[2] puts connections[3] puts connections[4] puts connections[5] puts connections[6] puts connections[7] puts connections[8] puts connections[9] puts connections[10] puts connections[11] puts connections[12] puts connections[13] # Asserts that specific values are present assert(connections.include?("")) assert(connections.include?("")) assert_false(connections.include?("")) Good luck! Carl L. Shaulis Convergys - Senior Analyst "Rexhina Alickolli" Sent by: cc wtr-general-bounc es at rubyforge.org Subject [Wtr-general] method 01/31/2006 04:07 PM Please respond to wtr-general at rubyf orge.org How can I verify the presence of an item in an item list (checklist/dropdown list etc)? I am trying to find the method but no being successful. Thanks-- gina _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From gavazn at yahoo.com Wed Feb 1 12:40:55 2006 From: gavazn at yahoo.com (Gavazn Vahshi) Date: Wed, 1 Feb 2006 09:40:55 -0800 (PST) Subject: [Wtr-general] My Tab Click problem In-Reply-To: <003701c626e5$a62078b0$0902a8c0@Koko> Message-ID: <20060201174055.4577.qmail@web42109.mail.yahoo.com> I can't select another tab, don't know how to do it here. Well when the wizard opens up, it defaults to the first tab. From there I'm unable to select tabs for other pages. For instance if I want to modify stuff on the 2nd tab, I'd rather click on the tab in order to see it's content. -gavazn --- Michael Bolton wrote: > What is the problem that you were unable to solve? > > ---Michael B. > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf > Of Gavazn Vahshi > Sent: January 31, 2006 8:26 PM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] My Tab Click problem > > Hi All, > > I went through the recent email thread for the tab > click problem, but unfortunately was unable to solve > my problem. I'm knida new to Ruby and Watir and any > help is greatly appreciated. > > It's about a JS pop-up wizard with 4 tabs which > opens > up when I click on a gif image in main UI. > > HTML source for the wizard looks like this (... > instead of some tags & extras): > > border='0'... >
class='tsc' border='0' cellpadding... > title_for_tab1
height='19'>... class='sel' style='background...>... href='#?ctrl=pstabset&action=TabClick¶m=tab1'> > title_for_tab2 height='19'>... class='unsel' style...>... href='#?ctrl=pstabset&action=TabClick¶m=tab2'> > ... (total of 4 tabs on page) >
> > For my testing purposes I need to click on each tab > and visit each page. There're some text fields that > I > need to modify. > > Thanks in advance, > gavazn > > __________________________________________________ > 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 Mark_Cain at rl.gov Wed Feb 1 13:31:37 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Wed, 1 Feb 2006 10:31:37 -0800 Subject: [Wtr-general] My Tab Click problem Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D546@EX5V.rl.gov> Is the wizard a separate window that opens? If yes then you might want to try: #e.g. usage from WATiR API # IE.attach(:url, 'www.google.com') # IE.attach(:title, 'Google') $ie.image(:src, //).click new_ie = IE.attach(:title, //i) new_ie.show_all_objects new_ie.span(:index,2).click #index for tab2 NOTE: If the window is invoked as showModalDialog then you'll need to use AutoIT. WATiR currently does not support windows invoked as showModalDialog. Hope this helps, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Gavazn Vahshi Sent: Wednesday, February 01, 2006 9:41 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] My Tab Click problem I can't select another tab, don't know how to do it here. Well when the wizard opens up, it defaults to the first tab. From there I'm unable to select tabs for other pages. For instance if I want to modify stuff on the 2nd tab, I'd rather click on the tab in order to see it's content. -gavazn --- Michael Bolton <mb at michaelbolton.net> wrote: > What is the problem that you were unable to solve? > > ---Michael B. > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf > Of Gavazn Vahshi > Sent: January 31, 2006 8:26 PM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] My Tab Click problem > > Hi All, > > I went through the recent email thread for the tab > click problem, but unfortunately was unable to solve > my problem. I'm knida new to Ruby and Watir and any > help is greatly appreciated. > > It's about a JS pop-up wizard with 4 tabs which > opens > up when I click on a gif image in main UI. > > HTML source for the wizard looks like this (... > instead of some tags & extras): > > <table id='tabs_table' cellspacing='0' class='tsc' > border='0'... > <div id='tabset_pstabset'><table cellspacing='0' > class='tsc' border='0' cellpadding... > <span>title_for_tab1</span></a></td><td > height='19'><img width...>...</td><td height='19' > class='sel' style='background...>...<a > href='#?ctrl=pstabset&action=TabClick¶m=tab1'> > <span>title_for_tab2</span></a></td><td > height='19'><img width...>...</td><td height='19' > class='unsel' style...>...<a > href='#?ctrl=pstabset&action=TabClick¶m=tab2'> > ... (total of 4 tabs on page) > </table></div> > > For my testing purposes I need to click on each tab > and visit each page. There're some text fields that > I > need to modify. > > Thanks in advance, > gavazn > > __________________________________________________ > 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 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From gavazn at yahoo.com Wed Feb 1 13:55:19 2006 From: gavazn at yahoo.com (Gavazn Vahshi) Date: Wed, 1 Feb 2006 10:55:19 -0800 (PST) Subject: [Wtr-general] My Tab Click problem In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D546@EX5V.rl.gov> Message-ID: <20060201185519.27497.qmail@web42109.mail.yahoo.com> Thanks for the input Mark, Even though a new pop-up opens up, but it's not a new window. It's more of a "div block" containing javascript that opens up. -g --- "Cain, Mark" <Mark_Cain at rl.gov> wrote: > Is the wizard a separate window that opens? If yes > then you might want > to try: > #e.g. usage from WATiR API > # IE.attach(:url, 'www.google.com') > # IE.attach(:title, 'Google') > > $ie.image(:src, /<gif image name in main UI>/).click > > new_ie = IE.attach(:title, /<Title of the new > window>/i) > > new_ie.show_all_objects > > new_ie.span(:index,2).click #index for tab2 > > NOTE: If the window is invoked as showModalDialog > then you'll need to > use AutoIT. WATiR currently does not support > windows invoked as > showModalDialog. > > Hope this helps, > > --Mark > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf > Of Gavazn Vahshi > Sent: Wednesday, February 01, 2006 9:41 AM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] My Tab Click problem > > I can't select another tab, don't know how to do it > here. > > Well when the wizard opens up, it defaults to the > first tab. From there I'm unable to select tabs for > other pages. For instance if I want to modify stuff > on the 2nd tab, I'd rather click on the tab in order > to see it's content. > > -gavazn > > --- Michael Bolton <mb at michaelbolton.net> wrote: > > > What is the problem that you were unable to solve? > > > > ---Michael B. > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On > Behalf > > Of Gavazn Vahshi > > Sent: January 31, 2006 8:26 PM > > To: wtr-general at rubyforge.org > > Subject: [Wtr-general] My Tab Click problem > > > > Hi All, > > > > I went through the recent email thread for the tab > > click problem, but unfortunately was unable to > solve > > my problem. I'm knida new to Ruby and Watir and > any > > help is greatly appreciated. > > > > It's about a JS pop-up wizard with 4 tabs which > > opens > > up when I click on a gif image in main UI. > > > > HTML source for the wizard looks like this (... > > instead of some tags & extras): > > > > <table id='tabs_table' cellspacing='0' class='tsc' > > border='0'... > > <div id='tabset_pstabset'><table cellspacing='0' > > class='tsc' border='0' cellpadding... > > <span>title_for_tab1</span></a></td><td > > height='19'><img width...>...</td><td height='19' > > class='sel' style='background...>...<a > > href='#?ctrl=pstabset&action=TabClick¶m=tab1'> > > <span>title_for_tab2</span></a></td><td > > height='19'><img width...>...</td><td height='19' > > class='unsel' style...>...<a > > href='#?ctrl=pstabset&action=TabClick¶m=tab2'> > > ... (total of 4 tabs on page) > > </table></div> > > > > For my testing purposes I need to click on each > tab > > and visit each page. There're some text fields > that > > I > > need to modify. > > > > Thanks in advance, > > gavazn > > > > __________________________________________________ > > 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 > _______________________________________________ > 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 gavazn at yahoo.com Wed Feb 1 13:59:59 2006 From: gavazn at yahoo.com (Gavazn Vahshi) Date: Wed, 1 Feb 2006 10:59:59 -0800 (PST) Subject: [Wtr-general] My Tab Click problem In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D546@EX5V.rl.gov> Message-ID: <20060201185959.87307.qmail@web42107.mail.yahoo.com> I don't know if that helps or not. When I first open the wizard (showing 1st tab) and do ie.showAllObjects, I get some stuff. Then when I click on the 2nd tab and do ie.showAllObjects I get the extra line below: hidden name=com.cc.framework.state id=com.cc.framework.state value=ctrl=pstabset;first=tab1;selected=tab2 alt= src= Is there a way to use this info to access tab2? Thanks, -g --- "Cain, Mark" <Mark_Cain at rl.gov> wrote: > Is the wizard a separate window that opens? If yes > then you might want > to try: > #e.g. usage from WATiR API > # IE.attach(:url, 'www.google.com') > # IE.attach(:title, 'Google') > > $ie.image(:src, /<gif image name in main UI>/).click > > new_ie = IE.attach(:title, /<Title of the new > window>/i) > > new_ie.show_all_objects > > new_ie.span(:index,2).click #index for tab2 > > NOTE: If the window is invoked as showModalDialog > then you'll need to > use AutoIT. WATiR currently does not support > windows invoked as > showModalDialog. > > Hope this helps, > > --Mark > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf > Of Gavazn Vahshi > Sent: Wednesday, February 01, 2006 9:41 AM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] My Tab Click problem > > I can't select another tab, don't know how to do it > here. > > Well when the wizard opens up, it defaults to the > first tab. From there I'm unable to select tabs for > other pages. For instance if I want to modify stuff > on the 2nd tab, I'd rather click on the tab in order > to see it's content. > > -gavazn > > --- Michael Bolton <mb at michaelbolton.net> wrote: > > > What is the problem that you were unable to solve? > > > > ---Michael B. > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On > Behalf > > Of Gavazn Vahshi > > Sent: January 31, 2006 8:26 PM > > To: wtr-general at rubyforge.org > > Subject: [Wtr-general] My Tab Click problem > > > > Hi All, > > > > I went through the recent email thread for the tab > > click problem, but unfortunately was unable to > solve > > my problem. I'm knida new to Ruby and Watir and > any > > help is greatly appreciated. > > > > It's about a JS pop-up wizard with 4 tabs which > > opens > > up when I click on a gif image in main UI. > > > > HTML source for the wizard looks like this (... > > instead of some tags & extras): > > > > <table id='tabs_table' cellspacing='0' class='tsc' > > border='0'... > > <div id='tabset_pstabset'><table cellspacing='0' > > class='tsc' border='0' cellpadding... > > <span>title_for_tab1</span></a></td><td > > height='19'><img width...>...</td><td height='19' > > class='sel' style='background...>...<a > > href='#?ctrl=pstabset&action=TabClick¶m=tab1'> > > <span>title_for_tab2</span></a></td><td > > height='19'><img width...>...</td><td height='19' > > class='unsel' style...>...<a > > href='#?ctrl=pstabset&action=TabClick¶m=tab2'> > > ... (total of 4 tabs on page) > > </table></div> > > > > For my testing purposes I need to click on each > tab > > and visit each page. There're some text fields > that > > I > > need to modify. > > > > Thanks in advance, > > gavazn > > > > __________________________________________________ > > 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 > _______________________________________________ > 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 Mark_Cain at rl.gov Wed Feb 1 14:13:49 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Wed, 1 Feb 2006 11:13:49 -0800 Subject: [Wtr-general] My Tab Click problem Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D547@EX5V.rl.gov> Is the content of the tabs displayed in an iFrame? If you could post the entire html for the main page and popup wizard it would help. --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Gavazn Vahshi Sent: Wednesday, February 01, 2006 11:00 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] My Tab Click problem I don't know if that helps or not. When I first open the wizard (showing 1st tab) and do ie.showAllObjects, I get some stuff. Then when I click on the 2nd tab and do ie.showAllObjects I get the extra line below: hidden name=com.cc.framework.state id=com.cc.framework.state value=ctrl=pstabset;first=tab1;selected=tab2 alt= src= Is there a way to use this info to access tab2? Thanks, -g --- "Cain, Mark" <Mark_Cain at rl.gov> wrote: > Is the wizard a separate window that opens? If yes > then you might want > to try: > #e.g. usage from WATiR API > # IE.attach(:url, 'www.google.com') > # IE.attach(:title, 'Google') > > $ie.image(:src, /<gif image name in main UI>/).click > > new_ie = IE.attach(:title, /<Title of the new > window>/i) > > new_ie.show_all_objects > > new_ie.span(:index,2).click #index for tab2 > > NOTE: If the window is invoked as showModalDialog > then you'll need to > use AutoIT. WATiR currently does not support > windows invoked as > showModalDialog. > > Hope this helps, > > --Mark > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf > Of Gavazn Vahshi > Sent: Wednesday, February 01, 2006 9:41 AM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] My Tab Click problem > > I can't select another tab, don't know how to do it > here. > > Well when the wizard opens up, it defaults to the > first tab. From there I'm unable to select tabs for > other pages. For instance if I want to modify stuff > on the 2nd tab, I'd rather click on the tab in order > to see it's content. > > -gavazn > > --- Michael Bolton <mb at michaelbolton.net> wrote: > > > What is the problem that you were unable to solve? > > > > ---Michael B. > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On > Behalf > > Of Gavazn Vahshi > > Sent: January 31, 2006 8:26 PM > > To: wtr-general at rubyforge.org > > Subject: [Wtr-general] My Tab Click problem > > > > Hi All, > > > > I went through the recent email thread for the tab > > click problem, but unfortunately was unable to > solve > > my problem. I'm knida new to Ruby and Watir and > any > > help is greatly appreciated. > > > > It's about a JS pop-up wizard with 4 tabs which > > opens > > up when I click on a gif image in main UI. > > > > HTML source for the wizard looks like this (... > > instead of some tags & extras): > > > > <table id='tabs_table' cellspacing='0' class='tsc' > > border='0'... > > <div id='tabset_pstabset'><table cellspacing='0' > > class='tsc' border='0' cellpadding... > > <span>title_for_tab1</span></a></td><td > > height='19'><img width...>...</td><td height='19' > > class='sel' style='background...>...<a > > href='#?ctrl=pstabset&action=TabClick¶m=tab1'> > > <span>title_for_tab2</span></a></td><td > > height='19'><img width...>...</td><td height='19' > > class='unsel' style...>...<a > > href='#?ctrl=pstabset&action=TabClick¶m=tab2'> > > ... (total of 4 tabs on page) > > </table></div> > > > > For my testing purposes I need to click on each > tab > > and visit each page. There're some text fields > that > > I > > need to modify. > > > > Thanks in advance, > > gavazn > > > > __________________________________________________ > > 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 > _______________________________________________ > 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 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From David.J.Solis at wellsfargo.com Wed Feb 1 16:21:40 2006 From: David.J.Solis at wellsfargo.com (David.J.Solis at wellsfargo.com) Date: Wed, 1 Feb 2006 15:21:40 -0600 Subject: [Wtr-general] clicking on a link problem Message-ID: <493148DCF171954FBBF8E8AAB261638C057506@msgswbmnmsp35.wellsfargo.com> I encountered an error that I cannot figure out. In my code, I'm linking to a new page using $ie.link(:text, "Administration").click But instead, I get this error: WIN32OLERuntimeError: Unknown property or method `document' HRESULT error code:0x80010108 The object invoked has disconnected from its clients. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1347:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1347:in `document' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:899:in `getLink' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2841:in `initialize' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:570:in `new' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:570:in `link' I have no idea what is causing this. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060201/dce4115c/attachment.html From rosecao at us.ibm.com Wed Feb 1 16:45:21 2006 From: rosecao at us.ibm.com (Rose Cao) Date: Wed, 1 Feb 2006 14:45:21 -0700 Subject: [Wtr-general] clicking on a link problem In-Reply-To: <493148DCF171954FBBF8E8AAB261638C057506@msgswbmnmsp35.wellsfargo.com> Message-ID: <OFCB07B53C.134F2FB2-ON87257108.007725E9-87257108.007746BA@us.ibm.com> Make sure the link 'Administration' is not in any frame like 'reportframe' etc. If the link is in one of the frame, then will be ie.frame("framename").link(:text, "Administration").click. Use this to see all the frame on the web page: ie.show_frames Use this to see all the detail of the frame on the web page: ie.show_all_objects Hope this will help. Please contact me if you have any questions or if I may be of any assistance. Thanks, Rose Cao SDC West - LLXC, ACD Team IBM Global Services 303.924.1916 T/L 347-1916 rosecao at us.ibm.com Highland Contractor <David.J.Solis at we llsfargo.com> Sent by: To wtr-general-bounc <wtr-general at rubyforge.org> es at rubyforge.org cc Subject 02/01/2006 02:21 [Wtr-general] clicking on a link PM problem Please respond to wtr-general I encountered an error that I cannot figure out. In my code, I'm linking to a new page using $ie.link(:text, "Administration").click But instead, I get this error: WIN32OLERuntimeError: Unknown property or method `document' HRESULT error code:0x80010108 The object invoked has disconnected from its clients. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1347:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1347:in `document' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:899:in `getLink' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2841:in `initialize' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:570:in `new' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:570:in `link' I have no idea what is causing this. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060201/4aeba535/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: graycol.gif Type: image/gif Size: 105 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20060201/4aeba535/attachment.gif -------------- next part -------------- A non-text attachment was scrubbed... Name: pic32723.gif Type: image/gif Size: 1255 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20060201/4aeba535/attachment-0001.gif -------------- next part -------------- A non-text attachment was scrubbed... Name: ecblank.gif Type: image/gif Size: 45 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20060201/4aeba535/attachment-0002.gif From mb at michaelbolton.net Wed Feb 1 17:19:38 2006 From: mb at michaelbolton.net (Michael Bolton) Date: Wed, 1 Feb 2006 17:19:38 -0500 Subject: [Wtr-general] clicking on a link problem In-Reply-To: <493148DCF171954FBBF8E8AAB261638C057506@msgswbmnmsp35.wellsfargo.com> Message-ID: <001801c6277d$97680610$0902a8c0@Koko> >I have no idea what is causing this. Neither do we. So far as we know, your code snippet might be preceded by $ie = nil What does the original page look like? What does your original code look like (that is, at least a few lines before the call in question)? (General question, not specific to David: When did the charter for this list begin to include "please, to the greatest extent possible, leave out HTML, Ruby code, or other clues that might help us to solve your problem?") ---Michael B., a little cranky this afternoon _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of David.J.Solis at wellsfargo.com Sent: February 1, 2006 4:22 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] clicking on a link problem I encountered an error that I cannot figure out. In my code, I'm linking to a new page using $ie.link(:text, "Administration").click But instead, I get this error: WIN32OLERuntimeError: Unknown property or method `document' HRESULT error code:0x80010108 The object invoked has disconnected from its clients. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1347:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1347:in `document' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:899:in `getLink' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2841:in `initialize' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:570:in `new' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:570:in `link' I have no idea what is causing this. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060201/d15758a3/attachment.html From BPaatsch at activevoice.com Wed Feb 1 17:58:00 2006 From: BPaatsch at activevoice.com (Paatsch, Bernd) Date: Wed, 1 Feb 2006 16:58:00 -0600 Subject: [Wtr-general] How to handle a timeout when allert window not found? Message-ID: <DB8B2DF09344624C84867DA023FA4ADE44A097@activevoice2.necam.prv> Hi Rague, I refere to a thread Nov 22. Within this thread your recommended following code: We ran into a similar issue a while back. For some reason (I dont know if it is a ruby issue), rescue doesn't trap 'Timeout' errors. You have explicitly catch a Timeout error as: begin ..... ... rescue Timeout::Error puts "No alert window found" end Raghu I tried it and it does not work. Do I have to include any special module? I have this nasty and popup to deal with however when there is no popup window it does not go into rescue. begin puts "begin" br=nil br = Browser("url:=/add.php/") br.Dialog("title:=Microsoft Internet Explorer") #dublicate_win = br.Dialog("title:=Microsoft Internet Explorer").Label("index:=2") dublicate_win = br.Dialog("title:=Microsoft Internet Explorer").Label("text:=/DUPLICATE/") puts dublicate_win rescue TIMEOUT::ERROR # great we don't have dublicate extension puts "rescue" $logger.log( " Action: no popup window with dublicated extension found.") ensure text = dublicate_win.display_text # wwe have to deal with the popup window dublicate extension $logger.log( " Action: found popup window " + text) br.Dialog("title:=Microsoft Internet Explorer").Button("text:=OK").click sleep(1.5) dublicate_win = nil end Thanks, Bernd -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060201/0e31d546/attachment.html From tester.paul at gmail.com Wed Feb 1 17:58:52 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Wed, 1 Feb 2006 17:58:52 -0500 Subject: [Wtr-general] Ruby Nubie fails to get out of the box with Unittests Message-ID: <37c405480602011458y2df7055fr@mail.gmail.com> Hello there. I just installed Ruby and WATIR on my computer a fewhours ago and am still learning about this scripting language. I started with the WATIR User Guide and tried out the steps in "Step 3- Run the Watir Unit Tests". The final sentence here says: "Thetests should all run and pass." Unfortunately, I keep getting failures when I run "all_tests.rb" :"182 tests, 1036 assertions, 5 failures, 2 errors" Here are my system specs:- Windows XP SP2 (all the latest windows updates/security patches applied)- Internet Explorer 6.0.2900.2180.xpsp_sp2_gdr.050301-1519- ruby182-15.exe (installed to default c:\ruby)- watir-1.4.1.exe (installed to default C:\Program Files\Watir)- Active Content is allowed to run in files on My Computer. (I knowthis is working for a fact because I am running my internet radioscript file in a background IE window process while I work.) I've scanned through the message archives and found similar errormessages reported by Hugh Sasse on Fri Jan 13 10:08:54 EST 2006(subject = "Unit testing"). First observation: I noticed that the unittests\html\images folder ismissing, but I'm assuming that these files aren't really required forsuccessful completion of the tests.Still, I did notice a few popup errors while running the testscomplaining that the files were missing. I can't think that this isnormal/expected behaviour. Second observation: it looks like a file (pass2.html) is missing. Isthis also intentional? I decided to run "core_tests.rb" but it also failed : "154 tests, 929assertions, 3 failures, 0 errors" -> Is there something that I'm missing here? Is there a setup optionor environment variable that I should set to get these tests to workcorrectly? Please let me know. Thanks in advance. I won't let these hiccupsslow me down while I run through the other examples and tutorials. Ijust thought I'd ask before I forget. Cheers.Paul. From rosecao at us.ibm.com Wed Feb 1 18:06:21 2006 From: rosecao at us.ibm.com (Rose Cao) Date: Wed, 1 Feb 2006 16:06:21 -0700 Subject: [Wtr-general] clicking on a link problem In-Reply-To: <001801c6277d$97680610$0902a8c0@Koko> Message-ID: <OFAE17E3AF.C999AFBC-ON87257108.007EE07D-87257108.007EB172@us.ibm.com> Yes, why not take off the $ before ie and run it again? Please contact me if you have any questions or if I may be of any assistance. Thanks, Rose Cao SDC West - LLXC, ACD Team IBM Global Services 303.924.1916 T/L 347-1916 rosecao at us.ibm.com Highland Contractor "Michael Bolton" <mb at michaelbolton .net> To Sent by: <wtr-general at rubyforge.org> wtr-general-bounc cc es at rubyforge.org Subject Re: [Wtr-general] clicking on a 02/01/2006 03:19 link problem PM Please respond to wtr-general >I have no idea what is causing this. Neither do we. So far as we know, your code snippet might be preceded by $ie = nil What does the original page look like? What does your original code look like (that is, at least a few lines before the call in question)? (General question, not specific to David: When did the charter for this list begin to include "please, to the greatest extent possible, leave out HTML, Ruby code, or other clues that might help us to solve your problem?") ---Michael B., a little cranky this afternoon From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of David.J.Solis at wellsfargo.com Sent: February 1, 2006 4:22 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] clicking on a link problem I encountered an error that I cannot figure out. In my code, I'm linking to a new page using $ie.link(:text, "Administration").click But instead, I get this error: WIN32OLERuntimeError: Unknown property or method `document' HRESULT error code:0x80010108 The object invoked has disconnected from its clients. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1347:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1347:in `document' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:899:in `getLink' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2841:in `initialize' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:570:in `new' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:570:in `link' I have no idea what is causing this. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060201/f7563b98/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: graycol.gif Type: image/gif Size: 105 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20060201/f7563b98/attachment.gif -------------- next part -------------- A non-text attachment was scrubbed... Name: pic00287.gif Type: image/gif Size: 1255 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20060201/f7563b98/attachment-0001.gif -------------- next part -------------- A non-text attachment was scrubbed... Name: ecblank.gif Type: image/gif Size: 45 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20060201/f7563b98/attachment-0002.gif From BPaatsch at activevoice.com Wed Feb 1 18:17:59 2006 From: BPaatsch at activevoice.com (Paatsch, Bernd) Date: Wed, 1 Feb 2006 17:17:59 -0600 Subject: [Wtr-general] How to handle a timeout when allert window not found? Message-ID: <DB8B2DF09344624C84867DA023FA4ADE44A098@activevoice2.necam.prv> I get following error: ./wacSubAddRangeSubscriber.rb:128:in `addRangeSubscriber': uninitialized constant WebAC::TIMEOUT (NameError) from C:/watir-v1_4/examples/WAC/wacTestCollection.rb:51 _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paatsch, Bernd Sent: Wednesday, February 01, 2006 2:58 PM To: 'wtr-general at rubyforge.org' Subject: [Wtr-general] How to handle a timeout when allert window not found? Hi Rague, I refere to a thread Nov 22. Within this thread your recommended following code: We ran into a similar issue a while back. For some reason (I dont know if it is a ruby issue), rescue doesn't trap 'Timeout' errors. You have explicitly catch a Timeout error as: begin ..... ... rescue Timeout::Error puts "No alert window found" end Raghu I tried it and it does not work. Do I have to include any special module? I have this nasty and popup to deal with however when there is no popup window it does not go into rescue. begin puts "begin" br=nil br = Browser("url:=/add.php/") br.Dialog("title:=Microsoft Internet Explorer") #dublicate_win = br.Dialog("title:=Microsoft Internet Explorer").Label("index:=2") dublicate_win = br.Dialog("title:=Microsoft Internet Explorer").Label("text:=/DUPLICATE/") puts dublicate_win rescue TIMEOUT::ERROR # great we don't have dublicate extension puts "rescue" $logger.log( " Action: no popup window with dublicated extension found.") ensure text = dublicate_win.display_text # wwe have to deal with the popup window dublicate extension $logger.log( " Action: found popup window " + text) br.Dialog("title:=Microsoft Internet Explorer").Button("text:=OK").click sleep(1.5) dublicate_win = nil end Thanks, Bernd -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060201/f395e189/attachment.html From BPaatsch at activevoice.com Wed Feb 1 18:32:43 2006 From: BPaatsch at activevoice.com (Paatsch, Bernd) Date: Wed, 1 Feb 2006 17:32:43 -0600 Subject: [Wtr-general] How to handle a timeout when allert window notf ound? Message-ID: <DB8B2DF09344624C84867DA023FA4ADE44A099@activevoice2.necam.prv> I found the answer reguire 'timeout' begin ..... ... rescue TimeoutError # this does not work on my machineTimeout::Error puts "No alert window found" end Bernd _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paatsch, Bernd Sent: Wednesday, February 01, 2006 3:18 PM To: 'wtr-general at rubyforge.org' Subject: Re: [Wtr-general] How to handle a timeout when allert window notfound? I get following error: ./wacSubAddRangeSubscriber.rb:128:in `addRangeSubscriber': uninitialized constant WebAC::TIMEOUT (NameError) from C:/watir-v1_4/examples/WAC/wacTestCollection.rb:51 _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paatsch, Bernd Sent: Wednesday, February 01, 2006 2:58 PM To: 'wtr-general at rubyforge.org' Subject: [Wtr-general] How to handle a timeout when allert window not found? Hi Rague, I refere to a thread Nov 22. Within this thread your recommended following code: We ran into a similar issue a while back. For some reason (I dont know if it is a ruby issue), rescue doesn't trap 'Timeout' errors. You have explicitly catch a Timeout error as: begin ..... ... rescue Timeout::Error puts "No alert window found" end Raghu I tried it and it does not work. Do I have to include any special module? I have this nasty and popup to deal with however when there is no popup window it does not go into rescue. begin puts "begin" br=nil br = Browser("url:=/add.php/") br.Dialog("title:=Microsoft Internet Explorer") #dublicate_win = br.Dialog("title:=Microsoft Internet Explorer").Label("index:=2") dublicate_win = br.Dialog("title:=Microsoft Internet Explorer").Label("text:=/DUPLICATE/") puts dublicate_win rescue TIMEOUT::ERROR # great we don't have dublicate extension puts "rescue" $logger.log( " Action: no popup window with dublicated extension found.") ensure text = dublicate_win.display_text # wwe have to deal with the popup window dublicate extension $logger.log( " Action: found popup window " + text) br.Dialog("title:=Microsoft Internet Explorer").Button("text:=OK").click sleep(1.5) dublicate_win = nil end Thanks, Bernd -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060201/8117c661/attachment.html From bret at pettichord.com Wed Feb 1 18:40:49 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 1 Feb 2006 17:40:49 -0600 Subject: [Wtr-general] Ruby Nubie fails to get out of the box with Unittests In-Reply-To: <37c405480602011458y2df7055fr@mail.gmail.com> References: <37c405480602011458y2df7055fr@mail.gmail.com> Message-ID: <ade75c5b0602011540y7ac55547x9cf173498b08b492@mail.gmail.com> Paul, There are several known problematical tests in all_tests.rb. I've updated the user guide so that the next version will tell people to run core_tests.rb, but you already figured that part out. The specific problems you mentioned (in all_tests.rb) mostly sound familiar. They are known and in several cases happen intermittently. However, i specifically created core_tests.rb as a robust subset of all_tests.rb. I would like to see the details about the 3 failures you found while running them. In one case recently, i found that -- believe it or not -- the IP phone software i was running caused a couple of these tests to fail. It somehow embedded html and javascript in every web page by browser served and therefore was affecting some of the element counts. In any case, it sounds like you've installed Watir correctly and have just run into some marginal issues. Bret On 2/1/06, Paul Carvalho <tester.paul at gmail.com> wrote: > > Hello there. I just installed Ruby and WATIR on my computer a fewhours > ago and am still learning about this scripting language. > I started with the WATIR User Guide and tried out the steps in "Step 3- > Run the Watir Unit Tests". The final sentence here says: "Thetests should > all run and pass." > Unfortunately, I keep getting failures when I run "all_tests.rb" :"182 > tests, 1036 assertions, 5 failures, 2 errors" > Here are my system specs:- Windows XP SP2 (all the latest windows > updates/security patches applied)- Internet Explorer > 6.0.2900.2180.xpsp_sp2_gdr.050301-1519- ruby182-15.exe (installed to > default c:\ruby)- watir-1.4.1.exe (installed to default C:\Program > Files\Watir)- Active Content is allowed to run in files on My Computer. (I > knowthis is working for a fact because I am running my internet radioscript > file in a background IE window process while I work.) > I've scanned through the message archives and found similar errormessages > reported by Hugh Sasse on Fri Jan 13 10:08:54 EST 2006(subject = "Unit > testing"). > First observation: I noticed that the unittests\html\images folder > ismissing, but I'm assuming that these files aren't really required > forsuccessful completion of the tests.Still, I did notice a few popup > errors while running the testscomplaining that the files were missing. I > can't think that this isnormal/expected behaviour. > Second observation: it looks like a file (pass2.html) is missing. Isthis > also intentional? > I decided to run "core_tests.rb" but it also failed : "154 tests, > 929assertions, 3 failures, 0 errors" > -> Is there something that I'm missing here? Is there a setup optionor > environment variable that I should set to get these tests to workcorrectly? > Please let me know. Thanks in advance. I won't let these hiccupsslow me > down while I run through the other examples and tutorials. Ijust thought > I'd ask before I forget. > Cheers.Paul. > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060201/091831d0/attachment.html From bret at pettichord.com Wed Feb 1 20:22:40 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 1 Feb 2006 19:22:40 -0600 Subject: [Wtr-general] clicking on a link problem In-Reply-To: <493148DCF171954FBBF8E8AAB261638C057506@msgswbmnmsp35.wellsfargo.com> References: <493148DCF171954FBBF8E8AAB261638C057506@msgswbmnmsp35.wellsfargo.com> Message-ID: <ade75c5b0602011722t43128b1pd1fac41c34d90867@mail.gmail.com> Bolton is right. We need more to go on. But i can actually answer your actual question ("what is causing this") if not your implied question ("how can i get my code to work"). This is happening because the IE window that "$ie" was bound to was closed. That is what "The object invoked has disconnected from its clients" means. The object, in this case is the browser and the client is our COM binding to it. This message means that there used to be something at the other end of the $ie, but now it is gone. Bret On 2/1/06, David.J.Solis at wellsfargo.com <David.J.Solis at wellsfargo.com> wrote: > > I encountered an error that I cannot figure out. In my code, I'm linking > to a new page using > > $ie.link(:text, "Administration").click > > But instead, I get this error: > > WIN32OLERuntimeError: Unknown property or method `document' > HRESULT error code:0x80010108 > The object invoked has disconnected from its clients. > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1347:in `method_missing' > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1347:in `document' > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:899:in `getLink' > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2841:in `initialize' > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:570:in `new' > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:570:in `link' > > > I have no idea what is causing this. > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060201/5ad97e31/attachment.html From mb at michaelbolton.net Wed Feb 1 23:46:28 2006 From: mb at michaelbolton.net (Michael Bolton) Date: Wed, 1 Feb 2006 23:46:28 -0500 Subject: [Wtr-general] Ruby Nubie fails to get out of the box with Unittests In-Reply-To: <37c405480602011458y2df7055fr@mail.gmail.com> Message-ID: <003b01c627b3$a28d5b40$0902a8c0@Koko> I'm not sure what Paul Carvalho's issue is such that the folder didn't get created. Are you sure you're looking in the right place, Paul? Just to be sure, it shouldn't appear anywhere in your C:\ruby directory tree (assuming that's your Ruby base directory). It should appear in a subdirectory of the same unittests directory in which all_tests.rb is found. Could you check again? I can report this: upon changing the name of the unittests\html\images folder to unittests\html\imagesx on my system, I get a report that 8 assertions failed and that there were 3 errors. That's Error Set A below. And when I restored that folder to its proper name, I got 5 failures and 2 errors. That's Error Set B below. ---Michael B. Error set A =========== 1) Failure: test_imageHasLoaded(TC_Images) [C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittest s/../unittests/images_test.rb:76]: <false> is not true. 2) Error: test_image_click(TC_Images): Watir::Exception::UnknownObjectException: Unable to locate object, using name and disabler_test C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../watir.rb:1939:in `asser t_exists' (eval):2:in `disabled' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/images_test.r b:56:in `test_image_click' 3) Failure: test_image_properties(TC_Images) [C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unitte sts/../unittests/images_test.rb:104]: <"88"> expected but was <"30">. 4) Error: test_save_local_image(TC_Images): WIN32OLERuntimeError: navigate OLE error code:800704C7 in <Unknown> <No Description> HRESULT error code:0x80020009 Exception occurred. C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../watir.rb:1253:in `metho d_missing' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../watir.rb:1253:in `goto' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../watir.rb:2808:in `save' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/images_test.r b:160:in `safe_file_block' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/images_test.r b:160:in `each' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/images_test.r b:160:in `safe_file_block' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/images_test.r b:143:in `test_save_local_image' 5) Error: test_save_local_image_returns_original_page(TC_Images): WIN32OLERuntimeError: navigate OLE error code:800704C7 in <Unknown> <No Description> HRESULT error code:0x80020009 Exception occurred. C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../watir.rb:1253:in `metho d_missing' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../watir.rb:1253:in `goto' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../watir.rb:2808:in `save' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/images_test.r b:160:in `safe_file_block' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/images_test.r b:160:in `each' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/images_test.r b:160:in `safe_file_block' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/images_test.r b:153:in `test_save_local_image_returns_original_page' 6) Failure: test_navigation(TC_Navigate) [C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/ ../unittests/navigate_test.rb:19]: <"file://c:/documents%20and%20settings/michael%20bolton/my%20documents/downl oad/watir/watir-v1_4/unittests/html/buttons1 .html"> expected but was <"file://c:/documents and settings/michael bolton/my documents/download/watir/watir-v1_4/unittests/html/buttons1.html">. 7) Failure: test_links_and_images_in_table(TC_Tables) [C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1 _4/unittests/../unittests/table_test.rb:165]: <"106"> expected but was <"28">. 8) Failure: test_button_frames(TC_show_frames) [C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/frame_test.r b:113:in `capture_and_compare' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/frame_test.r b:125:in `test_button_frames']: <"there are 2 frames\nframe index: 0 name: buttonFrame\nframe index: 1 name: buttonFrame2\n"> expected but was <"there are 2 frames\nframe index: 1 name: buttonFrame\nframe index: 2 name: buttonFrame2\n">. 9) Failure: test_iframes(TC_show_frames) [C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/frame_test.r b:113:in `capture_and_compare' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/frame_test.r b:133:in `test_iframes']: <"there are 2 frames\nframe index: 0 name: senderFrame\nframe index: 1 name: receiverFrame\n"> expected but was <"there are 2 frames\nframe index: 1 name: senderFrame\nframe index: 2 name: receiverFrame\n">. 10) Failure: test_show_nested_frames(TC_show_frames) [C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/frame_test.r b:113:in `capture_and_compare' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/frame_test.r b:117:in `test_show_nested_frames']: <"there are 2 frames\nframe index: 0 name: nestedFrame\nframe index: 1 name: nestedFrame2\n"> expected but was <"there are 2 frames\nframe index: 1 name: nestedFrame\nframe index: 2 name: nestedFrame2\n">. 11) Failure: test_showLinks(TC_showlinks) [C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/links_test.r b:163:in `test_showLinks' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/links_test.r b:163:in `each_with_index' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/links_test.r b:163:in `each' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/links_test.r b:163:in `each_with_index' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/links_test.r b:163:in `test_showLinks']: <"1 file:///c:/documents%20and%20settings/michael%20bolton/my%20documents/downlo ad/watir/wat ir-v1_4/unittests/html/links2.htmltest1"> expected to be =~ </^1 + +file:\/\/\/c:\/documents and settings\/michael bolton\/my documents\/download\/watir\/watir-v1_4\/unittests\/htm l\/links2.html *test1$/>. 182 tests, 1032 assertions, 8 failures, 3 errors Error set B =========== 1) Error: test_image_click(TC_Images): Watir::Exception::UnknownObjectException: Unable to locate object, using name and disabler_test C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../watir.rb:1939:in `asser t_exists' (eval):2:in `disabled' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/images_test.r b:56:in `test_image_click' 2) Error: test_save_local_image(TC_Images): Errno::ENOENT: No such file or directory - C:/Documents%20and%20Settings/Michael%20Bolton/My%20Documents/Download/Watir / watir-v1_4/unittests/html/images/triangle.jpg c:/ruby/lib/ruby/1.8/ftools.rb:136:in `stat' c:/ruby/lib/ruby/1.8/ftools.rb:136:in `compare' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/images_test.r b:144:in `test_save_local_image' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/images_test.r b:143:in `safe_file_block' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/images_test.r b:143:in `test_save_local_image' 3) Failure: test_navigation(TC_Navigate) [C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/ ../unittests/navigate_test.rb:19]: <"file://c:/documents%20and%20settings/michael%20bolton/my%20documents/downl oad/watir/watir-v1_4/unittests/html/buttons1 .html"> expected but was <"file://c:/documents and settings/michael bolton/my documents/download/watir/watir-v1_4/unittests/html/buttons1.html">. 4) Failure: test_button_frames(TC_show_frames) [C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/frame_test.r b:113:in `capture_and_compare' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/frame_test.r b:125:in `test_button_frames']: <"there are 2 frames\nframe index: 0 name: buttonFrame\nframe index: 1 name: buttonFrame2\n"> expected but was <"there are 2 frames\nframe index: 1 name: buttonFrame\nframe index: 2 name: buttonFrame2\n">. 5) Failure: test_iframes(TC_show_frames) [C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/frame_test.r b:113:in `capture_and_compare' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/frame_test.r b:133:in `test_iframes']: <"there are 2 frames\nframe index: 0 name: senderFrame\nframe index: 1 name: receiverFrame\n"> expected but was <"there are 2 frames\nframe index: 1 name: senderFrame\nframe index: 2 name: receiverFrame\n">. 6) Failure: test_show_nested_frames(TC_show_frames) [C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/frame_test.r b:113:in `capture_and_compare' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/frame_test.r b:117:in `test_show_nested_frames']: <"there are 2 frames\nframe index: 0 name: nestedFrame\nframe index: 1 name: nestedFrame2\n"> expected but was <"there are 2 frames\nframe index: 1 name: nestedFrame\nframe index: 2 name: nestedFrame2\n">. 7) Failure: test_showLinks(TC_showlinks) [C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/links_test.r b:163:in `test_showLinks' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/links_test.r b:163:in `each_with_index' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/links_test.r b:163:in `each' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/links_test.r b:163:in `each_with_index' C:/Documents and Settings/Michael Bolton/My Documents/Download/Watir/watir-v1_4/unittests/../unittests/links_test.r b:163:in `test_showLinks']: <"1 file:///c:/documents%20and%20settings/michael%20bolton/my%20documents/downlo ad/watir/wat ir-v1_4/unittests/html/links2.htmltest1"> expected to be =~ </^1 + +file:\/\/\/c:\/documents and settings\/michael bolton\/my documents\/download\/watir\/watir-v1_4\/unittests\/htm l\/links2.html *test1$/>. 182 tests, 1040 assertions, 5 failures, 2 errors -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Carvalho Sent: February 1, 2006 5:59 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Ruby Nubie fails to get out of the box with Unittests Hello there. I just installed Ruby and WATIR on my computer a fewhours ago and am still learning about this scripting language. I started with the WATIR User Guide and tried out the steps in "Step 3- Run the Watir Unit Tests". The final sentence here says: "Thetests should all run and pass." Unfortunately, I keep getting failures when I run "all_tests.rb" :"182 tests, 1036 assertions, 5 failures, 2 errors" Here are my system specs:- Windows XP SP2 (all the latest windows updates/security patches applied)- Internet Explorer 6.0.2900.2180.xpsp_sp2_gdr.050301-1519- ruby182-15.exe (installed to default c:\ruby)- watir-1.4.1.exe (installed to default C:\Program Files\Watir)- Active Content is allowed to run in files on My Computer. (I knowthis is working for a fact because I am running my internet radioscript file in a background IE window process while I work.) I've scanned through the message archives and found similar errormessages reported by Hugh Sasse on Fri Jan 13 10:08:54 EST 2006(subject = "Unit testing"). First observation: I noticed that the unittests\html\images folder ismissing, but I'm assuming that these files aren't really required forsuccessful completion of the tests.Still, I did notice a few popup errors while running the testscomplaining that the files were missing. I can't think that this isnormal/expected behaviour. Second observation: it looks like a file (pass2.html) is missing. Isthis also intentional? I decided to run "core_tests.rb" but it also failed : "154 tests, 929assertions, 3 failures, 0 errors" -> Is there something that I'm missing here? Is there a setup optionor environment variable that I should set to get these tests to workcorrectly? Please let me know. Thanks in advance. I won't let these hiccupsslow me down while I run through the other examples and tutorials. Ijust thought I'd ask before I forget. Cheers.Paul. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Thu Feb 2 00:58:37 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 1 Feb 2006 23:58:37 -0600 Subject: [Wtr-general] Ruby Nubie fails to get out of the box with Unittests In-Reply-To: <003b01c627b3$a28d5b40$0902a8c0@Koko> References: <37c405480602011458y2df7055fr@mail.gmail.com> <003b01c627b3$a28d5b40$0902a8c0@Koko> Message-ID: <ade75c5b0602012158o5971df4fg11e406f3903732ff@mail.gmail.com> Thanks for the detailed reports. The image bugs are common. That code is buggy and needs rewriting. The frame index bugs (expected 0, actual 1) are test-bugs. The code is correct and the tests were fixed in 1.4.1. (Michael is running 1.4.0, but Paul is running 1.4.1). A couple of these bugs are new to me, but seem to stem from the fact that Michael has watir installed in a directory with blanks in its path. I don't know why the table count problem is happening. That is a new one for me too. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060201/1fca2263/attachment.html From tester.paul at gmail.com Thu Feb 2 09:30:23 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Thu, 2 Feb 2006 09:30:23 -0500 Subject: [Wtr-general] Ruby Nubie fails to get out of the box with Unittests In-Reply-To: <ade75c5b0602011540y7ac55547x9cf173498b08b492@mail.gmail.com> References: <37c405480602011458y2df7055fr@mail.gmail.com> <ade75c5b0602011540y7ac55547x9cf173498b08b492@mail.gmail.com> Message-ID: <37c405480602020630n7d0e06ebw@mail.gmail.com> On 01/02/06, Bret Pettichord <bret at pettichord.com> wrote:>> However, i specifically created core_tests.rb as a robust subset of> all_tests.rb. I would like to see the details about the 3 failures you found> while running them.> Hi Bret, I ran the tests again this morning with nothing else running(disabled MSN Messenger, A/V service, etc.) and I got the same errors: ---- C:\Program Files\Watir\unittests>core_tests.rbLoaded suite C:/Program Files/Watir/unittests/core_testsStarted...........................................................-----------Objects in page ------------- [snip] .......................F......................................F............................FFinished in 69.985 seconds. 1) Failure:test_navigation(TC_Navigate) [C:/Program Files/Watir/unittests/../unittests/navigate_test.rb:19]:<"file://c:/program%20files/watir/unittests/html/buttons1.html"> expected but was<"file://c:/program files/watir/unittests/html/buttons1.html">. 2) Failure:test_links_and_images_in_table(TC_Tables) [C:/Program Files/Watir/unittests/../unittests/table_test.rb:165]:<"106"> expected but was<"28">. 3) Failure:test_showLinks(TC_showlinks) [C:/ProgramFiles/Watir/unittests/../unittests/links_test.rb:163:in`test_showLinks' C:/ProgramFiles/Watir/unittests/../unittests/links_test.rb:163:in`each_with_index' C:/Program Files/Watir/unittests/../unittests/links_test.rb:163:in `each' C:/ProgramFiles/Watir/unittests/../unittests/links_test.rb:163:in`each_with_index' C:/ProgramFiles/Watir/unittests/../unittests/links_test.rb:163:in`test_showLinks']:<"1 file:///c:/program%20files/watir/unittests/html/links2.html test1"> expected to be =~</^1 + +file:\/\/\/c:\/program files\/watir\/unittests\/html\/links2.html *test1$/>. 154 tests, 929 assertions, 3 failures, 0 errors ---- Hope this helps. TTYL. Paul. From bret at pettichord.com Thu Feb 2 12:09:29 2006 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 2 Feb 2006 11:09:29 -0600 Subject: [Wtr-general] Ruby Nubie fails to get out of the box with Unittests In-Reply-To: <37c405480602020630n7d0e06ebw@mail.gmail.com> References: <37c405480602011458y2df7055fr@mail.gmail.com> <ade75c5b0602011540y7ac55547x9cf173498b08b492@mail.gmail.com> <37c405480602020630n7d0e06ebw@mail.gmail.com> Message-ID: <ade75c5b0602020909u5744ad5dif817e545af541d67@mail.gmail.com> 1 and 3 are happening because of test-bugs -- the tests don't work right when watir is installed in a directory with a space in the name. 2 fails in: table = $ie.table(:id, 'pic_table') image = table[1][2].image(:index,1) assert_equal("106", image.width) At the moment i am stumped as to what this failure indicates. It is getting the wrong width for the image. Hmm. Bret On 2/2/06, Paul Carvalho <tester.paul at gmail.com> wrote: > > On 01/02/06, Bret Pettichord <bret at pettichord.com> wrote:>> However, i > specifically created core_tests.rb as a robust subset of> all_tests.rb. I > would like to see the details about the 3 failures you found> while running > them.> > Hi Bret, I ran the tests again this morning with nothing else > running(disabled MSN Messenger, A/V service, etc.) and I got the same > errors: > ---- > C:\Program Files\Watir\unittests>core_tests.rbLoaded suite C:/Program > Files/Watir/unittests/core_testsStarted...........................................................-----------Objects > in page ------------- > [snip] > .......................F......................................F............................FFinished > in 69.985 seconds. > 1) Failure:test_navigation(TC_Navigate) [C:/Program > Files/Watir/unittests/../unittests/navigate_test.rb:19]:<" > file://c:/program%20files/watir/unittests/html/buttons1.html"> expected > but was<"file://c:/program files/watir/unittests/html/buttons1.html">. > 2) Failure:test_links_and_images_in_table(TC_Tables) [C:/Program > Files/Watir/unittests/../unittests/table_test.rb:165]:<"106"> expected but > was<"28">. > 3) > Failure:test_showLinks(TC_showlinks) [C:/ProgramFiles/Watir/unittests/../unittests/links_test.rb:163:in`test_showLinks' > C:/ProgramFiles/Watir/unittests/../unittests/links_test.rb:163:in`each_with_index' > C:/Program Files/Watir/unittests/../unittests/links_test.rb:163:in > `each' > C:/ProgramFiles/Watir/unittests/../unittests/links_test.rb:163:in`each_with_index' > C:/ProgramFiles/Watir/unittests/../unittests/links_test.rb:163:in`test_showLinks']:<"1 > file:///c:/program%20files/watir/unittests/html/links2.html test1"> > expected to be =~</^1 + +file:\/\/\/c:\/program > files\/watir\/unittests\/html\/links2.html *test1$/>. > 154 tests, 929 assertions, 3 failures, 0 errors > ---- > Hope this helps. TTYL. Paul. > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060202/5ed0eb95/attachment.html From tester.paul at gmail.com Thu Feb 2 18:35:50 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Thu, 2 Feb 2006 18:35:50 -0500 Subject: [Wtr-general] Watir Examples that need to be updated Message-ID: <37c405480602021535t54547dc3k@mail.gmail.com> I've spent the day running through examples and creating new scripts. I am now happily exploring our web apps and struggling throughdeveloping some scripts. Regarding the Watir examples, here is some feedback on what I've observed. The C:\Program Files\Watir\examples folder has 4 scripts that need tobe updated: (1) articleExample.rb- assertion fails because the exact string doesn't appear on the page (2) google_maps.rb- line 34: the text field ID has changed from "q" to "q_d" (3) mouse_over.rb- The last 3 page navigation links fail because the URL links havechanged from "05" to "06".- 'TopicProposalScheduleW05.htm' has also changed to'ProposalPresentationsW06.htm' (4) yahooCheckbox_test.rb- Only the first test actually works. The rest all fail because thesepages have completely changed on the Yahoo! site. If you want to democheckboxes, you'll have to find another site to use. ---- On a related note, I tried to work through the "Scripting 101" Labexercises, but the instructions seem to be missing a key piece ofinformation:=> How do you launch the Timeclock web application?? I read through the specs, cheat sheets, and every script I could find,but nowhere does it say how to launch the app. I must be missingsomething. (I've run the Timeclock server and tested it as per theInstall instructions, so I know that part works.) I've decided to ignore these exercises, but I would be curious to knowhow to get the app working for my own piece of mind. Paul. From Mark_Cain at rl.gov Fri Feb 3 10:16:35 2006 From: Mark_Cain at rl.gov (Cain, Mark) Date: Fri, 3 Feb 2006 07:16:35 -0800 Subject: [Wtr-general] Watir Examples that need to be updated Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D558@EX5V.rl.gov> Probably a better use of your time would be to go through the unittests (in the Watir install directory) for examples of usage. There is not much that I have encountered that does not have a fairly decent representation in the unittests; and they are maintained a little better than the examples because they are really used to unittest Watir. As to specific question regarding how to do something in Watir that is not in the unittests this forum is the best that I have seen--people are eager to pass alone things they have learned and post solutions and improved solutions quickly as well as offer direction for getting over or around the roadblocks! Also, for general all-around ruby information you can't do any better than the famous Pickaxe book - Programming Ruby (2nd edition) by Dave Thomas it is well worth the money. --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Carvalho Sent: Thursday, February 02, 2006 3:36 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Watir Examples that need to be updated I've spent the day running through examples and creating new scripts. I am now happily exploring our web apps and struggling throughdeveloping some scripts. Regarding the Watir examples, here is some feedback on what I've observed. The C:\Program Files\Watir\examples folder has 4 scripts that need tobe updated: (1) articleExample.rb- assertion fails because the exact string doesn't appear on the page (2) google_maps.rb- line 34: the text field ID has changed from "q" to "q_d" (3) mouse_over.rb- The last 3 page navigation links fail because the URL links havechanged from "05" to "06".- 'TopicProposalScheduleW05.htm' has also changed to'ProposalPresentationsW06.htm' (4) yahooCheckbox_test.rb- Only the first test actually works. The rest all fail because thesepages have completely changed on the Yahoo! site. If you want to democheckboxes, you'll have to find another site to use. ---- On a related note, I tried to work through the "Scripting 101" Labexercises, but the instructions seem to be missing a key piece ofinformation:=> How do you launch the Timeclock web application?? I read through the specs, cheat sheets, and every script I could find,but nowhere does it say how to launch the app. I must be missingsomething. (I've run the Timeclock server and tested it as per theInstall instructions, so I know that part works.) I've decided to ignore these exercises, but I would be curious to knowhow to get the app working for my own piece of mind. Paul. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060203/54321944/attachment.html From Joseph_Graham at adp.com Fri Feb 3 11:04:05 2006 From: Joseph_Graham at adp.com (Graham, Joseph x66237) Date: Fri, 3 Feb 2006 11:04:05 -0500 Subject: [Wtr-general] how to set frame URL location Message-ID: <DA5E76C21FEA85459B0E959CFAC237820813580C@sisexpo01.sis> Hello, I recently installed (2 days ago) the latest release of Watir and am running into some issues. Is there an example somewhere of how to set the URL of a frame. I tried the following <code_snip> # provides a reference to a frame with name "main" main_frame = ie.frame('main') main_frame.navigate_to( ...url... ) // <-- not supported </code_snip> I could also just invoke some javascript function because I am really trying to manipulate a custom DHTML toolbar that has some JS hooks exposed for navigating the frame in question. Any examples of this would be great. I would also appreciate any guidance as to best practices of testing applications that take extensive advantage of AJAX and js. BR_joe _ This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 2102 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20060203/40251003/attachment.bin From tester.paul at gmail.com Fri Feb 3 12:04:19 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Fri, 3 Feb 2006 12:04:19 -0500 Subject: [Wtr-general] Ruby Nubie fails to get out of the box with Unittests In-Reply-To: <ade75c5b0602020909u5744ad5dif817e545af541d67@mail.gmail.com> References: <37c405480602011458y2df7055fr@mail.gmail.com> <ade75c5b0602011540y7ac55547x9cf173498b08b492@mail.gmail.com> <37c405480602020630n7d0e06ebw@mail.gmail.com> <ade75c5b0602020909u5744ad5dif817e545af541d67@mail.gmail.com> Message-ID: <37c405480602030904j168b1f86v@mail.gmail.com> I followed up on your suggestions. I downloaded "watir-v1_4.zip" and extracted just the"/unittests/html/images" folder.I then copied the whole "unittests" folder (and subfolders) to my"C:\Scripts\" folder. Now when I run "all_tests.rb", I get the result: "182 tests, 1063 assertions, 0 failures, 0 errors" When I run "core_tests.rb", I get the result: "154 tests, 947 assertions, 0 failures, 0 errors" I think this is the result you expected. Just thought you'd want toknow. Thanks for the help. Cheers. Paul. On 02/02/06, Bret Pettichord <bret at pettichord.com> wrote:> 1 and 3 are happening because of test-bugs -- the tests don't work right> when watir is installed in a directory with a space in the name.>> 2 fails in:>> table = $ie.table(:id, 'pic_table')> image = table[1][2].image(:index,1)> assert_equal("106", image.width)>> At the moment i am stumped as to what this failure indicates. It is getting> the wrong width for the image. Hmm.>> Bret From angrez at gmail.com Fri Feb 3 12:40:00 2006 From: angrez at gmail.com (Angrez Singh) Date: Fri, 3 Feb 2006 23:10:00 +0530 Subject: [Wtr-general] Is it a bug in doKeyPress() function? Message-ID: <e26bda3e0602030940w6718eff0h4f391b18e32e0369@mail.gmail.com> Hi, I have noticed a variable called suppliedValue that is not defined anywhere in the code. Is it a bug or I am missing something? def doKeyPress( value ) begin maxLength = @o.maxLength if value.length > maxLength value = suppliedValue[0 .. maxLength ] @container.log " Supplied string is #{suppliedValue.length} chars, which exceeds the max length (#{maxLength}) of the field. Using value: #{value}" Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060203/92f61283/attachment.html From tester.paul at gmail.com Fri Feb 3 17:41:01 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Fri, 3 Feb 2006 17:41:01 -0500 Subject: [Wtr-general] How do you pass values to Hidden Input fields? Message-ID: <37c405480602031441o53eb252eq@mail.gmail.com> Hi there, I have encountered an interesting roadblock that I need somehelp with. In the Dot-Net application that I am testing, there is a Context Treein the Left frame that when you click on something, it changes thecontext/display in the MainWindow frame. (i.e. similar to the"Interacting with a JavaScripttree view" example in the FAQ.) Unfortunately, the Javascript tree that our app uses is not quite assimple as the Joust example. When I use "ie.frame("ContextTree").image(:index, 3).flash", the[-]/[+] icon flashes. I can "click" this to expand/collapse thecurrently selected item. (that's good) However, this command/control doesn't actually *select* the item. (that's bad) I scanned through the HTML (and used SpySmith) to discover that thetree item names are stored within "div" tags. Okay. So then Idiscovered that I can highlight any item in the tree that I want usingsomething like: "ie.frame("ContextTree").div(:id, "ContextList1Tree_1_2").flash" (where the "_1_2" is kind of like an array of the items listed in thetree.) (that's good) When I try to "click" this item, nothing happens. (that's bad) Back to scanning the HTML. I used "show_all_objects" to give me alist of the frame elements. Then I noticed the *hidden* input fields. I think that I need to pass values to one of these hidden inputfields, but I haven't been successful using ".text_field(..).set(..)" When I try this, I keep getting an error similar to the following:"Watir::Exception::UnknownObjectException: Unable to locate object.." I've searched through the mail archives for other postings on Hiddenfields, but I haven't found any solutions posted that would apply tothe page/frame that I am trying to interact with. There are *no*visible fields to input on this Context Tree. It is simply lookingfor an onkeydown / onkeyup / onclick event of some sort. Has anyone had any success trying to pass values to hidden inputfields that are looking for these kinds of values? I'll keep exploring, but I thought I would post my question in themeantime to see if anyone here has any advice that might help. Cheers. Paul. From bret at pettichord.com Fri Feb 3 20:33:54 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 3 Feb 2006 19:33:54 -0600 Subject: [Wtr-general] Is it a bug in doKeyPress() function? In-Reply-To: <e26bda3e0602030940w6718eff0h4f391b18e32e0369@mail.gmail.com> References: <e26bda3e0602030940w6718eff0h4f391b18e32e0369@mail.gmail.com> Message-ID: <ade75c5b0602031733m4b9bf784r1e617e53b1837192@mail.gmail.com> Looks like a bug to me. I guess we need to add a unit test for this case. In any case, i just checked in a fix, or at least an improvement for this. Bret On 2/3/06, Angrez Singh <angrez at gmail.com> wrote: > > Hi, > > I have noticed a variable called suppliedValue that is not defined anywhere in the code. Is it a bug or I am missing something? > > def doKeyPress( value ) > begin > maxLength = @o.maxLength > if value.length > maxLength > value = suppliedValue[0 .. maxLength ] > @container.log " Supplied string is #{suppliedValue.length } chars, > which exceeds the max length (#{maxLength}) of the field. Using value: > #{value}" > > > > Regards, > Angrez > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060203/8c0221b5/attachment.html From bret at pettichord.com Fri Feb 3 20:47:40 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 3 Feb 2006 19:47:40 -0600 Subject: [Wtr-general] How do you pass values to Hidden Input fields? In-Reply-To: <37c405480602031441o53eb252eq@mail.gmail.com> References: <37c405480602031441o53eb252eq@mail.gmail.com> Message-ID: <ade75c5b0602031747g4fd82c8cpcdc57a4d5d8a9517@mail.gmail.com> There are tricks you sometimes (always?) have to use to enter text with hidden text fields. But watir can see hidden fields without any special problem and the error you are getting is because watir can't find it. So you are still have problems with the identification. Bret On 2/3/06, Paul Carvalho <tester.paul at gmail.com> wrote: > > Hi there, I have encountered an interesting roadblock that I need somehelp > with. > In the Dot-Net application that I am testing, there is a Context Treein > the Left frame that when you click on something, it changes > thecontext/display in the MainWindow frame. (i.e. similar to > the"Interacting with a JavaScripttree view" example in the FAQ.) > Unfortunately, the Javascript tree that our app uses is not quite assimple > as the Joust example. > When I use "ie.frame("ContextTree").image(:index, 3).flash", the[-]/[+] > icon flashes. I can "click" this to expand/collapse thecurrently selected > item. (that's good) > However, this command/control doesn't actually *select* the item. (that's > bad) > I scanned through the HTML (and used SpySmith) to discover that thetree > item names are stored within "div" tags. Okay. So then Idiscovered that I > can highlight any item in the tree that I want usingsomething like: " > ie.frame("ContextTree").div(:id, "ContextList1Tree_1_2").flash" > (where the "_1_2" is kind of like an array of the items listed in > thetree.) (that's good) > When I try to "click" this item, nothing happens. (that's bad) > Back to scanning the HTML. I used "show_all_objects" to give me alist of > the frame elements. Then I noticed the *hidden* input fields. > I think that I need to pass values to one of these hidden inputfields, but > I haven't been successful using ".text_field(..).set(..)" > When I try this, I keep getting an error similar to the > following:"Watir::Exception::UnknownObjectException: Unable to locate > object.." > > I've searched through the mail archives for other postings on > Hiddenfields, but I haven't found any solutions posted that would apply > tothe page/frame that I am trying to interact with. There are *no*visible > fields to input on this Context Tree. It is simply lookingfor an onkeydown > / onkeyup / onclick event of some sort. > Has anyone had any success trying to pass values to hidden inputfields > that are looking for these kinds of values? > I'll keep exploring, but I thought I would post my question in themeantime > to see if anyone here has any advice that might help. > Cheers. Paul. > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060203/6bb80abb/attachment.html From murgundesachin at yahoo.com Sat Feb 4 00:21:41 2006 From: murgundesachin at yahoo.com (SACHIN MURGUNDE) Date: Fri, 3 Feb 2006 21:21:41 -0800 (PST) Subject: [Wtr-general] Regarding Links Message-ID: <20060204052141.76765.qmail@web50713.mail.yahoo.com> Hi, Iam very very new to watir and ruby. I have a small problem in watir.Iam having a page with 10 links with same name "Send Message" with differend parameter in query string eg <a href="http://mail.yahoo.com/config/login? View' target=_blank>fuseaction=user.viewProfile&friendID=53045355"> View Profile </a> <a href="http://mail.yahoo.com/config/login?View' target=_blank>fuseaction=user.viewProfile&friendID=53040035">View Profile </a> <br /> . . . . . etc...... so how can i write script to click or open new window from "view Profile" hyper link as shown above Is it possible to do so? Thanks and regards, Sachin --------------------------------- Relax. Yahoo! Mail virus scanning helps detect nasty viruses! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060203/c21e1c70/attachment.html From bret at pettichord.com Sat Feb 4 13:08:20 2006 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 4 Feb 2006 12:08:20 -0600 Subject: [Wtr-general] Regarding Links In-Reply-To: <20060204052141.76765.qmail@web50713.mail.yahoo.com> References: <20060204052141.76765.qmail@web50713.mail.yahoo.com> Message-ID: <ade75c5b0602041008l14338e5bs62027bfcfaffcfff@mail.gmail.com> ie.link(:url, "http://mail.yahoo.com/config/login? fuseaction=user.viewProfile&friendID=53045355"<http://www.myspace.com/index.cfm?fuseaction=http://mail.yahoo.com/config/login?/user.viewProfile&friendID=53045355%22%3E+View> ).click On 2/3/06, SACHIN MURGUNDE <murgundesachin at yahoo.com> wrote: > > Hi, > > Iam very very new to watir and ruby. > I have a small problem in watir.Iam having a page with 10 links with same > name "Send Message" with differend parameter in query string > > eg <a href="http://mail.yahoo.com/config/login?fuseaction=user.viewProfile&friendID=53045355"> > View<http://www.myspace.com/index.cfm?fuseaction=http://mail.yahoo.com/config/login?/user.viewProfile&friendID=53045355%22%3E+View>Profile </a> > > <a href="http://mail.yahoo.com/config/login? > fuseaction=user.viewProfile&friendID=53040035">View<http://www.myspace.com/index.cfm?fuseaction=http://mail.yahoo.com/config/login?/user.viewProfile&friendID=53040035%22%3EView>Profile </a> <br /> > > . > . > . > . > . > etc...... > > so how can i write script to click or open new window from "*view Profile*" > hyper link as shown above > Is it possible to do so? > > Thanks and regards, > Sachin > > ------------------------------ > Relax. Yahoo! Mail virus scanning<http://us.rd.yahoo.com/mail_us/taglines/viruscc/*http://communications.yahoo.com/features.php?page=221>helps detect nasty viruses! > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060204/b157aa17/attachment.html From sreedhar.kharidehal at gmail.com Mon Feb 6 05:56:39 2006 From: sreedhar.kharidehal at gmail.com (Sreedhar Kharidehal) Date: Mon, 6 Feb 2006 16:26:39 +0530 Subject: [Wtr-general] link click problem Message-ID: <48150ae20602060256y549d1b64wfbb54575b19c5a9d@mail.gmail.com> Hi ,i see the following for a link in view source <a href="javascript:fnOnView(75)">link name</a> I want to click link using "javascript:fnOnView(75)" function and not the text which happens to be link name in this case .How can i do it ? some more info: Number 75 comes from the database and it changes .I can connect to the database and access the id I tried the following ie.link(:title,"\"javascript:fnOnView("+link_id+")\"").click where link_id is 75 but i got the following exception Unable to locate object, using title and "javascript:fnOnView(75)" (Watir::Exception::UnknownObjectException) .Does the href need to have explicit title = "" for the above to work . Thanks --sreedhar From sreedhar.kharidehal at gmail.com Mon Feb 6 07:06:39 2006 From: sreedhar.kharidehal at gmail.com (Sreedhar Kharidehal) Date: Mon, 6 Feb 2006 17:36:39 +0530 Subject: [Wtr-general] link click problem In-Reply-To: <48150ae20602060256y549d1b64wfbb54575b19c5a9d@mail.gmail.com> References: <48150ae20602060256y549d1b64wfbb54575b19c5a9d@mail.gmail.com> Message-ID: <48150ae20602060406o23352db6qc596e7eec483e89b@mail.gmail.com> Hi ,tried using :url instead of title and it worked. On 2/6/06, Sreedhar Kharidehal <sreedhar.kharidehal at gmail.com> wrote: > Hi ,i see the following for a link in view source > <a href="javascript:fnOnView(75)">link name</a> > I want to click link using "javascript:fnOnView(75)" function and not > the text which happens to be link name in this case .How can i do it ? > some more info: > Number 75 comes from the database and it changes .I can connect to the > database and access the id > I tried the following > ie.link(:title,"\"javascript:fnOnView("+link_id+")\"").click > where link_id is 75 but i got the following exception > Unable to locate object, using title and "javascript:fnOnView(75)" > (Watir::Exception::UnknownObjectException) > .Does the href need to have explicit title = "" for the above to work . > > Thanks > --sreedhar > -- sreedhar From jimche218 at gmail.com Mon Feb 6 07:40:27 2006 From: jimche218 at gmail.com (Jim Che) Date: Mon, 6 Feb 2006 20:40:27 +0800 Subject: [Wtr-general] How to get the second part which is found by Regexp Message-ID: <5397f6f80602060440m4462c3dbk@mail.gmail.com> for example there is a line as below: http://www.co.bo.com in the http://www.hello.com I am want to find the all website address and use the reguler express: re = /http\:\/\/[_a-zA-Z0-9-]+[\._a-zA-Z0-9-]+/ md = re.match(line) but the result was just the first website address http://www.co.bo.com So my question is how to get the "http://www.hello.com" thank you for any help Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060206/d1a42330/attachment.html From christopher.mcmahon at gmail.com Mon Feb 6 09:52:04 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 6 Feb 2006 08:52:04 -0600 Subject: [Wtr-general] How to get the second part which is found by Regexp In-Reply-To: <5397f6f80602060440m4462c3dbk@mail.gmail.com> References: <5397f6f80602060440m4462c3dbk@mail.gmail.com> Message-ID: <72799cd70602060652k22fc4d11g16e0e97363276785@mail.gmail.com> On 2/6/06, Jim Che <jimche218 at gmail.com> wrote: > for example there is a line as below: > http://www.co.bo.com in the http://www.hello.com > I am want to find the all website address and use the reguler express: > re = /http\:\/\/[_a-zA-Z0-9-]+[\._a-zA-Z0-9-]+/ > md = re.match(line) > but the result was just the first website address http://www.co.bo.com > So my question is how to get the "http://www.hello.com" > thank you for any help You could use scan: matches = [] your_http_string.scan //http\:\/\/[_a-zA-Z0-9-]+[\._a-zA-Z0-9-]+/ do |match| matches<<match end It's not tested, but I think it'll work. -Chris From tester.paul at gmail.com Mon Feb 6 10:28:47 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Mon, 6 Feb 2006 10:28:47 -0500 Subject: [Wtr-general] Assertions help Message-ID: <37c405480602060728v6bc7244j@mail.gmail.com> Hi there. I have been trying to figure out how the Assertions work inWatir, but I seem to be getting something wrong. I tried to add the following to one of my scripts (improvised from theexamples in the "WATIR User Guide"), but it doesn't work the way Iexpect it to: if assert($ie.contains_text("Please try again")) puts "=> TEST PASSED. Found test string: 'Please try again.' " else puts "=> TEST FAILED." end --> This *always* returns "TEST FAILED", even when the string isreally on the page. (unexpected for me - so I must have somethingwrong.) >From the Help file, I found the following, less than helpful info:> assert(boolean, message=nil)> Passes if boolean is true. Absolutely clueless as to what this actually means, I tried to outputthe assert line and I see that it always returns "nil". Of course,that would be unexpected for the "if" statement waiting for aTrue/False response, so that's why it goes to the .else. when I expectit to pass. Back to the less-than-helpful Help file, I found the following:> assert_nil(object, message="")> Passes if object.nil?. Should I use this instead? Is it even possible to combine the assertand if statements in this way? Please let me know. Thanks.Paul. From sreedhar.kharidehal at gmail.com Mon Feb 6 10:34:43 2006 From: sreedhar.kharidehal at gmail.com (Sreedhar Kharidehal) Date: Mon, 6 Feb 2006 21:04:43 +0530 Subject: [Wtr-general] running watir scripts from ANT Message-ID: <48150ae20602060734q155dbf44hc2aec6a222e9b031@mail.gmail.com> Hi i am not sure whether this is the right group to post this question but can i run watir scripts from ANT ? -- sreedhar From jeff.darklight at gmail.com Mon Feb 6 10:43:33 2006 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 06 Feb 2006 07:43:33 -0800 Subject: [Wtr-general] How to get the second part which is found by Regexp In-Reply-To: <5397f6f80602060440m4462c3dbk@mail.gmail.com> References: <5397f6f80602060440m4462c3dbk@mail.gmail.com> Message-ID: <43E76EA5.9010901@gmail.com> Jim Che wrote: > for example there is a line as below: > http://www.co.bo.com in the http://www.hello.com > I am want to find the all website address and use the reguler express: > re = /http\:\/\/[_a-zA-Z0-9-]+[\._a-zA-Z0-9-]+/ > md = re.match(line) > but the result was just the first website > address http://www.co.bo.com > So my question is how to get the "http://www.hello.com > <http://www.hello.com/>" > thank you for any help > Jim > ------------------------------------------------------------------------ > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general Usually for this I will go the opposite direction ... Use something like : re = /http\:\/\/[_a-zA-Z0-9-]+[\._a-zA-Z0-9-]+/ matches = line.scan( re ) It will return an array that contains everything you are looking for ... Whats nice is if you use grouping inside your regexp like this: re = /http\:\/\/([_a-zA-Z0-9-]+)([\._a-zA-Z0-9-]+)/ matches = line.scan( re ) each of the matches items will be an array of the groupings. ... anyways, thats how I normally do it, just my $0.02USD j. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060206/d3afafaa/attachment.html From christopher.mcmahon at gmail.com Mon Feb 6 10:48:53 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 6 Feb 2006 09:48:53 -0600 Subject: [Wtr-general] How to get the second part which is found by Regexp In-Reply-To: <43E76EA5.9010901@gmail.com> References: <5397f6f80602060440m4462c3dbk@mail.gmail.com> <43E76EA5.9010901@gmail.com> Message-ID: <72799cd70602060748p825100dx21f32dd581000a79@mail.gmail.com> > re = /http\:\/\/[_a-zA-Z0-9-]+[\._a-zA-Z0-9-]+/ > matches = line.scan( re ) > > It will return an array that contains everything you are looking for ... Cool, I didn't know if scan returned an array (although I might have suspected it, so many Ruby methods do.) -Chris From email at derkaan.de Mon Feb 6 10:59:59 2006 From: email at derkaan.de (Kaan Karaca) Date: Mon, 6 Feb 2006 16:59:59 +0100 Subject: [Wtr-general] running watir scripts from ANT In-Reply-To: <48150ae20602060734q155dbf44hc2aec6a222e9b031@mail.gmail.com> Message-ID: <E1F68mS-0003pn-8K@vizzard.develnet> There is an "Exec" task in Ant where you can invoke system commands. Maybe you should also look at rake - ruby make (google for it). Its really powerful. -----Urspr?ngliche Nachricht----- Von: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] Im Auftrag von Sreedhar Kharidehal Gesendet: Montag, 6. Februar 2006 16:35 An: Wtr-general at rubyforge.org Betreff: [Wtr-general] running watir scripts from ANT Hi i am not sure whether this is the right group to post this question but can i run watir scripts from ANT ? -- sreedhar _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.2/251 - Release Date: 04.02.2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.2/251 - Release Date: 04.02.2006 From bret at pettichord.com Mon Feb 6 12:30:27 2006 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 6 Feb 2006 11:30:27 -0600 Subject: [Wtr-general] Assertions help In-Reply-To: <37c405480602060728v6bc7244j@mail.gmail.com> References: <37c405480602060728v6bc7244j@mail.gmail.com> Message-ID: <ade75c5b0602060930n20aaff5ctc3ed46db28b93005@mail.gmail.com> You are looking at old and buggy documentation. Is this what we bundled with 1.4.1? Updated documentation is here: http://wtr.rubyforge.org/watir_user_guide.html >Is it even possible to combine the assertand if statements in this way? No. Bret On 2/6/06, Paul Carvalho <tester.paul at gmail.com> wrote: > > Hi there. I have been trying to figure out how the Assertions work > inWatir, but I seem to be getting something wrong. > I tried to add the following to one of my scripts (improvised from > theexamples in the "WATIR User Guide"), but it doesn't work the way Iexpect > it to: > if assert($ie.contains_text("Please try again")) puts "=> TEST > PASSED. Found test string: 'Please try again.' " else puts "=> TEST > FAILED." end > --> This *always* returns "TEST FAILED", even when the string isreally on > the page. (unexpected for me - so I must have somethingwrong.) > >From the Help file, I found the following, less than helpful info:> > assert(boolean, message=nil)> Passes if boolean is true. > Absolutely clueless as to what this actually means, I tried to outputthe > assert line and I see that it always returns "nil". Of course,that would be > unexpected for the "if" statement waiting for aTrue/False response, so > that's why it goes to the .else. when I expectit to pass. > Back to the less-than-helpful Help file, I found the following:> > assert_nil(object, message="")> Passes if object.nil?. > Should I use this instead? Is it even possible to combine the assertand > if statements in this way? > Please let me know. Thanks.Paul. > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060206/04e6a54e/attachment.html From thealy at midicorp.com Mon Feb 6 12:53:21 2006 From: thealy at midicorp.com (Thomas Healy) Date: Mon, 6 Feb 2006 12:53:21 -0500 Subject: [Wtr-general] Assertions help Message-ID: <8EA615B25AB5F849BF0193B80E6D4C49800CD1@MIDISERVER> Can Watir be used to test drop and drag functionality? If so how? Thanks, Thom -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060206/5ccda095/attachment.html From christopher.mcmahon at gmail.com Mon Feb 6 13:41:12 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 6 Feb 2006 12:41:12 -0600 Subject: [Wtr-general] Drag'n'drop Re: Assertions help Message-ID: <72799cd70602061041j57c9d975yc407f8358507f3b2@mail.gmail.com> > Can Watir be used to test drop and drag functionality? If so how? I hope Paul sees this. Some time ago we looked into this, and it seemed possible, but the demand was lacking. Maybe it's time to re-examine. If I remember, it was a matter of extending support for more Javascript: onDrag and onDrop messages. Maybe it's already in there? -Chris From tester.paul at gmail.com Mon Feb 6 16:38:22 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Mon, 6 Feb 2006 16:38:22 -0500 Subject: [Wtr-general] How do you pass values to Hidden Input fields? In-Reply-To: <ade75c5b0602031747g4fd82c8cpcdc57a4d5d8a9517@mail.gmail.com> References: <37c405480602031441o53eb252eq@mail.gmail.com> <ade75c5b0602031747g4fd82c8cpcdc57a4d5d8a9517@mail.gmail.com> Message-ID: <37c405480602061338w3380445fn@mail.gmail.com> I found some of the classes and methods for working with Hiddenfields, but all this programming stuff is a bit too terse for me.(Dammit Jim, I'm a tester not a programmer! ;)) I tried the following:> ie.frame("ContextTree").hiddens.length=> Returns a value of 8. (matches the number identified via "show_all_objects") > ie.frame("ContextTree").text_fields.length=> Returned a value of 2. (This is interesting, because only one inputfield is visible.) When I tried to input text into the first text_field, it appeared asexpected. When I tried to input text into the second input field, Igot the following: > ie.frame("ContextTree").text_field(:index, 2).set("wasup?")=> WIN32OLERuntimeError: focus OLE error code:800A083E in htmlfile Can't move focus to the control because it is invisible, notenabled, or of a type that does not accept the focus.[snip] So, how do I send info to this input field? Do I use something likethe following?> ie.frame("ContextTree").hidden(:id, "_ContextList1:Tree").set("wasup?") I think I'm mixing apples and oranges here. The second text inputfield doesn't have a "hidden" attribute, yet it is "invisible". This tree control will be the end of me yet. I think I've found a wayto bypass it using the URL. If that works, I'm going to give up ontrying to manipulate the UI directly with Watir. This is one timewhere the mouse is mightier than the keyboard. Sigh. Cheers. Paul. BTW, does anyone know a tool that will allow me to see what info IEpasses from one page to another? SpySmith is nice for viewing staticinformation on a page, but not for showing me what's being passed fromone page to another. TIA. On 03/02/06, Bret Pettichord <bret at pettichord.com> wrote:> There are tricks you sometimes (always?) have to use to enter text with> hidden text fields. But watir can see hidden fields without any special> problem and the error you are getting is because watir can't find it. So you> are still have problems with the identification.>> Bret From christopher.mcmahon at gmail.com Mon Feb 6 16:53:53 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 6 Feb 2006 15:53:53 -0600 Subject: [Wtr-general] page-to-page; sniffing server traffic. Re: How do you pass values to Hidden Input fields? Message-ID: <72799cd70602061353w867cbcfh5442a3b4e68b56df@mail.gmail.com> > BTW, does anyone know a tool that will allow me to see what info IEpasses from one page to another? SpySmith is nice for viewing staticinformation on a page, but not for showing me what's being passed fromone page to another. TIA. http://search.cpan.org/~book/HTTP-Proxy-0.17/lib/HTTP/Proxy.pm maybe with http://search.cpan.org/~leira/HTTP-Recorder-0.05/lib/HTTP/Recorder.pm I can't remember if you need Recorder to get the nice formatted output to STDOUT from the proxy. Please don't flame me, if I knew of a proxy as nice as this in Ruby, I'd recommend it. :) -Chris From bret at pettichord.com Mon Feb 6 16:57:30 2006 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 6 Feb 2006 15:57:30 -0600 Subject: [Wtr-general] How do you pass values to Hidden Input fields? In-Reply-To: <37c405480602061338w3380445fn@mail.gmail.com> References: <37c405480602031441o53eb252eq@mail.gmail.com> <ade75c5b0602031747g4fd82c8cpcdc57a4d5d8a9517@mail.gmail.com> <37c405480602061338w3380445fn@mail.gmail.com> Message-ID: <ade75c5b0602061357y1566bbdcya1e98b2abf1b2d03@mail.gmail.com> Try ie.frame("ContextTree").text_field(:index, 2).value = "wasup?" As a general rule, setting the value of a field via value= often works when set fails. Bret On 2/6/06, Paul Carvalho <tester.paul at gmail.com> wrote: > > I found some of the classes and methods for working with Hiddenfields, but > all this programming stuff is a bit too terse for me.(Dammit Jim, I'm a > tester not a programmer! ;)) > I tried the following:> ie.frame("ContextTree").hiddens.length=> Returns a > value of 8. (matches the number identified via "show_all_objects") > > ie.frame("ContextTree").text_fields.length=> Returned a value of 2. > (This is interesting, because only one inputfield is visible.) > When I tried to input text into the first text_field, it appeared > asexpected. When I tried to input text into the second input field, Igot > the following: > > ie.frame("ContextTree").text_field(:index, 2).set("wasup?")=> > WIN32OLERuntimeError: focus OLE error code:800A083E in > htmlfile Can't move focus to the control because it is invisible, > notenabled, or of a type that does not accept the focus.[snip] > So, how do I send info to this input field? Do I use something likethe > following?> ie.frame("ContextTree").hidden(:id, > "_ContextList1:Tree").set("wasup?") > I think I'm mixing apples and oranges here. The second text inputfield > doesn't have a "hidden" attribute, yet it is "invisible". > This tree control will be the end of me yet. I think I've found a wayto > bypass it using the URL. If that works, I'm going to give up ontrying to > manipulate the UI directly with Watir. This is one timewhere the mouse is > mightier than the keyboard. Sigh. > Cheers. Paul. > BTW, does anyone know a tool that will allow me to see what info IEpasses > from one page to another? SpySmith is nice for viewing staticinformation on > a page, but not for showing me what's being passed fromone page to > another. TIA. > > On 03/02/06, Bret Pettichord <bret at pettichord.com> wrote:> There are > tricks you sometimes (always?) have to use to enter text with> hidden text > fields. But watir can see hidden fields without any special> problem and the > error you are getting is because watir can't find it. So you> are still have > problems with the identification.>> Bret > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060206/989c1f75/attachment.html From tester.paul at gmail.com Mon Feb 6 17:04:47 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Mon, 6 Feb 2006 17:04:47 -0500 Subject: [Wtr-general] page-to-page; sniffing server traffic. Re: How do you pass values to Hidden Input fields? In-Reply-To: <72799cd70602061353w867cbcfh5442a3b4e68b56df@mail.gmail.com> References: <72799cd70602061353w867cbcfh5442a3b4e68b56df@mail.gmail.com> Message-ID: <37c405480602061404x20595246j@mail.gmail.com> Thanks, Chris. A developer friend just sent me a link tohttp://www.blunck.info/iehttpheaders.html It's a nice plugin for IE. I'm still playing with it to see if itshows me what I want. Cheers. Paul. On 06/02/06, Chris McMahon <christopher.mcmahon at gmail.com> wrote:>> http://search.cpan.org/~book/HTTP-Proxy-0.17/lib/HTTP/Proxy.pm> maybe with> http://search.cpan.org/~leira/HTTP-Recorder-0.05/lib/HTTP/Recorder.pm>> I can't remember if you need Recorder to get the nice formatted output> to STDOUT from the proxy.>> Please don't flame me, if I knew of a proxy as nice as this in Ruby,> I'd recommend it. :)> -Chris From bret at pettichord.com Mon Feb 6 18:31:44 2006 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 6 Feb 2006 17:31:44 -0600 Subject: [Wtr-general] running watir scripts from ANT In-Reply-To: <E1F68mS-0003pn-8K@vizzard.develnet> References: <48150ae20602060734q155dbf44hc2aec6a222e9b031@mail.gmail.com> <E1F68mS-0003pn-8K@vizzard.develnet> Message-ID: <ade75c5b0602061531o25a817e2ta6318d180b613853@mail.gmail.com> For Nant integration, see http://www.hanselman.com/blog/NUnitWatirRubyTestIntegration.aspx I suspect Ant would be similar. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060206/b7fc21bc/attachment.html From rosecao at us.ibm.com Mon Feb 6 23:40:01 2006 From: rosecao at us.ibm.com (Rose Cao) Date: Mon, 6 Feb 2006 21:40:01 -0700 Subject: [Wtr-general] how to connect to DB2 database. Message-ID: <OF44D65EBA.EF4899BD-ON8725710E.00189962-8725710E.001961EF@us.ibm.com> Please help ...... Here is what I need do: 1. Get value from DB2 database == value1 2. Get corresponding field from Webpage == value2 3. Compare value1 and value2 to see if they are matching each other. I have difficulty to connect to DB2 database and pass value1 out of database. The environment is: 1. IBM DB2 ODBC Driver is installed 2. system DSN name for the database is dsnbat Here is my testing code for getting database values, and it doesn't work: require 'DB2' conn = dsnbat.logon("username","password") cursor = conn.open cursor.parse("myquery here") cursor.exec while r = cursor.fetch p r end cursor.close conn.logoff Thanks, Rose -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060206/33bb8af0/attachment.html From jayasree.k at marlabs.com Mon Feb 6 23:40:31 2006 From: jayasree.k at marlabs.com (jayashree) Date: Tue, 7 Feb 2006 10:10:31 +0530 Subject: [Wtr-general] assert_equal problem in the module Message-ID: <EKEJIKLLJMIAAEDOAMDLEEILCAAA.jayasree.k@marlabs.com> Hi, I am new to watir and ruby. There are two ruby files.In the main ruby file I am using assert_equal.It's working fine.There is another ruby file which contains module.I want to write all the assert_equal statements in the module. At the top of the module, I am using - $LOAD_PATH.<< File.join(File.dirname(__FILE__), '') if $0 == __FILE__. If I use assert_equal in the module file, I am getting error: undefined method : assert_equal. What is the require statements for this. Thanks, Jayashree. Disclaimer: This e-mail, and any files transmitted with it are confidential to Marlabs Inc. and intended solely for the use of the individual or entity to whom it is addressed. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. From zeljko.filipin at gmail.com Tue Feb 7 03:11:18 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 7 Feb 2006 09:11:18 +0100 Subject: [Wtr-general] How do you pass values to Hidden Input fields? In-Reply-To: <37c405480602061338w3380445fn@mail.gmail.com> References: <37c405480602031441o53eb252eq@mail.gmail.com> <ade75c5b0602031747g4fd82c8cpcdc57a4d5d8a9517@mail.gmail.com> <37c405480602061338w3380445fn@mail.gmail.com> Message-ID: <f81b1250602070011s4a9a5394h@mail.gmail.com> Try http://www.fiddlertool.com/fiddler/ Zeljko 2006/2/6, Paul Carvalho <tester.paul at gmail.com>: > BTW, does anyone know a tool that will allow me to see what info IEpasses from one page to another? SpySmith is nice for viewing staticinformation on a page, but not for showing me what's being passed fromone page to another. TIA. From zeljko.filipin at gmail.com Tue Feb 7 03:14:42 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 7 Feb 2006 09:14:42 +0100 Subject: [Wtr-general] assert_equal problem in the module In-Reply-To: <EKEJIKLLJMIAAEDOAMDLEEILCAAA.jayasree.k@marlabs.com> References: <EKEJIKLLJMIAAEDOAMDLEEILCAAA.jayasree.k@marlabs.com> Message-ID: <f81b1250602070014p1557da83r@mail.gmail.com> require 'test/unit/assertions' include Test::Unit::Assertions 2006/2/7, jayashree <jayasree.k at marlabs.com>: > Hi, > I am new to watir and ruby. > There are two ruby files.In the main ruby file I am using assert_equal.It's > working fine.There is another ruby file which contains module.I want to > write all the assert_equal statements in the module. > At the top of the module, I am using - $LOAD_PATH.<< > File.join(File.dirname(__FILE__), '') if $0 == __FILE__. > > If I use assert_equal in the module file, I am getting error: undefined > method : assert_equal. > > What is the require statements for this. > > Thanks, > Jayashree. > > Disclaimer: > > This e-mail, and any files transmitted with it are confidential to Marlabs Inc. and intended solely for the use of the individual or entity to whom it is addressed. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- http://iskusivac.blog.hr/ From jayasree.k at marlabs.com Tue Feb 7 04:06:24 2006 From: jayasree.k at marlabs.com (jayashree) Date: Tue, 7 Feb 2006 14:36:24 +0530 Subject: [Wtr-general] assert_equal problem in the module In-Reply-To: <f81b1250602070014p1557da83r@mail.gmail.com> Message-ID: <EKEJIKLLJMIAAEDOAMDLMEIMCAAA.jayasree.k@marlabs.com> Hi Zeljko Filipin, It's working fine. Thank you, Jayashree. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Zeljko Filipin Sent: Tuesday, February 07, 2006 1:45 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] assert_equal problem in the module require 'test/unit/assertions' include Test::Unit::Assertions 2006/2/7, jayashree <jayasree.k at marlabs.com>: > Hi, > I am new to watir and ruby. > There are two ruby files.In the main ruby file I am using assert_equal.It's > working fine.There is another ruby file which contains module.I want to > write all the assert_equal statements in the module. > At the top of the module, I am using - $LOAD_PATH.<< > File.join(File.dirname(__FILE__), '') if $0 == __FILE__. > > If I use assert_equal in the module file, I am getting error: undefined > method : assert_equal. > > What is the require statements for this. > > Thanks, > Jayashree. > > Disclaimer: > > This e-mail, and any files transmitted with it are confidential to Marlabs Inc. and intended solely for the use of the individual or entity to whom it is addressed. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- http://iskusivac.blog.hr/ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general Disclaimer: This e-mail, and any files transmitted with it are confidential to Marlabs Inc. and intended solely for the use of the individual or entity to whom it is addressed. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. From zeljko.filipin at gmail.com Tue Feb 7 04:21:04 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 7 Feb 2006 10:21:04 +0100 Subject: [Wtr-general] assert_equal problem in the module In-Reply-To: <EKEJIKLLJMIAAEDOAMDLMEIMCAAA.jayasree.k@marlabs.com> References: <f81b1250602070014p1557da83r@mail.gmail.com> <EKEJIKLLJMIAAEDOAMDLMEIMCAAA.jayasree.k@marlabs.com> Message-ID: <f81b1250602070121y2ee9ee2ey@mail.gmail.com> I had the same problem not so long ago :) 2006/2/7, jayashree <jayasree.k at marlabs.com>: > Hi Zeljko Filipin, > > It's working fine. > > Thank you, > Jayashree. > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Zeljko Filipin > Sent: Tuesday, February 07