From chrismo at clabs.org Tue Feb 1 00:08:06 2005 From: chrismo at clabs.org (Chris Morris) Date: Mon, 31 Jan 2005 23:08:06 -0600 Subject: [Wtr-general] Watir in the news... In-Reply-To: <5.1.0.14.2.20050131163735.03195f30@127.0.0.1> References: <5.1.0.14.2.20050131163735.03195f30@127.0.0.1> Message-ID: <41FF0EB6.3030904@clabs.org> Bret Pettichord wrote: > A preview of our new website: > http://wtr.rubyforge.org/ > > A list of testimonials: > http://wtr.rubyforge.org/wiki/wiki.pl?WatirTestimonials Cool stuff. Side note -- since y'all've now got a firm home base at RubyForge, if you'd rather move off the clabs.org/wtr wiki to the one hosted at RubyForge, feel free. But this isn't a sideways request to move, you're more than welcome to stay on at my place, too. -- Chris http://clabs.org/blogki From bret at pettichord.com Tue Feb 1 00:59:54 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 31 Jan 2005 23:59:54 -0600 Subject: [Wtr-general] wiki In-Reply-To: <41FF0EB6.3030904@clabs.org> References: <5.1.0.14.2.20050131163735.03195f30@127.0.0.1> <5.1.0.14.2.20050131163735.03195f30@127.0.0.1> Message-ID: <5.1.0.14.2.20050131235317.031c2d50@127.0.0.1> At 11:08 PM 1/31/2005, Chris Morris wrote: >Cool stuff. Side note -- since y'all've now got a firm home base at >RubyForge, if you'd rather move off the clabs.org/wtr wiki to the one >hosted at RubyForge, feel free. But this isn't a sideways request to move, >you're more than welcome to stay on at my place, too. As you can see, i've been experimenting with the wiki on RubyForge. It uses UseMod and i am finding that this wiki has some nice features that the CL wiki doesn't seem to have. Like tables. I am thinking that we should put new pages here, but i don't see a compelling reason to move for the sake of moving. We do need some cross links, however. BTW, if you include external links on the new wiki, you have to do HTTP://www.whatever.com. In other words the HTTP part must in all caps. Apparently this is sufficient to keep out the wiki spammers. At least for now. Bret _____________________ Bret Pettichord www.pettichord.com From antony.marcano at testingreflections.com Tue Feb 1 03:39:03 2005 From: antony.marcano at testingreflections.com (Antony Marcano (testingReflections.com)) Date: Tue, 1 Feb 2005 08:39:03 -0000 Subject: [Wtr-general] showModalDialog Watir & Ruby? In-Reply-To: <000901c50806$b1ff9430$6400a8c0@NewDell> Message-ID: <200502010836.j118a9dS030714@rubyforge.org> Thanks Paul Regarding the fact that the script hangs once the dialog is open - am I on the right track with regards to using threads or another process to avoid that? I do actually want to access objects in the window... I can access the objects in the Main Window as I can perform a pageContainsText() on the main window while the dialog is open. I think that there is a container somewhere in the Object model that will allow me to access the dialog. I will take a look through Microsoft's docs on IE and the Rdoc & code to see if there is a way of doing this. If I work it out, I will write it up for anyone else's benefit. If anyone wants to offer help, I would be glad to receive it. > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: 01 February 2005 02:35 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] showModalDialog Watir & Ruby? > > If all you want to do is close the dialog you can find it using the > winClicker > > w= WinClicker.new > hWnd = w.getWindowHandle(/title/) > > > > You can then send messages to it using the regulat windows api - we > could probbly add a method for that. If you want to access objects in > this window, Im sorry, but I think you're on your own. > > Paul > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Antony Marcano > (testingReflections.com) > Sent: 31 January 2005 14:56 > To: wtr-general at rubyforge.org > Cc: 'McMahon, Chris' > Subject: [Wtr-general] showModalDialog Watir & Ruby? > > > Hi, > > I am looking for some any clarification/pointers/help on writing a Watir > script that will work with a site that uses window.showModalDialog(). > > > If you have the solution then there is no need to read the rest of this > e-mail - otherwise please read on for detail. > > BACKGROUND: > I am brand new to both Ruby and Watir (been on my todo list for some > time) and only started looking at it in the last few hours... so perhaps > I am trying to run before I can walk... but did anyone find a solution > for using modal dialogs (see prior mentions of this appended to this > e-mail)? > > The story is that I have a link that opens a dialog: > > onclick="window.showModalDialog(this.href,'newModal'); return > false">TEST NEW MODAL LINK > > (sorry - that link is ugly, but I wanted it to be compact for the > e-mail) > > Problem 1: > If you just click on the link: > > $ie.link(:text, 'TEST NEW MODAL LINK').click > > Then execution of the Watir script hangs. Closing the modal dialog > manually then resumes execution of the Watir script. > > I havn't checked the code but I am assuming that this is because it is > waiting for IE to say it is complete - which of course IE doesn't do > until you close the dialog window. > > I imagine this can be worked around by clicking the link with a new > thread or process (will have to look up how to do that)? Any pointers > are welcomed > > **Problem 2 - More problematic?** > I have also tried looking at accessing the document in the dialog. This > wasn't obvious - despite some experimentation with IRB against a window > that has a dialog open. > > Any pointers to accessing properties &/ methods of the window object > would be appreciated. > > Perhaps a simple way of accessing window.dialogArguments which > (apparently) returns the object sent to the modal dialog: > http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/dia > loga > rguments.asp > > HISTORY: > I have read some of the correspondence (below) and it appears that there > isn't a solution available- apologies if I have missed something? > > > MY NEXT STEPS: > > Hope that someone here has the answers I need. Failing that... > > I intend to investigate: > > Problem 1. > > Threads > I am going to take a look at threads to see if that will help. > http://www.mattriffle.com/mirrors/ruby_book/html/tut_threads.html > > Alternatively, I see there is a way do do this using a Clicker run as a > separate process. > > AVOIDING waitForIE > I suspect I have to get deeper and revert to Win32OLE to do that? > > Problem 2. > > ACCESSING properties and methods of the window object through Ruby > > If someone has already scripted against modal Dialogs in IE then please > let me know. > > **If not, then any pointers/suggestions/ideas would be gratefully > received.** > > Thanks > > Antony Marcano > http://antonymarcano.testingReflections.com > > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > > bounces at rubyforge.org] On Behalf Of Paul Rogers > > Sent: 13 January 2005 23:29 > > To: wtr-general at rubyforge.org > > Subject: RE: Plan B : Re: [Wtr-general] GUITest? > > > > > > Here are some answers to various emails.... > > > > 1. This is most important - using perl scripts from ruby invalidates > > any warranties! 2. If your window was opened with showModalDialog() or > > showModelEssDialog() > > > http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/showmo > > daldialog.asp?frame=true > > I don't think there Is much we can do. Even spy++ wouldn't tell me > much > > about those windows > > 3. I tried guiTest some time back. I had partial success. > > 4. ther is a method called winsystem (I think) somewhere that you can > > use to start a new process - use it like this: > > winSystem( " start somePerlScript.pl") > > The start in the quotes will cause a new process and a command prompt > > > > Can you post the code that launches this window so we can all have a > > look. > > > > Have fun! > > > > Paul > > > > > > > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of McMahon, Chris > > Sent: 13 January 2005 16:07 > > To: wtr-general at rubyforge.org > > Subject: RE: Plan B : Re: [Wtr-general] GUITest? > > > > > > > > Somebody yell if we need to take this off the list... > > Me and Mr. Morris said > > > > > > I've also tried system ("C:\\Perl\\bin\\perl.exe > > > C:\\click.pl"), and variations with the slashes going the other way, > > > > and with single quotes. > > > > Any pointers on Ruby's "system" would be welcome... > > > > > > > > > > > It can be a bit funky. You can try my cl/util/win dealy in here: > > > http://clabs.org/dl/clutil/clutil.2003.027.0.zip. Just unzip that > > > somewhere, install it, and then add a "require 'cl/util/win'" to > > > your script and that's it. It replaces the system call with one that > > > > should work for Windows. > > > > After a short sanity break, I realized that I fell into the same > trap > > that I did the first time I tried messing with these popups. > > What I really need is a fork()/system() or a thread()/system(). > I > > need to launch the Perl script (to catch the popup) and then return > > control to the Ruby script (to generate the popup). Generating the > > popup causes the Ruby script to hang, thus never executing the > > system(); launching system() causes the Ruby script to hang, thus > > never generating the popup. > > I'm about to ask this question on the ruby-talk list; if anyone > here > > has a convenient solution, let me know? > > -Chris > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From lorenzo_jorquera at yahoo.com Tue Feb 1 09:18:27 2005 From: lorenzo_jorquera at yahoo.com (Lorenzo Jorquera) Date: Tue, 1 Feb 2005 08:18:27 -0600 (CST) Subject: [Wtr-general] showModalDialog Watir & Ruby? In-Reply-To: <000901c50806$b1ff9430$6400a8c0@NewDell> Message-ID: <20050201141827.83381.qmail@web21325.mail.yahoo.com> I was wondering if instead of winclicker, we could use WSH. It can send keys (even especial keys) to an application. Here is a little example that writes 1 to the Calculator. require 'win32ole' wshShell = WIN32OLE.new("WScript.Shell") wshShell.AppActivate("Calc"); #AppActivate search the applications by title wshShell.SendKeys("1") Paul Rogers wrote: If all you want to do is close the dialog you can find it using the winClicker w= WinClicker.new hWnd = w.getWindowHandle(/title/) You can then send messages to it using the regulat windows api - we could probbly add a method for that. If you want to access objects in this window, Im sorry, but I think you're on your own. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Antony Marcano (testingReflections.com) Sent: 31 January 2005 14:56 To: wtr-general at rubyforge.org Cc: 'McMahon, Chris' Subject: [Wtr-general] showModalDialog Watir & Ruby? Hi, I am looking for some any clarification/pointers/help on writing a Watir script that will work with a site that uses window.showModalDialog(). If you have the solution then there is no need to read the rest of this e-mail - otherwise please read on for detail. BACKGROUND: I am brand new to both Ruby and Watir (been on my todo list for some time) and only started looking at it in the last few hours... so perhaps I am trying to run before I can walk... but did anyone find a solution for using modal dialogs (see prior mentions of this appended to this e-mail)? The story is that I have a link that opens a dialog: onclick="window.showModalDialog(this.href,'newModal'); return false">TEST NEW MODAL LINK (sorry - that link is ugly, but I wanted it to be compact for the e-mail) Problem 1: If you just click on the link: $ie.link(:text, 'TEST NEW MODAL LINK').click Then execution of the Watir script hangs. Closing the modal dialog manually then resumes execution of the Watir script. I havn't checked the code but I am assuming that this is because it is waiting for IE to say it is complete - which of course IE doesn't do until you close the dialog window. I imagine this can be worked around by clicking the link with a new thread or process (will have to look up how to do that)? Any pointers are welcomed **Problem 2 - More problematic?** I have also tried looking at accessing the document in the dialog. This wasn't obvious - despite some experimentation with IRB against a window that has a dialog open. Any pointers to accessing properties &/ methods of the window object would be appreciated. Perhaps a simple way of accessing window.dialogArguments which (apparently) returns the object sent to the modal dialog: http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/dia loga rguments.asp HISTORY: I have read some of the correspondence (below) and it appears that there isn't a solution available- apologies if I have missed something? MY NEXT STEPS: Hope that someone here has the answers I need. Failing that... I intend to investigate: Problem 1. Threads I am going to take a look at threads to see if that will help. http://www.mattriffle.com/mirrors/ruby_book/html/tut_threads.html Alternatively, I see there is a way do do this using a Clicker run as a separate process. AVOIDING waitForIE I suspect I have to get deeper and revert to Win32OLE to do that? Problem 2. ACCESSING properties and methods of the window object through Ruby If someone has already scripted against modal Dialogs in IE then please let me know. **If not, then any pointers/suggestions/ideas would be gratefully received.** Thanks Antony Marcano http://antonymarcano.testingReflections.com > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: 13 January 2005 23:29 > To: wtr-general at rubyforge.org > Subject: RE: Plan B : Re: [Wtr-general] GUITest? > > > Here are some answers to various emails.... > > 1. This is most important - using perl scripts from ruby invalidates > any warranties! 2. If your window was opened with showModalDialog() or > showModelEssDialog() > http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/showmo > daldialog.asp?frame=true > I don't think there Is much we can do. Even spy++ wouldn't tell me much > about those windows > 3. I tried guiTest some time back. I had partial success. > 4. ther is a method called winsystem (I think) somewhere that you can > use to start a new process - use it like this: > winSystem( " start somePerlScript.pl") > The start in the quotes will cause a new process and a command prompt > > Can you post the code that launches this window so we can all have a > look. > > Have fun! > > Paul > > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of McMahon, Chris > Sent: 13 January 2005 16:07 > To: wtr-general at rubyforge.org > Subject: RE: Plan B : Re: [Wtr-general] GUITest? > > > > Somebody yell if we need to take this off the list... > Me and Mr. Morris said > > > > I've also tried system ("C:\\Perl\\bin\\perl.exe > > C:\\click.pl"), and variations with the slashes going the other way, > > and with single quotes. > > > Any pointers on Ruby's "system" would be welcome... > > > > > > > > It can be a bit funky. You can try my cl/util/win dealy in here: > > http://clabs.org/dl/clutil/clutil.2003.027.0.zip. Just unzip that > > somewhere, install it, and then add a "require 'cl/util/win'" to > > your script and that's it. It replaces the system call with one that > > should work for Windows. > > After a short sanity break, I realized that I fell into the same trap > that I did the first time I tried messing with these popups. > What I really need is a fork()/system() or a thread()/system(). I > need to launch the Perl script (to catch the popup) and then return > control to the Ruby script (to generate the popup). Generating the > popup causes the Ruby script to hang, thus never executing the > system(); launching system() causes the Ruby script to hang, thus > never generating the popup. > I'm about to ask this question on the ruby-talk list; if anyone here > has a convenient solution, let me know? > -Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > _______________________________________________ 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!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050201/d03778bd/attachment.html From chrismo at clabs.org Tue Feb 1 09:55:56 2005 From: chrismo at clabs.org (Chris Morris) Date: Tue, 01 Feb 2005 08:55:56 -0600 Subject: [Wtr-general] wiki In-Reply-To: <5.1.0.14.2.20050131235317.031c2d50@127.0.0.1> References: <5.1.0.14.2.20050131163735.03195f30@127.0.0.1> <5.1.0.14.2.20050131163735.03195f30@127.0.0.1> <5.1.0.14.2.20050131235317.031c2d50@127.0.0.1> Message-ID: <41FF987C.2000806@clabs.org> Bret Pettichord wrote: > As you can see, i've been experimenting with the wiki on RubyForge. It > uses UseMod and i am finding that this wiki has some nice features > that the CL wiki doesn't seem to have. Like tables. Yeah, my wiki is a bit anemic in the features department :-) -- Chris http://clabs.org From christopher.mcmahon at gmail.com Tue Feb 1 10:58:18 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 1 Feb 2005 08:58:18 -0700 Subject: [Wtr-general] showModalDialog Watir & Ruby? In-Reply-To: <20050201141827.83381.qmail@web21325.mail.yahoo.com> References: <000901c50806$b1ff9430$6400a8c0@NewDell> <20050201141827.83381.qmail@web21325.mail.yahoo.com> Message-ID: <72799cd7050201075810e37c52@mail.gmail.com> Nice: > I was wondering if instead of winclicker, we could use WSH. It can send keys > (even especial keys) to an application. > > Here is a little example that writes 1 to the Calculator. > > require 'win32ole' > wshShell = WIN32OLE.new("WScript.Shell") > wshShell.AppActivate("Calc"); #AppActivate search the applications by title > wshShell.SendKeys("1") This is the same approach I took with my Perl layer. Try this: take your WSH code above and put it inside an infinite loop that sleeps for a second or so. That way, anytime the "Calc" window shows up, your code will do it's thing. I'm handling 3 popup windows and a filesystem operation like this, I and intend to add network and database components. Unfortunately, I can't think of an elegant way to do this in WATIR. -Chris From antony.marcano at testingreflections.com Tue Feb 1 12:54:34 2005 From: antony.marcano at testingreflections.com (Antony Marcano (testingReflections.com)) Date: Tue, 1 Feb 2005 17:54:34 -0000 Subject: [Wtr-general] showModalDialog Watir & Ruby? In-Reply-To: <72799cd7050201075810e37c52@mail.gmail.com> Message-ID: <200502011751.j11HpfdS005353@rubyforge.org> Thanks for the ideas. The problem I am trying to solve is that the dialog contains an HTML document. The HTML contains checkboxes and a input field. So to see if I can at least access the dialogArguments property, I have been rummaging trying to find a way of accessing the DOM window object but it seems that I can only access the document object (am I missing something?) In order to test the inputs on this dialog it is necessary to interact with the document. I will try sendKeys to tab around - I'll see if that works. It seems that the IE interface doesn't allow you to access these dialogs - although there is mention of an IHTMLDialog interface available on: MSDN Home > MSDN Library > Web Development > Programming and Reusing the Browser > MSHTML Reference > Interfaces and Scripting Objects (http://msdn.microsoft.com/workshop/browser/mshtml/reference/ifaces/dialog/d ialog.asp) Perhaps this is accessible somehow through WIN32OLE but I am going to have to learn a lot more before I know whether it's feasible or not. Fortunately, there is a workaround in this case. The Dialog only sets values in the main window based on values set in the dialog. The dialog could then be tested manually. I would prefer it if the dialog testing could be automated but if it can't, it can't... I can think of another workaround which would involve opening a new window containing the same HTML but I will have to see if this impacts the function of the form - I can at least get part way there. Thanks for the input... all useful suggestions. > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Chris McMahon > Sent: 01 February 2005 15:58 > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] showModalDialog Watir & Ruby? > > Nice: > > > I was wondering if instead of winclicker, we could use WSH. It can send > keys > > (even especial keys) to an application. > > > > Here is a little example that writes 1 to the Calculator. > > > > require 'win32ole' > > wshShell = WIN32OLE.new("WScript.Shell") > > wshShell.AppActivate("Calc"); #AppActivate search the applications by > title > > wshShell.SendKeys("1") > > This is the same approach I took with my Perl layer. Try this: take > your WSH code above and put it inside an infinite loop that sleeps for > a second or so. That way, anytime the "Calc" window shows up, your > code will do it's thing. > > I'm handling 3 popup windows and a filesystem operation like this, I > and intend to add network and database components. > > Unfortunately, I can't think of an elegant way to do this in WATIR. > > -Chris > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From christopher.mcmahon at gmail.com Tue Feb 1 13:45:01 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 1 Feb 2005 11:45:01 -0700 Subject: Aha! Re: [Wtr-general] showModalDialog Watir & Ruby? In-Reply-To: <200502011751.j11HpfdS005353@rubyforge.org> References: <72799cd7050201075810e37c52@mail.gmail.com> <200502011751.j11HpfdS005353@rubyforge.org> Message-ID: <72799cd705020110455196b034@mail.gmail.com> Hi Antony.. Have you attempted to use the "attach" method in WATIR? See the "attachToExistingWindow_test.rb" to see how it works. I have not used this feature, but others have, and I *think* it solves your problem. -Chris On Tue, 1 Feb 2005 17:54:34 -0000, Antony Marcano (testingReflections.com) wrote: > Thanks for the ideas. > > The problem I am trying to solve is that the dialog contains an HTML > document. The HTML contains checkboxes and a input field. So to see if I can > at least access the dialogArguments property, I have been rummaging trying > to find a way of accessing the DOM window object but it seems that I can > only access the document object (am I missing something?) From christopher.mcmahon at gmail.com Tue Feb 1 13:54:44 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 1 Feb 2005 11:54:44 -0700 Subject: Frames regression test OK mostly. Re: [Wtr-general] frames are refactored In-Reply-To: <5.1.0.14.2.20050128214059.02543ae0@127.0.0.1> References: <5.1.0.14.2.20050128214059.02543ae0@127.0.0.1> Message-ID: <72799cd7050201105420b18ee8@mail.gmail.com> Hi... On Fri, 28 Jan 2005 21:43:47 -0600, Bret Pettichord wrote: > I've refactored the frame code, replacing the FrameHandler with a real > Frame object. This vastly reduced the amount of code. > > All the tests pass, but i suspect that the error handling may be slightly > different -- possibly better in some cases and worse in others. My tests use most if not all of the frames methods, and they still run in the same way with the same syntax. I'll look into the error handling a bit, but for now: nice job on the refactor! One note, though: ie.frame("myFrame").click still doesn't work; use ie.frame("myFrame").focus instead. -C From paul.rogers at shaw.ca Tue Feb 1 14:06:46 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 01 Feb 2005 12:06:46 -0700 Subject: Aha! Re: [Wtr-general] showModalDialog Watir & Ruby? In-Reply-To: <72799cd705020110455196b034@mail.gmail.com> Message-ID: <001601c50891$30a81890$6400a8c0@NewDell> I tried that last night - no luck ;-( -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: 01 February 2005 11:45 To: wtr-general at rubyforge.org Subject: Aha! Re: [Wtr-general] showModalDialog Watir & Ruby? Hi Antony.. Have you attempted to use the "attach" method in WATIR? See the "attachToExistingWindow_test.rb" to see how it works. I have not used this feature, but others have, and I *think* it solves your problem. -Chris On Tue, 1 Feb 2005 17:54:34 -0000, Antony Marcano (testingReflections.com) wrote: > Thanks for the ideas. > > The problem I am trying to solve is that the dialog contains an HTML > document. The HTML contains checkboxes and a input field. So to see if > I can at least access the dialogArguments property, I have been > rummaging trying to find a way of accessing the DOM window object but > it seems that I can only access the document object (am I missing > something?) _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From christopher.mcmahon at gmail.com Tue Feb 1 14:09:52 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 1 Feb 2005 12:09:52 -0700 Subject: Aha! Re: [Wtr-general] showModalDialog Watir & Ruby? In-Reply-To: <001601c50891$30a81890$6400a8c0@NewDell> References: <72799cd705020110455196b034@mail.gmail.com> <001601c50891$30a81890$6400a8c0@NewDell> Message-ID: <72799cd705020111092757c058@mail.gmail.com> On Tue, 01 Feb 2005 12:06:46 -0700, Paul Rogers wrote: > I tried that last night - no luck ;-( Curses. Foiled. again. -C From christopher.mcmahon at gmail.com Tue Feb 1 14:46:08 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 1 Feb 2005 12:46:08 -0700 Subject: [Wtr-general] test::unit,all_tests.rb, and WATIR docs. In-Reply-To: <72799cd705020111092757c058@mail.gmail.com> References: <72799cd705020110455196b034@mail.gmail.com> <001601c50891$30a81890$6400a8c0@NewDell> <72799cd705020111092757c058@mail.gmail.com> Message-ID: <72799cd7050201114628cfc15e@mail.gmail.com> I need to string a number of tests together in a manner similar to all_tests.rb. Although I have almost no experiece with xUnit, I'm very familiar with assertions/conditionals/rescue, etc. So I'm looking for more detailed information about some things: How does all_tests.rb manage to run each test inside a single browser instance? I don't understand the magic that makes that happen. What does testUnitAddons.rb buy us? I don't understand the context for this set of methods, or its relation to test::unit. Finally, I've discovered the rdoc for Test::Unit on ruby-doc.org, but I think it would be helpful to have a beefier WATIR-specific description of test/unit in the WATIR user doc. (Maybe as a separate page?) -Chris From christopher.mcmahon at gmail.com Tue Feb 1 17:22:14 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 1 Feb 2005 15:22:14 -0700 Subject: [Wtr-general] method ie.pageContainsHTML? Message-ID: <72799cd7050201142226875fa0@mail.gmail.com> ie.pageContainsText isn't working for me. I have to check that a display is in place, and I want the following code to be equivalent so that I can use assert() ################################## t = ie.getHTML.to_s s = "SiteFrame style=\"DISPLAY: none;" if t =~ /#{s}/ then puts "PASS found #{s} in Video1Frame" else puts "FAIL no match" end ########################################### assert(ie.pageContainsText("SiteFrame style=\"DISPLAY: none;")) ################################################# but they're not, so is there a way to implement assert(ie.pageContainsHTML("SiteFrame style=\"DISPLAY: none;") ? -Chris From bret at pettichord.com Tue Feb 1 17:53:36 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 01 Feb 2005 16:53:36 -0600 Subject: [Wtr-general] test::unit,all_tests.rb, and WATIR docs. In-Reply-To: <72799cd7050201114628cfc15e@mail.gmail.com> References: <72799cd705020111092757c058@mail.gmail.com> <72799cd705020110455196b034@mail.gmail.com> <001601c50891$30a81890$6400a8c0@NewDell> <72799cd705020111092757c058@mail.gmail.com> Message-ID: <5.1.0.14.2.20050201162627.0316b268@127.0.0.1> At 01:46 PM 2/1/2005, Chris McMahon wrote: > I need to string a number of tests together in a manner similar >to all_tests.rb. > Although I have almost no experiece with xUnit, I'm very familiar >with assertions/conditionals/rescue, etc. > So I'm looking for more detailed information about some things: > >How does all_tests.rb manage to run each test inside a single browser >instance? I don't understand the magic that makes that happen. we do $ie = IE.new() in the initialization code. This assigns a global variable to a browser. All the tests use this global variable. this code is in setup.rb. >What does testUnitAddons.rb buy us? I don't understand the context >for this set of methods, or its relation to test::unit. it adds four new types of assertions to those normally included in test-unit. >Finally, I've discovered the rdoc for Test::Unit on ruby-doc.org, but >I think it would be helpful to have a beefier WATIR-specific >description of test/unit in the WATIR user doc. (Maybe as a separate >page?) well we need something. i've been putting together a bit of a wrapper around test-unit in the scripting101 materials. this is what it looks like: require 'test/unit' class LoadTestScript < Test::Unit::TestCase def test_login_start load 'testscript.rb' end def teardown $ie.close if $ie end end i've found that many testers would like their tests to look like scripts that can also be run outside of a test harness. i'd like to work on building out this idea further. technically, this really should be a separate module from Watir, because it could also be used for other non-watir tests. _____________________ Bret Pettichord www.pettichord.com From lorenzo_jorquera at yahoo.com Tue Feb 1 19:41:10 2005 From: lorenzo_jorquera at yahoo.com (Lorenzo Jorquera) Date: Tue, 1 Feb 2005 18:41:10 -0600 (CST) Subject: [Wtr-general] using drb to avoid blocking test scripts Message-ID: <20050202004110.6096.qmail@web21324.mail.yahoo.com> Hi! I've been using Watir for a while, and almost the only thing that I didn't like was that the test scripts would block whenever the IE shows a popup window.I don't like very much the WinClicker either, because I feel it?s a little confusing to send the command to close a popup before opening the popup. I was thinking how could a script continue its execution when the IE blocks and I think I may have found something (Sorry if this is something that you have already considered and discarded) I've been playing a little with drb (or Distributed Ruby) and I found that is very easy to run Watir::IE in a server process and make the scripts drive IE throug this server. My English is not very good, so I will show the code. This is the server: ##SERVER require 'drb' require 'watir' aServerObject = Watir::IE.new DRb.start_service('druby://localhost:9000', aServerObject) DRb.thread.join #SERVER If you run this server in the background, then you can can write test script like this: require 'drb' DRb.start_service() ie = DRbObject.new(nil, 'druby://localhost:9000') ie.goto("file://c:\\watir_bonus\\unitTests\\html\\popups1.html") alert = ie.button(:value,'Alert') #THIS IS THE IMPORTANT PART: #THIS WILL NOT BLOCK THE SCRIPT! th = Thread.new {alert.click} #Here you can put code to close the alert # or th.join to wait for the IE to be ready It is a little complicated but I think most of it can be hidden from the end user. What do you think? --------------------------------- Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050201/180c25b3/attachment.html From christopher.mcmahon at gmail.com Wed Feb 2 11:14:03 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 2 Feb 2005 09:14:03 -0700 Subject: [Wtr-general] Figured it out. Test::Unit rawks. Re: method ie.pageContainsHTML? In-Reply-To: <72799cd7050201142226875fa0@mail.gmail.com> References: <72799cd7050201142226875fa0@mail.gmail.com> Message-ID: <72799cd705020208141de9b86c@mail.gmail.com> This solves my problem: assert_match("SiteFrame style=\"DISPLAY: none;",ie.getHTML.to_s) The only funny part is that in the failure case, Test::Unit prints the entire output of ie.getHTML to the console. That's a lot of text. -Chris On Tue, 1 Feb 2005 15:22:14 -0700, Chris McMahon wrote: > ie.pageContainsText isn't working for me. I have to check that a > display is in place, and I want the following code to be equivalent so > that I can use assert() > > ################################## > t = ie.getHTML.to_s > s = "SiteFrame style=\"DISPLAY: none;" > > if t =~ /#{s}/ then > puts "PASS found #{s} in Video1Frame" > else puts "FAIL no match" > end > ########################################### > assert(ie.pageContainsText("SiteFrame style=\"DISPLAY: none;")) > ################################################# > > but they're not, so is there a way to implement > > assert(ie.pageContainsHTML("SiteFrame style=\"DISPLAY: none;") > ? > -Chris > From paul.rogers at shaw.ca Wed Feb 2 11:31:56 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 02 Feb 2005 09:31:56 -0700 Subject: [Wtr-general] Figured it out. Test::Unit rawks. Re: methodie.pageContainsHTML? In-Reply-To: <72799cd705020208141de9b86c@mail.gmail.com> Message-ID: <000b01c50944$b62a78b0$6400a8c0@NewDell> You want to be careful with this. The html that getHTML returns is different to what you see if you do a view source. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: 02 February 2005 09:14 To: wtr-general at rubyforge.org Subject: [Wtr-general] Figured it out. Test::Unit rawks. Re: methodie.pageContainsHTML? This solves my problem: assert_match("SiteFrame style=\"DISPLAY: none;",ie.getHTML.to_s) The only funny part is that in the failure case, Test::Unit prints the entire output of ie.getHTML to the console. That's a lot of text. -Chris On Tue, 1 Feb 2005 15:22:14 -0700, Chris McMahon wrote: > ie.pageContainsText isn't working for me. I have to check that a > display is in place, and I want the following code to be equivalent so > that I can use assert() > > ################################## > t = ie.getHTML.to_s > s = "SiteFrame style=\"DISPLAY: none;" > > if t =~ /#{s}/ then > puts "PASS found #{s} in Video1Frame" > else puts "FAIL no match" > end > ########################################### > assert(ie.pageContainsText("SiteFrame style=\"DISPLAY: none;")) > ################################################# > > but they're not, so is there a way to implement > > assert(ie.pageContainsHTML("SiteFrame style=\"DISPLAY: none;") ? > -Chris > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From christopher.mcmahon at gmail.com Wed Feb 2 11:57:26 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 2 Feb 2005 09:57:26 -0700 Subject: [Wtr-general] Figured it out. Test::Unit rawks. Re: methodie.pageContainsHTML? In-Reply-To: <000b01c50944$b62a78b0$6400a8c0@NewDell> References: <72799cd705020208141de9b86c@mail.gmail.com> <000b01c50944$b62a78b0$6400a8c0@NewDell> Message-ID: <72799cd70502020857636e2f7@mail.gmail.com> On Wed, 02 Feb 2005 09:31:56 -0700, Paul Rogers wrote: > You want to be careful with this. The html that getHTML returns is > different to what you see if you do a view source. > > Paul Understood. Bret mentioned this at AWTA. The example he used was that your actual page might in fact be missing a

tag, but the output from getHTML will include the

tag. In my case, I don't care. I'm not checking for valid HTML, I'm checking that a particular screen layout is in fact in place. As long as *some* criterion points to the existence of that layout, any differences between what's extrapolated from the DOM (getHTML) and what actually exists in the page (View Source) doesn't matter. Test::Unit still rawks. I've wanted to dig into one of these frameworks for some time now, Ruby's makes a lot of sense. -Chris From paul.rogers at shaw.ca Wed Feb 2 12:10:05 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 02 Feb 2005 10:10:05 -0700 Subject: [Wtr-general] Figured it out. Test::Unit rawks. Re:methodie.pageContainsHTML? In-Reply-To: <72799cd70502020857636e2f7@mail.gmail.com> Message-ID: <000e01c5094a$0a842730$6400a8c0@NewDell> Check out this: http://www.pragmaticprogrammer.com/starter_kit/ut/index.html Its for Java but there are lots of ideas that work in ruby too Ive just finished it after Brets recommendation Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: 02 February 2005 09:57 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Figured it out. Test::Unit rawks. Re:methodie.pageContainsHTML? On Wed, 02 Feb 2005 09:31:56 -0700, Paul Rogers wrote: > You want to be careful with this. The html that getHTML returns is > different to what you see if you do a view source. > > Paul Understood. Bret mentioned this at AWTA. The example he used was that your actual page might in fact be missing a

tag, but the output from getHTML will include the

