From mike at swieton.net Thu Nov 4 12:00:27 2004 From: mike at swieton.net (Mike Swieton) Date: Thu, 4 Nov 2004 12:00:27 -0500 Subject: [Wtr-general] Extending watir Message-ID: <20041104170027.GA1791@swieton.net> Hey, Over here at Atomic we've been starting to make use of watir to test our web applications. We've started to write some extensions, because watir doesn't quite do everything we need. We were wondering if other people are working on similar things, and how should we coordinate with them? We would, of course, be happy to donate any of the code we've written. -- Mike Swieton Atomic Object, LLC From chrismo at clabs.org Thu Nov 4 12:19:56 2004 From: chrismo at clabs.org (Chris Morris) Date: Thu, 04 Nov 2004 11:19:56 -0600 Subject: [Wtr-general] Extending watir In-Reply-To: <20041104170027.GA1791@swieton.net> References: <20041104170027.GA1791@swieton.net> Message-ID: <418A64BC.2000507@clabs.org> Mike Swieton wrote: >Over here at Atomic we've been starting to make use of watir to test our web >applications. We've started to write some extensions, because watir doesn't >quite do everything we need. > >We were wondering if other people are working on similar things, and how >should we coordinate with them? We would, of course, be happy to donate any of >the code we've written. > > One approach is to make sure you structure your additions in separate files rather than modifying the watir files themselves. If it's setup this way (which you may be already doing), then it's easy for your contributions to be sent to the group (possibly on this mail list), and then a committer can add your files to a \contrib folder in the CVS repository until such time as these additions get merged into the core watir files. This allows the contributions to be accessed by anyone needing them while the core committers have time to review them and merge them in appropriate ways to the base. Or, if the core committers decide the contributions are not central to the watir effort itself, they can remain as extra contributions. Organizing your additions in separate files also can benefit yourself as newer versions of watir are released. Thoughts from the rest of the 'core' wtr gang? -- Chris http://clabs.org From paul.rogers at shaw.ca Thu Nov 4 15:56:15 2004 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 04 Nov 2004 13:56:15 -0700 Subject: [Wtr-general] Extending watir Message-ID: <6c14b46bfd19.6bfd196c14b4@shaw.ca> what things doesnt it do? Up till now, we have been mostly concentrating on getting a workable code base for use at the Starwest confernce in a fwe weeks time. Ive certainly got lots of things I need to add, and I have some requests for others. I have apersonal copy of watir that Ive changed a lot, to make it work correctly with forms. I havent checked it in as I still need to do more testing Paul ----- Original Message ----- From: Mike Swieton Date: Thursday, November 4, 2004 10:00 am Subject: [Wtr-general] Extending watir > Hey, > > Over here at Atomic we've been starting to make use of watir to > test our web > applications. We've started to write some extensions, because > watir doesn't > quite do everything we need. > > We were wondering if other people are working on similar things, > and how > should we coordinate with them? We would, of course, be happy to > donate any of > the code we've written. > > -- > Mike Swieton > Atomic Object, LLC > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From bret at pettichord.com Fri Nov 5 12:40:22 2004 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 05 Nov 2004 11:40:22 -0600 Subject: [Wtr-general] Extending watir In-Reply-To: <6c14b46bfd19.6bfd196c14b4@shaw.ca> Message-ID: <5.1.0.14.2.20041105113941.02b20e68@127.0.0.1> At 02:56 PM 11/4/2004, Paul Rogers wrote: >I have apersonal copy of watir that Ive changed a lot, to make it work >correctly with forms. I havent checked it in as I still need to do more testing I suggest checking it in. Even if the new stuff is buggy, it's pretty unlikely that it broke other stuff (the tests pass, right?) Bret _____________________ Bret Pettichord www.pettichord.com From jbarrett at finaplex.com Fri Nov 5 12:52:40 2004 From: jbarrett at finaplex.com (Jeff Barrett) Date: Fri, 5 Nov 2004 09:52:40 -0800 Subject: [Wtr-general] running all watir tests and closing IE Message-ID: I was playing around a bit with the watir test cases. I wrote my first ruby script in an attempt to run all watir test cases (I was pretty excited): Dir["*_test.rb"].each {|x| require x } The one annying bit was one IE window was opened for each testcase. I had two ideas here. We could use a mixin that has IE variable. Then any testcase that uses the mixin will use the same IE window. This works, I tried it w/ watir. The alternative is opening and closing IE for each test case. This seemed a more attractive option because you start w/ a completely fresh IE instance for each test case -- no chance of state from one test corrupting subsequent tests. I would have tried refactoring all the watir test cases to do this except I don't know how to tell IE to close. Thanks. From chrismo at clabs.org Fri Nov 5 13:18:03 2004 From: chrismo at clabs.org (Chris Morris) Date: Fri, 05 Nov 2004 12:18:03 -0600 Subject: [Wtr-general] running all watir tests and closing IE In-Reply-To: References: Message-ID: <418BC3DB.50504@clabs.org> Jeff Barrett wrote: >I would have tried refactoring all the watir test cases to do this except I don't know how to tell IE to close. > > It's something simple, like ie.close. The cliecontroller sources have this in it. You can browse the CVS for it. (I'm too pressed for time right now to do it myself). -- Chris http://clabs.org From bret at pettichord.com Fri Nov 5 13:40:13 2004 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 05 Nov 2004 12:40:13 -0600 Subject: [Wtr-general] running all watir tests and closing IE In-Reply-To: <418BC3DB.50504@clabs.org> References: Message-ID: <5.1.0.14.2.20041105123922.02a6c6b0@127.0.0.1> I just checked this in. It's now ie.close. At 12:18 PM 11/5/2004, Chris Morris wrote: >Jeff Barrett wrote: > >>I would have tried refactoring all the watir test cases to do this except >>I don't know how to tell IE to close. >> >It's something >simple, like ie.close. The cliecontroller sources have this in it. You can >browse the CVS for it. (I'm too pressed for time right now to do it myself). > >-- >Chris >http://clabs.org > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From jkohl at telusplanet.net Fri Nov 5 13:43:03 2004 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Fri, 5 Nov 2004 10:43:03 -0800 Subject: [Wtr-general] running all watir tests and closing IE In-Reply-To: <418BC3DB.50504@clabs.org> References: <418BC3DB.50504@clabs.org> Message-ID: <1099680183.418bc9b7e82ed@webmail.telus.net> It doesn't look like a method for closing IE has made it into watir yet. In the meantime, add this method to "class IE" in the watir.rb file: def quit () @ie.quit end To call it in your test script: $ie.quit This will close the browser. -Jonathan Quoting Chris Morris : > Jeff Barrett wrote: > > >I would have tried refactoring all the watir test cases to do this except I > don't know how to tell IE to close. > > > > > It's something simple, like ie.close. The cliecontroller sources have > this in it. You can browse the CVS for it. (I'm too pressed for time > right now to do it myself). > > -- > Chris > http://clabs.org > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From jkohl at telusplanet.net Fri Nov 5 13:50:01 2004 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Fri, 5 Nov 2004 10:50:01 -0800 Subject: [Wtr-general] running all watir tests and closing IE In-Reply-To: <1099680183.418bc9b7e82ed@webmail.telus.net> References: <418BC3DB.50504@clabs.org> <1099680183.418bc9b7e82ed@webmail.telus.net> Message-ID: <1099680601.418bcb59c32d8@webmail.telus.net> Bret got it in there while I was writing this email, so disregard my message and get a new watir version. :-) calling "$ie.close" in a script is a bit more intuitive anyway. -Jonathan > It doesn't look like a method for closing IE has made it into watir yet. In > the > meantime, add this method to "class IE" in the watir.rb file: > def quit () > @ie.quit > end > > To call it in your test script: > $ie.quit > > This will close the browser. > > -Jonathan > > Quoting Chris Morris : > > > Jeff Barrett wrote: > > > > >I would have tried refactoring all the watir test cases to do this except > I > > don't know how to tell IE to close. > > > > > > > > It's something simple, like ie.close. The cliecontroller sources have > > this in it. You can browse the CVS for it. (I'm too pressed for time > > right now to do it myself). > > > > -- > > Chris > > http://clabs.org > > > > _______________________________________________ > > 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 Nov 5 13:54:42 2004 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 05 Nov 2004 11:54:42 -0700 Subject: [Wtr-general] running all watir tests and closing IE Message-ID: <7cfb767cbf8d.7cbf8d7cfb76@shaw.ca> I personally dont like closing the browser. If a test fails, whats left in the browser window helps me debug the problem. Looks like Im out voted though :-( ----- Original Message ----- From: jkohl at telusplanet.net Date: Friday, November 5, 2004 11:50 am Subject: Re: [Wtr-general] running all watir tests and closing IE > Bret got it in there while I was writing this email, so disregard > my message and > get a new watir version. :-) > > calling "$ie.close" in a script is a bit more intuitive anyway. > > -Jonathan > > > > It doesn't look like a method for closing IE has made it into > watir yet. In > > the > > meantime, add this method to "class IE" in the watir.rb file: > > def quit () > > @ie.quit > > end > > > > To call it in your test script: > > $ie.quit > > > > This will close the browser. > > > > -Jonathan > > > > Quoting Chris Morris : > > > > > Jeff Barrett wrote: > > > > > > >I would have tried refactoring all the watir test cases to do > this except > > I > > > don't know how to tell IE to close. > > > > > > > > > > > It's something simple, like ie.close. The cliecontroller > sources have > > > this in it. You can browse the CVS for it. (I'm too pressed > for time > > > right now to do it myself). > > > > > > -- > > > Chris > > > http://clabs.org > > > > > > _______________________________________________ > > > 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 Nov 5 13:55:44 2004 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 05 Nov 2004 11:55:44 -0700 Subject: [Wtr-general] running all watir tests and closing IE Message-ID: <7cba7f7ca74a.7ca74a7cba7f@shaw.ca> now that watir is more stable, it might be time to move all the test cases into 1 file so they all run at the same time. ----- Original Message ----- From: Jeff Barrett Date: Friday, November 5, 2004 10:52 am Subject: [Wtr-general] running all watir tests and closing IE > I was playing around a bit with the watir test cases. I wrote my > first ruby script in an attempt to run all watir test cases (I was > pretty excited): > > Dir["*_test.rb"].each {|x| require x } > > The one annying bit was one IE window was opened for each > testcase. I had two ideas here. We could use a mixin that has IE > variable. Then any testcase that uses the mixin will use the same > IE window. This works, I tried it w/ watir. > > The alternative is opening and closing IE for each test case. > This seemed a more attractive option because you start w/ a > completely fresh IE instance for each test case -- no chance of > state from one test corrupting subsequent tests. I would have > tried refactoring all the watir test cases to do this except I > don't know how to tell IE to close. > > Thanks. > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From chrismo at clabs.org Fri Nov 5 13:59:11 2004 From: chrismo at clabs.org (Chris Morris) Date: Fri, 05 Nov 2004 12:59:11 -0600 Subject: [Wtr-general] running all watir tests and closing IE In-Reply-To: <1099680601.418bcb59c32d8@webmail.telus.net> References: <418BC3DB.50504@clabs.org> <1099680183.418bc9b7e82ed@webmail.telus.net> <1099680601.418bcb59c32d8@webmail.telus.net> Message-ID: <418BCD7F.7080709@clabs.org> jkohl at telusplanet.net wrote: >Bret got it in there while I was writing this email, so disregard my message and >get a new watir version. :-) > >calling "$ie.close" in a script is a bit more intuitive anyway. > > Well, if anyone cares, you can alias the close method with a quit method so either will work: ---------------------------------------------------- Module#alias_method alias_method( newID, oldID ) -> mod ------------------------------------------------------------------------ Makes newID a new copy of the method oldID. This can be used to retain access to methods that are overridden. module Mod alias_method :origExit, :exit def exit(code=0) puts "Exiting with code #{code}" origExit(code) end end include Mod exit(99) produces: Exiting with code 99 -- Chris http://clabs.org From jbarrett at finaplex.com Fri Nov 5 14:09:45 2004 From: jbarrett at finaplex.com (Jeff Barrett) Date: Fri, 5 Nov 2004 11:09:45 -0800 Subject: [Wtr-general] running all watir tests and closing IE Message-ID: Hmm. Couldn't the window only close if the test case completes successfully, and remain open otherwise? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Paul Rogers Sent: Friday, November 05, 2004 10:55 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] running all watir tests and closing IE I personally dont like closing the browser. If a test fails, whats left in the browser window helps me debug the problem. Looks like Im out voted though :-( ----- Original Message ----- From: jkohl at telusplanet.net Date: Friday, November 5, 2004 11:50 am Subject: Re: [Wtr-general] running all watir tests and closing IE > Bret got it in there while I was writing this email, so disregard > my message and > get a new watir version. :-) > > calling "$ie.close" in a script is a bit more intuitive anyway. > > -Jonathan > > > > It doesn't look like a method for closing IE has made it into > watir yet. In > > the > > meantime, add this method to "class IE" in the watir.rb file: > > def quit () > > @ie.quit > > end > > > > To call it in your test script: > > $ie.quit > > > > This will close the browser. > > > > -Jonathan > > > > Quoting Chris Morris : > > > > > Jeff Barrett wrote: > > > > > > >I would have tried refactoring all the watir test cases to do > this except > > I > > > don't know how to tell IE to close. > > > > > > > > > > > It's something simple, like ie.close. The cliecontroller > sources have > > > this in it. You can browse the CVS for it. (I'm too pressed > for time > > > right now to do it myself). > > > > > > -- > > > Chris > > > http://clabs.org > > > > > > _______________________________________________ > > > 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 jkohl at telusplanet.net Fri Nov 5 14:09:57 2004 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Fri, 5 Nov 2004 11:09:57 -0800 Subject: [Wtr-general] running all watir tests and closing IE In-Reply-To: <7cfb767cbf8d.7cbf8d7cfb76@shaw.ca> References: <7cfb767cbf8d.7cbf8d7cfb76@shaw.ca> Message-ID: <1099681797.418bd005bf61d@webmail.telus.net> I usually don't either, but sometimes I want to close it. If the tests are small, I can always comment it out to repeat the tests and debug. It's nice to have the option to close it, but you're right, I rarely use it. -Jonathan > I personally dont like closing the browser. If a test fails, whats left in > the browser window helps me debug the problem. > > Looks like Im out voted though :-( > > ----- Original Message ----- > From: jkohl at telusplanet.net > Date: Friday, November 5, 2004 11:50 am > Subject: Re: [Wtr-general] running all watir tests and closing IE > > > Bret got it in there while I was writing this email, so disregard > > my message and > > get a new watir version. :-) > > > > calling "$ie.close" in a script is a bit more intuitive anyway. > > > > -Jonathan > > > > > > > It doesn't look like a method for closing IE has made it into > > watir yet. In > > > the > > > meantime, add this method to "class IE" in the watir.rb file: > > > def quit () > > > @ie.quit > > > end > > > > > > To call it in your test script: > > > $ie.quit > > > > > > This will close the browser. > > > > > > -Jonathan > > > > > > Quoting Chris Morris : > > > > > > > Jeff Barrett wrote: > > > > > > > > >I would have tried refactoring all the watir test cases to do > > this except > > > I > > > > don't know how to tell IE to close. > > > > > > > > > > > > > > It's something simple, like ie.close. The cliecontroller > > sources have > > > > this in it. You can browse the CVS for it. (I'm too pressed > > for time > > > > right now to do it myself). > > > > > > > > -- > > > > Chris > > > > http://clabs.org > > > > > > > > _______________________________________________ > > > > 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 chrismo at clabs.org Fri Nov 5 14:12:58 2004 From: chrismo at clabs.org (Chris Morris) Date: Fri, 05 Nov 2004 13:12:58 -0600 Subject: [Wtr-general] running all watir tests and closing IE In-Reply-To: <7cfb767cbf8d.7cbf8d7cfb76@shaw.ca> References: <7cfb767cbf8d.7cbf8d7cfb76@shaw.ca> Message-ID: <418BD0BA.5080307@clabs.org> Paul Rogers wrote: >I personally dont like closing the browser. If a test fails, whats left in the browser window helps me debug the problem. > >Looks like Im out voted though :-( > > You could build into the script a command-line switch that would leave the browser open. In my experience, once you get a significant amount of automated tests going, the majority of tests will pass, and leaving the browser open by default is much more of a pain than re-running a failing test with a special switch to leave the browser open that time. Probably also might want to work in a switch to show/hide the browser -- tests usually run faster with a hidden browser. cliecontroller code also has a 'demo' mode which manipulates the DOM to highlight the current bit being worked with, with an injected sleep calls so you can follow along with what's happening. -- Chris http://clabs.org From chrismo at clabs.org Fri Nov 5 14:26:41 2004 From: chrismo at clabs.org (Chris Morris) Date: Fri, 05 Nov 2004 13:26:41 -0600 Subject: [Wtr-general] running all watir tests and closing IE In-Reply-To: References: Message-ID: <418BD3F1.4060609@clabs.org> Jeff Barrett wrote: >Hmm. Couldn't the window only close if the test case completes successfully, and remain open otherwise? > > It could. In a typical Test::Unit::TestCase, though, putting one line of code in the teardown method is easier than "begin...rescue ie.close; end" in each test. -- Chris http://clabs.org From chrismo at clabs.org Fri Nov 5 14:39:14 2004 From: chrismo at clabs.org (Chris Morris) Date: Fri, 05 Nov 2004 13:39:14 -0600 Subject: [Wtr-general] running all watir tests and closing IE In-Reply-To: <418BD3F1.4060609@clabs.org> References: <418BD3F1.4060609@clabs.org> Message-ID: <418BD6E2.4040305@clabs.org> Chris Morris wrote: > It could. In a typical Test::Unit::TestCase, though, putting one line > of code in the teardown method is easier than "begin...rescue > ie.close; end" in each test. ... except you wouldn't need the begin/rescue part, d'oh! :-) Should've been begin/ensure anyway, but that would, as the keyword says, ensure it got closed if an assert failed, which was the opposite of what you wanted. -- Chris http://clabs.org From bret at pettichord.com Fri Nov 5 15:07:37 2004 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 05 Nov 2004 14:07:37 -0600 Subject: [Wtr-general] running all watir tests and closing IE In-Reply-To: <418BD0BA.5080307@clabs.org> References: <7cfb767cbf8d.7cbf8d7cfb76@shaw.ca> <7cfb767cbf8d.7cbf8d7cfb76@shaw.ca> Message-ID: <5.1.0.14.2.20041105140448.02b20008@127.0.0.1> At 01:12 PM 11/5/2004, Chris Morris wrote: >You could build into the script a command-line switch that would leave the >browser open. In my experience, once you get a significant amount of >automated tests going, the majority of tests will pass, and leaving the >browser open by default is much more of a pain than re-running a failing >test with a special switch to leave the browser open that time. Probably >also might want to work in a switch to show/hide the browser -- tests >usually run faster with a hidden browser. I want to make sure that we make it easy and convenient to run tests. That means they clean up everything afterwards -- at least when they pass. I'm happy to see the default behavior be that the window remains open when a test fails. That, also, is convenient. >cliecontroller code also has a 'demo' mode which manipulates the DOM to >highlight the current bit being worked with, with an injected sleep calls >so you can follow along with what's happening. We need to move this into WATIR. I was just demoing this to some folks yesterday. It is totally awesome! Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Fri Nov 5 15:20:19 2004 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 05 Nov 2004 14:20:19 -0600 Subject: [Wtr-general] Extending watir In-Reply-To: <20041104170027.GA1791@swieton.net> Message-ID: <5.1.0.14.2.20041105141251.02b95df8@127.0.0.1> I'm glad your interested in helping. I'm also feeding a lot of interest in helping out with my collegues at ThoughtWorks, so we need a good answer for this. I'll be spending most of next week doing a lot of clean up, extension and other work with watir in conjunction with Paul. I'll also be updated scripting101 to use watir. Paul and I will be using this as the basis for the tutorial we're teaching at STAR a week from Monday. Mike, please send us more info about what you are doing, and we'll figure out how to pull things together. Bret At 11:00 AM 11/4/2004, Mike Swieton wrote: >Hey, > >Over here at Atomic we've been starting to make use of watir to test our web >applications. We've started to write some extensions, because watir doesn't >quite do everything we need. > >We were wondering if other people are working on similar things, and how >should we coordinate with them? We would, of course, be happy to donate any of >the code we've written. > >-- >Mike Swieton >Atomic Object, LLC >_______________________________________________ >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 Nov 5 15:32:19 2004 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 05 Nov 2004 14:32:19 -0600 Subject: [Wtr-general] running all watir tests and closing IE In-Reply-To: Message-ID: <5.1.0.14.2.20041105142204.02aea010@127.0.0.1> At 11:52 AM 11/5/2004, Jeff Barrett wrote: >I was playing around a bit with the watir test cases. I wrote my first >ruby script in an attempt to run all watir test cases (I was pretty excited): > >Dir["*_test.rb"].each {|x| require x } > >The one annying bit was one IE window was opened for each testcase. I had >two ideas here. We could use a mixin that has IE variable. Then any >testcase that uses the mixin will use the same IE window. This works, I >tried it w/ watir. > >The alternative is opening and closing IE for each test case. This seemed >a more attractive option because you start w/ a completely fresh IE >instance for each test case -- no chance of state from one test corrupting >subsequent tests. I would have tried refactoring all the watir test cases >to do this except I don't know how to tell IE to close. Well, now you have IE.close Please go ahead with your suggestion. _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Tue Nov 9 01:16:40 2004 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 08 Nov 2004 23:16:40 -0700 Subject: [Wtr-general] images In-Reply-To: <5.1.0.14.2.20041105142204.02aea010@127.0.0.1> Message-ID: <001201c4c623$ae57ef50$6400a8c0@NewDell> Ive added some code to work with images. Bret pointed out there are some faliing unit tests for textfield - I think they are test failures rather than problems with watir - I'll fix soon enough Paul From jbarrett at finaplex.com Tue Nov 9 05:07:32 2004 From: jbarrett at finaplex.com (Jeff Barrett) Date: Tue, 9 Nov 2004 02:07:32 -0800 Subject: [Wtr-general] running all watir tests and closing IE Message-ID: Ok. Don't think you were asking for this much of a suggestion, but here we go. My thoughts on how to refactor existing Watir (Watir or WATIR?) unitests originated from thinking about how users would organize their web application's Watir test cases. The two strike me as quite similar. I was trying to put myself into the position of someone new to Ruby or Watir (not a stretch, my own position). How should someone organize a collection of Watir testcases WRT two contexts -- a developer that's just written some code against some Watir tests and wants to make sure everything passes (think a quick testcase pass) vs. adding these Watir test to the collection of a project's existing continuous integration test suite? We (proponents of Watir) probably want a way to organize testcases that will easily support both contexts. These two contexts strike me as the most common/valuable regardless of testing solution (I realize this is a potential testing philosophy debate on it's own). Being able to close a browser after a test run was my first step in answering this question. On a separate but related note, Watir has a LOT to offer. I think that's why we're excited about it. To go off on a tangent a bit this framework is built on browser driven test cases. We know what that means, but perhaps we should be more obvious to others about it. At the risk of preaching to the choir -- this framework is server agnostic. Your "Watir Test Server" (now I'm dreaming about the future) can be configured to exercise any jdk, app servers, database, operating systems, network configurations, and all you have to do is add a new base server URL. That's really powerful. To make a verbose email more succinct, perhaps at some point we should do two things (don't know what order and not proposing precedence) -- shout a bit more about these great things and make it easy to make Watir a part of any project's "Testing Strategy" (gah, that's an official moniker). After a bite of humble pie (Key Lime, quite tasty) I realize some of this is premature. Probably ground well walked by you gents that conceived of Watir in the first place, not to mention Watir is still a babe in the woods and I may be jumping the gun. Just the same I wanted to test the waters anyway. Wow that's a lot of cliches. Anyway, thanks. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Bret Pettichord Sent: Friday, November 05, 2004 12:32 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] running all watir tests and closing IE At 11:52 AM 11/5/2004, Jeff Barrett wrote: >I was playing around a bit with the watir test cases. I wrote my first >ruby script in an attempt to run all watir test cases (I was pretty excited): > >Dir["*_test.rb"].each {|x| require x } > >The one annying bit was one IE window was opened for each testcase. I had >two ideas here. We could use a mixin that has IE variable. Then any >testcase that uses the mixin will use the same IE window. This works, I >tried it w/ watir. > >The alternative is opening and closing IE for each test case. This seemed >a more attractive option because you start w/ a completely fresh IE >instance for each test case -- no chance of state from one test corrupting >subsequent tests. I would have tried refactoring all the watir test cases >to do this except I don't know how to tell IE to close. Well, now you have IE.close Please go ahead with your suggestion. _____________________ 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 Nov 9 09:31:43 2004 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 09 Nov 2004 07:31:43 -0700 Subject: [Wtr-general] running all watir tests and closing IE Message-ID: <12448a122e93.122e9312448a@shaw.ca> Heres my take on unit tests, application tests and other stuff. The watir unit tests are just that. They show us that I didnt break watir when I added some other bit of code. They help me write the real code ( once the api was sort of figured out, all the development has been tdd. well, almost) Right now, as we are still feeling our way, I think its important that the tests are quick, and let me see whats happening. Next week, next month, next year ( thats only slightly more than next month by the way ) I expect all the tests to go into one big test. There is some cool ruby we can do that lets us organize these a bit too. The unit tests have the additional effect of demonstrating how to use watir, in a very simplistic case. For a 'real' application test::unit, when used with something like watir, IMHO, can be difficult to use. The app I work on uses 7 different servers, each running different bits of the app. Deployment takes an hour. I dont want to stop on the first failure. I want to know everything that failed. True, im likely to get false failures, but thats a small price compared to the deployment, bug raising, bug verification time. Test::unit only allows this if I capture lots of exceptions. Test::unit also makes it harder to do -ve tests on the complete system. A second part of the argument, at least from my side, is visibility. As a QA guy, Im sort of expected to show what was tested and when. xUnit provides quick feedback to a developer, but doesnt give me much ability to record all the results to a database, that can then be viewed by other people, such as managers, business analysts etc. What Im hoping to do, is to write a sample web application, have it hosted somewhere, and then write several different styles of tests for it, one of these being test::unit, another being test::system ( that doesnt exist, but maybe it should) This type of discussion has been raised on this list before, and I think a lot of it is personal choice, or that Im making a lot of work by having my own test structure, but given the successes we have had, I dont think thats the case. Paul ----- Original Message ----- From: Jeff Barrett Date: Tuesday, November 9, 2004 3:07 am Subject: RE: [Wtr-general] running all watir tests and closing IE > Ok. Don't think you were asking for this much of a suggestion, > but here we go. > > My thoughts on how to refactor existing Watir (Watir or WATIR?) > unitests originated from thinking about how users would organize > their web application's Watir test cases. The two strike me as > quite similar. > > I was trying to put myself into the position of someone new to > Ruby or Watir (not a stretch, my own position). How should > someone organize a collection of Watir testcases WRT two contexts - > - a developer that's just written some code against some Watir > tests and wants to make sure everything passes (think a quick > testcase pass) vs. adding these Watir test to the collection of a > project's existing continuous integration test suite? We > (proponents of Watir) probably want a way to organize testcases > that will easily support both contexts. These two contexts strike > me as the most common/valuable regardless of testing solution (I > realize this is a potential testing philosophy debate on it's > own). Being able to close a browser after a test run was my first > step in answering this question. > > On a separate but related note, Watir has a LOT to offer. I think > that's why we're excited about it. To go off on a tangent a bit > this framework is built on browser driven test cases. We know > what that means, but perhaps we should be more obvious to others > about it. At the risk of preaching to the choir -- this framework > is server agnostic. Your "Watir Test Server" (now I'm dreaming > about the future) can be configured to exercise any jdk, app > servers, database, operating systems, network configurations, and > all you have to do is add a new base server URL. That's really > powerful. > To make a verbose email more succinct, perhaps at some point we > should do two things (don't know what order and not proposing > precedence) -- shout a bit more about these great things and make > it easy to make Watir a part of any project's "Testing Strategy" > (gah, that's an official moniker). > > After a bite of humble pie (Key Lime, quite tasty) I realize some > of this is premature. Probably ground well walked by you gents > that conceived of Watir in the first place, not to mention Watir > is still a babe in the woods and I may be jumping the gun. Just > the same I wanted to test the waters anyway. Wow that's a lot of > cliches. > Anyway, thanks. > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [wtr-general-bounces at rubyforge.org]On Behalf Of Bret Pettichord > Sent: Friday, November 05, 2004 12:32 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] running all watir tests and closing IE > > > At 11:52 AM 11/5/2004, Jeff Barrett wrote: > >I was playing around a bit with the watir test cases. I wrote my > first > >ruby script in an attempt to run all watir test cases (I was > pretty excited): > > > >Dir["*_test.rb"].each {|x| require x } > > > >The one annying bit was one IE window was opened for each > testcase. I had > >two ideas here. We could use a mixin that has IE variable. Then > any > >testcase that uses the mixin will use the same IE window. This > works, I > >tried it w/ watir. > > > >The alternative is opening and closing IE for each test case. > This seemed > >a more attractive option because you start w/ a completely fresh > IE > >instance for each test case -- no chance of state from one test > corrupting > >subsequent tests. I would have tried refactoring all the watir > test cases > >to do this except I don't know how to tell IE to close. > > Well, now you have IE.close > > Please go ahead with your suggestion. > > > > _____________________ > 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 Tue Nov 9 09:55:41 2004 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 09 Nov 2004 07:55:41 -0700 Subject: [Wtr-general] Watir direction and todo list Message-ID: <124236124d1f.124d1f124236@shaw.ca> I think watir is almost ready for its first release. There are lots of things still to do. Heres a list, can people tell me what they want first ( and why - se we have a better understanding of what you want, why , and how you are using watir). * Form methods, submit, exists etc. Also a refactoring of forms is needed. * Javascript handling - clicking pop ups, scraping messages * DIV , P and SPAN tag handling - ideally replace the code in css-test with something in watir * table methods, tableToArray, click, exists etc * Pluggable Error Checker added ( this is code I have, just needs moving in) * Logging * Page download timing * Multi threaded - to run several tests at once * Better handling of javascript on buttonclicks etc Code level things to do: * consider move to event driven page download complete * refactor forms * split into several files, modules... * add method_missing code to get properties of objects easier - Chris already has most of this in IEC * refactor properties of objects Manual, user guide * write one Demo, samples etc * create a new cvs dir for samples * create a demo site and have tests for it using watir * scripting101 materials moved to watir ( Bret is working on this now) * a wrapper around the watir methods to make it look like jWebUnit, as suggested by Brian Marick Time frame: Im not going to be able to do much of this until mid-Decemeber. If there is something you would like to work on please let the list know and we'll get you involved. Thanks Paul From jkohl at telusplanet.net Tue Nov 9 10:39:55 2004 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Tue, 9 Nov 2004 07:39:55 -0800 Subject: [Wtr-general] Watir direction and todo list In-Reply-To: <124236124d1f.124d1f124236@shaw.ca> References: <124236124d1f.124d1f124236@shaw.ca> Message-ID: <1100014795.4190e4cb13898@webmail.telus.net> I'm starting a User Guide this week. -Jonathan > I think watir is almost ready for its first release. > > There are lots of things still to do. Heres a list, can people tell me what > they want first ( and why - se we have a better understanding of what you > want, why , and how you are using watir). > > * Form methods, submit, exists etc. Also a refactoring of forms is needed. > * Javascript handling - clicking pop ups, scraping messages > * DIV , P and SPAN tag handling - ideally replace the code in css-test with > something in watir > * table methods, tableToArray, click, exists etc > * Pluggable Error Checker added ( this is code I have, just needs moving in) > * Logging > * Page download timing > * Multi threaded - to run several tests at once > * Better handling of javascript on buttonclicks etc > > Code level things to do: > * consider move to event driven page download complete > * refactor forms > * split into several files, modules... > * add method_missing code to get properties of objects easier - Chris already > has most of this in IEC > * refactor properties of objects > > Manual, user guide > * write one > > Demo, samples etc > * create a new cvs dir for samples > * create a demo site and have tests for it using watir > * scripting101 materials moved to watir ( Bret is working on this now) > * a wrapper around the watir methods to make it look like jWebUnit, as > suggested by Brian Marick > > > Time frame: Im not going to be able to do much of this until mid-Decemeber. > If there is something you would like to work on please let the list know and > we'll get you involved. > > > Thanks > > Paul > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From chris.mcmahon at verint.com Thu Nov 11 13:45:04 2004 From: chris.mcmahon at verint.com (McMahon, Chris) Date: Thu, 11 Nov 2004 11:45:04 -0700 Subject: [Wtr-general] Heard of "Rainbow Portal"? Message-ID: http://rainbowportal.net It seems to be based on a MS app called "IBuySpy Portal Solution Kit". This looks like it might be a big part of my life in the near future. If anyone on the list has ever used it (or tried using WATIR against it!), I'd appreciate any information you have. I'm kind of a MS newbie, so be gentle... -Chris From jkohl at telusplanet.net Thu Nov 11 14:10:42 2004 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Thu, 11 Nov 2004 11:10:42 -0800 Subject: [Wtr-general] Heard of "Rainbow Portal"? In-Reply-To: References: Message-ID: <1100200242.4193b932b9e9b@webmail.telus.net> Is there a working demo online? -Jonathan > http://rainbowportal.net > It seems to be based on a MS app called "IBuySpy Portal Solution Kit". > This looks like it might be a big part of my life in the near future. > If anyone on the list has ever used it (or tried using WATIR against > it!), I'd appreciate any information you have. I'm kind of a MS newbie, > so be gentle... > -Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Thu Nov 11 15:04:08 2004 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 11 Nov 2004 13:04:08 -0700 Subject: [Wtr-general] Heard of "Rainbow Portal"? Message-ID: <408f094083c3.4083c3408f09@shaw.ca> I took a look at some of the testimonial sites. As far as I can see there is going to be nothing stopping you fro musing watir. You may find the current one in cvs is all you need. Let us know how you get on with it Paul ----- Original Message ----- From: "McMahon, Chris" Date: Thursday, November 11, 2004 11:45 am Subject: [Wtr-general] Heard of "Rainbow Portal"? > > http://rainbowportal.net > It seems to be based on a MS app called "IBuySpy Portal Solution > Kit". > This looks like it might be a big part of my life in the near future. > If anyone on the list has ever used it (or tried using WATIR against > it!), I'd appreciate any information you have. I'm kind of a MS > newbie,so be gentle... > -Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From chris.mcmahon at verint.com Fri Nov 12 10:32:29 2004 From: chris.mcmahon at verint.com (McMahon, Chris) Date: Fri, 12 Nov 2004 08:32:29 -0700 Subject: [Wtr-general] segfaults in tests and in examples from tarball Message-ID: With Ruby 1.8.1, on WinXPPro. Best example is probably buttons_test.rb. I get some processing, then ********************************************************** ------- PASS --------- pageContainsText: Looking for: PASS (string) - found it ok ../../watir.rb:33: [BUG] Segmentation fault ruby 1.8.1 (2003-12-25) [i386-mswin32] This application has requested the Runtime to terminate it in an unusual way... ************************************************************************ ***** I'm a pure newbie, any pointers to making the unittests and examples run better would be helpful... -Chris From chrismo at clabs.org Fri Nov 12 11:06:11 2004 From: chrismo at clabs.org (Chris Morris) Date: Fri, 12 Nov 2004 10:06:11 -0600 Subject: [Wtr-general] segfaults in tests and in examples from tarball In-Reply-To: References: Message-ID: <4194DF73.1050609@clabs.org> McMahon, Chris wrote: > >With Ruby 1.8.1, on WinXPPro. Best example is probably buttons_test.rb. > > I'm mostly certain this is a problem with win32ole in that rev of Ruby. Probably should try the latest 1.8.2 installer from rubyforge.org. -- Chris http://clabs.org From jkohl at telusplanet.net Fri Nov 12 11:16:55 2004 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Fri, 12 Nov 2004 08:16:55 -0800 Subject: [Wtr-general] segfaults in tests and in examples from tarball In-Reply-To: References: Message-ID: <1100276215.4194e1f7c9f50@webmail.telus.net> > I'm a pure newbie, any pointers to making the unittests and > examples run better would be helpful... I've started a User Guide for Watir and I should have a first draft ready on Saturday. If you don't mind taking a look at that when it's done and providing some feedback on what you struggled with, that would help a lot. It's always good to have pure newbies around to let the list know what they struggle with so we can improve. Thanks; -Jonathan From chris.mcmahon at verint.com Mon Nov 15 14:21:29 2004 From: chris.mcmahon at verint.com (McMahon, Chris) Date: Mon, 15 Nov 2004 12:21:29 -0700 Subject: [Wtr-general] segfault example Message-ID: Hello... I attempted to use the "googleSearch.rb" script against a different site. Again, XPPro, Ruby 1.81. I get a segfault trying to click "Search" in Step 3 of the following script. Any help on what I'm doing wrong would be appreciated: #includes require '../watir.rb' # the controller #test::unit includes require 'test/unit' require 'test/unit/ui/console/testrunner' require '../unittests/testUnitAddons' #code to set your current path in Windows $myDir = File.dirname(__FILE__) $LOAD_PATH << $myDir class TC_google < Test::Unit::TestCase def test_google #variables testSite = 'http://web.iihl.org/Default.aspx?lang=en' #open the IE browser $ie = IE.new puts '## Beginning of test: firstRainbow' puts ' ' puts 'Step 1: go to the site:' $ie.goto(testSite) puts ' Action: entered ' + testSite + 'in the address bar.' puts 'Step 2: enter "testing": in the search text field' #$ie.textField(:name, "_ctl1:DesktopThreePanes1:ThreePanes:_ctl13:btnSearch").set("testing") # q is the name of the search field $ie.textField(:name, "_ctl1:DesktopThreePanes1:ThreePanes:_ctl13:txtSearchString").set("testi ng") puts ' Action: entered testing in the search field' puts 'Step 3: click the "Search" button' $ie.button(:caption, "Search").click puts ' Action: clicked the Search button.' puts 'Expected Result: ' puts ' - a page with results should be shown. ' > -----Original Message----- > From: McMahon, Chris > Sent: Friday, November 12, 2004 8:32 AM > To: 'wtr-general at rubyforge.org' > Subject: segfaults in tests and in examples from tarball > > > With Ruby 1.8.1, on WinXPPro. Best example is probably > buttons_test.rb. I get some processing, then > ********************************************************** > ------- > PASS > --------- > pageContainsText: Looking for: PASS (string) - found it ok > ../../watir.rb:33: [BUG] Segmentation fault ruby 1.8.1 > (2003-12-25) [i386-mswin32] > > This application has requested the Runtime to terminate it in > an unusual way... > ************************************************************** > *************** > > I'm a pure newbie, any pointers to making the unittests > and examples run better would be helpful... > -Chris > > > From chris.mcmahon at verint.com Mon Nov 15 14:27:13 2004 From: chris.mcmahon at verint.com (McMahon, Chris) Date: Mon, 15 Nov 2004 12:27:13 -0700 Subject: [Wtr-general] RE: Wtr-general Digest, Vol 12, Issue 3 Message-ID: > -----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: Monday, November 15, 2004 12:22 PM > To: wtr-general at rubyforge.org > Subject: Wtr-general Digest, Vol 12, Issue 3 > > 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: RE: [Wtr-general] running all watir tests and closing IE > (Paul Rogers) > 2. Watir direction and todo list (Paul Rogers) > 3. Re: Watir direction and todo list (jkohl at telusplanet.net) > 4. Heard of "Rainbow Portal"? (McMahon, Chris) > 5. Re: Heard of "Rainbow Portal"? (jkohl at telusplanet.net) > 6. Re: Heard of "Rainbow Portal"? (Paul Rogers) > 7. segfaults in tests and in examples from tarball (McMahon, Chris) > 8. Re: segfaults in tests and in examples from tarball > (Chris Morris) > 9. Re: segfaults in tests and in examples from tarball > (jkohl at telusplanet.net) > 10. segfault example (McMahon, Chris) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 09 Nov 2004 07:31:43 -0700 > From: Paul Rogers > Subject: Re: RE: [Wtr-general] running all watir tests and closing IE > To: wtr-general at rubyforge.org > Message-ID: <12448a122e93.122e9312448a at shaw.ca> > Content-Type: text/plain; charset=us-ascii > > > > Heres my take on unit tests, application tests and other stuff. > > The watir unit tests are just that. They show us that I didnt > break watir when I added some other bit of code. They help me > write the real code ( once the api was sort of figured out, > all the development has been tdd. well, almost) Right now, as > we are still feeling our way, I think its important that the > tests are quick, and let me see whats happening. Next week, > next month, next year ( thats only slightly more than next > month by the way ) I expect all the tests to go into one big > test. There is some cool ruby we can do that lets us organize > these a bit too. > > The unit tests have the additional effect of demonstrating > how to use watir, in a very simplistic case. > > For a 'real' application test::unit, when used with something > like watir, IMHO, can be difficult to use. The app I work on > uses 7 different servers, each running different bits of the > app. Deployment takes an hour. I dont want to stop on the > first failure. I want to know everything that failed. True, > im likely to get false failures, but thats a small price > compared to the deployment, bug raising, bug verification > time. Test::unit only allows this if I capture lots of > exceptions. Test::unit also makes it harder to do -ve tests > on the complete system. > > A second part of the argument, at least from my side, is > visibility. As a QA guy, Im sort of expected to show what was > tested and when. xUnit provides quick feedback to a > developer, but doesnt give me much ability to record all the > results to a database, that can then be viewed by other > people, such as managers, business analysts etc. > > What Im hoping to do, is to write a sample web application, > have it hosted somewhere, and then write several different > styles of tests for it, one of these being test::unit, > another being test::system ( that doesnt exist, but maybe it should) > > This type of discussion has been raised on this list before, > and I think a lot of it is personal choice, or that Im making > a lot of work by having my own test structure, but given the > successes we have had, I dont think thats the case. > > > > Paul > > > > > > ----- Original Message ----- > From: Jeff Barrett > Date: Tuesday, November 9, 2004 3:07 am > Subject: RE: [Wtr-general] running all watir tests and closing IE > > > Ok. Don't think you were asking for this much of a suggestion, but > > here we go. > > > > My thoughts on how to refactor existing Watir (Watir or WATIR?) > > unitests originated from thinking about how users would > organize their > > web application's Watir test cases. The two strike me as quite > > similar. > > > > I was trying to put myself into the position of someone new > to Ruby or > > Watir (not a stretch, my own position). How should someone > organize a > > collection of Watir testcases WRT two contexts - > > - a developer that's just written some code against some > Watir tests > > and wants to make sure everything passes (think a quick > testcase pass) > > vs. adding these Watir test to the collection of a > project's existing > > continuous integration test suite? We (proponents of > Watir) probably > > want a way to organize testcases that will easily support both > > contexts. These two contexts strike me as the most common/valuable > > regardless of testing solution (I realize this is a > potential testing > > philosophy debate on it's own). Being able to close a > browser after a > > test run was my first step in answering this question. > > > > On a separate but related note, Watir has a LOT to offer. I think > > that's why we're excited about it. To go off on a tangent > a bit this > > framework is built on browser driven test cases. We know what that > > means, but perhaps we should be more obvious to others > about it. At > > the risk of preaching to the choir -- this framework is server > > agnostic. Your "Watir Test Server" (now I'm dreaming about the > > future) can be configured to exercise any jdk, app servers, > database, > > operating systems, network configurations, and all you have > to do is > > add a new base server URL. That's really powerful. > > To make a verbose email more succinct, perhaps at some > point we should > > do two things (don't know what order and not proposing > > precedence) -- shout a bit more about these great things > and make it > > easy to make Watir a part of any project's "Testing Strategy" > > (gah, that's an official moniker). > > > > After a bite of humble pie (Key Lime, quite tasty) I > realize some of > > this is premature. Probably ground well walked by you gents that > > conceived of Watir in the first place, not to mention Watir > is still a > > babe in the woods and I may be jumping the gun. Just the same I > > wanted to test the waters anyway. Wow that's a lot of cliches. > > Anyway, thanks. > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [wtr-general-bounces at rubyforge.org]On Behalf Of Bret Pettichord > > Sent: Friday, November 05, 2004 12:32 PM > > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] running all watir tests and closing IE > > > > > > At 11:52 AM 11/5/2004, Jeff Barrett wrote: > > >I was playing around a bit with the watir test cases. I wrote my > > first > > >ruby script in an attempt to run all watir test cases (I was > > pretty excited): > > > > > >Dir["*_test.rb"].each {|x| require x } > > > > > >The one annying bit was one IE window was opened for each > > testcase. I had > > >two ideas here. We could use a mixin that has IE variable. Then > > any > > >testcase that uses the mixin will use the same IE window. This > > works, I > > >tried it w/ watir. > > > > > >The alternative is opening and closing IE for each test case. > > This seemed > > >a more attractive option because you start w/ a completely fresh > > IE > > >instance for each test case -- no chance of state from one test > > corrupting > > >subsequent tests. I would have tried refactoring all the watir > > test cases > > >to do this except I don't know how to tell IE to close. > > > > Well, now you have IE.close > > > > Please go ahead with your suggestion. > > > > > > > > _____________________ > > 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 > > > > > > ------------------------------ > > Message: 2 > Date: Tue, 09 Nov 2004 07:55:41 -0700 > From: Paul Rogers > Subject: [Wtr-general] Watir direction and todo list > To: wtr-general at rubyforge.org > Message-ID: <124236124d1f.124d1f124236 at shaw.ca> > Content-Type: text/plain; charset=us-ascii > > I think watir is almost ready for its first release. > > There are lots of things still to do. Heres a list, can > people tell me what they want first ( and why - se we have a > better understanding of what you want, why , and how you are > using watir). > > * Form methods, submit, exists etc. Also a refactoring of > forms is needed. > * Javascript handling - clicking pop ups, scraping messages > * DIV , P and SPAN tag handling - ideally replace the code in > css-test with something in watir > * table methods, tableToArray, click, exists etc > * Pluggable Error Checker added ( this is code I have, just > needs moving in) > * Logging > * Page download timing > * Multi threaded - to run several tests at once > * Better handling of javascript on buttonclicks etc > > Code level things to do: > * consider move to event driven page download complete > * refactor forms > * split into several files, modules... > * add method_missing code to get properties of objects easier > - Chris already has most of this in IEC > * refactor properties of objects > > Manual, user guide > * write one > > Demo, samples etc > * create a new cvs dir for samples > * create a demo site and have tests for it using watir > * scripting101 materials moved to watir ( Bret is working on this now) > * a wrapper around the watir methods to make it look like > jWebUnit, as suggested by Brian Marick > > > Time frame: Im not going to be able to do much of this until > mid-Decemeber. If there is something you would like to work > on please let the list know and we'll get you involved. > > > Thanks > > Paul > > > > > ------------------------------ > > Message: 3 > Date: Tue, 9 Nov 2004 07:39:55 -0800 > From: jkohl at telusplanet.net > Subject: Re: [Wtr-general] Watir direction and todo list > To: wtr-general at rubyforge.org > Message-ID: <1100014795.4190e4cb13898 at webmail.telus.net> > Content-Type: text/plain; charset=ISO-8859-1 > > I'm starting a User Guide this week. > > -Jonathan > > > I think watir is almost ready for its first release. > > > > There are lots of things still to do. Heres a list, can > people tell me > > what they want first ( and why - se we have a better > understanding of > > what you want, why , and how you are using watir). > > > > * Form methods, submit, exists etc. Also a refactoring of > forms is needed. > > * Javascript handling - clicking pop ups, scraping messages > > * DIV , P and SPAN tag handling - ideally replace the code > in css-test > > with something in watir > > * table methods, tableToArray, click, exists etc > > * Pluggable Error Checker added ( this is code I have, just needs > > moving in) > > * Logging > > * Page download timing > > * Multi threaded - to run several tests at once > > * Better handling of javascript on buttonclicks etc > > > > Code level things to do: > > * consider move to event driven page download complete > > * refactor forms > > * split into several files, modules... > > * add method_missing code to get properties of objects > easier - Chris > > already has most of this in IEC > > * refactor properties of objects > > > > Manual, user guide > > * write one > > > > Demo, samples etc > > * create a new cvs dir for samples > > * create a demo site and have tests for it using watir > > * scripting101 materials moved to watir ( Bret is working > on this now) > > * a wrapper around the watir methods to make it look like > jWebUnit, as > > suggested by Brian Marick > > > > > > Time frame: Im not going to be able to do much of this > until mid-Decemeber. > > If there is something you would like to work on please let the list > > know and we'll get you involved. > > > > > > Thanks > > > > Paul > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > ------------------------------ > > Message: 4 > Date: Thu, 11 Nov 2004 11:45:04 -0700 > From: "McMahon, Chris" > Subject: [Wtr-general] Heard of "Rainbow Portal"? > To: > Message-ID: > ystems.com> > Content-Type: text/plain; charset=us-ascii > > > http://rainbowportal.net > It seems to be based on a MS app called "IBuySpy Portal > Solution Kit". > This looks like it might be a big part of my life in the near future. > If anyone on the list has ever used it (or tried using WATIR > against it!), I'd appreciate any information you have. I'm > kind of a MS newbie, so be gentle... > -Chris > > > > ------------------------------ > > Message: 5 > Date: Thu, 11 Nov 2004 11:10:42 -0800 > From: jkohl at telusplanet.net > Subject: Re: [Wtr-general] Heard of "Rainbow Portal"? > To: wtr-general at rubyforge.org > Message-ID: <1100200242.4193b932b9e9b at webmail.telus.net> > Content-Type: text/plain; charset=ISO-8859-1 > > Is there a working demo online? > > -Jonathan > > > http://rainbowportal.net > > It seems to be based on a MS app called "IBuySpy Portal > Solution Kit". > > This looks like it might be a big part of my life in the > near future. > > If anyone on the list has ever used it (or tried using WATIR against > > it!), I'd appreciate any information you have. I'm kind of > a MS newbie, > > so be gentle... > > -Chris > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > ------------------------------ > > Message: 6 > Date: Thu, 11 Nov 2004 13:04:08 -0700 > From: Paul Rogers > Subject: Re: [Wtr-general] Heard of "Rainbow Portal"? > To: wtr-general at rubyforge.org > Message-ID: <408f094083c3.4083c3408f09 at shaw.ca> > Content-Type: text/plain; charset=us-ascii > > I took a look at some of the testimonial sites. > > As far as I can see there is going to be nothing stopping you > fro musing watir. > > You may find the current one in cvs is all you need. > > Let us know how you get on with it > > Paul > > ----- Original Message ----- > From: "McMahon, Chris" > Date: Thursday, November 11, 2004 11:45 am > Subject: [Wtr-general] Heard of "Rainbow Portal"? > > > > > http://rainbowportal.net > > It seems to be based on a MS app called "IBuySpy Portal Solution > > Kit". > > This looks like it might be a big part of my life in the > near future. > > If anyone on the list has ever used it (or tried using WATIR against > > it!), I'd appreciate any information you have. I'm kind of a MS > > newbie,so be gentle... > > -Chris > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > ------------------------------ > > Message: 7 > Date: Fri, 12 Nov 2004 08:32:29 -0700 > From: "McMahon, Chris" > Subject: [Wtr-general] segfaults in tests and in examples from tarball > To: > Message-ID: > ystems.com> > Content-Type: text/plain; charset=us-ascii > > > With Ruby 1.8.1, on WinXPPro. Best example is probably > buttons_test.rb. > I get some processing, then > ********************************************************** > ------- > PASS > --------- > pageContainsText: Looking for: PASS (string) - found it ok > ../../watir.rb:33: [BUG] Segmentation fault > ruby 1.8.1 (2003-12-25) [i386-mswin32] > > This application has requested the Runtime to terminate it in > an unusual > way... > ************************************************************** > ********** > ***** > > I'm a pure newbie, any pointers to making the unittests and > examples run better would be helpful... > -Chris > > > > > > > ------------------------------ > > Message: 8 > Date: Fri, 12 Nov 2004 10:06:11 -0600 > From: Chris Morris > Subject: Re: [Wtr-general] segfaults in tests and in examples from > tarball > To: wtr-general at rubyforge.org > Message-ID: <4194DF73.1050609 at clabs.org> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > McMahon, Chris wrote: > > > > >With Ruby 1.8.1, on WinXPPro. Best example is probably > buttons_test.rb. > > > > > I'm mostly certain this is a problem with win32ole in that > rev of Ruby. > Probably should try the latest 1.8.2 installer from rubyforge.org. > > -- > Chris > http://clabs.org > > > > ------------------------------ > > Message: 9 > Date: Fri, 12 Nov 2004 08:16:55 -0800 > From: jkohl at telusplanet.net > Subject: Re: [Wtr-general] segfaults in tests and in examples from > tarball > To: wtr-general at rubyforge.org > Message-ID: <1100276215.4194e1f7c9f50 at webmail.telus.net> > Content-Type: text/plain; charset=ISO-8859-1 > > > I'm a pure newbie, any pointers to making the unittests and > > examples run better would be helpful... > I've started a User Guide for Watir and I should have a first > draft ready on > Saturday. If you don't mind taking a look at that when it's > done and providing > some feedback on what you struggled with, that would help a > lot. It's always > good to have pure newbies around to let the list know what > they struggle with so > we can improve. > > Thanks; > > -Jonathan > > > > > > ------------------------------ > > Message: 10 > Date: Mon, 15 Nov 2004 12:21:29 -0700 > From: "McMahon, Chris" > Subject: [Wtr-general] segfault example > To: "McMahon, Chris" , > > Message-ID: > ystems.com> > Content-Type: text/plain; charset=us-ascii > > > Hello... > I attempted to use the "googleSearch.rb" script against a > different site. Again, XPPro, Ruby 1.81. I get a segfault trying to > click "Search" in Step 3 of the following script. Any help > on what I'm > doing wrong would be appreciated: > > #includes > require '../watir.rb' # the controller > > #test::unit includes > require 'test/unit' > require 'test/unit/ui/console/testrunner' > require '../unittests/testUnitAddons' > > #code to set your current path in Windows > $myDir = File.dirname(__FILE__) > $LOAD_PATH << $myDir > > class TC_google < Test::Unit::TestCase > > def test_google > #variables > testSite = 'http://web.iihl.org/Default.aspx?lang=en' > > #open the IE browser > $ie = IE.new > > puts '## Beginning of test: firstRainbow' > puts ' ' > > puts 'Step 1: go to the site:' > $ie.goto(testSite) > puts ' Action: entered ' + testSite + 'in the address bar.' > > puts 'Step 2: enter "testing": in the search text field' > #$ie.textField(:name, > "_ctl1:DesktopThreePanes1:ThreePanes:_ctl13:btnSearch").set("testing") > # q is the name of the search field > $ie.textField(:name, > "_ctl1:DesktopThreePanes1:ThreePanes:_ctl13:txtSearchString"). > set("testi > ng") > puts ' Action: entered testing in the search field' > > puts 'Step 3: click the "Search" button' > $ie.button(:caption, "Search").click > puts ' Action: clicked the Search button.' > > puts 'Expected Result: ' > puts ' - a page with results should be shown. ' > > > > > > -----Original Message----- > > From: McMahon, Chris > > Sent: Friday, November 12, 2004 8:32 AM > > To: 'wtr-general at rubyforge.org' > > Subject: segfaults in tests and in examples from tarball > > > > > > With Ruby 1.8.1, on WinXPPro. Best example is probably > > buttons_test.rb. I get some processing, then > > ********************************************************** > > ------- > > PASS > > --------- > > pageContainsText: Looking for: PASS (string) - found it ok > > ../../watir.rb:33: [BUG] Segmentation fault ruby 1.8.1 > > (2003-12-25) [i386-mswin32] > > > > This application has requested the Runtime to terminate it in > > an unusual way... > > ************************************************************** > > *************** > > > > I'm a pure newbie, any pointers to making the unittests > > and examples run better would be helpful... > > -Chris > > > > > > > > > > ------------------------------ > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > End of Wtr-general Digest, Vol 12, Issue 3 > ****************************************** > > From chris.mcmahon at verint.com Mon Nov 15 14:35:18 2004 From: chris.mcmahon at verint.com (McMahon, Chris) Date: Mon, 15 Nov 2004 12:35:18 -0700 Subject: [Wtr-general] User guide Message-ID: Hi Jonathan... > > I'm a pure newbie, any pointers to making the unittests and > > examples run better would be helpful... > I've started a User Guide for Watir and I should have a first > draft ready on > Saturday. If you don't mind taking a look at that when it's > done and providing > some feedback on what you struggled with, that would help a > lot. It's always > good to have pure newbies around to let the list know what > they struggle with so > we can improve. I'd be glad to read/edit/help write a draft User Guide. Let me know where I can get it... -Chris From Mike at MichaelDKelly.com Mon Nov 15 14:38:21 2004 From: Mike at MichaelDKelly.com (Michael Kelly) Date: Mon, 15 Nov 2004 14:38:21 -0500 Subject: [Wtr-general] User guide Message-ID: <200411151938.CRQ75564@ms2.netsolmail.com> I would also be interested in helping read/edit a user guide. Let me know if you need any help. I can approach the material from a beginner's point of view (that's where I'm at). -Mike ---- Original message ---- >Date: Mon, 15 Nov 2004 12:35:18 -0700 >From: "McMahon, Chris" >Subject: [Wtr-general] User guide >To: > > >Hi Jonathan... > >> > I'm a pure newbie, any pointers to making the unittests and >> > examples run better would be helpful... >> I've started a User Guide for Watir and I should have a first >> draft ready on >> Saturday. If you don't mind taking a look at that when it's >> done and providing >> some feedback on what you struggled with, that would help a >> lot. It's always >> good to have pure newbies around to let the list know what >> they struggle with so >> we can improve. > >I'd be glad to read/edit/help write a draft User Guide. Let me know >where I can get it... > -Chris > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Mon Nov 15 15:40:33 2004 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Mon, 15 Nov 2004 12:40:33 -0800 Subject: [Wtr-general] User guide In-Reply-To: References: Message-ID: <1100551233.419914418746a@webmail.telus.net> Hi Chris; > I'd be glad to read/edit/help write a draft User Guide. Let me know > where I can get it... Great! The first draft is available in the docs directory of the latest watir tarball. I want to add an example to it to walk people through an actual test in the next few days. Download the tarball here: http://rubyforge.org/cgi-bin/viewcvs.cgi/watir/?cvsroot=wtr The user guide is: watir_user_guide.html in the doc directory. -Jonathan From jkohl at telusplanet.net Mon Nov 15 15:48:29 2004 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Mon, 15 Nov 2004 12:48:29 -0800 Subject: [Wtr-general] segfault example In-Reply-To: References: Message-ID: <1100551709.4199161d465d3@webmail.telus.net> Chris; I copied the script you enclosed, added an "end" for the method and an "end" for the class at the bottom of it, ran it and had no problems. I think something is up with 1.8.1 as Chris Morris suggested. Have you tried with 1.8.2? (I'm using Win 2k/IE 6) -Jonathan > > Hello... > I attempted to use the "googleSearch.rb" script against a > different site. Again, XPPro, Ruby 1.81. I get a segfault trying to > click "Search" in Step 3 of the following script. Any help on what I'm > doing wrong would be appreciated: > > #includes > require '../watir.rb' # the controller > > #test::unit includes > require 'test/unit' > require 'test/unit/ui/console/testrunner' > require '../unittests/testUnitAddons' > > #code to set your current path in Windows > $myDir = File.dirname(__FILE__) > $LOAD_PATH << $myDir > > class TC_google < Test::Unit::TestCase > > def test_google > #variables > testSite = 'http://web.iihl.org/Default.aspx?lang=en' > > #open the IE browser > $ie = IE.new > > puts '## Beginning of test: firstRainbow' > puts ' ' > > puts 'Step 1: go to the site:' > $ie.goto(testSite) > puts ' Action: entered ' + testSite + 'in the address bar.' > > puts 'Step 2: enter "testing": in the search text field' > #$ie.textField(:name, > "_ctl1:DesktopThreePanes1:ThreePanes:_ctl13:btnSearch").set("testing") > # q is the name of the search field > $ie.textField(:name, > "_ctl1:DesktopThreePanes1:ThreePanes:_ctl13:txtSearchString").set("testi > ng") > puts ' Action: entered testing in the search field' > > puts 'Step 3: click the "Search" button' > $ie.button(:caption, "Search").click > puts ' Action: clicked the Search button.' > > puts 'Expected Result: ' > puts ' - a page with results should be shown. ' > > > > > > -----Original Message----- > > From: McMahon, Chris > > Sent: Friday, November 12, 2004 8:32 AM > > To: 'wtr-general at rubyforge.org' > > Subject: segfaults in tests and in examples from tarball > > > > > > With Ruby 1.8.1, on WinXPPro. Best example is probably > > buttons_test.rb. I get some processing, then > > ********************************************************** > > ------- > > PASS > > --------- > > pageContainsText: Looking for: PASS (string) - found it ok > > ../../watir.rb:33: [BUG] Segmentation fault ruby 1.8.1 > > (2003-12-25) [i386-mswin32] > > > > This application has requested the Runtime to terminate it in > > an unusual way... > > ************************************************************** > > *************** > > > > I'm a pure newbie, any pointers to making the unittests > > and examples run better would be helpful... > > -Chris > > > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From jkohl at telusplanet.net Mon Nov 15 15:52:03 2004 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Mon, 15 Nov 2004 12:52:03 -0800 Subject: [Wtr-general] User guide In-Reply-To: <200411151938.CRQ75564@ms2.netsolmail.com> References: <200411151938.CRQ75564@ms2.netsolmail.com> Message-ID: <1100551923.419916f37283a@webmail.telus.net> > I would also be interested in helping read/edit a user > guide. Let me know if you need any help. I can approach the > material from a beginner's point of view (that's where I'm > at). Sounds great! I appreciate having people willing to check it out. It's the first draft, so I'm expecting bugs and areas of confusion to iron out, so feel free to send me anything you struggled with or suggestions for improvement. This was written based on what I would have liked to have known when starting out which may or may not be helpful for others. :-) -Jonathan From jkohl at telusplanet.net Mon Nov 15 16:22:01 2004 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Mon, 15 Nov 2004 13:22:01 -0800 Subject: [Wtr-general] User guide In-Reply-To: <1100551923.419916f37283a@webmail.telus.net> References: <200411151938.CRQ75564@ms2.netsolmail.com> <1100551923.419916f37283a@webmail.telus.net> Message-ID: <1100553721.41991df9b01f7@webmail.telus.net> I should also mention that the audience I had in mind for this draft are testers who normally don't do much programming. As time goes on, I hope to have something that people with stronger technical skills would appreciate more. -Jonathan > > > > I would also be interested in helping read/edit a user > > guide. Let me know if you need any help. I can approach the > > material from a beginner's point of view (that's where I'm > > at). > Sounds great! I appreciate having people willing to check it out. It's the > first > draft, so I'm expecting bugs and areas of confusion to iron out, so feel free > to > send me anything you struggled with or suggestions for improvement. This was > written based on what I would have liked to have known when starting out > which > may or may not be helpful for others. :-) > > -Jonathan > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From chris.mcmahon at verint.com Mon Nov 15 16:43:56 2004 From: chris.mcmahon at verint.com (McMahon, Chris) Date: Mon, 15 Nov 2004 14:43:56 -0700 Subject: [Wtr-general] 3 things: yay Ruby1.8.2, User Guide suggestion, apology. Message-ID: Hi... First off, sorry for spamming the list with that huge quote. My mail client escaped control for a sec, there. Second, Ruby 1.8.2 has definitely fixed my segfault problems-- thanks for the tip! Since the docs mention 1.8.1 exclusively, this might be worth updating. I'm consistently getting one unittest failure from the all_tests script, but haven't tracked it down yet. Next, at first glance, I really like the User Guide. I noticed, though, that the function of "id=" is mentioned frequently, but demonstrated only once. A little bit more about how WATIR treats the "id" element would be helpful, I think. This will tie into a Selenium integration later, too, I think. Finally, the rdoc is *great*. I haven't dug into it too much, but at a glance it seems clear, comprehensive, and usage seem to exist where it is needed. (This, BTW, was the toughest part of trying to use the Perl SAMIE application-- neither features nor usage were completely documented, either in the docs or in the source, and was tough to figure out.) Thanks again. Having written my first real test now, I'm looking forward to using WATIR more and more. -Chris From jkohl at telusplanet.net Mon Nov 15 16:53:38 2004 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Mon, 15 Nov 2004 13:53:38 -0800 Subject: [Wtr-general] 3 things: yay Ruby1.8.2, User Guide suggestion, apology. In-Reply-To: References: Message-ID: <1100555618.41992562e69fc@webmail.telus.net> > Second, Ruby 1.8.2 has definitely fixed my segfault problems-- > thanks for the tip! Since the docs mention 1.8.1 exclusively, this > might be worth updating. I'm consistently getting one unittest failure > from the all_tests script, but haven't tracked it down yet. Glad it's working! If the test keeps failing, feel free to send the test and failure info to the mailing list and one of us will try to track it down. > Next, at first glance, I really like the User Guide. I noticed, > though, that the function of "id=" is mentioned frequently, but > demonstrated only once. A little bit more about how WATIR treats the > "id" element would be helpful, I think. This will tie into a Selenium > integration later, too, I think. Thanks for the feedback. I need to add more examples; I ran out of time this weekend to do every example I could think of for different objects. I'll add these in with the "id" examples as a priority. I tried to get across in the guide that you can always try an attribute in a Watir method even if you don't see an example for it. That's always a last resort to try anyway. Having more examples is always better though, so I'll get on that. > Finally, the rdoc is *great*. I haven't dug into it too much, > but at a glance it seems clear, comprehensive, and usage seem to exist > where it is needed. (This, BTW, was the toughest part of trying to use > the Perl SAMIE application-- neither features nor usage were completely > documented, either in the docs or in the source, and was tough to figure > out.) Kudos to Bret and Paul for getting that sorted out. I found it helpful as well. > Thanks again. Having written my first real test now, I'm > looking forward to using WATIR more and more. Excellent. :-) Welcome to the Watir world. -Jonathan > -Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From bret at pettichord.com Sun Nov 14 21:05:29 2004 From: bret at pettichord.com (Bret Pettichord) Date: Sun, 14 Nov 2004 20:05:29 -0600 Subject: [Wtr-general] segfaults in tests and in examples from tarball In-Reply-To: Message-ID: <5.1.0.14.2.20041114200334.02a0c5d0@127.0.0.1> This looks like a bug with WIN32OLE that was in Ruby 1.8.1-13. WATIR has been tested extensively with 1.8.1-11 and 1.8.1-12. Bret At 09:32 AM 11/12/2004, McMahon, Chris wrote: > >With Ruby 1.8.1, on WinXPPro. Best example is probably buttons_test.rb. >I get some processing, then >********************************************************** >------- >PASS >--------- >pageContainsText: Looking for: PASS (string) - found it ok >../../watir.rb:33: [BUG] Segmentation fault >ruby 1.8.1 (2003-12-25) [i386-mswin32] > >This application has requested the Runtime to terminate it in an unusual >way... >************************************************************************ >***** > > I'm a pure newbie, any pointers to making the unittests and >examples run better would be helpful... >-Chris > > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From jkohl at telusplanet.net Thu Nov 18 15:41:03 2004 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Thu, 18 Nov 2004 12:41:03 -0800 Subject: [Wtr-general] Jiffie Message-ID: <1100810463.419d08dfe2f5a@webmail.telus.net> A friend of mine is using Jiffie: http://jiffie.sourceforge.net/ for web application automation. Looks like an interesting tool, I'd like to try it out sometime. -Jonathan From chrismo at clabs.org Thu Nov 18 15:48:00 2004 From: chrismo at clabs.org (Chris Morris) Date: Thu, 18 Nov 2004 14:48:00 -0600 Subject: [Wtr-general] Jiffie In-Reply-To: <1100810463.419d08dfe2f5a@webmail.telus.net> References: <1100810463.419d08dfe2f5a@webmail.telus.net> Message-ID: <419D0A80.1000002@clabs.org> jkohl at telusplanet.net wrote: >A friend of mine is using Jiffie: http://jiffie.sourceforge.net/ for web >application automation. Looks like an interesting tool, I'd like to try it out >sometime. > > Updated http://www.clabs.org/wtr/index.cgi?page=/AlternativeTools -- Chris http://clabs.org From jkohl at telusplanet.net Thu Nov 18 15:50:52 2004 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Thu, 18 Nov 2004 12:50:52 -0800 Subject: [Wtr-general] Jiffie In-Reply-To: <419D0A80.1000002@clabs.org> References: <1100810463.419d08dfe2f5a@webmail.telus.net> <419D0A80.1000002@clabs.org> Message-ID: <1100811052.419d0b2cbcff0@webmail.telus.net> > Updated http://www.clabs.org/wtr/index.cgi?page=/AlternativeTools Thanks! It would be nice if there was a C# tool for this as well. I recently was at a client site that was standardizing on C#, so they weren't interested in using Ruby. -Jonathan From jbarrett at finaplex.com Thu Nov 18 18:21:27 2004 From: jbarrett at finaplex.com (Jeff Barrett) Date: Thu, 18 Nov 2004 15:21:27 -0800 Subject: [Wtr-general] Jiffie Message-ID: Hmm... Jiffie and Groovy (http://groovy.codehaus.org/) seem like a match made in heaven. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of jkohl at telusplanet.net Sent: Thursday, November 18, 2004 12:51 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Jiffie > Updated http://www.clabs.org/wtr/index.cgi?page=/AlternativeTools Thanks! It would be nice if there was a C# tool for this as well. I recently was at a client site that was standardizing on C#, so they weren't interested in using Ruby. -Jonathan _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From chrismo at clabs.org Thu Nov 18 21:43:08 2004 From: chrismo at clabs.org (Chris Morris) Date: Thu, 18 Nov 2004 20:43:08 -0600 Subject: [Wtr-general] Jiffie In-Reply-To: References: Message-ID: <419D5DBC.7090801@clabs.org> Jeff Barrett wrote: >Hmm... Jiffie and Groovy (http://groovy.codehaus.org/) seem like a match made in heaven. > > Except it's IE only if that matters -- and only a subset of the COM interfaces are hooked into for now. -- Chris http://clabs.org/blogki From chris.mcmahon at verint.com Fri Nov 19 16:31:37 2004 From: chris.mcmahon at verint.com (McMahon, Chris) Date: Fri, 19 Nov 2004 14:31:37 -0700 Subject: [Wtr-general] Writing pass/fail to file. Message-ID: Hi... I've been able to write all of my test data to a file, but can't figure out how to capture the results of the "assert" statement in some intelligible way. I've tried this: $f.puts(assert($ie.pageContainsText("Step 1") ) ) and this: result = assert($ie.pageContainsText("Step 1") ) if result $f.puts('PASS') else $f.puts('FAIL') end But all I get in the $f file is "nil". Sorry if this is a silly newbie question, but-- it is, and I am... Thanks -Chris From chris.mcmahon at verint.com Fri Nov 19 17:01:41 2004 From: chris.mcmahon at verint.com (McMahon, Chris) Date: Fri, 19 Nov 2004 15:01:41 -0700 Subject: [Wtr-general] Popup box Message-ID: Hi again... I have one of these: References: Message-ID: <1100901904.419e6e10701e0@webmail.telus.net> That's a JavaScript popup right? WATIR doesn't support them yet, but I hope it will soon. We just have to ask for it and hopefully Paul and Bret will get it in soon. JS popups are tricky iirc, because they aren't technically part of the IE Browser - I think they have Win32 window handles. -Jonathan > Hi again... > I have one of these: > > tabindex="-1" onClick="return confirm('Continue with logout?');" > > Is there any way for WATIR to manipulate the resulting little > "confirm" box? I can't even get to the source of it to see what the > "name" of the button is... > -Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From jkohl at telusplanet.net Fri Nov 19 17:07:27 2004 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Fri, 19 Nov 2004 14:07:27 -0800 Subject: [Wtr-general] Writing pass/fail to file. In-Reply-To: References: Message-ID: <1100902047.419e6e9fb840b@webmail.telus.net> I haven't figured this out either. Perhaps Chris Morris, Paul or Bret will have an answer. I like to log results to an HTML file which I can then turn over to business testers who want procedural test scripts. Kills two birds with one stone that way. The last project I was on I did this without using test::unit; I'd like to know how to do it with test::unit as well. -Jonathan > > Hi... > I've been able to write all of my test data to a file, but can't > figure out how to capture the results of the "assert" statement in some > intelligible way. > I've tried this: > > $f.puts(assert($ie.pageContainsText("Step 1") ) ) > > and this: > > result = assert($ie.pageContainsText("Step 1") ) > if result > $f.puts('PASS') > else > $f.puts('FAIL') > end > > But all I get in the $f file is "nil". > Sorry if this is a silly newbie question, but-- it is, and I am... > Thanks > -Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From chris.mcmahon at verint.com Fri Nov 19 18:03:50 2004 From: chris.mcmahon at verint.com (McMahon, Chris) Date: Fri, 19 Nov 2004 16:03:50 -0700 Subject: [Wtr-general] ...and new instance of IE? Message-ID: OK, going for the trifecta... I also have a button that starts up a new instance of IE. The new instance has focus, but WATIR seems to only see the first instance of IE. Can I get WATIR to switch back and forth and manipulate two different instances of IE? -Chris > -----Original Message----- > From: McMahon, Chris > Sent: Friday, November 19, 2004 3:02 PM > To: 'wtr-general at rubyforge.org' > Subject: Popup box > > Hi again... > I have one of these: > > id="cmdLogout" tabindex="-1" onClick="return > confirm('Continue with logout?');" > > Is there any way for WATIR to manipulate the resulting > little "confirm" box? I can't even get to the source of it > to see what the "name" of the button is... > -Chris From jkohl at telusplanet.net Fri Nov 19 18:18:32 2004 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Fri, 19 Nov 2004 15:18:32 -0800 Subject: [Wtr-general] ...and new instance of IE? In-Reply-To: References: Message-ID: <1100906312.419e7f48d095a@webmail.telus.net> That's another feature I want that WATIR doesn't currently support afaik. :-) It would be great to set focus to another window instance. $ie.setFocus(:title "window_title") or something along those lines would be very useful. -Jonathan > > OK, going for the trifecta... > I also have a button that starts up a new instance of IE. The > new instance has focus, but WATIR seems to only see the first instance > of IE. > Can I get WATIR to switch back and forth and manipulate two > different instances of IE? > -Chris > > > > -----Original Message----- > > From: McMahon, Chris > > Sent: Friday, November 19, 2004 3:02 PM > > To: 'wtr-general at rubyforge.org' > > Subject: Popup box > > > > Hi again... > > I have one of these: > > > > > id="cmdLogout" tabindex="-1" onClick="return > > confirm('Continue with logout?');" > > > > Is there any way for WATIR to manipulate the resulting > > little "confirm" box? I can't even get to the source of it > > to see what the "name" of the button is... > > -Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From mike at swieton.net Fri Nov 19 19:22:37 2004 From: mike at swieton.net (Mike Swieton) Date: Fri, 19 Nov 2004 19:22:37 -0500 Subject: [Wtr-general] Popup box In-Reply-To: <1100901904.419e6e10701e0@webmail.telus.net> References: <1100901904.419e6e10701e0@webmail.telus.net> Message-ID: <20041120002237.GA2793@swieton.net> I have the same problem. If someone even had any idea where to start on that, I'd probably go and do it. Thoughts? Or, is someone working on this now? On Fri, Nov 19, 2004 at 02:05:04PM -0800, jkohl at telusplanet.net wrote: > That's a JavaScript popup right? WATIR doesn't support them yet, but I hope it > will soon. We just have to ask for it and hopefully Paul and Bret will get it in > soon. JS popups are tricky iirc, because they aren't technically part of the IE > Browser - I think they have Win32 window handles. > > -Jonathan > > > Hi again... > > I have one of these: > > > > > tabindex="-1" onClick="return confirm('Continue with logout?');" > > > > Is there any way for WATIR to manipulate the resulting little > > "confirm" box? I can't even get to the source of it to see what the > > "name" of the button is... > > -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 > Mike Swieton __ If I need a screwdriver and I select a hammer, I probably won't get anywhere and will eventually realize my error. The problem with software is that we are able to turn a hammer into a screwdriver. - Laurent Bossavit From jkohl at telusplanet.net Fri Nov 19 19:27:51 2004 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Fri, 19 Nov 2004 17:27:51 -0700 Subject: [Wtr-general] Popup box In-Reply-To: <20041120002237.GA2793@swieton.net> Message-ID: <20041120002640.OHLU11826.priv-edtnes28.telusplanet.net@tintin> Paul Rogers wrote a library for handling Win32 windows last year to deal with JavaScript popups. We would include this file with the IEController in our test script, and create a new thread that would wait for the JS popup and then deal with it when it appeared. Every time we had a JS popup that would occur in a test, we would create a thread and have the Win32 library handle it. I'm sure he would be looking at something similar to plug into WATIR, but I'll let him speak to that. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Mike Swieton > Sent: November 19, 2004 5:23 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] Popup box > > I have the same problem. If someone even had any idea where to start on > that, > I'd probably go and do it. > > Thoughts? Or, is someone working on this now? > > On Fri, Nov 19, 2004 at 02:05:04PM -0800, jkohl at telusplanet.net wrote: > > That's a JavaScript popup right? WATIR doesn't support them yet, but I > hope it > > will soon. We just have to ask for it and hopefully Paul and Bret will > get it in > > soon. JS popups are tricky iirc, because they aren't technically part of > the IE > > Browser - I think they have Win32 window handles. > > > > -Jonathan > > > > > Hi again... > > > I have one of these: > > > > > > > > tabindex="-1" onClick="return confirm('Continue with logout?');" > > > > > > Is there any way for WATIR to manipulate the resulting little > > > "confirm" box? I can't even get to the source of it to see what the > > > "name" of the button is... > > > -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 > > > > Mike Swieton > __ > If I need a screwdriver and I select a hammer, I probably won't get > anywhere > and will eventually realize my error. The problem with software is that we > are > able to turn a hammer into a screwdriver. > - Laurent Bossavit > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Fri Nov 19 19:34:44 2004 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Fri, 19 Nov 2004 17:34:44 -0700 Subject: [Wtr-general] User Guide tarball Message-ID: <20041120003333.ELJL20316.priv-edtnes56.telusplanet.net@tintin> If folks would like to start with the user guide and work from there to get WATIR going, the tarball for only the user guide is here: http://rubyforge.org/cgi-bin/viewcvs.cgi/watir/doc/doc.tar.gz?tarball=1 &cvsroot=wtr I'll be making additions to it and adding an example walking through a test script in the next few days. -Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20041119/385e957d/attachment.html From paul.rogers at shaw.ca Sun Nov 21 14:09:26 2004 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sun, 21 Nov 2004 12:09:26 -0700 Subject: [Wtr-general] Popups, new windows, asserts with files, xp-sp2.... Message-ID: <006201c4cffd$9f1bc7d0$6400a8c0@NewDell> The class we taught at StarWest on Mody was mostly successful. Several people really liked it, several hated it, several thouth the class was about testing windows apps. It did highlight some problems, and some bugs ( most of which which Ive fixed). The big problems seemed to be install related - but we did install a lot more software than just watir. Jonathan - thanks for an awesome job on the user guide! We also added some features to help when using irb - there is now a showAllElements and a flash method. showAllElements gives the name, value, id etc of the objects on the page. Flash flashes the object ( ie.button(:name , 'button').flash ) so its easier to see if you have the right thing when using irb I think early this week Im going to do a release of what we have at version 0.1. This will help people from the class as its easier to download a release than it is to get it from cvs. XP Service Pack 2 - Is anyone using this? Bret and I spent a while making watir work with this. The problem is that IE now has a yellow thing at the top called the Information bar, which prevents access to lots of things. Watir unit tests is one of the things it prevents. This link show how to get rid of the problem - Jonathan - is this something we can get in the docs? http://www.winxptutor.com/lmzunlock.htm Also I have been thinking of hosting the unit test pages somewhere, so you would goto the internet for tests, rather than a local machine ( or maybe its selectable) - any one have thoughts on this? Pop ups are mostly trivial to do. We need to access the winapi but I already have code for it. Im not sure I can get it in for early this week, but it can be done soon. The new windows are a bit trickier. According to the Internet Explorer docs, the new window should be available in the frames collection, but doesn't appear to be. I guess this is a security feature of IE. I think what I can do is to use the onNewWindow event of the browser to detect when a new window is opened, and then return a new IE object that refers to that window. Again, that wont be for this week. For the asserts to a file, you can probably create a new assert method, that returns the result. Also try email Nathaniel - hes been helpful before. This is the sort of issue that we want as testers, but isnt really needed for unit tests. I may add a simple logger to watir for this release, but again I may not get time Thanks Paul From chris.pollard at Roche.COM Mon Nov 22 07:52:54 2004 From: chris.pollard at Roche.COM (Pollard, Chris {PGL~Welwyn}) Date: Mon, 22 Nov 2004 12:52:54 +0000 Subject: [Wtr-general] IE after link.click timing help Message-ID: <353D6F5AD32A764F978488919DE7671901780643@rwemsem1.emea.roche.com> Hi there, I am real newbie ( to both watir and Ruby! ) so sorry if I have missed something obvious. I am testing a Java web app (Java/Struts) running on BEA on IE. I have the latest from CVS as of this morning. All unit tests pass ok. The slight problem I have is after $ie.link().click, if I do any other action I get an Error: test assert($ie.link(:text, "Report").exists?) $ie.link(:text, "Report").click assert( $ie.pageContainsText("Collection Site") ) gives 1) Error: test_story_0001(TC_Story_0001): NoMethodError: undefined method `innerText' for nil:NilClass C:\Dev\affiliatedatacapture\src\acceptanceTests/watir.rb:378:in `pageContainsText' C:/Dev/affiliatedatacapture/src/acceptanceTests/story_0006_test.rb:29:in `test_story_0006' 1 tests, 1 assertions, 0 failures, 1 errors the links_test.rb does pass though, even though it does something very similar. I can get these to pass if I put in a sleep(1) after the link click, before the pageContains. The pages are being served rather than being loaded from file and do have various images in. The pages are not that large. My guess is that ruby is going quicker that IE, so gets back a nil body object? Is there some alternative to putting in the sleep(1)? IE version: 6.0.2800.1106.xpsp2_gdr.040517-1325C0 Thanks in advance, Chris From chrismo at clabs.org Mon Nov 22 09:36:59 2004 From: chrismo at clabs.org (Chris Morris) Date: Mon, 22 Nov 2004 08:36:59 -0600 Subject: [Wtr-general] Writing pass/fail to file. In-Reply-To: References: Message-ID: <41A1F98B.1090403@clabs.org> McMahon, Chris wrote: >But all I get in the $f file is "nil". > > I think you're assuming the assert method returns a boolean, and I don't believe it does. The assert methods (and assert_equal, etc) all work by throwing an exception if the assertion fails, rather than returning a boolean. The design concept for these xUnit like unit tests is to not give you a lot of output for tests that pass, because the hope is that tests will be run frequently enough that you should only ever really need is the failure data. Once you've got 500 tests accumulated, and only 2 fail, do you really need output for 498 successes? That said, to get what you want, you'll need to wrap the assert in some way like this: begin assert($ie.pageContainsText("Step 1") ) $f.puts('PASS') rescue => e $f.puts('FAIL' + e.message + "\n" + e.backtrace.join("\n")) end -- Chris http://clabs.org From paul.rogers at shaw.ca Mon Nov 22 10:47:18 2004 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 22 Nov 2004 08:47:18 -0700 Subject: [Wtr-general] IE after link.click timing help Message-ID: <142a321460e2.1460e2142a32@shaw.ca> your assumptions about what is happening is correct. I will put a begin/rescue(and maybe a retry) in the pageContainsText method and add a small delay to the code that waits for IE to complete. Thanks Paul ----- Original Message ----- From: "Pollard, Chris {PGL~Welwyn}" Date: Monday, November 22, 2004 5:52 am Subject: [Wtr-general] IE after link.click timing help > Hi there, > > I am real newbie ( to both watir and Ruby! ) so sorry if I have missed > something obvious. I am testing a Java web app (Java/Struts) > running on > BEA on IE. I have the latest from CVS as of this morning. All unit > testspass ok. > > The slight problem I have is after $ie.link().click, if I do any other > action I get an Error: > > test > > assert($ie.link(:text, "Report").exists?) > $ie.link(:text, "Report").click > > assert( $ie.pageContainsText("Collection Site") ) > > gives > > 1) Error: > test_story_0001(TC_Story_0001): > NoMethodError: undefined method `innerText' for nil:NilClass > C:\Dev\affiliatedatacapture\src\acceptanceTests/watir.rb:378:in > `pageContainsText' > > C:/Dev/affiliatedatacapture/src/acceptanceTests/story_0006_test.rb:29:in > `test_story_0006' > > 1 tests, 1 assertions, 0 failures, 1 errors > > the links_test.rb does pass though, even though it does something very > similar. I can get these to pass if I put in a sleep(1) after the link > click, before the pageContains. > > The pages are being served rather than being loaded from file and do > have various images in. The pages are not that large. My guess is that > ruby is going quicker that IE, so gets back a nil body object? > > Is there some alternative to putting in the sleep(1)? > > IE version: 6.0.2800.1106.xpsp2_gdr.040517-1325C0 > > Thanks in advance, > > Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From chris.mcmahon at verint.com Mon Nov 22 10:47:18 2004 From: chris.mcmahon at verint.com (McMahon, Chris) Date: Mon, 22 Nov 2004 08:47:18 -0700 Subject: [Wtr-general] More about popups, WinGUIs, and capturing asserts. Message-ID: Paul Rogers said: > Pop ups are mostly trivial to do. We need to access the > winapi but I already have code for it. Im not sure I can get > it in for early this week, but it can be done soon. Cool, thanks! After I talked to the programmer who wrote that, I considered trying to shell out to run a Perl script to diddle the new WinGUI window, but it'd be a lot more elegant to do it from within WATIR. > I think what I can do is to use the > onNewWindow event of the browser to detect when a new window > is opened, and then return a new IE object that refers to > that window. Again, that wont be for this week. Let me know if there's anything I can do to help out with that... > I may add a simple logger to watir for this release, but > again I may not get time Once again, that would be a lot more elegant than what I had in mind. -Chris From paul.rogers at shaw.ca Mon Nov 22 10:51:20 2004 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 22 Nov 2004 08:51:20 -0700 Subject: [Wtr-general] Writing pass/fail to file. Message-ID: <1427331478ba.1478ba142733@shaw.ca> "...Once you've got 500 tests accumulated, and only 2 fail, do you really need output for 498 successes?" In reality you gain no new information. However project stakeholders like the reasurance of knowing what has passed, what has failed, and also what has been tested. We have a database that records pass/fails, tests run etc, mostly so we are able to demonstrate what we have accomplished, but also as historical data. Unfortunately its part of life in the QA field, although its certainly less now that agile is being used more. Paul ----- Original Message ----- From: Chris Morris Date: Monday, November 22, 2004 7:36 am Subject: Re: [Wtr-general] Writing pass/fail to file. > McMahon, Chris wrote: > > >But all I get in the $f file is "nil". > > > > > I think you're assuming the assert method returns a boolean, and I > don't > believe it does. The assert methods (and assert_equal, etc) all > work by > throwing an exception if the assertion fails, rather than > returning a > boolean. The design concept for these xUnit like unit tests is to > not > give you a lot of output for tests that pass, because the hope is > that > tests will be run frequently enough that you should only ever > really > need is the failure data. Once you've got 500 tests accumulated, > and > only 2 fail, do you really need output for 498 successes? > > That said, to get what you want, you'll need to wrap the assert in > some > way like this: > > begin > assert($ie.pageContainsText("Step 1") ) > $f.puts('PASS') > rescue => e > $f.puts('FAIL' + e.message + "\n" + e.backtrace.join("\n")) > end > > > -- > Chris > http://clabs.org > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Mon Nov 22 11:13:11 2004 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 22 Nov 2004 09:13:11 -0700 Subject: [Wtr-general] More about popups, WinGUIs, and capturing asserts. Message-ID: <14a63b14dc7c.14dc7c14a63b@shaw.ca> "..Let me know if there's anything I can do to help out with that..." Do you want to write the html and maybe a test case? Paul ----- Original Message ----- From: "McMahon, Chris" Date: Monday, November 22, 2004 8:47 am Subject: [Wtr-general] More about popups, WinGUIs, and capturing asserts. > > Paul Rogers said: > > > Pop ups are mostly trivial to do. We need to access the > > winapi but I already have code for it. Im not sure I can get > > it in for early this week, but it can be done soon. > > Cool, thanks! After I talked to the programmer who wrote that, > I considered trying to shell out to run a Perl script to diddle > the new > WinGUI window, but it'd be a lot more elegant to do it from within > WATIR. > > > I think what I can do is to use the > > onNewWindow event of the browser to detect when a new window > > is opened, and then return a new IE object that refers to > > that window. Again, that wont be for this week. > > Let me know if there's anything I can do to help out with > that... > > > I may add a simple logger to watir for this release, but > > again I may not get time > > Once again, that would be a lot more elegant than what I had in > mind. > -Chris > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From chris.pollard at Roche.COM Mon Nov 22 11:18:38 2004 From: chris.pollard at Roche.COM (Pollard, Chris {PGL~Welwyn}) Date: Mon, 22 Nov 2004 16:18:38 +0000 Subject: [Wtr-general] IE after link.click timing help Message-ID: <353D6F5AD32A764F978488919DE76719023D8A50@rwemsem1.emea.roche.com> Hi Paul, this timing problem occurred with all the $ie.actions I tried including pageContainsText, [link|textField|...].exists? so it looks like a general timing issue. Hope that helps, Chris -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Monday, November 22, 2004 3:47 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] IE after link.click timing help your assumptions about what is happening is correct. I will put a begin/rescue(and maybe a retry) in the pageContainsText method and add a small delay to the code that waits for IE to complete. Thanks Paul ----- Original Message ----- From: "Pollard, Chris {PGL~Welwyn}" Date: Monday, November 22, 2004 5:52 am Subject: [Wtr-general] IE after link.click timing help > Hi there, > > I am real newbie ( to both watir and Ruby! ) so sorry if I have missed > something obvious. I am testing a Java web app (Java/Struts) running > on BEA on IE. I have the latest from CVS as of this morning. All unit > testspass ok. > > The slight problem I have is after $ie.link().click, if I do any other > action I get an Error: > > test > > assert($ie.link(:text, "Report").exists?) > $ie.link(:text, "Report").click > > assert( $ie.pageContainsText("Collection Site") ) > > gives > > 1) Error: > test_story_0001(TC_Story_0001): > NoMethodError: undefined method `innerText' for nil:NilClass > C:\Dev\affiliatedatacapture\src\acceptanceTests/watir.rb:378:in > `pageContainsText' > > C:/Dev/affiliatedatacapture/src/acceptanceTests/story_0006_test.rb:29: > in > `test_story_0006' > > 1 tests, 1 assertions, 0 failures, 1 errors > > the links_test.rb does pass though, even though it does something very > similar. I can get these to pass if I put in a sleep(1) after the link > click, before the pageContains. > > The pages are being served rather than being loaded from file and do > have various images in. The pages are not that large. My guess is that > ruby is going quicker that IE, so gets back a nil body object? > > Is there some alternative to putting in the sleep(1)? > > IE version: 6.0.2800.1106.xpsp2_gdr.040517-1325C0 > > Thanks in advance, > > 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 Mon Nov 22 13:48:08 2004 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 22 Nov 2004 11:48:08 -0700 Subject: [Wtr-general] IE after link.click timing help Message-ID: <18a56d18ad82.18ad8218a56d@shaw.ca> are you going to a sitre on the internet? can you share the test? Thanks Paul ----- Original Message ----- From: "Pollard, Chris {PGL~Welwyn}" Date: Monday, November 22, 2004 9:18 am Subject: RE: [Wtr-general] IE after link.click timing help > Hi Paul, > > this timing problem occurred with all the $ie.actions I tried > includingpageContainsText, [link|textField|...].exists? so it > looks like a > general timing issue. > > Hope that helps, > > Chris > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Monday, November 22, 2004 3:47 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] IE after link.click timing help > > > your assumptions about what is happening is correct. > > I will put a begin/rescue(and maybe a retry) in the pageContainsText > method and add a small delay to the code that waits for IE to > complete. > Thanks > > Paul > > ----- Original Message ----- > From: "Pollard, Chris {PGL~Welwyn}" > Date: Monday, November 22, 2004 5:52 am > Subject: [Wtr-general] IE after link.click timing help > > > Hi there, > > > > I am real newbie ( to both watir and Ruby! ) so sorry if I have > missed > > something obvious. I am testing a Java web app (Java/Struts) > running > > on BEA on IE. I have the latest from CVS as of this morning. All > unit> testspass ok. > > > > The slight problem I have is after $ie.link().click, if I do any > other > > action I get an Error: > > > > test > > > > assert($ie.link(:text, "Report").exists?) > > $ie.link(:text, "Report").click > > > > assert( $ie.pageContainsText("Collection Site") ) > > > > gives > > > > 1) Error: > > test_story_0001(TC_Story_0001): > > NoMethodError: undefined method `innerText' for nil:NilClass > > C:\Dev\affiliatedatacapture\src\acceptanceTests/watir.rb:378:in > > `pageContainsText' > > > > > C:/Dev/affiliatedatacapture/src/acceptanceTests/story_0006_test.rb:29:> in > > `test_story_0006' > > > > 1 tests, 1 assertions, 0 failures, 1 errors > > > > the links_test.rb does pass though, even though it does > something very > > > similar. I can get these to pass if I put in a sleep(1) after > the link > > > click, before the pageContains. > > > > The pages are being served rather than being loaded from file > and do > > have various images in. The pages are not that large. My guess > is that > > > ruby is going quicker that IE, so gets back a nil body object? > > > > Is there some alternative to putting in the sleep(1)? > > > > IE version: 6.0.2800.1106.xpsp2_gdr.040517-1325C0 > > > > Thanks in advance, > > > > 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 Mon Nov 22 19:45:52 2004 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 22 Nov 2004 17:45:52 -0700 Subject: [Wtr-general] new checkin Message-ID: <21786e2194be.2194be21786e@shaw.ca> Ive checked the latest version of watir in. This has: various bug fixes new methods for working with irb ( flash, showAllElements etc) slow down in waitForIE new unit tests This will be the basis for the 0.1 release unless there are any serious problems in the next few days Paul From chris.pollard at Roche.COM Tue Nov 23 07:04:27 2004 From: chris.pollard at Roche.COM (Pollard, Chris {PGL~Welwyn}) Date: Tue, 23 Nov 2004 12:04:27 +0000 Subject: [Wtr-general] IE after link.click timing help Message-ID: <353D6F5AD32A764F978488919DE7671901780644@rwemsem1.emea.roche.com> Paul, the site is not on the internet, it is running on my local box, being served from weblogic via http. I have rechecked the errors I am getting.. in the case of the pageContains, I get the NoMethodError: undefined method `innerText' for nil:NilClass error. For other checked like link.exists? the test returns false for pages that do contain the link. I think the underlying problem is that ie has not completed loading the page, but the exact error depends on the part of the watir api that is being called. My test is included below (it is not very useful as it is my first example test). It does not test most of the ObjectAction types, but hits various screens. If any of the sleep(0)'s are commented out, the code either errors for a pageContains or the assert fails when it should pass. I am using the link.click to navigate to particular pages in the app for tests - it is a dynamic app and many of the pages are reached through dynamic URLs/parameter lists. As a suggestion, you could extend the unit test suite to run up a local web server and test pages out of that? Cheers Chris >>> # revision: $Revision: 1.1 $ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') require 'watir' require 'test/unit' require 'test/unit/ui/console/testrunner' require 'testUnitAddons' require 'setup' class TC_Story_0001 < Test::Unit::TestCase def gotoStoryPage() # local #$ie.goto("file://#{$myDir}/html/forms2.html") # web $ie.goto("http://localhost:7001/affiliatedatacapture/datacapture.do") end def test_Form_Exists puts "I am TC for story 001\n" gotoStoryPage assert($ie.link(:text, "Reporter").exists?) assert_false($ie.link(:text, "missing").exists?) $ie.link(:text, "Reporter").click sleep(1) puts "Document: " + $ie.getDocument().body.to_s() assert( $ie.pageContainsText("Reporter Type") ) assert($ie.link(:text, "Drug").exists?) $ie.link(:text, "Drug").click sleep(1) assert($ie.link(:text, "Event").exists?) $ie.link(:text, "Event").click sleep(1) assert($ie.link(:text, "Lab Test").exists?) $ie.link(:text, "Lab Test").click sleep(1) assert($ie.link(:text, "Patient").exists?) $ie.link(:text, "Patient").click end end <<< -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Monday, November 22, 2004 6:48 PM To: wtr-general at rubyforge.org Subject: Re: RE: [Wtr-general] IE after link.click timing help are you going to a sitre on the internet? can you share the test? Thanks Paul ----- Original Message ----- From: "Pollard, Chris {PGL~Welwyn}" Date: Monday, November 22, 2004 9:18 am Subject: RE: [Wtr-general] IE after link.click timing help > Hi Paul, > > this timing problem occurred with all the $ie.actions I tried > includingpageContainsText, [link|textField|...].exists? so it > looks like a > general timing issue. > > Hope that helps, > > Chris > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Monday, November 22, 2004 3:47 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] IE after link.click timing help > > > your assumptions about what is happening is correct. > > I will put a begin/rescue(and maybe a retry) in the pageContainsText > method and add a small delay to the code that waits for IE to > complete. Thanks > > Paul > > ----- Original Message ----- > From: "Pollard, Chris {PGL~Welwyn}" > Date: Monday, November 22, 2004 5:52 am > Subject: [Wtr-general] IE after link.click timing help > > > Hi there, > > > > I am real newbie ( to both watir and Ruby! ) so sorry if I have > missed > > something obvious. I am testing a Java web app (Java/Struts) > running > > on BEA on IE. I have the latest from CVS as of this morning. All > unit> testspass ok. > > > > The slight problem I have is after $ie.link().click, if I do any > other > > action I get an Error: > > > > test > > > > assert($ie.link(:text, "Report").exists?) > > $ie.link(:text, "Report").click > > > > assert( $ie.pageContainsText("Collection Site") ) > > > > gives > > > > 1) Error: > > test_story_0001(TC_Story_0001): > > NoMethodError: undefined method `innerText' for nil:NilClass > > C:\Dev\affiliatedatacapture\src\acceptanceTests/watir.rb:378:in > > `pageContainsText' > > > > > C:/Dev/affiliatedatacapture/src/acceptanceTests/story_0006_test.rb:29: > > in > > `test_story_0006' > > > > 1 tests, 1 assertions, 0 failures, 1 errors > > > > the links_test.rb does pass though, even though it does > something very > > > similar. I can get these to pass if I put in a sleep(1) after > the link > > > click, before the pageContains. > > > > The pages are being served rather than being loaded from file > and do > > have various images in. The pages are not that large. My guess > is that > > > ruby is going quicker that IE, so gets back a nil body object? > > > > Is there some alternative to putting in the sleep(1)? > > > > IE version: 6.0.2800.1106.xpsp2_gdr.040517-1325C0 > > > > Thanks in advance, > > > > 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 paul.rogers at shaw.ca Tue Nov 23 11:22:02 2004 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 23 Nov 2004 09:22:02 -0700 Subject: [Wtr-general] IE after link.click timing help In-Reply-To: <353D6F5AD32A764F978488919DE7671901780644@rwemsem1.emea.roche.com> Message-ID: <000901c4d178$90a54f10$6400a8c0@NewDell> Ive checked in a new version of watir.rb that hopefully fixes this..... Ive also updated the unit tests to use a path set in the setup.rb file. This makes it easier to change to a new serving location easily. Im reluctant to make the delays in there any bigger, as it really slows down the unit tests If its still not working, you can do something like: Ie = IE.new Ie.defaultSleepTime = 2 # seconds This will then cause very slow running - I can improve some stuff there eventually. Hope that helps Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Pollard, Chris {PGL~Welwyn} Sent: 23 November 2004 05:04 To: wtr-general at rubyforge.org Subject: RE: RE: [Wtr-general] IE after link.click timing help Paul, the site is not on the internet, it is running on my local box, being served from weblogic via http. I have rechecked the errors I am getting.. in the case of the pageContains, I get the NoMethodError: undefined method `innerText' for nil:NilClass error. For other checked like link.exists? the test returns false for pages that do contain the link. I think the underlying problem is that ie has not completed loading the page, but the exact error depends on the part of the watir api that is being called. My test is included below (it is not very useful as it is my first example test). It does not test most of the ObjectAction types, but hits various screens. If any of the sleep(0)'s are commented out, the code either errors for a pageContains or the assert fails when it should pass. I am using the link.click to navigate to particular pages in the app for tests - it is a dynamic app and many of the pages are reached through dynamic URLs/parameter lists. As a suggestion, you could extend the unit test suite to run up a local web server and test pages out of that? Cheers Chris >>> # revision: $Revision: 1.1 $ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') require 'watir' require 'test/unit' require 'test/unit/ui/console/testrunner' require 'testUnitAddons' require 'setup' class TC_Story_0001 < Test::Unit::TestCase def gotoStoryPage() # local #$ie.goto("file://#{$myDir}/html/forms2.html") # web $ie.goto("http://localhost:7001/affiliatedatacapture/datacapture.do") end def test_Form_Exists puts "I am TC for story 001\n" gotoStoryPage assert($ie.link(:text, "Reporter").exists?) assert_false($ie.link(:text, "missing").exists?) $ie.link(:text, "Reporter").click sleep(1) puts "Document: " + $ie.getDocument().body.to_s() assert( $ie.pageContainsText("Reporter Type") ) assert($ie.link(:text, "Drug").exists?) $ie.link(:text, "Drug").click sleep(1) assert($ie.link(:text, "Event").exists?) $ie.link(:text, "Event").click sleep(1) assert($ie.link(:text, "Lab Test").exists?) $ie.link(:text, "Lab Test").click sleep(1) assert($ie.link(:text, "Patient").exists?) $ie.link(:text, "Patient").click end end <<< -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Monday, November 22, 2004 6:48 PM To: wtr-general at rubyforge.org Subject: Re: RE: [Wtr-general] IE after link.click timing help are you going to a sitre on the internet? can you share the test? Thanks Paul ----- Original Message ----- From: "Pollard, Chris {PGL~Welwyn}" Date: Monday, November 22, 2004 9:18 am Subject: RE: [Wtr-general] IE after link.click timing help > Hi Paul, > > this timing problem occurred with all the $ie.actions I tried > includingpageContainsText, [link|textField|...].exists? so it looks > like a general timing issue. > > Hope that helps, > > Chris > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Monday, November 22, 2004 3:47 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] IE after link.click timing help > > > your assumptions about what is happening is correct. > > I will put a begin/rescue(and maybe a retry) in the pageContainsText > method and add a small delay to the code that waits for IE to > complete. Thanks > > Paul > > ----- Original Message ----- > From: "Pollard, Chris {PGL~Welwyn}" > Date: Monday, November 22, 2004 5:52 am > Subject: [Wtr-general] IE after link.click timing help > > > Hi there, > > > > I am real newbie ( to both watir and Ruby! ) so sorry if I have > missed > > something obvious. I am testing a Java web app (Java/Struts) > running > > on BEA on IE. I have the latest from CVS as of this morning. All > unit> testspass ok. > > > > The slight problem I have is after $ie.link().click, if I do any > other > > action I get an Error: > > > > test > > > > assert($ie.link(:text, "Report").exists?) > > $ie.link(:text, "Report").click > > > > assert( $ie.pageContainsText("Collection Site") ) > > > > gives > > > > 1) Error: > > test_story_0001(TC_Story_0001): > > NoMethodError: undefined method `innerText' for nil:NilClass > > C:\Dev\affiliatedatacapture\src\acceptanceTests/watir.rb:378:in > > `pageContainsText' > > > > > C:/Dev/affiliatedatacapture/src/acceptanceTests/story_0006_test.rb:29: > > in > > `test_story_0006' > > > > 1 tests, 1 assertions, 0 failures, 1 errors > > > > the links_test.rb does pass though, even though it does > something very > > > similar. I can get these to pass if I put in a sleep(1) after > the link > > > click, before the pageContains. > > > > The pages are being served rather than being loaded from file > and do > > have various images in. The pages are not that large. My guess > is that > > > ruby is going quicker that IE, so gets back a nil body object? > > > > Is there some alternative to putting in the sleep(1)? > > > > IE version: 6.0.2800.1106.xpsp2_gdr.040517-1325C0 > > > > Thanks in advance, > > > > 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 jkohl at telusplanet.net Tue Nov 23 11:57:41 2004 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Tue, 23 Nov 2004 08:57:41 -0800 Subject: [Wtr-general] IE after link.click timing help In-Reply-To: <353D6F5AD32A764F978488919DE7671901780644@rwemsem1.emea.roche.com> References: <353D6F5AD32A764F978488919DE7671901780644@rwemsem1.emea.roche.com> Message-ID: <1101229061.41a36c0568d6f@webmail.telus.net> Does the site you are testing use frames? I've seen problems in the past with a frame page not being completely loaded. -Jonathan > Paul, > > the site is not on the internet, it is running on my local box, being > served from weblogic via http. > > I have rechecked the errors I am getting.. in the case of the > pageContains, I get the > > NoMethodError: undefined method `innerText' for nil:NilClass > > error. For other checked like link.exists? the test returns false for > pages that do contain the link. I think the underlying problem is that > ie has not completed loading the page, but the exact error depends on > the part of the watir api that is being called. > > My test is included below (it is not very useful as it is my first > example test). It does not test most of the ObjectAction types, but hits > various screens. If any of the sleep(0)'s are commented out, the code > either errors for a pageContains or the assert fails when it should > pass. > > I am using the link.click to navigate to particular pages in the app for > tests - it is a dynamic app and many of the pages are reached through > dynamic URLs/parameter lists. > > As a suggestion, you could extend the unit test suite to run up a local > web server and test pages out of that? > > Cheers > Chris > > >>> > # revision: $Revision: 1.1 $ > > $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') > require 'watir' > require 'test/unit' > require 'test/unit/ui/console/testrunner' > require 'testUnitAddons' > require 'setup' > > class TC_Story_0001 < Test::Unit::TestCase > > def gotoStoryPage() > # local > #$ie.goto("file://#{$myDir}/html/forms2.html") > # web > > $ie.goto("http://localhost:7001/affiliatedatacapture/datacapture.do") > end > > def test_Form_Exists > puts "I am TC for story 001\n" > > gotoStoryPage > > assert($ie.link(:text, "Reporter").exists?) > assert_false($ie.link(:text, "missing").exists?) > > $ie.link(:text, "Reporter").click > > sleep(1) > > puts "Document: " + $ie.getDocument().body.to_s() > > assert( $ie.pageContainsText("Reporter Type") ) > > assert($ie.link(:text, "Drug").exists?) > > $ie.link(:text, "Drug").click > > sleep(1) > > assert($ie.link(:text, "Event").exists?) > > $ie.link(:text, "Event").click > > sleep(1) > > assert($ie.link(:text, "Lab Test").exists?) > > $ie.link(:text, "Lab Test").click > > sleep(1) > > assert($ie.link(:text, "Patient").exists?) > > $ie.link(:text, "Patient").click > > end > > end > > <<< > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Monday, November 22, 2004 6:48 PM > To: wtr-general at rubyforge.org > Subject: Re: RE: [Wtr-general] IE after link.click timing help > > > are you going to a sitre on the internet? > can you share the test? > > Thanks > > Paul > > > ----- Original Message ----- > From: "Pollard, Chris {PGL~Welwyn}" > Date: Monday, November 22, 2004 9:18 am > Subject: RE: [Wtr-general] IE after link.click timing help > > > Hi Paul, > > > > this timing problem occurred with all the $ie.actions I tried > > includingpageContainsText, [link|textField|...].exists? so it > > looks like a > > general timing issue. > > > > Hope that helps, > > > > Chris > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > > Sent: Monday, November 22, 2004 3:47 PM > > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] IE after link.click timing help > > > > > > your assumptions about what is happening is correct. > > > > I will put a begin/rescue(and maybe a retry) in the pageContainsText > > method and add a small delay to the code that waits for IE to > > complete. Thanks > > > > Paul > > > > ----- Original Message ----- > > From: "Pollard, Chris {PGL~Welwyn}" > > Date: Monday, November 22, 2004 5:52 am > > Subject: [Wtr-general] IE after link.click timing help > > > > > Hi there, > > > > > > I am real newbie ( to both watir and Ruby! ) so sorry if I have > > missed > > > something obvious. I am testing a Java web app (Java/Struts) > > running > > > on BEA on IE. I have the latest from CVS as of this morning. All > > unit> testspass ok. > > > > > > The slight problem I have is after $ie.link().click, if I do any > > other > > > action I get an Error: > > > > > > test > > > > > > assert($ie.link(:text, "Report").exists?) > > > $ie.link(:text, "Report").click > > > > > > assert( $ie.pageContainsText("Collection Site") ) > > > > > > gives > > > > > > 1) Error: > > > test_story_0001(TC_Story_0001): > > > NoMethodError: undefined method `innerText' for nil:NilClass > > > C:\Dev\affiliatedatacapture\src\acceptanceTests/watir.rb:378:in > > > `pageContainsText' > > > > > > > > C:/Dev/affiliatedatacapture/src/acceptanceTests/story_0006_test.rb:29: > > > in > > > `test_story_0006' > > > > > > 1 tests, 1 assertions, 0 failures, 1 errors > > > > > > the links_test.rb does pass though, even though it does > > something very > > > > > similar. I can get these to pass if I put in a sleep(1) after > > the link > > > > > click, before the pageContains. > > > > > > The pages are being served rather than being loaded from file > > and do > > > have various images in. The pages are not that large. My guess > > is that > > > > > ruby is going quicker that IE, so gets back a nil body object? > > > > > > Is there some alternative to putting in the sleep(1)? > > > > > > IE version: 6.0.2800.1106.xpsp2_gdr.040517-1325C0 > > > > > > Thanks in advance, > > > > > > 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 Tue Nov 23 13:32:34 2004 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 23 Nov 2004 11:32:34 -0700 Subject: [Wtr-general] IE after link.click timing help In-Reply-To: <1101229061.41a36c0568d6f@webmail.telus.net> Message-ID: <000a01c4d18a$cd0a1aa0$6400a8c0@NewDell> The fix I just put in should deal with frames. I now check that ie is complete and that all documents are loaded before continuing -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of jkohl at telusplanet.net Sent: 23 November 2004 09:58 To: wtr-general at rubyforge.org Subject: RE: RE: [Wtr-general] IE after link.click timing help Does the site you are testing use frames? I've seen problems in the past with a frame page not being completely loaded. -Jonathan > Paul, > > the site is not on the internet, it is running on my local box, being > served from weblogic via http. > > I have rechecked the errors I am getting.. in the case of the > pageContains, I get the > > NoMethodError: undefined method `innerText' for nil:NilClass > > error. For other checked like link.exists? the test returns false for > pages that do contain the link. I think the underlying problem is that > ie has not completed loading the page, but the exact error depends on > the part of the watir api that is being called. > > My test is included below (it is not very useful as it is my first > example test). It does not test most of the ObjectAction types, but > hits various screens. If any of the sleep(0)'s are commented out, the > code either errors for a pageContains or the assert fails when it > should pass. > > I am using the link.click to navigate to particular pages in the app > for tests - it is a dynamic app and many of the pages are reached > through dynamic URLs/parameter lists. > > As a suggestion, you could extend the unit test suite to run up a > local web server and test pages out of that? > > Cheers > Chris > > >>> > # revision: $Revision: 1.1 $ > > $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') require > 'watir' require 'test/unit' > require 'test/unit/ui/console/testrunner' > require 'testUnitAddons' > require 'setup' > > class TC_Story_0001 < Test::Unit::TestCase > > def gotoStoryPage() > # local > #$ie.goto("file://#{$myDir}/html/forms2.html") > # web > > $ie.goto("http://localhost:7001/affiliatedatacapture/datacapture.do") > end > > def test_Form_Exists > puts "I am TC for story 001\n" > > gotoStoryPage > > assert($ie.link(:text, "Reporter").exists?) > assert_false($ie.link(:text, "missing").exists?) > > $ie.link(:text, "Reporter").click > > sleep(1) > > puts "Document: " + $ie.getDocument().body.to_s() > > assert( $ie.pageContainsText("Reporter Type") ) > > assert($ie.link(:text, "Drug").exists?) > > $ie.link(:text, "Drug").click > > sleep(1) > > assert($ie.link(:text, "Event").exists?) > > $ie.link(:text, "Event").click > > sleep(1) > > assert($ie.link(:text, "Lab Test").exists?) > > $ie.link(:text, "Lab Test").click > > sleep(1) > > assert($ie.link(:text, "Patient").exists?) > > $ie.link(:text, "Patient").click > > end > > end > > <<< > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Monday, November 22, 2004 6:48 PM > To: wtr-general at rubyforge.org > Subject: Re: RE: [Wtr-general] IE after link.click timing help > > > are you going to a sitre on the internet? > can you share the test? > > Thanks > > Paul > > > ----- Original Message ----- > From: "Pollard, Chris {PGL~Welwyn}" > Date: Monday, November 22, 2004 9:18 am > Subject: RE: [Wtr-general] IE after link.click timing help > > > Hi Paul, > > > > this timing problem occurred with all the $ie.actions I tried > > includingpageContainsText, [link|textField|...].exists? so it looks > > like a general timing issue. > > > > Hope that helps, > > > > Chris > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > > Sent: Monday, November 22, 2004 3:47 PM > > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] IE after link.click timing help > > > > > > your assumptions about what is happening is correct. > > > > I will put a begin/rescue(and maybe a retry) in the pageContainsText > > method and add a small delay to the code that waits for IE to > > complete. Thanks > > > > Paul > > > > ----- Original Message ----- > > From: "Pollard, Chris {PGL~Welwyn}" > > Date: Monday, November 22, 2004 5:52 am > > Subject: [Wtr-general] IE after link.click timing help > > > > > Hi there, > > > > > > I am real newbie ( to both watir and Ruby! ) so sorry if I have > > missed > > > something obvious. I am testing a Java web app (Java/Struts) > > running > > > on BEA on IE. I have the latest from CVS as of this morning. All > > unit> testspass ok. > > > > > > The slight problem I have is after $ie.link().click, if I do any > > other > > > action I get an Error: > > > > > > test > > > > > > assert($ie.link(:text, "Report").exists?) > > > $ie.link(:text, "Report").click > > > > > > assert( $ie.pageContainsText("Collection Site") ) > > > > > > gives > > > > > > 1) Error: > > > test_story_0001(TC_Story_0001): > > > NoMethodError: undefined method `innerText' for nil:NilClass > > > C:\Dev\affiliatedatacapture\src\acceptanceTests/watir.rb:378:in > > > `pageContainsText' > > > > > > > > C:/Dev/affiliatedatacapture/src/acceptanceTests/story_0006_test.rb:2 > > 9: > > > in > > > `test_story_0006' > > > > > > 1 tests, 1 assertions, 0 failures, 1 errors > > > > > > the links_test.rb does pass though, even though it does > > something very > > > > > similar. I can get these to pass if I put in a sleep(1) after > > the link > > > > > click, before the pageContains. > > > > > > The pages are being served rather than being loaded from file > > and do > > > have various images in. The pages are not that large. My guess > > is that > > > > > ruby is going quicker that IE, so gets back a nil body object? > > > > > > Is there some alternative to putting in the sleep(1)? > > > > > > IE version: 6.0.2800.1106.xpsp2_gdr.040517-1325C0 > > > > > > Thanks in advance, > > > > > > 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 chris.pollard at Roche.COM Wed Nov 24 04:26:33 2004 From: chris.pollard at Roche.COM (Pollard, Chris {PGL~Welwyn}) Date: Wed, 24 Nov 2004 09:26:33 +0000 Subject: [Wtr-general] IE after link.click timing help Message-ID: <353D6F5AD32A764F978488919DE76719023D8A54@rwemsem1.emea.roche.com> nope it does not use frames. It does build up (and flush along the way) the pages from various dynamic includes. However these are all hot and in memory, so are not slow. I will try out the new version. I have another question about the various event triggers, but I will pop that in a new mail. Chris -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of jkohl at telusplanet.net Sent: Tuesday, November 23, 2004 4:58 PM To: wtr-general at rubyforge.org Subject: RE: RE: [Wtr-general] IE after link.click timing help Does the site you are testing use frames? I've seen problems in the past with a frame page not being completely loaded. -Jonathan > Paul, > > the site is not on the internet, it is running on my local box, being > served from weblogic via http. > > I have rechecked the errors I am getting.. in the case of the > pageContains, I get the > > NoMethodError: undefined method `innerText' for nil:NilClass > > error. For other checked like link.exists? the test returns false for > pages that do contain the link. I think the underlying problem is that > ie has not completed loading the page, but the exact error depends on > the part of the watir api that is being called. > > My test is included below (it is not very useful as it is my first > example test). It does not test most of the ObjectAction types, but > hits various screens. If any of the sleep(0)'s are commented out, the > code either errors for a pageContains or the assert fails when it > should pass. > > I am using the link.click to navigate to particular pages in the app > for tests - it is a dynamic app and many of the pages are reached > through dynamic URLs/parameter lists. > > As a suggestion, you could extend the unit test suite to run up a > local web server and test pages out of that? > > Cheers > Chris > > >>> > # revision: $Revision: 1.1 $ > > $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') require > 'watir' require 'test/unit' > require 'test/unit/ui/console/testrunner' > require 'testUnitAddons' > require 'setup' > > class TC_Story_0001 < Test::Unit::TestCase > > def gotoStoryPage() > # local > #$ie.goto("file://#{$myDir}/html/forms2.html") > # web > > $ie.goto("http://localhost:7001/affiliatedatacapture/datacapture.do") > end > > def test_Form_Exists > puts "I am TC for story 001\n" > > gotoStoryPage > > assert($ie.link(:text, "Reporter").exists?) > assert_false($ie.link(:text, "missing").exists?) > > $ie.link(:text, "Reporter").click > > sleep(1) > > puts "Document: " + $ie.getDocument().body.to_s() > > assert( $ie.pageContainsText("Reporter Type") ) > > assert($ie.link(:text, "Drug").exists?) > > $ie.link(:text, "Drug").click > > sleep(1) > > assert($ie.link(:text, "Event").exists?) > > $ie.link(:text, "Event").click > > sleep(1) > > assert($ie.link(:text, "Lab Test").exists?) > > $ie.link(:text, "Lab Test").click > > sleep(1) > > assert($ie.link(:text, "Patient").exists?) > > $ie.link(:text, "Patient").click > > end > > end > > <<< > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Monday, November 22, 2004 6:48 PM > To: wtr-general at rubyforge.org > Subject: Re: RE: [Wtr-general] IE after link.click timing help > > > are you going to a sitre on the internet? > can you share the test? > > Thanks > > Paul > > > ----- Original Message ----- > From: "Pollard, Chris {PGL~Welwyn}" > Date: Monday, November 22, 2004 9:18 am > Subject: RE: [Wtr-general] IE after link.click timing help > > > Hi Paul, > > > > this timing problem occurred with all the $ie.actions I tried > > includingpageContainsText, [link|textField|...].exists? so it looks > > like a general timing issue. > > > > Hope that helps, > > > > Chris > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > > Sent: Monday, November 22, 2004 3:47 PM > > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] IE after link.click timing help > > > > > > your assumptions about what is happening is correct. > > > > I will put a begin/rescue(and maybe a retry) in the pageContainsText > > method and add a small delay to the code that waits for IE to > > complete. Thanks > > > > Paul > > > > ----- Original Message ----- > > From: "Pollard, Chris {PGL~Welwyn}" > > Date: Monday, November 22, 2004 5:52 am > > Subject: [Wtr-general] IE after link.click timing help > > > > > Hi there, > > > > > > I am real newbie ( to both watir and Ruby! ) so sorry if I have > > missed > > > something obvious. I am testing a Java web app (Java/Struts) > > running > > > on BEA on IE. I have the latest from CVS as of this morning. All > > unit> testspass ok. > > > > > > The slight problem I have is after $ie.link().click, if I do any > > other > > > action I get an Error: > > > > > > test > > > > > > assert($ie.link(:text, "Report").exists?) > > > $ie.link(:text, "Report").click > > > > > > assert( $ie.pageContainsText("Collection Site") ) > > > > > > gives > > > > > > 1) Error: > > > test_story_0001(TC_Story_0001): > > > NoMethodError: undefined method `innerText' for nil:NilClass > > > C:\Dev\affiliatedatacapture\src\acceptanceTests/watir.rb:378:in > > > `pageContainsText' > > > > > > > > C:/Dev/affiliatedatacapture/src/acceptanceTests/story_0006_test.rb:2 > > 9: > > > in > > > `test_story_0006' > > > > > > 1 tests, 1 assertions, 0 failures, 1 errors > > > > > > the links_test.rb does pass though, even though it does > > something very > > > > > similar. I can get these to pass if I put in a sleep(1) after > > the link > > > > > click, before the pageContains. > > > > > > The pages are being served rather than being loaded from file > > and do > > > have various images in. The pages are not that large. My guess > > is that > > > > > ruby is going quicker that IE, so gets back a nil body object? > > > > > > Is there some alternative to putting in the sleep(1)? > > > > > > IE version: 6.0.2800.1106.xpsp2_gdr.040517-1325C0 > > > > > > Thanks in advance, > > > > > > 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 chris.pollard at Roche.COM Wed Nov 24 04:38:26 2004 From: chris.pollard at Roche.COM (Pollard, Chris {PGL~Welwyn}) Date: Wed, 24 Nov 2004 09:38:26 +0000 Subject: [Wtr-general] @o.fireEvent for Selects Message-ID: <353D6F5AD32A764F978488919DE7671901780645@rwemsem1.emea.roche.com> Hi again, I am testing a page reload that is triggered by a SelectBox onSelect in javascrip. I tried SelectBox.select which set the correct item, but did not trigger the onSelect event. I have had a look in watir and I can see that TextFields call @o.fireEvent("onSelect") when text is set, but the SelectBox.select does not... I did have a quick tamper and dropped in the call which seemed to fix my trigger, but I am not sure if it is safe to leave it there? Is this a pending feature, or is there a specific design reason for not triggering the onSelect in for the SelectBox? I notice some other events and @o methods being called in the TextField.set.. Sorry for all the questions! And a big thanks for writing watir, it is exactly what our project was looking for, which is why I am diving into it. Thanks again in advance Chris From paul.rogers at shaw.ca Wed Nov 24 11:18:53 2004 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 24 Nov 2004 09:18:53 -0700 Subject: [Wtr-general] @o.fireEvent for Selects Message-ID: <40c4b24120de.4120de40c4b2@shaw.ca> its a pending feature ( in so much as id forgotten it! Our existing controller has it.) The only caution is to make sure to not fire the event if the item is already selected. I'll try and add it sometime today. I may have to put some logic round it too, to enable it to be turned off as in some cases what I think is right doesnt always work for everyone. Paul ----- Original Message ----- From: "Pollard, Chris {PGL~Welwyn}" Date: Wednesday, November 24, 2004 2:38 am Subject: [Wtr-general] @o.fireEvent for Selects > Hi again, > > I am testing a page reload that is triggered by a SelectBox > onSelect in > javascrip. I tried SelectBox.select which set the correct item, > but did > not trigger the onSelect event. I have had a look in watir and I > can see > that TextFields call @o.fireEvent("onSelect") when text is set, > but the > SelectBox.select does not... > I did have a quick tamper and dropped in the call which seemed to > fix my > trigger, but I am not sure if it is safe to leave it there? > > Is this a pending feature, or is there a specific design reason > for not > triggering the onSelect in for the SelectBox? I notice some other > eventsand @o methods being called in the TextField.set.. > > Sorry for all the questions! And a big thanks for writing watir, > it is > exactly what our project was looking for, which is why I am diving > intoit. > > Thanks again in advance > > Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Wed Nov 24 11:19:28 2004 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 24 Nov 2004 09:19:28 -0700 Subject: [Wtr-general] @o.fireEvent for Selects Message-ID: <40c42040b13c.40b13c40c420@shaw.ca> its a pending feature ( in so much as id forgotten it! Our existing controller has it.) The only caution is to make sure to not fire the event if the item is already selected. I'll try and add it sometime today. I may have to put some logic round it too, to enable it to be turned off as in some cases what I think is right doesnt always work for everyone. Paul ----- Original Message ----- From: "Pollard, Chris {PGL~Welwyn}" Date: Wednesday, November 24, 2004 2:38 am Subject: [Wtr-general] @o.fireEvent for Selects > Hi again, > > I am testing a page reload that is triggered by a SelectBox > onSelect in > javascrip. I tried SelectBox.select which set the correct item, > but did > not trigger the onSelect event. I have had a look in watir and I > can see > that TextFields call @o.fireEvent("onSelect") when text is set, > but the > SelectBox.select does not... > I did have a quick tamper and dropped in the call which seemed to > fix my > trigger, but I am not sure if it is safe to leave it there? > > Is this a pending feature, or is there a specific design reason > for not > triggering the onSelect in for the SelectBox? I notice some other > eventsand @o methods being called in the TextField.set.. > > Sorry for all the questions! And a big thanks for writing watir, > it is > exactly what our project was looking for, which is why I am diving > intoit. > > Thanks again in advance > > Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Wed Nov 24 11:24:49 2004 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 24 Nov 2004 09:24:49 -0700 Subject: [Wtr-general] IE after link.click timing help Message-ID: <412e63411d6b.411d6b412e63@shaw.ca> Have you tried the google samples? DO they work for you? Does your web server send part of the page ( then do a flush (in asp its response.flush - cant rememeber for jsp) ) and then send some more. That could be the problem, although Im not sure how we would work round that. Paul ----- Original Message ----- From: "Pollard, Chris {PGL~Welwyn}" Date: Wednesday, November 24, 2004 2:26 am Subject: RE: RE: [Wtr-general] IE after link.click timing help > nope it does not use frames. It does build up (and flush along the > way)the pages from various dynamic includes. However these are all > hot and > in memory, so are not slow. > > I will try out the new version. I have another question about the > various event triggers, but I will pop that in a new mail. > > Chris > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [wtr-general-bounces at rubyforge.org] On Behalf Of > jkohl at telusplanet.net > Sent: Tuesday, November 23, 2004 4:58 PM > To: wtr-general at rubyforge.org > Subject: RE: RE: [Wtr-general] IE after link.click timing help > > > Does the site you are testing use frames? I've seen problems in > the past > with a frame page not being completely loaded. > > -Jonathan > > > Paul, > > > > the site is not on the internet, it is running on my local box, > being > > served from weblogic via http. > > > > I have rechecked the errors I am getting.. in the case of the > > pageContains, I get the > > > > NoMethodError: undefined method `innerText' for nil:NilClass > > > > error. For other checked like link.exists? the test returns > false for > > pages that do contain the link. I think the underlying problem > is that > > > ie has not completed loading the page, but the exact error > depends on > > the part of the watir api that is being called. > > > > My test is included below (it is not very useful as it is my > first > > example test). It does not test most of the ObjectAction types, > but > > hits various screens. If any of the sleep(0)'s are commented > out, the > > code either errors for a pageContains or the assert fails when > it > > should pass. > > > > I am using the link.click to navigate to particular pages in the > app > > for tests - it is a dynamic app and many of the pages are > reached > > through dynamic URLs/parameter lists. > > > > As a suggestion, you could extend the unit test suite to run up > a > > local web server and test pages out of that? > > > > Cheers > > Chris > > > > >>> > > # revision: $Revision: 1.1 $ > > > > $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') > require > > 'watir' require 'test/unit' > > require 'test/unit/ui/console/testrunner' > > require 'testUnitAddons' > > require 'setup' > > > > class TC_Story_0001 < Test::Unit::TestCase > > > > def gotoStoryPage() > > # local > > #$ie.goto("file://#{$myDir}/html/forms2.html") > > # web > > > > > $ie.goto("http://localhost:7001/affiliatedatacapture/datacapture.do")> end > > > > def test_Form_Exists > > puts "I am TC for story 001\n" > > > > gotoStoryPage > > > > assert($ie.link(:text, "Reporter").exists?) > > assert_false($ie.link(:text, "missing").exists?) > > > > $ie.link(:text, "Reporter").click > > > > sleep(1) > > > > puts "Document: " + $ie.getDocument().body.to_s() > > > > assert( $ie.pageContainsText("Reporter Type") ) > > > > assert($ie.link(:text, "Drug").exists?) > > > > $ie.link(:text, "Drug").click > > > > sleep(1) > > > > assert($ie.link(:text, "Event").exists?) > > > > $ie.link(:text, "Event").click > > > > sleep(1) > > > > assert($ie.link(:text, "Lab Test").exists?) > > > > $ie.link(:text, "Lab Test").click > > > > sleep(1) > > > > assert($ie.link(:text, "Patient").exists?) > > > > $ie.link(:text, "Patient").click > > > > end > > > > end > > > > <<< > > > > > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > > Sent: Monday, November 22, 2004 6:48 PM > > To: wtr-general at rubyforge.org > > Subject: Re: RE: [Wtr-general] IE after link.click timing help > > > > > > are you going to a sitre on the internet? > > can you share the test? > > > > Thanks > > > > Paul > > > > > > ----- Original Message ----- > > From: "Pollard, Chris {PGL~Welwyn}" > > Date: Monday, November 22, 2004 9:18 am > > Subject: RE: [Wtr-general] IE after link.click timing help > > > > > Hi Paul, > > > > > > this timing problem occurred with all the $ie.actions I tried > > > includingpageContainsText, [link|textField|...].exists? so it > looks > > > like a general timing issue. > > > > > > Hope that helps, > > > > > > Chris > > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org > > > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > > > Sent: Monday, November 22, 2004 3:47 PM > > > To: wtr-general at rubyforge.org > > > Subject: Re: [Wtr-general] IE after link.click timing help > > > > > > > > > your assumptions about what is happening is correct. > > > > > > I will put a begin/rescue(and maybe a retry) in the > pageContainsText> > method and add a small delay to the code that > waits for IE to > > > complete. Thanks > > > > > > Paul > > > > > > ----- Original Message ----- > > > From: "Pollard, Chris {PGL~Welwyn}" > > > Date: Monday, November 22, 2004 5:52 am > > > Subject: [Wtr-general] IE after link.click timing help > > > > > > > Hi there, > > > > > > > > I am real newbie ( to both watir and Ruby! ) so sorry if I have > > > missed > > > > something obvious. I am testing a Java web app (Java/Struts) > > > running > > > > on BEA on IE. I have the latest from CVS as of this morning. All > > > unit> testspass ok. > > > > > > > > The slight problem I have is after $ie.link().click, if I do any > > > other > > > > action I get an Error: > > > > > > > > test > > > > > > > > assert($ie.link(:text, "Report").exists?) > > > > $ie.link(:text, "Report").click > > > > > > > > assert( $ie.pageContainsText("Collection Site") ) > > > > > > > > gives > > > > > > > > 1) Error: > > > > test_story_0001(TC_Story_0001): > > > > NoMethodError: undefined method `innerText' for nil:NilClass > > > > > C:\Dev\affiliatedatacapture\src\acceptanceTests/watir.rb:378:in> > > > `pageContainsText' > > > > > > > > > > > > C:/Dev/affiliatedatacapture/src/acceptanceTests/story_0006_test.rb:2> > 9: > > > > in > > > > `test_story_0006' > > > > > > > > 1 tests, 1 assertions, 0 failures, 1 errors > > > > > > > > the links_test.rb does pass though, even though it does > > > something very > > > > > > > similar. I can get these to pass if I put in a sleep(1) after > > > the link > > > > > > > click, before the pageContains. > > > > > > > > The pages are being served rather than being loaded from file > > > and do > > > > have various images in. The pages are not that large. My guess > > > is that > > > > > > > ruby is going quicker that IE, so gets back a nil body object? > > > > > > > > Is there some alternative to putting in the sleep(1)? > > > > > > > > IE version: 6.0.2800.1106.xpsp2_gdr.040517-1325C0 > > > > > > > > Thanks in advance, > > > > > > > > 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 > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From chris.pollard at Roche.COM Wed Nov 24 12:15:06 2004 From: chris.pollard at Roche.COM (Pollard, Chris {PGL~Welwyn}) Date: Wed, 24 Nov 2004 17:15:06 +0000 Subject: [Wtr-general] IE after link.click timing help Message-ID: <353D6F5AD32A764F978488919DE76719023D8A57@rwemsem1.emea.roche.com> Nope, I had not on my work machine.. the google samples work fine, all passes. The yahoo is below and does look a bit odd! BTW, the new defaultSleepTime = 0.1 works fine for me now. Thanks Chris >>> C:\Dev\watir\examples>ruby yahooCheckbox_test.rb Loaded suite yahooCheckbox_test Started ## Beginning of test: Yahoo search Step 1: go to the yahoo site: www.yahoo.com |E## Beginning of test: yahoo advanced search Step 1: go to the yahoo site: search.yahoo.com Action: entered http://search.yahoo.comin the address bar. Step 2: click the Edit link on the yahoo home page Action: clicked the Edit link .Step 1: click the "Save" button Action: clicked the Save button. Step 2: Check that the "Maps" link actually appears on the Yahoo Search page by using an assertion pageContainsText: Looking for: Maps (string) - found it ok .Step 1: click the Edit link on the yahoo home page Action: clicked the Edit link .Step 1: click the "Save" button Action: clicked the Save button. Step 2: Check that the "Maps" link does not appear on the Yahoo Search page by using an assertion pageContainsText: Looking for: Maps (string) - Didnt Find it . Finished in 6.266 seconds. 1) Error: test_a_simplesearch(TC_yahoo): WIN32OLERuntimeError: document OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. ../watir.rb:460:in `method_missing' ../watir.rb:460:in `waitForIE' ../watir.rb:459:in `upto' ../watir.rb:459:in `waitForIE' ../watir.rb:485:in `goto' yahooCheckbox_test.rb:48:in `test_a_simplesearch' 5 tests, 4 assertions, 0 failures, 1 errors C:\Dev\watir\examples> -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, November 24, 2004 4:25 PM To: wtr-general at rubyforge.org Subject: Re: RE: RE: [Wtr-general] IE after link.click timing help Have you tried the google samples? DO they work for you? Does your web server send part of the page ( then do a flush (in asp its response.flush - cant rememeber for jsp) ) and then send some more. That could be the problem, although Im not sure how we would work round that. Paul ----- Original Message ----- From: "Pollard, Chris {PGL~Welwyn}" Date: Wednesday, November 24, 2004 2:26 am Subject: RE: RE: [Wtr-general] IE after link.click timing help > nope it does not use frames. It does build up (and flush along the > way)the pages from various dynamic includes. However these are all > hot and > in memory, so are not slow. > > I will try out the new version. I have another question about the > various event triggers, but I will pop that in a new mail. > > Chris > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [wtr-general-bounces at rubyforge.org] On Behalf Of jkohl at telusplanet.net > Sent: Tuesday, November 23, 2004 4:58 PM > To: wtr-general at rubyforge.org > Subject: RE: RE: [Wtr-general] IE after link.click timing help > > > Does the site you are testing use frames? I've seen problems in > the past > with a frame page not being completely loaded. > > -Jonathan > > > Paul, > > > > the site is not on the internet, it is running on my local box, > being > > served from weblogic via http. > > > > I have rechecked the errors I am getting.. in the case of the > > pageContains, I get the > > > > NoMethodError: undefined method `innerText' for nil:NilClass > > > > error. For other checked like link.exists? the test returns > false for > > pages that do contain the link. I think the underlying problem > is that > > > ie has not completed loading the page, but the exact error > depends on > > the part of the watir api that is being called. > > > > My test is included below (it is not very useful as it is my > first > > example test). It does not test most of the ObjectAction types, > but > > hits various screens. If any of the sleep(0)'s are commented > out, the > > code either errors for a pageContains or the assert fails when > it > > should pass. > > > > I am using the link.click to navigate to particular pages in the > app > > for tests - it is a dynamic app and many of the pages are > reached > > through dynamic URLs/parameter lists. > > > > As a suggestion, you could extend the unit test suite to run up > a > > local web server and test pages out of that? > > > > Cheers > > Chris > > > > >>> > > # revision: $Revision: 1.1 $ > > > > $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') > require > > 'watir' require 'test/unit' > > require 'test/unit/ui/console/testrunner' > > require 'testUnitAddons' > > require 'setup' > > > > class TC_Story_0001 < Test::Unit::TestCase > > > > def gotoStoryPage() > > # local > > #$ie.goto("file://#{$myDir}/html/forms2.html") > > # web > > > > > $ie.goto("http://localhost:7001/affiliatedatacapture/datacapture.do")> end > > > > def test_Form_Exists > > puts "I am TC for story 001\n" > > > > gotoStoryPage > > > > assert($ie.link(:text, "Reporter").exists?) > > assert_false($ie.link(:text, "missing").exists?) > > > > $ie.link(:text, "Reporter").click > > > > sleep(1) > > > > puts "Document: " + $ie.getDocument().body.to_s() > > > > assert( $ie.pageContainsText("Reporter Type") ) > > > > assert($ie.link(:text, "Drug").exists?) > > > > $ie.link(:text, "Drug").click > > > > sleep(1) > > > > assert($ie.link(:text, "Event").exists?) > > > > $ie.link(:text, "Event").click > > > > sleep(1) > > > > assert($ie.link(:text, "Lab Test").exists?) > > > > $ie.link(:text, "Lab Test").click > > > > sleep(1) > > > > assert($ie.link(:text, "Patient").exists?) > > > > $ie.link(:text, "Patient").click > > > > end > > > > end > > > > <<< > > > > > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > > Sent: Monday, November 22, 2004 6:48 PM > > To: wtr-general at rubyforge.org > > Subject: Re: RE: [Wtr-general] IE after link.click timing help > > > > > > are you going to a sitre on the internet? > > can you share the test? > > > > Thanks > > > > Paul > > > > > > ----- Original Message ----- > > From: "Pollard, Chris {PGL~Welwyn}" > > Date: Monday, November 22, 2004 9:18 am > > Subject: RE: [Wtr-general] IE after link.click timing help > > > > > Hi Paul, > > > > > > this timing problem occurred with all the $ie.actions I tried > > > includingpageContainsText, [link|textField|...].exists? so it > looks > > > like a general timing issue. > > > > > > Hope that helps, > > > > > > Chris > > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org > > > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > > > Sent: Monday, November 22, 2004 3:47 PM > > > To: wtr-general at rubyforge.org > > > Subject: Re: [Wtr-general] IE after link.click timing help > > > > > > > > > your assumptions about what is happening is correct. > > > > > > I will put a begin/rescue(and maybe a retry) in the > pageContainsText> > method and add a small delay to the code that > waits for IE to > > > complete. Thanks > > > > > > Paul > > > > > > ----- Original Message ----- > > > From: "Pollard, Chris {PGL~Welwyn}" > > > Date: Monday, November 22, 2004 5:52 am > > > Subject: [Wtr-general] IE after link.click timing help > > > > > > > Hi there, > > > > > > > > I am real newbie ( to both watir and Ruby! ) so sorry if I have > > > missed > > > > something obvious. I am testing a Java web app (Java/Struts) > > > running > > > > on BEA on IE. I have the latest from CVS as of this morning. All > > > unit> testspass ok. > > > > > > > > The slight problem I have is after $ie.link().click, if I do any > > > other > > > > action I get an Error: > > > > > > > > test > > > > > > > > assert($ie.link(:text, "Report").exists?) > > > > $ie.link(:text, "Report").click > > > > > > > > assert( $ie.pageContainsText("Collection Site") ) > > > > > > > > gives > > > > > > > > 1) Error: > > > > test_story_0001(TC_Story_0001): > > > > NoMethodError: undefined method `innerText' for nil:NilClass > > > > > C:\Dev\affiliatedatacapture\src\acceptanceTests/watir.rb:378:in> > > > `pageContainsText' > > > > > > > > > > > > C:/Dev/affiliatedatacapture/src/acceptanceTests/story_0006_test.rb:2> > > 9: > > > > in > > > > `test_story_0006' > > > > > > > > 1 tests, 1 assertions, 0 failures, 1 errors > > > > > > > > the links_test.rb does pass though, even though it does > > > something very > > > > > > > similar. I can get these to pass if I put in a sleep(1) after > > > the link > > > > > > > click, before the pageContains. > > > > > > > > The pages are being served rather than being loaded from file > > > and do > > > > have various images in. The pages are not that large. My guess > > > is that > > > > > > > ruby is going quicker that IE, so gets back a nil body object? > > > > > > > > Is there some alternative to putting in the sleep(1)? > > > > > > > > IE version: 6.0.2800.1106.xpsp2_gdr.040517-1325C0 > > > > > > > > Thanks in advance, > > > > > > > > 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 > > _______________________________________________ > 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 Nov 24 12:50:22 2004 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 24 Nov 2004 10:50:22 -0700 Subject: [Wtr-general] IE after link.click timing help Message-ID: <4377b943750d.43750d4377b9@shaw.ca> yahoo fails for me too, but with a different error... I'll look into it later today Paul ----- Original Message ----- From: "Pollard, Chris {PGL~Welwyn}" Date: Wednesday, November 24, 2004 10:15 am Subject: RE: RE: RE: [Wtr-general] IE after link.click timing help > Nope, I had not on my work machine.. > > the google samples work fine, all passes. The yahoo is below and does > look a bit odd! BTW, the new defaultSleepTime = 0.1 works fine for me > now. > > Thanks > > Chris > > >>> > > C:\Dev\watir\examples>ruby yahooCheckbox_test.rb > Loaded suite yahooCheckbox_test > Started > ## Beginning of test: Yahoo search > > Step 1: go to the yahoo site: www.yahoo.com > |E## Beginning of test: yahoo advanced search > > Step 1: go to the yahoo site: search.yahoo.com > Action: entered http://search.yahoo.comin the address bar. > Step 2: click the Edit link on the yahoo home page > Action: clicked the Edit link > .Step 1: click the "Save" button > Action: clicked the Save button. > Step 2: Check that the "Maps" link actually appears on the Yahoo > Searchpage by using an assertion > pageContainsText: Looking for: Maps (string) - found it ok > .Step 1: click the Edit link on the yahoo home page > Action: clicked the Edit link > .Step 1: click the "Save" button > Action: clicked the Save button. > Step 2: Check that the "Maps" link does not appear on the Yahoo Search > page by using an assertion > pageContainsText: Looking for: Maps (string) - Didnt Find it > . > Finished in 6.266 seconds. > > 1) Error: > test_a_simplesearch(TC_yahoo): > WIN32OLERuntimeError: document > OLE error code:80070005 in > Access is denied. > > HRESULT error code:0x80020009 > Exception occurred. > ../watir.rb:460:in `method_missing' > ../watir.rb:460:in `waitForIE' > ../watir.rb:459:in `upto' > ../watir.rb:459:in `waitForIE' > ../watir.rb:485:in `goto' > yahooCheckbox_test.rb:48:in `test_a_simplesearch' > > 5 tests, 4 assertions, 0 failures, 1 errors > > C:\Dev\watir\examples> > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Wednesday, November 24, 2004 4:25 PM > To: wtr-general at rubyforge.org > Subject: Re: RE: RE: [Wtr-general] IE after link.click timing help > > > > Have you tried the google samples? DO they work for you? > > > Does your web server send part of the page ( then do a flush (in asp > its response.flush - cant rememeber for jsp) ) and then send some > more.That could be the problem, although Im not sure how we would > work round > that. > > Paul > > ----- Original Message ----- > From: "Pollard, Chris {PGL~Welwyn}" > Date: Wednesday, November 24, 2004 2:26 am > Subject: RE: RE: [Wtr-general] IE after link.click timing help > > > nope it does not use frames. It does build up (and flush along the > > way)the pages from various dynamic includes. However these are > all > > hot and > > in memory, so are not slow. > > > > I will try out the new version. I have another question about > the > > various event triggers, but I will pop that in a new mail. > > > > Chris > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [wtr-general-bounces at rubyforge.org] On Behalf Of > jkohl at telusplanet.net> Sent: Tuesday, November 23, 2004 4:58 PM > > To: wtr-general at rubyforge.org > > Subject: RE: RE: [Wtr-general] IE after link.click timing help > > > > > > Does the site you are testing use frames? I've seen problems in > > the past > > with a frame page not being completely loaded. > > > > -Jonathan > > > > > Paul, > > > > > > the site is not on the internet, it is running on my local box, > > being > > > served from weblogic via http. > > > > > > I have rechecked the errors I am getting.. in the case of the > > > pageContains, I get the > > > > > > NoMethodError: undefined method `innerText' for nil:NilClass > > > > > > error. For other checked like link.exists? the test returns > > false for > > > pages that do contain the link. I think the underlying problem > > is that > > > > > ie has not completed loading the page, but the exact error > > depends on > > > the part of the watir api that is being called. > > > > > > My test is included below (it is not very useful as it is my > > first > > > example test). It does not test most of the ObjectAction types, > > but > > > hits various screens. If any of the sleep(0)'s are commented > > out, the > > > code either errors for a pageContains or the assert fails when > > it > > > should pass. > > > > > > I am using the link.click to navigate to particular pages in the > > app > > > for tests - it is a dynamic app and many of the pages are > > reached > > > through dynamic URLs/parameter lists. > > > > > > As a suggestion, you could extend the unit test suite to run up > > a > > > local web server and test pages out of that? > > > > > > Cheers > > > Chris > > > > > > >>> > > > # revision: $Revision: 1.1 $ > > > > > > $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') > > require > > > 'watir' require 'test/unit' > > > require 'test/unit/ui/console/testrunner' > > > require 'testUnitAddons' > > > require 'setup' > > > > > > class TC_Story_0001 < Test::Unit::TestCase > > > > > > def gotoStoryPage() > > > # local > > > #$ie.goto("file://#{$myDir}/html/forms2.html") > > > # web > > > > > > > > > $ie.goto("http://localhost:7001/affiliatedatacapture/datacapture.do")>end > > > > > > def test_Form_Exists > > > puts "I am TC for story 001\n" > > > > > > gotoStoryPage > > > > > > assert($ie.link(:text, "Reporter").exists?) > > > assert_false($ie.link(:text, "missing").exists?) > > > > > > $ie.link(:text, "Reporter").click > > > > > > sleep(1) > > > > > > puts "Document: " + $ie.getDocument().body.to_s() > > > > > > assert( $ie.pageContainsText("Reporter Type") ) > > > > > > assert($ie.link(:text, "Drug").exists?) > > > > > > $ie.link(:text, "Drug").click > > > > > > sleep(1) > > > > > > assert($ie.link(:text, "Event").exists?) > > > > > > $ie.link(:text, "Event").click > > > > > > sleep(1) > > > > > > assert($ie.link(:text, "Lab Test").exists?) > > > > > > $ie.link(:text, "Lab Test").click > > > > > > sleep(1) > > > > > > assert($ie.link(:text, "Patient").exists?) > > > > > > $ie.link(:text, "Patient").click > > > > > > end > > > > > > end > > > > > > <<< > > > > > > > > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org > > > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > > > Sent: Monday, November 22, 2004 6:48 PM > > > To: wtr-general at rubyforge.org > > > Subject: Re: RE: [Wtr-general] IE after link.click timing help > > > > > > > > > are you going to a sitre on the internet? > > > can you share the test? > > > > > > Thanks > > > > > > Paul > > > > > > > > > ----- Original Message ----- > > > From: "Pollard, Chris {PGL~Welwyn}" > > > Date: Monday, November 22, 2004 9:18 am > > > Subject: RE: [Wtr-general] IE after link.click timing help > > > > > > > Hi Paul, > > > > > > > > this timing problem occurred with all the $ie.actions I tried > > > > includingpageContainsText, [link|textField|...].exists? so > it > > looks > > > > like a general timing issue. > > > > > > > > Hope that helps, > > > > > > > > Chris > > > > > > > > -----Original Message----- > > > > From: wtr-general-bounces at rubyforge.org > > > > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > > > > Sent: Monday, November 22, 2004 3:47 PM > > > > To: wtr-general at rubyforge.org > > > > Subject: Re: [Wtr-general] IE after link.click timing help > > > > > > > > > > > > your assumptions about what is happening is correct. > > > > > > > > I will put a begin/rescue(and maybe a retry) in the > > pageContainsText> > method and add a small delay to the code that > > waits for IE to > > > > complete. Thanks > > > > > > > > Paul > > > > > > > > ----- Original Message ----- > > > > From: "Pollard, Chris {PGL~Welwyn}" > > > > Date: Monday, November 22, 2004 5:52 am > > > > Subject: [Wtr-general] IE after link.click timing help > > > > > > > > > Hi there, > > > > > > > > > > I am real newbie ( to both watir and Ruby! ) so sorry if I > have> > > missed > > > > > something obvious. I am testing a Java web app (Java/Struts) > > > > running > > > > > on BEA on IE. I have the latest from CVS as of this > morning. All > > > > unit> testspass ok. > > > > > > > > > > The slight problem I have is after $ie.link().click, if I > do any > > > > other > > > > > action I get an Error: > > > > > > > > > > test > > > > > > > > > > assert($ie.link(:text, "Report").exists?) > > > > > $ie.link(:text, "Report").click > > > > > > > > > > assert( $ie.pageContainsText("Collection Site") ) > > > > > > > > > > gives > > > > > > > > > > 1) Error: > > > > > test_story_0001(TC_Story_0001): > > > > > NoMethodError: undefined method `innerText' for nil:NilClass > > > > > > > C:\Dev\affiliatedatacapture\src\acceptanceTests/watir.rb:378:in> > > > > `pageContainsText' > > > > > > > > > > > > > > > > > C:/Dev/affiliatedatacapture/src/acceptanceTests/story_0006_test.rb:2> > > > 9: > > > > > in > > > > > `test_story_0006' > > > > > > > > > > 1 tests, 1 assertions, 0 failures, 1 errors > > > > > > > > > > the links_test.rb does pass though, even though it does > > > > something very > > > > > > > > > similar. I can get these to pass if I put in a sleep(1) after > > > > the link > > > > > > > > > click, before the pageContains. > > > > > > > > > > The pages are being served rather than being loaded from file > > > > and do > > > > > have various images in. The pages are not that large. My guess > > > > is that > > > > > > > > > ruby is going quicker that IE, so gets back a nil body object? > > > > > > > > > > Is there some alternative to putting in the sleep(1)? > > > > > > > > > > IE version: 6.0.2800.1106.xpsp2_gdr.040517-1325C0 > > > > > > > > > > Thanks in advance, > > > > > > > > > > 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 > > > > _______________________________________________ > > 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 jkohl at telusplanet.net Wed Nov 24 13:01:31 2004 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Wed, 24 Nov 2004 10:01:31 -0800 Subject: [Wtr-general] IE after link.click timing help In-Reply-To: <4377b943750d.43750d4377b9@shaw.ca> References: <4377b943750d.43750d4377b9@shaw.ca> Message-ID: <1101319291.41a4cc7bef198@webmail.telus.net> Quoting Paul Rogers : > > yahoo fails for me too, but with a different error... developer response #421: "works on my machine!" :-) However I haven't tried it with the most recent Watir version. I only have one from Nov. 11 on this box. > I'll look into it later today I just checked in a version of the yahoo example that has a bit more consistent logging so all the "Step" statements will have some context. I'll try it later with a more recent watir version. -Jonathan > ----- Original Message ----- > From: "Pollard, Chris {PGL~Welwyn}" > Date: Wednesday, November 24, 2004 10:15 am > Subject: RE: RE: RE: [Wtr-general] IE after link.click timing help > > > Nope, I had not on my work machine.. > > > > the google samples work fine, all passes. The yahoo is below and does > > look a bit odd! BTW, the new defaultSleepTime = 0.1 works fine for me > > now. > > > > Thanks > > > > Chris > > > > >>> > > > > C:\Dev\watir\examples>ruby yahooCheckbox_test.rb > > Loaded suite yahooCheckbox_test > > Started > > ## Beginning of test: Yahoo search > > > > Step 1: go to the yahoo site: www.yahoo.com > > |E## Beginning of test: yahoo advanced search > > > > Step 1: go to the yahoo site: search.yahoo.com > > Action: entered http://search.yahoo.comin the address bar. > > Step 2: click the Edit link on the yahoo home page > > Action: clicked the Edit link > > .Step 1: click the "Save" button > > Action: clicked the Save button. > > Step 2: Check that the "Maps" link actually appears on the Yahoo > > Searchpage by using an assertion > > pageContainsText: Looking for: Maps (string) - found it ok > > .Step 1: click the Edit link on the yahoo home page > > Action: clicked the Edit link > > .Step 1: click the "Save" button > > Action: clicked the Save button. > > Step 2: Check that the "Maps" link does not appear on the Yahoo Search > > page by using an assertion > > pageContainsText: Looking for: Maps (string) - Didnt Find it > > . > > Finished in 6.266 seconds. > > > > 1) Error: > > test_a_simplesearch(TC_yahoo): > > WIN32OLERuntimeError: document > > OLE error code:80070005 in > > Access is denied. > > > > HRESULT error code:0x80020009 > > Exception occurred. > > ../watir.rb:460:in `method_missing' > > ../watir.rb:460:in `waitForIE' > > ../watir.rb:459:in `upto' > > ../watir.rb:459:in `waitForIE' > > ../watir.rb:485:in `goto' > > yahooCheckbox_test.rb:48:in `test_a_simplesearch' > > > > 5 tests, 4 assertions, 0 failures, 1 errors > > > > C:\Dev\watir\examples> > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > > Sent: Wednesday, November 24, 2004 4:25 PM > > To: wtr-general at rubyforge.org > > Subject: Re: RE: RE: [Wtr-general] IE after link.click timing help > > > > > > > > Have you tried the google samples? DO they work for you? > > > > > > Does your web server send part of the page ( then do a flush (in asp > > its response.flush - cant rememeber for jsp) ) and then send some > > more.That could be the problem, although Im not sure how we would > > work round > > that. > > > > Paul > > > > ----- Original Message ----- > > From: "Pollard, Chris {PGL~Welwyn}" > > Date: Wednesday, November 24, 2004 2:26 am > > Subject: RE: RE: [Wtr-general] IE after link.click timing help > > > > > nope it does not use frames. It does build up (and flush along the > > > way)the pages from various dynamic includes. However these are > > all > > > hot and > > > in memory, so are not slow. > > > > > > I will try out the new version. I have another question about > > the > > > various event triggers, but I will pop that in a new mail. > > > > > > Chris > > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org > > > [wtr-general-bounces at rubyforge.org] On Behalf Of > > jkohl at telusplanet.net> Sent: Tuesday, November 23, 2004 4:58 PM > > > To: wtr-general at rubyforge.org > > > Subject: RE: RE: [Wtr-general] IE after link.click timing help > > > > > > > > > Does the site you are testing use frames? I've seen problems in > > > the past > > > with a frame page not being completely loaded. > > > > > > -Jonathan > > > > > > > Paul, > > > > > > > > the site is not on the internet, it is running on my local box, > > > being > > > > served from weblogic via http. > > > > > > > > I have rechecked the errors I am getting.. in the case of the > > > > pageContains, I get the > > > > > > > > NoMethodError: undefined method `innerText' for nil:NilClass > > > > > > > > error. For other checked like link.exists? the test returns > > > false for > > > > pages that do contain the link. I think the underlying problem > > > is that > > > > > > > ie has not completed loading the page, but the exact error > > > depends on > > > > the part of the watir api that is being called. > > > > > > > > My test is included below (it is not very useful as it is my > > > first > > > > example test). It does not test most of the ObjectAction types, > > > but > > > > hits various screens. If any of the sleep(0)'s are commented > > > out, the > > > > code either errors for a pageContains or the assert fails when > > > it > > > > should pass. > > > > > > > > I am using the link.click to navigate to particular pages in the > > > app > > > > for tests - it is a dynamic app and many of the pages are > > > reached > > > > through dynamic URLs/parameter lists. > > > > > > > > As a suggestion, you could extend the unit test suite to run up > > > a > > > > local web server and test pages out of that? > > > > > > > > Cheers > > > > Chris > > > > > > > > >>> > > > > # revision: $Revision: 1.1 $ > > > > > > > > $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') > > > require > > > > 'watir' require 'test/unit' > > > > require 'test/unit/ui/console/testrunner' > > > > require 'testUnitAddons' > > > > require 'setup' > > > > > > > > class TC_Story_0001 < Test::Unit::TestCase > > > > > > > > def gotoStoryPage() > > > > # local > > > > #$ie.goto("file://#{$myDir}/html/forms2.html") > > > > # web > > > > > > > > > > > > > $ie.goto("http://localhost:7001/affiliatedatacapture/datacapture.do")>end > > > > > > > > def test_Form_Exists > > > > puts "I am TC for story 001\n" > > > > > > > > gotoStoryPage > > > > > > > > assert($ie.link(:text, "Reporter").exists?) > > > > assert_false($ie.link(:text, "missing").exists?) > > > > > > > > $ie.link(:text, "Reporter").click > > > > > > > > sleep(1) > > > > > > > > puts "Document: " + $ie.getDocument().body.to_s() > > > > > > > > assert( $ie.pageContainsText("Reporter Type") ) > > > > > > > > assert($ie.link(:text, "Drug").exists?) > > > > > > > > $ie.link(:text, "Drug").click > > > > > > > > sleep(1) > > > > > > > > assert($ie.link(:text, "Event").exists?) > > > > > > > > $ie.link(:text, "Event").click > > > > > > > > sleep(1) > > > > > > > > assert($ie.link(:text, "Lab Test").exists?) > > > > > > > > $ie.link(:text, "Lab Test").click > > > > > > > > sleep(1) > > > > > > > > assert($ie.link(:text, "Patient").exists?) > > > > > > > > $ie.link(:text, "Patient").click > > > > > > > > end > > > > > > > > end > > > > > > > > <<< > > > > > > > > > > > > > > > > -----Original Message----- > > > > From: wtr-general-bounces at rubyforge.org > > > > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > > > > Sent: Monday, November 22, 2004 6:48 PM > > > > To: wtr-general at rubyforge.org > > > > Subject: Re: RE: [Wtr-general] IE after link.click timing help > > > > > > > > > > > > are you going to a sitre on the internet? > > > > can you share the test? > > > > > > > > Thanks > > > > > > > > Paul > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Pollard, Chris {PGL~Welwyn}" > > > > Date: Monday, November 22, 2004 9:18 am > > > > Subject: RE: [Wtr-general] IE after link.click timing help > > > > > > > > > Hi Paul, > > > > > > > > > > this timing problem occurred with all the $ie.actions I tried > > > > > includingpageContainsText, [link|textField|...].exists? so > > it > > > looks > > > > > like a general timing issue. > > > > > > > > > > Hope that helps, > > > > > > > > > > Chris > > > > > > > > > > -----Original Message----- > > > > > From: wtr-general-bounces at rubyforge.org > > > > > [wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > > > > > Sent: Monday, November 22, 2004 3:47 PM > > > > > To: wtr-general at rubyforge.org > > > > > Subject: Re: [Wtr-general] IE after link.click timing help > > > > > > > > > > > > > > > your assumptions about what is happening is correct. > > > > > > > > > > I will put a begin/rescue(and maybe a retry) in the > > > pageContainsText> > method and add a small delay to the code that > > > waits for IE to > > > > > complete. Thanks > > > > > > > > > > Paul > > > > > > > > > > ----- Original Message ----- > > > > > From: "Pollard, Chris {PGL~Welwyn}" > > > > > Date: Monday, November 22, 2004 5:52 am > > > > > Subject: [Wtr-general] IE after link.click timing help > > > > > > > > > > > Hi there, > > > > > > > > > > > > I am real newbie ( to both watir and Ruby! ) so sorry if I > > have> > > missed > > > > > > something obvious. I am testing a Java web app (Java/Struts) > > > > > running > > > > > > on BEA on IE. I have the latest from CVS as of this > > morning. All > > > > > unit> testspass ok. > > > > > > > > > > > > The slight problem I have is after $ie.link().click, if I > > do any > > > > > other > > > > > > action I get an Error: > > > > > > > > > > > > test > > > > > > > > > > > > assert($ie.link(:text, "Report").exists?) > > > > > > $ie.link(:text, "Report").click > > > > > > > > > > > > assert( $ie.pageContainsText("Collection Site") ) > > > > > > > > > > > > gives > > > > > > > > > > > > 1) Error: > > > > > > test_story_0001(TC_Story_0001): > > > > > > NoMethodError: undefined method `innerText' for nil:NilClass > > > > > > > > > C:\Dev\affiliatedatacapture\src\acceptanceTests/watir.rb:378:in> > > > > > `pageContainsText' > > > > > > > > > > > > > > > > > > > > > > C:/Dev/affiliatedatacapture/src/acceptanceTests/story_0006_test.rb:2> > > > > 9: > > > > > > in > > > > > > `test_story_0006' > > > > > > > > > > > > 1 tests, 1 assertions, 0 failures, 1 errors > > > > > > > > > > > > the links_test.rb does pass though, even though it does > > > > > something very > > > > > > > > > > > similar. I can get these to pass if I put in a sleep(1) after > > > > > the link > > > > > > > > > > > click, before the pageContains. > > > > > > > > > > > > The pages are being served rather than being loaded from file > > > > > and do > > > > > > have various images in. The pages are not that large. My guess > > > > > is that > > > > > > > > > > > ruby is going quicker that IE, so gets back a nil body object? > > > > > > > > > > > > Is there some alternative to putting in the sleep(1)? > > > > > > > > > > > > IE version: 6.0.2800.1106.xpsp2_gdr.040517-1325C0 > > > > > > > > > > > > Thanks in advance, > > > > > > > > > > > > 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 > > > > > > _______________________________________________ > > > 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 Wed Nov 24 14:25:01 2004 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 24 Nov 2004 12:25:01 -0700 Subject: [Wtr-general] @o.fireEvent for Selects Message-ID: <4658e345f8c6.45f8c64658e3@shaw.ca> now its added with some new unit tests Paul ----- Original Message ----- From: Paul Rogers Date: Wednesday, November 24, 2004 9:19 am Subject: Re: [Wtr-general] @o.fireEvent for Selects > > its a pending feature ( in so much as id forgotten it! Our > existing controller has it.) The only caution is to make sure to > not fire the event if the item is already selected. I'll try and > add it sometime today. I may have to put some logic round it too, > to enable it to be turned off as in some cases what I think is > right doesnt always work for everyone. > > Paul > > > > ----- Original Message ----- > From: "Pollard, Chris {PGL~Welwyn}" > Date: Wednesday, November 24, 2004 2:38 am > Subject: [Wtr-general] @o.fireEvent for Selects > > > Hi again, > > > > I am testing a page reload that is triggered by a SelectBox > > onSelect in > > javascrip. I tried SelectBox.select which set the correct item, > > but did > > not trigger the onSelect event. I have had a look in watir and I > > can see > > that TextFields call @o.fireEvent("onSelect") when text is set, > > but the > > SelectBox.select does not... > > I did have a quick tamper and dropped in the call which seemed > to > > fix my > > trigger, but I am not sure if it is safe to leave it there? > > > > Is this a pending feature, or is there a specific design reason > > for not > > triggering the onSelect in for the SelectBox? I notice some > other > > eventsand @o methods being called in the TextField.set.. > > > > Sorry for all the questions! And a big thanks for writing watir, > > it is > > exactly what our project was looking for, which is why I am > diving > > intoit. > > > > Thanks again in advance > > > > 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 chris.mcmahon at verint.com Wed Nov 24 17:08:24 2004 From: chris.mcmahon at verint.com (McMahon, Chris) Date: Wed, 24 Nov 2004 15:08:24 -0700 Subject: [Wtr-general] HTML to generate new instance/window of IE. Message-ID: Me and Paul said: > "..Let me know if there's anything I can do to help out with that..." > > Do you want to write the html and maybe a test case? Sorry, work's been busy, and I had to do a little research... Put the following in a file and open it with IE. click me Click on "click me", the resulting new IE instance/window has title text "Cannot find server..." and contains text "The page cannot be displayed". That might be enough to go on-- now to see if I can figure out how to write the test in Ruby...=) -Chris From jbarrett at finaplex.com Fri Nov 26 16:49:16 2004 From: jbarrett at finaplex.com (Jeff Barrett) Date: Fri, 26 Nov 2004 13:49:16 -0800 Subject: [Wtr-general] selectbox_test.rb has an error for me Message-ID: WinXP SP2 w/ "Allow active content to run in files on My Computer" checked. ... Option 3 is already selected pageContainsText: Looking for: Pass (string) - Didnt Find it Setting box sel3 to (?-mix:2) Regexp Option 2 is being selected . Finished in 6.624 seconds. 1) Error: test_selectBox_select(TC_Selectbox): WIN32OLERuntimeError: Unknown property or method : `text' HRESULT error code:0x80070005 Access is denied. ./../watir.rb:1212:in `method_missing' ./../watir.rb:1212:in `select' ./../watir.rb:1211:in `each' ./../watir.rb:1211:in `select' ./../watir.rb:1205:in `each' ./../watir.rb:1205:in `select' selectbox_test.rb:102:in `test_selectBox_select' 6 tests, 20 assertions, 0 failures, 1 errors From jbarrett at finaplex.com Fri Nov 26 19:51:50 2004 From: jbarrett at finaplex.com (Jeff Barrett) Date: Fri, 26 Nov 2004 16:51:50 -0800 Subject: [Wtr-general] image links Message-ID: Is there support for this? Next to the image link in buttons1.html there is text that says, "This button is an image. It should behave the same as a submit", but I can't seem get back a true from "$ie.button(anything here I can think of).exists?". e.g. adding "assert($ie.button(:name, "sub3").exists?)", into TC_Buttons.test_Button_Exists() should work, right? From paul.rogers at shaw.ca Fri Nov 26 21:33:24 2004 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 26 Nov 2004 19:33:24 -0700 Subject: [Wtr-general] selectbox_test.rb has an error for me In-Reply-To: Message-ID: <000901c4d429$77e23e80$6400a8c0@NewDell> Does that for me to on xp. Was ok on w2k when I checked it in. thanks for letting me know. I'll also lokk into the image/button problem too Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Barrett Sent: 26 November 2004 14:49 To: wtr-general at rubyforge.org Subject: [Wtr-general] selectbox_test.rb has an error for me WinXP SP2 w/ "Allow active content to run in files on My Computer" checked. ... Option 3 is already selected pageContainsText: Looking for: Pass (string) - Didnt Find it Setting box sel3 to (?-mix:2) Regexp Option 2 is being selected . Finished in 6.624 seconds. 1) Error: test_selectBox_select(TC_Selectbox): WIN32OLERuntimeError: Unknown property or method : `text' HRESULT error code:0x80070005 Access is denied. ./../watir.rb:1212:in `method_missing' ./../watir.rb:1212:in `select' ./../watir.rb:1211:in `each' ./../watir.rb:1211:in `select' ./../watir.rb:1205:in `each' ./../watir.rb:1205:in `select' selectbox_test.rb:102:in `test_selectBox_select' 6 tests, 20 assertions, 0 failures, 1 errors _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Fri Nov 26 22:57:17 2004 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 26 Nov 2004 20:57:17 -0700 Subject: [Wtr-general] image links In-Reply-To: Message-ID: <000c01c4d435$30049b60$6400a8c0@NewDell> Are you trying to click an image ( that's a link) or an image that's a submit? An image as a link seems to work, but you may have to do some stuff that's not intuitive to do it: Ie.link(:url , 'pass.html').click # this seems to work - it does a conversion to a reg exp, which may not be correct ?? I found the bug in selectboxes and checked it in, along with some new methods - shomImages etc Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Barrett Sent: 26 November 2004 17:52 To: wtr-general at rubyforge.org Subject: [Wtr-general] image links Is there support for this? Next to the image link in buttons1.html there is text that says, "This button is an image. It should behave the same as a submit", but I can't seem get back a true from "$ie.button(anything here I can think of).exists?". e.g. adding "assert($ie.button(:name, "sub3").exists?)", into TC_Buttons.test_Button_Exists() should work, right? _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Mon Nov 29 13:01:19 2004 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 29 Nov 2004 12:01:19 -0600 Subject: [Wtr-general] AWTA6 Call for Participation, Jan 7-9, Open-Source Web Test Tools Message-ID: <5.1.0.14.2.20041129120114.02df1c28@127.0.0.1> This announcement will be posted at http://www.pettichord.com/awta6.html shortly. Sixth Annual Austin Workshop on Test Automation January 7 - 9, 2005 - Austin, Texas Open-Source Web Test Tools Call for Participation Join us as we review and contribute to open-source tools for the functional testing of web-based applications. Help us understand the strengths and weaknesses of existing open-source tools and work with us to improve them, and make them easier to understand and adopt. The workshop will consist of presentations, discussions and actually sitting down and writing code, documentation, and examples. We seek participation from developers of open-source test tools, testers with experience using them, and people who want to learn more about how they can contribute to open-source efforts. Workshop Goals - Survey existing web testing tools. - Make connections between developers on different projects. - Improve existing tools. - Develop tutorial materials. - Publish comparative analysis. Expenses We ask participants to pay a workshop fee of $100 to cover the cost of facilities and refreshments; $50 for students and the unemployed. We won't accept any fees from any participants travelling from overseas. Participants are also responsible for their travel and lodging. Contributions We expect all participants to the contribute to the workshop in one way or another. Past AWTA workshops focussed on presentations with active engagement with the audience. We'll continue to do some of this. But we also will be planning time to allow people to actually plan and make contributions to open-source projects. As the workshop approaches we will be planning specific projects to focus on based on participant interest. Attending the Workshop Participation in this workshop is by invitation based on a letter of introduction. There will be a limit of 25 participants. We seek participants from a variety of backgrounds, including those who: - Have experience with test tools, including both commercial and open-source tools. - Have experience contributing to open-source projects. - Have experience with agile development methods. - Have original perspectives that will be valuable to the group. All participants will be asked to contribute to workshop projects that we intend to make available through open-source licenses. They will also be expected to pay the workshop fee. If you are interested in attending, please send us a letter of introduction. It should have two parts: 1. Background. Describe your background and experience related to the workshop topic. 2. Contribution. Describe how you would like to contribute to the workshop. Do you have a presentation you'd like to make or a project you'd like to work on? Send your letters to Bret Pettichord (bret at pettichord.com), Elisabeth Hendrickson (esh at qualitytree.com) and Cem Kaner (kaner at kaner.com). We will be reviewing letters on a rolling basis. You should expect to hear from us within a few days of submission. Upon acceptance, your letter will be shared with other workshop attendees. Participants are expected to attend the entire workshop, unless other arrangements have been made with the organizers. Location The workshop will be held at the Norris Conference Center, featuring ergonomic office chairs and internet access. (http://www.norriscenters.com/austin.tmpl.htm) Participants may choose to stay at the Summerfield Suites, adjacent to the Norris Conference Center. (http://austin.wyndham-hotels.com/) Time Frame The formal program will be during the following times. Friday 7 December, 8:30 am to 5:00 pm Saturday 8 December, 8:30 am to 5:00 pm Sunday 9 December, 8:30 am to 12:00 noon All participants are expected to attend during these times. An optional dinner will be held Thursday evening, which will be open to family and guests. Details on the location of this dinner will be made available at a later date. The workshop facilities will be available Sunday afternoon; we expect that some participants will stay for smaller group sessions. Organizers Bret Pettichord is a lead contributor to the WATIR (http://www.clabs.org/wtr/) and Selenium (http://selenium.thoughtworks.com) open-source web test tools. He teaches the Scripting Web Tests class(http://www.pettichord.com/scripting_for_testers.html), based on these tools. All of these class materials are also open-source. He is co-author of Lessons Learned in Software Testing (www.testinglessons.com), and director of testing practice at ThoughtWorks (www.thoughtworks.com). His website is www.pettichord.com. Elisabeth Hendrickson has published an open-source tool for testing .Net GUI's (http://qualitytree.com/autotest/dotnetgui.htm). She is an indepent consultant specializing in software testing and test automation. Her website is www.qualitytree.com. Cem Kaner is Professor of Computer Science at Florida Tech. He also directs the Center for Software Testing Education and Research which creates, collects and distributes open-source materials for teaching software testing (www.testingeducation.com). He is lead author of Testing Computer Software, Lessons Learned in Software Testing, and Bad Software. His website is www.kaner.com. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Mon Nov 29 14:05:47 2004 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 29 Nov 2004 13:05:47 -0600 Subject: [Wtr-general] AWTA Date Clarification Message-ID: <5.1.0.14.2.20041129130543.02d33c40@127.0.0.1> The formal program will be during the following dates. Friday 7 January, 8:30 am to 5:00 pm Saturday 8 January, 8:30 am to 5:00 pm Sunday 9 January, 8:30 am to 12:00 noon See http://www.pettichord.com/awta6.html for complete details _____________________ Bret Pettichord www.pettichord.com