From bret at pettichord.com Wed Apr 5 23:10:33 2006 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 5 Apr 2006 22:10:33 -0500 Subject: [Wtr-core] Watir Exception clarity: UnknownObjectException In-Reply-To: <019701c65302$23adcab0$6602a8c0@telperion> References: <4429FA0B.7040303@it.fts-vn.com> <019701c65302$23adcab0$6602a8c0@telperion> Message-ID: Dave, Thanks for looking into this and making your suggestion. I completely agree that the error message is less than it should be. Frankly, the error messages in Watir need more work. When i've taught classes, i've often noticed that students find the error messages to be confusing. But i've just never really taken the time to make the error messages more specific. It definitely needs to be done. I'd rather make some progress with that before adding do-what-I-mean logic. It seems to me that it is easy to dig yourself in a hole doing that. You should note that in 1.5 the "attribute" is actually a method call on the object. So there is probably an even greater need for clear error messages as well as care. There are 137 methods defined for Watir::TextField, any of which will be called if specified. Bret On 3/29/06, Dave Burt wrote: > > Hi, > > Back on ruby-talk, Kev was confused when he did something like the > following: > > text_field("id", "foo") > > I've excerpted from his message post-script, but the essence is that the > message > was the same as if there was simply no "foo" on the page, and that the how > parameter was a string was not visible in the error message. > > getObject() should accept strings as well as symbols for the parameter; in > fact, > anything with a to_sym method. It should attempt an explicit cast to > Symbol > using to_sym, and raise a TypeError on failure. You can do this simply by > adding > this before how is used: > > how = how.to_sym \ > rescue raise TypeError.new("cannot convert #{how.inspect} to Symbol") > > Cheers, > Dave > > ----- Original Message ----- > From: "Kev Jackson" > Newsgroups: comp.lang.ruby > Sent: Wednesday, March 29, 2006 2:05 PM > Subject: Can anyone see the obvious msitake I've made? > > .... > > > testScenario(NewApplicationTest): > > Watir::Exception::UnknownObjectException: Unable to locate object, using > id > > and > > form:address1 > > > > ... the error produced from watir is exactly the same as if I'd have > typed: > > > > $ie.text_field(:id, 'a_field_that_doesn't_exist') > > ... > > _______________________________________________ > Wtr-core mailing list > Wtr-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-core/attachments/20060405/81b2ff39/attachment.htm From dave at burt.id.au Fri Apr 7 03:56:01 2006 From: dave at burt.id.au (Dave Burt) Date: Fri, 07 Apr 2006 17:56:01 +1000 Subject: [Wtr-core] Watir Exception clarity: UnknownObjectException In-Reply-To: References: <4429FA0B.7040303@it.fts-vn.com> <019701c65302$23adcab0$6602a8c0@telperion> Message-ID: <44361B11.1020709@burt.id.au> Bret Pettichord wrote: > I completely agree that the error message is less than it should be. > Frankly, the error messages in Watir need more work. When i've taught > classes, i've often noticed that students find the error messages to be > confusing. But i've just never really taken the time to make the error > messages more specific. It definitely needs to be done. Is this something someone like me, who isn't very familiar with Watir internals, could do (against HEAD)? > I'd rather make some progress with that before adding do-what-I-mean > logic. It seems to me that it is easy to dig yourself in a hole doing that. If you're saying text_field("id", "foo") should barf, I disagree, but I do agree that fixing the exceptions is more important. > You should note that in 1.5 the "attribute" is actually a method call on > the object. So there is probably an even greater need for clear error > messages as well as care. There are 137 methods defined for > Watir::TextField, any of which will be called if specified. I suppose I need to look at 1.5 before I can comment further. Thanks for your thinking about this. Cheers, Dave From christopher.mcmahon at gmail.com Tue Apr 18 20:20:16 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 18 Apr 2006 17:20:16 -0700 Subject: [Wtr-core] link for you Message-ID: <72799cd70604181720ob93a942s8e77153df0381c99@mail.gmail.com> too dangerous for the regular list. Shane Duan took a very stupid joke and automated it with Watir. http://agileworks.blogspot.com/2006/04/geeks-version-of-joke.html stunning. just stunning. -Chris From zeljko.filipin at gmail.com Wed Apr 19 03:51:20 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 19 Apr 2006 09:51:20 +0200 Subject: [Wtr-core] link for you In-Reply-To: <72799cd70604181720ob93a942s8e77153df0381c99@mail.gmail.com> References: <72799cd70604181720ob93a942s8e77153df0381c99@mail.gmail.com> Message-ID: After just a few clicks I got a frame error. :( W, [19-Apr-2006 09:44:11#3600] WARN -- : frame error in waitdocument OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. But, the joke is "stunning" :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-core/attachments/20060419/e517dc33/attachment.htm From tester.paul at gmail.com Wed Apr 19 11:12:03 2006 From: tester.paul at gmail.com (Paul Carvalho) Date: Wed, 19 Apr 2006 11:12:03 -0400 Subject: [Wtr-core] link for you In-Reply-To: <72799cd70604181720ob93a942s8e77153df0381c99@mail.gmail.com> References: <72799cd70604181720ob93a942s8e77153df0381c99@mail.gmail.com> Message-ID: <37c405480604190812p131a4978j154013033fc68b16@mail.gmail.com> I remember someone once telling me about the importance of good test automation. He asked the question: What do you get if you automate garbage? Fast trash. I liked the efficiency of the script, but I feel kind of dirty for having contributed to the hit count of those useless web sites. I think I can use the script in the future though, so thanks. P. On 18/04/06, Chris McMahon wrote: > > too dangerous for the regular list. Shane Duan took a very stupid > joke and automated it with Watir. > > http://agileworks.blogspot.com/2006/04/geeks-version-of-joke.html > > stunning. just stunning. > -Chris > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-core/attachments/20060419/8ec0b0a6/attachment.htm From christopher.mcmahon at gmail.com Thu Apr 27 15:34:40 2006 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 27 Apr 2006 12:34:40 -0700 Subject: [Wtr-core] STARWEST proposals due May 1-- anyone want to teach SfT? Message-ID: <72799cd70604271234s24ae5319v2bd9db74c1beb1c6@mail.gmail.com> Hi... I just got a reminder email from the SQE people. I'm going to have taught Scripting for Testers at STAREAST and at Agile2006, and I'm really not interested in teaching it at STARWEST in the fall. Anyone else want to? It's a good class with Bret's open-source class materials. Decent stipend and expenses, too. http://www.sqe.com/starwest/speak.asp Anyone think we should ask on the general list also? -Chris From michael at developsense.com Fri Apr 28 13:44:16 2006 From: michael at developsense.com (Michael Bolton) Date: Fri, 28 Apr 2006 13:44:16 -0400 Subject: [Wtr-core] Gem vs. .exe Message-ID: <006501c66aeb$5ffa0f00$0190a8c0@Koko> I note that when I install the gem, the Watir files go by default into c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.934 With the one-click install, I note that the default is in C:\Program Files\Watir The structure of the two installations seems quite different. In particular, the one-click installer includes examples where the gem installation doesn't. There are other differences in the directory structure. Before I put things into Jira, is this something about which I should expect big changes shortly? Is it worth testing? Or would you like me to track the discrepancies? ---Michael B. DevelopSense: Software Testing in Plain English Web Site: http://www.developsense.com Newsletter: addme at developsense.com Blog: http://www.developsense.com/blog.html From bret at pettichord.com Fri Apr 28 14:49:01 2006 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 28 Apr 2006 13:49:01 -0500 Subject: [Wtr-core] Gem vs. .exe In-Reply-To: <006501c66aeb$5ffa0f00$0190a8c0@Koko> References: <006501c66aeb$5ffa0f00$0190a8c0@Koko> Message-ID: First some additional facts: 1. The behavior you are seeing hasn't changed from Watir 1.4.1. 2. The one-click installer actually puts files in two locations: "bonus files" in c:/program files/watir and the library in c:/ruby/lib/ruby/1.8/site-lib (or something like that). The bonus files are the unit tests, user guide & api docs, and the examples. The one-click also installs some menu links. 3. The gem only installs the library, the unit tests and the api docs. Here's where i think we stand with the installers. Please let me know whether there is disagreement on these points. 1. The gem tends to be the more popular install option, but some people prefer the one-click. 2. It is confusing that the one-click and the gem install the (same) watir library in different locations. It is easy to get a situation where someone installed one version using one installer and then a newer one using a newer installer, and now isn't getting the version they expected when they require 'watir'. (I'm not sure which one trumps the other, nor whether this depends on how rubygems is installed in your system -- some testing of this would be welcome.) 3. We still get intermittent reports of errors with the one-click installer that we can't track down. In fact, originally the one-click installer was the main way to install Watir, then when the Gem thing came out we started using that. The one-click installer was really designed around the needs of the Scripting For Testers class -- easy to install from CD with no internet access. The gem concept is based on internet access, on the other hand, which is really the largest use case for our users. So here's is what i'm thinking we should do going forward... 1. Encourage the gem as the main installer for Watir. 2. Deprecate the one-clicker. If we keep it, we should probably make more consistent with the gem, perhaps even be a wrapper around the gem. But i'm not keen to sign up for this this, and i'm not really sure any one else is either. I recently updated the rakefile to automatically build the one-click installer -- assuming you have NSIS installed. I would leave this here so people could create one-click installers on their own, but would stop releasing it. (This is what i mean by deprecate.) 3. Release the "bonus files" that were in the one-clicker, but not the gem as a separate zip file. Contents: user guide & examples. This would also include pointers to the API docs and unit tests that would be in the gem. This is a little more complicated that the one-clicker, but in the end better because it would be teaching users how to get API docs for any gem, not just Watir. 4. Delete install.rb -- These was a precursor to the one-click installer and is broken and confuses people. Thoughts? Depending on the feedback i get on this, then I'll know how to answer Michael's questions. Bret On 4/28/06, Michael Bolton wrote: > > I note that when I install the gem, the Watir files go by default into > > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.934 > > With the one-click install, I note that the default is in > > C:\Program Files\Watir > > The structure of the two installations seems quite different. In > particular, the one-click installer includes examples where the gem > installation doesn't. There are other differences in the directory > structure. > > Before I put things into Jira, is this something about which I should > expect > big changes shortly? Is it worth testing? Or would you like me to track > the discrepancies? > > ---Michael B. > > DevelopSense: Software Testing in Plain English > Web Site: http://www.developsense.com > Newsletter: addme at developsense.com > Blog: http://www.developsense.com/blog.html > _______________________________________________ > Wtr-core mailing list > Wtr-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-core/attachments/20060428/a1885e54/attachment.htm From zeljko.filipin at gmail.com Fri Apr 28 18:02:05 2006 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Sat, 29 Apr 2006 00:02:05 +0200 Subject: [Wtr-core] Gem vs. .exe In-Reply-To: References: <006501c66aeb$5ffa0f00$0190a8c0@Koko> Message-ID: I vote for gem. It can also be installed at machine with no internet access. From bret at pettichord.com Sat Apr 29 12:25:20 2006 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 29 Apr 2006 11:25:20 -0500 Subject: [Wtr-core] Checkout? In-Reply-To: <007b01c63147$1aff3610$6e01a8c0@Koko> References: <007b01c63147$1aff3610$6e01a8c0@Koko> Message-ID: I'm replying to an old note... On 2/14/06, Michael Bolton wrote: > > I'm actually unsure on how to correct this documentation. It could simply > be corrected, but there is a lot of duplication of what amounts to the same > information, and thus it flies in the face of the DRY principle. > DRY is a heuristic, isn't it? I see forcing people to look for > documentation in two places as kinda forcing them to repeat themselves, in a > way. > I don't think we've done much work on the documentation since this email, so the issue is still current. Watir 1.5 is going to need a lot of work to get the API docs current and usable. DRY says that we only want to maintain information in one place. It doesn't say that users shouldn't be able to find the documentation in more than one place. Rather it means that if it shows up in multiple places, it should be generated from a single master. This is but one reason why we are going to need to create a doc-build system (in ruby of course) to create the "commented source" that we can then feed to rdoc. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-core/attachments/20060429/641e18e5/attachment.htm From scott at hanselman.com Sun Apr 30 00:11:07 2006 From: scott at hanselman.com (Scott Hanselman) Date: Sat, 29 Apr 2006 21:11:07 -0700 Subject: [Wtr-core] Gem vs. .exe In-Reply-To: Message-ID: <002101c66c0c$1be04dd0$7c361d05@scottpc> Big +1 for Gem. Scott _____ From: wtr-core-bounces at rubyforge.org [mailto:wtr-core-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Friday, April 28, 2006 11:49 AM To: wtr-core at rubyforge.org Subject: Re: [Wtr-core] Gem vs. .exe First some additional facts: 1. The behavior you are seeing hasn't changed from Watir 1.4.1. 2. The one-click installer actually puts files in two locations: "bonus files" in c:/program files/watir and the library in c:/ruby/lib/ruby/1.8/site-lib (or something like that). The bonus files are the unit tests, user guide & api docs, and the examples. The one-click also installs some menu links. 3. The gem only installs the library, the unit tests and the api docs. Here's where i think we stand with the installers. Please let me know whether there is disagreement on these points. 1. The gem tends to be the more popular install option, but some people prefer the one-click. 2. It is confusing that the one-click and the gem install the (same) watir library in different locations. It is easy to get a situation where someone installed one version using one installer and then a newer one using a newer installer, and now isn't getting the version they expected when they require 'watir'. (I'm not sure which one trumps the other, nor whether this depends on how rubygems is installed in your system -- some testing of this would be welcome.) 3. We still get intermittent reports of errors with the one-click installer that we can't track down. In fact, originally the one-click installer was the main way to install Watir, then when the Gem thing came out we started using that. The one-click installer was really designed around the needs of the Scripting For Testers class -- easy to install from CD with no internet access. The gem concept is based on internet access, on the other hand, which is really the largest use case for our users. So here's is what i'm thinking we should do going forward... 1. Encourage the gem as the main installer for Watir. 2. Deprecate the one-clicker. If we keep it, we should probably make more consistent with the gem, perhaps even be a wrapper around the gem. But i'm not keen to sign up for this this, and i'm not really sure any one else is either. I recently updated the rakefile to automatically build the one-click installer -- assuming you have NSIS installed. I would leave this here so people could create one-click installers on their own, but would stop releasing it. (This is what i mean by deprecate.) 3. Release the "bonus files" that were in the one-clicker, but not the gem as a separate zip file. Contents: user guide & examples. This would also include pointers to the API docs and unit tests that would be in the gem. This is a little more complicated that the one-clicker, but in the end better because it would be teaching users how to get API docs for any gem, not just Watir. 4. Delete install.rb -- These was a precursor to the one-click installer and is broken and confuses people. Thoughts? Depending on the feedback i get on this, then I'll know how to answer Michael's questions. Bret On 4/28/06, Michael Bolton wrote: I note that when I install the gem, the Watir files go by default into c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.0.934 With the one-click install, I note that the default is in C:\Program Files\Watir The structure of the two installations seems quite different. In particular, the one-click installer includes examples where the gem installation doesn't. There are other differences in the directory structure. Before I put things into Jira, is this something about which I should expect big changes shortly? Is it worth testing? Or would you like me to track the discrepancies? ---Michael B. DevelopSense: Software Testing in Plain English Web Site: http://www.developsense.com Newsletter: addme at developsense.com Blog: http://www.developsense.com/blog.html _______________________________________________ Wtr-core mailing list Wtr-core at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-core -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-core/attachments/20060429/adc4df8a/attachment-0001.htm