tag. In my case, I don't care. I'm not checking for valid HTML, I'm checking that a particular screen layout is in fact in place. As long as *some* criterion points to the existence of that layout, any differences between what's extrapolated from the DOM (getHTML) and what actually exists in the page (View Source) doesn't matter. Test::Unit still rawks. I've wanted to dig into one of these frameworks for some time now, Ruby's makes a lot of sense. -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From christopher.mcmahon at gmail.com Wed Feb 2 15:26:12 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 2 Feb 2005 13:26:12 -0700 Subject: [Wtr-general] Feature request: send F11 to IE window Message-ID: <72799cd705020212262d1a1ecf@mail.gmail.com> Hi... I'm nearly certain this isn't possible today. My app has a "maximize" button. When maximized, all control buttons are hidden from the user. F11 (or F10 or F9, etc.) will cause the display to revert from maximized to the normal display. Can we have WATIR send an F11 keyboard instruction to the IE window being manipulated? -Chris From christopher.mcmahon at gmail.com Wed Feb 2 15:37:26 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 2 Feb 2005 13:37:26 -0700 Subject: [Wtr-general] Re: Feature request: send F11 to IE window In-Reply-To: <72799cd705020212262d1a1ecf@mail.gmail.com> References: <72799cd705020212262d1a1ecf@mail.gmail.com> Message-ID: <72799cd705020212377eeca6be@mail.gmail.com> On review, F10 would be more useful than F11. F would be best. -C On Wed, 2 Feb 2005 13:26:12 -0700, Chris McMahon wrote: > Hi... > I'm nearly certain this isn't possible today. > My app has a "maximize" button. When maximized, all control > buttons are hidden from the user. F11 (or F10 or F9, etc.) will cause > the display to revert from maximized to the normal display. > Can we have WATIR send an F11 keyboard instruction to the IE > window being manipulated? > -Chris > From chrismo at clabs.org Wed Feb 2 15:49:46 2005 From: chrismo at clabs.org (Chris Morris) Date: Wed, 02 Feb 2005 14:49:46 -0600 Subject: [Wtr-general] Feature request: send F11 to IE window In-Reply-To: <72799cd705020212262d1a1ecf@mail.gmail.com> References: <72799cd705020212262d1a1ecf@mail.gmail.com> Message-ID: <42013CEA.4060805@clabs.org> Chris McMahon wrote: >Hi... > I'm nearly certain this isn't possible today. > My app has a "maximize" button. When maximized, all control >buttons are hidden from the user. F11 (or F10 or F9, etc.) will cause >the display to revert from maximized to the normal display. > > IIRC, F11 is called theater mode or somesuch, and I believe the IE COM interface has a place to set this, and thus WATIR should be able to set this -- just like the visible setting. -- Chris http://clabs.org From jkohl at telusplanet.net Wed Feb 2 16:02:43 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Wed, 2 Feb 2005 13:02:43 -0800 Subject: [Wtr-general] Feature request: send F11 to IE window In-Reply-To: <42013CEA.4060805@clabs.org> References: <72799cd705020212262d1a1ecf@mail.gmail.com> <42013CEA.4060805@clabs.org> Message-ID: <1107378163.42013ff307cb3@webmail.telus.net> I think it's FullScreen. Here is something you can try in class IE (in watir.rb): def full_screen(value) @ie.FullScreen= (value) end call it like this: ie.full_screen(true) in a script or with IRB. It uses this: http://msdn.microsoft.com/workshop/browser/webbrowser/reference/properties/fullscreen.asp "In full-screen mode, the Internet Explorer main window is maximized and the status bar, toolbar, menu bar, and title bar are hidden." This may not be what you're looking for, but give it a shot. to turn off: ie.full_screen(false) iirc, setting it to false just makes the window not-fullscreen, but with no toolbars, etc. To quote Donald Knuth: "Beware of bugs in the above code; I have only proved it correct, not tried it." -Jonathan Quoting Chris Morris : > Chris McMahon wrote: > > >Hi... > > I'm nearly certain this isn't possible today. > > My app has a "maximize" button. When maximized, all control > >buttons are hidden from the user. F11 (or F10 or F9, etc.) will cause > >the display to revert from maximized to the normal display. > > > > > IIRC, F11 is called theater mode or somesuch, and I believe the IE COM > interface has a place to set this, and thus WATIR should be able to set > this -- just like the visible setting. > > -- > Chris > http://clabs.org > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From bret at pettichord.com Wed Feb 2 16:15:40 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 02 Feb 2005 15:15:40 -0600 Subject: [Wtr-general] Re: Feature request: send F11 to IE window In-Reply-To: <72799cd705020212377eeca6be@mail.gmail.com> References: <72799cd705020212262d1a1ecf@mail.gmail.com> <72799cd705020212262d1a1ecf@mail.gmail.com> Message-ID: <5.1.0.14.2.20050202144733.03189488@127.0.0.1> Watir does not currently work by using keyboard commands or menu commands. Instead it uses the OLE interface. One advantage of this approach is that you can run the same tests with IE either visible or invisible. Also, you can have the window covered by another window and the tests will still run. We could start using other methods to directly send keyboard commands to the window. One draw back of this is that the ability to run in the background would be impaired. Even if we only did this with a few Watir commands, users might not realize which commands were using which mechanisms (which they really shouldn't have to know) and then they would find that they could only reliably run their tests in a visible foreground browser. In other words, this request could end up reducing Watir's percieved functionality. Do you simply want the ability to minimize and maximize a window? If we can i'd rather do this using OLE. A quick look didn't reveal it, however. Bret At 02:37 PM 2/2/2005, Chris McMahon wrote: >On review, F10 would be more useful than F11. F would be best. >-C > >On Wed, 2 Feb 2005 13:26:12 -0700, Chris McMahon > wrote: > > Hi... > > I'm nearly certain this isn't possible today. > > My app has a "maximize" button. When maximized, all control > > buttons are hidden from the user. F11 (or F10 or F9, etc.) will cause > > the display to revert from maximized to the normal display. > > Can we have WATIR send an F11 keyboard instruction to the IE > > window being manipulated? > > -Chris > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From lorenzo_jorquera at yahoo.com Wed Feb 2 16:17:09 2005 From: lorenzo_jorquera at yahoo.com (Lorenzo Jorquera) Date: Wed, 2 Feb 2005 15:17:09 -0600 (CST) Subject: [Wtr-general] frames Message-ID: <20050202211709.73064.qmail@web21325.mail.yahoo.com> Hi, I am trying to test a page that has frames but when I use showFrames, I only get irb(main):017:0> ie.showFrames there are 2 frames => 0..1 And I don't get the frames names. Anyone knows why is this happening? I looked into the HTML and the frames are being generated with javascript. Thanks in advanced. Lorenzo --------------------------------- Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050202/54337055/attachment.html From christopher.mcmahon at gmail.com Wed Feb 2 16:24:13 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 2 Feb 2005 14:24:13 -0700 Subject: [Wtr-general] Feature request: send F11 to IE window In-Reply-To: <1107378163.42013ff307cb3@webmail.telus.net> References: <72799cd705020212262d1a1ecf@mail.gmail.com> <42013CEA.4060805@clabs.org> <1107378163.42013ff307cb3@webmail.telus.net> Message-ID: <72799cd705020213247318ed8d@mail.gmail.com> Hi Jonathan > "In full-screen mode, the Internet Explorer main window is maximized and the > status bar, toolbar, menu bar, and title bar are hidden." > This may not be what you're looking for, but give it a shot. > > to turn off: > ie.full_screen(false) > iirc, setting it to false just makes the window not-fullscreen, but with no > toolbars, etc. So the first paragraph is what I accomplish when I use WATIR to click a particular button in the app. The second paragraph isn't quite what I'm after either--I want the toolbars back. I know that F11 returns IE to normal-but-full-screen mode, F10 returns IE to the state I left it, namely normal-and-less-than-full-screen. Is it possible to simply manipulate the top row of keyboard keys (F12, F11, F10, F9, etc.) without reference to DOM/COM? -Chris From christopher.mcmahon at gmail.com Wed Feb 2 16:31:12 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 2 Feb 2005 14:31:12 -0700 Subject: [Wtr-general] Re: Feature request: send F11 to IE window In-Reply-To: <5.1.0.14.2.20050202144733.03189488@127.0.0.1> References: <72799cd705020212262d1a1ecf@mail.gmail.com> <72799cd705020212377eeca6be@mail.gmail.com> <5.1.0.14.2.20050202144733.03189488@127.0.0.1> Message-ID: <72799cd7050202133153c2c3c7@mail.gmail.com> > Do you simply want the ability to minimize and maximize a window? If we can > i'd rather do this using OLE. A quick look didn't reveal it, however. No, it's trickier than that. I'll do a little research, figure out what F10 represents in terms of OLE/COM/whatever (unless someone on the list already knows?), and get back to you. -Chris From jkohl at telusplanet.net Wed Feb 2 16:32:47 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Wed, 2 Feb 2005 13:32:47 -0800 Subject: [Wtr-general] Feature request: send F11 to IE window In-Reply-To: <72799cd705020213247318ed8d@mail.gmail.com> References: <72799cd705020212262d1a1ecf@mail.gmail.com> <42013CEA.4060805@clabs.org> <1107378163.42013ff307cb3@webmail.telus.net> <72799cd705020213247318ed8d@mail.gmail.com> Message-ID: <1107379967.420146ffb6ce8@webmail.telus.net> > So the first paragraph is what I accomplish when I use WATIR to click > a particular button in the app. The second paragraph isn't quite what > I'm after either--I want the toolbars back. hmmm.. that's too bad. I wonder if there is a COM method that we can use other than FullScreen, or use something else with it to get it back in the same mode it was before. > Is it possible to simply manipulate the top row of keyboard keys (F12, > F11, F10, F9, etc.) without reference to DOM/COM? possible, yes, but it can jeopardize some of the cool background functionality that we can get with Watir. (cf. Bret's email). It would be nicer to use built-in browser commands to emulate it if possible. -Jonathan From christopher.mcmahon at gmail.com Wed Feb 2 17:02:19 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 2 Feb 2005 15:02:19 -0700 Subject: More info Re: [Wtr-general] Feature request: send F10 to IE window In-Reply-To: <1107379967.420146ffb6ce8@webmail.telus.net> References: <72799cd705020212262d1a1ecf@mail.gmail.com> <42013CEA.4060805@clabs.org> <1107378163.42013ff307cb3@webmail.telus.net> <72799cd705020213247318ed8d@mail.gmail.com> <1107379967.420146ffb6ce8@webmail.telus.net> Message-ID: <72799cd705020214021a419ba6@mail.gmail.com> I wonder if there is a COM method that we can use other > than FullScreen, or use something else with it to get it back in the same mode > it was before. > Tell me if I'm on the right track: SendInput http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/sendinput.asp accepts virtual key codes: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/WindowsUserInterface/UserInput/VirtualKeyCodes.asp This seems to bear some relation to the WATIR "onKeyPress" method, and resembles even more some of the code in winClicker. If I have to, I can shell out to run a Perl script that'll attach to the window and send F10, but that's just nasty. ;) Not to mention unreliable. I don't really want Perl touching my IE. Popups, yes, but IE itself should be run by pure WATIR I think. -Chris From dallenusa at yahoo.com Wed Feb 2 17:09:48 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Wed, 2 Feb 2005 14:09:48 -0800 (PST) Subject: [Wtr-general] infurgistics grid Message-ID: <20050202220949.89925.qmail@web30505.mail.mud.yahoo.com> Any thoughts on accessing grids? --- Richard Allen wrote: > > The combo also looks very similar. What we use are 4 > or 5 years old so they may be implemented > differently > now. > > > --- Paul Rogers wrote: > > > Is this the grid you mean? > > > > http://www.infragistics.com/products/grids.asp > > > > > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On > Behalf > > Of Richard Allen > > Sent: 28 January 2005 14:26 > > To: Wtr-general at rubyforge.org > > Subject: [Wtr-general] infurgistics grid > > > > > > I didn't see anything that might handle a grid. > This > > is a pretty old control. > > > > > > > > Grid.Columnset(1).Heading = "Description" > > Grid.Columnset(1).Width = 250 > > Grid.Columnset(1).Bound = True > > Grid.Columnset(1).Name = "DeptDesc" > > > > > > > > __________________________________ > > Do you Yahoo!? > > Take Yahoo! Mail with you! Get it on your mobile > > phone. > > http://mobile.yahoo.com/maildemo > > _______________________________________________ > > 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 > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From christopher.mcmahon at gmail.com Wed Feb 2 17:28:36 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 2 Feb 2005 15:28:36 -0700 Subject: [Wtr-general] looping over rows in a table Message-ID: <72799cd70502021428397d3167@mail.gmail.com> Hi... I want to loop over rows in a table by index, doing amazing wonderful WATIR things until I encounter a table index that contains specific text. I'm thinking that the best way to do this is to do a for...in loop with a stupidly large end index, then exit when I find the end row, like so: for i in 1..1000 s = table(:index, i).to_a if s !~ /"myText"/ #do stuff else break end end but that seems inelegant. Can anyone suggest a more foolproof way that doesn't involve a gigantic range of the for...in loop? -Chris From bret at pettichord.com Wed Feb 2 20:10:32 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 02 Feb 2005 19:10:32 -0600 Subject: More info Re: [Wtr-general] Feature request: send F10 to IE window In-Reply-To: <72799cd705020214021a419ba6@mail.gmail.com> References: <1107379967.420146ffb6ce8@webmail.telus.net> <72799cd705020212262d1a1ecf@mail.gmail.com> <42013CEA.4060805@clabs.org> <1107378163.42013ff307cb3@webmail.telus.net> <72799cd705020213247318ed8d@mail.gmail.com> <1107379967.420146ffb6ce8@webmail.telus.net> Message-ID: <5.1.0.14.2.20050202190357.031f2e98@127.0.0.1> At 04:02 PM 2/2/2005, Chris McMahon wrote: >Tell me if I'm on the right track: >SendInput >http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/sendinput.asp >accepts virtual key codes: >http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/WindowsUserInterface/UserInput/VirtualKeyCodes.asp > >This seems to bear some relation to the WATIR "onKeyPress" method, and >resembles even more some of the code in winClicker. The Watir doKeyPress method directly accesses the DOM, so it is something different. (onKeyPress is a JavaScript method -- and something completely different). There is code in winClicker, however, which is similar to this. (Which makes me wonder whether the winClicker code works when IE isn't visible.) >If I have to, I can shell out to run a Perl script that'll attach to >the window and send F10, but that's just nasty. ;) Not to mention >unreliable. I don't really want Perl touching my IE. Popups, yes, >but IE itself should be run by pure WATIR I think. There are both Perl and Ruby libraries that throw key events at windows. If you want to avoid Perl, then you could use http://raa.ruby-lang.org/list.rhtml?name=win32-guitest To me Watir won't be pure if we start throwing raw events at the window. It may, in the end be what we have to do, but i'd like to search for COM interfaces first. Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Feb 2 20:38:51 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 02 Feb 2005 19:38:51 -0600 Subject: [Wtr-general] frames In-Reply-To: <20050202211709.73064.qmail@web21325.mail.yahoo.com> Message-ID: <5.1.0.14.2.20050202193753.0320b2b8@127.0.0.1> At 03:17 PM 2/2/2005, Lorenzo Jorquera wrote: >And I don't get the frames names. Anyone knows why is this happening? > >I looked into the HTML and the frames are being generated with javascript. Please send the HTML and i will look into this. Also tell me what version of Watir you are using. Bret _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Wed Feb 2 20:52:37 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 02 Feb 2005 18:52:37 -0700 Subject: [Wtr-general] frames In-Reply-To: <5.1.0.14.2.20050202193753.0320b2b8@127.0.0.1> Message-ID: <002301c50993$0979d8f0$6400a8c0@NewDell> I believe this was a problem some time back ( the bild from 2-3 weks ago) It might have been the cross site scripting issue -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 02 February 2005 18:39 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] frames At 03:17 PM 2/2/2005, Lorenzo Jorquera wrote: >And I don't get the frames names. Anyone knows why is this happening? > >I looked into the HTML and the frames are being generated with >javascript. Please send the HTML and i will look into this. Also tell me what version of Watir you are using. Bret _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Wed Feb 2 21:15:48 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 02 Feb 2005 20:15:48 -0600 Subject: [Wtr-general] SendKeys Message-ID: <5.1.0.14.2.20050202200706.032034b0@127.0.0.1> Here's something: ie = Watir::IE.start"www.google.com" shell = WIN32OLE.new("WScript.Shell") ie.focus; shell.SendKeys('{F11}') http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wsmthsendkeys.asp _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Wed Feb 2 21:32:00 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 02 Feb 2005 19:32:00 -0700 Subject: [Wtr-general] frames In-Reply-To: <20050202211709.73064.qmail@web21325.mail.yahoo.com> Message-ID: <002401c50998$8a2cfbd0$6400a8c0@NewDell> To help with questions like this, im thinking it would be useful to track what 'version' is being used. class IE include Watir::Exception VERSION = "$Revision: xx $" #cvs adds this then Watir::IE::VERSION tells us which 'version' is being used. Any other suggestions? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Lorenzo Jorquera Sent: 02 February 2005 14:17 To: wtr-general at rubyforge.org Subject: [Wtr-general] frames Hi, I am trying to test a page that has frames but when I use showFrames, I only get irb(main):017:0> ie.showFrames there are 2 frames => 0..1 And I don't get the frames names. Anyone knows why is this happening? I looked into the HTML and the frames are being generated with javascript. Thanks in advanced. Lorenzo _____ Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050202/7c89d80d/attachment.html From bret at pettichord.com Wed Feb 2 02:58:50 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 02 Feb 2005 01:58:50 -0600 Subject: [Wtr-general] using drb to avoid blocking test scripts In-Reply-To: <20050202004110.6096.qmail@web21324.mail.yahoo.com> Message-ID: <5.1.0.14.2.20050202000052.031b0970@127.0.0.1> At 06:41 PM 2/1/2005, Lorenzo Jorquera wrote: >What do you think? Awesome! _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Feb 2 22:38:58 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 02 Feb 2005 21:38:58 -0600 Subject: [Wtr-general] Watir Publicity Suggestions Message-ID: <5.1.0.14.2.20050202213703.01e055c0@127.0.0.1> Chad Fowler sez: >Kind of self-serving, but would you be interested in writing an article >(or getting someone else to write one) on RubyGarden.org? I want to get >more "feature article" type entries up, though they can be pretty >informal. That would be a great way to catalyze a linking >effect--especially if you talk about it both in terms of _what_ it is and >how it's making in-roads in the testing world. The Ruby people love to >hear about Ruby insurgency efforts that are going well. From there, I >could announce the article on ruby-talk and my weblog, and it could start >getting linked from all over the place..... Anyone? >I wonder if there's a way to tie this into the testing framework for >Rails. Rails is getting a lot of publicity/eyeballs lately and has a >really nice testing environment. it would be _really_ neat to somehow >tightly integrate client-side testing into webapps. I might be day >dreaming here ;) This is a great suggestion. I am running into more and more collegues who are falling under the Ruby on Rails spell. Bret _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Thu Feb 3 00:08:36 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 02 Feb 2005 22:08:36 -0700 Subject: [Wtr-general] infurgistics grid In-Reply-To: <20050202220949.89925.qmail@web30505.mail.mud.yahoo.com> Message-ID: <001a01c509ae$6b833e90$6400a8c0@NewDell> Sorry, I havent had a chance to look. I'll see if there is a downloadable demo Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Richard Allen Sent: 02 February 2005 15:10 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] infurgistics grid Any thoughts on accessing grids? --- Richard Allen wrote: > > The combo also looks very similar. What we use are 4 > or 5 years old so they may be implemented > differently > now. > > > --- Paul Rogers wrote: > > > Is this the grid you mean? > > > > http://www.infragistics.com/products/grids.asp > > > > > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On > Behalf > > Of Richard Allen > > Sent: 28 January 2005 14:26 > > To: Wtr-general at rubyforge.org > > Subject: [Wtr-general] infurgistics grid > > > > > > I didn't see anything that might handle a grid. > This > > is a pretty old control. > > > > > > > > Grid.Columnset(1).Heading = "Description" > > Grid.Columnset(1).Width = 250 > > Grid.Columnset(1).Bound = True > > Grid.Columnset(1).Name = "DeptDesc" > > > > > > > > __________________________________ > > Do you Yahoo!? > > Take Yahoo! Mail with you! Get it on your mobile > > phone. > > http://mobile.yahoo.com/maildemo > > _______________________________________________ > > 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 > __________________________________________________ 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 bret at pettichord.com Thu Feb 3 00:10:17 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 02 Feb 2005 23:10:17 -0600 Subject: [Wtr-general] trackers Message-ID: <5.1.0.14.2.20050202230449.0321ca60@127.0.0.1> Jonathan, I'd like to see all of our bugs, feature requests and development stories in a single tracker. (Probably easiest to move them all to feature requests -- can we hide the others?) We can use either the Category or Group field to indicate whether it is a bug or a feature request or a task (these are not always important distinctions to me). (I don't think the current categories are helpful.) I would like to categorize tasks in terms of -- how much work is it -- i am thinking that a scale like 1 hr, 2 hr, 4 hr, 1 day, 2 days, 1 week would be good -- essential estimating within a binary order of magnitude This mail is mostly for Jonathan because he's been good about setting this stuff up, but i'm sending to the list in case anyone else wants to help out or comment. Bret _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Thu Feb 3 00:12:07 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 02 Feb 2005 22:12:07 -0700 Subject: [Wtr-general] looping over rows in a table In-Reply-To: <72799cd70502021428397d3167@mail.gmail.com> Message-ID: <001b01c509ae$e870c030$6400a8c0@NewDell> We could a getTableCount method for i in 0..ie.getTableCount() s = table(:index, i).to_a if s !~ /"myText"/ #do stuff else break end end -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: 02 February 2005 15:29 To: wtr-general at rubyforge.org Subject: [Wtr-general] looping over rows in a table Hi... I want to loop over rows in a table by index, doing amazing wonderful WATIR things until I encounter a table index that contains specific text. I'm thinking that the best way to do this is to do a for...in loop with a stupidly large end index, then exit when I find the end row, like so: for i in 1..1000 s = table(:index, i).to_a if s !~ /"myText"/ #do stuff else break end end but that seems inelegant. Can anyone suggest a more foolproof way that doesn't involve a gigantic range of the for...in loop? -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Thu Feb 3 00:16:00 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 02 Feb 2005 22:16:00 -0700 Subject: [Wtr-general] looping over rows in a table In-Reply-To: <001b01c509ae$e870c030$6400a8c0@NewDell> Message-ID: <001c01c509af$7364cd80$6400a8c0@NewDell> Would a showTables method be beneficial too? The problem would be with nested tables.... -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: 02 February 2005 22:12 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] looping over rows in a table We could a getTableCount method for i in 0..ie.getTableCount() s = table(:index, i).to_a if s !~ /"myText"/ #do stuff else break end end -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: 02 February 2005 15:29 To: wtr-general at rubyforge.org Subject: [Wtr-general] looping over rows in a table Hi... I want to loop over rows in a table by index, doing amazing wonderful WATIR things until I encounter a table index that contains specific text. I'm thinking that the best way to do this is to do a for...in loop with a stupidly large end index, then exit when I find the end row, like so: for i in 1..1000 s = table(:index, i).to_a if s !~ /"myText"/ #do stuff else break end end but that seems inelegant. Can anyone suggest a more foolproof way that doesn't involve a gigantic range of the for...in loop? -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Thu Feb 3 00:36:00 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 02 Feb 2005 22:36:00 -0700 Subject: [Wtr-general] looping over rows in a table In-Reply-To: <001c01c509af$7364cd80$6400a8c0@NewDell> Message-ID: <001d01c509b2$3e4e1360$6400a8c0@NewDell> Here are those methods. Im really too tired to check them in now, and add unit tests. def showTables() allTables = getDocument.body.getElementsByTagName("TABLE") if allTables.length == 0 puts "No Tables!" else i = 0 allTables.each do |t| i+=1 puts "index: #{i} id: #{t.invoke("id")}" end end end def getTableCount() allTables = getDocument.body.getElementsByTagName("TABLE") return allTables.length end -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: 02 February 2005 22:16 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] looping over rows in a table Would a showTables method be beneficial too? The problem would be with nested tables.... -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: 02 February 2005 22:12 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] looping over rows in a table We could a getTableCount method for i in 0..ie.getTableCount() s = table(:index, i).to_a if s !~ /"myText"/ #do stuff else break end end -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: 02 February 2005 15:29 To: wtr-general at rubyforge.org Subject: [Wtr-general] looping over rows in a table Hi... I want to loop over rows in a table by index, doing amazing wonderful WATIR things until I encounter a table index that contains specific text. I'm thinking that the best way to do this is to do a for...in loop with a stupidly large end index, then exit when I find the end row, like so: for i in 1..1000 s = table(:index, i).to_a if s !~ /"myText"/ #do stuff else break end end but that seems inelegant. Can anyone suggest a more foolproof way that doesn't involve a gigantic range of the for...in loop? -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Thu Feb 3 00:40:30 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 02 Feb 2005 22:40:30 -0700 Subject: [Wtr-general] infurgistics grid In-Reply-To: <20050202220949.89925.qmail@web30505.mail.mud.yahoo.com> Message-ID: <001e01c509b2$df18f2b0$6400a8c0@NewDell> Can you confirm which grid you are using? Im going to have to use my very old pentium2 to run Win2K to get a microsft web server, so I want to get it right -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Richard Allen Sent: 02 February 2005 15:10 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] infurgistics grid Any thoughts on accessing grids? --- Richard Allen wrote: > > The combo also looks very similar. What we use are 4 > or 5 years old so they may be implemented > differently > now. > > > --- Paul Rogers wrote: > > > Is this the grid you mean? > > > > http://www.infragistics.com/products/grids.asp > > > > > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On > Behalf > > Of Richard Allen > > Sent: 28 January 2005 14:26 > > To: Wtr-general at rubyforge.org > > Subject: [Wtr-general] infurgistics grid > > > > > > I didn't see anything that might handle a grid. > This > > is a pretty old control. > > > > > > > > Grid.Columnset(1).Heading = "Description" > > Grid.Columnset(1).Width = 250 > > Grid.Columnset(1).Bound = True > > Grid.Columnset(1).Name = "DeptDesc" > > > > > > > > __________________________________ > > Do you Yahoo!? > > Take Yahoo! Mail with you! Get it on your mobile > > phone. > > http://mobile.yahoo.com/maildemo > > _______________________________________________ > > 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 > __________________________________________________ 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 bret at pettichord.com Thu Feb 3 03:36:14 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 03 Feb 2005 02:36:14 -0600 Subject: [Wtr-general] looping over rows in a table In-Reply-To: <001c01c509af$7364cd80$6400a8c0@NewDell> References: <001b01c509ae$e870c030$6400a8c0@NewDell> Message-ID: <5.1.0.14.2.20050203023510.01e04958@127.0.0.1> At 11:16 PM 2/2/2005, Paul Rogers wrote: >The problem would be with nested tables.... not really. if table objects are done correctly, ie.table(:index, 1).show_tables would work. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Feb 3 03:49:13 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 03 Feb 2005 02:49:13 -0600 Subject: [Wtr-general] looping over rows in a table In-Reply-To: <001d01c509b2$3e4e1360$6400a8c0@NewDell> References: <001c01c509af$7364cd80$6400a8c0@NewDell> Message-ID: <5.1.0.14.2.20050203023728.01dbc520@127.0.0.1> At 11:36 PM 2/2/2005, Paul Rogers wrote: > def showTables() > > allTables = getDocument.body.getElementsByTagName("TABLE") > if allTables.length == 0 > puts "No Tables!" > else > i = 0 > allTables.each do |t| > i+=1 > puts "index: #{i} id: #{t.invoke("id")}" > end > end > end > > def getTableCount() > allTables = getDocument.body.getElementsByTagName("TABLE") > return allTables.length > end What we really need is a TableWrapper class. Then we can do def tables() _tables = [] getDocument.body.getElementsByTagName("TABLE").each do | table | tables << TableWrapper.new(table) end return _tables end for table in ie.tables do s = table(:index, i).to_a if s !~ /"myText"/ #do stuff else break end end For an example of how to make a wrapper class, see FormWrapper. TableWrapper could also be used to make a beefier show_tables method. _____________________ Bret Pettichord www.pettichord.com From lorenzo_jorquera at yahoo.com Thu Feb 3 07:59:57 2005 From: lorenzo_jorquera at yahoo.com (Lorenzo Jorquera) Date: Thu, 3 Feb 2005 06:59:57 -0600 (CST) Subject: [Wtr-general] frames In-Reply-To: <5.1.0.14.2.20050202193753.0320b2b8@127.0.0.1> Message-ID: <20050203125957.40488.qmail@web21321.mail.yahoo.com> I found out the problem. It was that I didn?t have access to the frames (because of the cross-site problem). The showFrames method didn't show me the "access denied" message because it only does that if the error message contains the phrase "Access is denied", and as I am working with a Windows version translated to Spanish the error messages says "Acceso denegado" instead... I am not sure about the version of watir that I am using because I picked it from the repository a couple days ago. This is the header from watir.rb # This is Watir, a web application testing tool for Ruby # Home page is http://wtr.rubyforge.com # # Version "$Revision: 1.95 $" # # Typical usage: Lorenzo Bret Pettichord wrote: At 03:17 PM 2/2/2005, Lorenzo Jorquera wrote: >And I don't get the frames names. Anyone knows why is this happening? > >I looked into the HTML and the frames are being generated with javascript. Please send the HTML and i will look into this. Also tell me what version of Watir you are using. Bret _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050203/b3552a4e/attachment.html From christopher.mcmahon at gmail.com Thu Feb 3 10:16:06 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 3 Feb 2005 08:16:06 -0700 Subject: More info Re: [Wtr-general] Feature request: send F10 to IE window In-Reply-To: <5.1.0.14.2.20050202190357.031f2e98@127.0.0.1> References: <72799cd705020212262d1a1ecf@mail.gmail.com> <42013CEA.4060805@clabs.org> <1107378163.42013ff307cb3@webmail.telus.net> <72799cd705020213247318ed8d@mail.gmail.com> <1107379967.420146ffb6ce8@webmail.telus.net> <72799cd705020214021a419ba6@mail.gmail.com> <5.1.0.14.2.20050202190357.031f2e98@127.0.0.1> Message-ID: <72799cd705020307163a8c42ac@mail.gmail.com> > There is code in winClicker, however, which is similar to this. (Which > makes me wonder whether the winClicker code works when IE isn't visible.) It shouldn't care about IE. It'll fail if the popup windows are not visible, though. > If you want to avoid Perl, then you could use > http://raa.ruby-lang.org/list.rhtml?name=win32-guitest This module a) depends on cygwin, making it not very portable b) hasn't been maintained since 2002. Too much overhead for me, although some sort of WATIR-GuiTest interface/relationship would be very powerful. > To me Watir won't be pure if we start throwing raw events at the window. It > may, in the end be what we have to do, but i'd like to search for COM > interfaces first. I agree. But function keys might be a special case. I can't really *make* that case, though, perhaps someone else will. For now, I think the WSH solution is the best one. Thanks! -Chris From bret at pettichord.com Thu Feb 3 09:38:34 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 03 Feb 2005 08:38:34 -0600 Subject: [Wtr-general] frames In-Reply-To: <20050203125957.40488.qmail@web21321.mail.yahoo.com> References: <5.1.0.14.2.20050202193753.0320b2b8@127.0.0.1> Message-ID: <5.1.0.14.2.20050203083652.02a88da8@127.0.0.1> At 06:59 AM 2/3/2005, Lorenzo Jorquera wrote: >I found out the problem. It was that I didn?t have access to the frames >(because of the cross-site problem). > >The showFrames method didn't show me the "access denied" message because >it only does that if the error message contains the phrase "Access is >denied", and as I am working with a Windows version translated to Spanish >the error messages says "Acceso denegado" instead... Can we log this bug? We should catch this exception and then print it (whatever it happens to be) in the showFrames output. Bret _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Thu Feb 3 10:33:57 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 03 Feb 2005 08:33:57 -0700 Subject: [Wtr-general] frames In-Reply-To: <5.1.0.14.2.20050203083652.02a88da8@127.0.0.1> Message-ID: <000c01c50a05$c70931f0$6400a8c0@NewDell> The exception is ugly, which is why I added a reg exp to catch the access denied. It never occurred to me that we would have a multinational audience. Maybe we need a language library.... -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 03 February 2005 07:39 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] frames At 06:59 AM 2/3/2005, Lorenzo Jorquera wrote: >I found out the problem. It was that I didn?t have access to the frames >(because of the cross-site problem). > >The showFrames method didn't show me the "access denied" message >because >it only does that if the error message contains the phrase "Access is >denied", and as I am working with a Windows version translated to Spanish >the error messages says "Acceso denegado" instead... Can we log this bug? We should catch this exception and then print it (whatever it happens to be) in the showFrames output. Bret _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Thu Feb 3 10:36:24 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 03 Feb 2005 08:36:24 -0700 Subject: More info Re: [Wtr-general] Feature request: send F10 to IE window In-Reply-To: <72799cd705020307163a8c42ac@mail.gmail.com> Message-ID: <000d01c50a06$1e627e20$6400a8c0@NewDell> Perhaps we should make a new project - ( WINTIR Windows Testing In Ruby ) and make the winclickers and the guitest stuff go in there. We could then drop winclickers and get the guitest stuff up to date. Any body want to lead this? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: 03 February 2005 08:16 To: wtr-general at rubyforge.org Subject: Re: More info Re: [Wtr-general] Feature request: send F10 to IE window > There is code in winClicker, however, which is similar to this. (Which > makes me wonder whether the winClicker code works when IE isn't > visible.) It shouldn't care about IE. It'll fail if the popup windows are not visible, though. > If you want to avoid Perl, then you could use > http://raa.ruby-lang.org/list.rhtml?name=win32-guitest This module a) depends on cygwin, making it not very portable b) hasn't been maintained since 2002. Too much overhead for me, although some sort of WATIR-GuiTest interface/relationship would be very powerful. > To me Watir won't be pure if we start throwing raw events at the > window. It may, in the end be what we have to do, but i'd like to > search for COM interfaces first. I agree. But function keys might be a special case. I can't really *make* that case, though, perhaps someone else will. For now, I think the WSH solution is the best one. Thanks! -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From lorenzo_jorquera at yahoo.com Thu Feb 3 10:49:27 2005 From: lorenzo_jorquera at yahoo.com (Lorenzo Jorquera) Date: Thu, 3 Feb 2005 09:49:27 -0600 (CST) Subject: [Wtr-general] Feature request: send F11 to IE window In-Reply-To: <72799cd705020212262d1a1ecf@mail.gmail.com> Message-ID: <20050203154927.70517.qmail@web21326.mail.yahoo.com> I switched to full-screen mode using this: ie.getIE.parent.FullScreen = true and to get back to the original size: ie.getIE.parent.FullScreen = false ie.getIE.parent.ToolBar = 1 I imagine we could add a couple of methods like these module Watir class IE def fullScreenSwitch if(getIE.parent.FullScreen) then normalScreen else fullScreen end end def normalScreen getIE.parent.FullScreen = false getIE.parent.ToolBar = 1 end def fullScreen getIE.parent.FullScreen = true end end end Chris McMahon wrote: Hi... I'm nearly certain this isn't possible today. My app has a "maximize" button. When maximized, all control buttons are hidden from the user. F11 (or F10 or F9, etc.) will cause the display to revert from maximized to the normal display. Can we have WATIR send an F11 keyboard instruction to the IE window being manipulated? -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050203/5f2e9c91/attachment.html From jkohl at telusplanet.net Thu Feb 3 11:18:31 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Thu, 3 Feb 2005 08:18:31 -0800 Subject: [Wtr-general] Feature request: send F11 to IE window In-Reply-To: <20050203154927.70517.qmail@web21326.mail.yahoo.com> References: <20050203154927.70517.qmail@web21326.mail.yahoo.com> Message-ID: <1107447511.42024ed78d99c@webmail.telus.net> Ah, the method to turn the toolbar back on. cool. Chris, if you drop this in your ie class, this might test out whether a method like this will help you or not: #window goes to full screen, or back to normal # value - boolean. if true, sets to fullscreen. if # false, sets back to normal screen size with toolbar def fullScreen(value) if value @ie.FullScreen = (value) else @ie.FullScreen = (value) @ie.ToolBar = 1 end end Usage: ie.fullScreen(true) #window set to fullscreen ie.fullScreen(false) #fullscreen turned off, toolbar turned on Thanks Lorenzo, that's the method I was looking for. -Jonathan Quoting Lorenzo Jorquera : > I switched to full-screen mode using this: > ie.getIE.parent.FullScreen = true > > and to get back to the original size: > > ie.getIE.parent.FullScreen = false > ie.getIE.parent.ToolBar = 1 > > > I imagine we could add a couple of methods like these > > module Watir > class IE > def fullScreenSwitch > if(getIE.parent.FullScreen) then > normalScreen > else > fullScreen > end > end > > def normalScreen > getIE.parent.FullScreen = false > getIE.parent.ToolBar = 1 > end > > def fullScreen > getIE.parent.FullScreen = true > end > > end > end > > > > > > > > Chris McMahon wrote: > Hi... > I'm nearly certain this isn't possible today. > My app has a "maximize" button. When maximized, all control > buttons are hidden from the user. F11 (or F10 or F9, etc.) will cause > the display to revert from maximized to the normal display. > Can we have WATIR send an F11 keyboard instruction to the IE > window being manipulated? > -Chris > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > --------------------------------- > Do You Yahoo!? > Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del > Mundo. > Vis?ta Yahoo! Noticias. > From christopher.mcmahon at gmail.com Thu Feb 3 11:22:24 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 3 Feb 2005 09:22:24 -0700 Subject: [Wtr-general] Feature request: send F11 to IE window In-Reply-To: <1107447511.42024ed78d99c@webmail.telus.net> References: <20050203154927.70517.qmail@web21326.mail.yahoo.com> <1107447511.42024ed78d99c@webmail.telus.net> Message-ID: <72799cd705020308224ab9096c@mail.gmail.com> I'll be checking this today, thanks for the help! -Chris On Thu, 3 Feb 2005 08:18:31 -0800, jkohl at telusplanet.net wrote: > Ah, the method to turn the toolbar back on. cool. > > Chris, if you drop this in your ie class, this might test out whether a method > like this will help you or not: > > #window goes to full screen, or back to normal > # value - boolean. if true, sets to fullscreen. if > # false, sets back to normal screen size with toolbar > def fullScreen(value) > if value > @ie.FullScreen = (value) > else > @ie.FullScreen = (value) > @ie.ToolBar = 1 > end > > end > > Usage: > ie.fullScreen(true) #window set to fullscreen > ie.fullScreen(false) #fullscreen turned off, toolbar turned on > > Thanks Lorenzo, that's the method I was looking for. > > -Jonathan > > > Quoting Lorenzo Jorquera : > > > I switched to full-screen mode using this: > > ie.getIE.parent.FullScreen = true > > > > and to get back to the original size: > > > > ie.getIE.parent.FullScreen = false > > ie.getIE.parent.ToolBar = 1 > > > > > > I imagine we could add a couple of methods like these > > > > module Watir > > class IE > > def fullScreenSwitch > > if(getIE.parent.FullScreen) then > > normalScreen > > else > > fullScreen > > end > > end > > > > def normalScreen > > getIE.parent.FullScreen = false > > getIE.parent.ToolBar = 1 > > end > > > > def fullScreen > > getIE.parent.FullScreen = true > > end > > > > end > > end > > > > > > > > > > > > > > > > Chris McMahon wrote: > > Hi... > > I'm nearly certain this isn't possible today. > > My app has a "maximize" button. When maximized, all control > > buttons are hidden from the user. F11 (or F10 or F9, etc.) will cause > > the display to revert from maximized to the normal display. > > Can we have WATIR send an F11 keyboard instruction to the IE > > window being manipulated? > > -Chris > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > --------------------------------- > > Do You Yahoo!? > > Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del > > Mundo. > > Vis?ta Yahoo! Noticias. > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From dallenusa at yahoo.com Thu Feb 3 11:51:26 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Thu, 3 Feb 2005 08:51:26 -0800 (PST) Subject: [Wtr-general] infurgistics grid In-Reply-To: <001e01c509b2$df18f2b0$6400a8c0@NewDell> Message-ID: <20050203165126.26528.qmail@web30504.mail.mud.yahoo.com> Paul, In talking with our coders it sounds like what we use is based on pretty old technology. Our coders think I would be banned from the list if I asked this to be included. :) We hope, crossing my fingers, to move to the latest and greatest infurgistics grids in a few months. At that point I'll make a request. There is plenty for us to use and lean at this point with out the grids. --- Paul Rogers wrote: > Can you confirm which grid you are using? Im going > to have to use my > very old pentium2 to run Win2K to get a microsft web > server, so I want > to get it right > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf > Of Richard Allen > Sent: 02 February 2005 15:10 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] infurgistics grid > > > Any thoughts on accessing grids? > > > --- Richard Allen wrote: > > > > > The combo also looks very similar. What we use are > 4 > > or 5 years old so they may be implemented > > differently > > now. > > > > > > --- Paul Rogers wrote: > > > > > Is this the grid you mean? > > > > > > http://www.infragistics.com/products/grids.asp > > > > > > > > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org > > > [mailto:wtr-general-bounces at rubyforge.org] On > > Behalf > > > Of Richard Allen > > > Sent: 28 January 2005 14:26 > > > To: Wtr-general at rubyforge.org > > > Subject: [Wtr-general] infurgistics grid > > > > > > > > > I didn't see anything that might handle a grid. > > This > > > is a pretty old control. > > > > > > > > > > > > Grid.Columnset(1).Heading = > "Description" > > > Grid.Columnset(1).Width = 250 > > > Grid.Columnset(1).Bound = True > > > Grid.Columnset(1).Name = "DeptDesc" > > > > > > > > > > > > __________________________________ > > > Do you Yahoo!? > > > Take Yahoo! Mail with you! Get it on your mobile > > > phone. > > > http://mobile.yahoo.com/maildemo > > > _______________________________________________ > > > 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 > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail From chrishedges at gmail.com Thu Feb 3 13:32:06 2005 From: chrishedges at gmail.com (Chris Hedges) Date: Thu, 3 Feb 2005 11:32:06 -0700 Subject: [Wtr-general] SendKeys In-Reply-To: <5.1.0.14.2.20050202200706.032034b0@127.0.0.1> References: <5.1.0.14.2.20050202200706.032034b0@127.0.0.1> Message-ID: <5820aff605020310325d8f508b@mail.gmail.com> With sendKeys, the ie.focus isn't necessary and the F button command is case sensitive. This is what I used and it works like a charm. shell = WIN32OLE.new("WScript.Shell") shell.SendKeys('{f10}') It wouldn't work until the F in F10 was changed to f10 Chris Hedges On Wed, 02 Feb 2005 20:15:48 -0600, Bret Pettichord wrote: > Here's something: > > ie = Watir::IE.start"www.google.com" > shell = WIN32OLE.new("WScript.Shell") > ie.focus; shell.SendKeys('{F11}') > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wsmthsendkeys.asp > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From christopher.mcmahon at gmail.com Thu Feb 3 15:23:45 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 3 Feb 2005 13:23:45 -0700 Subject: [Wtr-general] Social notes: field engineers and interns. Message-ID: <72799cd70502031223228e8bb6@mail.gmail.com> Hi... Some of my company's field engineers are in town for training. I've been showing them some of the WATIR scripts I've built, and the reaction from the FEs is unanimous: they want it. One of my demo scripts is an effective comprehensive test regardless of the size or configuration of the system. My FEs are now thinking about putting WATIR and my comprehensive script(s) on their laptops for use as a portable diagnostic tool. And BTW, in the interest of full disclosure, Chris Hedges is an intern at my company from Fort Lewis College here in Durango. He wrote his first WATIR test yesterday, and solved my F10 problem today. How cool is that? =) -Chris From jkohl at telusplanet.net Thu Feb 3 15:48:39 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Thu, 3 Feb 2005 12:48:39 -0800 Subject: [Wtr-general] Social notes: field engineers and interns. In-Reply-To: <72799cd70502031223228e8bb6@mail.gmail.com> References: <72799cd70502031223228e8bb6@mail.gmail.com> Message-ID: <1107463719.42028e27dc9ce@webmail.telus.net> Wow, great feedback. Thanks for sharing that. -Jonathan Quoting Chris McMahon : > Hi... > Some of my company's field engineers are in town for training. > I've been showing them some of the WATIR scripts I've built, and the > reaction from the FEs is unanimous: they want it. One of my demo > scripts is an effective comprehensive test regardless of the size or > configuration of the system. > My FEs are now thinking about putting WATIR and my comprehensive > script(s) on their laptops for use as a portable diagnostic tool. > And BTW, in the interest of full disclosure, Chris Hedges is an > intern at my company from Fort Lewis College here in Durango. He > wrote his first WATIR test yesterday, and solved my F10 problem today. > How cool is that? =) > -Chris > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From Muthiah.Chandrasekaran at honeywell.com Fri Feb 4 07:33:39 2005 From: Muthiah.Chandrasekaran at honeywell.com (Muthiah, Chandrasekaran (IE10)) Date: Fri, 4 Feb 2005 05:33:39 -0700 Subject: [Wtr-general] How to identify controls defined in another jsp Message-ID: <77ED2BF75D59D1439F90412CC5B1097416206DC2@ie10-sahara.hiso.honeywell.com> Hi, I am trying to automate a Java based web application. The controls present in the login page are username, password text controls and a submit button. But they are not present in the login.jsp. Instead there is a value being passed in the login jsp, based on which the control is transferred to either JSP 1 or JSP 2. The controls are defined in these JSP's. How can I pass the values to these controls using the login page URL in my WATIR program? Because these controls are not recognized in the login page. The code is given below. require 'watir' URL = "http://sampleurl/login.jsp " puts 'Before Opening the browser' $ie=Watir::IE.start(URL) puts 'After Opening the browser' $ie.textField(:name, "username").set("admin") Here I got the output as >ruby OpenIE.rb Before Opening the browser |\-/|\-/|\-/|After Opening the browser c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2120:in `set': Unable to locate a textfield using name and username (Watir::Exception::UnknownObjectException) from OpenIE.rb:14 >Exit code: 1 Also when I tried to give puts statements before and after the $ie=Watir::IE.start(URL) - URL of the login page, only the msg before the start() is displayed, The puts given after the start() is not displayed. I have given the code below. puts 'Before Opening the browser' # This is displayed $ie=Watir::IE.start(URL) puts 'After Opening the browser' # This is not displayed Can someone provide some solution for this problem? Thanks in advance Regards, Muthiah C -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050204/2bf010eb/attachment.html From irushton at olysoftit.com Fri Feb 4 08:24:12 2005 From: irushton at olysoftit.com (Ian Rushton) Date: Fri, 4 Feb 2005 08:24:12 -0500 Subject: [Wtr-general] How to identify controls defined in another jsp In-Reply-To: <77ED2BF75D59D1439F90412CC5B1097416206DC2@ie10-sahara.hiso.honeywell.com> Message-ID: <200502041321.j14DL9dS029322@rubyforge.org> Muthiah, I had a tricky application as well, lots of javascript. The best advice I got was to use IRB and issue the commands by hand to see what you have. Enter a command prompt and issue the command irb, then issue: require 'watir' $ie=Watir::IE.start(" http://sampleurl/login.jsp") $ie.ShowAllObjects $ie.ShowImages If you can't find what you are looking for, then you will have to look at the output HTML (view source in browser), look for hidden fields that pass values, etc. Based on both the things I found the input fields I was looking for and was able to modify them. Ian Rushton _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Muthiah, Chandrasekaran (IE10) Sent: Friday, February 04, 2005 7:34 AM To: 'wtr-general at rubyforge.org' Subject: [Wtr-general] How to identify controls defined in another jsp Hi, I am trying to automate a Java based web application. The controls present in the login page are username, password text controls and a submit button. But they are not present in the login.jsp. Instead there is a value being passed in the login jsp, based on which the control is transferred to either JSP 1 or JSP 2. The controls are defined in these JSP's. How can I pass the values to these controls using the login page URL in my WATIR program? Because these controls are not recognized in the login page. The code is given below. require 'watir' URL = " http://sampleurl/login.jsp" puts 'Before Opening the browser' $ie=Watir::IE.start(URL) puts 'After Opening the browser' $ie.textField(:name, "username").set("admin") Here I got the output as >ruby OpenIE.rb Before Opening the browser |\-/|\-/|\-/|After Opening the browser c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2120:in `set': Unable to locate a textfield using name and username (Watir::Exception::UnknownObjectException) from OpenIE.rb:14 >Exit code: 1 Also when I tried to give puts statements before and after the $ie=Watir::IE.start(URL) - URL of the login page, only the msg before the start() is displayed, The puts given after the start() is not displayed. I have given the code below. puts 'Before Opening the browser' # This is displayed $ie=Watir::IE.start(URL) puts 'After Opening the browser' # This is not displayed Can someone provide some solution for this problem? Thanks in advance Regards, Muthiah C -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050204/5b9984d2/attachment.html From welkin_inc at hotmail.com Fri Feb 4 10:36:16 2005 From: welkin_inc at hotmail.com (Andrew McFarlane) Date: Fri, 04 Feb 2005 08:36:16 -0700 Subject: [Wtr-general] Clicked the Image, but Got Error Message Message-ID: I finally was able to click on an image in a popup using attach (suggestion--can we put an additional input parameter into attach that specifies the amount of time that we are willing to wait for the popup to appear?). Here's a code snippet: # Press the validate button. $ie.button(:src, /button_validate.gif/).click # Wait for the validation popup window to appear. sleep 5 # Attach to the validation popup window. $ie = Watir::IE.attach(:url, /origin=registerCustomer/ ) # Press the popup's Accept button (click on its image) $ie.image(:src, /accept_Enabled.gif/).click This last call, even though it does what I want it to do, spawns an error message: \c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:469:in `waitForIE': uninitialized constant Watir::IE::WINOLE32RuntimeError (NameError) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1502:in `click' from C:/rubyDev/Infinys/COM/newCustomerAccount2.rb:34 Did I miss something? Andrew McFarlane From bret at pettichord.com Thu Feb 3 14:20:36 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 03 Feb 2005 13:20:36 -0600 Subject: [Wtr-general] SendKeys In-Reply-To: <5820aff605020310325d8f508b@mail.gmail.com> References: <5.1.0.14.2.20050202200706.032034b0@127.0.0.1> <5.1.0.14.2.20050202200706.032034b0@127.0.0.1> Message-ID: <5.1.0.14.2.20050203131916.031eb428@127.0.0.1> At 12:32 PM 2/3/2005, Chris Hedges wrote: >With sendKeys, the ie.focus isn't necessary and the F button command >is case sensitive. This is what I used and it works like a charm. > >shell = WIN32OLE.new("WScript.Shell") >shell.SendKeys('{f10}') > >It wouldn't work until the F in F10 was changed to f10 Interesting. My code (below) was run in irb (where the ie.focus was required) and the f11 worked. I used cut and paste from irb to mail. On Wed, 02 Feb 2005 20:15:48 -0600, Bret Pettichord wrote: > > ie = Watir::IE.start"www.google.com" > > shell = WIN32OLE.new("WScript.Shell") > > ie.focus; shell.SendKeys('{F11}') _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Feb 3 14:27:12 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 03 Feb 2005 13:27:12 -0600 Subject: More info Re: [Wtr-general] Feature request: send F10 to IE window In-Reply-To: <000d01c50a06$1e627e20$6400a8c0@NewDell> References: <72799cd705020307163a8c42ac@mail.gmail.com> Message-ID: <5.1.0.14.2.20050203132441.032366e0@127.0.0.1> I don't think we need to quite that far. I thought there might be another Ruby window clicking library, but now understand that it won't work for us. Oh well. I think we also have an OLE-based solution to the specific request that started this thread. The win clickers still need work, based on a good understanding of threads & processes and windows api's. Bret At 09:36 AM 2/3/2005, Paul Rogers wrote: >Perhaps we should make a new project - ( WINTIR Windows Testing In Ruby >) and make the winclickers and the guitest stuff go in there. > >We could then drop winclickers and get the guitest stuff up to date. > >Any body want to lead this? > >Paul > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon >Sent: 03 February 2005 08:16 >To: wtr-general at rubyforge.org >Subject: Re: More info Re: [Wtr-general] Feature request: send F10 to IE >window > > > > There is code in winClicker, however, which is similar to this. (Which > > > makes me wonder whether the winClicker code works when IE isn't > > visible.) > >It shouldn't care about IE. It'll fail if the popup windows are not >visible, though. > > > If you want to avoid Perl, then you could use > > http://raa.ruby-lang.org/list.rhtml?name=win32-guitest > >This module a) depends on cygwin, making it not very portable b) hasn't >been maintained since 2002. Too much overhead for me, although some >sort of WATIR-GuiTest interface/relationship would be very powerful. > > > To me Watir won't be pure if we start throwing raw events at the > > window. It may, in the end be what we have to do, but i'd like to > > search for COM interfaces first. > >I agree. But function keys might be a special case. I can't really >*make* that case, though, perhaps someone else will. For now, I think >the WSH solution is the best one. > >Thanks! >-Chris >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Fri Feb 4 11:12:35 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 04 Feb 2005 09:12:35 -0700 Subject: [Wtr-general] Clicked the Image, but Got Error Message In-Reply-To: Message-ID: <001701c50ad4$5728bfc0$6400a8c0@NewDell> Looks like we got the text of the exception wrong. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrew McFarlane Sent: 04 February 2005 08:36 To: wtr-general at rubyforge.org Subject: [Wtr-general] Clicked the Image, but Got Error Message I finally was able to click on an image in a popup using attach (suggestion--can we put an additional input parameter into attach that specifies the amount of time that we are willing to wait for the popup to appear?). Here's a code snippet: # Press the validate button. $ie.button(:src, /button_validate.gif/).click # Wait for the validation popup window to appear. sleep 5 # Attach to the validation popup window. $ie = Watir::IE.attach(:url, /origin=registerCustomer/ ) # Press the popup's Accept button (click on its image) $ie.image(:src, /accept_Enabled.gif/).click This last call, even though it does what I want it to do, spawns an error message: \c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:469:in `waitForIE': uninitialized constant Watir::IE::WINOLE32RuntimeError (NameError) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1502:in `click' from C:/rubyDev/Infinys/COM/newCustomerAccount2.rb:34 Did I miss something? Andrew McFarlane _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From christopher.mcmahon at gmail.com Fri Feb 4 11:48:13 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 4 Feb 2005 09:48:13 -0700 Subject: [Wtr-general] WATIR for online help? Message-ID: <72799cd7050204084828651a4@mail.gmail.com> Hi... This is more of a testing question than a WATIR question, but here goes: I've got an app that has online help implemented via a tool called RoboHelp. It's a good target for WATIR because there is a page with some buttons and with two frames: a TOC frame on the left and a information frame on the right. Left frame seems to be control-only, but right frame has links to other right-frame pages. This is fairly complex. The question is: should I bother? Here are the reasons I think I might not want to sign up to automate this testing: A real person has to evaluate each page for spelling/grammar/usability anyway. RoboHelp is probably a pretty robust tool Chance of ever finding an error is slim. Opinions are welcome... -Chris From Muthiah.Chandrasekaran at honeywell.com Fri Feb 4 11:50:43 2005 From: Muthiah.Chandrasekaran at honeywell.com (Muthiah, Chandrasekaran (IE10)) Date: Fri, 4 Feb 2005 09:50:43 -0700 Subject: [Wtr-general] RE: How to identify controls defined in another jsp Message-ID: <77ED2BF75D59D1439F90412CC5B1097416206DC7@ie10-sahara.hiso.honeywell.com> Hi Ian, I tried with the irb. It was giving only one menu object as shown below and no images are shown at all. It cannot identify the text box controls in the page. (Because of frames??? I am not sure about it) Please see the output below. irb(main):004:0> $ie.showAllObjects -----------Objects in page ------------- HTML Document name=menu id= src=signin.jsp?err= => [] irb(main):005:0> $ie.showImages => [] Actually the control names are defined in a separate jsp. I got the names by reading the other jsp. But that JSP is not visible directly to the user. The user will open only the login jsp which displays the controls from this jsp. Hence when I use Watir to open the login jsp, and when I give the names of the controls, it is not recognizing. Because the controls are not defined in login jsp (I believe). Any other way by which this can be done? Or my understanding of the issue is not correct? Looking for your inputs. Regards, Muthiah C -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of wtr-general-request at rubyforge.org Sent: Friday, February 04, 2005 9:17 PM To: wtr-general at rubyforge.org Subject: Wtr-general Digest, Vol 15, Issue 8 Send Wtr-general mailing list submissions to wtr-general at rubyforge.org To subscribe or unsubscribe via the World Wide Web, visit http://rubyforge.org/mailman/listinfo/wtr-general or, via email, send a message with subject or body 'help' to wtr-general-request at rubyforge.org You can reach the person managing the list at wtr-general-owner at rubyforge.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Wtr-general digest..." Today's Topics: 1. Re: Social notes: field engineers and interns. (jkohl at telusplanet.net) 2. How to identify controls defined in another jsp (Muthiah, Chandrasekaran (IE10)) 3. RE: How to identify controls defined in another jsp (Ian Rushton) 4. Clicked the Image, but Got Error Message (Andrew McFarlane) 5. Re: SendKeys (Bret Pettichord) 6. RE: More info Re: [Wtr-general] Feature request: send F10 to IE window (Bret Pettichord) ---------------------------------------------------------------------- Message: 1 Date: Thu, 3 Feb 2005 12:48:39 -0800 From: jkohl at telusplanet.net Subject: Re: [Wtr-general] Social notes: field engineers and interns. To: wtr-general at rubyforge.org Message-ID: <1107463719.42028e27dc9ce at webmail.telus.net> Content-Type: text/plain; charset=ISO-8859-1 Wow, great feedback. Thanks for sharing that. -Jonathan Quoting Chris McMahon : > Hi... > Some of my company's field engineers are in town for training. > I've been showing them some of the WATIR scripts I've built, and the > reaction from the FEs is unanimous: they want it. One of my demo > scripts is an effective comprehensive test regardless of the size or > configuration of the system. > My FEs are now thinking about putting WATIR and my comprehensive > script(s) on their laptops for use as a portable diagnostic tool. > And BTW, in the interest of full disclosure, Chris Hedges is an > intern at my company from Fort Lewis College here in Durango. He > wrote his first WATIR test yesterday, and solved my F10 problem today. > How cool is that? =) > -Chris > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > ------------------------------ Message: 2 Date: Fri, 4 Feb 2005 05:33:39 -0700 From: "Muthiah, Chandrasekaran (IE10)" Subject: [Wtr-general] How to identify controls defined in another jsp To: "'wtr-general at rubyforge.org'" Message-ID: <77ED2BF75D59D1439F90412CC5B1097416206DC2 at ie10-sahara.hiso.honeywell.com> Content-Type: text/plain; charset="us-ascii" Hi, I am trying to automate a Java based web application. The controls present in the login page are username, password text controls and a submit button. But they are not present in the login.jsp. Instead there is a value being passed in the login jsp, based on which the control is transferred to either JSP 1 or JSP 2. The controls are defined in these JSP's. How can I pass the values to these controls using the login page URL in my WATIR program? Because these controls are not recognized in the login page. The code is given below. require 'watir' URL = "http://sampleurl/login.jsp " puts 'Before Opening the browser' $ie=Watir::IE.start(URL) puts 'After Opening the browser' $ie.textField(:name, "username").set("admin") Here I got the output as >ruby OpenIE.rb Before Opening the browser |\-/|\-/|\-/|After Opening the browser c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2120:in `set': Unable to locate a textfield using name and username (Watir::Exception::UnknownObjectException) from OpenIE.rb:14 >Exit code: 1 Also when I tried to give puts statements before and after the $ie=Watir::IE.start(URL) - URL of the login page, only the msg before the start() is displayed, The puts given after the start() is not displayed. I have given the code below. puts 'Before Opening the browser' # This is displayed $ie=Watir::IE.start(URL) puts 'After Opening the browser' # This is not displayed Can someone provide some solution for this problem? Thanks in advance Regards, Muthiah C -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050204/2bf010eb/att achment-0001.htm ------------------------------ Message: 3 Date: Fri, 4 Feb 2005 08:24:12 -0500 From: "Ian Rushton" Subject: RE: [Wtr-general] How to identify controls defined in another jsp To: Message-ID: <200502041321.j14DL9dS029322 at rubyforge.org> Content-Type: text/plain; charset="us-ascii" Muthiah, I had a tricky application as well, lots of javascript. The best advice I got was to use IRB and issue the commands by hand to see what you have. Enter a command prompt and issue the command irb, then issue: require 'watir' $ie=Watir::IE.start(" http://sampleurl/login.jsp") $ie.ShowAllObjects $ie.ShowImages If you can't find what you are looking for, then you will have to look at the output HTML (view source in browser), look for hidden fields that pass values, etc. Based on both the things I found the input fields I was looking for and was able to modify them. Ian Rushton _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Muthiah, Chandrasekaran (IE10) Sent: Friday, February 04, 2005 7:34 AM To: 'wtr-general at rubyforge.org' Subject: [Wtr-general] How to identify controls defined in another jsp Hi, I am trying to automate a Java based web application. The controls present in the login page are username, password text controls and a submit button. But they are not present in the login.jsp. Instead there is a value being passed in the login jsp, based on which the control is transferred to either JSP 1 or JSP 2. The controls are defined in these JSP's. How can I pass the values to these controls using the login page URL in my WATIR program? Because these controls are not recognized in the login page. The code is given below. require 'watir' URL = " http://sampleurl/login.jsp" puts 'Before Opening the browser' $ie=Watir::IE.start(URL) puts 'After Opening the browser' $ie.textField(:name, "username").set("admin") Here I got the output as >ruby OpenIE.rb Before Opening the browser |\-/|\-/|\-/|After Opening the browser c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2120:in `set': Unable to locate a textfield using name and username (Watir::Exception::UnknownObjectException) from OpenIE.rb:14 >Exit code: 1 Also when I tried to give puts statements before and after the $ie=Watir::IE.start(URL) - URL of the login page, only the msg before the start() is displayed, The puts given after the start() is not displayed. I have given the code below. puts 'Before Opening the browser' # This is displayed $ie=Watir::IE.start(URL) puts 'After Opening the browser' # This is not displayed Can someone provide some solution for this problem? Thanks in advance Regards, Muthiah C -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050204/5b9984d2/att achment-0001.htm ------------------------------ Message: 4 Date: Fri, 04 Feb 2005 08:36:16 -0700 From: "Andrew McFarlane" Subject: [Wtr-general] Clicked the Image, but Got Error Message To: wtr-general at rubyforge.org Message-ID: Content-Type: text/plain; format=flowed I finally was able to click on an image in a popup using attach (suggestion--can we put an additional input parameter into attach that specifies the amount of time that we are willing to wait for the popup to appear?). Here's a code snippet: # Press the validate button. $ie.button(:src, /button_validate.gif/).click # Wait for the validation popup window to appear. sleep 5 # Attach to the validation popup window. $ie = Watir::IE.attach(:url, /origin=registerCustomer/ ) # Press the popup's Accept button (click on its image) $ie.image(:src, /accept_Enabled.gif/).click This last call, even though it does what I want it to do, spawns an error message: \c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:469:in `waitForIE': uninitialized constant Watir::IE::WINOLE32RuntimeError (NameError) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1502:in `click' from C:/rubyDev/Infinys/COM/newCustomerAccount2.rb:34 Did I miss something? Andrew McFarlane ------------------------------ Message: 5 Date: Thu, 03 Feb 2005 13:20:36 -0600 From: Bret Pettichord Subject: Re: [Wtr-general] SendKeys To: wtr-general at rubyforge.org Message-ID: <5.1.0.14.2.20050203131916.031eb428 at 127.0.0.1> Content-Type: text/plain; charset="us-ascii"; format=flowed At 12:32 PM 2/3/2005, Chris Hedges wrote: >With sendKeys, the ie.focus isn't necessary and the F button command is >case sensitive. This is what I used and it works like a charm. > >shell = WIN32OLE.new("WScript.Shell") >shell.SendKeys('{f10}') > >It wouldn't work until the F in F10 was changed to f10 Interesting. My code (below) was run in irb (where the ie.focus was required) and the f11 worked. I used cut and paste from irb to mail. On Wed, 02 Feb 2005 20:15:48 -0600, Bret Pettichord wrote: > > ie = Watir::IE.start"www.google.com" > > shell = WIN32OLE.new("WScript.Shell") > > ie.focus; shell.SendKeys('{F11}') _____________________ Bret Pettichord www.pettichord.com ------------------------------ Message: 6 Date: Thu, 03 Feb 2005 13:27:12 -0600 From: Bret Pettichord Subject: RE: More info Re: [Wtr-general] Feature request: send F10 to IE window To: wtr-general at rubyforge.org Message-ID: <5.1.0.14.2.20050203132441.032366e0 at 127.0.0.1> Content-Type: text/plain; charset="us-ascii"; format=flowed I don't think we need to quite that far. I thought there might be another Ruby window clicking library, but now understand that it won't work for us. Oh well. I think we also have an OLE-based solution to the specific request that started this thread. The win clickers still need work, based on a good understanding of threads & processes and windows api's. Bret At 09:36 AM 2/3/2005, Paul Rogers wrote: >Perhaps we should make a new project - ( WINTIR Windows Testing In Ruby >) and make the winclickers and the guitest stuff go in there. > >We could then drop winclickers and get the guitest stuff up to date. > >Any body want to lead this? > >Paul > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon >Sent: 03 February 2005 08:16 >To: wtr-general at rubyforge.org >Subject: Re: More info Re: [Wtr-general] Feature request: send F10 to >IE window > > > > There is code in winClicker, however, which is similar to this. > > (Which > > > makes me wonder whether the winClicker code works when IE isn't > > visible.) > >It shouldn't care about IE. It'll fail if the popup windows are not >visible, though. > > > If you want to avoid Perl, then you could use > > http://raa.ruby-lang.org/list.rhtml?name=win32-guitest > >This module a) depends on cygwin, making it not very portable b) hasn't >been maintained since 2002. Too much overhead for me, although some >sort of WATIR-GuiTest interface/relationship would be very powerful. > > > To me Watir won't be pure if we start throwing raw events at the > > window. It may, in the end be what we have to do, but i'd like to > > search for COM interfaces first. > >I agree. But function keys might be a special case. I can't really >*make* that case, though, perhaps someone else will. For now, I think >the WSH solution is the best one. > >Thanks! >-Chris >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com ------------------------------ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general End of Wtr-general Digest, Vol 15, Issue 8 ****************************************** From christopher.mcmahon at gmail.com Fri Feb 4 12:00:08 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 4 Feb 2005 10:00:08 -0700 Subject: [Wtr-general] RE: How to identify controls defined in another jsp In-Reply-To: <77ED2BF75D59D1439F90412CC5B1097416206DC7@ie10-sahara.hiso.honeywell.com> References: <77ED2BF75D59D1439F90412CC5B1097416206DC7@ie10-sahara.hiso.honeywell.com> Message-ID: <72799cd705020409006018d75e@mail.gmail.com> > > irb(main):004:0> $ie.showAllObjects > -----------Objects in page ------------- > HTML Document name=menu id= > src=signin.jsp?err= That's a frame. Does this work? ie.frame("menu").showAllObjects -Chris From jkohl at telusplanet.net Fri Feb 4 12:00:58 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Fri, 4 Feb 2005 09:00:58 -0800 Subject: [Wtr-general] RE: How to identify controls defined in another jsp In-Reply-To: <77ED2BF75D59D1439F90412CC5B1097416206DC7@ie10-sahara.hiso.honeywell.com> References: <77ED2BF75D59D1439F90412CC5B1097416206DC7@ie10-sahara.hiso.honeywell.com> Message-ID: <1107536458.4203aa4a60375@webmail.telus.net> what does the page source look like? -Jonathan Quoting "Muthiah, Chandrasekaran (IE10)" : > Hi Ian, > > I tried with the irb. It was giving only one menu object as shown below and > no images are shown at all. It cannot identify the text box controls in the > page. (Because of frames??? I am not sure about it) Please see the output > below. > > irb(main):004:0> $ie.showAllObjects > -----------Objects in page ------------- > HTML Document name=menu id= > src=signin.jsp?err= > > > > => [] > irb(main):005:0> $ie.showImages > => [] > > Actually the control names are defined in a separate jsp. I got the names by > reading the other jsp. But that JSP is not visible directly to the user. The > user will open only the login jsp which displays the controls from this jsp. > Hence when I use Watir to open the login jsp, and when I give the names of > the controls, it is not recognizing. Because the controls are not defined in > login jsp (I believe). > > Any other way by which this can be done? Or my understanding of the issue is > not correct? Looking for your inputs. > > Regards, > Muthiah C > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of > wtr-general-request at rubyforge.org > Sent: Friday, February 04, 2005 9:17 PM > To: wtr-general at rubyforge.org > Subject: Wtr-general Digest, Vol 15, Issue 8 > > Send Wtr-general mailing list submissions to > wtr-general at rubyforge.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://rubyforge.org/mailman/listinfo/wtr-general > or, via email, send a message with subject or body 'help' to > wtr-general-request at rubyforge.org > > You can reach the person managing the list at > wtr-general-owner at rubyforge.org > > When replying, please edit your Subject line so it is more specific than > "Re: Contents of Wtr-general digest..." > > > Today's Topics: > > 1. Re: Social notes: field engineers and interns. > (jkohl at telusplanet.net) > 2. How to identify controls defined in another jsp > (Muthiah, Chandrasekaran (IE10)) > 3. RE: How to identify controls defined in another jsp (Ian Rushton) > 4. Clicked the Image, but Got Error Message (Andrew McFarlane) > 5. Re: SendKeys (Bret Pettichord) > 6. RE: More info Re: [Wtr-general] Feature request: send F10 to > IE window (Bret Pettichord) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 3 Feb 2005 12:48:39 -0800 > From: jkohl at telusplanet.net > Subject: Re: [Wtr-general] Social notes: field engineers and interns. > To: wtr-general at rubyforge.org > Message-ID: <1107463719.42028e27dc9ce at webmail.telus.net> > Content-Type: text/plain; charset=ISO-8859-1 > > Wow, great feedback. Thanks for sharing that. > > -Jonathan > > Quoting Chris McMahon : > > > Hi... > > Some of my company's field engineers are in town for training. > > I've been showing them some of the WATIR scripts I've built, and the > > reaction from the FEs is unanimous: they want it. One of my demo > > scripts is an effective comprehensive test regardless of the size or > > configuration of the system. > > My FEs are now thinking about putting WATIR and my comprehensive > > script(s) on their laptops for use as a portable diagnostic tool. > > And BTW, in the interest of full disclosure, Chris Hedges is an > > intern at my company from Fort Lewis College here in Durango. He > > wrote his first WATIR test yesterday, and solved my F10 problem today. > > How cool is that? =) > > -Chris > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > ------------------------------ > > Message: 2 > Date: Fri, 4 Feb 2005 05:33:39 -0700 > From: "Muthiah, Chandrasekaran (IE10)" > > Subject: [Wtr-general] How to identify controls defined in another jsp > To: "'wtr-general at rubyforge.org'" > Message-ID: > > <77ED2BF75D59D1439F90412CC5B1097416206DC2 at ie10-sahara.hiso.honeywell.com> > > Content-Type: text/plain; charset="us-ascii" > > Hi, > > I am trying to automate a Java based web application. > > The controls present in the login page are username, password text controls > and a submit button. But they are not present in the login.jsp. Instead > there is a value being passed in the login jsp, based on which the control > is transferred to either JSP 1 or JSP 2. The controls are defined in these > JSP's. How can I pass the values to these controls using the login page URL > in my WATIR program? Because these controls are not recognized in the login > page. The code is given below. > > require 'watir' > URL = "http://sampleurl/login.jsp " > puts 'Before Opening the browser' > $ie=Watir::IE.start(URL) > puts 'After Opening the browser' > $ie.textField(:name, "username").set("admin") > > Here I got the output as > >ruby OpenIE.rb > Before Opening the browser > |\-/|\-/|\-/|After Opening the browser > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2120:in `set': Unable to locate a > textfield using name and username > (Watir::Exception::UnknownObjectException) > from OpenIE.rb:14 > >Exit code: 1 > > Also when I tried to give puts statements before and after the > $ie=Watir::IE.start(URL) - URL of the login page, only the msg before the > start() is displayed, The puts given after the start() is not displayed. I > have given the code below. > > puts 'Before Opening the browser' # This is displayed > $ie=Watir::IE.start(URL) > puts 'After Opening the browser' # This is not displayed > > Can someone provide some solution for this problem? > > Thanks in advance > Regards, > Muthiah C > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://rubyforge.org/pipermail/wtr-general/attachments/20050204/2bf010eb/att > achment-0001.htm > > ------------------------------ > > Message: 3 > Date: Fri, 4 Feb 2005 08:24:12 -0500 > From: "Ian Rushton" > Subject: RE: [Wtr-general] How to identify controls defined in another > jsp > To: > Message-ID: <200502041321.j14DL9dS029322 at rubyforge.org> > Content-Type: text/plain; charset="us-ascii" > > Muthiah, > > > > I had a tricky application as well, lots of javascript. The best advice I > got was to use IRB and issue the commands by hand to see what you have. > Enter a command prompt and issue the command irb, then issue: > > > > require 'watir' > > $ie=Watir::IE.start(" > http://sampleurl/login.jsp") > > $ie.ShowAllObjects > > $ie.ShowImages > > > > If you can't find what you are looking for, then you will have to look at > the output HTML (view source in browser), look for hidden fields that pass > values, etc. Based on both the things I found the input fields I was > looking for and was able to modify them. > > > > Ian Rushton > > _____ > > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Muthiah, > Chandrasekaran (IE10) > Sent: Friday, February 04, 2005 7:34 AM > To: 'wtr-general at rubyforge.org' > Subject: [Wtr-general] How to identify controls defined in another jsp > > > > Hi, > > I am trying to automate a Java based web application. > > The controls present in the login page are username, password text controls > and a submit button. But they are not present in the login.jsp. Instead > there is a value being passed in the login jsp, based on which the control > is transferred to either JSP 1 or JSP 2. The controls are defined in these > JSP's. How can I pass the values to these controls using the login page URL > in my WATIR program? Because these controls are not recognized in the login > page. The code is given below. > > require 'watir' > URL = " http://sampleurl/login.jsp" > puts 'Before Opening the browser' > $ie=Watir::IE.start(URL) > puts 'After Opening the browser' > $ie.textField(:name, "username").set("admin") > > Here I got the output as > >ruby OpenIE.rb > Before Opening the browser > |\-/|\-/|\-/|After Opening the browser > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2120:in `set': Unable to locate a > textfield using name and username > (Watir::Exception::UnknownObjectException) > > from OpenIE.rb:14 > >Exit code: 1 > > Also when I tried to give puts statements before and after the > $ie=Watir::IE.start(URL) - URL of the login page, only the msg before the > start() is displayed, The puts given after the start() is not displayed. I > have given the code below. > > puts 'Before Opening the browser' # This is displayed > $ie=Watir::IE.start(URL) > puts 'After Opening the browser' # This is not displayed > > Can someone provide some solution for this problem? > > Thanks in advance > Regards, > Muthiah C > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://rubyforge.org/pipermail/wtr-general/attachments/20050204/5b9984d2/att > achment-0001.htm > > ------------------------------ > > Message: 4 > Date: Fri, 04 Feb 2005 08:36:16 -0700 > From: "Andrew McFarlane" > Subject: [Wtr-general] Clicked the Image, but Got Error Message > To: wtr-general at rubyforge.org > Message-ID: > Content-Type: text/plain; format=flowed > > I finally was able to click on an image in a popup using attach > (suggestion--can we put an additional input parameter into attach that > specifies the amount of time that we are willing to wait for the popup to > appear?). Here's a code snippet: > > # Press the validate button. > $ie.button(:src, /button_validate.gif/).click > > # Wait for the validation popup window to appear. > sleep 5 > > # Attach to the validation popup window. > $ie = Watir::IE.attach(:url, /origin=registerCustomer/ ) > > # Press the popup's Accept button (click on its image) $ie.image(:src, > /accept_Enabled.gif/).click > > > This last call, even though it does what I want it to do, spawns an error > message: > > \c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:469:in `waitForIE': uninitialized > constant Watir::IE::WINOLE32RuntimeError (NameError) > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1502:in `click' > from C:/rubyDev/Infinys/COM/newCustomerAccount2.rb:34 > > Did I miss something? > > Andrew McFarlane > > > > > ------------------------------ > > Message: 5 > Date: Thu, 03 Feb 2005 13:20:36 -0600 > From: Bret Pettichord > Subject: Re: [Wtr-general] SendKeys > To: wtr-general at rubyforge.org > Message-ID: <5.1.0.14.2.20050203131916.031eb428 at 127.0.0.1> > Content-Type: text/plain; charset="us-ascii"; format=flowed > > At 12:32 PM 2/3/2005, Chris Hedges wrote: > >With sendKeys, the ie.focus isn't necessary and the F button command is > >case sensitive. This is what I used and it works like a charm. > > > >shell = WIN32OLE.new("WScript.Shell") > >shell.SendKeys('{f10}') > > > >It wouldn't work until the F in F10 was changed to f10 > > Interesting. My code (below) was run in irb (where the ie.focus was > required) and the f11 worked. I used cut and paste from irb to mail. > > On Wed, 02 Feb 2005 20:15:48 -0600, Bret Pettichord > wrote: > > > ie = Watir::IE.start"www.google.com" > > > shell = WIN32OLE.new("WScript.Shell") > > > ie.focus; shell.SendKeys('{F11}') > > _____________________ > Bret Pettichord > www.pettichord.com > > > > ------------------------------ > > Message: 6 > Date: Thu, 03 Feb 2005 13:27:12 -0600 > From: Bret Pettichord > Subject: RE: More info Re: [Wtr-general] Feature request: send F10 to > IE window > To: wtr-general at rubyforge.org > Message-ID: <5.1.0.14.2.20050203132441.032366e0 at 127.0.0.1> > Content-Type: text/plain; charset="us-ascii"; format=flowed > > I don't think we need to quite that far. > > I thought there might be another Ruby window clicking library, but now > understand that it won't work for us. Oh well. > > I think we also have an OLE-based solution to the specific request that > started this thread. > > The win clickers still need work, based on a good understanding of threads & > processes and windows api's. > > Bret > > At 09:36 AM 2/3/2005, Paul Rogers wrote: > >Perhaps we should make a new project - ( WINTIR Windows Testing In Ruby > >) and make the winclickers and the guitest stuff go in there. > > > >We could then drop winclickers and get the guitest stuff up to date. > > > >Any body want to lead this? > > > >Paul > > > >-----Original Message----- > >From: wtr-general-bounces at rubyforge.org > >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon > >Sent: 03 February 2005 08:16 > >To: wtr-general at rubyforge.org > >Subject: Re: More info Re: [Wtr-general] Feature request: send F10 to > >IE window > > > > > > > There is code in winClicker, however, which is similar to this. > > > (Which > > > > > makes me wonder whether the winClicker code works when IE isn't > > > visible.) > > > >It shouldn't care about IE. It'll fail if the popup windows are not > >visible, though. > > > > > If you want to avoid Perl, then you could use > > > http://raa.ruby-lang.org/list.rhtml?name=win32-guitest > > > >This module a) depends on cygwin, making it not very portable b) hasn't > >been maintained since 2002. Too much overhead for me, although some > >sort of WATIR-GuiTest interface/relationship would be very powerful. > > > > > To me Watir won't be pure if we start throwing raw events at the > > > window. It may, in the end be what we have to do, but i'd like to > > > search for COM interfaces first. > > > >I agree. But function keys might be a special case. I can't really > >*make* that case, though, perhaps someone else will. For now, I think > >the WSH solution is the best one. > > > >Thanks! > >-Chris > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > _____________________ > Bret Pettichord > www.pettichord.com > > > > ------------------------------ > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > End of Wtr-general Digest, Vol 15, Issue 8 > ****************************************** > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From christopher.mcmahon at gmail.com Fri Feb 4 12:16:15 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 4 Feb 2005 10:16:15 -0700 Subject: [Wtr-general] code that generates test.txt? Message-ID: <72799cd7050204091669117afb@mail.gmail.com> There's debug output being printed to a file "test.txt" from unittests, but I can't figure out what code generates the file and text. Does anyone know? -Chris From Muthiah.Chandrasekaran at honeywell.com Fri Feb 4 12:20:49 2005 From: Muthiah.Chandrasekaran at honeywell.com (Muthiah, Chandrasekaran (IE10)) Date: Fri, 4 Feb 2005 10:20:49 -0700 Subject: [Wtr-general] RE: How to identify controls defined in another jsp Message-ID: <77ED2BF75D59D1439F90412CC5B1097416206DC8@ie10-sahara.hiso.honeywell.com> Hi All, The solution worked out and I got the problem solved by using $ie.frame("menu").textField(:name, "username").set("abcd") Since the application is using frames, it cannot directly recognize the controls directly. Thanks to all the helping WATIR minds. Regards, Muthiah C From bret at pettichord.com Fri Feb 4 12:15:53 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 04 Feb 2005 11:15:53 -0600 Subject: [Wtr-general] WATIR for online help? In-Reply-To: <72799cd7050204084828651a4@mail.gmail.com> Message-ID: <5.1.0.14.2.20050204111439.03262ca8@127.0.0.1> I could see some value in creating a general program that located links and systematically checked to make sure they didn't 404. But mostly, this isn't really a good automation target. Bret At 10:48 AM 2/4/2005, Chris McMahon wrote: >Hi... > This is more of a testing question than a WATIR question, but here > goes: > I've got an app that has online help implemented via a tool called >RoboHelp. It's a good target for WATIR because there is a page with >some buttons and with two frames: a TOC frame on the left and a >information frame on the right. Left frame seems to be control-only, >but right frame has links to other right-frame pages. This is fairly >complex. > The question is: should I bother? Here are the reasons I think I >might not want to sign up to automate this testing: > > A real person has to evaluate each page for >spelling/grammar/usability anyway. > RoboHelp is probably a pretty robust tool Chance of ever finding >an error is slim. > > Opinions are welcome... >-Chris >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Fri Feb 4 12:21:29 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 04 Feb 2005 11:21:29 -0600 Subject: [Wtr-general] Clicked the Image, but Got Error Message In-Reply-To: Message-ID: <5.1.0.14.2.20050204112050.03245540@127.0.0.1> At 09:36 AM 2/4/2005, Andrew McFarlane wrote: >This last call, even though it does what I want it to do, spawns an error >message: > >\c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:469:in `waitForIE': uninitialized >constant Watir::IE::WINOLE32RuntimeError (NameError) > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1502:in `click' > from C:/rubyDev/Infinys/COM/newCustomerAccount2.rb:34 > >Did I miss something? That's a bug, which happens to be fixed in HEAD. _____________________ Bret Pettichord www.pettichord.com From christopher.mcmahon at gmail.com Fri Feb 4 12:37:28 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 4 Feb 2005 10:37:28 -0700 Subject: [Wtr-general] RE: How to identify controls defined in another jsp In-Reply-To: <77ED2BF75D59D1439F90412CC5B1097416206DC8@ie10-sahara.hiso.honeywell.com> References: <77ED2BF75D59D1439F90412CC5B1097416206DC8@ie10-sahara.hiso.honeywell.com> Message-ID: <72799cd705020409373f9b3092@mail.gmail.com> > The solution worked out and I got the problem solved by using > > $ie.frame("menu").textField(:name, "username").set("abcd") > > Since the application is using frames, it cannot directly recognize the > controls directly. > > Thanks to all the helping WATIR minds. "Frames" is my middle name... =) -Chris From lorenzo_jorquera at yahoo.com Fri Feb 4 12:48:17 2005 From: lorenzo_jorquera at yahoo.com (Lorenzo Jorquera) Date: Fri, 4 Feb 2005 11:48:17 -0600 (CST) Subject: [Wtr-general] RE: How to identify controls defined in another jsp In-Reply-To: <72799cd705020409373f9b3092@mail.gmail.com> Message-ID: <20050204174817.82273.qmail@web21324.mail.yahoo.com> Some people I showed Watir had problems with finding elements that were in frames too. May be there should be methods that search for elements in the entire document (going into frames if necesary)? Chris McMahon wrote: > The solution worked out and I got the problem solved by using > > $ie.frame("menu").textField(:name, "username").set("abcd") > > Since the application is using frames, it cannot directly recognize the > controls directly. > > Thanks to all the helping WATIR minds. "Frames" is my middle name... =) -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050204/1905ecd0/attachment.html From welkin_inc at hotmail.com Fri Feb 4 12:48:29 2005 From: welkin_inc at hotmail.com (Andrew McFarlane) Date: Fri, 04 Feb 2005 10:48:29 -0700 Subject: [Wtr-general] Clicked the Image, but Got Error Message In-Reply-To: <5.1.0.14.2.20050204112050.03245540@127.0.0.1> Message-ID: What do you think about adding an additional parameter to attach so that I can specify a time interval to wait for the window to appear? Thanks. Andrew >From: Bret Pettichord >Reply-To: wtr-general at rubyforge.org >To: wtr-general at rubyforge.org >Subject: Re: [Wtr-general] Clicked the Image, but Got Error Message >Date: Fri, 04 Feb 2005 11:21:29 -0600 > >At 09:36 AM 2/4/2005, Andrew McFarlane wrote: >>This last call, even though it does what I want it to do, spawns an error >>message: >> >>\c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:469:in `waitForIE': uninitialized >>constant Watir::IE::WINOLE32RuntimeError (NameError) >> from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1502:in `click' >> from C:/rubyDev/Infinys/COM/newCustomerAccount2.rb:34 >> >>Did I miss something? > >That's a bug, which happens to be fixed in HEAD. > > > >_____________________ > Bret Pettichord > www.pettichord.com > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general From christopher.mcmahon at gmail.com Fri Feb 4 12:56:48 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 4 Feb 2005 10:56:48 -0700 Subject: [Wtr-general] RE: How to identify controls defined in another jsp In-Reply-To: <20050204174817.82273.qmail@web21324.mail.yahoo.com> References: <72799cd705020409373f9b3092@mail.gmail.com> <20050204174817.82273.qmail@web21324.mail.yahoo.com> Message-ID: <72799cd70502040956503e8494@mail.gmail.com> On Fri, 4 Feb 2005 11:48:17 -0600 (CST), Lorenzo Jorquera wrote: > Some people I showed Watir had problems with finding elements that were in > frames too. > > May be there should be methods that search for elements in the entire > document (going into frames if necesary)? I'm not sure this is a good idea. My application has 5 frames on the top-level page, then each of those frames has at least one and as many as three frames within them. That is an uncontrollable number of objects, and building the classification system for them might be rough. There are cross-site scripting issues to contend with also. I'd prefer to rely on the intelligence and experience of the users to know or to find out what a frame is, and how frames work. -Chris From lorenzo_jorquera at yahoo.com Fri Feb 4 13:11:57 2005 From: lorenzo_jorquera at yahoo.com (Lorenzo Jorquera) Date: Fri, 4 Feb 2005 12:11:57 -0600 (CST) Subject: [Wtr-general] RE: How to identify controls defined in another jsp In-Reply-To: <72799cd70502040956503e8494@mail.gmail.com> Message-ID: <20050204181157.97440.qmail@web21326.mail.yahoo.com> I was thinking about a way for finding the object, not something to use in the the actual scripts. Chris McMahon wrote: On Fri, 4 Feb 2005 11:48:17 -0600 (CST), Lorenzo Jorquera wrote: > Some people I showed Watir had problems with finding elements that were in > frames too. > > May be there should be methods that search for elements in the entire > document (going into frames if necesary)? I'm not sure this is a good idea. My application has 5 frames on the top-level page, then each of those frames has at least one and as many as three frames within them. That is an uncontrollable number of objects, and building the classification system for them might be rough. There are cross-site scripting issues to contend with also. I'd prefer to rely on the intelligence and experience of the users to know or to find out what a frame is, and how frames work. -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050204/0b3b8334/attachment.html From bret at pettichord.com Fri Feb 4 14:01:08 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 04 Feb 2005 13:01:08 -0600 Subject: [Wtr-general] code that generates test.txt? In-Reply-To: <72799cd7050204091669117afb@mail.gmail.com> Message-ID: <5.1.0.14.2.20050204130053.0325a458@127.0.0.1> At 11:16 AM 2/4/2005, Chris McMahon wrote: >There's debug output being printed to a file "test.txt" from >unittests, but I can't figure out what code generates the file and >text. Does anyone know? That comes from the logger defined in setup.rb. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Fri Feb 4 14:05:51 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 04 Feb 2005 13:05:51 -0600 Subject: attach request, was Re: [Wtr-general] Clicked the Image, but Got Error Message In-Reply-To: References: <5.1.0.14.2.20050204112050.03245540@127.0.0.1> Message-ID: <5.1.0.14.2.20050204130233.032ea888@127.0.0.1> At 11:48 AM 2/4/2005, Andrew McFarlane wrote: >What do you think about adding an additional parameter to attach so that I >can specify a time interval to wait for the window to appear? I like the idea. Another thing we need to with the attach code is only attach to IE windows. The code right now will 'attach' to any window matching the specs. I made a note to require that @ie.name == 'Microsoft Internet Explorer' but now i am worried that this will cause it to fail on non-english installs, as well as on installs where the browser is named something like 'AT&T World Net's Microsoft Internet Explorer'. So i think we need to hook off a GUID or something. Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Fri Feb 4 14:10:12 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 04 Feb 2005 13:10:12 -0600 Subject: attach request, was Re: [Wtr-general] Clicked the Image, but Got Error Message Message-ID: <5.1.0.14.2.20050204130838.032f4dc0@127.0.0.1> Actually, i think the method should wait for a window to appear without any change to the signature. We have built waits into other methods, and think the same philosophy should govern here as well. Bret ---- At 11:48 AM 2/4/2005, Andrew McFarlane wrote: >What do you think about adding an additional parameter to attach so that I >can specify a time interval to wait for the window to appear? I like the idea. Another thing we need to with the attach code is only attach to IE windows. The code right now will 'attach' to any window matching the specs. I made a note to require that @ie.name == 'Microsoft Internet Explorer' but now i am worried that this will cause it to fail on non-english installs, as well as on installs where the browser is named something like 'AT&T World Net's Microsoft Internet Explorer'. So i think we need to hook off a GUID or something. Bret _____________________ Bret Pettichord www.pettichord.com From christopher.mcmahon at gmail.com Fri Feb 4 14:10:45 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 4 Feb 2005 12:10:45 -0700 Subject: attach request, was Re: [Wtr-general] Clicked the Image, but Got Error Message In-Reply-To: <5.1.0.14.2.20050204130233.032ea888@127.0.0.1> References: <5.1.0.14.2.20050204112050.03245540@127.0.0.1> <5.1.0.14.2.20050204130233.032ea888@127.0.0.1> Message-ID: <72799cd70502041110749425d1@mail.gmail.com> >The code right now will 'attach' to any window > matching the specs. Really?!? That's actually pretty cool. It would (for instance) allow the user to send F10 or (I guess) "CLOSE" to any window on the machine, instead of just the window being manipulated by WATIR. Again, GuiTest has its own hook to do this, but until GuiTest on Ruby is friendlier, this might be a feature, not a bug. -Chris From bret at pettichord.com Fri Feb 4 14:24:24 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 04 Feb 2005 13:24:24 -0600 Subject: attach request, was Re: [Wtr-general] Clicked the Image, but Got Error Message In-Reply-To: <72799cd70502041110749425d1@mail.gmail.com> References: <5.1.0.14.2.20050204130233.032ea888@127.0.0.1> <5.1.0.14.2.20050204112050.03245540@127.0.0.1> <5.1.0.14.2.20050204130233.032ea888@127.0.0.1> Message-ID: <5.1.0.14.2.20050204132112.03179110@127.0.0.1> At 01:10 PM 2/4/2005, Chris McMahon wrote: > >The code right now will 'attach' to any window > > matching the specs. > >Really?!? That's actually pretty cool. It would (for instance) allow >the user to send F10 or (I guess) "CLOSE" to any window on the >machine, instead of just the window being manipulated by WATIR. >Again, GuiTest has its own hook to do this, but until GuiTest on Ruby >is friendlier, this might be a feature, not a bug. I'm not sure it's quite so cool. The code assumes it is attaching to an IE window, but doesn't in fact check to make sure it is one. So it will probably fail if it actually attaches to a non-IE window. This is a bug that we need to fix. What we need are a separate set of classes to handle dialogs. So far we have a lot of spikes and they really need to be consolidated into a library with unit tests of their own. Bret _____________________ Bret Pettichord www.pettichord.com From lorenzo_jorquera at yahoo.com Fri Feb 4 16:34:49 2005 From: lorenzo_jorquera at yahoo.com (Lorenzo Jorquera) Date: Fri, 4 Feb 2005 15:34:49 -0600 (CST) Subject: [Wtr-general] radio buttons in table Message-ID: <20050204213449.44247.qmail@web21326.mail.yahoo.com> I am writing a script to test a page that has a table that contains radio buttons. I would like to be able to write something like: table.to_a[0][2].click but to_a returns a array of strings. Is there a method that returns the objects contained in a table? If there isn't would you like that I write such a method (TDD, of course)? --------------------------------- Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050204/0abd8603/attachment.html From christopher.mcmahon at gmail.com Fri Feb 4 16:46:27 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 4 Feb 2005 14:46:27 -0700 Subject: [Wtr-general] radio buttons in table In-Reply-To: <20050204213449.44247.qmail@web21326.mail.yahoo.com> References: <20050204213449.44247.qmail@web21326.mail.yahoo.com> Message-ID: <72799cd705020413464270a5d@mail.gmail.com> On Fri, 4 Feb 2005 15:34:49 -0600 (CST), Lorenzo Jorquera wrote: > I am writing a script to test a page that has a table that contains radio > buttons. > I would like to be able to write something like: > table.to_a[0][2].click > but to_a returns a array of strings. I think you want to click buttons by index. ie.button(:index, 1).click ie.button(:index, 3).click Might get you there. Something like a = table(:index, 0).to_a s2 = a[0].to_s puts s2 will put the identifier for the table element into the variable s2. HTH, -Chris From paul.rogers at shaw.ca Fri Feb 4 17:18:27 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 04 Feb 2005 15:18:27 -0700 Subject: attach request, was Re: [Wtr-general] Clicked the Image, but Got Error Message In-Reply-To: <5.1.0.14.2.20050204130838.032f4dc0@127.0.0.1> Message-ID: <002201c50b07$732469d0$6400a8c0@NewDell> So should we also add a max wait time, so that if the window doesn't appear in x seconds we throw an exception? This is fairly easy to do with the timeout library Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 04 February 2005 12:10 To: wtr-general at rubyforge.org Subject: attach request, was Re: [Wtr-general] Clicked the Image, but Got Error Message Actually, i think the method should wait for a window to appear without any change to the signature. We have built waits into other methods, and think the same philosophy should govern here as well. Bret ---- At 11:48 AM 2/4/2005, Andrew McFarlane wrote: >What do you think about adding an additional parameter to attach so >that I >can specify a time interval to wait for the window to appear? I like the idea. Another thing we need to with the attach code is only attach to IE windows. The code right now will 'attach' to any window matching the specs. I made a note to require that @ie.name == 'Microsoft Internet Explorer' but now i am worried that this will cause it to fail on non-english installs, as well as on installs where the browser is named something like 'AT&T World Net's Microsoft Internet Explorer'. So i think we need to hook off a GUID or something. Bret _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Fri Feb 4 17:20:56 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 04 Feb 2005 16:20:56 -0600 Subject: [Wtr-general] radio buttons in table In-Reply-To: <20050204213449.44247.qmail@web21326.mail.yahoo.com> Message-ID: <5.1.0.14.2.20050204161631.0330cda8@127.0.0.1> At 03:34 PM 2/4/2005, Lorenzo Jorquera wrote: >I am writing a script to test a page that has a table that contains radio >buttons. >I would like to be able to write something like: > table.to_a[0][2].click >but to_a returns a array of strings. > >Is there a method that returns the objects contained in a table? > >If there isn't would you like that I write such a method (TDD, of course)? Is this what you would be looking for? table.row(:index, 1).cell(:index, 3).radio(:index, 1).set -- Note that Ruby normally uses 0-based indexing, but we have been using 1-based indexing for Watir. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Fri Feb 4 17:22:54 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 04 Feb 2005 16:22:54 -0600 Subject: attach request, was Re: [Wtr-general] Clicked the Image, but Got Error Message In-Reply-To: <002201c50b07$732469d0$6400a8c0@NewDell> References: <5.1.0.14.2.20050204130838.032f4dc0@127.0.0.1> Message-ID: <5.1.0.14.2.20050204162127.0330a2f8@127.0.0.1> we should do this with both attach and the normal wait method. this should be configurable just like the other settings -- currently they are constants on the IE object, although i think we will want to make a separate configuration object someday. At 04:18 PM 2/4/2005, Paul Rogers wrote: >So should we also add a max wait time, so that if the window doesn't >appear in x seconds we throw an exception? > >This is fairly easy to do with the timeout library _____________________ Bret Pettichord www.pettichord.com From christopher.mcmahon at gmail.com Fri Feb 4 18:31:03 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 4 Feb 2005 16:31:03 -0700 Subject: [Wtr-general] radio buttons in table In-Reply-To: <5.1.0.14.2.20050204161631.0330cda8@127.0.0.1> References: <20050204213449.44247.qmail@web21326.mail.yahoo.com> <5.1.0.14.2.20050204161631.0330cda8@127.0.0.1> Message-ID: <72799cd7050204153155b69d8b@mail.gmail.com> > table.row(:index, 1).cell(:index, 3).radio(:index, 1).set > Y'know, that'd make a nice addition to the "examples" folder in the WATIR distro. -Chris From lorenzo_jorquera at yahoo.com Fri Feb 4 18:53:52 2005 From: lorenzo_jorquera at yahoo.com (Lorenzo Jorquera) Date: Fri, 4 Feb 2005 17:53:52 -0600 (CST) Subject: [Wtr-general] radio buttons in table In-Reply-To: <5.1.0.14.2.20050204161631.0330cda8@127.0.0.1> Message-ID: <20050204235352.59921.qmail@web21324.mail.yahoo.com> Yes, exactly!! thanks!. Bret Pettichord wrote: At 03:34 PM 2/4/2005, Lorenzo Jorquera wrote: >I am writing a script to test a page that has a table that contains radio >buttons. >I would like to be able to write something like: > table.to_a[0][2].click >but to_a returns a array of strings. > >Is there a method that returns the objects contained in a table? > >If there isn't would you like that I write such a method (TDD, of course)? Is this what you would be looking for? table.row(:index, 1).cell(:index, 3).radio(:index, 1).set -- Note that Ruby normally uses 0-based indexing, but we have been using 1-based indexing for Watir. _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050204/2c15a808/attachment.html From paul.rogers at shaw.ca Fri Feb 4 19:05:49 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 04 Feb 2005 17:05:49 -0700 Subject: [Wtr-general] radio buttons in table In-Reply-To: <20050204235352.59921.qmail@web21324.mail.yahoo.com> Message-ID: <002d01c50b16$7356c6a0$6400a8c0@NewDell> One of the things I found very useful in the past is to get text from a table, based on other cells in the table. For example:
NamePaul Rogers
emailpaul.rogers at shaw.ca
fax number123 444 5555 I would then have a method like this: ie.table(:id, 'userdetails').getNextTableCellContent("Name") this would return 'Paul Rogers' this is useful when testing, as we can detect that the correct data ended up in the correct place. So you could definitely write that. I dont think the version I currently have would work with watir. This could also be expanded to getting controls:
NamePaul RogersClick To Edit This User Im assuming here that id_edit_user_1234 is some sort of automatically generated id from the server, so I couldnt just use: ie.button(ie , 'id_edit_user_1234 ').click as I wont know the iD to use. So to try and access this I think we would need to expand the :afterText to work across table cells This is also something I would like to see done Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Lorenzo Jorquera Sent: 04 February 2005 16:54 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] radio buttons in table Yes, exactly!! thanks!. Bret Pettichord wrote: At 03:34 PM 2/4/2005, Lorenzo Jorquera wrote: >I am writing a script to test a page that has a table that contains radio >buttons. >I would like to be able to write something like: > table.to_a[0][2].click >but to_a returns a array of strings. > >Is there a method that returns the objects contained in a table? > >If there isn't would you like that I write such a method (TDD, of course)? Is this what you would be looking for? table.row(:index, 1).cell(:index, 3).radio(:index, 1).set -- Note that Ruby normally uses 0-based indexing, but we have been using 1-based indexing for Watir. _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _____ Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050204/9b5feb33/attachment.html From bret at pettichord.com Fri Feb 4 23:26:57 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 04 Feb 2005 22:26:57 -0600 Subject: [Wtr-general] radio buttons in table In-Reply-To: <72799cd7050204153155b69d8b@mail.gmail.com> References: <5.1.0.14.2.20050204161631.0330cda8@127.0.0.1> <20050204213449.44247.qmail@web21326.mail.yahoo.com> <5.1.0.14.2.20050204161631.0330cda8@127.0.0.1> Message-ID: <5.1.0.14.2.20050204222640.0331e598@127.0.0.1> At 05:31 PM 2/4/2005, Chris McMahon wrote: >Y'know, that'd make a nice addition to the "examples" folder in the >WATIR distro. Any volunteers? _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Feb 5 01:14:00 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 05 Feb 2005 00:14:00 -0600 Subject: [Wtr-general] text and contents Message-ID: <5.1.0.14.2.20050204235031.0333c730@127.0.0.1> Let me tell you about a change i'm making to the Watir interface and then i'll ask for some related advice. Changes Underway I am changing all the method names from being in camelCase to having under_scores. So instead of ie.textField() you will do ie.text_field. Don't panic. We will provide complete backwards compatability for the old interface. But new code will be written in the new way and we will be updating all the doc to feature the new syntax. Why am i doing this? Mainly because this is the standard way of doing things in Ruby and i want to get contributions from other Ruby coders. Making our Ruby code look like Ruby instead of Java makes this a more appealing project for them to work on. At the same time, i am also replacing some methods that say ie.getFoo with simply ie.foo. Using 'get' and 'set' are Java vestiges that make sense in that language, but don't really make sense in Ruby. In fact, it is a benefit that in ruby ie.foo could refer either to a method or to an instance variable with an attribute accessor. An example of this is that the ie.getIE method is being replace by ie.ie attribute accessor. Question 1 As i am making these changes, i've noticed a few inconsistencies that i would like your advice with. We currently have the following methods: ie.getText form.getText frame.getText div.getText cell.getContents textField.getContents All of which do about the same thing (return a string that corresponds to the contents of the object). I am inclined to make all of them just foo.text and in fact to add this method to all objects. So you could have e.g. table.text. Does this make sense? Question 2 We currently have ie.pageContainsText('foo') which returns true or false depending on whether the text is actually contained. It also takes a regular expression. Because of some refactoring, this method is now inherited to be: form.pageContainsText('foo') frame.pageContainsText('foo') so the name is now a misnomer. Should we change this to object.contains_text('foo')? Or just object.contains('foo') since we can also do object.contains(/foo/)? Or should we just remove this method and instead encourage people to do object.text.scan() or object.text.match() -- in other words encourage them to use the built in power of the Ruby libraries, instead of wrapping them up in library-specific methods. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Feb 5 03:42:58 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 05 Feb 2005 02:42:58 -0600 Subject: [Wtr-general] Messages no longer logged Message-ID: <5.1.0.14.2.20050205024107.03346038@127.0.0.1> If you get the latest from HEAD (i.e. the top of the CVS repository), you'll stop seeing all those log messages. If you liked them, you can get them back by doing ie.logger.level = Logger::DEBUG Bret _____________________ Bret Pettichord www.pettichord.com From ati.ozgur at gmail.com Sat Feb 5 05:00:18 2005 From: ati.ozgur at gmail.com (Atilla Ozgur) Date: Sat, 5 Feb 2005 12:00:18 +0200 Subject: [Wtr-general] text and contents In-Reply-To: <5.1.0.14.2.20050204235031.0333c730@127.0.0.1> References: <5.1.0.14.2.20050204235031.0333c730@127.0.0.1> Message-ID: > Question 1 > We currently have the following methods: > > ie.getText > form.getText > frame.getText > div.getText > cell.getContents > textField.getContents > > All of which do about the same thing (return a string that corresponds to > the contents of the object). I am inclined to make all of them just > foo.text and in fact to add this method to all objects. So you could have > e.g. table.text. Does this make sense? > table.text method would be good. > Or should we just remove this method and instead encourage people to do > object.text.scan() or object.text.match() -- in other words encourage them > to use the built in power of the Ruby libraries, instead of wrapping them > up in library-specific methods. > Built-in methods, scan and match have intuitive names, I see no problem using them. As I am not a native-speaker, most people should have no problem either. From bret at pettichord.com Sat Feb 5 05:17:41 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 05 Feb 2005 04:17:41 -0600 Subject: [Wtr-general] text and contents In-Reply-To: References: <5.1.0.14.2.20050204235031.0333c730@127.0.0.1> <5.1.0.14.2.20050204235031.0333c730@127.0.0.1> Message-ID: <5.1.0.14.2.20050205041638.03354bc8@127.0.0.1> At 04:00 AM 2/5/2005, Atilla Ozgur wrote: >Built-in methods, scan and match have intuitive names, I see no >problem using them. As I am not a native-speaker, most people should >have no problem either. Of course, Ruby was designed by a non-native speaker as well. _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Sat Feb 5 11:11:07 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sat, 05 Feb 2005 09:11:07 -0700 Subject: [Wtr-general] text and contents In-Reply-To: <5.1.0.14.2.20050204235031.0333c730@127.0.0.1> Message-ID: <000a01c50b9d$4d06f600$6400a8c0@NewDell> Id agree that getText should become text ( for a text field do we also want text= ?) I think pageContainsText Should remain. This is a simple way of validating a page and will help newbies. I agree that ie.text.scan(/foo/) is a more language correct way, but I think it better for newcomers to get simple easy to use methods, with obvious names. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 04 February 2005 23:14 To: wtr-general at rubyforge.org Subject: [Wtr-general] text and contents Let me tell you about a change i'm making to the Watir interface and then i'll ask for some related advice. Changes Underway I am changing all the method names from being in camelCase to having under_scores. So instead of ie.textField() you will do ie.text_field. Don't panic. We will provide complete backwards compatability for the old interface. But new code will be written in the new way and we will be updating all the doc to feature the new syntax. Why am i doing this? Mainly because this is the standard way of doing things in Ruby and i want to get contributions from other Ruby coders. Making our Ruby code look like Ruby instead of Java makes this a more appealing project for them to work on. At the same time, i am also replacing some methods that say ie.getFoo with simply ie.foo. Using 'get' and 'set' are Java vestiges that make sense in that language, but don't really make sense in Ruby. In fact, it is a benefit that in ruby ie.foo could refer either to a method or to an instance variable with an attribute accessor. An example of this is that the ie.getIE method is being replace by ie.ie attribute accessor. Question 1 As i am making these changes, i've noticed a few inconsistencies that i would like your advice with. We currently have the following methods: ie.getText form.getText frame.getText div.getText cell.getContents textField.getContents All of which do about the same thing (return a string that corresponds to the contents of the object). I am inclined to make all of them just foo.text and in fact to add this method to all objects. So you could have e.g. table.text. Does this make sense? Question 2 We currently have ie.pageContainsText('foo') which returns true or false depending on whether the text is actually contained. It also takes a regular expression. Because of some refactoring, this method is now inherited to be: form.pageContainsText('foo') frame.pageContainsText('foo') so the name is now a misnomer. Should we change this to object.contains_text('foo')? Or just object.contains('foo') since we can also do object.contains(/foo/)? Or should we just remove this method and instead encourage people to do object.text.scan() or object.text.match() -- in other words encourage them to use the built in power of the Ruby libraries, instead of wrapping them up in library-specific methods. _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Sat Feb 5 12:06:14 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Sat, 5 Feb 2005 10:06:14 -0700 Subject: [Wtr-general] text and contents In-Reply-To: <000a01c50b9d$4d06f600$6400a8c0@NewDell> Message-ID: <20050205170504.KNMA4199.priv-edtnes46.telusplanet.net@tintin> I agree with Paul. I think it might make sense to eventually have a "page_contains" method, and we specify whether we are looking for text, or an image, a message in a DIV, etc. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: February 5, 2005 9:11 AM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] text and contents > > Id agree that getText should become text ( for a text field do we also > want text= ?) > I think pageContainsText Should remain. This is a simple way of > validating a page and will help newbies. I agree that > ie.text.scan(/foo/) is a more language correct way, but I think it > better for newcomers to get simple easy to use methods, with obvious > names. > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord > Sent: 04 February 2005 23:14 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] text and contents > > > Let me tell you about a change i'm making to the Watir interface and > then > i'll ask for some related advice. > > > Changes Underway > > I am changing all the method names from being in camelCase to having > under_scores. > > So instead of ie.textField() you will do ie.text_field. > > Don't panic. We will provide complete backwards compatability for the > old > interface. But new code will be written in the new way and we will be > updating all the doc to feature the new syntax. > > Why am i doing this? Mainly because this is the standard way of doing > things in Ruby and i want to get contributions from other Ruby coders. > Making our Ruby code look like Ruby instead of Java makes this a more > appealing project for them to work on. > > At the same time, i am also replacing some methods that say ie.getFoo > with > simply ie.foo. Using 'get' and 'set' are Java vestiges that make sense > in > that language, but don't really make sense in Ruby. In fact, it is a > benefit that in ruby ie.foo could refer either to a method or to an > instance variable with an attribute accessor. An example of this is that > > the ie.getIE method is being replace by ie.ie attribute accessor. > > > Question 1 > > As i am making these changes, i've noticed a few inconsistencies that i > would like your advice with. > > We currently have the following methods: > > ie.getText > form.getText > frame.getText > div.getText > cell.getContents > textField.getContents > > All of which do about the same thing (return a string that corresponds > to > the contents of the object). I am inclined to make all of them just > foo.text and in fact to add this method to all objects. So you could > have > e.g. table.text. Does this make sense? > > > Question 2 > > We currently have ie.pageContainsText('foo') which returns true or false > > depending on whether the text is actually contained. It also takes a > regular expression. Because of some refactoring, this method is now > inherited to be: > > form.pageContainsText('foo') > frame.pageContainsText('foo') > > so the name is now a misnomer. Should we change this to > object.contains_text('foo')? Or just object.contains('foo') since we can > > also do object.contains(/foo/)? > > Or should we just remove this method and instead encourage people to do > object.text.scan() or object.text.match() -- in other words encourage > them > to use the built in power of the Ruby libraries, instead of wrapping > them > up in library-specific methods. > > > > > > > > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Sat Feb 5 14:13:13 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sat, 05 Feb 2005 12:13:13 -0700 Subject: [Wtr-general] Mozilla support Message-ID: <000101c50bb6$bd350890$6400a8c0@NewDell> I hope Ive found a way for us to get access into mozilla, and then firefox. I had been looking at ways to do this using sockets, but then I came across http://www.croczilla.com/jssh I havent managed to get it to work so far, but Ive emailed the author to see if he can help. Can someone else try installing this and see if you can get telnet access into mozilla? Thanks Paul From bret at pettichord.com Sat Feb 5 20:32:47 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 05 Feb 2005 19:32:47 -0600 Subject: [Wtr-general] Mozilla support In-Reply-To: <000101c50bb6$bd350890$6400a8c0@NewDell> Message-ID: <5.1.0.14.2.20050205193000.03351b68@127.0.0.1> As you know, i'm interested in using Selenium for this. There is no reason we shouldn't try both. Part of what we need to do is creat a structure that allows different browser driving mechanisms to be plugged into the basic watir framework, with the current IE/COM driver just one of the possible drivers. Bret At 01:13 PM 2/5/2005, Paul Rogers wrote: >I hope Ive found a way for us to get access into mozilla, and then >firefox. > >I had been looking at ways to do this using sockets, but then I came >across http://www.croczilla.com/jssh > >I havent managed to get it to work so far, but Ive emailed the author to >see if he can help. > >Can someone else try installing this and see if you can get telnet >access into mozilla? > >Thanks > >Paul > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Feb 5 20:29:35 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 05 Feb 2005 19:29:35 -0600 Subject: [Wtr-general] text and contents In-Reply-To: <20050205170504.KNMA4199.priv-edtnes46.telusplanet.net@tint in> References: <000a01c50b9d$4d06f600$6400a8c0@NewDell> Message-ID: <5.1.0.14.2.20050205191843.03356930@127.0.0.1> All of the methods that work with IE, now work with forms and frames. And i expect that we'll be expanding these to work with more objects with time. So we have ie.pageContainsText('foo'), ie.form('bar').pageContainsText('foo'), and ie.frame('baz').pageContainsText('foo'). In each case, the search is restricted to the context of the containing object. Would it make more sense if we called these just contains_text? I think so. (Another idea would be to make ie.page be an actual object, thus allowing ie.page.contains_text, but i don't think it gains us anything.) Also, this method has some retry logic in it. If this is really necessary, then we probably need to add retry logic to lots of other methods (e.g. ie.text). I am thinking that this must have been a vestige from before the wait logic was working correctly. Is there a reason to keep it? Bret At 11:06 AM 2/5/2005, Jonathan Kohl wrote: >I agree with Paul. I think it might make sense to eventually have a >"page_contains" method, and we specify whether we are looking for text, or >an image, a message in a DIV, etc. > >-Jonathan > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > > bounces at rubyforge.org] On Behalf Of Paul Rogers > > Sent: February 5, 2005 9:11 AM > > To: wtr-general at rubyforge.org > > Subject: RE: [Wtr-general] text and contents > > > > Id agree that getText should become text ( for a text field do we also > > want text= ?) > > I think pageContainsText Should remain. This is a simple way of > > validating a page and will help newbies. I agree that > > ie.text.scan(/foo/) is a more language correct way, but I think it > > better for newcomers to get simple easy to use methods, with obvious > > names. > > > > Paul > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord > > Sent: 04 February 2005 23:14 > > To: wtr-general at rubyforge.org > > Subject: [Wtr-general] text and contents > > > > > > Let me tell you about a change i'm making to the Watir interface and > > then > > i'll ask for some related advice. > > > > > > Changes Underway > > > > I am changing all the method names from being in camelCase to having > > under_scores. > > > > So instead of ie.textField() you will do ie.text_field. > > > > Don't panic. We will provide complete backwards compatability for the > > old > > interface. But new code will be written in the new way and we will be > > updating all the doc to feature the new syntax. > > > > Why am i doing this? Mainly because this is the standard way of doing > > things in Ruby and i want to get contributions from other Ruby coders. > > Making our Ruby code look like Ruby instead of Java makes this a more > > appealing project for them to work on. > > > > At the same time, i am also replacing some methods that say ie.getFoo > > with > > simply ie.foo. Using 'get' and 'set' are Java vestiges that make sense > > in > > that language, but don't really make sense in Ruby. In fact, it is a > > benefit that in ruby ie.foo could refer either to a method or to an > > instance variable with an attribute accessor. An example of this is that > > > > the ie.getIE method is being replace by ie.ie attribute accessor. > > > > > > Question 1 > > > > As i am making these changes, i've noticed a few inconsistencies that i > > would like your advice with. > > > > We currently have the following methods: > > > > ie.getText > > form.getText > > frame.getText > > div.getText > > cell.getContents > > textField.getContents > > > > All of which do about the same thing (return a string that corresponds > > to > > the contents of the object). I am inclined to make all of them just > > foo.text and in fact to add this method to all objects. So you could > > have > > e.g. table.text. Does this make sense? > > > > > > Question 2 > > > > We currently have ie.pageContainsText('foo') which returns true or false > > > > depending on whether the text is actually contained. It also takes a > > regular expression. Because of some refactoring, this method is now > > inherited to be: > > > > form.pageContainsText('foo') > > frame.pageContainsText('foo') > > > > so the name is now a misnomer. Should we change this to > > object.contains_text('foo')? Or just object.contains('foo') since we can > > > > also do object.contains(/foo/)? > > > > Or should we just remove this method and instead encourage people to do > > object.text.scan() or object.text.match() -- in other words encourage > > them > > to use the built in power of the Ruby libraries, instead of wrapping > > them > > up in library-specific methods. > > > > > > > > > > > > > > > > > > > > _____________________ > > Bret Pettichord > > www.pettichord.com > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Sat Feb 5 22:18:59 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sat, 05 Feb 2005 20:18:59 -0700 Subject: [Wtr-general] text and contents In-Reply-To: <5.1.0.14.2.20050205191843.03356930@127.0.0.1> Message-ID: <000801c50bfa$9993b190$6400a8c0@NewDell> contains_text works for me! I found I needed the retry logic, but I cant remember why. I'll take a look through my older code and see if I can figure out why. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 05 February 2005 18:30 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] text and contents All of the methods that work with IE, now work with forms and frames. And i expect that we'll be expanding these to work with more objects with time. So we have ie.pageContainsText('foo'), ie.form('bar').pageContainsText('foo'), and ie.frame('baz').pageContainsText('foo'). In each case, the search is restricted to the context of the containing object. Would it make more sense if we called these just contains_text? I think so. (Another idea would be to make ie.page be an actual object, thus allowing ie.page.contains_text, but i don't think it gains us anything.) Also, this method has some retry logic in it. If this is really necessary, then we probably need to add retry logic to lots of other methods (e.g. ie.text). I am thinking that this must have been a vestige from before the wait logic was working correctly. Is there a reason to keep it? Bret At 11:06 AM 2/5/2005, Jonathan Kohl wrote: >I agree with Paul. I think it might make sense to eventually have a >"page_contains" method, and we specify whether we are looking for text, >or an image, a message in a DIV, etc. > >-Jonathan > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > > bounces at rubyforge.org] On Behalf Of Paul Rogers > > Sent: February 5, 2005 9:11 AM > > To: wtr-general at rubyforge.org > > Subject: RE: [Wtr-general] text and contents > > > > Id agree that getText should become text ( for a text field do we > > also want text= ?) I think pageContainsText Should remain. This is a > > simple way of validating a page and will help newbies. I agree that > > ie.text.scan(/foo/) is a more language correct way, but I think it > > better for newcomers to get simple easy to use methods, with obvious > > names. > > > > Paul > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > > Pettichord > > Sent: 04 February 2005 23:14 > > To: wtr-general at rubyforge.org > > Subject: [Wtr-general] text and contents > > > > > > Let me tell you about a change i'm making to the Watir interface and > > then i'll ask for some related advice. > > > > > > Changes Underway > > > > I am changing all the method names from being in camelCase to having > > under_scores. > > > > So instead of ie.textField() you will do ie.text_field. > > > > Don't panic. We will provide complete backwards compatability for > > the old interface. But new code will be written in the new way and > > we will be updating all the doc to feature the new syntax. > > > > Why am i doing this? Mainly because this is the standard way of > > doing things in Ruby and i want to get contributions from other Ruby > > coders. Making our Ruby code look like Ruby instead of Java makes > > this a more appealing project for them to work on. > > > > At the same time, i am also replacing some methods that say > > ie.getFoo with simply ie.foo. Using 'get' and 'set' are Java > > vestiges that make sense in > > that language, but don't really make sense in Ruby. In fact, it is a > > benefit that in ruby ie.foo could refer either to a method or to an > > instance variable with an attribute accessor. An example of this is that > > > > the ie.getIE method is being replace by ie.ie attribute accessor. > > > > > > Question 1 > > > > As i am making these changes, i've noticed a few inconsistencies > > that i would like your advice with. > > > > We currently have the following methods: > > > > ie.getText > > form.getText > > frame.getText > > div.getText > > cell.getContents > > textField.getContents > > > > All of which do about the same thing (return a string that > > corresponds to the contents of the object). I am inclined to make > > all of them just foo.text and in fact to add this method to all > > objects. So you could have > > e.g. table.text. Does this make sense? > > > > > > Question 2 > > > > We currently have ie.pageContainsText('foo') which returns true or > > false > > > > depending on whether the text is actually contained. It also takes a > > regular expression. Because of some refactoring, this method is now > > inherited to be: > > > > form.pageContainsText('foo') > > frame.pageContainsText('foo') > > > > so the name is now a misnomer. Should we change this to > > object.contains_text('foo')? Or just object.contains('foo') since we > > can > > > > also do object.contains(/foo/)? > > > > Or should we just remove this method and instead encourage people to > > do > > object.text.scan() or object.text.match() -- in other words encourage > > them > > to use the built in power of the Ruby libraries, instead of wrapping > > them > > up in library-specific methods. > > > > > > > > > > > > > > > > > > > > _____________________ > > Bret Pettichord > > www.pettichord.com > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From lorenzo_jorquera at yahoo.com Mon Feb 7 08:05:52 2005 From: lorenzo_jorquera at yahoo.com (Lorenzo Jorquera) Date: Mon, 7 Feb 2005 07:05:52 -0600 (CST) Subject: [Wtr-general] radio buttons in table In-Reply-To: <5.1.0.14.2.20050204161631.0330cda8@127.0.0.1> Message-ID: <20050207130552.35847.qmail@web21326.mail.yahoo.com> Hi, As suggested, I've trying this to access a table contents table.row(:index, 1).cell(:index, 3).radio(:index, 1).set But there is not method row for class Table (I am using the latest version from the repository, 1.106). There is a method called row, but it belongs to class IE. Is there something I am missing? Bret Pettichord wrote: At 03:34 PM 2/4/2005, Lorenzo Jorquera wrote: >I am writing a script to test a page that has a table that contains radio >buttons. >I would like to be able to write something like: > table.to_a[0][2].click >but to_a returns a array of strings. > >Is there a method that returns the objects contained in a table? > >If there isn't would you like that I write such a method (TDD, of course)? Is this what you would be looking for? table.row(:index, 1).cell(:index, 3).radio(:index, 1).set -- Note that Ruby normally uses 0-based indexing, but we have been using 1-based indexing for Watir. _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050207/343c6fe2/attachment.html From chrismo at clabs.org Mon Feb 7 11:50:07 2005 From: chrismo at clabs.org (Chris Morris) Date: Mon, 07 Feb 2005 10:50:07 -0600 Subject: [Wtr-general] text and contents In-Reply-To: <5.1.0.14.2.20050204235031.0333c730@127.0.0.1> References: <5.1.0.14.2.20050204235031.0333c730@127.0.0.1> Message-ID: <42079C3F.9020409@clabs.org> Bret Pettichord wrote: > Let me tell you about a change i'm making to the Watir interface and > then i'll ask for some related advice. > > > Changes Underway I'll just cast a general vote in the way you're heading, Bret -- all sound good to me. -- Chris http://clabs.org/blogki From christopher.mcmahon at gmail.com Mon Feb 7 15:05:23 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 7 Feb 2005 13:05:23 -0700 Subject: [Wtr-general] WMI script tool Message-ID: <72799cd705020712052134cb77@mail.gmail.com> Hi... This looks like it could save hours and hours of MSDN research. If you can stomach the soul-sucking registration and the cheezmoid README, it's actually a pretty cool little piece of software. http://www.microsoft.com/downloads/details.aspx?FamilyID=09dfc342-648b-4119-b7eb-783b0f7d1178&displaylang=en -Chris From welkin_inc at hotmail.com Mon Feb 7 16:54:12 2005 From: welkin_inc at hotmail.com (Andrew McFarlane) Date: Mon, 07 Feb 2005 14:54:12 -0700 Subject: [Wtr-general] WMI script tool In-Reply-To: <72799cd705020712052134cb77@mail.gmail.com> Message-ID: Very cool. Now, I just have to figure out how I can use it. Andrew McFarlane >From: Chris McMahon >Reply-To: wtr-general at rubyforge.org >To: wtr-general at rubyforge.org >Subject: [Wtr-general] WMI script tool >Date: Mon, 7 Feb 2005 13:05:23 -0700 > >Hi... > This looks like it could save hours and hours of MSDN research. >If you can stomach the soul-sucking registration and the cheezmoid >README, it's actually a pretty cool little piece of software. >http://www.microsoft.com/downloads/details.aspx?FamilyID=09dfc342-648b-4119-b7eb-783b0f7d1178&displaylang=en >-Chris >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Mon Feb 7 20:27:58 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 07 Feb 2005 18:27:58 -0700 Subject: [Wtr-general] radio buttons in table In-Reply-To: <20050207130552.35847.qmail@web21326.mail.yahoo.com> Message-ID: <000f01c50d7d$6c3171e0$6400a8c0@NewDell> no, you're not missing anything. When I first wrote these I just added them to the IE class. We should ideally make them part of the table class Until then try just row(:index, 1).cell(:index, 3).radio(:index, 1).set Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Lorenzo Jorquera Sent: 07 February 2005 06:06 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] radio buttons in table Hi, As suggested, I've trying this to access a table contents table.row(:index, 1).cell(:index, 3).radio(:index, 1).set But there is not method row for class Table (I am using the latest version from the repository, 1.106). There is a method called row, but it belongs to class IE. Is there something I am missing? Bret Pettichord wrote: At 03:34 PM 2/4/2005, Lorenzo Jorquera wrote: >I am writing a script to test a page that has a table that contains radio >buttons. >I would like to be able to write something like: > table.to_a[0][2].click >but to_a returns a array of strings. > >Is there a method that returns the objects contained in a table? > >If there isn't would you like that I write such a method (TDD, of course)? Is this what you would be looking for? table.row(:index, 1).cell(:index, 3).radio(:index, 1).set -- Note that Ruby normally uses 0-based indexing, but we have been using 1-based indexing for Watir. _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _____ Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050207/3dafd8c2/attachment.html From bret at pettichord.com Mon Feb 7 18:12:40 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 07 Feb 2005 17:12:40 -0600 Subject: [Wtr-general] radio buttons in table In-Reply-To: <20050207130552.35847.qmail@web21326.mail.yahoo.com> References: <5.1.0.14.2.20050204161631.0330cda8@127.0.0.1> Message-ID: <5.1.0.14.2.20050207170928.033b0078@127.0.0.1> You're not missing anything. I'm suggesting how i think we should deliver the solution you are requesting. I think we need to make a few more refactorings to actually achieve this -- most of the code is actually already in place, and this is the direction that the code seems to want to go to. Bret At 07:05 AM 2/7/2005, Lorenzo Jorquera wrote: >Hi, >As suggested, I've trying this to access a table contents > >table.row(:index, 1).cell(:index, 3).radio(:index, 1).set > >But there is not method row for class Table (I am using the latest version >from the repository, 1.106). There is a method called row, but it belongs >to class IE. > >Is there something I am missing? > >Bret Pettichord wrote: >At 03:34 PM 2/4/2005, Lorenzo Jorquera wrote: > >I am writing a script to test a page that has a table that contains radio > >buttons. > >I would like to be able to write something like: > > table.to_a[0][2].click > >but to_a returns a array of strings. > > > >Is there a method that returns the objects contained in a table? > > > >If there isn't would you like that I write such a method (TDD, of course)? > >Is this what you would be looking for? > >table.row(:index, 1).cell(:index, 3).radio(:index, 1).set > >-- Note that Ruby normally uses 0-based indexing, but we have been using >1-based indexing for Watir. > > > >_____________________ >Bret Pettichord >www.pettichord.com > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > >Do You Yahoo!? >Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del >Mundo. >Vis?ta >Yahoo! >Noticias. >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From lorenzo_jorquera at yahoo.com Tue Feb 8 07:54:08 2005 From: lorenzo_jorquera at yahoo.com (Lorenzo Jorquera) Date: Tue, 8 Feb 2005 06:54:08 -0600 (CST) Subject: [Wtr-general] radio buttons in table In-Reply-To: <5.1.0.14.2.20050207170928.033b0078@127.0.0.1> Message-ID: <20050208125408.95023.qmail@web21322.mail.yahoo.com> Hi, Sorry, I understood that that was already implemented. I began to implement it, and as you say most of the code is already in place. I think there is only one big refactoring needed. As the code is now, all the Watir objects (Button, TextField,Table, etc.) are created after searching for the corresponding Win32OLE object in the IE object. When I create an object from it's position in the table, I already have the Win32OLE object, and only need to wrap it with the Watir funcionality in order to use it. So, I think that I will need to add a way of just creating a Watir object from its corresponding Win32OLE object. I think one way of doing this would be adding a new "how" symbol (:from_object ?) to the constructors where the "what" would be the Win32OLE object. In the Button class it would look like this: class Button < ObjectActions # Create an instance of the button object def initialize( ieController, how , what ) @ieController = ieController if(how == :from_object) then @o = ieController.getObject( how, what , ["button" , "submit" , "image"] ) else @o = what end super( @o ) @how = how @what = what end end What do yo think? Lorenzo. PD: Paul, I tried @ie.row(:index, 32).cell(:index, 1).radio(:index, 1).set but it didn?t work, because Row does not have a cell method. Bret Pettichord wrote: You're not missing anything. I'm suggesting how i think we should deliver the solution you are requesting. I think we need to make a few more refactorings to actually achieve this -- most of the code is actually already in place, and this is the direction that the code seems to want to go to. Bret At 07:05 AM 2/7/2005, Lorenzo Jorquera wrote: >Hi, >As suggested, I've trying this to access a table contents > >table.row(:index, 1).cell(:index, 3).radio(:index, 1).set > >But there is not method row for class Table (I am using the latest version >from the repository, 1.106). There is a method called row, but it belongs >to class IE. > >Is there something I am missing? > >Bret Pettichord wrote: >At 03:34 PM 2/4/2005, Lorenzo Jorquera wrote: > >I am writing a script to test a page that has a table that contains radio > >buttons. > >I would like to be able to write something like: > > table.to_a[0][2].click > >but to_a returns a array of strings. > > > >Is there a method that returns the objects contained in a table? > > > >If there isn't would you like that I write such a method (TDD, of course)? > >Is this what you would be looking for? > >table.row(:index, 1).cell(:index, 3).radio(:index, 1).set > >-- Note that Ruby normally uses 0-based indexing, but we have been using >1-based indexing for Watir. > > > >_____________________ >Bret Pettichord >www.pettichord.com > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > >Do You Yahoo!? >Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del >Mundo. >Vis?ta >Yahoo! >Noticias. >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050208/d7e3ae1a/attachment.html From SCHNEIDA at seiu.org Tue Feb 8 16:51:14 2005 From: SCHNEIDA at seiu.org (Anders Schneiderman) Date: Tue, 08 Feb 2005 16:51:14 -0500 Subject: [Wtr-general] TextField within a form choking Message-ID: I've just started using Watir * not as a testing program but for automating some work. So far, it's been great except for one problem. I can add text to a page that has only one form without any problem. But when I try to add text to a web pages with two forms, I get a weird error. Here's a very truncated version of the code: ============================= require 'watir' include Watir testSite = 'http://aaa.com/' $ie = IE.new $ie.goto(testSite) ... $ie.image(:alt, "Add a New Item").click puts "And now to add to the form..." $ie.form(:name, "formMain").textField(:name, "username").set("Tarik Mazul") =============================== The program gets to the right page, types a "T" in the textfield "username", and then crashes with the following message: ================================ And now to add to the form... form how is name name is formMain Get form formHow is name formName is formMain form on page, name is formMain its a collection of forms - length is: 8 c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:469:in `waitForIE': uninitialized const nt Watir::IE::WINOLE32RuntimeError (NameError) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2171:in `doKeyPress' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2165:in `each' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2165:in `doKeyPress' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2131:in `set' from C:/Automation/ao_adduser.rb:32 =================================== Any idea what's causing the crash? I stole the code for working with a textfield in a form from the form unit test, and since I'm new to Ruby, I may be missing something obvious. Thanks, Anders Schneiderman P.S. In case you're wondering, I have absolutely no error catching code at this point because I'm just trying out Watir; I plan to add it in as soon as I've made one example work successfully. From bret at pettichord.com Tue Feb 8 23:15:03 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 08 Feb 2005 22:15:03 -0600 Subject: [Wtr-general] TextField within a form choking In-Reply-To: Message-ID: <5.1.0.14.2.20050208214614.0331f448@127.0.0.1> At 03:51 PM 2/8/2005, Anders Schneiderman wrote: >Any idea what's causing the crash? I know this is fixed in the latest CVS. Are you using 1.0.4? If so, we need to make a new release that includes this fix. Bret _____________________ Bret Pettichord www.pettichord.com From SCHNEIDA at seiu.org Wed Feb 9 08:42:46 2005 From: SCHNEIDA at seiu.org (Anders Schneiderman) Date: Wed, 09 Feb 2005 08:42:46 -0500 Subject: [Wtr-general] TextField within a form choking Message-ID: >I know this is fixed in the latest CVS. Are you using 1.0.4? If so, we need >to make a new release that includes this fix. >Bret I downloaded the latest release -- 1.0.4 * so it looks like you'll need to cut another release. Glad to know I didn't do something stupid! Anders From ffrassaint at hotmail.com Wed Feb 9 09:14:06 2005 From: ffrassaint at hotmail.com (Fabrice FRASSAINT) Date: Wed, 09 Feb 2005 14:14:06 +0000 Subject: [Wtr-general] Errors on Text Field with fireEvent Message-ID: An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050209/291817e2/attachment.html From ati.ozgur at gmail.com Wed Feb 9 12:48:59 2005 From: ati.ozgur at gmail.com (Atilla Ozgur) Date: Wed, 9 Feb 2005 19:48:59 +0200 Subject: [Wtr-general] Errors on Text Field with fireEvent In-Reply-To: References: Message-ID: It must be IE version Issue. I am using watir with win98 and IE 6.1. All unit tests past and I have no such error. I think that f?reEvent uses IE 5.5 specific code. On Wed, 09 Feb 2005 14:14:06 +0000, Fabrice FRASSAINT wrote: > Hello, > > I tried to use this terrific testing tool. > Nevertheless, I'm stuck when I try to modify a text Field with set method, I > have to use value instead cause I get the error (even on samples) : > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2128:in `method_missing': Unknown > property or method `fireEvent' (WIN32OLERuntimeError) > HRESULT error code:0x80020006 > Unknown name. from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2128:in > `se > t' > from C:/watir_bonus/MyTests/jpgtest.rb:46 > > Can you help on this ? > > I'm running Windows 2000 with IE 5.0 > > > IS it a IE version issue ??? > > > Thanks > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > From SCHNEIDA at seiu.org Wed Feb 9 13:25:50 2005 From: SCHNEIDA at seiu.org (Anders Schneiderman) Date: Wed, 09 Feb 2005 13:25:50 -0500 Subject: [Wtr-general] URL for Internet Explorer Object Model Explained Message-ID: If you're trying to do someting with IE that Watir doesn't have a method for * like the Fullscreen issue folks were talking about a bit ago * there's a great document that explains the model. It's from a chapter in a book, and it's at: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dninvbs/html/theinternetexplorerobjectmodel.asp Anders Schneiderman From christopher.mcmahon at gmail.com Wed Feb 9 15:52:43 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 9 Feb 2005 13:52:43 -0700 Subject: [Wtr-general] WATIR vs. maps.google.com Message-ID: <72799cd705020912528a7c6a9@mail.gmail.com> Inspired by this: http://jgwebber.blogspot.com/2005/02/mapping-google.html I pointed WATIR at google's new map service. It's instructive to look at what WATIR can discern of the actual map returned. Read the article first, then do ie.text_field(:id,"q").set("Durango,CO") ie.button(:index, 1).click ie.frame("vp").getHTML. (Note that you won't be able to View Source for the frame, you'll have to use WATIR.) I bet at least some of you will be surprised. I was. You could roll your own lat/long lookup service with WATIR and maps.google.com really easily if you wanted to. -Chris -Chris From lorenzo_jorquera at yahoo.com Wed Feb 9 18:44:59 2005 From: lorenzo_jorquera at yahoo.com (Lorenzo Jorquera) Date: Wed, 9 Feb 2005 17:44:59 -0600 (CST) Subject: [Wtr-general] Table modifications Message-ID: <20050209234459.93997.qmail@web21323.mail.yahoo.com> Hi, I've been working in some modifications to the Table object, in order to be able to access the objects inside the tables like this: @ie.table(:index,1)[1][1].button.click or @ie.table(:id,1)[3][5].textField.set("text") and also to be able to access nested tables like this: @ie.table(:id,1)[2][1].table[1][2].button.click (The indexes are 1-based for compatibility with the rest of Watir) I wrote all the modifications in separated file called "Table2.rb" so if anyone is interested in trying them you can do so by requiring "Table2" after "watir". Bret and Paul, if you think the modifications are good enough I can merge them with the repository code and send them to you... I am including a zip file with Table2.rb and the tests. I am not sure if I can attach files in this list, so I will include Table2.rb at the bottom of this mail. ###########Table2.rb module Watir class Table def Table.create_from_element(ieController,anElement) tableObject = find_table(anElement) if(tableObject != nil) then return Table.new(ieController,:from_object,tableObject) else return nil end end def Table.find_table(anElement) o = anElement.getOLEObject.parentElement while(o && o.tagName != 'TABLE') o = o.parentElement end return o end def initialize( parent, how , what ) @ieController = parent allTables = parent.getDocument.body.getElementsByTagName("TABLE") parent.log "There are #{ allTables.length } tables" table = nil tableIndex = 1 if(how != :from_object) then allTables.each do |t| next unless table == nil case how when :id if t.invoke("id").to_s == what.to_s table = t end when :index if tableIndex == what.to_i table = t end end tableIndex = tableIndex + 1 end else table = what end parent.log "table - #{what}, #{how} Not found " if table == nil @o = table super( @o ) @how = how @what = what end def [](index) raise UnknownTableException , "Unable to locate a table using #{@how} and #{@what} " if @o == nil x = [] for td in row(index).children if(td.children.length > 0) then x << td.children(0) else x << td end end return TableRow.new(x, at ieController) end def row_count raise UnknownTableException , "Unable to locate a table using #{@how} and #{@what} " if @o == nil return tableBody.children.length end def column_count(rowIndex=1) raise UnknownTableException , "Unable to locate a table using #{@how} and #{@what} " if @o == nil columns = 0 for td in row(rowIndex).children columns += td.colSpan end return columns end def tableBody return @o.children(0) end def row(index) return tableBody.children(index - 1) end def findRow for rowIdx in 1...row_count if(yield(self[rowIdx])) then return self[rowIdx] end end end end class Button < ObjectActions # Create an instance of the button object def initialize( ieController, how , what ) @ieController = ieController if(how == :from_object) then @o = what else @o = ieController.getObject( how, what , ["button" , "submit" , "image"] ) end super( @o ) @how = how @what = what end end class TableRow def initialize(row,ieController) @row = row @ieController = ieController end def [](index) return TableCell.new(@ieController, at row[index -1]) end def method_missing(aSymbol,*args) return @row.send(aSymbol,*args) end end class TableCell def initialize(ieController,o) @o = o @ieController = ieController end def button return Button.new(@ieController,:from_object, at o) end def table return Table.new(@ieController,:from_object, at o) end def text return @o.innerText end def textField return TextField.new(@ieController,:from_object, at o) end end class TextField < ObjectActions def initialize( ieController, how , what ) @ieController = ieController if(how != :from_object) then @o = ieController.getObject( how, what , ["text" , "password","textarea"] ) else @o = what end super( @o ) @how = how @what = what @properties = { "maxLength" => "maxLength" , "length" => "length" } end end end --------------------------------- Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050209/8e2caf1c/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: tables.zip Type: application/x-zip-compressed Size: 4093 bytes Desc: tables.zip Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050209/8e2caf1c/attachment.bin From paul.rogers at shaw.ca Thu Feb 10 00:17:34 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 09 Feb 2005 22:17:34 -0700 Subject: [Wtr-general] Errors on Text Field with fireEvent Message-ID: fireevent was introduced in ie5.5. I think most people are using 6, so you may encounter other problems with ie5.5 Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050209/d744e45e/attachment.html -------------- next part -------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From christopher.mcmahon at gmail.com Thu Feb 10 11:26:13 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 10 Feb 2005 09:26:13 -0700 Subject: [Wtr-general] capture ie.show_links output to a string? Message-ID: <72799cd7050210082646cd37c3@mail.gmail.com> Hi... Here's an odd thing, I can see in watir.rb that show_links and getHTML are different, but I'm not sure what causes this: s = ie.getHTML works-- the variable "s" contains all the HTML reported, but x = ie.show_links doesn't work. "x" is nil. How can I capture the result of ie.show_links? -Chris From bret at pettichord.com Thu Feb 10 12:30:04 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 10 Feb 2005 11:30:04 -0600 Subject: [Wtr-general] Errors on Text Field with fireEvent In-Reply-To: Message-ID: <5.1.0.14.2.20050210112908.032927c8@127.0.0.1> This is a bug in Watir 1.0.4. Please use 1.0.3 until we get 1.0.5 released. Bret At 08:14 AM 2/9/2005, Fabrice FRASSAINT wrote: >Hello, > >I tried to use this terrific testing tool. >Nevertheless, I'm stuck when I try to modify a text Field with set method, >I have to use value instead cause I get the error (even on samples) : > >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2128:in `method_missing': Unknown >property or method `fireEvent' (WIN32OLERuntimeError) > HRESULT error code:0x80020006 > Unknown name. from > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2128:in `se >t' > from C:/watir_bonus/MyTests/jpgtest.rb:46 > >Can you help on this ? > >I'm running Windows 2000 with IE 5.0 > > >IS it a IE version issue ??? > > >Thanks > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Feb 10 12:31:39 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 10 Feb 2005 11:31:39 -0600 Subject: [Wtr-general] Errors on Text Field with fireEvent Message-ID: <5.1.0.14.2.20050210113120.0338ec50@127.0.0.1> NEVERMIND -- This is a bug in Watir 1.0.4. Please use 1.0.3 until we get 1.0.5 released. Bret At 08:14 AM 2/9/2005, Fabrice FRASSAINT wrote: >Hello, > >I tried to use this terrific testing tool. >Nevertheless, I'm stuck when I try to modify a text Field with set method, >I have to use value instead cause I get the error (even on samples) : > >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2128:in `method_missing': Unknown >property or method `fireEvent' (WIN32OLERuntimeError) > HRESULT error code:0x80020006 > Unknown name. from > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2128:in `se >t' > from C:/watir_bonus/MyTests/jpgtest.rb:46 > >Can you help on this ? > >I'm running Windows 2000 with IE 5.0 > > >IS it a IE version issue ??? > > >Thanks > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Fri Feb 11 15:06:09 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 11 Feb 2005 13:06:09 -0700 Subject: [Wtr-general] capture ie.show_links output to a string? In-Reply-To: <72799cd7050210082646cd37c3@mail.gmail.com> Message-ID: <006b01c51075$2083be10$6400a8c0@NewDell> getHTML returns a string , show_links just prints it. We could possibly add Ie.links.each So you would do: Ie.links.each do |l| myLink = l.to_s end Id add it to the feature request tracker. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: 10 February 2005 09:26 To: wtr-general at rubyforge.org Subject: [Wtr-general] capture ie.show_links output to a string? Hi... Here's an odd thing, I can see in watir.rb that show_links and getHTML are different, but I'm not sure what causes this: s = ie.getHTML works-- the variable "s" contains all the HTML reported, but x = ie.show_links doesn't work. "x" is nil. How can I capture the result of ie.show_links? -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From christopher.mcmahon at gmail.com Fri Feb 11 15:25:20 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 11 Feb 2005 13:25:20 -0700 Subject: [Wtr-general] capture ie.show_links output to a string? In-Reply-To: <006b01c51075$2083be10$6400a8c0@NewDell> References: <72799cd7050210082646cd37c3@mail.gmail.com> <006b01c51075$2083be10$6400a8c0@NewDell> Message-ID: <72799cd70502111225256709cb@mail.gmail.com> > > Id add it to the feature request tracker. > Done, thanks. Note that after thinking it over, the show_* methods would probably more useful if they returned arrays rather than strings. Or if the user could easily choose whether to return a string or an array? -Chris From bret at pettichord.com Fri Feb 11 17:09:40 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 11 Feb 2005 16:09:40 -0600 Subject: [Wtr-general] capture ie.show_links output to a string? In-Reply-To: <72799cd70502111225256709cb@mail.gmail.com> References: <006b01c51075$2083be10$6400a8c0@NewDell> <72799cd7050210082646cd37c3@mail.gmail.com> <006b01c51075$2083be10$6400a8c0@NewDell> Message-ID: <5.1.0.14.2.20050211160825.03441de0@127.0.0.1> These methods are intended to be used in IRB to help users understand the structure of the pages they are working with. It sounds like you are using them for something else. Could you please explain further. Bret At 02:25 PM 2/11/2005, Chris McMahon wrote: > > > > Id add it to the feature request tracker. > > > >Done, thanks. Note that after thinking it over, the show_* methods >would probably more useful if they returned arrays rather than >strings. Or if the user could easily choose whether to return a >string or an array? > >-Chris >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From christopher.mcmahon at gmail.com Fri Feb 11 17:37:30 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 11 Feb 2005 15:37:30 -0700 Subject: [Wtr-general] capture ie.show_links output to a string? In-Reply-To: <5.1.0.14.2.20050211160825.03441de0@127.0.0.1> References: <72799cd7050210082646cd37c3@mail.gmail.com> <006b01c51075$2083be10$6400a8c0@NewDell> <72799cd70502111225256709cb@mail.gmail.com> <5.1.0.14.2.20050211160825.03441de0@127.0.0.1> Message-ID: <72799cd7050211143741b5557a@mail.gmail.com> On Fri, 11 Feb 2005 16:09:40 -0600, Bret Pettichord wrote: > It sounds like you are using them for something else. Could you please > explain further. Sure. I was working with one of my interns putting together a WATIR demo. If you point WATIR at http:://fortlewis.edu, then do ie.show_links, the list of links is too large to display under the default CMD window settings. Before this, some of the tests we've written for our app depend on particular strings that exist or do not exist in the output from getHTML. In order to create these tests, we've been printing getHTML output to files, then using WinDIFF to find proper criteria for our assert() statements against the content of getHTML. It's effective. In a nutshell, we just wanted to print show_links output to file so that we could carry it around conveniently for awhile. But on further reflection, I already had some code in some tests like this (somewhat simplified for this msg): for i in 2..500 s = ie.table(:index, i).to_a s2 = s[0].to_s puts s2 if /GETMEOUTTAHERE/ =~ s2 break else ie.frame.link(:index, i).click sleep 1 begin assert_match(s2,ie.getHTML.to_s) f.puts("PASS #{s2} OK\n\n") rescue => e f.puts("FAIL #{s2}\n" + e.message + "\n" + e.backtrace.join("\n") + "\n\n") end end #end if end #end for so it occurred to me that someday it might be convenient to be able to do something like (forgive me if this looks too perlish, I think I copped the Pickaxe example correctly): a = ie.show_links.to_a IO.foreach("#{a}") { |link| puts $_ DO STUFF } Does that make sense? -Chris From christopher.mcmahon at gmail.com Fri Feb 11 18:23:15 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 11 Feb 2005 16:23:15 -0700 Subject: [Wtr-general] capture ie.show_links output to a string? In-Reply-To: <72799cd7050211143741b5557a@mail.gmail.com> References: <72799cd7050210082646cd37c3@mail.gmail.com> <006b01c51075$2083be10$6400a8c0@NewDell> <72799cd70502111225256709cb@mail.gmail.com> <5.1.0.14.2.20050211160825.03441de0@127.0.0.1> <72799cd7050211143741b5557a@mail.gmail.com> Message-ID: <72799cd7050211152314e013eb@mail.gmail.com> > a = ie.show_links.to_a > IO.foreach("#{a}") > { |link| > puts $_ > DO STUFF > } or s = ie.show_links.to_s if /GOODSTUFF/ =~ s puts "PASS found GOODSTUFF in links" end even -Chris From paul.rogers at shaw.ca Sat Feb 12 17:37:25 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sat, 12 Feb 2005 15:37:25 -0700 Subject: [Wtr-general] capture ie.show_links output to a string? In-Reply-To: <72799cd7050211152314e013eb@mail.gmail.com> Message-ID: <000001c51153$6d3450b0$6400a8c0@NewDell> There is already a way to do this: if ie.link(:text , /GOODSTUFF/).exists puts "Pass: GoodStuff was found!" Else puts "Fail: couldn't find GoodStuff" end -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: 11 February 2005 16:23 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] capture ie.show_links output to a string? > a = ie.show_links.to_a > IO.foreach("#{a}") > { |link| > puts $_ > DO STUFF > } or s = ie.show_links.to_s if /GOODSTUFF/ =~ s puts "PASS found GOODSTUFF in links" end even -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From christopher.mcmahon at gmail.com Sat Feb 12 19:19:34 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Sat, 12 Feb 2005 17:19:34 -0700 Subject: [Wtr-general] capture ie.show_links output to a string? In-Reply-To: <000001c51153$6d3450b0$6400a8c0@NewDell> References: <72799cd7050211152314e013eb@mail.gmail.com> <000001c51153$6d3450b0$6400a8c0@NewDell> Message-ID: <72799cd7050212161917d044ca@mail.gmail.com> Yep, but it'd still be cool to be able to assign the output from show_* to a variable, so that we could put, say, all of the link information to a file. -Chris On Sat, 12 Feb 2005 15:37:25 -0700, Paul Rogers wrote: > There is already a way to do this: > > if ie.link(:text , /GOODSTUFF/).exists > puts "Pass: GoodStuff was found!" > Else > puts "Fail: couldn't find GoodStuff" > end > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon > Sent: 11 February 2005 16:23 > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] capture ie.show_links output to a string? > > > a = ie.show_links.to_a > > IO.foreach("#{a}") > > { |link| > > puts $_ > > DO STUFF > > } > > or > > s = ie.show_links.to_s > if /GOODSTUFF/ =~ s > puts "PASS found GOODSTUFF in links" > end > > even > -Chris > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Sun Feb 13 23:08:55 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sun, 13 Feb 2005 21:08:55 -0700 Subject: [Wtr-general] WATIR vs. maps.google.com In-Reply-To: <72799cd705020912528a7c6a9@mail.gmail.com> Message-ID: <000901c5124a$e6d51010$6400a8c0@NewDell> Could you make a real script with this, and add it to the examples directory? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: 09 February 2005 13:53 To: wtr-general at rubyforge.org Subject: [Wtr-general] WATIR vs. maps.google.com Inspired by this: http://jgwebber.blogspot.com/2005/02/mapping-google.html I pointed WATIR at google's new map service. It's instructive to look at what WATIR can discern of the actual map returned. Read the article first, then do ie.text_field(:id,"q").set("Durango,CO") ie.button(:index, 1).click ie.frame("vp").getHTML. (Note that you won't be able to View Source for the frame, you'll have to use WATIR.) I bet at least some of you will be surprised. I was. You could roll your own lat/long lookup service with WATIR and maps.google.com really easily if you wanted to. -Chris -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Sun Feb 13 23:17:28 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sun, 13 Feb 2005 21:17:28 -0700 Subject: [Wtr-general] Watir Publicity Suggestions In-Reply-To: <5.1.0.14.2.20050202213703.01e055c0@127.0.0.1> Message-ID: <000a01c5124c$18497950$6400a8c0@NewDell> Would anybody who has used watir be interested in writing an article on it? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 02 February 2005 20:39 To: wtr-general at rubyforge.org Subject: [Wtr-general] Watir Publicity Suggestions Chad Fowler sez: >Kind of self-serving, but would you be interested in writing an article >(or getting someone else to write one) on RubyGarden.org? I want to get >more "feature article" type entries up, though they can be pretty >informal. That would be a great way to catalyze a linking >effect--especially if you talk about it both in terms of _what_ it is and >how it's making in-roads in the testing world. The Ruby people love to >hear about Ruby insurgency efforts that are going well. From there, I >could announce the article on ruby-talk and my weblog, and it could start >getting linked from all over the place..... Anyone? >I wonder if there's a way to tie this into the testing framework for >Rails. Rails is getting a lot of publicity/eyeballs lately and has a >really nice testing environment. it would be _really_ neat to somehow >tightly integrate client-side testing into webapps. I might be day >dreaming here ;) This is a great suggestion. I am running into more and more collegues who are falling under the Ruby on Rails spell. Bret _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Sun Feb 13 23:25:43 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sun, 13 Feb 2005 21:25:43 -0700 Subject: [Wtr-general] contributors Message-ID: <000b01c5124d$3f416800$6400a8c0@NewDell> Several people have asked about contributing code to watir. In the tracker there are several outstanding issues. If you are interested in contributing, take a look at the trackers and pick one that you like. Remember - we want unit tests for as much as possible. In fact, a good way to contribute, and to learn watir is to write some more unit tests Thanks Paul From christopher.mcmahon at gmail.com Mon Feb 14 14:32:39 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 14 Feb 2005 12:32:39 -0700 Subject: [Wtr-general] WATIR vs. maps.google.com In-Reply-To: <000901c5124a$e6d51010$6400a8c0@NewDell> References: <72799cd705020912528a7c6a9@mail.gmail.com> <000901c5124a$e6d51010$6400a8c0@NewDell> Message-ID: <72799cd7050214113210cb479e@mail.gmail.com> On Sun, 13 Feb 2005 21:08:55 -0700, Paul Rogers wrote: > Could you make a real script with this, and add it to the examples > directory? I don't think I have commit privileges, but here's a runnable example script: #-------------------------------------------------------------------------------------------------------------# # access_to_invisible_contents_in_frames.rb # # Purpose: to demonstrate that WATIR can "see" into frames where "View Source" doesn't work. #------------------------------------------------------------------------------------------------------------ # #includes require 'watir' # the controller include Watir #test::unit includes require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' class TC_google_maps < Test::Unit::TestCase def test_google_maps #variables testSite = 'http://maps.google.com' #open the IE browser ie = IE.new puts 'going to maps.google.com' ie.goto(testSite) puts 'getting map for Durango' ie.text_field(:id,"q").set("Durango,CO") ie.button(:index, 1).click puts 'showing the HTML inside the frame, where View Source does not work:' puts '' puts ie.frame("vp").getHTML end end From jkohl at telusplanet.net Mon Feb 14 15:07:09 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Mon, 14 Feb 2005 12:07:09 -0800 Subject: [Wtr-general] WATIR vs. maps.google.com In-Reply-To: <72799cd7050214113210cb479e@mail.gmail.com> References: <72799cd705020912528a7c6a9@mail.gmail.com> <000901c5124a$e6d51010$6400a8c0@NewDell> <72799cd7050214113210cb479e@mail.gmail.com> Message-ID: <1108411629.421104edd9c70@webmail.telus.net> Looks good. General question: Can we do an assertion on the lat and long values in the tag? -Jonathan Quoting Chris McMahon : > On Sun, 13 Feb 2005 21:08:55 -0700, Paul Rogers wrote: > > Could you make a real script with this, and add it to the examples > > directory? > > > I don't think I have commit privileges, but here's a runnable example script: > > > > #-------------------------------------------------------------------------------------------------------------# > # access_to_invisible_contents_in_frames.rb > # > # Purpose: to demonstrate that WATIR can "see" into frames where "View > Source" doesn't work. > #------------------------------------------------------------------------------------------------------------ > # > > #includes > require 'watir' # the controller > include Watir > > #test::unit includes > require 'test/unit' > require 'test/unit/ui/console/testrunner' > require 'watir/testUnitAddons' > > > class TC_google_maps < Test::Unit::TestCase > > > def test_google_maps > > #variables > testSite = 'http://maps.google.com' > > #open the IE browser > ie = IE.new > > puts 'going to maps.google.com' > ie.goto(testSite) > > puts 'getting map for Durango' > ie.text_field(:id,"q").set("Durango,CO") > ie.button(:index, 1).click > > puts 'showing the HTML inside the frame, where View Source does not work:' > puts '' > puts ie.frame("vp").getHTML > > end > > end > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From christopher.mcmahon at gmail.com Mon Feb 14 15:25:03 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 14 Feb 2005 13:25:03 -0700 Subject: [Wtr-general] WATIR vs. maps.google.com In-Reply-To: <1108411629.421104edd9c70@webmail.telus.net> References: <72799cd705020912528a7c6a9@mail.gmail.com> <000901c5124a$e6d51010$6400a8c0@NewDell> <72799cd7050214113210cb479e@mail.gmail.com> <1108411629.421104edd9c70@webmail.telus.net> Message-ID: <72799cd70502141225173e7cdd@mail.gmail.com> On Mon, 14 Feb 2005 12:07:09 -0800, jkohl at telusplanet.net wrote: > Looks good. > > General question: Can we do an assertion on the lat and long values in the tag? > > -Jonathan Okay. This makes the example a little tricky. This is nice and readable, but could certainly be refactored to do getHTML only once. #-------------------------------------------------------------------------------------------------------------# # access_to_invisible_contents_in_frames.rb # # Purpose: to demonstrate that WATIR can "see" into frames where "View Source" doesn't work. #------------------------------------------------------------------------------------------------------------ # #includes require 'watir' # the controller include Watir #test::unit includes require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' class TC_google_maps < Test::Unit::TestCase def test_google_maps #variables testSite = 'http://maps.google.com' #open the IE browser ie = IE.new puts 'going to maps.google.com' ie.goto(testSite) puts 'getting map for Durango' ie.text_field(:id,"q").set("Durango,CO") ie.button(:index, 1).click puts 'showing the HTML inside the frame, where View Source does not work:' puts '' puts ie.frame("vp").getHTML puts 'sticking frames HTML into variable for test assertion' matchlat = '37.275278' matchlong = '-107.879444' begin assert_match(matchlat,ie.frame("vp").getHTML.to_s) puts("PASS latitude OK\n") rescue => e puts("FAIL Didn't find latitude") end begin assert_match(matchlong,ie.frame("vp").getHTML.to_s) puts("PASS longitude OK\n") rescue => e puts("FAIL Didn't find longitude") end end end From jkohl at telusplanet.net Mon Feb 14 15:31:59 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Mon, 14 Feb 2005 12:31:59 -0800 Subject: [Wtr-general] WATIR vs. maps.google.com In-Reply-To: <72799cd70502141225173e7cdd@mail.gmail.com> References: <72799cd705020912528a7c6a9@mail.gmail.com> <000901c5124a$e6d51010$6400a8c0@NewDell> <72799cd7050214113210cb479e@mail.gmail.com> <1108411629.421104edd9c70@webmail.telus.net> <72799cd70502141225173e7cdd@mail.gmail.com> Message-ID: <1108413119.42110abf2a859@webmail.telus.net> Cool. I like that. I'm tempted to put this version in as an example of how to do an assertion on HTML tag content. This seems like a useful test to me, and shows how one could do a test on Google maps. Anyone else agree? disagree? -Jonathan Quoting Chris McMahon : > On Mon, 14 Feb 2005 12:07:09 -0800, jkohl at telusplanet.net > wrote: > > Looks good. > > > > General question: Can we do an assertion on the lat and long values in the > tag? > > > > -Jonathan > > Okay. This makes the example a little tricky. This is nice and > readable, but could certainly be refactored to do getHTML only once. > > > #-------------------------------------------------------------------------------------------------------------# > # access_to_invisible_contents_in_frames.rb > # > # Purpose: to demonstrate that WATIR can "see" into frames where "View > Source" doesn't work. > #------------------------------------------------------------------------------------------------------------ > # > > #includes > require 'watir' # the controller > include Watir > > #test::unit includes > require 'test/unit' > require 'test/unit/ui/console/testrunner' > require 'watir/testUnitAddons' > > > class TC_google_maps < Test::Unit::TestCase > > > def test_google_maps > > #variables > testSite = 'http://maps.google.com' > > #open the IE browser > ie = IE.new > > puts 'going to maps.google.com' > ie.goto(testSite) > > puts 'getting map for Durango' > ie.text_field(:id,"q").set("Durango,CO") > ie.button(:index, 1).click > > puts 'showing the HTML inside the frame, where View Source does not work:' > puts '' > puts ie.frame("vp").getHTML > > puts 'sticking frames HTML into variable for test assertion' > matchlat = '37.275278' > matchlong = '-107.879444' > > begin > assert_match(matchlat,ie.frame("vp").getHTML.to_s) > puts("PASS latitude OK\n") > rescue => e > puts("FAIL Didn't find latitude") > end > > begin > assert_match(matchlong,ie.frame("vp").getHTML.to_s) > puts("PASS longitude OK\n") > rescue => e > puts("FAIL Didn't find longitude") > > end > > > end > > end > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From christopher.mcmahon at gmail.com Mon Feb 14 15:53:05 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 14 Feb 2005 13:53:05 -0700 Subject: [Wtr-general] WATIR vs. maps.google.com In-Reply-To: <1108413119.42110abf2a859@webmail.telus.net> References: <72799cd705020912528a7c6a9@mail.gmail.com> <000901c5124a$e6d51010$6400a8c0@NewDell> <72799cd7050214113210cb479e@mail.gmail.com> <1108411629.421104edd9c70@webmail.telus.net> <72799cd70502141225173e7cdd@mail.gmail.com> <1108413119.42110abf2a859@webmail.telus.net> Message-ID: <72799cd705021412535df09b47@mail.gmail.com> OK. Lets make one edit, though: s/sticking frames HTML into variable for test assertion/set up lat and long for test assertion/ or something like that. The original line is kinda gibberish. -Chris On Mon, 14 Feb 2005 12:31:59 -0800, jkohl at telusplanet.net wrote: > Cool. I like that. I'm tempted to put this version in as an example of how to do > an assertion on HTML tag content. This seems like a useful test to me, and shows > how one could do a test on Google maps. > > Anyone else agree? disagree? > > -Jonathan > > Quoting Chris McMahon : > > > On Mon, 14 Feb 2005 12:07:09 -0800, jkohl at telusplanet.net > > wrote: > > > Looks good. > > > > > > General question: Can we do an assertion on the lat and long values in the > > tag? > > > > > > -Jonathan > > > > Okay. This makes the example a little tricky. This is nice and > > readable, but could certainly be refactored to do getHTML only once. > > > > > > > #-------------------------------------------------------------------------------------------------------------# > > # access_to_invisible_contents_in_frames.rb > > # > > # Purpose: to demonstrate that WATIR can "see" into frames where "View > > Source" doesn't work. > > > #------------------------------------------------------------------------------------------------------------ > > # > > > > #includes > > require 'watir' # the controller > > include Watir > > > > #test::unit includes > > require 'test/unit' > > require 'test/unit/ui/console/testrunner' > > require 'watir/testUnitAddons' > > > > > > class TC_google_maps < Test::Unit::TestCase > > > > > > def test_google_maps > > > > #variables > > testSite = 'http://maps.google.com' > > > > #open the IE browser > > ie = IE.new > > > > puts 'going to maps.google.com' > > ie.goto(testSite) > > > > puts 'getting map for Durango' > > ie.text_field(:id,"q").set("Durango,CO") > > ie.button(:index, 1).click > > > > puts 'showing the HTML inside the frame, where View Source does not work:' > > puts '' > > puts ie.frame("vp").getHTML > > > > puts 'sticking frames HTML into variable for test assertion' > > matchlat = '37.275278' > > matchlong = '-107.879444' > > > > begin > > assert_match(matchlat,ie.frame("vp").getHTML.to_s) > > puts("PASS latitude OK\n") > > rescue => e > > puts("FAIL Didn't find latitude") > > end > > > > begin > > assert_match(matchlong,ie.frame("vp").getHTML.to_s) > > puts("PASS longitude OK\n") > > rescue => e > > puts("FAIL Didn't find longitude") > > > > end > > > > > > end > > > > end > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From jkohl at telusplanet.net Mon Feb 14 16:23:33 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Mon, 14 Feb 2005 13:23:33 -0800 Subject: [Wtr-general] WATIR vs. maps.google.com In-Reply-To: <72799cd705021412535df09b47@mail.gmail.com> References: <72799cd705020912528a7c6a9@mail.gmail.com> <000901c5124a$e6d51010$6400a8c0@NewDell> <72799cd7050214113210cb479e@mail.gmail.com> <1108411629.421104edd9c70@webmail.telus.net> <72799cd70502141225173e7cdd@mail.gmail.com> <1108413119.42110abf2a859@webmail.telus.net> <72799cd705021412535df09b47@mail.gmail.com> Message-ID: <1108416213.421116d59ae73@webmail.telus.net> Done. Checked in to the examples directory. Very cool test, so thanks for developing it. I think it's a really nice example. -Jonathan Quoting Chris McMahon : > OK. Lets make one edit, though: > > s/sticking frames HTML into variable for test assertion/set up lat and > long for test assertion/ > > or something like that. The original line is kinda gibberish. > -Chris > > > On Mon, 14 Feb 2005 12:31:59 -0800, jkohl at telusplanet.net > wrote: > > Cool. I like that. I'm tempted to put this version in as an example of how > to do > > an assertion on HTML tag content. This seems like a useful test to me, and > shows > > how one could do a test on Google maps. > > > > Anyone else agree? disagree? > > > > -Jonathan > > > > Quoting Chris McMahon : > > > > > On Mon, 14 Feb 2005 12:07:09 -0800, jkohl at telusplanet.net > > > wrote: > > > > Looks good. > > > > > > > > General question: Can we do an assertion on the lat and long values in > the > > > tag? > > > > > > > > -Jonathan > > > > > > Okay. This makes the example a little tricky. This is nice and > > > readable, but could certainly be refactored to do getHTML only once. > > > > > > > > > > > > #-------------------------------------------------------------------------------------------------------------# > > > # access_to_invisible_contents_in_frames.rb > > > # > > > # Purpose: to demonstrate that WATIR can "see" into frames where "View > > > Source" doesn't work. > > > > > > #------------------------------------------------------------------------------------------------------------ > > > # > > > > > > #includes > > > require 'watir' # the controller > > > include Watir > > > > > > #test::unit includes > > > require 'test/unit' > > > require 'test/unit/ui/console/testrunner' > > > require 'watir/testUnitAddons' > > > > > > > > > class TC_google_maps < Test::Unit::TestCase > > > > > > > > > def test_google_maps > > > > > > #variables > > > testSite = 'http://maps.google.com' > > > > > > #open the IE browser > > > ie = IE.new > > > > > > puts 'going to maps.google.com' > > > ie.goto(testSite) > > > > > > puts 'getting map for Durango' > > > ie.text_field(:id,"q").set("Durango,CO") > > > ie.button(:index, 1).click > > > > > > puts 'showing the HTML inside the frame, where View Source does not > work:' > > > puts '' > > > puts ie.frame("vp").getHTML > > > > > > puts 'sticking frames HTML into variable for test assertion' > > > matchlat = '37.275278' > > > matchlong = '-107.879444' > > > > > > begin > > > assert_match(matchlat,ie.frame("vp").getHTML.to_s) > > > puts("PASS latitude OK\n") > > > rescue => e > > > puts("FAIL Didn't find latitude") > > > end > > > > > > begin > > > assert_match(matchlong,ie.frame("vp").getHTML.to_s) > > > puts("PASS longitude OK\n") > > > rescue => e > > > puts("FAIL Didn't find longitude") > > > > > > end > > > > > > > > > end > > > > > > end > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From welkin_inc at hotmail.com Mon Feb 14 19:48:18 2005 From: welkin_inc at hotmail.com (Andrew McFarlane) Date: Mon, 14 Feb 2005 17:48:18 -0700 Subject: attach request, was Re: [Wtr-general] Clicked the Image, butGot Error Messag In-Reply-To: <5.1.0.14.2.20050204130233.032ea888@127.0.0.1> Message-ID: How about: FullName--Retrieves the fully qualified path of the Microsoft Internet Explorer executable file. >From: Bret Pettichord >Reply-To: wtr-general at rubyforge.org >To: wtr-general at rubyforge.org >Subject: attach request, was Re: [Wtr-general] Clicked the Image, butGot >Error Message >Date: Fri, 04 Feb 2005 13:05:51 -0600 > >At 11:48 AM 2/4/2005, Andrew McFarlane wrote: >>What do you think about adding an additional parameter to attach so that I >>can specify a time interval to wait for the window to appear? > >I like the idea. Another thing we need to with the attach code is only >attach to IE windows. The code right now will 'attach' to any window >matching the specs. I made a note to require that > > @ie.name == 'Microsoft Internet Explorer' > >but now i am worried that this will cause it to fail on non-english >installs, as well as on installs where the browser is named something like >'AT&T World Net's Microsoft Internet Explorer'. > >So i think we need to hook off a GUID or something. > >Bret > > >_____________________ > Bret Pettichord > www.pettichord.com > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general From welkin_inc at hotmail.com Mon Feb 14 20:00:03 2005 From: welkin_inc at hotmail.com (Andrew McFarlane) Date: Mon, 14 Feb 2005 18:00:03 -0700 Subject: [Wtr-general] Events Message-ID: I saw the watir method capture_events and wondered if I was missing something or if we are shying away from capturing events. The reason that I wondered this is that I see the wait method used throughout Watir, which doesn't seem to be necessary if we're using event handling. In the interest of full disclosure, I'll admit to being pretty confused by both Watir and the underlying DOM structure/objects/methods. I didn't know Ruby that well at the time but had been using Perl for years and years, and I wanted to know all about both the MS DOM objects & methods and Watir, so I wrote an OO-Perl version that did many things similar to Watir. One of the first things I tried was using a windows event handler instead of trying to use an explicit wait method. I kept getting strange errors that, in my haste, I couldn't make too much sense out of, so I was wondering if this also happened in your early Watir development. Thanks. Andrew McFarlane From paul.rogers at shaw.ca Mon Feb 14 20:43:27 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 14 Feb 2005 18:43:27 -0700 Subject: [Wtr-general] Events In-Reply-To: Message-ID: <002a01c512ff$bec8ac70$6400a8c0@NewDell> The capture_events method was once part of the initialize method. We moved it to a separate place, so that you would have to explicitly capture the events. The reason it was oved was that watir wouldn't work with irb when capture_events was being used. I was hoping to be able to get rid of the wait method and just use the onPageLoad event, however because of the IRB issue I havent looked into it anymore What do you find confusing about watir? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrew McFarlane Sent: 14 February 2005 18:00 To: wtr-general at rubyforge.org Subject: [Wtr-general] Events I saw the watir method capture_events and wondered if I was missing something or if we are shying away from capturing events. The reason that I wondered this is that I see the wait method used throughout Watir, which doesn't seem to be necessary if we're using event handling. In the interest of full disclosure, I'll admit to being pretty confused by both Watir and the underlying DOM structure/objects/methods. I didn't know Ruby that well at the time but had been using Perl for years and years, and I wanted to know all about both the MS DOM objects & methods and Watir, so I wrote an OO-Perl version that did many things similar to Watir. One of the first things I tried was using a windows event handler instead of trying to use an explicit wait method. I kept getting strange errors that, in my haste, I couldn't make too much sense out of, so I was wondering if this also happened in your early Watir development. Thanks. Andrew McFarlane _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From dominique.plante at gmail.com Mon Feb 14 22:32:59 2005 From: dominique.plante at gmail.com (Dominique Plante) Date: Mon, 14 Feb 2005 19:32:59 -0800 Subject: [Wtr-general] CTRL+SHIFT+F annoyance in install.rb Message-ID: Guys: Can I recommend that the following line that occurs twice in install.rb be removed (or marked optional somehow)? oShellLink.Hotkey = "CTRL+SHIFT+F" This statement seems to hook up the keystroke combination Ctrl-Shift-F to start up a web browser with the WATIR documentation. It's annoying because I tend to use this keystroke combination for "find in files..." in some programs... I have had success deleting the WATIR shortcut from the start menu and the desktop, and re-running the WATIR install without the following lines with no problems. Thanks, Dominique ---------------------------------------------------------- dom.website = http://www.binaryshift.com From bret at pettichord.com Tue Feb 15 00:38:52 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 14 Feb 2005 23:38:52 -0600 Subject: [Wtr-general] CTRL+SHIFT+F annoyance in install.rb In-Reply-To: Message-ID: <5.1.0.14.2.20050214233843.034acfb8@127.0.0.1> At 09:32 PM 2/14/2005, Dominique Plante wrote: >Can I recommend that the following line that occurs twice in >install.rb be removed (or marked optional somehow)? > >oShellLink.Hotkey = "CTRL+SHIFT+F" i agree _____________________ Bret Pettichord www.pettichord.com From welkin_inc at hotmail.com Tue Feb 15 11:06:02 2005 From: welkin_inc at hotmail.com (Andrew McFarlane) Date: Tue, 15 Feb 2005 09:06:02 -0700 Subject: [Wtr-general] Events In-Reply-To: <002a01c512ff$bec8ac70$6400a8c0@NewDell> Message-ID: I don't find it confusing at all anymore. My learning style seems to be that I need to understand from the most basic level before I "get it". Andrew McFarlane >From: Paul Rogers >Reply-To: wtr-general at rubyforge.org >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Events >Date: Mon, 14 Feb 2005 18:43:27 -0700 > >The capture_events method was once part of the initialize method. We >moved it to a separate place, so that you would have to explicitly >capture the events. The reason it was oved was that watir wouldn't work >with irb when capture_events was being used. > >I was hoping to be able to get rid of the wait method and just use the >onPageLoad event, however because of the IRB issue I havent looked into >it anymore > > >What do you find confusing about watir? > >Paul > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrew McFarlane >Sent: 14 February 2005 18:00 >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Events > > >I saw the watir method capture_events and wondered if I was missing >something or if we are shying away from capturing events. The reason >that I >wondered this is that I see the wait method used throughout Watir, which > >doesn't seem to be necessary if we're using event handling. > >In the interest of full disclosure, I'll admit to being pretty confused >by >both Watir and the underlying DOM structure/objects/methods. I didn't >know >Ruby that well at the time but had been using Perl for years and years, >and >I wanted to know all about both the MS DOM objects & methods and Watir, >so I >wrote an OO-Perl version that did many things similar to Watir. One of >the >first things I tried was using a windows event handler instead of trying >to >use an explicit wait method. I kept getting strange errors that, in my >haste, I couldn't make too much sense out of, so I was wondering if this > >also happened in your early Watir development. > >Thanks. > >Andrew McFarlane > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Tue Feb 15 12:22:40 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 15 Feb 2005 10:22:40 -0700 Subject: [Wtr-general] CTRL+SHIFT+F annoyance in install.rb In-Reply-To: <5.1.0.14.2.20050214233843.034acfb8@127.0.0.1> Message-ID: <001c01c51382$f3fe9070$6400a8c0@NewDell> Done! -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 14 February 2005 22:39 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] CTRL+SHIFT+F annoyance in install.rb At 09:32 PM 2/14/2005, Dominique Plante wrote: >Can I recommend that the following line that occurs twice in install.rb >be removed (or marked optional somehow)? > >oShellLink.Hotkey = "CTRL+SHIFT+F" i agree _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Tue Feb 15 12:51:39 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 15 Feb 2005 10:51:39 -0700 Subject: [Wtr-general] Goto and spinner Message-ID: <001f01c51387$0400a130$6400a8c0@NewDell> Ive made the goto method return the time it took to download in seconds: irb(main):006:0> ie.goto('http://www.sun.co.uk') => 1.672 And made switches to turn off the spinner. In code: ie.enable_spinner = false Or from the command line: myTest.rb -s Paul From irushton at olysoftit.com Tue Feb 15 22:18:04 2005 From: irushton at olysoftit.com (Ian Rushton) Date: Tue, 15 Feb 2005 22:18:04 -0500 Subject: [Wtr-general] Goto and spinner In-Reply-To: <001f01c51387$0400a130$6400a8c0@NewDell> Message-ID: <200502160314.j1G3EidS011112@rubyforge.org> Great function, would it possible to put this on all methods that would end up sending requests in button.click, image.click etc... Ian Rushton -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, February 15, 2005 12:52 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Goto and spinner Ive made the goto method return the time it took to download in seconds: irb(main):006:0> ie.goto('http://www.sun.co.uk') => 1.672 And made switches to turn off the spinner. In code: ie.enable_spinner = false Or from the command line: myTest.rb -s Paul _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Tue Feb 15 23:27:38 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 15 Feb 2005 21:27:38 -0700 Subject: [Wtr-general] Goto and spinner In-Reply-To: <200502160314.j1G3EidS011112@rubyforge.org> Message-ID: <002701c513df$d8bac240$6400a8c0@NewDell> Im assuming you mean the download time? You will be able to do this, as soon as I check it in. Im half way through something else, so it maybe a dy or so away! Ie.goto("google.com") Ie.button(:caption , /search/i).click Puts "downloadtime was : " + ie.down_load_time.to_s For frames pages it will be the total for all frames. I think I can split it out into individual frames eventually. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ian Rushton Sent: 15 February 2005 20:18 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Goto and spinner Great function, would it possible to put this on all methods that would end up sending requests in button.click, image.click etc... Ian Rushton -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, February 15, 2005 12:52 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Goto and spinner Ive made the goto method return the time it took to download in seconds: irb(main):006:0> ie.goto('http://www.sun.co.uk') => 1.672 And made switches to turn off the spinner. In code: ie.enable_spinner = false Or from the command line: myTest.rb -s Paul _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Wed Feb 16 00:39:37 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 15 Feb 2005 22:39:37 -0700 Subject: [Wtr-general] New feature - pluggable error checker - LONG Message-ID: <002801c513e9$e752fb10$6400a8c0@NewDell> Ive at last got round to adding a feature I particularly like. Ive had the code for a while, but Bret kept telling me it was too much like java, so I now have a ruby version. I call this the pluggable error checker. I'll explain its use by an example: If I have an application , and I wish to make sure every page has my company logo, and a link to the logout page. Now, I could always check for this in every one of my tests, but that's a lot of work. The error checker effectively does it for you. You create a Proc object ( sample coming soon ) and add this to the ie object. So to do my 2 checks above I would write 2 proc objects: logo_checker = Proc.new { |ie| raise LogoException if !ie.image(:src, /logo.gif/).exists? } logout_link_checker = Proc.new { |ie| raise LogoutLinkException if !ie.link(:text , "Logout").exists } we now add these to the ie controller ie.add_chekcer( logo_checker ) ie.add_chekcer( logout_link_checker ) now, when ever a page reloads ( or a new page is loaded ) watir will run these checkers against the page. But wait I hear you scream! My logoutn page doesn't have a link to itself! Wont I always get an exception? You need to disable the checker: ie.disable_checker ( logout_link_checker ) and it will be, well, disabled. Enable it again using ie.add_checker( logout_link_checker ) Coming soon, this will be used to automatically check for several things - 404 errors etc, and missing gifs So ie.goto('http://www.thisisnotarealwebsite.com') would raise a NavigationException And any page that contains a missing image would raise some other sort of exception There is a unit test for this called errorchecker_test Hope this helps, and if any problems, you know where we are! Paul From ffrassaint at hotmail.com Wed Feb 16 09:36:23 2005 From: ffrassaint at hotmail.com (Fabrice FRASSAINT) Date: Wed, 16 Feb 2005 14:36:23 +0000 Subject: [Wtr-general] NewBie question about invoke method Message-ID: An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050216/3ff5ec2e/attachment.html From paul.rogers at shaw.ca Wed Feb 16 10:29:14 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 16 Feb 2005 08:29:14 -0700 Subject: [Wtr-general] NewBie question about invoke method In-Reply-To: Message-ID: <001701c5143c$452ce2d0$6400a8c0@NewDell> invoke is a method in Win32OLE it allows you to call an ole method that has the same name as a ruby method Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Fabrice FRASSAINT Sent: 16 February 2005 07:36 To: wtr-general at rubyforge.org Subject: [Wtr-general] NewBie question about invoke method Hello, Just a little question about Watir. When I look the code, I can't find where the invoke methoid comes from. This one is called to access zattibute of objects grabbed from IE. Until what extent can we use the DOM model to access objects... Does every request is mapped through the Win32OLE call. Someone can help me to figure this out ??? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050216/0830f28f/attachment.html From c.r.mcgrath at gmail.com Wed Feb 16 12:32:49 2005 From: c.r.mcgrath at gmail.com (Chris McGrath) Date: Wed, 16 Feb 2005 17:32:49 +0000 Subject: [Wtr-general] to many callbacks are defined (DL::DLError) Message-ID: Hi there, I'm using watir to download a series of CSV files from a website. I use the winclicker.rb functionality to set the filename in the download dialog and click the yes button if it's been overwritten. However, I'm getting the following error. Any ideas on how to get around this? Cheers, Chris d:/ruby/lib/ruby/site_ruby/1.8/watir/winClicker.rb:399:in `callback': too many callbacks are defined. (DL::DLError) from D:/Projects/ike_manager_migration/compare_ike_and_manager_sites.rb:324:in `join' from D:/Projects/ike_manager_migration/compare_ike_and_manager_sites.rb:324:in `manager_download_single_users_csv' from D:/Projects/ike_manager_migration/compare_ike_and_manager_sites.rb:342:in `get_manager_problem_users_csv' from D:/Projects/ike_manager_migration/compare_ike_and_manager_sites.rb:337:in `each' from D:/Projects/ike_manager_migration/compare_ike_and_manager_sites.rb:337:in `get_manager_problem_users_csv' from D:/Projects/ike_manager_migration/compare_ike_and_manager_sites.rb:356:in `compare_problem_users' from D:/Projects/ike_manager_migration/compare_ike_and_manager_sites.rb:267:in `compare_data' from D:/Projects/ike_manager_migration/compare_ike_and_manager_sites.rb:382 From paul.rogers at shaw.ca Wed Feb 16 12:51:58 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 16 Feb 2005 10:51:58 -0700 Subject: [Wtr-general] to many callbacks are defined (DL::DLError) In-Reply-To: Message-ID: <002301c51450$36444470$6400a8c0@NewDell> If it happens after several files have been downloaded, its probably an object leak in winclickers ( that code is pretty rough and was never used for more than one file up/download at a time) Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McGrath Sent: 16 February 2005 10:33 To: wtr-general at rubyforge.org Subject: [Wtr-general] to many callbacks are defined (DL::DLError) Hi there, I'm using watir to download a series of CSV files from a website. I use the winclicker.rb functionality to set the filename in the download dialog and click the yes button if it's been overwritten. However, I'm getting the following error. Any ideas on how to get around this? Cheers, Chris d:/ruby/lib/ruby/site_ruby/1.8/watir/winClicker.rb:399:in `callback': too many callbacks are defined. (DL::DLError) from D:/Projects/ike_manager_migration/compare_ike_and_manager_sites.rb:324:i n `join' from D:/Projects/ike_manager_migration/compare_ike_and_manager_sites.rb:324:i n `manager_download_single_users_csv' from D:/Projects/ike_manager_migration/compare_ike_and_manager_sites.rb:342:i n `get_manager_problem_users_csv' from D:/Projects/ike_manager_migration/compare_ike_and_manager_sites.rb:337:i n `each' from D:/Projects/ike_manager_migration/compare_ike_and_manager_sites.rb:337:i n `get_manager_problem_users_csv' from D:/Projects/ike_manager_migration/compare_ike_and_manager_sites.rb:356:i n `compare_problem_users' from D:/Projects/ike_manager_migration/compare_ike_and_manager_sites.rb:267:i n `compare_data' from D:/Projects/ike_manager_migration/compare_ike_and_manager_sites.rb:382 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From fox at atomicobject.com Wed Feb 16 13:43:17 2005 From: fox at atomicobject.com (fox at atomicobject.com) Date: Wed, 16 Feb 2005 13:43:17 -0500 (EST) Subject: [Wtr-general] Announcing Watir::Simple and Systir Message-ID: <2197.67.172.74.190.1108579397.squirrel@castor.atomicobject.com> Hi, Those of you who attended AWTA6 might remember my presentation on a simple domain-language system testing framework built on top of Watir. Brett suggested that the lower-level library be put directly into Watir's repository as an extension, with the idea that others may want to build layers on top of Watir and that they should be a part of the project itself. We have now prepared the bottom half of this library for release and we are calling it Watir::Simple (watir_simple.rb), taking advantage of the new module name for Watir. What I want to know from developers on this list is: where in the repository should this stuff go? Next to watir.rb? In an extensions/ directory? As soon as this is decided, I'll commit the file to the Watir repository. We are also pleased to announce on this list that the upper-level library, which we are calling Systir (System Testing in Ruby) has been released along with the demo that I showed at AWTA this year. It's available at http://rubyforge.org/projects/systir This project is a standalone system testing project that is not necessarily tied to Watir. However it's development was certainly driven by Watir so we hope to see this community using or contributing to Systir soon! The demo I showed at the conference is in the examples/mondo_pizza directory in the Systir package. Happy testing! -Karlin From c.r.mcgrath at gmail.com Wed Feb 16 13:48:29 2005 From: c.r.mcgrath at gmail.com (Chris McGrath) Date: Wed, 16 Feb 2005 18:48:29 +0000 Subject: [Wtr-general] to many callbacks are defined (DL::DLError) In-Reply-To: <002301c51450$36444470$6400a8c0@NewDell> References: <002301c51450$36444470$6400a8c0@NewDell> Message-ID: Think so, I tried several variations, including setting the WinClicker and IE objects to nil and calling GC.start, but nothing worked. Is there any thoughts towards refactoring the code to allow this, or is it not in scope for Watir? Cheers, Chris On Wed, 16 Feb 2005 10:51:58 -0700, Paul Rogers wrote: > If it happens after several files have been downloaded, its probably an > object leak in winclickers ( that code is pretty rough and was never > used for more than one file up/download at a time) > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McGrath > Sent: 16 February 2005 10:33 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] to many callbacks are defined (DL::DLError) > > Hi there, I'm using watir to download a series of CSV files from a > website. I use the winclicker.rb functionality to set the filename in > the download dialog and click the yes button if it's been overwritten. > However, I'm getting the following error. Any ideas on how to get around > this? > > Cheers, > > Chris > > d:/ruby/lib/ruby/site_ruby/1.8/watir/winClicker.rb:399:in `callback': > too many callbacks are defined. (DL::DLError) > from > D:/Projects/ike_manager_migration/compare_ike_and_manager_sites.rb:324:i > n > `join' > from > D:/Projects/ike_manager_migration/compare_ike_and_manager_sites.rb:324:i > n > `manager_download_single_users_csv' > from > D:/Projects/ike_manager_migration/compare_ike_and_manager_sites.rb:342:i > n > `get_manager_problem_users_csv' > from > D:/Projects/ike_manager_migration/compare_ike_and_manager_sites.rb:337:i > n > `each' > from > D:/Projects/ike_manager_migration/compare_ike_and_manager_sites.rb:337:i > n > `get_manager_problem_users_csv' > from > D:/Projects/ike_manager_migration/compare_ike_and_manager_sites.rb:356:i > n > `compare_problem_users' > from > D:/Projects/ike_manager_migration/compare_ike_and_manager_sites.rb:267:i > n > `compare_data' > from > D:/Projects/ike_manager_migration/compare_ike_and_manager_sites.rb:382 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Wed Feb 16 23:32:04 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 16 Feb 2005 21:32:04 -0700 Subject: [Wtr-general] Announcing Watir::Simple and Systir In-Reply-To: <2197.67.172.74.190.1108579397.squirrel@castor.atomicobject.com> Message-ID: <003b01c514a9$a1d708e0$6400a8c0@NewDell> Hi Karlin There is a watir subdir - put it in there, this way it will end up installed in C:\ruby\lib\ruby\site_ruby\1.8\watir So a user would then do require 'watir/simple' Thanks for your contribution - I hear great things about it. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of fox at atomicobject.com Sent: 16 February 2005 11:43 To: wtr-general at rubyforge.org Subject: [Wtr-general] Announcing Watir::Simple and Systir Hi, Those of you who attended AWTA6 might remember my presentation on a simple domain-language system testing framework built on top of Watir. Brett suggested that the lower-level library be put directly into Watir's repository as an extension, with the idea that others may want to build layers on top of Watir and that they should be a part of the project itself. We have now prepared the bottom half of this library for release and we are calling it Watir::Simple (watir_simple.rb), taking advantage of the new module name for Watir. What I want to know from developers on this list is: where in the repository should this stuff go? Next to watir.rb? In an extensions/ directory? As soon as this is decided, I'll commit the file to the Watir repository. We are also pleased to announce on this list that the upper-level library, which we are calling Systir (System Testing in Ruby) has been released along with the demo that I showed at AWTA this year. It's available at http://rubyforge.org/projects/systir This project is a standalone system testing project that is not necessarily tied to Watir. However it's development was certainly driven by Watir so we hope to see this community using or contributing to Systir soon! The demo I showed at the conference is in the examples/mondo_pizza directory in the Systir package. Happy testing! -Karlin _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Wed Feb 16 23:39:56 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 16 Feb 2005 21:39:56 -0700 Subject: [Wtr-general] Announcing Watir::Simple and Systir In-Reply-To: <003b01c514a9$a1d708e0$6400a8c0@NewDell> Message-ID: <003c01c514aa$bb197210$6400a8c0@NewDell> Looks like there is a bit of a bug if you run the mondo_pizza from windows ( not cygwin) Change the second line of \example\mondo_pizza\run.rb To system "start ruby servlet.rb " To make it work Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: 16 February 2005 21:32 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Announcing Watir::Simple and Systir Hi Karlin There is a watir subdir - put it in there, this way it will end up installed in C:\ruby\lib\ruby\site_ruby\1.8\watir So a user would then do require 'watir/simple' Thanks for your contribution - I hear great things about it. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of fox at atomicobject.com Sent: 16 February 2005 11:43 To: wtr-general at rubyforge.org Subject: [Wtr-general] Announcing Watir::Simple and Systir Hi, Those of you who attended AWTA6 might remember my presentation on a simple domain-language system testing framework built on top of Watir. Brett suggested that the lower-level library be put directly into Watir's repository as an extension, with the idea that others may want to build layers on top of Watir and that they should be a part of the project itself. We have now prepared the bottom half of this library for release and we are calling it Watir::Simple (watir_simple.rb), taking advantage of the new module name for Watir. What I want to know from developers on this list is: where in the repository should this stuff go? Next to watir.rb? In an extensions/ directory? As soon as this is decided, I'll commit the file to the Watir repository. We are also pleased to announce on this list that the upper-level library, which we are calling Systir (System Testing in Ruby) has been released along with the demo that I showed at AWTA this year. It's available at http://rubyforge.org/projects/systir This project is a standalone system testing project that is not necessarily tied to Watir. However it's development was certainly driven by Watir so we hope to see this community using or contributing to Systir soon! The demo I showed at the conference is in the examples/mondo_pizza directory in the Systir package. Happy testing! -Karlin _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From christopher.mcmahon at gmail.com Thu Feb 17 16:47:09 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 17 Feb 2005 14:47:09 -0700 Subject: [Wtr-general] Uncovered SourceForge project using old IEC library Message-ID: <72799cd7050217134771367b7e@mail.gmail.com> Hi... A message just hit the agile-testing mail list about a capture/replay framework built on top of the old IEC engine from WTR. Here's the message: http://groups.yahoo.com/group/agile-testing/message/5675 Here's the project: http://sourceforge.net/projects/webrecorder/ It seems to be mildly active. Could WATIR use a capture/replay feature? -Chris From jkohl at telusplanet.net Thu Feb 17 17:26:46 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Thu, 17 Feb 2005 14:26:46 -0800 Subject: [Wtr-general] Uncovered SourceForge project using old IEC library In-Reply-To: <72799cd7050217134771367b7e@mail.gmail.com> References: <72799cd7050217134771367b7e@mail.gmail.com> Message-ID: <1108679206.42151a2624e04@webmail.telusplanet.net> I'm personally not a big fan of capture/replay testing. I think it is a bad testing practice. Others may disagree, but I think it can create farcical "tests" that are unmaintainable at worst, and a lot of headaches to maintain at best. Some folks have said good things about Marathon, so maybe there is a way to do it well. My $0.02 -Jonathan Quoting Chris McMahon : > Hi... > A message just hit the agile-testing mail list about a > capture/replay framework built on top of the old IEC engine from WTR. > Here's the message: > http://groups.yahoo.com/group/agile-testing/message/5675 > Here's the project: > http://sourceforge.net/projects/webrecorder/ > It seems to be mildly active. > > Could WATIR use a capture/replay feature? > > -Chris > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From dallenusa at yahoo.com Thu Feb 17 17:40:45 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Thu, 17 Feb 2005 14:40:45 -0800 (PST) Subject: [Wtr-general] Uncovered SourceForge project using old IEC library In-Reply-To: <1108679206.42151a2624e04@webmail.telusplanet.net> Message-ID: <20050217224045.44814.qmail@web30504.mail.mud.yahoo.com> I aggree. It might have a use in a first run to capture controls as a starting place for a script. --- jkohl at telusplanet.net wrote: > I'm personally not a big fan of capture/replay > testing. I think it is a bad > testing practice. Others may disagree, but I think > it can create farcical > "tests" that are unmaintainable at worst, and a lot > of headaches to maintain at > best. Some folks have said good things about > Marathon, so maybe there is a way > to do it well. > > My $0.02 > > -Jonathan > > Quoting Chris McMahon > : > > > Hi... > > A message just hit the agile-testing mail list > about a > > capture/replay framework built on top of the old > IEC engine from WTR. > > Here's the message: > > > http://groups.yahoo.com/group/agile-testing/message/5675 > > Here's the project: > > http://sourceforge.net/projects/webrecorder/ > > It seems to be mildly active. > > > > Could WATIR use a capture/replay feature? > > > > -Chris > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. http://info.mail.yahoo.com/mail_250 From christopher.mcmahon at gmail.com Thu Feb 17 17:48:48 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 17 Feb 2005 15:48:48 -0700 Subject: [Wtr-general] Uncovered SourceForge project using old IEC library In-Reply-To: <1108679206.42151a2624e04@webmail.telusplanet.net> References: <72799cd7050217134771367b7e@mail.gmail.com> <1108679206.42151a2624e04@webmail.telusplanet.net> Message-ID: <72799cd705021714485a43bad3@mail.gmail.com> On Thu, 17 Feb 2005 14:26:46 -0800, jkohl at telusplanet.net wrote: > I'm personally not a big fan of capture/replay testing. I think it is a bad > testing practice. Others may disagree, but I think it can create farcical > "tests" that are unmaintainable at worst, and a lot of headaches to maintain at > best. Some folks have said good things about Marathon, so maybe there is a way > to do it well. I'm of two minds. On the one hand, the potential for abuse is huge. I have nightmares of scads of newbies descending on this mail list with "I recorded 500 clicks and my script doesn't work" questions. On the other hand, just today Chris Hedges and I were wishing we had some way to export IRB interactions to a runnable script. That is, we find a command that works using IRB, we have to copy/paste into a file in order to preserve that line. That's pretty clunky. -Chris From paul.rogers at shaw.ca Thu Feb 17 18:28:04 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 17 Feb 2005 16:28:04 -0700 Subject: [Wtr-general] Uncovered SourceForge project using old IEC library In-Reply-To: <72799cd705021714485a43bad3@mail.gmail.com> Message-ID: <001a01c51548$54818490$6400a8c0@NewDell> I had started writing one, my view is that its often easy to figure out how to write a test by looking at the recorded code. I certainly wouldn't use it for anything real. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: 17 February 2005 15:49 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Uncovered SourceForge project using old IEC library On Thu, 17 Feb 2005 14:26:46 -0800, jkohl at telusplanet.net wrote: > I'm personally not a big fan of capture/replay testing. I think it is > a bad testing practice. Others may disagree, but I think it can create > farcical "tests" that are unmaintainable at worst, and a lot of > headaches to maintain at best. Some folks have said good things about > Marathon, so maybe there is a way to do it well. I'm of two minds. On the one hand, the potential for abuse is huge. I have nightmares of scads of newbies descending on this mail list with "I recorded 500 clicks and my script doesn't work" questions. On the other hand, just today Chris Hedges and I were wishing we had some way to export IRB interactions to a runnable script. That is, we find a command that works using IRB, we have to copy/paste into a file in order to preserve that line. That's pretty clunky. -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From welkin_inc at hotmail.com Thu Feb 17 18:48:17 2005 From: welkin_inc at hotmail.com (Andrew McFarlane) Date: Thu, 17 Feb 2005 16:48:17 -0700 Subject: [Wtr-general] Uncovered SourceForge project using old IEC library In-Reply-To: <001a01c51548$54818490$6400a8c0@NewDell> Message-ID: I have been using commercial GUI test tools for 10 years. I don't recall ever recording a script and using it as is. Still, having a recording capability is a *huge* time savings in terms of recognizing which objects we're working on--which itself includes which object attribute(s) uniquely identify that object--and which method calls are appropriate for the action that we want to take. Even if we had something that spits out descriptions of browser objects, actually recording would be faster. Andrew McFarlane >From: Paul Rogers >Reply-To: wtr-general at rubyforge.org >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Uncovered SourceForge project using old IEC >library >Date: Thu, 17 Feb 2005 16:28:04 -0700 > >I had started writing one, my view is that its often easy to figure out >how to write a test by looking at the recorded code. I certainly >wouldn't use it for anything real. > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon >Sent: 17 February 2005 15:49 >To: wtr-general at rubyforge.org >Subject: Re: [Wtr-general] Uncovered SourceForge project using old IEC >library > > >On Thu, 17 Feb 2005 14:26:46 -0800, jkohl at telusplanet.net > wrote: > > I'm personally not a big fan of capture/replay testing. I think it is > > a bad testing practice. Others may disagree, but I think it can create > > > farcical "tests" that are unmaintainable at worst, and a lot of > > headaches to maintain at best. Some folks have said good things about > > Marathon, so maybe there is a way to do it well. > >I'm of two minds. On the one hand, the potential for abuse is huge. >I have nightmares of scads of newbies descending on this mail list with >"I recorded 500 clicks and my script doesn't work" questions. > >On the other hand, just today Chris Hedges and I were wishing we had >some way to export IRB interactions to a runnable script. That is, we >find a command that works using IRB, we have to copy/paste into a file >in order to preserve that line. That's pretty clunky. -Chris >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Thu Feb 17 19:08:32 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 17 Feb 2005 18:08:32 -0600 Subject: [Wtr-general] Uncovered SourceForge project using old IEC library In-Reply-To: <72799cd705021714485a43bad3@mail.gmail.com> References: <1108679206.42151a2624e04@webmail.telusplanet.net> <72799cd7050217134771367b7e@mail.gmail.com> <1108679206.42151a2624e04@webmail.telusplanet.net> Message-ID: <5.1.0.14.2.20050217180441.02c86038@127.0.0.1> At 04:48 PM 2/17/2005, Chris McMahon wrote: >On the other hand, just today Chris Hedges and I were wishing we had >some way to export IRB interactions to a runnable script. That is, we >find a command that works using IRB, we have to copy/paste into a file >in order to preserve that line. That's pretty clunky. This has been a common request in our class. This reminds me of an old suggestion, which i'd never gotten to trying out. It looked like greek to me when i first got it. Now it looks trivial. Oh, what a year of Ruby programming will do for you! >To: bret at pettichord.com >Message-Id: <941A3492-43B1-11D8-B6A0-000A95A0CD6C at navanax.org> >Content-Type: multipart/alternative; boundary=Apple-Mail-10-972617576 >Cc: Rob Sartin >Subject: Capturing irb input >From: Rob Sartin > >http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/59054 > >said: > >If you just want input, put this in your .irbrc, assuming your irb is >built with readline support: > > > def dump_history(file=nil) > if file > File.open(file, "w") do |f| > f.puts IRB::ReadlineInputMethod::HISTORY.to_a > end > else > puts IRB::ReadlineInputMethod::HISTORY.to_a > end > end > > >Regards, > >Rob I'd like to see us spiff up IRB to work better with Watir. Maybe with out own .irbrc file. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Feb 17 19:14:12 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 17 Feb 2005 18:14:12 -0600 Subject: [Wtr-general] Uncovered SourceForge project using old IEC library In-Reply-To: <72799cd7050217134771367b7e@mail.gmail.com> Message-ID: <5.1.0.14.2.20050217181021.02c8cb10@127.0.0.1> At 03:47 PM 2/17/2005, Chris McMahon wrote: >Could WATIR use a capture/replay feature? My general answer is that if someone wants to create a new feature for Watir, we'll take it. Provided the code isn't crap and does have unit tests. Creating unit tests for a capture replay tool may be tough, however. Also, we may put it in a sub-module (like Watir::Simple), to make it clear that it is a separate thing. Is anyone interested in writing such a thing? I have mixed feelings about recorders myself, but if someone wants to do it.... well who am i to tell them no. Personally, i'd like to see a Spy tool first. Doing that right is probably a first step to building a solid recorder anyhow. Bret _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Thu Feb 17 19:27:04 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 17 Feb 2005 17:27:04 -0700 Subject: [Wtr-general] Uncovered SourceForge project using old IEC library In-Reply-To: Message-ID: <001d01c51550$925c80f0$6400a8c0@NewDell> Some web servers, web objects is the one that caused me lots of problems, and also stuts I believe, can dynamically give a control a name. webobjects uses a drag and drop type ide. A developer can override this behaviour So the first time you get a text bbox with a name of abcd1234 The next time you get something like Abcd4456 This makes a recorder completely useless, and its also real difficult to write a regular script too. This is what led me to using the :beforeText :afterText things. Now, I have a recorder sort of written. However its real difficult to capture the mouse click. My recorder doesn't use ie as much as the one Chris mentions. In fact I couldn't get this particular one to work ;-( ( shame, I was going to rip the code off!) My recorder captures the windows message queue and intercepts mouse clicks and keyboard events. I then ask IE to tell me if there is an object where the mouse was clicked, and then find out what sore of object etc. . The downside is I cant get this working in ruby, but a vb dll will do it. Im basing my code of this: http://www.vbaccelerator.com/home/VB/Code/Libraries/Hooks/vbAccelerator_ Hook_Library/article.asp Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrew McFarlane Sent: 17 February 2005 16:48 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Uncovered SourceForge project using old IEC library I have been using commercial GUI test tools for 10 years. I don't recall ever recording a script and using it as is. Still, having a recording capability is a *huge* time savings in terms of recognizing which objects we're working on--which itself includes which object attribute(s) uniquely identify that object--and which method calls are appropriate for the action that we want to take. Even if we had something that spits out descriptions of browser objects, actually recording would be faster. Andrew McFarlane >From: Paul Rogers >Reply-To: wtr-general at rubyforge.org >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Uncovered SourceForge project using old IEC >library >Date: Thu, 17 Feb 2005 16:28:04 -0700 > >I had started writing one, my view is that its often easy to figure out >how to write a test by looking at the recorded code. I certainly >wouldn't use it for anything real. > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon >Sent: 17 February 2005 15:49 >To: wtr-general at rubyforge.org >Subject: Re: [Wtr-general] Uncovered SourceForge project using old IEC >library > > >On Thu, 17 Feb 2005 14:26:46 -0800, jkohl at telusplanet.net > wrote: > > I'm personally not a big fan of capture/replay testing. I think it > > is a bad testing practice. Others may disagree, but I think it can > > create > > > farcical "tests" that are unmaintainable at worst, and a lot of > > headaches to maintain at best. Some folks have said good things > > about Marathon, so maybe there is a way to do it well. > >I'm of two minds. On the one hand, the potential for abuse is huge. I >have nightmares of scads of newbies descending on this mail list with >"I recorded 500 clicks and my script doesn't work" questions. > >On the other hand, just today Chris Hedges and I were wishing we had >some way to export IRB interactions to a runnable script. That is, we >find a command that works using IRB, we have to copy/paste into a file >in order to preserve that line. That's pretty clunky. -Chris >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Thu Feb 17 19:42:05 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 17 Feb 2005 17:42:05 -0700 Subject: [Wtr-general] Uncovered SourceForge project using old IEC library In-Reply-To: <5.1.0.14.2.20050217181021.02c8cb10@127.0.0.1> Message-ID: <001e01c51552$ab8c5710$6400a8c0@NewDell> Bret Said: Personally, i'd like to see a Spy tool first. Doing that right is probably a first step to building a solid recorder anyhow. If you want to do something like the following, you can have it tomorrow: Open IE, Navigate to the site Start a ruby script in a dos window - set the 2 windows side by side, so you can see both Mouse over an object in IE Use alt-tab to set focus to the ruby prompt Press space. Object details are displayed. From jkohl at telusplanet.net Thu Feb 17 20:22:23 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Thu, 17 Feb 2005 18:22:23 -0700 Subject: [Wtr-general] Uncovered SourceForge project using old IEC library In-Reply-To: <5.1.0.14.2.20050217181021.02c8cb10@127.0.0.1> Message-ID: <20050218012130.VVMP4345.priv-edtnes51.telusplanet.net@tintin> > > My general answer is that if someone wants to create a new feature for > Watir, we'll take it. Provided the code isn't crap and does have unit > tests. Creating unit tests for a capture replay tool may be tough, > however. > Also, we may put it in a sub-module (like Watir::Simple), to make it clear > that it is a separate thing. I like this approach. I'd rather see it as an add-on to Watir than be incorporated in Watir itself. The people who want to use it can use it, and others who just want to do scripts by hand don't need to worry about it. -Jonathan From irushton at olysoftit.com Thu Feb 17 20:24:14 2005 From: irushton at olysoftit.com (Ian Rushton) Date: Thu, 17 Feb 2005 20:24:14 -0500 Subject: [Wtr-general] Uncovered SourceForge project using old IEC library In-Reply-To: Message-ID: <200502180120.j1I1KqdS003045@rubyforge.org> I agree, I think a far more useful tool would be one that would allow you to point at an object and tell you how to reference it the most efficient way in Watir. I have been through at website with lots of JavaScript, frames and such. I had to figure out what the code was doing before I new how to reference the object. Ian Rushton -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrew McFarlane Sent: Thursday, February 17, 2005 6:48 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Uncovered SourceForge project using old IEC library I have been using commercial GUI test tools for 10 years. I don't recall ever recording a script and using it as is. Still, having a recording capability is a *huge* time savings in terms of recognizing which objects we're working on--which itself includes which object attribute(s) uniquely identify that object--and which method calls are appropriate for the action that we want to take. Even if we had something that spits out descriptions of browser objects, actually recording would be faster. Andrew McFarlane >From: Paul Rogers >Reply-To: wtr-general at rubyforge.org >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Uncovered SourceForge project using old IEC >library >Date: Thu, 17 Feb 2005 16:28:04 -0700 > >I had started writing one, my view is that its often easy to figure out >how to write a test by looking at the recorded code. I certainly >wouldn't use it for anything real. > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon >Sent: 17 February 2005 15:49 >To: wtr-general at rubyforge.org >Subject: Re: [Wtr-general] Uncovered SourceForge project using old IEC >library > > >On Thu, 17 Feb 2005 14:26:46 -0800, jkohl at telusplanet.net > wrote: > > I'm personally not a big fan of capture/replay testing. I think it is > > a bad testing practice. Others may disagree, but I think it can create > > > farcical "tests" that are unmaintainable at worst, and a lot of > > headaches to maintain at best. Some folks have said good things about > > Marathon, so maybe there is a way to do it well. > >I'm of two minds. On the one hand, the potential for abuse is huge. >I have nightmares of scads of newbies descending on this mail list with >"I recorded 500 clicks and my script doesn't work" questions. > >On the other hand, just today Chris Hedges and I were wishing we had >some way to export IRB interactions to a runnable script. That is, we >find a command that works using IRB, we have to copy/paste into a file >in order to preserve that line. That's pretty clunky. -Chris >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Thu Feb 17 23:55:01 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 17 Feb 2005 22:55:01 -0600 Subject: [Wtr-general] Uncovered SourceForge project using old IEC library In-Reply-To: <200502180120.j1I1KqdS003045@rubyforge.org> References: Message-ID: <5.1.0.14.2.20050217225255.02cfb5b0@127.0.0.1> At 07:24 PM 2/17/2005, Ian Rushton wrote: >I agree, I think a far more useful tool would be one that would allow you to >point at an object and tell you how to reference it the most efficient way >in Watir. I have been through at website with lots of JavaScript, frames >and such. I had to figure out what the code was doing before I new how to >reference the object. First would be to tell you how it *could* be referenced. To know the most *efficient* way takes judgment and analysis. I don't know how this could be reliably automated. The problem with recorders is that they guess on this part. They have to. Bret _____________________ Bret Pettichord www.pettichord.com From welkin_inc at hotmail.com Fri Feb 18 10:17:18 2005 From: welkin_inc at hotmail.com (Andrew McFarlane) Date: Fri, 18 Feb 2005 08:17:18 -0700 Subject: [Wtr-general] Uncovered SourceForge project using old IEC library In-Reply-To: <001d01c51550$925c80f0$6400a8c0@NewDell> Message-ID: Thanks for the reference article. I'm definitely going to have to read through it again a time or two. Do you (or anyone else) have any experience pointing the browser to a proxy that you create to capture traffic? I don't, but I'm guessing someone has, and I wondered about the pros and cons to that. Andrew McFarlane >From: Paul Rogers >Reply-To: wtr-general at rubyforge.org >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Uncovered SourceForge project using old IEC >library >Date: Thu, 17 Feb 2005 17:27:04 -0700 > >Some web servers, web objects is the one that caused me lots of >problems, and also stuts I believe, can dynamically give a control a >name. webobjects uses a drag and drop type ide. A developer can override >this behaviour > >So the first time you get a text bbox with a name of abcd1234 >The next time you get something like >Abcd4456 >This makes a recorder completely useless, and its also real difficult to >write a regular script too. >This is what led me to using the :beforeText :afterText things. > >Now, I have a recorder sort of written. However its real difficult to >capture the mouse click. My recorder doesn't use ie as much as the one >Chris mentions. In fact I couldn't get this particular one to work ;-( ( >shame, I was going to rip the code off!) > >My recorder captures the windows message queue and intercepts mouse >clicks and keyboard events. I then ask IE to tell me if there is an >object where the mouse was clicked, and then find out what sore of >object etc. > >. The downside is I cant get this working in ruby, but a vb dll will do >it. Im basing my code of this: >http://www.vbaccelerator.com/home/VB/Code/Libraries/Hooks/vbAccelerator_ >Hook_Library/article.asp > >Paul > > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrew McFarlane >Sent: 17 February 2005 16:48 >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Uncovered SourceForge project using old IEC >library > > >I have been using commercial GUI test tools for 10 years. I don't >recall >ever recording a script and using it as is. Still, having a recording >capability is a *huge* time savings in terms of recognizing which >objects >we're working on--which itself includes which object attribute(s) >uniquely >identify that object--and which method calls are appropriate for the >action >that we want to take. Even if we had something that spits out >descriptions >of browser objects, actually recording would be faster. > >Andrew McFarlane > > > > > >From: Paul Rogers > >Reply-To: wtr-general at rubyforge.org > >To: wtr-general at rubyforge.org > >Subject: RE: [Wtr-general] Uncovered SourceForge project using old IEC > >library > >Date: Thu, 17 Feb 2005 16:28:04 -0700 > > > >I had started writing one, my view is that its often easy to figure out > > >how to write a test by looking at the recorded code. I certainly > >wouldn't use it for anything real. > > > >-----Original Message----- > >From: wtr-general-bounces at rubyforge.org > >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon > >Sent: 17 February 2005 15:49 > >To: wtr-general at rubyforge.org > >Subject: Re: [Wtr-general] Uncovered SourceForge project using old IEC > >library > > > > > >On Thu, 17 Feb 2005 14:26:46 -0800, jkohl at telusplanet.net > > wrote: > > > I'm personally not a big fan of capture/replay testing. I think it > > > is a bad testing practice. Others may disagree, but I think it can > > > create > > > > > farcical "tests" that are unmaintainable at worst, and a lot of > > > headaches to maintain at best. Some folks have said good things > > > about Marathon, so maybe there is a way to do it well. > > > >I'm of two minds. On the one hand, the potential for abuse is huge. I > >have nightmares of scads of newbies descending on this mail list with > >"I recorded 500 clicks and my script doesn't work" questions. > > > >On the other hand, just today Chris Hedges and I were wishing we had > >some way to export IRB interactions to a runnable script. That is, we > >find a command that works using IRB, we have to copy/paste into a file > >in order to preserve that line. That's pretty clunky. -Chris > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general From irushton at olysoftit.com Fri Feb 18 10:35:18 2005 From: irushton at olysoftit.com (Ian Rushton) Date: Fri, 18 Feb 2005 10:35:18 -0500 Subject: [Wtr-general] Uncovered SourceForge project using old IEC library In-Reply-To: Message-ID: <200502181531.j1IFVtdS008508@rubyforge.org> Proxies have problems. First is you have to set it up when you need it, the second is that it needs to understand all the protocols that websites use. I do a lot of SSL site testing and having a proxy would mean that it would have to do SSL as well, not many do. So for SSL based sites proxy recording would be useless. Ian Rushton -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrew McFarlane Sent: Friday, February 18, 2005 10:17 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Uncovered SourceForge project using old IEC library Thanks for the reference article. I'm definitely going to have to read through it again a time or two. Do you (or anyone else) have any experience pointing the browser to a proxy that you create to capture traffic? I don't, but I'm guessing someone has, and I wondered about the pros and cons to that. Andrew McFarlane >From: Paul Rogers >Reply-To: wtr-general at rubyforge.org >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Uncovered SourceForge project using old IEC >library >Date: Thu, 17 Feb 2005 17:27:04 -0700 > >Some web servers, web objects is the one that caused me lots of >problems, and also stuts I believe, can dynamically give a control a >name. webobjects uses a drag and drop type ide. A developer can override >this behaviour > >So the first time you get a text bbox with a name of abcd1234 >The next time you get something like >Abcd4456 >This makes a recorder completely useless, and its also real difficult to >write a regular script too. >This is what led me to using the :beforeText :afterText things. > >Now, I have a recorder sort of written. However its real difficult to >capture the mouse click. My recorder doesn't use ie as much as the one >Chris mentions. In fact I couldn't get this particular one to work ;-( ( >shame, I was going to rip the code off!) > >My recorder captures the windows message queue and intercepts mouse >clicks and keyboard events. I then ask IE to tell me if there is an >object where the mouse was clicked, and then find out what sore of >object etc. > >. The downside is I cant get this working in ruby, but a vb dll will do >it. Im basing my code of this: >http://www.vbaccelerator.com/home/VB/Code/Libraries/Hooks/vbAccelerator_ >Hook_Library/article.asp > >Paul > > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrew McFarlane >Sent: 17 February 2005 16:48 >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Uncovered SourceForge project using old IEC >library > > >I have been using commercial GUI test tools for 10 years. I don't >recall >ever recording a script and using it as is. Still, having a recording >capability is a *huge* time savings in terms of recognizing which >objects >we're working on--which itself includes which object attribute(s) >uniquely >identify that object--and which method calls are appropriate for the >action >that we want to take. Even if we had something that spits out >descriptions >of browser objects, actually recording would be faster. > >Andrew McFarlane > > > > > >From: Paul Rogers > >Reply-To: wtr-general at rubyforge.org > >To: wtr-general at rubyforge.org > >Subject: RE: [Wtr-general] Uncovered SourceForge project using old IEC > >library > >Date: Thu, 17 Feb 2005 16:28:04 -0700 > > > >I had started writing one, my view is that its often easy to figure out > > >how to write a test by looking at the recorded code. I certainly > >wouldn't use it for anything real. > > > >-----Original Message----- > >From: wtr-general-bounces at rubyforge.org > >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon > >Sent: 17 February 2005 15:49 > >To: wtr-general at rubyforge.org > >Subject: Re: [Wtr-general] Uncovered SourceForge project using old IEC > >library > > > > > >On Thu, 17 Feb 2005 14:26:46 -0800, jkohl at telusplanet.net > > wrote: > > > I'm personally not a big fan of capture/replay testing. I think it > > > is a bad testing practice. Others may disagree, but I think it can > > > create > > > > > farcical "tests" that are unmaintainable at worst, and a lot of > > > headaches to maintain at best. Some folks have said good things > > > about Marathon, so maybe there is a way to do it well. > > > >I'm of two minds. On the one hand, the potential for abuse is huge. I > >have nightmares of scads of newbies descending on this mail list with > >"I recorded 500 clicks and my script doesn't work" questions. > > > >On the other hand, just today Chris Hedges and I were wishing we had > >some way to export IRB interactions to a runnable script. That is, we > >find a command that works using IRB, we have to copy/paste into a file > >in order to preserve that line. That's pretty clunky. -Chris > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Fri Feb 18 11:00:47 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 18 Feb 2005 09:00:47 -0700 Subject: [Wtr-general] Uncovered SourceForge project using old IEC library In-Reply-To: <200502181531.j1IFVtdS008508@rubyforge.org> Message-ID: <001801c515d3$02e9d9d0$6400a8c0@NewDell> For an ssl site, I embedded IE in a vb appliaction (actually in excel), and recorded the urls in the beforeNavigate event. If you want this code, I can probably send it on. Using this I was able to record scripts for later playback in a load testing tool I wrote. If you use grinder, you can supposedly create an ssl proxy - the ssl connection lives between browser and grinder, so grinder can record, and then another ssl connecion exists between proxy and grinder. That's the theory anyway, it was another thing I never got to work. Hence the embedded browser. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ian Rushton Sent: 18 February 2005 08:35 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Uncovered SourceForge project using old IEC library Proxies have problems. First is you have to set it up when you need it, the second is that it needs to understand all the protocols that websites use. I do a lot of SSL site testing and having a proxy would mean that it would have to do SSL as well, not many do. So for SSL based sites proxy recording would be useless. Ian Rushton -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrew McFarlane Sent: Friday, February 18, 2005 10:17 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Uncovered SourceForge project using old IEC library Thanks for the reference article. I'm definitely going to have to read through it again a time or two. Do you (or anyone else) have any experience pointing the browser to a proxy that you create to capture traffic? I don't, but I'm guessing someone has, and I wondered about the pros and cons to that. Andrew McFarlane >From: Paul Rogers >Reply-To: wtr-general at rubyforge.org >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Uncovered SourceForge project using old IEC >library >Date: Thu, 17 Feb 2005 17:27:04 -0700 > >Some web servers, web objects is the one that caused me lots of >problems, and also stuts I believe, can dynamically give a control a >name. webobjects uses a drag and drop type ide. A developer can >override this behaviour > >So the first time you get a text bbox with a name of abcd1234 The next >time you get something like Abcd4456 >This makes a recorder completely useless, and its also real difficult to >write a regular script too. >This is what led me to using the :beforeText :afterText things. > >Now, I have a recorder sort of written. However its real difficult to >capture the mouse click. My recorder doesn't use ie as much as the one >Chris mentions. In fact I couldn't get this particular one to work ;-( >( shame, I was going to rip the code off!) > >My recorder captures the windows message queue and intercepts mouse >clicks and keyboard events. I then ask IE to tell me if there is an >object where the mouse was clicked, and then find out what sore of >object etc. > >. The downside is I cant get this working in ruby, but a vb dll will do >it. Im basing my code of this: >http://www.vbaccelerator.com/home/VB/Code/Libraries/Hooks/vbAccelerator >_ >Hook_Library/article.asp > >Paul > > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrew >McFarlane >Sent: 17 February 2005 16:48 >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Uncovered SourceForge project using old IEC >library > > >I have been using commercial GUI test tools for 10 years. I don't >recall ever recording a script and using it as is. Still, having a >recording capability is a *huge* time savings in terms of recognizing >which objects >we're working on--which itself includes which object attribute(s) >uniquely >identify that object--and which method calls are appropriate for the >action >that we want to take. Even if we had something that spits out >descriptions >of browser objects, actually recording would be faster. > >Andrew McFarlane > > > > > >From: Paul Rogers > >Reply-To: wtr-general at rubyforge.org > >To: wtr-general at rubyforge.org > >Subject: RE: [Wtr-general] Uncovered SourceForge project using old > >IEC library > >Date: Thu, 17 Feb 2005 16:28:04 -0700 > > > >I had started writing one, my view is that its often easy to figure > >out > > >how to write a test by looking at the recorded code. I certainly > >wouldn't use it for anything real. > > > >-----Original Message----- > >From: wtr-general-bounces at rubyforge.org > >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon > >Sent: 17 February 2005 15:49 > >To: wtr-general at rubyforge.org > >Subject: Re: [Wtr-general] Uncovered SourceForge project using old > >IEC library > > > > > >On Thu, 17 Feb 2005 14:26:46 -0800, jkohl at telusplanet.net > > wrote: > > > I'm personally not a big fan of capture/replay testing. I think it > > > is a bad testing practice. Others may disagree, but I think it can > > > create > > > > > farcical "tests" that are unmaintainable at worst, and a lot of > > > headaches to maintain at best. Some folks have said good things > > > about Marathon, so maybe there is a way to do it well. > > > >I'm of two minds. On the one hand, the potential for abuse is huge. > >I have nightmares of scads of newbies descending on this mail list > >with "I recorded 500 clicks and my script doesn't work" questions. > > > >On the other hand, just today Chris Hedges and I were wishing we had > >some way to export IRB interactions to a runnable script. That is, > >we find a command that works using IRB, we have to copy/paste into a > >file in order to preserve that line. That's pretty clunky. -Chris > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From christopher.mcmahon at gmail.com Fri Feb 18 12:55:29 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 18 Feb 2005 10:55:29 -0700 Subject: [Wtr-general] OT: Karlin's Mondo Pizza meets EverQuest! Message-ID: <72799cd7050218095555022af1@mail.gmail.com> Coffee flew out my nose: http://everquest2.station.sony.com/pizza/ -Chris From paul.rogers at shaw.ca Fri Feb 18 22:58:13 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 18 Feb 2005 20:58:13 -0700 Subject: [Wtr-general] FW: [fxruby-users] Fwd: [ANN] FXIrb 0.14 - a Win32 GUI wrapper around IRB Message-ID: <003801c51637$3c07e590$6400a8c0@NewDell> -----Original Message----- From: fxruby-users-bounces at rubyforge.org [mailto:fxruby-users-bounces at rubyforge.org] On Behalf Of Lyle Johnson Sent: 18 February 2005 20:36 To: fxruby-users at rubyforge.org Subject: [fxruby-users] Fwd: [ANN] FXIrb 0.14 - a Win32 GUI wrapper around IRB As posted by Martin to ruby-talk... ---------- Forwarded message ---------- From: Martin DeMello Date: Sat, 19 Feb 2005 07:34:46 +0900 Subject: [ANN] FXIrb 0.14 - a Win32 GUI wrapper around IRB To: ruby-talk ML - What? FXIrb is a simple FXText wrapper around IRB, giving it useful features like a decent GUI font and cut/paste capability. The current version is being developed under Windows; I'll look at crossplatform operation in a later release - Why? IRB in the standard Windows terminal is quite painful to use. (The linux terminal is a lot more capable, which is why I'm concentrating my development efforts on Windows right now). Thanks to Marco Fraillis for the initial Windows port, and to Gilles Filippini for starting the project. - Where? http://rubyforge.org/frs/?group_id=501 - Now what? This is a rather alpha release; I'd mostly like people to bang on it and see what functionality they feel is missing. My current top priority is multiline editing, but I'm open to feature requests, suggestions and (particularly!) contributions. If the next version looks good, I'm going to work with Curt and Laurent and make a proper FreeRIDE plugin out of it. martin _______________________________________________ fxruby-users mailing list fxruby-users at rubyforge.org http://rubyforge.org/mailman/listinfo/fxruby-users From ffrassaint at hotmail.com Mon Feb 21 11:07:21 2005 From: ffrassaint at hotmail.com (Fabrice FRASSAINT) Date: Mon, 21 Feb 2005 16:07:21 +0000 Subject: [Wtr-general] Uncovered SourceForge project using old IEC library In-Reply-To: <200502181531.j1IFVtdS008508@rubyforge.org> Message-ID: An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050221/1de057be/attachment.html From ffrassaint at hotmail.com Mon Feb 21 11:12:22 2005 From: ffrassaint at hotmail.com (Fabrice FRASSAINT) Date: Mon, 21 Feb 2005 16:12:22 +0000 Subject: [Wtr-general] winCLicker and Security Alert box under IE Message-ID: An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050221/7afc5eba/attachment.html From paul.rogers at shaw.ca Mon Feb 21 11:38:56 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 21 Feb 2005 09:38:56 -0700 Subject: [Wtr-general] winCLicker and Security Alert box under IE In-Reply-To: Message-ID: <001d01c51833$d61ef940$6400a8c0@NewDell> is this on windows XP ? I know this code used to work, on Win2000 as I used to use it. However on XP, the buttons do something different, there is no undeline on the Yes to indicate a shortcut, until the alt key is pressed. Is it possible to try and click the first button? ( you may have to write a new method to do that) Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Fabrice FRASSAINT Sent: 21 February 2005 09:12 To: wtr-general at rubyforge.org Subject: [Wtr-general] winCLicker and Security Alert box under IE Good afternoon, I tried to go through the winClicker code and found a clearSecurityBox() function. It didn't work for me when I need to access a SSL Site section and when this window appears. So I went through the user32.dll calls to find the window and find the child handles available (buttons). I found the button called "&Yes" or "&Oui" in French. When I send him directly the BM_CLICK message, it returns 1 (so it should be ok) but the window is not closing and stands until I click on Yes to accept the certificate. Isn't it a IE security issue ??? It should be normal to avoid automated programs to go through security issues. Do you have an idea about this ??? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050221/9f0c6a72/attachment.html From ffrassaint at hotmail.com Mon Feb 21 12:24:17 2005 From: ffrassaint at hotmail.com (Fabrice FRASSAINT) Date: Mon, 21 Feb 2005 17:24:17 +0000 Subject: [Wtr-general] winCLicker and Security Alert box under IE In-Reply-To: <001d01c51833$d61ef940$6400a8c0@NewDell> Message-ID: An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050221/cd05bbf4/attachment.html From antony.marcano at testingreflections.com Mon Feb 21 12:43:46 2005 From: antony.marcano at testingreflections.com (Antony Marcano (testingReflections.com)) Date: Mon, 21 Feb 2005 17:43:46 -0000 Subject: Update: [Wtr-general] showModalDialog Watir & Ruby? In-Reply-To: <72799cd705020111092757c058@mail.gmail.com> Message-ID: <200502211740.j1LHe8dS012391@rubyforge.org> Hi guys - I know that this is old news but unfortunately I am only able to come back to this occasionally and can't give it the time I want to. I have been able to find out that the window.showModalDialog() creates an object within the Internet Explorer Application of type: TridentDlgFrame It seems to be in a container within the "Window" object. I have searched the web but only found one reference to it: http://www.xtremevbtalk.com/showthread.php?t=184328 Unfortunately this is someone in a similar situation with some VB and no solution. I dropped him an e-mail so will let you know if I get a reply. Other than that, I have also determined that (in theory) you can access properties of the dialog through IHTMLDialog in mshtml.dll http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/mshtml/r eference/ifaces/dialog/dialog.asp I sense that I am getting closer - I just wish I had more time! Any pointers/suggestions as to how to attempt to access it would be appreciated. I won't have a chance to investigate further for another week or two. If I don't solve it - at least this info is in the archives to perhaps help someone else in the future. > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Chris McMahon > Sent: 01 February 2005 19:10 > To: wtr-general at rubyforge.org > Subject: Re: Aha! Re: [Wtr-general] showModalDialog Watir & Ruby? > > On Tue, 01 Feb 2005 12:06:46 -0700, Paul Rogers > wrote: > > I tried that last night - no luck ;-( > > Curses. Foiled. again. > -C > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From dallenusa at yahoo.com Mon Feb 21 18:44:17 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Mon, 21 Feb 2005 15:44:17 -0800 (PST) Subject: [Wtr-general] Span method Message-ID: <20050221234417.43912.qmail@web30506.mail.mud.yahoo.com> Was there anything added that would handle this? I would be going after the ID of divreports. Thanks __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From paul.rogers at shaw.ca Mon Feb 21 20:46:10 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 21 Feb 2005 18:46:10 -0700 Subject: [Wtr-general] Span method In-Reply-To: <20050221234417.43912.qmail@web30506.mail.mud.yahoo.com> Message-ID: <003701c51880$48f62aa0$6400a8c0@NewDell> I just added span handling to watir. Take a look at div_test.rb for usage Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Richard Allen Sent: 21 February 2005 16:44 To: Wtr-general at rubyforge.org Subject: [Wtr-general] Span method Was there anything added that would handle this? I would be going after the ID of divreports. Thanks __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Mon Feb 21 21:29:31 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 21 Feb 2005 19:29:31 -0700 Subject: [Wtr-general] Links object Message-ID: <003801c51886$57239080$6400a8c0@NewDell> Ive added a Links object and a corresponding links method to watir. This will give access to each link on the page using each Ie.links.each do|l| puts l.innerText End Currently it returns the raw internet explorer link, hence the .innerText method What should this return? Leave it as it is? Or return a watir link object, so that you could do Ie.links.each do|l| puts l.to_s End Or Ie.links.each do|l| l.click() if l.enabled? End Which may produce some more meaningful stuff? On a related note, is anyone currently using link.to_s ? It looks like it may need some improvemnt Paul From dallenusa at yahoo.com Tue Feb 22 11:02:07 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Tue, 22 Feb 2005 08:02:07 -0800 (PST) Subject: [Wtr-general] Span method In-Reply-To: <003701c51880$48f62aa0$6400a8c0@NewDell> Message-ID: <20050222160207.93208.qmail@web30505.mail.mud.yahoo.com> I have version 1.0.4. Do I need to pull down a patch to use the span method? What I currently have gives me an undefined method "span" --- Paul Rogers wrote: > > I just added span handling to watir. Take a look at > div_test.rb for > usage > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf > Of Richard Allen > Sent: 21 February 2005 16:44 > To: Wtr-general at rubyforge.org > Subject: [Wtr-general] Span method > > > Was there anything added that would handle this? > > I would be going after the ID of divreports. > > > OnMouseOver="colorElement('!TOPHOVER');" > OnMouseOut="colorElement('');" > ID='divReports'OnClick="mpNavigate('divReports');" > TITLE='Show Reports items in the left-hand menu.' > STYLE='Display:None' > >    Reports     > > Thanks > > > > __________________________________ > Do you Yahoo!? > Take Yahoo! Mail with you! Get it on your mobile > phone. > http://mobile.yahoo.com/maildemo > _______________________________________________ > 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!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com From jkohl at telusplanet.net Tue Feb 22 11:04:24 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Tue, 22 Feb 2005 08:04:24 -0800 Subject: [Wtr-general] Span method In-Reply-To: <20050222160207.93208.qmail@web30505.mail.mud.yahoo.com> References: <20050222160207.93208.qmail@web30505.mail.mud.yahoo.com> Message-ID: <1109088264.421b58087713d@webmail.telus.net> > I have version 1.0.4. Do I need to pull down a patch > to use the span method? No, just go here: http://rubyforge.org/cgi-bin/viewcvs.cgi/watir/?cvsroot=wtr and click the "Download tarball" link near the bottom of the page. Unzip it and install Watir like you did with previous releases. This is the way to get the latest and greatest from CVS. There is more info on this in the User Guide. -Jonathan > What I currently have gives me an undefined method > "span" > > > > --- Paul Rogers wrote: > > > > > I just added span handling to watir. Take a look at > > div_test.rb for > > usage > > > > Paul > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf > > Of Richard Allen > > Sent: 21 February 2005 16:44 > > To: Wtr-general at rubyforge.org > > Subject: [Wtr-general] Span method > > > > > > Was there anything added that would handle this? > > > > I would be going after the ID of divreports. > > > > > > > OnMouseOver="colorElement('!TOPHOVER');" > > OnMouseOut="colorElement('');" > > ID='divReports'OnClick="mpNavigate('divReports');" > > TITLE='Show Reports items in the left-hand menu.' > > STYLE='Display:None' > > > >    Reports     > > > > Thanks > > > > > > > > __________________________________ > > Do you Yahoo!? > > Take Yahoo! Mail with you! Get it on your mobile > > phone. > > http://mobile.yahoo.com/maildemo > > _______________________________________________ > > 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!? > Meet the all-new My Yahoo! - Try it today! > http://my.yahoo.com > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Tue Feb 22 11:06:42 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 22 Feb 2005 09:06:42 -0700 Subject: [Wtr-general] Span method In-Reply-To: <20050222160207.93208.qmail@web30505.mail.mud.yahoo.com> Message-ID: <000201c518f8$7fc57450$6400a8c0@NewDell> Get the latest cvs tarball http://rubyforge.org/cgi-bin/viewcvs.cgi/watir/?cvsroot=wtr Download, unzip and then run install.rb -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Richard Allen Sent: 22 February 2005 09:02 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Span method I have version 1.0.4. Do I need to pull down a patch to use the span method? What I currently have gives me an undefined method "span" --- Paul Rogers wrote: > > I just added span handling to watir. Take a look at div_test.rb for > usage > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Richard Allen > Sent: 21 February 2005 16:44 > To: Wtr-general at rubyforge.org > Subject: [Wtr-general] Span method > > > Was there anything added that would handle this? > > I would be going after the ID of divreports. > > > OnMouseOut="colorElement('');" > ID='divReports'OnClick="mpNavigate('divReports');" > TITLE='Show Reports items in the left-hand menu.' > STYLE='Display:None' > >    Reports     > > Thanks > > > > __________________________________ > Do you Yahoo!? > Take Yahoo! Mail with you! Get it on your mobile > phone. > http://mobile.yahoo.com/maildemo > _______________________________________________ > 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!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From dallenusa at yahoo.com Tue Feb 22 12:16:37 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Tue, 22 Feb 2005 09:16:37 -0800 (PST) Subject: [Wtr-general] Span method In-Reply-To: <000201c518f8$7fc57450$6400a8c0@NewDell> Message-ID: <20050222171637.88909.qmail@web30507.mail.mud.yahoo.com> Works like a champ --- Paul Rogers wrote: > Get the latest cvs tarball > http://rubyforge.org/cgi-bin/viewcvs.cgi/watir/?cvsroot=wtr > > Download, unzip and then run install.rb > > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf > Of Richard Allen > Sent: 22 February 2005 09:02 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Span method > > > I have version 1.0.4. Do I need to pull down a patch > to use the span method? > > What I currently have gives me an undefined method > "span" > > > > --- Paul Rogers wrote: > > > > > I just added span handling to watir. Take a look > at div_test.rb for > > usage > > > > Paul > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On > Behalf Of Richard Allen > > Sent: 21 February 2005 16:44 > > To: Wtr-general at rubyforge.org > > Subject: [Wtr-general] Span method > > > > > > Was there anything added that would handle this? > > > > I would be going after the ID of divreports. > > > > > > OnMouseOver="colorElement('!TOPHOVER');" > > OnMouseOut="colorElement('');" > > ID='divReports'OnClick="mpNavigate('divReports');" > > TITLE='Show Reports items in the left-hand menu.' > > STYLE='Display:None' > > > >    Reports     > > > > Thanks > > > > > > > > __________________________________ > > Do you Yahoo!? > > Take Yahoo! Mail with you! Get it on your mobile > > phone. > > http://mobile.yahoo.com/maildemo > > _______________________________________________ > > 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!? > Meet the all-new My Yahoo! - Try it today! > http://my.yahoo.com > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. http://info.mail.yahoo.com/mail_250 From dallenusa at yahoo.com Tue Feb 22 12:37:50 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Tue, 22 Feb 2005 09:37:50 -0800 (PST) Subject: [Wtr-general] Active reports Message-ID: <20050222173750.78398.qmail@web30504.mail.mud.yahoo.com> We use active reports in our app. I'm not sure what methods, if any, I might try to verify the report displayed by grbbing a title. Thanks __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From paul.rogers at shaw.ca Tue Feb 22 14:00:49 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 22 Feb 2005 12:00:49 -0700 Subject: [Wtr-general] Another means of accessing Mozilla - only for linux Message-ID: <000901c51910$d3460640$6400a8c0@NewDell> -----Original Message----- From: Steven E. Newton [mailto:yahoo at cookiehome.com] Sent: 22 February 2005 10:59 To: agile-testing at yahoogroups.com Subject: Re: [agile-testing] Mozilla etc. Re: the seedy underbelly of CPAN! For what it's worth, the ruby-gnome2 group is working on a Ruby binding for Gtk::MozEmbed: http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk%3A%3AMozEmbed Depending on the current status of the nsIWebBrowser this could be quite powerful. http://lxr.mozilla.org/seamonkey/source/embedding/browser/webBrowser/nsI WebBrowser.idl s -- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/agile-testing/ <*> To unsubscribe from this group, send an email to: agile-testing-unsubscribe at yahoogroups.com <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ From antony.marcano at testingreflections.com Tue Feb 22 14:40:35 2005 From: antony.marcano at testingreflections.com (Antony Marcano (testingReflections.com)) Date: Tue, 22 Feb 2005 19:40:35 -0000 Subject: Update: [Wtr-general] showModalDialog Watir & Ruby? In-Reply-To: <200502211740.j1LHe8dS012391@rubyforge.org> Message-ID: <200502221936.j1MJaudS024417@rubyforge.org> Note to anyone who is interested... I e-mailed Jeff who was looking into this on VB... > Jeff wrote: > From what I figured out, IE on XP offers an additional event called > NewWindow3. This should fire when the Modal window is popped and allows > you to connect to it and respond to it. W2K doesn't offer it. NewWindow3 extends NewWindow2 (apparently available on Windows 2000) http://msdn.microsoft.com/workshop/browser/webbrowser/reference/events/newwi ndow3.asp Will let you know if I get to make any progress. Do let me know if anyone looks into this before I get back onto it. Thanks Antony > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Antony Marcano > (testingReflections.com) > Sent: 21 February 2005 17:44 > To: wtr-general at rubyforge.org > Subject: Update: [Wtr-general] showModalDialog Watir & Ruby? > > Hi guys - I know that this is old news but unfortunately I am only able to > come back to this occasionally and can't give it the time I want to. > > I have been able to find out that the window.showModalDialog() creates an > object within the Internet Explorer Application of type: > > TridentDlgFrame > > It seems to be in a container within the "Window" object. > > I have searched the web but only found one reference to it: > http://www.xtremevbtalk.com/showthread.php?t=184328 > > Unfortunately this is someone in a similar situation with some VB and no > solution. > > I dropped him an e-mail so will let you know if I get a reply. > > Other than that, I have also determined that (in theory) you can access > properties of the dialog through IHTMLDialog in mshtml.dll > > http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/mshtml > /r > eference/ifaces/dialog/dialog.asp > > I sense that I am getting closer - I just wish I had more time! > > Any pointers/suggestions as to how to attempt to access it would be > appreciated. > > I won't have a chance to investigate further for another week or two. > > If I don't solve it - at least this info is in the archives to perhaps > help > someone else in the future. > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > > bounces at rubyforge.org] On Behalf Of Chris McMahon > > Sent: 01 February 2005 19:10 > > To: wtr-general at rubyforge.org > > Subject: Re: Aha! Re: [Wtr-general] showModalDialog Watir & Ruby? > > > > On Tue, 01 Feb 2005 12:06:46 -0700, Paul Rogers > > wrote: > > > I tried that last night - no luck ;-( > > > > Curses. Foiled. again. > > -C > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Tue Feb 22 16:13:07 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 22 Feb 2005 14:13:07 -0700 Subject: Update: [Wtr-general] showModalDialog Watir & Ruby? In-Reply-To: <200502221936.j1MJaudS024417@rubyforge.org> Message-ID: <001201c51923$4e563730$6400a8c0@NewDell> The capture_event method already uses this. I don't know if any one has tried it with a modal dialog though Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Antony Marcano (testingReflections.com) Sent: 22 February 2005 12:41 To: wtr-general at rubyforge.org Subject: RE: Update: [Wtr-general] showModalDialog Watir & Ruby? Note to anyone who is interested... I e-mailed Jeff who was looking into this on VB... > Jeff wrote: > From what I figured out, IE on XP offers an additional event called > NewWindow3. This should fire when the Modal window is popped and allows > you to connect to it and respond to it. W2K doesn't offer it. NewWindow3 extends NewWindow2 (apparently available on Windows 2000) http://msdn.microsoft.com/workshop/browser/webbrowser/reference/events/n ewwi ndow3.asp Will let you know if I get to make any progress. Do let me know if anyone looks into this before I get back onto it. Thanks Antony > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Antony Marcano > (testingReflections.com) > Sent: 21 February 2005 17:44 > To: wtr-general at rubyforge.org > Subject: Update: [Wtr-general] showModalDialog Watir & Ruby? > > Hi guys - I know that this is old news but unfortunately I am only > able to come back to this occasionally and can't give it the time I > want to. > > I have been able to find out that the window.showModalDialog() creates > an object within the Internet Explorer Application of type: > > TridentDlgFrame > > It seems to be in a container within the "Window" object. > > I have searched the web but only found one reference to it: > http://www.xtremevbtalk.com/showthread.php?t=184328 > > Unfortunately this is someone in a similar situation with some VB and > no solution. > > I dropped him an e-mail so will let you know if I get a reply. > > Other than that, I have also determined that (in theory) you can > access properties of the dialog through IHTMLDialog in mshtml.dll > > http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/ms > html > /r > eference/ifaces/dialog/dialog.asp > > I sense that I am getting closer - I just wish I had more time! > > Any pointers/suggestions as to how to attempt to access it would be > appreciated. > > I won't have a chance to investigate further for another week or two. > > If I don't solve it - at least this info is in the archives to perhaps > help someone else in the future. > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > > bounces at rubyforge.org] On Behalf Of Chris McMahon > > Sent: 01 February 2005 19:10 > > To: wtr-general at rubyforge.org > > Subject: Re: Aha! Re: [Wtr-general] showModalDialog Watir & Ruby? > > > > On Tue, 01 Feb 2005 12:06:46 -0700, Paul Rogers > > > > wrote: > > > I tried that last night - no luck ;-( > > > > Curses. Foiled. again. > > -C > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From dallenusa at yahoo.com Tue Feb 22 17:54:55 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Tue, 22 Feb 2005 14:54:55 -0800 (PST) Subject: [Wtr-general] Form Titles Message-ID: <20050222225455.94655.qmail@web30510.mail.mud.yahoo.com> We load forms into frames .. we mave a "MainBody" frame and we load EditTimeCardF into it. If I view src I see EditTimeCardF at the very top in what I would call a Title. If I view all objects I see: src=forms/EditTimeCardF.asp I want to verify that the title of the from loaded is EditTimeCardF. If I try to ShowForms, 0 are found. Titles doesn't seem to found either. Any thought? __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From paul.rogers at shaw.ca Tue Feb 22 18:23:07 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 22 Feb 2005 16:23:07 -0700 Subject: [Wtr-general] Form Titles In-Reply-To: <20050222225455.94655.qmail@web30510.mail.mud.yahoo.com> Message-ID: <001501c51935$775000a0$6400a8c0@NewDell> Try this Ie.frames("mainbody").ie.document.title This is trying to get the title of a sub page Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Richard Allen Sent: 22 February 2005 15:55 To: Wtr-general at rubyforge.org Subject: [Wtr-general] Form Titles We load forms into frames .. we mave a "MainBody" frame and we load EditTimeCardF into it. If I view src I see EditTimeCardF at the very top in what I would call a Title. If I view all objects I see: src=forms/EditTimeCardF.asp I want to verify that the title of the from loaded is EditTimeCardF. If I try to ShowForms, 0 are found. Titles doesn't seem to found either. Any thought? __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From dallenusa at yahoo.com Tue Feb 22 18:56:53 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Tue, 22 Feb 2005 15:56:53 -0800 (PST) Subject: [Wtr-general] Form Titles In-Reply-To: <001501c51935$775000a0$6400a8c0@NewDell> Message-ID: <20050222235653.60536.qmail@web30507.mail.mud.yahoo.com> $ie.frame("MainBody").ie.document.title I get: C:/watir/examples/TimeCentre.rb:90: undefined method `document' for nil:NilClass (NoMethodError) --- Paul Rogers wrote: > Try this > > Ie.frames("mainbody").ie.document.title > > This is trying to get the title of a sub page > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf > Of Richard Allen > Sent: 22 February 2005 15:55 > To: Wtr-general at rubyforge.org > Subject: [Wtr-general] Form Titles > > > We load forms into frames .. we mave a "MainBody" > frame and we load EditTimeCardF into it. If I view > src > I see EditTimeCardF at the very top in what I would > call a Title. > > If I view all objects I see: > > src=forms/EditTimeCardF.asp > > > I want to verify that the title of the from loaded > is EditTimeCardF. If > I try to ShowForms, 0 are found. Titles doesn't seem > to found either. > > Any thought? > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > 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 bret at pettichord.com Tue Feb 22 19:57:10 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 22 Feb 2005 18:57:10 -0600 Subject: [Wtr-general] Form Titles In-Reply-To: <20050222225455.94655.qmail@web30510.mail.mud.yahoo.com> Message-ID: <5.1.0.14.2.20050222185559.02defe60@127.0.0.1> try ie.frame('MainBody').show_forms At 04:54 PM 2/22/2005, Richard Allen wrote: >We load forms into frames .. we mave a "MainBody" >frame and we load EditTimeCardF into it. If I view src >I see EditTimeCardF at the very top in what I would >call a Title. > >If I view all objects I see: > >src=forms/EditTimeCardF.asp > > >I want to verify that the title of the from loaded is >EditTimeCardF. If I try to ShowForms, 0 are found. >Titles doesn't seem to found either. > >Any thought? > >__________________________________________________ >Do You Yahoo!? >Tired of spam? Yahoo! Mail has the best spam protection around >http://mail.yahoo.com >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Tue Feb 22 22:32:43 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 22 Feb 2005 20:32:43 -0700 Subject: [Wtr-general] A new release? Message-ID: <001701c51958$55c75370$6400a8c0@NewDell> Its been almost a month since the last release. Is there anything urgent to go in? What should I do with the links object? I personally favour returning a watir link object in the each loop. Any suggestions? Paul From paul.rogers at shaw.ca Tue Feb 22 22:33:37 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 22 Feb 2005 20:33:37 -0700 Subject: [Wtr-general] Active reports In-Reply-To: <20050222173750.78398.qmail@web30504.mail.mud.yahoo.com> Message-ID: <001801c51958$7639e7d0$6400a8c0@NewDell> I looked at the web site for this. I don't have the ability to run asp.net so I cant try the downloads. Can you post some html of what a report looks like? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Richard Allen Sent: 22 February 2005 10:38 To: wtr-general at rubyforge.org Subject: [Wtr-general] Active reports We use active reports in our app. I'm not sure what methods, if any, I might try to verify the report displayed by grbbing a title. Thanks __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Tue Feb 22 23:10:47 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 22 Feb 2005 22:10:47 -0600 Subject: [Wtr-general] links In-Reply-To: <001701c51958$55c75370$6400a8c0@NewDell> Message-ID: <5.1.0.14.2.20050222220126.02e4c0a8@127.0.0.1> At 09:32 PM 2/22/2005, Paul Rogers wrote: >What should I do with the links object? I personally favour returning a >watir link object in the each loop. Any suggestions? I suggest: ie.links.each {|l| puts l.href + ' ' + l.target} Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Feb 22 23:17:26 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 22 Feb 2005 22:17:26 -0600 Subject: [Wtr-general] Links object In-Reply-To: <003801c51886$57239080$6400a8c0@NewDell> Message-ID: <5.1.0.14.2.20050222221303.02e5ae80@127.0.0.1> It should yield watir link objects. more follows... At 08:29 PM 2/21/2005, Paul Rogers wrote: >Ive added a Links object and a corresponding links method to watir. This >will give access to each link on the page using each > >Ie.links.each do|l| > puts l.innerText >End > >Currently it returns the raw internet explorer link, hence the >.innerText method > >What should this return? Leave it as it is? Or return a watir link >object, so that you could do >Ie.links.each do|l| > puts l.to_s >End > >Or > >Ie.links.each do|l| > l.click() if l.enabled? >End yes >Which may produce some more meaningful stuff? As a general rule, Watir methods should not directly expose COM objects. Think of Watir as a layered abstraction on top of COM. (There are few exceptions that intentionally allow users to poke through this abstraction -- these should be considered advanced/debugging methods. >On a related note, is anyone currently using link.to_s ? It looks like >it may need some improvemnt > > >Paul > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Tue Feb 22 23:50:44 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 22 Feb 2005 21:50:44 -0700 Subject: [Wtr-general] Links object In-Reply-To: <5.1.0.14.2.20050222221303.02e5ae80@127.0.0.1> Message-ID: <001901c51963$3c0c8f80$6400a8c0@NewDell> Ok, I'll try and make the changes tomorrow. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 22 February 2005 21:17 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Links object It should yield watir link objects. more follows... At 08:29 PM 2/21/2005, Paul Rogers wrote: >Ive added a Links object and a corresponding links method to watir. >This will give access to each link on the page using each > >Ie.links.each do|l| > puts l.innerText >End > >Currently it returns the raw internet explorer link, hence the >.innerText method > >What should this return? Leave it as it is? Or return a watir link >object, so that you could do Ie.links.each do|l| > puts l.to_s >End > >Or > >Ie.links.each do|l| > l.click() if l.enabled? >End yes >Which may produce some more meaningful stuff? As a general rule, Watir methods should not directly expose COM objects. Think of Watir as a layered abstraction on top of COM. (There are few exceptions that intentionally allow users to poke through this abstraction -- these should be considered advanced/debugging methods. >On a related note, is anyone currently using link.to_s ? It looks like >it may need some improvemnt > > >Paul > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From dallenusa at yahoo.com Wed Feb 23 10:13:34 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Wed, 23 Feb 2005 07:13:34 -0800 (PST) Subject: [Wtr-general] Form Titles In-Reply-To: <5.1.0.14.2.20050222185559.02defe60@127.0.0.1> Message-ID: <20050223151334.45994.qmail@web30501.mail.mud.yahoo.com> That returns 'There are 0 forms' --- Bret Pettichord wrote: > try ie.frame('MainBody').show_forms > > At 04:54 PM 2/22/2005, Richard Allen wrote: > >We load forms into frames .. we mave a "MainBody" > >frame and we load EditTimeCardF into it. If I view > src > >I see EditTimeCardF at the very top in what I would > >call a Title. > > > >If I view all objects I see: > > > >src=forms/EditTimeCardF.asp > > > > > >I want to verify that the title of the from loaded > is > >EditTimeCardF. If I try to ShowForms, 0 are found. > >Titles doesn't seem to found either. > > > >Any thought? > > > >__________________________________________________ > >Do You Yahoo!? > >Tired of spam? Yahoo! Mail has the best spam > protection around > >http://mail.yahoo.com > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From dallenusa at yahoo.com Wed Feb 23 11:34:29 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Wed, 23 Feb 2005 08:34:29 -0800 (PST) Subject: [Wtr-general] Active reports In-Reply-To: <001801c51958$7639e7d0$6400a8c0@NewDell> Message-ID: <20050223163429.85028.qmail@web30506.mail.mud.yahoo.com> I may be out of luck with this. Active Reports loads a viewer in the frame which then displays their proprietary .rdf file, similar to a pdf file, so no HTML is generated. --- Paul Rogers wrote: > I looked at the web site for this. I don't have the > ability to run > asp.net so I cant try the downloads. Can you post > some html of what a > report looks like? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf > Of Richard Allen > Sent: 22 February 2005 10:38 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Active reports > > > We use active reports in our app. I'm not sure what > methods, if any, I might try to verify the report > displayed by grbbing a title. > > Thanks > > > > __________________________________ > Do you Yahoo!? > Take Yahoo! Mail with you! Get it on your mobile > phone. > http://mobile.yahoo.com/maildemo > _______________________________________________ > 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 paul.rogers at shaw.ca Wed Feb 23 11:42:18 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 23 Feb 2005 09:42:18 -0700 Subject: [Wtr-general] Form Titles In-Reply-To: <20050223151334.45994.qmail@web30501.mail.mud.yahoo.com> Message-ID: <000f01c519c6$a3a70c20$6400a8c0@NewDell> Do you have a nested frame? From an earlier post, you have "..If I view all objects I see: src=forms/EditTimeCardF.asp" Which looks like a frame, so maybe try this: ie.frame('MainBody').show_frames And then use ie.frame('MainBody').frame('xxx').showAllObjects Where xxx is the name that you get from show_frames above My earlier post of $ie.frame("MainBody").ie.document.title gives a nil for document, which I think means a frameset. Or can you post some html? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Richard Allen Sent: 23 February 2005 08:14 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Form Titles That returns 'There are 0 forms' --- Bret Pettichord wrote: > try ie.frame('MainBody').show_forms > > At 04:54 PM 2/22/2005, Richard Allen wrote: > >We load forms into frames .. we mave a "MainBody" > >frame and we load EditTimeCardF into it. If I view > src > >I see EditTimeCardF at the very top in what I would > >call a Title. > > > >If I view all objects I see: > > > >src=forms/EditTimeCardF.asp > > > > > >I want to verify that the title of the from loaded > is > >EditTimeCardF. If I try to ShowForms, 0 are found. > >Titles doesn't seem to found either. > > > >Any thought? > > > >__________________________________________________ > >Do You Yahoo!? > >Tired of spam? Yahoo! Mail has the best spam > protection around > >http://mail.yahoo.com _______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Wed Feb 23 12:46:41 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 23 Feb 2005 11:46:41 -0600 Subject: [Wtr-general] Form Titles In-Reply-To: <20050223151334.45994.qmail@web30501.mail.mud.yahoo.com> References: <5.1.0.14.2.20050222185559.02defe60@127.0.0.1> Message-ID: <5.1.0.14.2.20050223114611.02e72050@127.0.0.1> Can you show us the source for the page? At 09:13 AM 2/23/2005, Richard Allen wrote: >That returns 'There are 0 forms' > >--- Bret Pettichord wrote: > > > try ie.frame('MainBody').show_forms > > > > At 04:54 PM 2/22/2005, Richard Allen wrote: > > >We load forms into frames .. we mave a "MainBody" > > >frame and we load EditTimeCardF into it. If I view > > src > > >I see EditTimeCardF at the very top in what I would > > >call a Title. > > > > > >If I view all objects I see: > > > > > >src=forms/EditTimeCardF.asp > > > > > > > > >I want to verify that the title of the from loaded > > is > > >EditTimeCardF. If I try to ShowForms, 0 are found. > > >Titles doesn't seem to found either. > > > > > >Any thought? > > > > > >__________________________________________________ > > >Do You Yahoo!? > > >Tired of spam? Yahoo! Mail has the best spam > > protection around > > >http://mail.yahoo.com > > >_______________________________________________ > > >Wtr-general mailing list > > >Wtr-general at rubyforge.org > > >http://rubyforge.org/mailman/listinfo/wtr-general > > > > _____________________ > > Bret Pettichord > > www.pettichord.com > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > >__________________________________________________ >Do You Yahoo!? >Tired of spam? Yahoo! Mail has the best spam protection around >http://mail.yahoo.com >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From dallenusa at yahoo.com Wed Feb 23 14:36:17 2005 From: dallenusa at yahoo.com (Richard Allen) Date: Wed, 23 Feb 2005 11:36:17 -0800 (PST) Subject: [Wtr-general] Form Titles In-Reply-To: <5.1.0.14.2.20050223114611.02e72050@127.0.0.1> Message-ID: <20050223193618.29740.qmail@web30508.mail.mud.yahoo.com> It looks like I grabbed to much source before and the e-mail was rejected. Here is a smaller section. This is the source generated from the EditTimeCardF.asp. This is loaded into the MainBody frame.