From scott at hanselman.com Fri Jul 1 03:03:47 2005 From: scott at hanselman.com (Scott Hanselman) Date: Fri, 1 Jul 2005 00:03:47 -0700 Subject: [Wtr-general] Getting NUnit XML output from Watir Message-ID: Hello, I'm new here, so forgive my ignorance. I recently discovered Watir for myself and have done a poorman's integration with NUnit (http://www.hanselman.com/blog/IntegratingRubyAndWatirWithNUnit.aspx) but am curious if there's a way to get NUnit "Test Suite" XML so that I might roll Watir Use Case Tests into my existing NUnit Reporting infrastructure. Scott Hanselman http://www.computerzen.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050701/7c2d6d8a/attachment.html From Kevin.Williams at Level3.com Fri Jul 1 10:18:38 2005 From: Kevin.Williams at Level3.com (Williams, Kevin) Date: Fri, 1 Jul 2005 08:18:38 -0600 Subject: [Wtr-general] Getting NUnit XML output from Watir Message-ID: I'm looking at this now - haven't tried it just yet. The only question I have, which I assume will be answered when I try it, is what generates the output that is parsed by the Regex: @"(?\d+) tests, (?\d+) assertions, (?\d+) failures, (?\d+) errors" The Ruby code in the appears to only write "Test Passed" or "Test Failed!" to the standard output. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Scott Hanselman Sent: Friday, July 01, 2005 1:04 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Getting NUnit XML output from Watir Hello, I'm new here, so forgive my ignorance. I recently discovered Watir for myself and have done a poorman's integration with NUnit (http://www.hanselman.com/blog/IntegratingRubyAndWatirWithNUnit.aspx) but am curious if there's a way to get NUnit "Test Suite" XML so that I might roll Watir Use Case Tests into my existing NUnit Reporting infrastructure. Scott Hanselman http://www.computerzen.com From bret at pettichord.com Fri Jul 1 10:21:56 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 01 Jul 2005 09:21:56 -0500 Subject: [Wtr-general] Use of Wildcard? In-Reply-To: Message-ID: <5.1.0.14.2.20050701091525.0306ec30@127.0.0.1> At 08:27 PM 6/30/2005, Tuyet Cong-Ton-Nu wrote: >Instead of doing this: >ie.frame(:name, "portfolioTreeContent").frame(:name, >"treeframe1120166572909").getHTML > >How can I do this: >ie.frame(:name, "portfolioTreeContent").frame(:name, "treeframe*").getHTML Use a regular expression: ie.frame(:name, "portfolioTreeContent").frame(:name, /^treeframe/).html _____________________ Bret Pettichord www.pettichord.com From christopher.mcmahon at gmail.com Fri Jul 1 12:40:13 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 1 Jul 2005 11:40:13 -0500 Subject: [Wtr-general] Watir In-Reply-To: <20050701033233.20200.qmail@web50005.mail.yahoo.com> References: <20050701033233.20200.qmail@web50005.mail.yahoo.com> Message-ID: <72799cd705070109404fa1673@mail.gmail.com> Welcome Rob! I hope you have have the inclination to keep an eye on what's happening with WATIR, things move fast around here sometimes. Interestingly, we've had a number of discussions of appropriate logging mechanisms for WATIR, but have not gone very far down that path. Any suggestions you have would be welcome in many quarters of the Watir world, I'm sure. -Chris > I can defintely appreciate what you guys have done so far. I have had my own > adventures writing PAMIE over the last years or so. > > I am currently writing a module that will take the output of the testcase > results in XML and convert them to HTML. Similar to JUnit and JMeter From christopher.mcmahon at gmail.com Fri Jul 1 12:53:31 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 1 Jul 2005 11:53:31 -0500 Subject: [Wtr-general] Javascript menus In-Reply-To: <20050630221631.56625.qmail@web80302.mail.yahoo.com> References: <1120167994.42c4683a0ee71@webmail.telusplanet.net> <20050630221631.56625.qmail@web80302.mail.yahoo.com> Message-ID: <72799cd705070109533f6dcd51@mail.gmail.com> > C:\watir\examples>mouse_over.rb > ## Beginning of Example: FortLewis.edu > > Step 1: go to the test site: http://www.fortlewis.edu > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1979:in > `object_exist_check': Unable to > locate object, using text and Prospective > Students I know Fort Lewis changed their pages since this example was written, but I ran this example just now and the javascript part worked fine. Did you see the yellow floating javascript menus come up, and the elements in those menus get flashed and clicked? That's the part you're interested in. -Chris From scott at hanselman.com Fri Jul 1 13:01:51 2005 From: scott at hanselman.com (Scott Hanselman) Date: Fri, 1 Jul 2005 10:01:51 -0700 Subject: [Wtr-general] Getting NUnit XML output from Watir In-Reply-To: Message-ID: The latest dist of Watir that I installed prints out X tests, X assertions, X failures, X errors every time. It's Watir that does the "rolledup" printing, not the descriptive PUTS calls. Those are just to be pretty and are included in the middle of the standard out that Watir writes. Scott Hanselman -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Williams, Kevin Sent: Friday, July 01, 2005 7:19 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting NUnit XML output from Watir I'm looking at this now - haven't tried it just yet. The only question I have, which I assume will be answered when I try it, is what generates the output that is parsed by the Regex: @"(?\d+) tests, (?\d+) assertions, (?\d+) failures, (?\d+) errors" The Ruby code in the appears to only write "Test Passed" or "Test Failed!" to the standard output. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Scott Hanselman Sent: Friday, July 01, 2005 1:04 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Getting NUnit XML output from Watir Hello, I'm new here, so forgive my ignorance. I recently discovered Watir for myself and have done a poorman's integration with NUnit (http://www.hanselman.com/blog/IntegratingRubyAndWatirWithNUnit.aspx) but am curious if there's a way to get NUnit "Test Suite" XML so that I might roll Watir Use Case Tests into my existing NUnit Reporting infrastructure. Scott Hanselman http://www.computerzen.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Kevin.Williams at Level3.com Fri Jul 1 13:27:52 2005 From: Kevin.Williams at Level3.com (Williams, Kevin) Date: Fri, 1 Jul 2005 11:27:52 -0600 Subject: [Wtr-general] Getting NUnit XML output from Watir Message-ID: This appears to be the output structure of Ruby's Unit::Test framework. I guess that means that you could run any Ruby unit tests from Nunit - cool! -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Scott Hanselman Sent: Friday, July 01, 2005 11:02 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting NUnit XML output from Watir The latest dist of Watir that I installed prints out X tests, X assertions, X failures, X errors every time. It's Watir that does the "rolledup" printing, not the descriptive PUTS calls. Those are just to be pretty and are included in the middle of the standard out that Watir writes. Scott Hanselman -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Williams, Kevin Sent: Friday, July 01, 2005 7:19 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting NUnit XML output from Watir I'm looking at this now - haven't tried it just yet. The only question I have, which I assume will be answered when I try it, is what generates the output that is parsed by the Regex: @"(?\d+) tests, (?\d+) assertions, (?\d+) failures, (?\d+) errors" The Ruby code in the appears to only write "Test Passed" or "Test Failed!" to the standard output. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Scott Hanselman Sent: Friday, July 01, 2005 1:04 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Getting NUnit XML output from Watir Hello, I'm new here, so forgive my ignorance. I recently discovered Watir for myself and have done a poorman's integration with NUnit (http://www.hanselman.com/blog/IntegratingRubyAndWatirWithNUnit.aspx) but am curious if there's a way to get NUnit "Test Suite" XML so that I might roll Watir Use Case Tests into my existing NUnit Reporting infrastructure. Scott Hanselman http://www.computerzen.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 scott at hanselman.com Fri Jul 1 13:54:31 2005 From: scott at hanselman.com (Scott Hanselman) Date: Fri, 1 Jul 2005 10:54:31 -0700 Subject: [Wtr-general] Getting NUnit XML output from Watir In-Reply-To: Message-ID: Ah, so that means when I'm using this technique with Watir I need to: require 'watir' include Watir require 'test/unit' #needed! class Whatever < Test::Unit::TestCase #needed! #def my Watir stuff here end Right? Scott -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Williams, Kevin Sent: Friday, July 01, 2005 10:28 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting NUnit XML output from Watir This appears to be the output structure of Ruby's Unit::Test framework. I guess that means that you could run any Ruby unit tests from Nunit - cool! -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Scott Hanselman Sent: Friday, July 01, 2005 11:02 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting NUnit XML output from Watir The latest dist of Watir that I installed prints out X tests, X assertions, X failures, X errors every time. It's Watir that does the "rolledup" printing, not the descriptive PUTS calls. Those are just to be pretty and are included in the middle of the standard out that Watir writes. Scott Hanselman -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Williams, Kevin Sent: Friday, July 01, 2005 7:19 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting NUnit XML output from Watir I'm looking at this now - haven't tried it just yet. The only question I have, which I assume will be answered when I try it, is what generates the output that is parsed by the Regex: @"(?\d+) tests, (?\d+) assertions, (?\d+) failures, (?\d+) errors" The Ruby code in the appears to only write "Test Passed" or "Test Failed!" to the standard output. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Scott Hanselman Sent: Friday, July 01, 2005 1:04 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Getting NUnit XML output from Watir Hello, I'm new here, so forgive my ignorance. I recently discovered Watir for myself and have done a poorman's integration with NUnit (http://www.hanselman.com/blog/IntegratingRubyAndWatirWithNUnit.aspx) but am curious if there's a way to get NUnit "Test Suite" XML so that I might roll Watir Use Case Tests into my existing NUnit Reporting infrastructure. Scott Hanselman http://www.computerzen.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Fri Jul 1 14:12:08 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Fri, 1 Jul 2005 12:12:08 -0600 Subject: [Wtr-general] Watir In-Reply-To: <72799cd705070109404fa1673@mail.gmail.com> Message-ID: <20050701181233.NPAM6275.priv-edtnes56.telusplanet.net@tintin> Using Builder for XML logging seems to work well. I did a proof of concept the other day and it did the job nicely. Much better than the example I did using REXML. > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Chris McMahon > Sent: July 1, 2005 10:40 AM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] Watir > > Welcome Rob! I hope you have have the inclination to keep an eye on > what's happening with WATIR, things move fast around here sometimes. > > Interestingly, we've had a number of discussions of appropriate > logging mechanisms for WATIR, but have not gone very far down that > path. Any suggestions you have would be welcome in many quarters of > the Watir world, I'm sure. > -Chris > > > I can defintely appreciate what you guys have done so far. I have had my > own > > adventures writing PAMIE over the last years or so. > > > > I am currently writing a module that will take the output of the > testcase > > results in XML and convert them to HTML. Similar to JUnit and JMeter > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From tuyet.ctn at mscibarra.com Fri Jul 1 14:19:57 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Fri, 1 Jul 2005 11:19:57 -0700 Subject: [Wtr-general] Use of WildCard? Message-ID: Thanks for your suggestion, Bret. I did try it and got this: irb(main):050:0> ie.frame(:name, "portfolioTreeContent").frame(:name, /^treeframe/).html Watir::Exception::UnknownFrameException: Unable to locate a frame with name (?-m ix:^treeframe) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1832:in `initialize' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `new' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `frame' from (irb):50 from :0 When I use the "treeframe + dynamic number", it works just fine, but I need the wildcard version (sigh!): irb(main):051:0> ie.frame(:name, "portfolioTreeContent").frame(:name, "treeframe1120181362589").getHTML => "\r\n
 tuyeta
\r\n
 HOME
 TREES
\r\n" irb(main):052:0> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050701/af9e6fc1/attachment.html From paul.rogers at shaw.ca Sat Jul 2 00:43:11 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 01 Jul 2005 22:43:11 -0600 Subject: [Wtr-general] :value - Scott Pack Message-ID: Scott, in your earlier post you said that :value wasnt working correctly for checkboxes In the case you supplied ( checkboxes) are you aware that ie.checkbox(:name, 'check1' ,'123' ).click where 123 is the value of the checkbox can be used. The original intent for :value was only for buttons. is there some reason you need :value for check boxes? (maybe you dont have a name attribute in your html?) I can easily fix the bug ( as you've provided the fix already!) but is it something that really needs fixing? Paul From bret at pettichord.com Fri Jul 1 21:57:54 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 01 Jul 2005 20:57:54 -0500 Subject: [Wtr-general] Watir In-Reply-To: <20050701181233.NPAM6275.priv-edtnes56.telusplanet.net@tint in> References: <72799cd705070109404fa1673@mail.gmail.com> Message-ID: <5.1.0.14.2.20050701205613.02ffd328@127.0.0.1> Most Watir users use the Test::Unit testing framework. I would be surprised if there wasn't already an XML plugin to that. Isn't this what Alexey's Test-Reporter does? Bret At 01:12 PM 7/1/2005, Jonathan Kohl wrote: >Using Builder for XML logging seems to work well. I did a proof of concept >the other day and it did the job nicely. Much better than the example I did >using REXML. > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > > bounces at rubyforge.org] On Behalf Of Chris McMahon > > Sent: July 1, 2005 10:40 AM > > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] Watir > > > > Welcome Rob! I hope you have have the inclination to keep an eye on > > what's happening with WATIR, things move fast around here sometimes. > > > > Interestingly, we've had a number of discussions of appropriate > > logging mechanisms for WATIR, but have not gone very far down that > > path. Any suggestions you have would be welcome in many quarters of > > the Watir world, I'm sure. > > -Chris > > > > > I can defintely appreciate what you guys have done so far. I have had my > > own > > > adventures writing PAMIE over the last years or so. > > > > > > I am currently writing a module that will take the output of the > > testcase > > > results in XML and convert them to HTML. Similar to JUnit and JMeter > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From shaorobics at gmail.com Sun Jul 3 00:07:40 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Sun, 3 Jul 2005 00:07:40 -0400 Subject: [Wtr-general] Use of WildCard? In-Reply-To: References: Message-ID: <593b9ae80507022107609deb26@mail.gmail.com> did you try taking out the "^" ? did you try using: /treeframe.*/ Shao On 7/1/05, Tuyet Cong-Ton-Nu wrote: > > > Thanks for your suggestion, Bret. I did try it and got this: > > > > irb(main):050:0> ie.frame(:name, > "portfolioTreeContent").frame(:name, /^treeframe/).html > > Watir::Exception::UnknownFrameException: Unable to locate a > frame with name (?-m > > ix:^treeframe) > > from > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1832:in > `initialize' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in > `new' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in > `frame' > > from (irb):50 > > from :0 > > > > When I use the "treeframe + dynamic number", it works just fine, but I need > the wildcard version (sigh!): > > > > irb(main):051:0> ie.frame(:name, > "portfolioTreeContent").frame(:name, > "treeframe1120181362589").getHTML > > > > => "\r\n aLin > > k=#333399 link=#333399 bgColor=#ffffff background=\"\" > onload=tc_onLoad();>
> id=hiddenForm name=hiddenForm > action=/araneae/PortfolioAdmin/Sidebar/sidebarTre > > eB- method=post target=\"\"> value=b1qD9kL > > SK0WB3Qtkceok_w99 name=common.sessionId> type=hidden > > name=parentIds> name=yPosition> > > >
> class=ti src=\"/images/treeimages/img-globe-0.gif\" > align=textTop>  > d=tc_-1>tuyeta
\r\n
id=tc_false_100139268> > > class=st src=\"/image > > s/treeimages/img-plus-cont-0.gif\" align=textTop> src=\"/images > > /treeimages/img-folder-closed-1.gif\" > align=textTop>  > 139268>HOME
href=\"javascript:tc_toggle > > Folder('100139269',1)\"> src=\"/images/treeimages/img-plus-end-0.gi > > f\" align=textTop> src=\"/images/treeimages/img-folder-closed-1 > > .gif\" align=textTop>  id=tc_100139269>TREES
> NOBR>\r\n" > > irb(main):052:0> > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > From jkohl at telusplanet.net Sun Jul 3 13:42:35 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Sun, 3 Jul 2005 11:42:35 -0600 Subject: [Wtr-general] Watir In-Reply-To: <5.1.0.14.2.20050701205613.02ffd328@127.0.0.1> Message-ID: <20050703174247.GMVD25806.priv-edtnes28.telusplanet.net@tintin> I haven't heard of Alexey's Test-Reporter before. I downloaded it and I'll give it a try. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Bret Pettichord > Sent: July 1, 2005 7:58 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Watir > > Most Watir users use the Test::Unit testing framework. I would be > surprised > if there wasn't already an XML plugin to that. Isn't this what Alexey's > Test-Reporter does? > > Bret > > At 01:12 PM 7/1/2005, Jonathan Kohl wrote: > >Using Builder for XML logging seems to work well. I did a proof of > concept > >the other day and it did the job nicely. Much better than the example I > did > >using REXML. > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > > > bounces at rubyforge.org] On Behalf Of Chris McMahon > > > Sent: July 1, 2005 10:40 AM > > > To: wtr-general at rubyforge.org > > > Subject: Re: [Wtr-general] Watir > > > > > > Welcome Rob! I hope you have have the inclination to keep an eye on > > > what's happening with WATIR, things move fast around here sometimes. > > > > > > Interestingly, we've had a number of discussions of appropriate > > > logging mechanisms for WATIR, but have not gone very far down that > > > path. Any suggestions you have would be welcome in many quarters of > > > the Watir world, I'm sure. > > > -Chris > > > > > > > I can defintely appreciate what you guys have done so far. I have > had my > > > own > > > > adventures writing PAMIE over the last years or so. > > > > > > > > I am currently writing a module that will take the output of the > > > testcase > > > > results in XML and convert them to HTML. Similar to JUnit and JMeter > > > > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From k_o_g at yahoo.com Mon Jul 4 02:36:55 2005 From: k_o_g at yahoo.com (so man hung) Date: Mon, 4 Jul 2005 14:36:55 +0800 (CST) Subject: [Wtr-general] Test Suite Message-ID: <20050704063655.64457.qmail@web50905.mail.yahoo.com> Dear All, I try to use TestSuite to wrap all my testCase. I found it is sweet. But how can i pass argument to the testCase from the testSuite? Regards, Hung From shaorobics at gmail.com Mon Jul 4 08:03:17 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Mon, 4 Jul 2005 08:03:17 -0400 Subject: [Wtr-general] Test Suite In-Reply-To: <20050704063655.64457.qmail@web50905.mail.yahoo.com> References: <20050704063655.64457.qmail@web50905.mail.yahoo.com> Message-ID: <593b9ae80507040503b407dee@mail.gmail.com> you can try something like this, so that only test_main gets run and you have complete control of the order and whatever arguments you want to pass in, if any: def test_main case1(arg1...) case2(arg1... end def case1(arg1...) ... ... end Shao On 7/4/05, so man hung wrote: > Dear All, > > I try to use TestSuite to wrap all my testCase. I > found it is sweet. But how can i pass argument to the > testCase from the testSuite? > > Regards, > Hung > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From bret at pettichord.com Mon Jul 4 03:01:31 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 04 Jul 2005 02:01:31 -0500 Subject: [Wtr-general] Use of WildCard? In-Reply-To: Message-ID: <5.1.0.14.2.20050704020035.03108848@127.0.0.1> Yes, i see. This is a bug in watir. We don't support regexps with frames, but we should. Bret At 01:19 PM 7/1/2005, Tuyet Cong-Ton-Nu wrote: >Thanks for your suggestion, Bret. I did try it and got this: > > > >irb(main):050:0> ie.frame(:name, "portfolioTreeContent").frame(:name, >/^treeframe/).html > >Watir::Exception::UnknownFrameException: Unable to locate a frame with >name (?-m > >ix:^treeframe) > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1832:in `initialize' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `new' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `frame' > > from (irb):50 > > from :0 > > > >When I use the "treeframe + dynamic number", it works just fine, but I >need the wildcard version (sigh!): > > > >irb(main):051:0> ie.frame(:name, "portfolioTreeContent").frame(:name, >"treeframe1120181362589").getHTML > > > >=> "\r\nvLink=#333399 aLin > >k=#333399 link=#333399 bgColor=#ffffff background=\"\" >onload=tc_onLoad();>
> id=hiddenForm name=hiddenForm > action=/araneae/PortfolioAdmin/Sidebar/sidebarTre > >eB- method=post target=\"\">value=b1qD9kL > >SK0WB3Qtkceok_w99 name=common.sessionId> type=hidden > > name=parentIds> name=yPosition> > > >
> class=ti src=\"/images/treeimages/img-globe-0.gif\" > align=textTop>  >d=tc_-1>tuyeta
\r\n
id=tc_false_100139268> > >src=\"/image > >s/treeimages/img-plus-cont-0.gif\" align=textTop>src=\"/images > >/treeimages/img-folder-closed-1.gif\" align=textTop> id=tc_100 > >139268>HOME
href=\"javascript:tc_toggle > >Folder('100139269',1)\">src=\"/images/treeimages/img-plus-end-0.gi > >f\" align=textTop>src=\"/images/treeimages/img-folder-closed-1 > >.gif\" align=textTop> id=tc_100139269>TREES
>NOBR>\r\n" > >irb(main):052:0> >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From margaret at holly.com.au Tue Jul 5 01:04:39 2005 From: margaret at holly.com.au (Margaret Dineen) Date: Tue, 5 Jul 2005 15:04:39 +1000 Subject: [Wtr-general] test management tool question In-Reply-To: Message-ID: <019301c5811f$0c1b9270$a202000a@Margaret> Hi there, I'm hoping to set up a test management system, including management of test plans, test cases, test execution etc with the test cases being either automated using Watir (or an internally-developed tool) or else manual. Has anyone out there successfully combined Watir with any other products to get something like this working or have you any advice on how best to approach it? Thank you for your assistance. Kind regards, Margaret From upgundecha at yahoo.com Tue Jul 5 01:40:25 2005 From: upgundecha at yahoo.com (Unmesh Gundecha) Date: Mon, 4 Jul 2005 22:40:25 -0700 (PDT) Subject: [Wtr-general] test management tool question In-Reply-To: <019301c5811f$0c1b9270$a202000a@Margaret> Message-ID: <20050705054025.73594.qmail@web53907.mail.yahoo.com> Hi Margaret, I am using WATIR for one of our project. We are maintaining manual test cases in Excel and Access database. We have integrated these with WATIR with the help of WIN32OLE automation. We have written some extensions which access these test cases and test plans. Regards, Unmesh --- Margaret Dineen wrote: > Hi there, > > I'm hoping to set up a test management system, > including management of > test plans, test cases, test execution etc with the > test cases being > either automated using Watir (or an > internally-developed tool) or else > manual. > Has anyone out there successfully combined Watir > with any other products > to get something like this working or have you any > advice on how best to > approach it? > > Thank you for your assistance. > > Kind regards, > Margaret > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________ Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html From saudaziz at gmail.com Tue Jul 5 01:56:17 2005 From: saudaziz at gmail.com (saud aziz) Date: Mon, 4 Jul 2005 22:56:17 -0700 Subject: [Wtr-general] Testing for current page link Message-ID: <24d0cb38050704225648db54d1@mail.gmail.com> How can one check for case where you want to be sure that you are on correct page? is ther any method to check for current UrL? -- If you develop an ear for sounds that are musical it is like developing an ego. You begin to refuse sounds that are not musical and that way cut yourself off from a good deal of experience. -John Cage -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050704/b66afdb0/attachment.html From margaret at holly.com.au Tue Jul 5 02:03:35 2005 From: margaret at holly.com.au (Margaret Dineen) Date: Tue, 5 Jul 2005 16:03:35 +1000 Subject: [Wtr-general] test management tool question In-Reply-To: <20050705054025.73594.qmail@web53907.mail.yahoo.com> Message-ID: <019401c58127$47ae7390$a202000a@Margaret> Thank you - I'll give that a go. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Unmesh Gundecha Sent: Tuesday, 5 July 2005 3:40 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] test management tool question Hi Margaret, I am using WATIR for one of our project. We are maintaining manual test cases in Excel and Access database. We have integrated these with WATIR with the help of WIN32OLE automation. We have written some extensions which access these test cases and test plans. Regards, Unmesh --- Margaret Dineen wrote: > Hi there, > > I'm hoping to set up a test management system, > including management of > test plans, test cases, test execution etc with the > test cases being > either automated using Watir (or an > internally-developed tool) or else > manual. > Has anyone out there successfully combined Watir > with any other products > to get something like this working or have you any > advice on how best to > approach it? > > Thank you for your assistance. > > Kind regards, > Margaret > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________ Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From zeljko.filipin at gmail.com Tue Jul 5 03:12:25 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 5 Jul 2005 09:12:25 +0200 Subject: [Wtr-general] Testing for current page link In-Reply-To: <24d0cb38050704225648db54d1@mail.gmail.com> Message-ID: <42ca32a7.635b6eab.0b59.1efe@mx.gmail.com> Try this: irb require 'watir' ie = Watir::IE.attach(:title, //) ie.url Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of saud aziz Sent: Tuesday, July 05, 2005 7:56 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Testing for current page link How can one check for case where you want to be sure that you are on correct page? is ther any method to check for current UrL? -- If you develop an ear for sounds that are musical it is like developing an ego. You begin to refuse sounds that are not musical and that way cut yourself off from a good deal of experience. -John Cage -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050705/19a936db/attachment.html From zeljko.filipin at gmail.com Tue Jul 5 03:15:15 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 5 Jul 2005 09:15:15 +0200 Subject: [Wtr-general] Testing for current page link In-Reply-To: <24d0cb38050704225648db54d1@mail.gmail.com> Message-ID: <42ca3351.7848b614.08c4.72c1@mx.gmail.com> For list of other methods go to http://wtr.rubyforge.org/rdoc/ (in 'Classes' frame click 'Watir::IE'). Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of saud aziz Sent: Tuesday, July 05, 2005 7:56 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Testing for current page link How can one check for case where you want to be sure that you are on correct page? is ther any method to check for current UrL? -- If you develop an ear for sounds that are musical it is like developing an ego. You begin to refuse sounds that are not musical and that way cut yourself off from a good deal of experience. -John Cage -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050705/ec037097/attachment.html From satti_mg at yahoo.com Tue Jul 5 06:06:03 2005 From: satti_mg at yahoo.com (sathya shankar) Date: Tue, 5 Jul 2005 03:06:03 -0700 (PDT) Subject: [Wtr-general] Comparing the XML file generated by the test with watir. In-Reply-To: Message-ID: <20050705100603.22475.qmail@web33506.mail.mud.yahoo.com> Hi all, I am having difficulties in finding out how to compare the xml files that are created by the watir scripts. Is there any documentation for that? My scripts are generating the xml files. Which i want it to be checked weather the xml files that are generated are proper or not? Is there any way for that? Thanks Sathya Shankar ____________________________________________________ Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com From zeljko.filipin at gmail.com Tue Jul 5 07:49:20 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 5 Jul 2005 13:49:20 +0200 Subject: [Wtr-general] Watir::FactoryMethods#checkboxes error Message-ID: <42ca738e.0ad8014f.1a0e.ffffe9cb@mx.gmail.com> I did: irb require 'watir' ie = Watir::IE.attach(:title, //) ie.checkboxes[1].to_s # from Watir API Reference and got error: WIN32OLERuntimeError: Unknown property or method `value' HRESULT error code:0x80020006 Unknown name. from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1984:in `invoke' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1984:in `value' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2011:in `string_creator' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2027:in `to_s' from (irb):3 Also with: ie.checkboxes.each do |s| ; puts s.to_s ; end # from Watir API Reference I get: WIN32OLERuntimeError: Unknown property or method `value' HRESULT error code:0x80020006 Unknown name. from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1984:in `invoke' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1984:in `value' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2011:in `string_creator' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2027:in `to_s' from (irb):4 from (irb):4:in `each' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2155:in `upto' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2155:in `each' from (irb):4 Is this a bug or am I missing something? Zeljko From shaorobics at gmail.com Tue Jul 5 09:10:42 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Tue, 5 Jul 2005 09:10:42 -0400 Subject: [Wtr-general] Watir::FactoryMethods#checkboxes error In-Reply-To: <42ca738e.0ad8014f.1a0e.ffffe9cb@mx.gmail.com> References: <42ca738e.0ad8014f.1a0e.ffffe9cb@mx.gmail.com> Message-ID: <593b9ae805070506101ae1d101@mail.gmail.com> I've had trouble with checkboxes too with the same 'value' error in the past by doing: ie.checkboxes.each do|c| puts c.name end On 7/5/05, Zeljko Filipin wrote: > I did: > > irb > require 'watir' > ie = Watir::IE.attach(:title, //) > ie.checkboxes[1].to_s # from Watir API Reference > > and got error: > > WIN32OLERuntimeError: Unknown property or method `value' > HRESULT error code:0x80020006 > Unknown name. > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1984:in `invoke' > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1984:in `value' > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2011:in > `string_creator' > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2027:in `to_s' > from (irb):3 > > Also with: > > ie.checkboxes.each do |s| ; puts s.to_s ; end # from Watir API Reference > > I get: > > WIN32OLERuntimeError: Unknown property or method `value' > HRESULT error code:0x80020006 > Unknown name. > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1984:in `invoke' > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1984:in `value' > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2011:in > `string_creator' > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2027:in `to_s' > from (irb):4 > from (irb):4:in `each' > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2155:in `upto' > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2155:in `each' > from (irb):4 > > Is this a bug or am I missing something? > > Zeljko > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From jkohl at telusplanet.net Tue Jul 5 11:00:24 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Tue, 5 Jul 2005 09:00:24 -0600 Subject: [Wtr-general] Comparing the XML file generated by the test with watir. In-Reply-To: <20050705100603.22475.qmail@web33506.mail.mud.yahoo.com> Message-ID: <20050705150010.EWUP16200.priv-edtnes46.telusplanet.net@tintin> You can use REXML to read XML files: http://www.germane-software.com/software/rexml/docs/tutorial.html -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of sathya shankar > Sent: July 5, 2005 4:06 AM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Comparing the XML file generated by the test with > watir. > > Hi all, > > I am having difficulties in finding out how to compare > the xml files that are created by the watir scripts. > Is there any documentation for that? > My scripts are generating the xml files. Which i want > it to be checked weather the xml files that are > generated are proper or not? Is there any way for > that? > > Thanks > Sathya Shankar > > > > ____________________________________________________ > Yahoo! Sports > Rekindle the Rivalries. Sign up for Fantasy Football > http://football.fantasysports.yahoo.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Tue Jul 5 11:03:00 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 05 Jul 2005 09:03:00 -0600 Subject: [Wtr-general] Watir::FactoryMethods#checkboxes error Message-ID: <17aa3217d290.17d29017aa32@shaw.ca> this was a bug that someone else reported 2 or so weeks ago. It doesnt fail for me though! But i can add a fix easily enough Paul ----- Original Message ----- From: Zeljko Filipin Date: Tuesday, July 5, 2005 5:49 am Subject: [Wtr-general] Watir::FactoryMethods#checkboxes error > I did: > > irb > require 'watir' > ie = Watir::IE.attach(:title, //) > ie.checkboxes[1].to_s # from Watir API Reference > > and got error: > > WIN32OLERuntimeError: Unknown property or method `value' > HRESULT error code:0x80020006 > Unknown name. > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1984:in `invoke' > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1984:in `value' > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2011:in > `string_creator' > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2027:in `to_s' > from (irb):3 > > Also with: > > ie.checkboxes.each do |s| ; puts s.to_s ; end # from Watir API > Reference > I get: > > WIN32OLERuntimeError: Unknown property or method `value' > HRESULT error code:0x80020006 > Unknown name. > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1984:in `invoke' > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1984:in `value' > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2011:in > `string_creator' > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2027:in `to_s' > from (irb):4 > from (irb):4:in `each' > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2155:in `upto' > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2155:in `each' > from (irb):4 > > Is this a bug or am I missing something? > > Zeljko > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From shaorobics at gmail.com Tue Jul 5 12:22:26 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Tue, 5 Jul 2005 12:22:26 -0400 Subject: [Wtr-general] different type of log In-Reply-To: <42CA30EC.1020508@gs-lab.com> References: <42CA30EC.1020508@gs-lab.com> Message-ID: <593b9ae80507050922128c2b7d@mail.gmail.com> You can do the same thing in perl. All I'm doing is using Ruby to output HTML to a file. In other words, if you know how to open and write to a file you can do the same thing. Of course, for additional functionality you will also need some javascript/CSS or something similar Shao On 7/5/05, Manish Sapariya wrote: > With reference to your mail to watir list, > I would like to know, r u using some rubi magic > here, or can I do the same kind of stuff in perl > as well. > > I am a beginner web programmer. > Your inputs will really help. > Thanks, > Manish > > From tuyet.ctn at mscibarra.com Tue Jul 5 16:18:57 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Tue, 5 Jul 2005 13:18:57 -0700 Subject: [Wtr-general] Use of WildCard? Message-ID: Thanks, Shao. It didn't work either. However, I was just informed by Jonathan that: "That is a bug that Bret identified in Watir. Frames are not found using regexps like other objects. I hope that will be fixed in the next release." I am wondering if there is a way I can do this: 1) somehow save the treeframe value from this command (in this case treeframe1120266500902), so I can use it later in the click command: ie.frame(:name, "portfolioTreeContent").show_frames there are 2 frames frame index: 0 name: sidebar_header frame index: 1 name: treeframe1120266500902 ie.frame(:name, "portfolioTreeContent").frame(:name,"treeframe1120266500902").image(:src, /img-plus-cont-0.gif/).click -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050705/13e292d9/attachment.html From tuyet.ctn at mscibarra.com Tue Jul 5 16:26:43 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Tue, 5 Jul 2005 13:26:43 -0700 Subject: [Wtr-general] Use of WildCard? Message-ID: Hi Bret, Per your response: "Yes, i see. This is a bug in watir. We don't support regexps with frames, but we should." Would you mind telling me if this feature will be in the next release? And when would that be? :-) We have a lot of frames that will need regexps to get to the information. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050705/db9f7c3b/attachment.html From dnjohannes at gmail.com Tue Jul 5 17:45:06 2005 From: dnjohannes at gmail.com (dnjohannes at gmail.com) Date: Tue, 5 Jul 2005 16:45:06 -0500 Subject: [Wtr-general] Help: Accessing button defined in CSS Message-ID: <1684ad6705070514453be026be@mail.gmail.com> All, Forgive me if I am asking an obvious question, I have been using Watir for a short time, but have been enjoying it. Now I personally have a problem. I need to automate the login for further testing, but I cannot figure out how to access the 'Log In' button which has been defined in the Cascading Style Sheets. Any help would be appreciated. Dave -=-=- getHTML -=-=- irb(main):072:0> ie.frame("main").frame("frmLogin").getHTML => "\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
user:
password:
\r\n\r\n\r\n \r\n< /TBODY>
   
" -=-=- Formated third row of the login table -=-=-
   
-=-=- CSS -=-=- td.loginOnOver{ background-image: url(../graphics/logindown.jpg); height: 22px; width: 60px; cursor: hand; } td.loginOnOut{ background-image: url(../graphics/loginup.jpg); height: 22px; width: 60px; } -=-=- Test code to login (minus clicking the 'Log In' button) -=-=- require 'test/unit' #variables testSite = "http://192.168.5.5/login/" #open the IE browser ie = IE.new ie.goto(testSite) puts "Entering user ID" ie.frame("main").frame("frmLogin").text_field(:name,"user").set("testeracct") puts "Entering user password" ie.frame("main").frame("frmLogin").text_field(:name,"pass").set("123456") puts "Clicking Log In button" From tuyet.ctn at mscibarra.com Tue Jul 5 21:16:37 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Tue, 5 Jul 2005 18:16:37 -0700 Subject: [Wtr-general] Extract/Parse String? Message-ID: How do I extract "treeframe1120266500902" from this String class and stored it in a variable to be used later in a Watir command? irb(main):205:0> puts c irb(main):206:0> puts c.class String => nil -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050705/ee3af870/attachment.html From paul.rogers at shaw.ca Tue Jul 5 23:09:25 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 05 Jul 2005 21:09:25 -0600 Subject: [Wtr-general] Next release ( 1.4) Message-ID: <003f01c581d8$1dab6ce0$6400a8c0@NewDell> Some one today asked about the next release, which was timely as Ive been writing this email for a few days. Im working on getting the next release out soon - maybe next week. The following bugs have been fixed: table using id and reg exp is not found checkboxes have extra events wrong objects are sometimes found wait for page load on new windows flash for objects in table cells checkbox#value exception (may have been done in refactoring - need to verify) And the following new features flash for forms iterator objects now have a show method, eg ie.buttons.show can now specify a default attribute, eg ie.default_attribute = :id ie.text_field( 'abc1').set('Testing') there is also a default for particular element types, ie.set_default_attribute_for_element( :button , :id) ie.button( 'b1').click tablecell#colspan - returns the number of columns the cell spans. Is this method named correctly? And some other possible bug fixes/new features if time permits. Fix for using :value improve javascript popups handling ( ihave a few ideas, details in a separate email if I get to it) find frame using :name and reg exp frames iterator show_windows .style to be deprecated replaced with something like .dhtml_class ( suggestions for method name please) Now, one of the refactorings that has taken pace has the potential to break some code. I doubt it will happen to many people. If you are using code like the following in your scripts, please can you let me know, so we can try to accommodate you. Class ObjectActions def my_own_special_mrthod # some code end end Im sure not many, if anyone is doing this, but please let me know if you are. Are there any other things that people need urgently, or any bugs Im missing? Thanks Paul From zeljko.filipin at gmail.com Wed Jul 6 03:28:53 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 6 Jul 2005 09:28:53 +0200 Subject: [Wtr-general] Next release ( 1.4) In-Reply-To: <003f01c581d8$1dab6ce0$6400a8c0@NewDell> Message-ID: <42cb8803.5a43107c.02a4.4911@mx.gmail.com> I am not shure if I undrestood, but I use something like this, if this is what you meant: class Web def enter_text( text_field ) puts "- entering text: #{ text_field.display } = #{ text_field.value }" @ie.textField( text_field.how, text_field.what ).set( text_field.value ) end end -----Original Message----- Class ObjectActions def my_own_special_mrthod # some code end end Im sure not many, if anyone is doing this, but please let me know if you are. From ati.ozgur at gmail.com Wed Jul 6 03:44:32 2005 From: ati.ozgur at gmail.com (Atilla Ozgur) Date: Wed, 6 Jul 2005 10:44:32 +0300 Subject: [Wtr-general] Extract/Parse String? In-Reply-To: References: Message-ID: c = '' c =~ %r{name=(\w+\d+)} puts $1 c =~ %r{name=([A-Za-z]+)([0-9]+)} puts $1 puts $2 I hope this is what you need. From zeljko.filipin at gmail.com Wed Jul 6 04:26:00 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 6 Jul 2005 10:26:00 +0200 Subject: [Wtr-general] Next release ( 1.4) In-Reply-To: <003f01c581d8$1dab6ce0$6400a8c0@NewDell> Message-ID: <42cb9566.0531ab86.1016.ffffe641@mx.gmail.com> I looked at tracker at http://rubyforge.org/projects/wtr/ and I did not find this bug (example is for 'id', but I reproduced it also for 'name'): HTML: link 1 IRB: irb require 'watir' ie = Watir::IE.attach(:title, //) ie.checkboxes.each { | item | puts item.id } OUTPUT: link_id ----- It works ok if: HTML: link 1 OUTPUT: checkbox_id -----Original Message----- Are there any other things that people need urgently, or any bugs Im missing? From shaorobics at gmail.com Wed Jul 6 10:38:29 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Wed, 6 Jul 2005 10:38:29 -0400 Subject: [Wtr-general] deleting Message-ID: <593b9ae805070607382dfa9aa@mail.gmail.com> I'm still having trouble with ruby dbi and deleting. I have this code: DBI.connect("DBI:ADO:PROVIDER=SQLOLEDB;DATABASE= blah blah") do |dbh| sql = "DELETE FROM someTable WHERE someCondition" dbh.do(sql) end it runs w/o errors but doesn't do any deletion. When this code is pasted into enterprise it works. Any suggestions? Shao From bret at pettichord.com Wed Jul 6 11:11:15 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 06 Jul 2005 10:11:15 -0500 Subject: [Wtr-general] Next release ( 1.4) In-Reply-To: <003f01c581d8$1dab6ce0$6400a8c0@NewDell> Message-ID: <5.1.0.14.2.20050706101010.033949b8@127.0.0.1> At 10:09 PM 7/5/2005, Paul Rogers wrote: > can now specify a default attribute, eg > ie.default_attribute = :id > ie.text_field( 'abc1').set('Testing') > there is also a default for particular element types, > ie.set_default_attribute_for_element( :button , :id) > ie.button( 'b1').click I think there are problems with both the interface and the implementation of this. I've worked some on fixing these, but have more work to do. I suggest removing this from the release so that we don't commit ourselves to an interface we don't plan to support. Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Jul 6 11:15:13 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 06 Jul 2005 10:15:13 -0500 Subject: [Wtr-general] Next release ( 1.4) In-Reply-To: <003f01c581d8$1dab6ce0$6400a8c0@NewDell> Message-ID: <5.1.0.14.2.20050706101156.033a0098@127.0.0.1> At 10:09 PM 7/5/2005, Paul Rogers wrote: >Now, one of the refactorings that has taken pace has the potential to >break some code. I doubt it will happen to many people. If you are using >code like the following in your scripts, please can you let me know, so >we can try to accommodate you. > > Class ObjectActions > def my_own_special_mrthod > # some code > end > end > >Im sure not many, if anyone is doing this, but please let me know if you >are. I renamed an internal class. Anyone using watir needs to understand that some interfaces are supported and others are internal to the tool, aren't intended for public consumption, and are subject to change. The class was renamed to Elements -- if you happen to have been referencing this class all you have to do is use the new name. Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Jul 6 11:15:56 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 06 Jul 2005 10:15:56 -0500 Subject: [Wtr-general] Next release ( 1.4) In-Reply-To: <42cb8803.5a43107c.02a4.4911@mx.gmail.com> References: <003f01c581d8$1dab6ce0$6400a8c0@NewDell> Message-ID: <5.1.0.14.2.20050706101546.033aafc0@127.0.0.1> This will be fine. At 02:28 AM 7/6/2005, Zeljko Filipin wrote: >I am not shure if I undrestood, but I use something like this, if this is >what you meant: > >class Web > def enter_text( text_field ) > puts "- entering text: #{ text_field.display } = #{ >text_field.value }" > @ie.textField( text_field.how, text_field.what ).set( >text_field.value ) > end >end > >-----Original Message----- > > Class ObjectActions > def my_own_special_mrthod > # some code > end > end > >Im sure not many, if anyone is doing this, but please let me know if you >are. > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Jul 6 11:18:37 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 06 Jul 2005 10:18:37 -0500 Subject: [Wtr-general] Use of WildCard? In-Reply-To: Message-ID: <5.1.0.14.2.20050706101739.033aa4e0@127.0.0.1> At 03:26 PM 7/5/2005, Tuyet Cong-Ton-Nu wrote: >Would you mind telling me if this feature will be in the next release? It looks like a one-line fix. I should be able to get to this by the weekend. Bret _____________________ Bret Pettichord www.pettichord.com From chrismo at clabs.org Wed Jul 6 12:18:43 2005 From: chrismo at clabs.org (Chris Morris) Date: Wed, 06 Jul 2005 11:18:43 -0500 Subject: [Wtr-general] Next release ( 1.4) In-Reply-To: <5.1.0.14.2.20050706101156.033a0098@127.0.0.1> References: <5.1.0.14.2.20050706101156.033a0098@127.0.0.1> Message-ID: <42CC0463.3080101@clabs.org> Bret Pettichord wrote: > > I renamed an internal class. Anyone using watir needs to understand > that some interfaces are supported and others are internal to the > tool, aren't intended for public consumption, and are subject to change. Is there anyway to help make this clearer to using watir? I believe Eclipse actually goes to packaging pains to put certain classes that are internal in packages called, "internal", so it's hard for a user not to know they're working against interfaces that could change out from under them. -- Chris http://clabs.org/blogki From bret at pettichord.com Wed Jul 6 13:15:26 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 06 Jul 2005 12:15:26 -0500 Subject: [Wtr-general] Next release ( 1.4) In-Reply-To: <42CC0463.3080101@clabs.org> References: <5.1.0.14.2.20050706101156.033a0098@127.0.0.1> <5.1.0.14.2.20050706101156.033a0098@127.0.0.1> Message-ID: <5.1.0.14.2.20050706121352.033dcc60@127.0.0.1> At 11:18 AM 7/6/2005, Chris Morris wrote: >Is there anyway to help make this clearer to using watir? I believe >Eclipse actually goes to packaging pains to put certain classes that are >internal in packages called, "internal", so it's hard for a user not to >know they're working against interfaces that could change out from under them. This is a good idea. But i don't know if we're going to have this in place for 1.4. My understanding is that the only published/supported class is Watir::IE. Are there any others? _____________________ Bret Pettichord www.pettichord.com From guru_sc at yahoo.com Wed Jul 6 13:21:12 2005 From: guru_sc at yahoo.com (Guru Subramanyam) Date: Wed, 6 Jul 2005 10:21:12 -0700 (PDT) Subject: [Wtr-general] Next release ( 1.4) In-Reply-To: <003f01c581d8$1dab6ce0$6400a8c0@NewDell> Message-ID: <20050706172112.51848.qmail@web80309.mail.yahoo.com> Hi, It will be very beneficial if Watir can support the Javascript menus similar to the one in http://www.cbc.ca, where links are declared in a Javascript file that is not loaded in the DOM Regards Guru --- Paul Rogers wrote: > Some one today asked about the next release, which > was timely as Ive > been writing this email for a few days. > > Im working on getting the next release out soon - > maybe next week. > The following bugs have been fixed: > table using id and reg exp is not found > checkboxes have extra events > wrong objects are sometimes found > wait for page load on new windows > flash for objects in table cells > checkbox#value exception (may have been done in > refactoring - need to > verify) > > And the following new features > flash for forms > iterator objects now have a show method, eg > ie.buttons.show > can now specify a default attribute, eg > ie.default_attribute = :id > ie.text_field( 'abc1').set('Testing') > there is also a default for particular element > types, > ie.set_default_attribute_for_element( > :button , :id) > ie.button( 'b1').click > tablecell#colspan - returns the number of > columns the cell spans. Is > this method named correctly? > > And some other possible bug fixes/new features if > time permits. > Fix for using :value > improve javascript popups handling ( ihave a few > ideas, details in a > separate email if I get to it) > find frame using :name and reg exp > frames iterator > show_windows > .style to be deprecated replaced with something > like .dhtml_class ( > suggestions for method name please) > > Now, one of the refactorings that has taken pace has > the potential to > break some code. I doubt it will happen to many > people. If you are using > code like the following in your scripts, please can > you let me know, so > we can try to accommodate you. > > Class ObjectActions > def my_own_special_mrthod > # some code > end > end > > Im sure not many, if anyone is doing this, but > please let me know if you > are. > > > Are there any other things that people need > urgently, or any bugs Im > missing? > > Thanks > > Paul > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From guru_sc at yahoo.com Wed Jul 6 13:23:37 2005 From: guru_sc at yahoo.com (Guru Subramanyam) Date: Wed, 6 Jul 2005 10:23:37 -0700 (PDT) Subject: [Wtr-general] Javascript menus In-Reply-To: <72799cd705070109533f6dcd51@mail.gmail.com> Message-ID: <20050706172337.24468.qmail@web80302.mail.yahoo.com> Hi, I tried this again. As soon as the webpage loads, I get this exception on my console. I don't see any menus getting highlighted or flashed Regards Guru --- Chris McMahon wrote: > > C:\watir\examples>mouse_over.rb > > ## Beginning of Example: FortLewis.edu > > > > Step 1: go to the test site: > http://www.fortlewis.edu > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1979:in > > `object_exist_check': Unable to > > locate object, using text and Prospective > > Students > > I know Fort Lewis changed their pages since this > example was written, > but I ran this example just now and the javascript > part worked fine. > Did you see the yellow floating javascript menus > come up, and the > elements in those menus get flashed and clicked? > That's the part > you're interested in. > -Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From christopher.mcmahon at gmail.com Wed Jul 6 13:39:30 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 6 Jul 2005 12:39:30 -0500 Subject: [Wtr-general] Javascript menus In-Reply-To: <20050706172337.24468.qmail@web80302.mail.yahoo.com> References: <72799cd705070109533f6dcd51@mail.gmail.com> <20050706172337.24468.qmail@web80302.mail.yahoo.com> Message-ID: <72799cd70507061039c191640@mail.gmail.com> > > > Step 1: go to the test site: > > http://www.fortlewis.edu > > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1979:in > > > `object_exist_check': Unable to > > > locate object, using text and Prospective > > > Students Odd. It works for me. Are you in fact at the fortlewis.edu site? If you do a view source, does the page contain a widget whose text is " Prospective Students"? Mine does. -Chris From bret at pettichord.com Wed Jul 6 13:52:46 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 06 Jul 2005 12:52:46 -0500 Subject: [Wtr-general] supported classes Message-ID: <5.1.0.14.2.20050706125013.033dc788@127.0.0.1> My view is that classes and methods that have comments like this # This is not a class that users would normally access. should be read as indicating that they are not exposing published interfaces. The Elements / ObjectActions class has this comment. Bret _____________________ Bret Pettichord www.pettichord.com From softwarespack at yahoo.com Wed Jul 6 18:07:14 2005 From: softwarespack at yahoo.com (Scott Pack) Date: Wed, 6 Jul 2005 15:07:14 -0700 (PDT) Subject: [Wtr-general] :value - Scott Pack Message-ID: <20050706220714.48510.qmail@web32202.mail.mud.yahoo.com> Hi Paul, I realized what you are mentioning when I looked at the source, but I thought it odd to restrict the access to buttons only. In my case, no I don't have anything but the value. Since almost any attribute of an HTML element is optional, this speaks to supporting the set of attributes available because one never knows exactly what to expect in a web page. Thus if an HTML element supports a particular attribute (value, name, id, class, etc), the tool should support utilizing that attribute to access the element. Thanks for the reply! Scott ____________________________________________________ Sell on Yahoo! Auctions ? no fees. Bid on great items. http://auctions.yahoo.com/ From Chris_Ellis at au.ey.com Wed Jul 6 19:02:00 2005 From: Chris_Ellis at au.ey.com (Chris_Ellis at au.ey.com) Date: Thu, 7 Jul 2005 09:02:00 +1000 Subject: [Wtr-general] Problems with Watir test class Message-ID: This email is to be read subject to the disclaimer below. While evaluating Watir I have written a test class using Watir that works fine when run stand alone with parameters hardcoded. I then tried to write a file that would call the test class and run it, however when I do this all the Asserts fail and I also get an initialisation error message. Despite this the actual script runs fine. It drives my web app and completes the task. I'm new to Ruby so I'm probably missing something simple. Code at the bottom. Here are the errors I get. 1) The initialisation error message initiate search c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:51:in `initialize': wrong number of arguments (1 for 2) (ArgumentError) from c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:51:in `new' from c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:51:in `suite' from c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:50:in `catch' from c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:50:in `suite' from c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:48:in `each' from c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:48:in `suite' from c:/ruby/lib/ruby/1.8/test/unit/collector/objectspace.rb:25:in `collect' from c:/ruby/lib/ruby/1.8/test/unit/collector/objectspace.rb:23:in `each_object' from c:/ruby/lib/ruby/1.8/test/unit/collector/objectspace.rb:23:in `collect' from c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:53 from c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:49:in `[]' from c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:192:in `run' from c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:14:in `run' from c:/ruby/lib/ruby/1.8/test/unit.rb:285 from c:/ruby/lib/ruby/1.8/test/unit.rb:283 wrong number of arguments (1 for 2) c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:51:in `initialize' ####################################################### 2) This is the error the Asserts are giving me. E, [2005-06-27T17:00:42.547000 #120] ERROR -- : TEST FAILED: Logon Failed undefined method `add_assertion' for nil:NilClass c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:115:in `add_assertion' c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:353:in `_wrap_assertion' c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:38:in `assert' ./TaxIntegrator.rb:34:in `test_1_Logon' #Test class file called TaxIntegrator.rb ####################################################### #includes #test::unit includes require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' require 'watir' include Watir #variables $ means its global #$test_site = 'http://localhost/tidev' #open the IE browser class TC_TaxIntegrator < Test::Unit::TestCase def initialize(testSite, logFile) #local class variables are declared with @ @ie = IE.new @ie.goto(testSite) @log = Logger.new(logFile) end #...fill in Test Case methods here... def test_1_Logon(user, pwd) # fill in Watir method and assertion here @ie.text_field(:name, "txtUsername").set(user) @ie.text_field(:name, "txtPassword").set(pwd) @ie.button(:name, "btnLogon").click begin assert(@ie.getObject(:name, "FrameMenu")) @log.info("TEST PASSED: Logon successful") rescue => e @log.error("TEST FAILED: Logon Failed " + e.message + "\n" + e.backtrace.join("\n")) end end def test_2_CreateFolio(folioName) @ie.frame(:name, "FrameMenu").link(:text, "Tax Folio Selection").click begin assert(@ie.frame(:name, "FrameMain").contains_text("Tax Folio Selection")) @log.info("TEST PASSED: Navigation Tax Folio Selection successful") rescue => e @log.error("TEST FAILED: Screen Navigation - Tax Folio Selection") end @ie.frame(:name, "FrameMain").button(:id, "btnNewDataCycle").click begin assert(@ie.frame(:name, "FrameMain").contains_text("New Tax Folio Search")) @log.info("TEST PASSED: Navigation New Tax Folio Search successful") rescue => e @log.error("TEST FAILED: Screen Navigation - New Tax Folio Search") end @ie.frame(:name, "FrameMain").select_list( :id , "FolioClassID").select("Australian Company") @ie.frame(:name, "FrameMain").select_list( :id , "ConsolidationTypeID1").select("Normal") @ie.frame(:name, "FrameMain").button(:id, "btnSearch").click puts "initiate search" begin assert(@ie.frame(:name, "FrameMain").contains_text("Chris Template Group2")) @log.info("TEST PASSED: Search successful") rescue => e @log.error("TEST FAILED: Search Failed") end # Click first element in the table to navigate to the new folio screen # this line says click cell 2 of Row 1 in table 7 which is the tblData table on this screen @ie.frame(:name, "FrameMain").table(:index, 7)[1][2].click begin assert(@ie.frame(:name, "FrameMain").contains_text("New Tax Folio")) @log.info("TEST PASSED: Navigation to New Tax Folio Successful") rescue => e @log.error("TEST FAILED: Navigation Failed - New Tax Folio") end @log.close end end # Driver file called TestContainer.rb #################################################### require 'TaxIntegrator' $test_site = 'http://localhost/tidev' aTest = TC_TaxIntegrator.new($test_site, 'MyLog.log') aTest.test_1_Logon('ce','ce') aTest.test_2_CreateFolio('My New Folio') -------------------- NOTICE - This communication contains information which is confidential and the copyright of Ernst & Young or a third party. If you are not the intended recipient of this communication please delete and destroy all copies and telephone Ernst & Young on 1800 655 717 immediately. If you are the intended recipient of this communication you should not copy, disclose or distribute this communication without the authority of Ernst & Young. Any views expressed in this Communication are those of the individual sender, except where the sender specifically states them to be the views of Ernst & Young. Except as required at law, Ernst & Young does not represent, warrant and/or guarantee that the integrity of this communication has been maintained nor that the communication is free of errors, virus, interception or interference. Liability limited by the Accountants Scheme, approved under the Professional Standards Act 1994 (NSW) -------------------- If this communication is a "commercial electronic message" (as defined in the Spam Act 2003) and you do not wish to receive communications such as this, please forward this communication to unsubscribe at au.ey.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050707/88248dc2/attachment.html From tuyet.ctn at mscibarra.com Wed Jul 6 19:14:16 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Wed, 6 Jul 2005 16:14:16 -0700 Subject: [Wtr-general] Extract/Parse String? Message-ID: Thanks, Atilla for your suggestion. It turns out there is a simpler way to get what I need and it works just great ( for me: regular expression is worth learning :-)) c = c[/treeframe\d+/] -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050706/272dfcc7/attachment.html From tuyet.ctn at mscibarra.com Wed Jul 6 19:15:34 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Wed, 6 Jul 2005 16:15:34 -0700 Subject: [Wtr-general] Use of WildCard? Message-ID: Thanks, Bret. I appreciate it! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050706/1090ed18/attachment.html From zeljko.filipin at gmail.com Thu Jul 7 06:24:55 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 7 Jul 2005 12:24:55 +0200 Subject: [Wtr-general] Next release ( 1.4) Message-ID: <42cd02c8.49f3ff54.34bd.6a19@mx.gmail.com> Similar bug: HTML: link 1 IRB: irb require 'watir' ie = Watir::IE.attach(:title, //) ie.radios.each { | item | puts item.id } OUTPUT: link_id and it works ok if html is: link 1 -----Original Message----- I looked at tracker at http://rubyforge.org/projects/wtr/ and I did not find this bug (example is for 'id', but I reproduced it also for 'name'): HTML: link 1 IRB: irb require 'watir' ie = Watir::IE.attach(:title, //) ie.checkboxes.each { | item | puts item.id } OUTPUT: link_id From winstonp at BATTELLE.ORG Thu Jul 7 12:50:54 2005 From: winstonp at BATTELLE.ORG (Winston, Phyllis H) Date: Thu, 07 Jul 2005 12:50:54 -0400 Subject: [Wtr-general] :value - Scott Pack Message-ID: <55DDFCF3AB9E5E4A8488FF30D1AA1A2460EDFA@WS-CP-MSE1.milky-way.battelle.org> Maybe this would not need to be fixed for the testers who also develop the html for project web sites, but some of us are not developers. -----Original Message----- From: Paul Rogers [mailto:paul.rogers at shaw.ca] Sent: Saturday, July 02, 2005 12:43 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] :value - Scott Pack Scott, in your earlier post you said that :value wasnt working correctly for checkboxes In the case you supplied ( checkboxes) are you aware that ie.checkbox(:name, 'check1' ,'123' ).click where 123 is the value of the checkbox can be used. The original intent for :value was only for buttons. is there some reason you need :value for check boxes? (maybe you dont have a name attribute in your html?) I can easily fix the bug ( as you've provided the fix already!) but is it something that really needs fixing? Paul From dvshchyokin at hotmail.com Thu Jul 7 15:31:58 2005 From: dvshchyokin at hotmail.com (Daniel Shchyokin) Date: Thu, 07 Jul 2005 19:31:58 +0000 Subject: [Wtr-general] Still having a problem with the capture events Message-ID: In my script I am calling the IE.captureEvents followed by clicking a link that opens a new window. I then set another variable to IE.newWindow... x=IE.newWindow(). but when I try to call a method for x, say x.close(). I get an error stating method could not be found in Nil:nil. I ran the newWindow_test unit test and have the same problem. Any idea of how I can get this to work? email: dvshchyokin at hotmail.com From PRioux at coradiant.com Thu Jul 7 16:49:30 2005 From: PRioux at coradiant.com (PRioux at coradiant.com) Date: Thu, 7 Jul 2005 16:49:30 -0400 Subject: [Wtr-general] Still having a problem with the capture events In-Reply-To: Message-ID: I got it working . Just to be sure this is not a code error but a config problem, here's what i did: @ts.ui.capture_events @ts.ui.button(:value, 'Get Snapshot').click subWin = @ts.ui.newWindow assert(subWin.contains_text('Sessions found: 50')) I think that you mistyped '.capture_events' for 'captureEvents'. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050707/5e4ea179/attachment.html From guru_sc at yahoo.com Thu Jul 7 17:11:32 2005 From: guru_sc at yahoo.com (Guru Subramanyam) Date: Thu, 7 Jul 2005 14:11:32 -0700 (PDT) Subject: [Wtr-general] Proper way to parameterize a test script? Message-ID: <20050707211132.33168.qmail@web80305.mail.yahoo.com> Hi, After defining the constant in the properties file as FOO = :apple how do we reference FOO back in the script that intends to use this constant? Especially if this constant is to be joined with a string, is there some special syntax involved? Regards Guru From guru_sc at yahoo.com Thu Jul 7 17:23:16 2005 From: guru_sc at yahoo.com (Guru Subramanyam) Date: Thu, 7 Jul 2005 14:23:16 -0700 (PDT) Subject: [Wtr-general] Javascript menus In-Reply-To: <72799cd70507061039c191640@mail.gmail.com> Message-ID: <20050707212316.64304.qmail@web80302.mail.yahoo.com> Hi, If I do a view source, I see the "Prospective Students" widget as well. But for some reason, I always get the error that I mentioned Regards Guru --- Chris McMahon wrote: > > > > Step 1: go to the test site: > > > http://www.fortlewis.edu > > > > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1979:in > > > > `object_exist_check': Unable to > > > > locate object, using text and > Prospective > > > > Students > > Odd. It works for me. Are you in fact at the > fortlewis.edu site? If > you do a view source, does the page contain a widget > whose text is " > Prospective Students"? Mine does. > -Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From dvshchyokin at hotmail.com Thu Jul 7 17:23:18 2005 From: dvshchyokin at hotmail.com (Daniel Shchyokin) Date: Thu, 07 Jul 2005 21:23:18 +0000 Subject: [Wtr-general] Still having a problem with the capture events Message-ID: No no, definately a config issue, the code I used is in the unit test newWindow_test.rb, so it definately wasn't code. The reason for typing incorrect method names was typing from memory email: dvshchyokin at hotmail.com From Kim.Alexander at ElPaso.com Thu Jul 7 19:44:44 2005 From: Kim.Alexander at ElPaso.com (Alexander, Kim (Kim)) Date: Thu, 7 Jul 2005 18:44:44 -0500 Subject: [Wtr-general] IE Tabstrip.htc control Message-ID: <51A0D9881DD5F1498CA1AAC9D30AFD2C165D47@corhouexs08m.corp.epec.com> Hello, Were using the IE Tabstrip.htc control in our web application. It's very weird, I've been able to accomplish everything I've wanted with watir up to accessing this control through a frame. Testing our pages outside the frame I'm able to execute javascript to select tabs on the tabstrip with code like below. $ie.goto("javascript:document.Form1.__ucMasterEntityMaintHeader_tabDefau ltTabs_State__.value='3';__doPostBack('ucMasterEntityMaintHeader$tabDefa ultTabs','3')") However when the page is contained in the frame the ie.goto just times out. Code I'm using for frames is below. $ie.frame(:index,1).goto("javascript:document.Form1.__ucMasterEntityMain tHeader_tabDefaultTabs_State__.value='2';__doPostBack('ucMasterEntityMai ntHeader$tabDefaultTabs','2')") Here's the html from the table contatining the tabstrip. \r\n\r\n\tDetail\r\n\tTSP Entities\r\n\tAddresses< /TSNS:Ta b>\r\n\tContact s\r\n\r\n" irb(main):028:0> How can this be done? And is there any advice for testing ie apps that utilize the tabstrip.htc behaviour? Thanks, -- Kim Alexander ****************************************************************** This email and any files transmitted with it from the ElPaso Corporation are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. ****************************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050707/938cb0f3/attachment.html From tuyet.ctn at mscibarra.com Fri Jul 8 15:35:53 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Fri, 8 Jul 2005 12:35:53 -0700 Subject: [Wtr-general] Choosing right attribute? Message-ID: I can't seem to be able to find the right attribute to click on. I want to click on the Export icon (image). This should work, but I got an error Another pair of eyes to look at this would really be appreciated: irb(main):030:0> ie.frame("main").frame("header").image(:src, /icon_export_gif/).click Watir::Exception::UnknownObjectException: Unable to locate object, using src and (?-mix:icon_export_gif) from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1979:in `object_exist_check' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2094:in `click' from (irb):30 Here is the View Source Code:
 Current View: 
  -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050708/0eadc276/attachment.html From zeljko.filipin at gmail.com Fri Jul 8 15:49:04 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 8 Jul 2005 21:49:04 +0200 Subject: [Wtr-general] Choosing right attribute? In-Reply-To: Message-ID: <42ced880.0061b764.33d2.ffff89ae@mx.gmail.com> Try /icon_export.gif/ instead of /icon_export_gif/ _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tuyet Cong-Ton-Nu Sent: Friday, July 08, 2005 9:36 PM To: 'wtr-general at rubyforge.org' Subject: [Wtr-general] Choosing right attribute? I can't seem to be able to find the right attribute to click on. I want to click on the Export icon (image). This should work, but I got an error Another pair of eyes to look at this would really be appreciated: irb(main):030:0> ie.frame("main").frame("header").image(:src, /icon_export_gif/).click Watir::Exception::UnknownObjectException: Unable to locate object, using src and (?-mix:icon_export_gif) from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1979:in `object_exist_check' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2094:in `click' from (irb):30 Here is the View Source Code:
Export  Export 
 Current View: 
  -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050708/cc12b0f9/attachment.html From tuyet.ctn at mscibarra.com Fri Jul 8 15:59:27 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Fri, 8 Jul 2005 12:59:27 -0700 Subject: [Wtr-general] RE: Choosing right attribute? Message-ID: Sorry, I made a typo, but it still didn?t work even with the right syntax: irb(main):035:0> ie.frame("main").frame("header").image(:src, /icon_export.gif/) .click Watir::Exception::UnknownObjectException: Unable to locate object, using src and (?-mix:icon_export.gif) from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1979:in `object_exist_check ' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2094:in `click' from (irb):35 from ?:0 _____ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050708/58643683/attachment.html From shaorobics at gmail.com Fri Jul 8 16:05:00 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Fri, 8 Jul 2005 16:05:00 -0400 Subject: [Wtr-general] Choosing right attribute? In-Reply-To: <42ced880.0061b764.33d2.ffff89ae@mx.gmail.com> References: <42ced880.0061b764.33d2.ffff89ae@mx.gmail.com> Message-ID: <593b9ae8050708130576dd07c6@mail.gmail.com> correct me if I'm wrong, but generally if you have a "." in your reg exp it will match anything. So if you just put /icon_export.gif/ it *might* work if that is the only existing object. For example if you had two images, and they appear on your page in this order icon_export_toSomewhere.gif icon_export.gif it will match the first one because the "." in /icon_export.gif/ means "anything". If you want to get to the 2nd image you should escape the dot: /icon_export\.gif/ I had a similar case where I had to escape the "." because of similar image names. Hope it works Shao On 7/8/05, Zeljko Filipin wrote: > Try /icon_export.gif/ instead of /icon_export_gif/ > ________________________________ > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of > Tuyet Cong-Ton-Nu > Sent: Friday, July 08, 2005 9:36 PM > To: 'wtr-general at rubyforge.org' > Subject: [Wtr-general] Choosing right attribute? > > > > > I can't seem to be able to find the right attribute to click on. I want to > click on the Export icon (image). This should work, but I got an error > > Another pair of eyes to look at this would really be appreciated: > > irb(main):030:0> > ie.frame("main").frame("header").image(:src, > /icon_export_gif/).click > > Watir::Exception::UnknownObjectException: Unable to locate > object, using src and > > (?-mix:icon_export_gif) > > from > C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1979:in > `object_exist_check' > > from > C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2094:in `click' > > from (irb):30 > > > > Here is the View Source Code: > > onLoad="JavaScript:onLoad(currentViewName);"> > >
Export  Export 
border=0> > > > > > > > >
width="50%"> > > height="100%" cellpadding=0 cellspacing=0 border=0> > > > > > > > > > > > > > >
 Current > View:  value="" readonly size="48"/> type="button" value="..." > onClick="javascript:selectCustomReport()"/>
> >
width="50%">  align="right"> > > height="100%" cellpadding="0" cellspacing="0" border="0"> > > > > > > > > > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > From tuyet.ctn at mscibarra.com Fri Jul 8 16:41:48 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Fri, 8 Jul 2005 13:41:48 -0700 Subject: [Wtr-general] RE: Choosing right attribute? Message-ID: Thank you Shao. Alas, your good suggestion didn't work either. irb(main):037:0> ie.frame("main").frame("header").image(:src, /icon_export\.gif/).click Watir::Exception::UnknownObjectException: Unable to locate object, using src and (?-mix:icon_export\.gif) from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1979:in `object_exist_check' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2094:in `click' from (irb):37 from :0 I am suspecting that maybe there is another frame below "header" that this icon_export.gif lives. When I do this command: ie.frame("main").frame("header").getHTML I don't see the icon_export.gif in the result; however, it shows up when I do View Source Code for that page. I am not sure how to go about finding if there is another frame that this icon belongs to. Any suggestion is appreciated. Thanks. _____ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050708/a659a9ee/attachment.html From christopher.mcmahon at gmail.com Fri Jul 8 16:52:49 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 8 Jul 2005 15:52:49 -0500 Subject: [Wtr-general] RE: Choosing right attribute? In-Reply-To: References: Message-ID: <72799cd7050708135217830c7@mail.gmail.com> On 7/8/05, Tuyet Cong-Ton-Nu wrote: > > > > Thank you Shao. Alas, your good suggestion didn't work either. > > irb(main):037:0> > ie.frame("main").frame("header").image(:src, > /icon_export\.gif/).click I think I've encountered this before, and had to specify the full pathname for :src, for instance "C:\web\images\icon_export.gif", or whatever the real source is. Could you address the image by means other than :src? -Chris From tuyet.ctn at mscibarra.com Fri Jul 8 17:00:32 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Fri, 8 Jul 2005 14:00:32 -0700 Subject: [Wtr-general] FW: Choosing right attribute? Message-ID: I finally talked to the Engineer that wrote the code, and she suggested this command that did the job (whew!): irb(main):048:0> ie.frame("main").frame("body").frame("tabs").image(:src, /icon_customize.gif/).click What I don't understand is why this didn't show up when I did the show_frames command for "body"? irb(main):045:0> ie.frame("main").frame("body").show_frames there are 0 frames => 0..-1 Hmm! How would have I found out about the existence of the "tabs" frame? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050708/75ae9628/attachment.html From ramanjaneya.reddy at applabs.com Sat Jul 9 05:20:29 2005 From: ramanjaneya.reddy at applabs.com (Ramanjaneya) Date: Sat, 9 Jul 2005 14:50:29 +0530 Subject: [Wtr-general] How to use methods of different modules in a single .rb file Message-ID: Hi: We just started using Watir tool to automate one of WebApplications. While we start using Watir too, we got few doubts which are described below. Would be great help for us if you can clarify our doubts mentioned below. 1. In Watir API reference guide, what is the Top layer class(I mean Watir::FactoryMethods or Watir.IE or Watir:Simple or anyother)? 2. Please see the below code: ======================================== require 'watir' include Watir a = Watir::IE.new a.goto("http://172.16.6.74/sample/index.php") a.text_field(:name, "user_name").set("admin") a.text_field(:name, "user_password").set("admin") ======================================== (a). In the above code, after last line of code, if I want use the "assert_text_in_field()" which is in module "Watir::Simple", what should I need to do? What I did for the above is:(but not succeeded) Included the two lines of following code at the start: ======================================== require 'watir' include Watir require 'Watir_simple.rb' include Simple a = Watir::IE.new a.goto("http://172.16.6.74/sample/index.php") a.text_field(:name, "user_name").set("admin") a.text_field(:name, "user_password").set("admin") a.assert_text_in_filed("user_name", "Ramanjaneya") =========================================== But the above code is not working. It is throwing error message: Undefined method assert_text_in_filed. (b). The above (a) doubt is specific. In general speaking if we want to use different methods of different modules how we need to proceed? 3. Watir guide thats provided in website is not that much helpful in providing examples. Would be great if you can provide some real time examples' code so that we can walk through the code to understand how to use the watir tool. or atleast would be great help for atleast if you can tell me where i can find. Thanks a lot in advance for your valuable time in helping us out. Thanks & Regards, Ramanjaneya Reddy. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050709/a3316ba1/attachment.html From scott at hanselman.com Sat Jul 9 13:35:38 2005 From: scott at hanselman.com (Scott Hanselman) Date: Sat, 9 Jul 2005 10:35:38 -0700 Subject: [Wtr-general] How to use methods of different modules in a single.rb file In-Reply-To: Message-ID: This initially confused me as well. I believe Ram's root question is: * How can I easily use both Watir and Watir_simple methods side by side. Because Watir::Simple expects that you get/initialized the IE handle from it, you can't use its methods without initializing/cheating by init'ing its browser instance. This seems to be a common question to me.folks look in the API doc, and notice how easy the Simple methods are. They start with a non-simple example and thing the API docs are a library of "statics" they can call anytime. Then they start calling Simple methods. Why not add a method to Simple to "set" its browser instance or come up with some way these APIs can be more interchangeable? Scott _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ramanjaneya Sent: Saturday, July 09, 2005 2:20 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] How to use methods of different modules in a single.rb file Hi: We just started using Watir tool to automate one of WebApplications. While we start using Watir too, we got few doubts which are described below. Would be great help for us if you can clarify our doubts mentioned below. 1. In Watir API reference guide, what is the Top layer class(I mean Watir::FactoryMethods or Watir.IE or Watir:Simple or anyother)? 2. Please see the below code: ======================================== require 'watir' include Watir a = Watir::IE.new a.goto(" http://172.16.6.74/sample/index.php") a.text_field(:name, "user_name").set("admin") a.text_field(:name, "user_password").set("admin") ======================================== (a). In the above code, after last line of code, if I want use the "assert_text_in_field()" which is in module "Watir::Simple", what should I need to do? What I did for the above is:(but not succeeded) Included the two lines of following code at the start: ======================================== require 'watir' include Watir require 'Watir_simple.rb' include Simple a = Watir::IE.new a.goto(" http://172.16.6.74/sample/index.php") a.text_field(:name, "user_name").set("admin") a.text_field(:name, "user_password").set("admin") a.assert_text_in_filed("user_name", "Ramanjaneya") =========================================== But the above code is not working. It is throwing error message: Undefined method assert_text_in_filed. (b). The above (a) doubt is specific. In general speaking if we want to use different methods of different modules how we need to proceed? 3. Watir guide thats provided in website is not that much helpful in providing examples. Would be great if you can provide some real time examples' code so that we can walk through the code to understand how to use the watir tool. or atleast would be great help for atleast if you can tell me where i can find. Thanks a lot in advance for your valuable time in helping us out. Thanks & Regards, Ramanjaneya Reddy. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050709/968602ac/attachment.html From paul.rogers at shaw.ca Sun Jul 10 14:19:29 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sun, 10 Jul 2005 12:19:29 -0600 Subject: [Wtr-general] supported classes In-Reply-To: <5.1.0.14.2.20050706125013.033dc788@127.0.0.1> Message-ID: <004d01c5857b$e9b8a130$6400a8c0@NewDell> I think that will work just fine. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 06 July 2005 11:53 To: wtr-general at rubyforge.org Subject: [Wtr-general] supported classes My view is that classes and methods that have comments like this # This is not a class that users would normally access. should be read as indicating that they are not exposing published interfaces. The Elements / ObjectActions class has this comment. Bret _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Sun Jul 10 15:48:12 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sun, 10 Jul 2005 13:48:12 -0600 Subject: [Wtr-general] Next release ( 1.4) In-Reply-To: <42cd02c8.49f3ff54.34bd.6a19@mx.gmail.com> Message-ID: <005401c58588$4e885090$6400a8c0@NewDell> This looks to be the same bug that was reported a week or 2 back. Its been fixed and is checked Thanks! Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 07 July 2005 04:25 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Next release ( 1.4) Similar bug: HTML: link 1 IRB: irb require 'watir' ie = Watir::IE.attach(:title, //) ie.radios.each { | item | puts item.id } OUTPUT: link_id and it works ok if html is: link 1 -----Original Message----- I looked at tracker at http://rubyforge.org/projects/wtr/ and I did not find this bug (example is for 'id', but I reproduced it also for 'name'): HTML: link 1 IRB: irb require 'watir' ie = Watir::IE.attach(:title, //) ie.checkboxes.each { | item | puts item.id } OUTPUT: link_id _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Sun Jul 10 18:58:22 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sun, 10 Jul 2005 17:58:22 -0500 Subject: [Wtr-general] RE: Choosing right attribute? In-Reply-To: Message-ID: <5.1.0.14.2.20050710175751.0339fce0@127.0.0.1> At 03:41 PM 7/8/2005, Tuyet Cong-Ton-Nu wrote: >When I do this command: ie.frame("main").frame("header").getHTML > >I don't see the icon_export.gif in the result; however, it shows up when I >do View Source Code for that page. That would indicate that it is in the top document, not a frame. _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Mon Jul 11 13:03:29 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 11 Jul 2005 11:03:29 -0600 Subject: [Wtr-general] Problems with Watir test class In-Reply-To: Message-ID: <006501c5863a$76082e80$6400a8c0@NewDell> I only have time for a quick glance through, but.. 1. are you using the begin assert rescue in login correctly? I think you may need to do something differnet 2. i dont think test::unit uses the initialize method - setup gets called before each test, but for a 'global' kind of setup, Ive always used global vars Hope that helps Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris_Ellis at au.ey.com Sent: 06 July 2005 17:02 To: wtr-general at rubyforge.org Subject: [Wtr-general] Problems with Watir test class This email is to be read subject to the disclaimer below. While evaluating Watir I have written a test class using Watir that works fine when run stand alone with parameters hardcoded. I then tried to write a file that would call the test class and run it, however when I do this all the Asserts fail and I also get an initialisation error message. Despite this the actual script runs fine. It drives my web app and completes the task. I'm new to Ruby so I'm probably missing something simple. Code at the bottom. Here are the errors I get. 1) The initialisation error message initiate search c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:51:in `initialize': wrong number of arguments (1 for 2) (ArgumentError) from c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:51:in `new' from c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:51:in `suite' from c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:50:in `catch' from c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:50:in `suite' from c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:48:in `each' from c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:48:in `suite' from c:/ruby/lib/ruby/1.8/test/unit/collector/objectspace.rb:25:in `collect' from c:/ruby/lib/ruby/1.8/test/unit/collector/objectspace.rb:23:in `each_object' from c:/ruby/lib/ruby/1.8/test/unit/collector/objectspace.rb:23:in `collect' from c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:53 from c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:49:in `[]' from c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:192:in `run' from c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:14:in `run' from c:/ruby/lib/ruby/1.8/test/unit.rb:285 from c:/ruby/lib/ruby/1.8/test/unit.rb:283 wrong number of arguments (1 for 2) c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:51:in `initialize' ####################################################### 2) This is the error the Asserts are giving me. E, [2005-06-27T17:00:42.547000 #120] ERROR -- : TEST FAILED: Logon Failed undefined method `add_assertion' for nil:NilClass c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:115:in `add_assertion' c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:353:in `_wrap_assertion' c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:38:in `assert' ./TaxIntegrator.rb:34:in `test_1_Logon' #Test class file called TaxIntegrator.rb ####################################################### #includes #test::unit includes require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' require 'watir' include Watir #variables $ means its global #$test_site = 'http://localhost/tidev' #open the IE browser class TC_TaxIntegrator < Test::Unit::TestCase def initialize(testSite, logFile) #local class variables are declared with @ @ie = IE.new @ie.goto(testSite) @log = Logger.new(logFile) end #...fill in Test Case methods here... def test_1_Logon(user, pwd) # fill in Watir method and assertion here @ie.text_field(:name, "txtUsername").set(user) @ie.text_field(:name, "txtPassword").set(pwd) @ie.button(:name, "btnLogon").click begin assert(@ie.getObject(:name, "FrameMenu")) @log.info("TEST PASSED: Logon successful") rescue => e @log.error("TEST FAILED: Logon Failed " + e.message + "\n" + e.backtrace.join("\n")) end end def test_2_CreateFolio(folioName) @ie.frame(:name, "FrameMenu").link(:text, "Tax Folio Selection").click begin assert(@ie.frame(:name, "FrameMain").contains_text("Tax Folio Selection")) @log.info("TEST PASSED: Navigation Tax Folio Selection successful") rescue => e @log.error("TEST FAILED: Screen Navigation - Tax Folio Selection") end @ie.frame(:name, "FrameMain").button(:id, "btnNewDataCycle").click begin assert(@ie.frame(:name, "FrameMain").contains_text("New Tax Folio Search")) @log.info("TEST PASSED: Navigation New Tax Folio Search successful") rescue => e @log.error("TEST FAILED: Screen Navigation - New Tax Folio Search") end @ie.frame(:name, "FrameMain").select_list( :id , "FolioClassID").select("Australian Company") @ie.frame(:name, "FrameMain").select_list( :id , "ConsolidationTypeID1").select("Normal") @ie.frame(:name, "FrameMain").button(:id, "btnSearch").click puts "initiate search" begin assert(@ie.frame(:name, "FrameMain").contains_text("Chris Template Group2")) @log.info("TEST PASSED: Search successful") rescue => e @log.error("TEST FAILED: Search Failed") end # Click first element in the table to navigate to the new folio screen # this line says click cell 2 of Row 1 in table 7 which is the tblData table on this screen @ie.frame(:name, "FrameMain").table(:index, 7)[1][2].click begin assert(@ie.frame(:name, "FrameMain").contains_text("New Tax Folio")) @log.info("TEST PASSED: Navigation to New Tax Folio Successful") rescue => e @log.error("TEST FAILED: Navigation Failed - New Tax Folio") end @log.close end end # Driver file called TestContainer.rb #################################################### require 'TaxIntegrator' $test_site = 'http://localhost/tidev' aTest = TC_TaxIntegrator.new($test_site, 'MyLog.log') aTest.test_1_Logon('ce','ce') aTest.test_2_CreateFolio('My New Folio') -------------------- NOTICE - This communication contains information which is confidential and the copyright of Ernst & Young or a third party. If you are not the intended recipient of this communication please delete and destroy all copies and telephone Ernst & Young on 1800 655 717 immediately. If you are the intended recipient of this communication you should not copy, disclose or distribute this communication without the authority of Ernst & Young. Any views expressed in this Communication are those of the individual sender, except where the sender specifically states them to be the views of Ernst & Young. Except as required at law, Ernst & Young does not represent, warrant and/or guarantee that the integrity of this communication has been maintained nor that the communication is free of errors, virus, interception or interference. Liability limited by the Accountants Scheme, approved under the Professional Standards Act 1994 (NSW) -------------------- If this communication is a "commercial electronic message" (as defined in the Spam Act 2003) and you do not wish to receive communications such as this, please forward this communication to unsubscribe at au.ey.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050711/476391af/attachment.html From paul.rogers at shaw.ca Mon Jul 11 13:04:42 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 11 Jul 2005 11:04:42 -0600 Subject: [Wtr-general] Next release ( 1.4) In-Reply-To: <5.1.0.14.2.20050706101010.033949b8@127.0.0.1> Message-ID: <006a01c5863a$a1ac83b0$6400a8c0@NewDell> What do you think we should remove? The methods that do the default atribute stuff and the unit tests? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 06 July 2005 09:11 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Next release ( 1.4) At 10:09 PM 7/5/2005, Paul Rogers wrote: > can now specify a default attribute, eg > ie.default_attribute = :id > ie.text_field( 'abc1').set('Testing') > there is also a default for particular element types, > ie.set_default_attribute_for_element( :button , :id) > ie.button( 'b1').click I think there are problems with both the interface and the implementation of this. I've worked some on fixing these, but have more work to do. I suggest removing this from the release so that we don't commit ourselves to an interface we don't plan to support. Bret _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Mon Jul 11 13:09:02 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 11 Jul 2005 11:09:02 -0600 Subject: [Wtr-general] supported classes In-Reply-To: <004d01c5857b$e9b8a130$6400a8c0@NewDell> Message-ID: <006b01c5863b$3c83f300$6400a8c0@NewDell> What I mean here is that I think it wrong for us to hide some of the classes, as one of rubys great powers is the ability to extend classes. I would rather not restrict people from doing it, but at the same time I also don't want to make people rewrite their code everytime we do a release, so a warning like this at least makes people aware that the class may change. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: 10 July 2005 12:19 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] supported classes I think that will work just fine. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 06 July 2005 11:53 To: wtr-general at rubyforge.org Subject: [Wtr-general] supported classes My view is that classes and methods that have comments like this # This is not a class that users would normally access. should be read as indicating that they are not exposing published interfaces. The Elements / ObjectActions class has this comment. Bret _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Mon Jul 11 13:10:27 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 11 Jul 2005 11:10:27 -0600 Subject: [Wtr-general] How to use methods of different modules in asingle.rb file In-Reply-To: Message-ID: <006c01c5863b$6fba9b20$6400a8c0@NewDell> I think that makes sense. I think we also really need to add some unit tests and also recreate the samples using watir::simple. I doubt that will happen for the next release though Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Scott Hanselman Sent: 09 July 2005 11:36 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] How to use methods of different modules in asingle.rb file This initially confused me as well. I believe Ram's root question is: * How can I easily use both Watir and Watir_simple methods side by side. Because Watir::Simple expects that you get/initialized the IE handle from it, you can't use its methods without initializing/cheating by init'ing its browser instance. This seems to be a common question to me.folks look in the API doc, and notice how easy the Simple methods are. They start with a non-simple example and thing the API docs are a library of "statics" they can call anytime. Then they start calling Simple methods. Why not add a method to Simple to "set" its browser instance or come up with some way these APIs can be more interchangeable? Scott _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ramanjaneya Sent: Saturday, July 09, 2005 2:20 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] How to use methods of different modules in a single.rb file Hi: We just started using Watir tool to automate one of WebApplications. While we start using Watir too, we got few doubts which are described below. Would be great help for us if you can clarify our doubts mentioned below. 1. In Watir API reference guide, what is the Top layer class(I mean Watir::FactoryMethods or Watir.IE or Watir:Simple or anyother)? 2. Please see the below code: ======================================== require 'watir' include Watir a = Watir::IE.new a.goto(" http://172.16.6.74/sample/index.php") a.text_field(:name, "user_name").set("admin") a.text_field(:name, "user_password").set("admin") ======================================== (a). In the above code, after last line of code, if I want use the "assert_text_in_field()" which is in module "Watir::Simple", what should I need to do? What I did for the above is:(but not succeeded) Included the two lines of following code at the start: ======================================== require 'watir' include Watir require 'Watir_simple.rb' include Simple a = Watir::IE.new a.goto(" http://172.16.6.74/sample/index.php") a.text_field(:name, "user_name").set("admin") a.text_field(:name, "user_password").set("admin") a.assert_text_in_filed("user_name", "Ramanjaneya") =========================================== But the above code is not working. It is throwing error message: Undefined method assert_text_in_filed. (b). The above (a) doubt is specific. In general speaking if we want to use different methods of different modules how we need to proceed? 3. Watir guide thats provided in website is not that much helpful in providing examples. Would be great if you can provide some real time examples' code so that we can walk through the code to understand how to use the watir tool. or atleast would be great help for atleast if you can tell me where i can find. Thanks a lot in advance for your valuable time in helping us out. Thanks & Regards, Ramanjaneya Reddy. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050711/b9bbbc58/attachment.html From tuyet.ctn at mscibarra.com Mon Jul 11 15:11:24 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Mon, 11 Jul 2005 12:11:24 -0700 Subject: [Wtr-general] error in waitUnknown property or method `document' Message-ID: This statement executes just fine when looking at the GUI, but the command prompt shows a warning. I am not sure what to fix since it does click the MMIM object just fine. irb(main):005:0> ie.frame(:name, "portfolioTreeContent").frame(:name, treeframe).link(:text, /MMIM/).click W, [11-Jul-2005 12:08:56#552] WARN -- : frame error in waitUnknown property or method `document' HRESULT error code:0x80010108 The object invoked has disconnected from its clients. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1470:in `method_missing' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1470:in `wait' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1469:in `upto' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1469:in `wait' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `wait' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1849:in `waitForIE' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2099:in `click' (irb):5:in `irb_binding' C:/ruby/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding' :0 W, [11-Jul-2005 12:08:56#552] WARN -- : runtime error in wait -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050711/94600423/attachment.html From bret at pettichord.com Mon Jul 11 17:38:52 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 11 Jul 2005 16:38:52 -0500 Subject: [Wtr-general] Next release ( 1.4) In-Reply-To: <006a01c5863a$a1ac83b0$6400a8c0@NewDell> References: <5.1.0.14.2.20050706101010.033949b8@127.0.0.1> Message-ID: <5.1.0.14.2.20050711163141.031aa948@127.0.0.1> At 12:04 PM 7/11/2005, Paul Rogers wrote: >What do you think we should remove? The methods that do the default >atribute stuff and the unit tests? Yes. The way i'd do it would be to tag HEAD ("default_attribute_stuff"), then delete the methods and tests. At some future date, someone can easily find this code and continue working on it. Just to be clear, my main issue with this is that many of our objects already have built in defaults (e.g. buttons are value, frames are names). I think the new interface should encapsulate this legacy behavior, rather than add yet another default mechanism on top of it. Thus for a generic ie, ie.default_attributes would return {:button => :value, :frame => :name, ...} I'm also unsure whether the keys should be these index values or the classes themselves ({Button => :value, Frame => :name}), and that makes me wonder whether the defaulting should be done at the class level or at the IE level. But any of these ideas requires some increased consistency in the existing code before they could be implemented. Since the default mechanism is really just a convenience mechanism, i think that it is important that it actually be done cleanly, otherwise it just adds needsless confusion. (I also think the method names are wrong, but that would be easy to fix.) Bret _____________________ Bret Pettichord www.pettichord.com From tuyet.ctn at mscibarra.com Mon Jul 11 18:43:44 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Mon, 11 Jul 2005 15:43:44 -0700 Subject: [Wtr-general] Maximize IE Message-ID: I don't know why when I use the goto to launch my application, it always comes up not fully maximized. However, when I do launch it from clicking on the IE icon on my desktop and typing in the url, the window is fully maximized. I am Puzzled?? Is there a way to maximize IE within a .rb script? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050711/6362bc01/attachment.html From tuyet.ctn at mscibarra.com Mon Jul 11 19:45:36 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Mon, 11 Jul 2005 16:45:36 -0700 Subject: [Wtr-general] Exists? Supported for frames? Message-ID: in irb mode as well as within the script, I got this error when trying to test for exists? for a frame: error result from irb mode: irb(main):009:0> assert(ie.frame("main").exists?) > NoMethodError: undefined method `exists?' for # > from (irb):9 > from C:/ruby/lib/ruby/1.8/test/unit/assertions.rb:95 error result from running a script: C:\watir\watir>analysis.rb Loaded suite C:/watir/watir/Analysis Started Started thread for win helper E Finished in 14.516 seconds. 1) Error: test_Login1(TC_Login): NoMethodError: undefined method `exists?' for # C:/watir/watir/Analysis.rb:53:in `test_Login1' 1 tests, 0 assertions, 0 failures, 1 errors Does exists? work for a frame? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050711/b4ab0432/attachment.html From Jan.Montano at thomson.com Tue Jul 12 04:06:19 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Tue, 12 Jul 2005 16:06:19 +0800 Subject: [Wtr-general] image.click Message-ID: <71EA7CA4B789864F9B3AC722A7F016B68DBE62@tfphmanilmul01.ERF.THOMSON.COM> HI! Why can't i get this one work. $ie.image(:name,"imgTest").click is there anything wrong with this one? i also tried src, id. but still no luck. I know that this object is existing because I tried show_all_objects and this image is listed. Thanks Jan M. Montano Lead QA / Developer Regional Application Development Thomson (Philippines) Corporation 18th Floor Ayala Life - FGU Center 6811 Ayala Ave., Makati City Philippines (632) 878-5890 From zeljko.filipin at gmail.com Tue Jul 12 04:48:52 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 12 Jul 2005 10:48:52 +0200 Subject: [Wtr-general] image.click In-Reply-To: <71EA7CA4B789864F9B3AC722A7F016B68DBE62@tfphmanilmul01.ERF.THOMSON.COM> Message-ID: <42d383c4.3f4e851c.5f6b.1413@mx.gmail.com> What do you mean by "can't i get this one work"? Nothing happens? Try ie.image(:name,"imgTest").flash to flash image. What do you want to do? Do you want to fire javascript event (fire_event(event) should help ) or is this image a submit button? If image is button this should list it: ie.buttons.each { |i| puts "\n#{i.to_s}" } and then acces it like it is a button (ie.button(:name,"imgTest").click). This will list all images at page with properties ('\n' is there just to separate images): ie.images.each { |i| puts "\n#{i.to_s}" } Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jan.Montano at thomson.com Sent: Tuesday, July 12, 2005 10:06 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] image.click HI! Why can't i get this one work. $ie.image(:name,"imgTest").click is there anything wrong with this one? i also tried src, id. but still no luck. I know that this object is existing because I tried show_all_objects and this image is listed. Thanks Jan M. Montano Lead QA / Developer Regional Application Development Thomson (Philippines) Corporation 18th Floor Ayala Life - FGU Center 6811 Ayala Ave., Makati City Philippines (632) 878-5890 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From roehrl at sulzer.de Tue Jul 12 08:11:42 2005 From: roehrl at sulzer.de (Armin Roehrl) Date: Tue, 12 Jul 2005 14:11:42 +0200 Subject: [Wtr-general] helper.logon hangs Message-ID: <42D3B37E.3020802@sulzer.de> Dear all, I have to automatically monitor a "buggy" webapplication, which requires an initial pop-up window authorisation to be filled out. My problem is that it works fine for a test application, but for my buggy application the script passes the authorisation, but the WindowHelper-Thread (a) never finishes. I tried to add a timeout to the logon method, but it did not work. Similar to the WindowLogonExample.rb in the unittestdir I use two threads. .. a = Thread.new { system('ruby LogonExtra.rb') } b = Thread.new { goto_login_page() } .. LogonExtra.rb looks like: -- helper = WindowHelper.new helper.logon('Cognos', 'xxx', 'xx') -- Thank you for your help, -A From bret at pettichord.com Tue Jul 12 09:53:51 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 12 Jul 2005 08:53:51 -0500 Subject: [Wtr-general] Exists? Supported for frames? In-Reply-To: Message-ID: <5.1.0.14.2.20050712085307.03423af0@127.0.0.1> exists? does not work for frames. In this case, you can just do: assert(ie.frame("main")) At 06:45 PM 7/11/2005, Tuyet Cong-Ton-Nu wrote: >in irb mode as well as within the script, I got this error when trying to >test for exists? for a frame: > > > > > >error result from irb mode: > >irb(main):009:0> assert(ie.frame("main").exists?) > > > NoMethodError: undefined method `exists?' for # > > > from (irb):9 > > > from C:/ruby/lib/ruby/1.8/test/unit/assertions.rb:95 > > > > > >error result from running a script: > > > >C:\watir\watir>analysis.rb > >Loaded suite C:/watir/watir/Analysis > >Started > >Started thread for win helper > >E > >Finished in 14.516 seconds. > > > > 1) Error: > >test_Login1(TC_Login): > >NoMethodError: undefined method `exists?' for # > > C:/watir/watir/Analysis.rb:53:in `test_Login1' > > > >1 tests, 0 assertions, 0 failures, 1 errors > > > >Does exists? work for a frame? > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From tuyet.ctn at mscibarra.com Tue Jul 12 17:14:24 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Tue, 12 Jul 2005 14:14:24 -0700 Subject: [Wtr-general] Select using Value Message-ID: I want to use the value rather than the text since the text has spaces in it, but I don't know if doing select by value is supported since I got an error: irb(main):017:0> ie.frame("customizeRemoteContent").select_list(:id, "availableColumnsSelectBox").select("|SYSTEM|AUSTRALIAN").fire_event("ondblc lick") Watir::Exception::NoValueFoundException: Selectbox was found, but didn't find it em with text of |SYSTEM|AUSTRALIAN from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3306:in `select_item_in_sel ect_list' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3284:in `each' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3284:in `select_item_in_sel ect_list' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3261:in `select' from (irb):17 from :0 I also tried using the text but don't know how to handle the spaces (please see HTML below this)? irb(main):014:0> ie.frame("customizeRemoteContent").select_list(:id, "availableColumnsSelectBox").select(" AUSTRALIAN").fire_event("ondblclick") Watir::Exception::NoValueFoundException: Selectbox was found, but didn't find it em with text of AUSTRALIAN from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3306:in `select_item_in_sel ect_list' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3284:in `each' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3284:in `select_item_in_sel ect_list' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3261:in `select' from (irb):14 from :0 HTML: : 300px\" name=\"availableDiv\">\r\n\r\n\r\n\r\n\r\n
> > > onclick="javascript:onClickExport();" > > > alt="Export" > onMouseOver="window.status='Export'; return true"/> > > > href="javascript:onClickExport();" > onMouseOver="window.status='Export'; return true" > > Export   Settings\\t >uyet\\Desktop\\Import.csv\" name=selClientFileName_1> class= >rightBorder> style=\"BORDE >R-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; WIDTH: 220px; >BORDER-BOTTOM: 0p >x; TEXT-ALIGN: left\" onchange=\"javascript:onChangeFileName('1');\" >value=Import.csv name=fileName_1> class=tabularReportLightRow id=filePath_1 style=\"BORDER-RIGHT: 0px; >BORDER-TOP: 0px; BORDER-L >EFT: 0px; WIDTH: 220px; BORDER-BOTTOM: 0px; TEXT-ALIGN: left\" >onchange=\"javascript:onChangeFilePath('1');\" value=\"C:\\Documents and >Settings\\tuyet\\Desktop\\\" name=filePath_1>class=rightBorder> and Im happy for reset to go in as a button, it reduces the code size, my only concern is that we would break existing code that uses buttons and indexes. Paul ----- Original Message ----- From: Bret Pettichord Date: Monday, July 18, 2005 1:56 pm Subject: Re: [Wtr-general] ie.buttons > At 01:44 PM 7/18/2005, Paul Rogers wrote: > >its technically a different element. > > I'm not sure what you mean by that. Isn't a submit and a button > technically > different elements? > > Bret > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From bret at pettichord.com Tue Jul 19 00:17:56 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 18 Jul 2005 23:17:56 -0500 Subject: [Wtr-general] Autoit vs. Winclicker In-Reply-To: <42DC1941.60605@qantom.com> References: Message-ID: <5.1.0.14.2.20050718231717.032abdf0@127.0.0.1> If Winclicker works for you, great! Some people have had trouble with it and we think moving to Autoit will give more reliability. Bret At 04:04 PM 7/18/2005, Raghu Venkataramana wrote: >Going through many past threads, it appears that the implementation of >clicking on IE's dialog boxes will be completely shifted to AutoIt. What >I am not fully able to understand is why! We have been able to close (or >enter data) on all the popup windows that were being shown in our >application. Is there any particular type of windows / objects that are >known to give problems which is driving the shift towards AutoIT? If not, >why not use the Winclicker class that comes with Waitr to perform various >window related operations ? > >Please advice > >Raghu > >_______________________________________________ >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 Tue Jul 19 00:21:41 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 18 Jul 2005 23:21:41 -0500 Subject: [Wtr-general] ie.buttons In-Reply-To: <129744212969d7.12969d71297442@shaw.ca> Message-ID: <5.1.0.14.2.20050718232031.032dcc78@127.0.0.1> At 11:15 PM 7/18/2005, Paul Rogers wrote: >you're right they are. We also use the same watir object - text_field to >handle both and > >Im happy for reset to go in as a button, it reduces the code size, my only >concern is that we would break existing code that uses buttons and indexes. > >Paul I say do it. In general, i always consider using :index to be an ugly hack when nothing else will work. _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Tue Jul 19 00:29:15 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 18 Jul 2005 22:29:15 -0600 Subject: [Wtr-general] ie.buttons Message-ID: <1295adc129a89c.129a89c1295adc@shaw.ca> yep! Get those developers to add decent tags that are useful is what I say! Paul ----- Original Message ----- From: Bret Pettichord Date: Monday, July 18, 2005 10:21 pm Subject: Re: [Wtr-general] ie.buttons > At 11:15 PM 7/18/2005, Paul Rogers wrote: > >you're right they are. We also use the same watir object - > text_field to > >handle both and > > > >Im happy for reset to go in as a button, it reduces the code > size, my only > >concern is that we would break existing code that uses buttons > and indexes. > > > >Paul > > I say do it. In general, i always consider using :index to be an > ugly hack > when nothing else will work. > > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From zeljko.filipin at gmail.com Tue Jul 19 07:34:08 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 19 Jul 2005 13:34:08 +0200 Subject: [Wtr-general] checkbox.to_s does not display "checked?" property Message-ID: <42dce4fb.46010e4d.5d3e.ffffc0a3@mx.gmail.com> I think "checked?" property should be added to checkbox.to_s Zeljko From shaorobics at gmail.com Tue Jul 19 11:44:20 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Tue, 19 Jul 2005 11:44:20 -0400 Subject: [Wtr-general] IFrames Message-ID: <593b9ae805071908443a285fe0@mail.gmail.com> I've done a search on watir & IFrames...came across: http://groups-beta.google.com/group/comp.lang.ruby/browse_thread/thread/e197a7fc8dec5e37/ doesn't help much though. Has anyone gotten watir to access iframes properly? I've tried: ie.showAllObjects - doesn't catch it either. It does show the js file that generates the form in that frame though, but not much help otherwise. Any "Suggestments" ? Shao From paul.rogers at shaw.ca Tue Jul 19 13:31:22 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 19 Jul 2005 11:31:22 -0600 Subject: [Wtr-general] IFrames Message-ID: <13304b41336893.133689313304b4@shaw.ca> there are some unittests for iframes, is there a particular problem? Paul ----- Original Message ----- From: Shao Kang Tat Date: Tuesday, July 19, 2005 9:44 am Subject: [Wtr-general] IFrames > I've done a search on watir & IFrames...came across: > > http://groups- > beta.google.com/group/comp.lang.ruby/browse_thread/thread/e197a7fc8dec5e37/ > > doesn't help much though. Has anyone gotten watir to access > iframes properly? > > I've tried: ie.showAllObjects - doesn't catch it either. It does show > the js file that generates the form in that frame though, but not much > help otherwise. Any "Suggestments" ? > > Shao > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From benjotorres at yahoo.com Tue Jul 19 17:21:46 2005 From: benjotorres at yahoo.com (Ben Torres) Date: Tue, 19 Jul 2005 14:21:46 -0700 (PDT) Subject: [Wtr-general] Tabbing through website Message-ID: <20050719212146.56255.qmail@web52408.mail.yahoo.com> Hi, I am new to both Ruby and Watir and was wondering if there is a way to send the key for my scripts. I am unable to locate a file field by using :name, so the only way I can think of, is to just simulate hitting the tab key to get to the field. Is there a TypeKeys function I can use in Watir? Thanks, Ben __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050719/e33ab2d2/attachment.html From scott at hanselman.com Tue Jul 19 17:40:21 2005 From: scott at hanselman.com (Scott Hanselman) Date: Tue, 19 Jul 2005 14:40:21 -0700 Subject: [Wtr-general] Tabbing through website In-Reply-To: <20050719212146.56255.qmail@web52408.mail.yahoo.com> Message-ID: You might be able to FireEvent("onblur") then FireEvent("onfocus") to get the same effect, unless your javascript is truly looking at keydowns. Scott _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ben Torres Sent: Tuesday, July 19, 2005 2:22 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Tabbing through website Hi, I am new to both Ruby and Watir and was wondering if there is a way to send the key for my scripts. I am unable to locate a file field by using :name, so the only way I can think of, is to just simulate hitting the tab key to get to the field. Is there a TypeKeys function I can use in Watir? Thanks, Ben __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050719/5f500015/attachment.html From Tim.Feltham at orion.co.nz Tue Jul 19 18:04:46 2005 From: Tim.Feltham at orion.co.nz (Tim Feltham) Date: Wed, 20 Jul 2005 10:04:46 +1200 Subject: [Wtr-general] JavaScript controls Message-ID: <0FDF67DB50EC904AAEA1B2A83A281050013A8ABA@mail.orion.internal> Howdy, I have a similar login javascript problem that Saud had...except there is no id in the link I have. Is there a way to get around this or does there need to be an id to click the link. Sauds javascript was "button" href="javascript:__doPostBack('btn_dateSearch','')">Search mine is pretty much the same but with no id="btn_dateSearch". Cheers, Tim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050720/fdb7c7d8/attachment.html From bret at pettichord.com Tue Jul 19 18:09:20 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 19 Jul 2005 17:09:20 -0500 Subject: [Wtr-general] JavaScript controls In-Reply-To: <0FDF67DB50EC904AAEA1B2A83A281050013A8ABA@mail.orion.intern al> Message-ID: <5.1.0.14.2.20050719170850.02e06d18@127.0.0.1> ie.link(:text, 'Search').click At 05:04 PM 7/19/2005, Tim Feltham wrote: >Content-class: urn:content-classes:message >Content-Type: multipart/alternative; > boundary="----_=_NextPart_001_01C58CAD.E046E54A" > >Howdy, > >I have a similar login javascript problem that Saud had...except there is >no id in the link I have. Is there a way to get around this or does there >need to be an id to click the link. > >Sauds javascript was > >"button" href="javascript:__doPostBack('btn_dateSearch','')">Search > >mine is pretty much the same but with no id="btn_dateSearch". > >Cheers, >Tim >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From Mark_Cain at rl.gov Tue Jul 19 18:40:48 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Tue, 19 Jul 2005 15:40:48 -0700 Subject: [Wtr-general] Calculating Elapsed Time Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D2DC@EX5V.rl.gov> I adapted this right out of the book (ed 2 pg 665) start = DateTime.now stop = DateTime.now diff = stop - start h,m,s,frac = Date.day_fraction_to_time(diff) s += frac.to_f puts "That's #{h} Hours, #{m} Minutes, #{s} Seconds" Output: That's 4 Minutes, 8.00000270833333 Seconds Hope this helps, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tuyet Cong-Ton-Nu Sent: Monday, July 18, 2005 7:42 PM To: 'wtr-general at rubyforge.org' Subject: [Wtr-general] Calculating Elapsed Time I have this routine that calculates starting time and finished time, but I can't figure out how to get the Elapsed time (finished time - starting time). I messed around with all sorts of permutations, but kept getting "0.00". Any suggestion is appreciated, thanks: require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/windowhelper' require 'login.rb' #this is your test case file MAX_ITERATIONS = 1 result = Test::Unit::TestResult.new MAX_ITERATIONS.times do sleep 3 TC_Login.suite.run(result) do |s, name| puts "Status=#{s} and name = #{name}" time = Time.now.strftime("%m %d %Y %H %M %S") puts "Time(MMDDYYYYhhmmss=#{time}" end puts result.to_s puts result.failure_count end exit! _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From sgtn2000 at gmail.com Tue Jul 19 19:25:44 2005 From: sgtn2000 at gmail.com (Sean Gallagher) Date: Tue, 19 Jul 2005 16:25:44 -0700 Subject: [Wtr-general] Calculating Elapsed Time In-Reply-To: References: Message-ID: <7f8ae47d050719162514ab64f4@mail.gmail.com> Check out this article: http://www.informit.com/articles/printerfriendly.asp?p=370634 There is a description of gathering performance metrics that you might find helpful. -sean On 7/18/05, Tuyet Cong-Ton-Nu wrote: > I have this routine that calculates starting time and finished time, but I > can't figure out how to get the Elapsed time (finished time - starting > time). > I messed around with all sorts of permutations, but kept getting "0.00". > Any suggestion is appreciated, thanks: > > require 'test/unit' > require 'test/unit/ui/console/testrunner' > require 'watir/windowhelper' > > require 'login.rb' #this is your test case file > > MAX_ITERATIONS = 1 > > result = Test::Unit::TestResult.new > > > MAX_ITERATIONS.times do > sleep 3 > TC_Login.suite.run(result) do |s, name| > puts "Status=#{s} and name = #{name}" > time = Time.now.strftime("%m %d %Y %H %M %S") > puts "Time(MMDDYYYYhhmmss=#{time}" > end > puts result.to_s > puts result.failure_count > > > > > end > > exit! > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From Jan.Montano at thomson.com Tue Jul 19 23:47:12 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Wed, 20 Jul 2005 11:47:12 +0800 Subject: [Wtr-general] does object exist? Message-ID: Is there a method to know if an object exist? I mean without going through the exception handling. for example if $ie.link(...).exist then... Jan M. Montano QA Lead / Developer Regional Application Development Thomson (Philippines) Corporation 18th Floor Ayala Life - FGU Center 6811 Ayala Ave., Makati City Philippines (632) 878-5890 From jared at kilmore.info Wed Jul 20 00:08:18 2005 From: jared at kilmore.info (Jared Quinert) Date: Wed, 20 Jul 2005 14:08:18 +1000 Subject: [Wtr-general] does object exist? In-Reply-To: References: Message-ID: <42DDCE32.8040400@kilmore.info> I get .exists? as a method for a link. If in doubt, try: $ie.link(...).public_methods I was surprised that $ie.link(...).nil? returns false for a non-existent link (although I'm using an older version of Watir). I seem to recall this was touched on in discussion here before? Jared Jan.Montano at thomson.com wrote: >Is there a method to know if an object exist? I mean without going through the exception handling. > >for example if $ie.link(...).exist then... > > > > > >Jan M. Montano >QA Lead / Developer >Regional Application Development >Thomson (Philippines) Corporation >18th Floor Ayala Life - FGU Center >6811 Ayala Ave., Makati City >Philippines >(632) 878-5890 > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > From satti_mg at yahoo.com Wed Jul 20 01:28:01 2005 From: satti_mg at yahoo.com (sathya shankar) Date: Tue, 19 Jul 2005 22:28:01 -0700 (PDT) Subject: [Wtr-general] Tabbing through website In-Reply-To: <20050719212146.56255.qmail@web52408.mail.yahoo.com> Message-ID: <20050720052801.65621.qmail@web33510.mail.mud.yahoo.com> Hi Ben, Use "Autoit" so that u can send any simulated key words from ur scripts. Sathya Shankar --- Ben Torres wrote: > Hi, > > I am new to both Ruby and Watir and was wondering if > there is a way to send the key for my scripts. > I am unable to locate a file field by using :name, > so the only way I can think of, is to just simulate > hitting the tab key to get to the field. Is there a > TypeKeys function I can use in Watir? > > Thanks, > Ben > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From getboni at yahoo.co.in Wed Jul 20 02:45:35 2005 From: getboni at yahoo.co.in (boni uday) Date: Wed, 20 Jul 2005 07:45:35 +0100 (BST) Subject: [Wtr-general] reg the execution of multiple test cases concuttentlly Message-ID: <20050720064535.11020.qmail@web8309.mail.in.yahoo.com> hi I'm currently working on RUBY with WATIR tool. I've written some test scripts using RUBY in order to automate a web-based product. I need to write one test case which invokes all other test cases that are present in the same directory pls help me uday --------------------------------- Free antispam, antivirus and 1GB to save all your messages Only in Yahoo! Mail: http://in.mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050720/8dffc7fc/attachment.html From Jan.Montano at thomson.com Wed Jul 20 03:15:21 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Wed, 20 Jul 2005 15:15:21 +0800 Subject: [Wtr-general] max number of concurrent threads/ie browser spawned Message-ID: What's the maximum number of concurrent threads that watir can handle? And what's the maximum number of browser it could launch? Jan M. Montano QA Lead / Developer Regional Application Development Thomson (Philippines) Corporation 18th Floor Ayala Life - FGU Center 6811 Ayala Ave., Makati City Philippines (632) 878-5890 From ati.ozgur at gmail.com Wed Jul 20 03:30:26 2005 From: ati.ozgur at gmail.com (Atilla Ozgur) Date: Wed, 20 Jul 2005 10:30:26 +0300 Subject: [Wtr-general] reg the execution of multiple test cases concuttentlly In-Reply-To: <20050720064535.11020.qmail@web8309.mail.in.yahoo.com> References: <20050720064535.11020.qmail@web8309.mail.in.yahoo.com> Message-ID: currentFolder = 'D:\\Projects\\Trial\\WatirTests' Dir.chdir(currentFolder) paths = Dir.entries(currentFolder) paths.each{|f| # I do not want to execute my subversion folder files and my common functions if (f =~ /.rb/ && f != 'CommonFunctions.rb') # for debugging purposes not necessary puts f require f end } On 7/20/05, boni uday wrote: > hi > > I'm currently working on RUBY with WATIR tool. I've written some test > scripts > > using RUBY in order to automate a web-based product. > > I need to write one test case which invokes all other test cases that are > > present in the same directory > > pls help me > > uday > > > > ________________________________ > Free antispam, antivirus and 1GB to save all your messages > Only in Yahoo! Mail: http://in.mail.yahoo.com > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > From ati.ozgur at gmail.com Wed Jul 20 03:34:52 2005 From: ati.ozgur at gmail.com (Atilla Ozgur) Date: Wed, 20 Jul 2005 10:34:52 +0300 Subject: [Wtr-general] max number of concurrent threads/ie browser spawned In-Reply-To: References: Message-ID: I think this was discussed before, it is not about Watir but internet explorer. Some people saw 30+ while others saw 40+. I think it is about how much RAM and CPU internet explorer , therefore your tests need. If that is true then, those who test image heavy web sites wouldn't be able to launch a lot of concurrent browser instances. On 7/20/05, Jan.Montano at thomson.com wrote: > What's the maximum number of concurrent threads that watir can handle? > And what's the maximum number of browser it could launch? > > > > Jan M. Montano > QA Lead / Developer > Regional Application Development > Thomson (Philippines) Corporation > 18th Floor Ayala Life - FGU Center > 6811 Ayala Ave., Makati City > Philippines > (632) 878-5890 > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From getboni at yahoo.co.in Wed Jul 20 03:56:09 2005 From: getboni at yahoo.co.in (boni uday) Date: Wed, 20 Jul 2005 08:56:09 +0100 (BST) Subject: [Wtr-general] (no subject) Message-ID: <20050720075609.45236.qmail@web8310.mail.in.yahoo.com> hi how to call 2 or more ruby scripts from a single script.. --------------------------------- How much free photo storage do you get? Store your friends n family photos for FREE with Yahoo! Photos. http://in.photos.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050720/16928269/attachment.html From zeljko.filipin at gmail.com Wed Jul 20 03:59:52 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 20 Jul 2005 09:59:52 +0200 Subject: [Wtr-general] (no subject) In-Reply-To: <20050720075609.45236.qmail@web8310.mail.in.yahoo.com> Message-ID: <42de0443.72d86260.2660.ffff92a2@mx.gmail.com> require 'first_script.rb' require 'second_script.rb' ... Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of boni uday Sent: Wednesday, July 20, 2005 9:56 AM To: ruby form Subject: [Wtr-general] (no subject) hi how to call 2 or more ruby scripts from a single script.. _____ How much free photo storage do you get? Store your friends n family photos for FREE with Yahoo! Photos. http://in.photos.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050720/89c4d022/attachment.html From raghu at qantom.com Wed Jul 20 04:07:50 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Wed, 20 Jul 2005 13:37:50 +0530 Subject: [Wtr-general] (no subject) In-Reply-To: <20050720075609.45236.qmail@web8310.mail.in.yahoo.com> References: <20050720075609.45236.qmail@web8310.mail.in.yahoo.com> Message-ID: <42DE0656.4030105@qantom.com> load('script_path1') load('script_path2', true) from anywhere in the script . (The second boolean variable indicates that you want your current script to 'use' the variables, scoping etc. from the loaded script') Raghu boni uday wrote: > hi > > how to call 2 or more ruby scripts from a single script.. > > ------------------------------------------------------------------------ > How much free photo storage do you get? Store your friends n family > photos for FREE with Yahoo! Photos. > http://in.photos.yahoo.com > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > -- Qantom Software http://www.qantom.com Ph : 26799269 Xtn. 125 sip : raghu at sip411.com -- From getboni at yahoo.co.in Wed Jul 20 04:12:41 2005 From: getboni at yahoo.co.in (boni uday) Date: Wed, 20 Jul 2005 09:12:41 +0100 (BST) Subject: [Wtr-general] Need Help Message-ID: <20050720081241.64273.qmail@web8301.mail.in.yahoo.com> hi all I've written some test scripts in Ruby & executing them Independently I would like to wrtie a script which should invoke all the other scripts & executes them. Pls help me in solve this problem Thank u so much --------------------------------- Free antispam, antivirus and 1GB to save all your messages Only in Yahoo! Mail: http://in.mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050720/9e02b12d/attachment.html From getboni at yahoo.co.in Wed Jul 20 06:07:39 2005 From: getboni at yahoo.co.in (boni uday) Date: Wed, 20 Jul 2005 11:07:39 +0100 (BST) Subject: [Wtr-general] Pls give me the syntax for this situation Message-ID: <20050720100739.59985.qmail@web8307.mail.in.yahoo.com> I've written some scripts in RUBY & executed them indepedently. but i would like to execute 2 or more scripts from a single script (there should be on script which invokes all other scripts & execute them) Pls give me the syntax for this situation Thank u so much --------------------------------- How much free photo storage do you get? Store your friends n family photos for FREE with Yahoo! Photos. http://in.photos.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050720/05989842/attachment.html From zeljko.filipin at gmail.com Wed Jul 20 06:43:32 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 20 Jul 2005 12:43:32 +0200 Subject: [Wtr-general] Pls give me the syntax for this situation In-Reply-To: <20050720100739.59985.qmail@web8307.mail.in.yahoo.com> Message-ID: <42de2aa1.1d26ab97.268d.ffffd621@mx.gmail.com> This replies did not help? http://rubyforge.org/pipermail/wtr-general/2005-July/002463.html http://rubyforge.org/pipermail/wtr-general/2005-July/002464.html http://rubyforge.org/pipermail/wtr-general/2005-July/002460.html Zeljko ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of boni uday Sent: Wednesday, July 20, 2005 12:08 PM To: ruby form Subject: [Wtr-general] Pls give me the syntax for this situation I've written some scripts in RUBY & executed them indepedently. but i would like to execute 2 or more scripts from a single script (there should be on script which invokes all other scripts & execute them) Pls give me the syntax for this situation Thank u so much ________________________________ How much free photo storage do you get? Store your friends n family photos for FREE with Yahoo! Photos. http://in.photos.yahoo.com From christopher.mcmahon at gmail.com Wed Jul 20 09:35:06 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 20 Jul 2005 08:35:06 -0500 Subject: [Wtr-general] reg the execution of multiple test cases concuttentlly In-Reply-To: References: <20050720064535.11020.qmail@web8309.mail.in.yahoo.com> Message-ID: <72799cd705072006357850ae1e@mail.gmail.com> Nifty. -Chris On 7/20/05, Atilla Ozgur wrote: > currentFolder = 'D:\\Projects\\Trial\\WatirTests' > Dir.chdir(currentFolder) > paths = Dir.entries(currentFolder) > paths.each{|f| > # I do not want to execute my subversion folder files and my > common functions > if (f =~ /.rb/ && f != 'CommonFunctions.rb') > # for debugging purposes not necessary > puts f > require f > end > } > From christopher.mcmahon at gmail.com Wed Jul 20 09:39:08 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 20 Jul 2005 08:39:08 -0500 Subject: [Wtr-general] max number of concurrent threads/ie browser spawned In-Reply-To: References: Message-ID: <72799cd7050720063974339b1a@mail.gmail.com> On 7/20/05, Jan.Montano at thomson.com wrote: > What's the maximum number of concurrent threads that watir can handle? > And what's the maximum number of browser it could launch? I've gotten as many as 60 browsers concurrently running in 10 threads. Closing each browser at the end of each test frees up enough resources to run a much larger number of tests. I think the number of threads Ruby can handle is arbitrarily large, but each thread will compete for resources on the local machine, so it's easy to hit performance bottlenecks with a smallish number of threads, unless you're very careful. -Chris From bret at pettichord.com Wed Jul 20 10:09:27 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 20 Jul 2005 09:09:27 -0500 Subject: [Wtr-general] Tabbing through website In-Reply-To: References: <20050719212146.56255.qmail@web52408.mail.yahoo.com> Message-ID: <5.1.0.14.2.20050720090728.01b9db50@127.0.0.1> Would there be interest in adding this method to Watir? -- ie.send_keys("{tab}") # send key events to IE window I don't have strong feelings either way, but it wouldn't be hard to add. Bret At 04:40 PM 7/19/2005, Scott Hanselman wrote: >You might be able to FireEvent( onblur ) then FireEvent( onfocus ) to get >the same effect, unless your javascript is truly looking at keydowns& > > >Scott > > > >---------- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ben Torres >Sent: Tuesday, July 19, 2005 2:22 PM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Tabbing through website > > > >Hi, > > > >I am new to both Ruby and Watir and was wondering if there is a way to >send the key for my scripts. I am unable to locate a file field by >using :name, so the only way I can think of, is to just simulate hitting >the tab key to get to the field. Is there a TypeKeys function I can use >in Watir? > > > >Thanks, > >Ben > >__________________________________________________ >Do You Yahoo!? >Tired of spam? Yahoo! Mail has the best spam protection around >http://mail.yahoo.com >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From Kevin.Williams at Level3.com Wed Jul 20 10:30:58 2005 From: Kevin.Williams at Level3.com (Williams, Kevin) Date: Wed, 20 Jul 2005 08:30:58 -0600 Subject: [Wtr-general] Tabbing through website Message-ID: If it isn't too much trouble, I can see how it might come in handy some day. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Wednesday, July 20, 2005 8:09 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Tabbing through website Would there be interest in adding this method to Watir? -- ie.send_keys("{tab}") # send key events to IE window I don't have strong feelings either way, but it wouldn't be hard to add. Bret At 04:40 PM 7/19/2005, Scott Hanselman wrote: >You might be able to FireEvent( onblur ) then FireEvent( onfocus ) to >get the same effect, unless your javascript is truly looking at >keydowns& > > >Scott > > > >---------- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ben Torres >Sent: Tuesday, July 19, 2005 2:22 PM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Tabbing through website > > > >Hi, > > > >I am new to both Ruby and Watir and was wondering if there is a way to >send the key for my scripts. I am unable to locate a file field >by using :name, so the only way I can think of, is to just simulate >hitting the tab key to get to the field. Is there a TypeKeys function >I can use in Watir? > > > >Thanks, > >Ben > >__________________________________________________ >Do You Yahoo!? >Tired of spam? Yahoo! Mail has the best spam protection around >http://mail.yahoo.com _______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From tuyet.ctn at mscibarra.com Wed Jul 20 13:50:44 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Wed, 20 Jul 2005 10:50:44 -0700 Subject: [Wtr-general] Calculating Elapsed Time Message-ID: Thanks for the info. Are you referring to the "Programming in Ruby" book by Dave Thomas 2nd edition? I couldn't find the code on the page you specified. From Mark_Cain at rl.gov Wed Jul 20 14:31:53 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Wed, 20 Jul 2005 11:31:53 -0700 Subject: [Wtr-general] Calculating Elapsed Time Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D2DF@EX5V.rl.gov> Yes I am referring to the "Programming Ruby: The pragmatic programmers guide" by Dave Thomas second edition. I adapted the code I sent yesterday from the section Date/DateTime on pg 665. --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tuyet Cong-Ton-Nu Sent: Wednesday, July 20, 2005 10:51 AM To: 'wtr-general at rubyforge.org' Subject: [Wtr-general] Calculating Elapsed Time Thanks for the info. Are you referring to the "Programming in Ruby" book by Dave Thomas 2nd edition? I couldn't find the code on the page you specified. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From tuyet.ctn at mscibarra.com Wed Jul 20 17:12:54 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Wed, 20 Jul 2005 14:12:54 -0700 Subject: [Wtr-general] Switching from Segue's SilkTest to WATIR? Message-ID: I am wondering if anyone out there is in the process or has already switched from Segue's SilkTest to WATIR. Any feedback on how the process went or is going for you would be appreciated? We have adopted Segue's SilkTest to automate our Web application a few years ago, but we are not happy with how unreliable, hard to maintain, and slow it has performed. After the demo I gave this morning, we want to pursue investing more time in WATIR. So, first of all, thanks for all your help! You are a great community! Any feedback on SilkTest to WATIR conversion is appreciated. By the way here are some benchmark stats that are interesting to know. We picked 2 scripts "Import" and "Analysis/Positions" and coded the exact steps for both WATIR and SilkTest. We ran the scripts about 15 times each in both WATIR and SilkTest and here are the results: Import script Watir SilkTest Lines of Codes 60 lines of code 200+ Elapsed Time (average of 15 runs) 25 seconds 60 seconds Reliability No failure when ran 15 times in a row 87% with 15 runs Maintainability All changes are readily "seen" via View Source or getHTML command. Compare files can be done and changes can easily be made. Changes in B1 code require updates to the page declarations. This can take between 10 and 30 minutes. Analysis/Positions script Watir SilkTest Lines of Codes 105 lines of code 250+ Elapsed Time (average of 15 runs) 52 seconds 120 seconds Reliability No failure when ran 15 times in a row 80% with 15 runs Maintainability All changes are readily "seen" via View Source or getHTML command. Compare files can be done and changes can easily be made. Changes in B1 code require updates to the page declarations. This can take between 10 and 30 minutes. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050720/2e1d4231/attachment.html From bret at pettichord.com Wed Jul 20 18:43:05 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 20 Jul 2005 17:43:05 -0500 Subject: [Wtr-general] Switching from Segue's SilkTest to WATIR? In-Reply-To: Message-ID: <5.1.0.14.2.20050720174200.03125a08@127.0.0.1> Tuyet, Would you mind putting your analysis on our Wiki? I think that many people will find it very interesting. (By the way i used to work for Segue.) Bret At 04:12 PM 7/20/2005, Tuyet Cong-Ton-Nu wrote: >I am wondering if anyone out there is in the process or has already >switched from Segue s SilkTest to WATIR. > >Any feedback on how the process went or is going for you would be appreciated? > >We have adopted Segue s SilkTest to automate our Web application a few >years ago, but we are not happy with how unreliable, hard to maintain, and >slow it has performed. > >After the demo I gave this morning, we want to pursue investing more time >in WATIR. > >So, first of all, thanks for all your help! You are a great community! > > > >Any feedback on SilkTest to WATIR conversion is appreciated. > > > >By the way here are some benchmark stats that are interesting to know. > >We picked 2 scripts Import and Analysis/Positions and coded the exact >steps for both WATIR and SilkTest. > >We ran the scripts about 15 times each in both WATIR and SilkTest and here >are the results: > > > >Import script > >Watir > >SilkTest > >Lines of Codes > > > >60 lines of code > >200+ > > > >Elapsed Time (average of 15 runs) > > > >25 seconds > >60 seconds > >Reliability > > > >No failure when ran 15 times in a row > >87% with 15 runs > >Maintainability > > > >All changes are readily seen via View Source or getHTML command. > >Compare files can be done and changes can easily be made. > >Changes in B1 code require updates to the page declarations. This can take >between 10 and 30 minutes. > > > > > >Analysis/Positions script > >Watir > >SilkTest > >Lines of Codes > > > >105 lines of code > >250+ > >Elapsed Time (average of 15 runs) > > > >52 seconds > >120 seconds > >Reliability > > > >No failure when ran 15 times in a row > >80% with 15 runs > >Maintainability > > > >All changes are readily seen via View Source or getHTML command. > >Compare files can be done and changes can easily be made. > >Changes in B1 code require updates to the page declarations. This can take >between 10 and 30 minutes. > > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From shaorobics at gmail.com Wed Jul 20 20:55:12 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Wed, 20 Jul 2005 20:55:12 -0400 Subject: [Wtr-general] Tabbing through website In-Reply-To: References: Message-ID: <593b9ae805072017553479a424@mail.gmail.com> I vote yes :) From sgtn2000 at gmail.com Wed Jul 20 21:00:21 2005 From: sgtn2000 at gmail.com (Sean Gallagher) Date: Wed, 20 Jul 2005 18:00:21 -0700 Subject: [Wtr-general] Tabbing through website In-Reply-To: <5.1.0.14.2.20050720090728.01b9db50@127.0.0.1> References: <20050719212146.56255.qmail@web52408.mail.yahoo.com> <5.1.0.14.2.20050720090728.01b9db50@127.0.0.1> Message-ID: <7f8ae47d05072018003bf8827b@mail.gmail.com> +1 On 7/20/05, Bret Pettichord wrote: > Would there be interest in adding this method to Watir? -- > > ie.send_keys("{tab}") # send key events to IE window > > I don't have strong feelings either way, but it wouldn't be hard to add. > > Bret > > > At 04:40 PM 7/19/2005, Scott Hanselman wrote: > > >You might be able to FireEvent( onblur ) then FireEvent( onfocus ) to get > >the same effect, unless your javascript is truly looking at keydowns& > > > > > >Scott > > > > > > > >---------- > >From: wtr-general-bounces at rubyforge.org > >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ben Torres > >Sent: Tuesday, July 19, 2005 2:22 PM > >To: wtr-general at rubyforge.org > >Subject: [Wtr-general] Tabbing through website > > > > > > > >Hi, > > > > > > > >I am new to both Ruby and Watir and was wondering if there is a way to > >send the key for my scripts. I am unable to locate a file field by > >using :name, so the only way I can think of, is to just simulate hitting > >the tab key to get to the field. Is there a TypeKeys function I can use > >in Watir? > > > > > > > >Thanks, > > > >Ben > > > >__________________________________________________ > >Do You Yahoo!? > >Tired of spam? Yahoo! Mail has the best spam protection around > >http://mail.yahoo.com > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From Jan.Montano at thomson.com Wed Jul 20 21:17:48 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Thu, 21 Jul 2005 09:17:48 +0800 Subject: [Wtr-general] max number of concurrent threads/ie browser spawned Message-ID: ok. noted. Thanks a lot! -Jan -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Chris McMahon Sent: Wednesday, July 20, 2005 9:39 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] max number of concurrent threads/ie browser spawned On 7/20/05, Jan.Montano at thomson.com wrote: > What's the maximum number of concurrent threads that watir can handle? > And what's the maximum number of browser it could launch? I've gotten as many as 60 browsers concurrently running in 10 threads. Closing each browser at the end of each test frees up enough resources to run a much larger number of tests. I think the number of threads Ruby can handle is arbitrarily large, but each thread will compete for resources on the local machine, so it's easy to hit performance bottlenecks with a smallish number of threads, unless you're very careful. -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From huemach at Cybersoft-VN.com Wed Jul 20 22:40:56 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Thu, 21 Jul 2005 09:40:56 +0700 Subject: [Wtr-general] Help get data from Table Message-ID: <99DF6C0285C2CE4C99F02D78385719660177F532@hue.cybersoft-vn.com> Hi All, I would like get data from table, but when view HTML code of this page, I don't found the id of this table. ...... Thank you for help. From jared at kilmore.info Wed Jul 20 22:50:20 2005 From: jared at kilmore.info (Jared Quinert) Date: Thu, 21 Jul 2005 12:50:20 +1000 Subject: [Wtr-general] Help get data from Table In-Reply-To: <99DF6C0285C2CE4C99F02D78385719660177F532@hue.cybersoft-vn.com> References: <99DF6C0285C2CE4C99F02D78385719660177F532@hue.cybersoft-vn.com> Message-ID: <42DF0D6C.90807@kilmore.info> You will either need to get developers to add an ID so that you can use table(id:,"ID"), or use an explicit reference to the sequence number of the table - table(:index,table_number). Your table opening tag looks like this:
Date Time Equipment Code Alarm ON/OFF Alarm Type ALID Alarm Text
If you want to use :id to reference the table, you need:
Jared Hue Mach Dieu wrote: >Hi All, >I would like get data from table, but when view HTML code of this page, >I don't found the id of this table. > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > >...... > >Thank you for help. > > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > From getboni at yahoo.co.in Thu Jul 21 00:38:19 2005 From: getboni at yahoo.co.in (boni uday) Date: Thu, 21 Jul 2005 05:38:19 +0100 (BST) Subject: [Wtr-general] Need Help Message-ID: <20050721043819.68564.qmail@web8302.mail.in.yahoo.com> I want to access a method (def) which is defined in one class from another class in ruby. pls help me Thank u --------------------------------- How much free photo storage do you get? Store your friends n family photos for FREE with Yahoo! Photos. http://in.photos.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050721/830d9a89/attachment.html From shaorobics at gmail.com Thu Jul 21 00:47:50 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Thu, 21 Jul 2005 00:47:50 -0400 Subject: [Wtr-general] Need Help In-Reply-To: <20050721043819.68564.qmail@web8302.mail.in.yahoo.com> References: <20050721043819.68564.qmail@web8302.mail.in.yahoo.com> Message-ID: <593b9ae80507202147383039fe@mail.gmail.com> I don't know if I'm reading your question right but you have something like: Class A def foo .... end end and in some other file Class B def bar .... end end and say, for example you want to use def bar outside of Class B? If so, you can just do: someVar = B.new() b.bar() On 7/21/05, boni uday wrote: > > > I want to access a method (def) which is defined in one class from another > > class in ruby. > > pls help me > > Thank u > > ________________________________ > How much free photo storage do you get? Store your friends n family photos > for FREE with Yahoo! Photos. > http://in.photos.yahoo.com > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > From satti_mg at yahoo.com Thu Jul 21 01:13:24 2005 From: satti_mg at yahoo.com (sathya shankar) Date: Wed, 20 Jul 2005 22:13:24 -0700 (PDT) Subject: [Wtr-general] Need Help In-Reply-To: <20050721043819.68564.qmail@web8302.mail.in.yahoo.com> Message-ID: <20050721051324.70286.qmail@web33506.mail.mud.yahoo.com> Hi boni, Can u be more specific on the question? Sathya Shankar --- boni uday wrote: > > > I want to access a method (def) which is defined in > one class from another > > class in ruby. > > pls help me > > Thank u > > > --------------------------------- > How much free photo storage do you get? Store your > friends n family photos for FREE with Yahoo! Photos. > > http://in.photos.yahoo.com> _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From huemach at Cybersoft-VN.com Thu Jul 21 05:10:15 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Thu, 21 Jul 2005 16:10:15 +0700 Subject: [Wtr-general] Read data from excel file without open Excel Application? Message-ID: <99DF6C0285C2CE4C99F02D78385719660177F6EC@hue.cybersoft-vn.com> Hi All I would like read data from excel file without open Excel Application. This is my code read data from excel must be open Excel Application require 'win32ole' excel = WIN32OLE::new('excel.Application') workbook = excel.Workbooks.Open('test.xls') worksheet = workbook.Worksheets(1) #get hold of the first worksheet worksheet.Select excel['Visible'] = true # read data from 1 cell puts "Read 1 cell" cell_A2 = worksheet.Range('a2')['Value'] #get value of single cell puts cell_A2 Thank you for help From huemach at Cybersoft-VN.com Thu Jul 21 05:23:34 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Thu, 21 Jul 2005 16:23:34 +0700 Subject: [Wtr-general] Re: Help get data from Table Message-ID: <99DF6C0285C2CE4C99F02D78385719660177F703@hue.cybersoft-vn.com> Hi Jared, Thank you for your help. I told my developer add ID in table. Regards From getboni at yahoo.co.in Thu Jul 21 07:03:41 2005 From: getboni at yahoo.co.in (boni uday) Date: Thu, 21 Jul 2005 12:03:41 +0100 (BST) Subject: [Wtr-general] Need Help Message-ID: <20050721110341.19751.qmail@web8309.mail.in.yahoo.com> I've the following classes: class XMLLogger < CoreLogger def start_log end end This class is present in first.rb i've written another calss in second.rb, whose defination is as follows : class CreateLogger < XMLLogger # here i'm trying to accessing start_log def. # but i'm unable to do this... end pls help me thank u --------------------------------- How much free photo storage do you get? Store your friends n family photos for FREE with Yahoo! Photos. http://in.photos.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050721/f38ad884/attachment.html From zeljko.filipin at gmail.com Thu Jul 21 07:10:58 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 21 Jul 2005 13:10:58 +0200 Subject: [Wtr-general] Need Help In-Reply-To: <20050721110341.19751.qmail@web8309.mail.in.yahoo.com> Message-ID: <42df828d.445b5ea3.2abf.ffffca3d@mx.gmail.com> You have to include first.rb in second.rb. Put this at the beggining of second.rb (if both files are in the same directory): require 'first' Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of boni uday Sent: Thursday, July 21, 2005 1:04 PM To: ruby form Subject: [Wtr-general] Need Help I've the following classes: class XMLLogger < CoreLogger def start_log end end This class is present in first.rb i've written another calss in second.rb, whose defination is as follows : class CreateLogger < XMLLogger # here i'm trying to accessing start_log def. # but i'm unable to do this... end pls help me thank u _____ How much free photo storage do you get? Store your friends n family photos for FREE with Yahoo! Photos. http://in.photos.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050721/efa96750/attachment.html From zeljko.filipin at gmail.com Thu Jul 21 09:08:07 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 21 Jul 2005 15:08:07 +0200 Subject: [Wtr-general] image.to_s Message-ID: <42df9e03.20b07565.0eaf.ffffe679@mx.gmail.com> I am making unit tests for my methods and I found a bug in watir. I wanted to display properties of an image. HTML is valid according to http://validator.w3.org/. ---------- HTML: images

flower

---------- IRB: irb require 'watir' ie = Watir::IE.attach(:title, //) ie.images.each { |i| puts i.to_s } ---------- OUTPUT: type: image id: name: value: disabled: false src: file:///C:/Documents%20and%20Settings/zfilipin/My%20Documents/Tests/test/htm l/images/flower.png file date: 07/13/2005 file size: 1252 width: 20 height: 20 ---------- Then I added missing id, name, value, and disabled, so img tag is: flower ---------- OUTPUT: ... id: image_id name: image_name value: image_value disabled: true ... ---------- So where is the bug? My page is no longer valid. I get this error messages: "there is no attribute name/value/disabled". Even if I change my page back to html 4.01 I get error messages: "there is no attribute value/disabled". So, name was once alloved, but value and disabled not even then. What is the purpose of displaying properties that do not exist? Not related to this, but what is purpose of "type: image" in output? Can it be anything else except image? Zeljko From zeljko.filipin at gmail.com Thu Jul 21 09:17:08 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 21 Jul 2005 15:17:08 +0200 Subject: [Wtr-general] RE: image.to_s Message-ID: <42dfa01f.7970a341.3080.0051@mx.gmail.com> And also required property "alt" is not displayed. Zeljko -----Original Message----- From: Zeljko Filipin [mailto:zeljko.filipin at gmail.com] Sent: Thursday, July 21, 2005 3:08 PM To: wtr-general at rubyforge.org Subject: image.to_s I am making unit tests for my methods and I found a bug in watir. I wanted to display properties of an image. HTML is valid according to http://validator.w3.org/. ---------- HTML: images

flower

---------- IRB: irb require 'watir' ie = Watir::IE.attach(:title, //) ie.images.each { |i| puts i.to_s } ---------- OUTPUT: type: image id: name: value: disabled: false src: file:///C:/Documents%20and%20Settings/zfilipin/My%20Documents/Tests/test/htm l/images/flower.png file date: 07/13/2005 file size: 1252 width: 20 height: 20 ---------- Then I added missing id, name, value, and disabled, so img tag is: flower ---------- OUTPUT: ... id: image_id name: image_name value: image_value disabled: true ... ---------- So where is the bug? My page is no longer valid. I get this error messages: "there is no attribute name/value/disabled". Even if I change my page back to html 4.01 I get error messages: "there is no attribute value/disabled". So, name was once alloved, but value and disabled not even then. What is the purpose of displaying properties that do not exist? Not related to this, but what is purpose of "type: image" in output? Can it be anything else except image? Zeljko From zeljko.filipin at gmail.com Thu Jul 21 09:34:16 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 21 Jul 2005 15:34:16 +0200 Subject: [Wtr-general] id Message-ID: <42dfa423.56a70eed.39ce.ffffa5c2@mx.gmail.com> >From watir.rb: # The ways that are available to identify an html object depend upon the object type, but include # :id used for an object that has an ID attribute -- this is the best way! I talked to developer and he told me that our web applications are developed in asp.net and that he can not assign id property to html object, and that asp.net does it. Id is assigned to element by it's position at page, something like and id is changed when another element (checkbox in this case) is added to page. Example: add another checkbox to page, so it is above (before) this one. New checkbox gets id="catalog_1", and old one is changed to id="catalog_2". It is just like using :index, and "i always consider using :index to be an ugly hack when nothing else will work." (Bret Pettichord) Has anybody else this problem (and solution)? Zeljko From christopher.mcmahon at gmail.com Thu Jul 21 09:38:58 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 21 Jul 2005 08:38:58 -0500 Subject: [Wtr-general] Read data from excel file without open Excel Application? In-Reply-To: <99DF6C0285C2CE4C99F02D78385719660177F6EC@hue.cybersoft-vn.com> References: <99DF6C0285C2CE4C99F02D78385719660177F6EC@hue.cybersoft-vn.com> Message-ID: <72799cd705072106385c986564@mail.gmail.com> On 7/21/05, Hue Mach Dieu wrote: > Hi All > I would like read data from excel file without open Excel Application. > This is my code read data from excel must be open Excel Application > Three possibilities: excel['Visible'] = false opens Excel and does work, but never launches the UI. Would that help? Or-- would it be possible to convert your spreadsheets to CSV? That would allow you to process the data as pure text, with no need for Excel. Finally, it is probably possible to open the Excel file directly and parse it using only Ruby, but it would not be easy. Hope that gives you some ideas... From Kevin.Williams at Level3.com Thu Jul 21 09:40:09 2005 From: Kevin.Williams at Level3.com (Williams, Kevin) Date: Thu, 21 Jul 2005 07:40:09 -0600 Subject: [Wtr-general] id Message-ID: I'm sorry to say your developer is not correct. If an ID is not explicitly specified, the framework will create one, and it would be subject to change if the control tree changed on postback. However, if an ID *is* explicitly specified, the framework will use that ID. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: Thursday, July 21, 2005 7:34 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] id >From watir.rb: # The ways that are available to identify an html object depend upon the object type, but include # :id used for an object that has an ID attribute -- this is the best way! I talked to developer and he told me that our web applications are developed in asp.net and that he can not assign id property to html object, and that asp.net does it. Id is assigned to element by it's position at page, something like and id is changed when another element (checkbox in this case) is added to page. Example: add another checkbox to page, so it is above (before) this one. New checkbox gets id="catalog_1", and old one is changed to id="catalog_2". It is just like using :index, and "i always consider using :index to be an ugly hack when nothing else will work." (Bret Pettichord) Has anybody else this problem (and solution)? Zeljko _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From zeljko.filipin at gmail.com Thu Jul 21 09:44:57 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 21 Jul 2005 15:44:57 +0200 Subject: [Wtr-general] Read data from excel file without open ExcelApplication? In-Reply-To: <72799cd705072106385c986564@mail.gmail.com> Message-ID: <42dfa6bb.6f245700.3828.1d9a@mx.gmail.com> And you can save excel files as xml and then use xml parser REXML (http://www.germane-software.com/software/rexml/). Zeljko -----Original Message----- Or-- would it be possible to convert your spreadsheets to CSV? From ati.ozgur at gmail.com Thu Jul 21 09:53:05 2005 From: ati.ozgur at gmail.com (Atilla Ozgur) Date: Thu, 21 Jul 2005 16:53:05 +0300 Subject: [Wtr-general] id In-Reply-To: <42dfa423.56a70eed.39ce.ffffa5c2@mx.gmail.com> References: <42dfa423.56a70eed.39ce.ffffa5c2@mx.gmail.com> Message-ID: What object do your developer use? If you use stand alone object inasp.net, you can give an ID to it. But if you use an object inside ancontainer like DataGrid,DataList, Repeater or GridView( Asp.Net 2.0).Asp.Net automatically gives and ID to them since an ID in a html pagemust be unique. For example you have such a declaration in aspx page. this asp.net template render in html as below.
Date TimeEquipment CodeAlarm ON/OFFAlarm TypeALIDAlarm Text
?MAM HAT?PL?SES? VE ANADOLU ?.H.L.
AnafartalarLisesi
note that your lblName id in label rendered as span as asp.net rendersasp:label as span and it renames your id="lblName" asctl00_cphAnaIcerikPaneli_ctlDataGrid_ctl03_lblName cphAnaIcerikPaneli this comes beacuse of SkinID which comes with Asp.Net 2.0 ctlDataGrid this is what you give an id to your datagrid or gridview object.at last lblName this is your developer id. As you see there is a pattern inthis renaming of IDs. you can catch these as ie.span(:id,/lblName/) if they are stand alone. If they are in a grid catch table, table(:id,/ctlDataGrid/) and in your table's rows catch them as span(:id,/lblName/) in one row there must be only one lblName, sinceasp.net does not allow you to give same id to one object. thereforeyou will know that all lblnames are instances of your label(span). Also your developer override naming of these identifiers. But i do notthink he will want to do that. On 7/21/05, Zeljko Filipin wrote:> >From watir.rb:> > # The ways that are available to identify an html object depend upon the> object type, but include> # :id used for an object that has an ID attribute -- this is the> best way!> > I talked to developer and he told me that our web applications are developed> in asp.net and that he can not assign id property to html object, and that> asp.net does it.> Id is assigned to element by it's position at page, something like> > > > and id is changed when another element (checkbox in this case) is added to> page.> > Example: add another checkbox to page, so it is above (before) this one. New> checkbox gets id="catalog_1", and old one is changed to id="catalog_2".> > It is just like using :index, and "i always consider using :index to be an> ugly hack when nothing else will work." (Bret Pettichord)> > Has anybody else this problem (and solution)?> > Zeljko> > _______________________________________________> Wtr-general mailing list> Wtr-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/wtr-general> From zeljko.filipin at gmail.com Thu Jul 21 09:55:59 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 21 Jul 2005 15:55:59 +0200 Subject: [Wtr-general] id In-Reply-To: Message-ID: <42dfa93a.699ceb50.2abf.00ba@mx.gmail.com> I just talked to him again, and it seems that you are both right. :) He said that it is true for simple controls, but he uses repeaters id=rpt (automatic creation of checkboxes, for example) results in: rpt_cb1 rpt_cb2 ... If repeater is inside repeater then it is something like: rptOuter_rptInner_cb1 ... He uses repeaters because (in this case) we are making web shop and at one page there are lots of options, and user selects some of them. Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Williams, Kevin Sent: Thursday, July 21, 2005 3:40 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] id I'm sorry to say your developer is not correct. If an ID is not explicitly specified, the framework will create one, and it would be subject to change if the control tree changed on postback. However, if an ID *is* explicitly specified, the framework will use that ID. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: Thursday, July 21, 2005 7:34 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] id >From watir.rb: # The ways that are available to identify an html object depend upon the object type, but include # :id used for an object that has an ID attribute -- this is the best way! I talked to developer and he told me that our web applications are developed in asp.net and that he can not assign id property to html object, and that asp.net does it. Id is assigned to element by it's position at page, something like and id is changed when another element (checkbox in this case) is added to page. Example: add another checkbox to page, so it is above (before) this one. New checkbox gets id="catalog_1", and old one is changed to id="catalog_2". It is just like using :index, and "i always consider using :index to be an ugly hack when nothing else will work." (Bret Pettichord) Has anybody else this problem (and solution)? Zeljko _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From ati.ozgur at gmail.com Thu Jul 21 10:12:55 2005 From: ati.ozgur at gmail.com (Atilla Ozgur) Date: Thu, 21 Jul 2005 17:12:55 +0300 Subject: [Wtr-general] id In-Reply-To: References: <42dfa423.56a70eed.39ce.ffffa5c2@mx.gmail.com> Message-ID: Also your developer override naming of these identifiers. But i do not think he will want to do that. these should be Also your can developer override naming of these identifiers. But i do not think he will want to do that. protected void ctlDataGrid_RowDataBound(object sender, GridViewRowEventArgs e) { Label lbl = e.Row.FindControl("lblName") as Label; if (lbl != null) { // gets the server control Name generated by Asp.Net string unique = lbl.UniqueID; // gets the server control ID generated by Asp.Net string clientID = lbl.ClientID; // this is programmatic identifier you give to your control like lblName // this is what you can set. string id = lbl.ID; // this is my databinder object, most probably your developer uses // datarow of datatable object he needs to cast it accordingly. AppCenterEntity entity = e.Row.DataItem as AppCenterEntity; // RID is my primary key. lbl.ID = "lblName" + entity.RID.ToString(); lbl. } } From Mark_Cain at rl.gov Thu Jul 21 10:45:41 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Thu, 21 Jul 2005 07:45:41 -0700 Subject: [Wtr-general] Tabbing through website Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D2E2@EX5V.rl.gov> 1+ Would this also work for sending other keyboard commands? E.g. {ALT + A} --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Wednesday, July 20, 2005 7:09 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Tabbing through website Would there be interest in adding this method to Watir? -- ie.send_keys("{tab}") # send key events to IE window I don't have strong feelings either way, but it wouldn't be hard to add. Bret At 04:40 PM 7/19/2005, Scott Hanselman wrote: >You might be able to FireEvent( onblur ) then FireEvent( onfocus ) to get >the same effect, unless your javascript is truly looking at keydowns& > > >Scott > > > >---------- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ben Torres >Sent: Tuesday, July 19, 2005 2:22 PM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Tabbing through website > > > >Hi, > > > >I am new to both Ruby and Watir and was wondering if there is a way to >send the key for my scripts. I am unable to locate a file field by >using :name, so the only way I can think of, is to just simulate hitting >the tab key to get to the field. Is there a TypeKeys function I can use >in Watir? > > > >Thanks, > >Ben > >__________________________________________________ >Do You Yahoo!? >Tired of spam? Yahoo! Mail has the best spam protection around >http://mail.yahoo.com >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Thu Jul 21 10:44:36 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 21 Jul 2005 09:44:36 -0500 Subject: [Wtr-general] Read data from excel file without open Excel Application? In-Reply-To: <99DF6C0285C2CE4C99F02D78385719660177F6EC@hue.cybersoft-vn. com> Message-ID: <5.1.0.14.2.20050721094416.0319f938@127.0.0.1> excel['Visible'] = false At 04:10 AM 7/21/2005, Hue Mach Dieu wrote: >Hi All >I would like read data from excel file without open Excel Application. >This is my code read data from excel must be open Excel Application > >require 'win32ole' > >excel = WIN32OLE::new('excel.Application') > >workbook = excel.Workbooks.Open('test.xls') > >worksheet = workbook.Worksheets(1) #get hold of the first worksheet > >worksheet.Select > >excel['Visible'] = true > ># read data from 1 cell >puts "Read 1 cell" >cell_A2 = worksheet.Range('a2')['Value'] #get value of single cell >puts cell_A2 > >Thank you for help > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From Mike at MichaelDKelly.com Thu Jul 21 10:50:56 2005 From: Mike at MichaelDKelly.com (Michael Kelly) Date: Thu, 21 Jul 2005 14:50:56 +0000 Subject: [Wtr-general] Tabbing through website Message-ID: +1 more... -Mike >-----Original Message----- >From: Cain, Mark [mailto:Mark_Cain at rl.gov] >Sent: Thursday, July 21, 2005 09:45 AM >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Tabbing through website > >1+ > >Would this also work for sending other keyboard commands? E.g. {ALT + >A} > >--Mark >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord >Sent: Wednesday, July 20, 2005 7:09 AM >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Tabbing through website > >Would there be interest in adding this method to Watir? -- > > ie.send_keys("{tab}") # send key events to IE window > >I don't have strong feelings either way, but it wouldn't be hard to add. > >Bret > > >At 04:40 PM 7/19/2005, Scott Hanselman wrote: > >>You might be able to FireEvent( onblur ) then FireEvent( onfocus ) to >get >>the same effect, unless your javascript is truly looking at keydowns& >> >> >>Scott >> >> >> >>---------- >>From: wtr-general-bounces at rubyforge.org >>[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ben Torres >>Sent: Tuesday, July 19, 2005 2:22 PM >>To: wtr-general at rubyforge.org >>Subject: [Wtr-general] Tabbing through website >> >> >> >>Hi, >> >> >> >>I am new to both Ruby and Watir and was wondering if there is a way to >>send the key for my scripts. I am unable to locate a file field >by >>using :name, so the only way I can think of, is to just simulate >hitting >>the tab key to get to the field. Is there a TypeKeys function I can >use >>in Watir? >> >> >> >>Thanks, >> >>Ben >> >>__________________________________________________ >>Do You Yahoo!? >>Tired of spam? Yahoo! Mail has the best spam protection around >>http://mail.yahoo.com >>_______________________________________________ >>Wtr-general mailing list >>Wtr-general at rubyforge.org >>http://rubyforge.org/mailman/listinfo/wtr-general > >_____________________ > Bret Pettichord > www.pettichord.com > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > From Mark_Cain at rl.gov Thu Jul 21 11:02:13 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Thu, 21 Jul 2005 08:02:13 -0700 Subject: [Wtr-general] Help get data from Table Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D2E3@EX5V.rl.gov> You could also do: 1. Right Click and select view source 2. Ctrl + f and enter ) table[row][column]. One additional note: if your action changes your target table dynamically (e.g. clicking a button adds/removes a table value) you will have to add this line: table = $ie.table(:index, ) again AFTER the action to load changes into the table variable. --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Hue Mach Dieu Sent: Wednesday, July 20, 2005 7:41 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Help get data from Table Hi All, I would like get data from table, but when view HTML code of this page, I don't found the id of this table.
...... Thank you for help. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Thu Jul 21 10:57:57 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 21 Jul 2005 09:57:57 -0500 Subject: [Wtr-general] Tabbing through website In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D2E2@EX5V.rl.gov> Message-ID: <5.1.0.14.2.20050721095747.031b7ea0@127.0.0.1> At 09:45 AM 7/21/2005, Cain, Mark wrote: >Would this also work for sending other keyboard commands? E.g. {ALT + >A} Yes _____________________ Bret Pettichord www.pettichord.com From Peter.Ch at NETeller.com Thu Jul 21 11:48:02 2005 From: Peter.Ch at NETeller.com (Peter Chau) Date: Thu, 21 Jul 2005 09:48:02 -0600 Subject: [Wtr-general] Read data from excel file without open ExcelApplication? Message-ID: I use excel['Visible']=false to hide the excel window while running. Be sure to close the window with workbook.Close(0) and excel.Quit or the excel processes don't terminate. For reading data, I use a loop to go through all the rows upto some keyword planted in the excel file like "END" or until 10 consecutive blank lines are read. Also instead of reading from excel as ['value'] try using ['text']. The Ruby win32ole is buggy when it comes to reading numbers from excel files. It seems to have a mind of its own with the amount of decimals digits. otestStep.action=worksheet.Range("D#{startRow + readRow}")['Text'].strip.to_s To write to the excel file use worksheet.Range("F#{startRow + readRow}").value=accountNumber From benjotorres at yahoo.com Thu Jul 21 14:02:31 2005 From: benjotorres at yahoo.com (Ben Torres) Date: Thu, 21 Jul 2005 11:02:31 -0700 (PDT) Subject: [Wtr-general] getting undefined method for wait_for_browser() In-Reply-To: Message-ID: <20050721180231.91040.qmail@web52410.mail.yahoo.com> Hi, I'm wondering if anyone can help me with why I am getting an undefined method error (NoMethodError) for wait_for_browser(). Here's a snippet from my script: #includes: require 'watir' # the watir controller require 'win32ole' include Watir #open the IE browser ie = IE.new ie.wait_for_browser() -ben --------------------------------- Start your day with Yahoo! - make it your home page -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050721/d07dec7e/attachment.html From benjotorres at yahoo.com Thu Jul 21 14:05:19 2005 From: benjotorres at yahoo.com (Ben Torres) Date: Thu, 21 Jul 2005 11:05:19 -0700 (PDT) Subject: [Wtr-general] Tabbing through website In-Reply-To: <20050720052801.65621.qmail@web33510.mail.mud.yahoo.com> Message-ID: <20050721180520.5640.qmail@web52414.mail.yahoo.com> thanks sathya...autoit helped with the tabbing. is there a way for me to keep the browser active while the lines for autoit are executed? when i run the script, and go off to do work on another app, autoit runs the command on the current active app (ran while i was in notepad). -ben sathya shankar wrote: Hi Ben, Use "Autoit" so that u can send any simulated key words from ur scripts. Sathya Shankar --- Ben Torres wrote: > Hi, > > I am new to both Ruby and Watir and was wondering if > there is a way to send the key for my scripts. > I am unable to locate a file field by using :name, > so the only way I can think of, is to just simulate > hitting the tab key to get to the field. Is there a > TypeKeys function I can use in Watir? > > Thanks, > Ben > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050721/76d95b7e/attachment.html From singh_angrez at rediffmail.com Thu Jul 21 14:34:59 2005 From: singh_angrez at rediffmail.com (Angrez Singh) Date: 21 Jul 2005 18:34:59 -0000 Subject: [Wtr-general] getting undefined method for wait_for_browser() Message-ID: <20050721183459.30373.qmail@webmail18.rediffmail.com> ? hi, this is because there is no method called 'wait_for_browser()' defined to Watir::IE class . Instead you can user IE.wait() for waiting till the browser loads the page. By the way it is unnecessary to call the method because watir internally calls this method on every event that causes a new page to get loaded. Regards, Angrez On Thu, 21 Jul 2005 Ben Torres wrote : > >Hi, > >I'm wondering if anyone can help me with why I am getting an undefined method error (NoMethodError) for wait_for_browser(). > >Here's a snippet from my script: >#includes: >require 'watir' # the watir controller >require 'win32ole' >include Watir >#open the IE browser >ie = IE.new > >ie.wait_for_browser() > >-ben > > >--------------------------------- > Start your day with Yahoo! - make it your home page >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050721/c8a51fa9/attachment.html From raghu at qantom.com Thu Jul 21 15:31:58 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Fri, 22 Jul 2005 01:01:58 +0530 Subject: [Wtr-general] Tabbing through website In-Reply-To: <20050721180520.5640.qmail@web52414.mail.yahoo.com> References: <20050721180520.5640.qmail@web52414.mail.yahoo.com> Message-ID: <42DFF82E.8020305@qantom.com> Are you trying to manually launch/activate another window? IMHO, it is always best not to run any other application (manually) when test automation is running. If you still need it, you could try WinActivate("title_of_ie") to activate the browser before sending keys Raghu Ben Torres wrote: > thanks sathya...autoit helped with the tabbing. is there a way for me > to keep the browser active while the lines for autoit are executed? > when i run the script, and go off to do work on another app, autoit > runs the command on the current active app (ran while i was in notepad). > > -ben > > */sathya shankar /* wrote: > > Hi Ben, > > Use "Autoit" so that u can send any simulated key > words from ur scripts. > > Sathya Shankar > > --- Ben Torres wrote: > > > Hi, > > > > I am new to both Ruby and Watir and was wondering if > > there is a way to send the key for my scripts. > > I am unable to locate a file field by using :name, > > so the only way I can think of, is to just simulate > > hitting the tab key to get to the field. Is there a > > TypeKeys function I can use in Watir? > > > > Thanks, > > Ben > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > > protection around > > http://mail.yahoo.com > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > ____________________________________________________ > Start your day with Yahoo! - make it your home page > http://www.yahoo.com/r/hs > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > From tuyet.ctn at mscibarra.com Thu Jul 21 17:55:32 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Thu, 21 Jul 2005 14:55:32 -0700 Subject: [Wtr-general] SilkTest and WATIR statistics Message-ID: Here is the zip version since the Word version got rejected because it's too big! <> -------------- next part -------------- A non-text attachment was scrubbed... Name: WinZip.zip Type: application/octet-stream Size: 10360 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050721/863ae240/attachment.obj From tuyet.ctn at mscibarra.com Thu Jul 21 19:46:30 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Thu, 21 Jul 2005 16:46:30 -0700 Subject: [Wtr-general] Access is denied and Exception Errors Message-ID: I am back with this issue. We have to resolve this "Access is Denied" issue; otherwise, we can't use WATIR (sigh!) I am only able to use WATIR on our staging server which not in the same domain as my computer. But for some reason, our development servers cannot be accessed by WATIR as shown below. Any suggestion to debug this would be appreciated! 1a) "Access is denied" using IE.attach: irb(main):003:0> ie = Watir::IE.attach(:url, "https://qa-b1.test.com/araneae/app") => #], @logger=#, @shift_size=nil>>, @typingspeed=0.08, @activeObjectHighLightColor="yellow" , @enable_spinner=false, @url_list=[], @form=nil, @ie=#> irb(main):004:0> ie.show_frames there are 2 frames frame index: 0 --Access Denied-- frame index: 1 --Access Denied-- => 0..1 irb(main):005:0> puts ie.frame(:index,1).text WIN32OLERuntimeError: document OLE error code:80070005 in Access is denied. 1b) "Access is denied" using ie.goto: irb(main):012:0> ie.goto("https://qa-b1.test.com/araneae/app") W, [21-Jul-2005 15:39:11#2212] WARN -- : frame error in waitdocument OLE error code:80070005 in Access is denied. irb(main):013:0> ie.show_frames there are 2 frames frame index: 0 --Access Denied-- frame index: 1 --Access Denied-- * 0..1 irb(main):018:0> puts ie.frame(:index, 1).text WIN32OLERuntimeError: document OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 irb(main):019:0> puts ie.frame(:index, 2).text WIN32OLERuntimeError: document OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 irb(main):014:0> ie.show_all_objects -----------Objects in page ------------- id= src=/include/top.js HTML Document name=relay id= src=/include/blank.htm l HTML Document name=main id= src=/araneae/login irb(main):015:0> ie.frame("main").show_all_objects Watir::Exception::UnknownFrameException: Unable to locate a frame with name main HRESULT error code:0x80020009 2a) Here is the staging environment I've been using to develop WATIR scripts and it works just fine: irb(main):030:0> ie = Watir::IE.attach(:url, "https://qa.test.com/araneae/app") => #], @logger=#, @shift_size=nil>>, @typingspeed=0.08, @activeObjectHighLightColor="yellow , @enable_spinner=false, @url_list=[], @form=nil, @ie=#> irb(main):031:0> ie.show_frames there are 2 frames frame index: 0 name: relay frame index: 1 name: main => 0..1 irb(main):036:0> ie.frame("main").show_all_objects -----------Objects in page ------------- text/css id= id= src=/include/shared.js id= src=/include/inputValidation.js id= src=/include/formcheck.js id= src= text name=UserId id= value=tuyet a t= src= password name=Password id= value= a t= src= text name=CustomerId id= value=yxsrkk29ey a t= src= select-one name=Destination id= value= checkbox name=SaveSettings id= value=on a t= src= name= id= button name= id=loginBtn value= Log In a t= src= name= id= Exception occurred. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050721/b5712c21/attachment.html From tuyet.ctn at mscibarra.com Thu Jul 21 19:57:02 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Thu, 21 Jul 2005 16:57:02 -0700 Subject: [Wtr-general] SilkTest and WATIR statistics Message-ID: Oops! I got the wrong file up there. Can you replace it with this one? I would appreciate it! Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050721/861ed1fc/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: Comparisons between Watir and SilkTest.zip Type: application/octet-stream Size: 4109 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050721/861ed1fc/attachment.obj From satti at qantom.com Fri Jul 22 00:58:28 2005 From: satti at qantom.com (Sathya Shankar) Date: Fri, 22 Jul 2005 10:28:28 +0530 Subject: [Wtr-general] Access is denied and Exception Errors In-Reply-To: References: Message-ID: <42E07CF4.4040301@qantom.com> Hi Tuyet Cong-Ton-Nu, I too get the same exception some times and when i use the Interactive Ruby Shell to recognize the object or say flash that object at that point of time it works fine for me. Is there some thing that i am doing wrong or do i have to use some exception handlers for this in watir? Thanks for All ur Help Sathya Shankar Tuyet Cong-Ton-Nu wrote: > I am back with this issue. > > We have to resolve this ?Access is Denied? issue; otherwise, we can?t > use WATIR (sigh!) > > I am only able to use WATIR on our staging server which not in the > same domain as my computer. > > But for some reason, our development servers cannot be accessed by > WATIR as shown below. > > Any suggestion to debug this would be appreciated! > > 1a) ?Access is denied? using IE.attach: > > irb(main):003:0> ie = Watir::IE.attach(:url, > "https://qa-b1.test.com/araneae/app") > > => # @error_checkers=[# > 50 at c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1213>], > @logger=# > r:0x2b33b68 @level=2, @datetime_format="%d-%b-%Y %H:%M:%S", > @progname=nil, @logd > > ev=# @dev=# > 7d0>, @shift_size=nil>>, @typingspeed=0.08, > @activeObjectHighLightColor="yellow" > > , @enable_spinner=false, @url_list=[], @form=nil, > @ie=#> > > irb(main):004:0> ie.show_frames > > there are 2 frames > > frame index: 0 --Access Denied-- > > frame index: 1 --Access Denied-- > > => 0..1 > > irb(main):005:0> puts ie.frame(:index,1).text > > WIN32OLERuntimeError: document > > OLE error code:80070005 in > > Access is denied. > > 1b) ?Access is denied? using ie.goto: > > irb(main):012:0> ie.goto("https://qa-b1.test.com/araneae/app") > > W, [21-Jul-2005 15:39:11#2212] WARN -- : frame error in waitdocument > > OLE error code:80070005 in > > Access is denied. > > irb(main):013:0> ie.show_frames > > there are 2 frames > > frame index: 0 --Access Denied-- > > frame index: 1 --Access Denied-- > > ? 0..1 > > irb(main):018:0> puts ie.frame(:index, 1).text > > WIN32OLERuntimeError: document > > OLE error code:80070005 in > > Access is denied. > > HRESULT error code:0x80020009 > > irb(main):019:0> puts ie.frame(:index, 2).text > > WIN32OLERuntimeError: document > > OLE error code:80070005 in > > Access is denied. > > HRESULT error code:0x80020009 > > irb(main):014:0> ie.show_all_objects > > -----------Objects in page ------------- > > id= src=/include/top.js > > HTML Document name=relay id= src=/include/blank.htm > > l > > HTML Document name=main id= src=/araneae/login > > irb(main):015:0> ie.frame("main").show_all_objects > > Watir::Exception::UnknownFrameException: Unable to locate a frame with > name main > > HRESULT error code:0x80020009 > > 2a) Here is the staging environment I?ve been using to develop WATIR > scripts and it works just fine: > > irb(main):030:0> ie = Watir::IE.attach(:url, > "https://qa.test.com/araneae/app") > > => # @error_checkers=[# > 50 at c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1213>], > @logger=# > r:0x2ae9930 @level=2, @datetime_format="%d-%b-%Y %H:%M:%S", > @progname=nil, @log > > ev=# @dev=# > 7d0>, @shift_size=nil>>, @typingspeed=0.08, > @activeObjectHighLightColor="yellow > > , @enable_spinner=false, @url_list=[], @form=nil, > @ie=#> > > irb(main):031:0> ie.show_frames > > there are 2 frames > > frame index: 0 name: relay > > frame index: 1 name: main > > => 0..1 > > irb(main):036:0> ie.frame("main").show_all_objects > > -----------Objects in page ------------- > > text/css id= > > id= src=/include/shared.js > > id= src=/include/inputValidation.js > > id= src=/include/formcheck.js > > id= src= > > text name=UserId id= value=tuyet a > > t= src= > > password name=Password id= value= a > > t= src= > > text name=CustomerId id= value=yxsrkk29ey a > > t= src= > > select-one name=Destination id= value= > > checkbox name=SaveSettings id= value=on a > > t= src= > > name= id= > > button name= id=loginBtn value= Log In a > > t= src= > > name= id= > > Exception occurred. > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > From getboni at yahoo.co.in Fri Jul 22 01:02:56 2005 From: getboni at yahoo.co.in (boni uday) Date: Fri, 22 Jul 2005 06:02:56 +0100 (BST) Subject: [Wtr-general] Need Help Message-ID: <20050722050257.35375.qmail@web8303.mail.in.yahoo.com> Is RUBY Supports Multiple Inhertiance ? I want to herit more than one class Pls hel me Uday --------------------------------- How much free photo storage do you get? Store your friends n family photos for FREE with Yahoo! Photos. http://in.photos.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050722/0e569b3b/attachment.html From satti at qantom.com Fri Jul 22 01:25:54 2005 From: satti at qantom.com (Sathya Shankar) Date: Fri, 22 Jul 2005 10:55:54 +0530 Subject: [Wtr-general] Need Help In-Reply-To: <20050722050257.35375.qmail@web8303.mail.in.yahoo.com> References: <20050722050257.35375.qmail@web8303.mail.in.yahoo.com> Message-ID: <42E08362.2050300@qantom.com> Hi boni, Ruby has an option called the "Super-Class" i think thatz what u want. This is how it goz, class foo def x ----- print " I am Boni" ----- end end >>nil class uday> nil uday.new.x >> I am Boni >> I am Uday Sathya Shankar boni uday wrote: > Is RUBY Supports Multiple Inhertiance ? > > I want to herit more than one class > > Pls hel me > > Uday > > ------------------------------------------------------------------------ > How much free photo storage do you get? Store your friends n family > photos for FREE with Yahoo! Photos. > http://in.photos.yahoo.com > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > From zeljko.filipin at gmail.com Fri Jul 22 02:28:17 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 22 Jul 2005 08:28:17 +0200 Subject: [Wtr-general] Need Help In-Reply-To: <20050722050257.35375.qmail@web8303.mail.in.yahoo.com> Message-ID: <42e091cb.5f6c6f8f.35f1.ffff9ffc@mx.gmail.com> "Ruby is a singleinheritance language" (Programming Ruby -- The Pragmatic Programmer's Guide, 2nd edition) But there is something called mixins. Read from ProgrammingRuby.chm (comes with ruby) this: Mixin Modules (classes) Mixins (modules) Mixins---Including Modules (language) Zeljko ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of boni uday Sent: Friday, July 22, 2005 7:03 AM To: ruby form Subject: [Wtr-general] Need Help Is RUBY Supports Multiple Inhertiance ? I want to herit more than one class Pls hel me Uday ________________________________ How much free photo storage do you get? Store your friends n family photos for FREE with Yahoo! Photos. http://in.photos.yahoo.com From dkurtz at olenick.com Fri Jul 22 11:46:09 2005 From: dkurtz at olenick.com (Daniel Kurtz) Date: Fri, 22 Jul 2005 10:46:09 -0500 Subject: [Wtr-general] Script non-responsive Message-ID: <82E50B4081E1354AAC1F917519B13F0D4E0226@OLENICK-01-EX.atlarge.net> The command equivelant: ie.button(:src, "http://cdn.search.aol.com/aolsearch/searchbutton_5_0.gif").click works fine in IRB. Running in a script however, it does click the button, but never returns, causing the script to stall without any error reporting. This command, BTW, happens to be in an iteration block, executing on different attributes each time. This particular one is the only one that fails, and it also happens to be the only one that's using ":src" and a URL. Does that have anything to do with it? Brand new with both Ruby and WATiR, BTW. Cool stuff. Hopefully I'll get to play with it for awhile, before having to go back to Mercury et al. Daniel Kurtz Consultant Olenick & Associates 205 W. Wacker Drive Suite 2010 Chicago, IL 60606 312-332-0096 www.olenick.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050722/e12345e6/attachment.html From Peter.Ch at NETeller.com Fri Jul 22 12:03:27 2005 From: Peter.Ch at NETeller.com (Peter Chau) Date: Fri, 22 Jul 2005 10:03:27 -0600 Subject: [Wtr-general] Script non-responsive Message-ID: Daniel, Try this, ie.image(:src, /searchbutton_5_0.gif.).click Peter ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Daniel Kurtz Sent: Friday, July 22, 2005 9:46 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Script non-responsive The command equivelant: ie.button(:src, "http://cdn.search.aol.com/aolsearch/searchbutton_5_0.gif").click works fine in IRB. Running in a script however, it does click the button, but never returns, causing the script to stall without any error reporting. This command, BTW, happens to be in an iteration block, executing on different attributes each time. This particular one is the only one that fails, and it also happens to be the only one that's using ":src" and a URL. Does that have anything to do with it? Brand new with both Ruby and WATiR, BTW. Cool stuff. Hopefully I'll get to play with it for awhile, before having to go back to Mercury et al. Daniel Kurtz Consultant Olenick & Associates 205 W. Wacker Drive Suite 2010 Chicago, IL 60606 312-332-0096 www.olenick.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050722/1365fbe2/attachment.html From dkurtz at olenick.com Fri Jul 22 12:41:33 2005 From: dkurtz at olenick.com (Daniel Kurtz) Date: Fri, 22 Jul 2005 11:41:33 -0500 Subject: [Wtr-general] Script non-responsive Message-ID: <82E50B4081E1354AAC1F917519B13F0D4E0227@OLENICK-01-EX.atlarge.net> By the way, once you finally lose your patience and "Ctrl-C" out of the stalled script, this is what gets returned: c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1456:in `sleep': Interrupt from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1456:in `waitForIE' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2099:in `click' from C:/watir_bonus/examples/bigSearch2.rb:48:in `test_myTestCase' from C:/watir_bonus/examples/bigSearch2.rb:14:in `each' from C:/watir_bonus/examples/bigSearch2.rb:14:in `test_myTestCase' from c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `__send__' from c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `run' from c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' ... 9 levels... from c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:194:in `run' from c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:14:in `run' from c:/ruby/lib/ruby/1.8/test/unit.rb:285 from c:/ruby/lib/ruby/1.8/test/unit.rb:283 Daniel Kurtz Consultant Olenick & Associates 205 W. Wacker Drive Suite 2010 Chicago, IL 60606 312-332-0096 www.olenick.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050722/3d877ce4/attachment.html From dkurtz at olenick.com Fri Jul 22 13:36:32 2005 From: dkurtz at olenick.com (Daniel Kurtz) Date: Fri, 22 Jul 2005 12:36:32 -0500 Subject: [Wtr-general] "WARN -- : frame error in waitdocument" error Message-ID: <82E50B4081E1354AAC1F917519B13F0D4E0229@OLENICK-01-EX.atlarge.net> OK, since this thing doesn't appear to be of any consequence to the validity of my script (elsewhere I read that the way to deal with it is to ignore it), is there any way to suppress the error output? It scares the hell out of the people I'm trying to demo the technology to, besides making the output just plain difficult to read. Daniel Kurtz Consultant Olenick & Associates 205 W. Wacker Drive Suite 2010 Chicago, IL 60606 312-332-0096 www.olenick.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050722/7206465e/attachment.html From bret at pettichord.com Fri Jul 22 15:59:07 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 22 Jul 2005 14:59:07 -0500 Subject: [Wtr-general] Access is denied and Exception Errors In-Reply-To: Message-ID: <5.1.0.14.2.20050722145403.0313edc8@127.0.0.1> This error occurs when you try to navigate directly from a page that is hosted by one server to a frame that is served by another. It sounds like your staging server serves everything from one point, but your development servers serve them from a couple different servers. The way to workaround this is to navigate directly to the subframe (and the server that hosts it) that you are trying to test (using ie.goto, if necessary). Send the html for https://qa-b1.test.com/araneae/app, and i can give more details. Bret At 06:46 PM 7/21/2005, Tuyet Cong-Ton-Nu wrote: >I am back with this issue. > >We have to resolve this Access is Denied issue; otherwise, we can t use >WATIR (sigh!) > >I am only able to use WATIR on our staging server which not in the same >domain as my computer. > >But for some reason, our development servers cannot be accessed by WATIR >as shown below. > >Any suggestion to debug this would be appreciated! > > > >1a) Access is denied using IE.attach: > > > >irb(main):003:0> ie = Watir::IE.attach(:url, >"https://qa-b1.test.com/araneae/app") > >=> #@error_checkers=[# >50 at c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1213>], >@logger=# >r:0x2b33b68 @level=2, @datetime_format="%d-%b-%Y %H:%M:%S", @progname=nil, >@logd > >ev=#@dev=# >7d0>, @shift_size=nil>>, @typingspeed=0.08, >@activeObjectHighLightColor="yellow" > >, @enable_spinner=false, @url_list=[], @form=nil, @ie=#> > >irb(main):004:0> ie.show_frames > >there are 2 frames > >frame index: 0 --Access Denied-- > >frame index: 1 --Access Denied-- > >=> 0..1 > >irb(main):005:0> puts ie.frame(:index,1).text > >WIN32OLERuntimeError: document > > OLE error code:80070005 in > > Access is denied. > > > >1b) Access is denied using ie.goto: > > > >irb(main):012:0> ie.goto("https://qa-b1.test.com/araneae/app") > >W, [21-Jul-2005 15:39:11#2212] WARN -- : frame error in waitdocument > > OLE error code:80070005 in > > Access is denied. > > > >irb(main):013:0> ie.show_frames > >there are 2 frames > >frame index: 0 --Access Denied-- > >frame index: 1 --Access Denied-- > >? 0..1 > > > >irb(main):018:0> puts ie.frame(:index, 1).text > >WIN32OLERuntimeError: document > > OLE error code:80070005 in > > Access is denied. > > HRESULT error code:0x80020009 > > > > > >irb(main):019:0> puts ie.frame(:index, 2).text > >WIN32OLERuntimeError: document > > OLE error code:80070005 in > > Access is denied. > > HRESULT error code:0x80020009 > > > > > >irb(main):014:0> ie.show_all_objects > >-----------Objects in page ------------- > > id= src=/include/top.js > >HTML >Document name=relay id= src=/include/blank.htm > >l > >HTML Document name=main id= src=/araneae/login > > > >irb(main):015:0> ie.frame("main").show_all_objects > >Watir::Exception::UnknownFrameException: Unable to locate a frame with >name main > > HRESULT error code:0x80020009 > > > >2a) Here is the staging environment I ve been using to develop WATIR >scripts and it works just fine: > > > >irb(main):030:0> ie = Watir::IE.attach(:url, >"https://qa.test.com/araneae/app") > >=> #@error_checkers=[# >50 at c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1213>], >@logger=# >r:0x2ae9930 @level=2, @datetime_format="%d-%b-%Y %H:%M:%S", @progname=nil, >@log > >ev=#@dev=# >7d0>, @shift_size=nil>>, @typingspeed=0.08, >@activeObjectHighLightColor="yellow > >, @enable_spinner=false, @url_list=[], @form=nil, @ie=#> > >irb(main):031:0> ie.show_frames > >there are 2 frames > >frame index: 0 name: relay > >frame index: 1 name: main > >=> 0..1 > >irb(main):036:0> ie.frame("main").show_all_objects > >-----------Objects in page ------------- > >text/css id= > > id= src=/include/shared.js > > id= src=/include/inputValidation.js > > id= src=/include/formcheck.js > > id= src= > >text name=UserId id= value=tuyet > a > >t= src= > >password name=Password id= value= > a > >t= src= > >text name=CustomerId id= value=yxsrkk29ey > a > >t= src= > >select-one name=Destination id= value= > >checkbox name=SaveSettings id= value=on > a > >t= src= > > name= id= > >button name= id=loginBtn value= Log >In a > >t= src= > > name= id= > > > > > > > > Exception occurred. >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From michael.net at gmail.com Fri Jul 22 16:46:02 2005 From: michael.net at gmail.com (Mike) Date: Fri, 22 Jul 2005 16:46:02 -0400 Subject: [Wtr-general] Expanding JavaScript-based TreeViews In-Reply-To: <5.1.0.14.2.20050722145403.0313edc8@127.0.0.1> References: <5.1.0.14.2.20050722145403.0313edc8@127.0.0.1> Message-ID: <86388bc705072213463c1b8046@mail.gmail.com> Hi, I was trying to expand a TreeView, which is a third party control, very javascript-intensive. Any ideas on how to proceed? I was able to find and click the image of the node that I want to expand, the div, and everything else remotely involved with that treeview, but nothing happened. This is all happening on a frame, but I understand how to use frames. I realize the above explanation is not too informative, but I'm new to Watir and may not know enough even to know which question to ask. Perhaps someone has some insight into how to deal with third party controls that are performing behind-the-scene tricks. BTW, great tool! We've needed this for a long time. Thanks, Mike P.S. I'm finding some method aliases, like show_divs and showDivs. Should I be ignoring one or the other? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050722/9295c9e9/attachment.html From bret at pettichord.com Fri Jul 22 16:49:33 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 22 Jul 2005 15:49:33 -0500 Subject: [Wtr-general] SilkTest and WATIR statistics In-Reply-To: Message-ID: <5.1.0.14.2.20050722154909.032540a0@127.0.0.1> Thanks for sharing this. I've posted this to our Wiki: http://wtr.rubyforge.org/wiki/wiki.pl?SilkTestComparison At 06:57 PM 7/21/2005, Tuyet Cong-Ton-Nu wrote: >Oops! > > > >I got the wrong file up there. Can you replace it with this one? > >I would appreciate it! Thanks. > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Fri Jul 22 16:51:52 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 22 Jul 2005 15:51:52 -0500 Subject: [Wtr-general] Expanding JavaScript-based TreeViews In-Reply-To: <86388bc705072213463c1b8046@mail.gmail.com> References: <5.1.0.14.2.20050722145403.0313edc8@127.0.0.1> <5.1.0.14.2.20050722145403.0313edc8@127.0.0.1> Message-ID: <5.1.0.14.2.20050722155058.032e68b8@127.0.0.1> At 03:46 PM 7/22/2005, Mike wrote: >P.S. I'm finding some method aliases, like show_divs and >showDivs. Should I be ignoring one or the other? Use the one with the underscores. We'll be moving stuff like showDivs into a optional package soon, so that they will be only available when specifically requested (for legacy code). _____________________ Bret Pettichord www.pettichord.com From dkurtz at olenick.com Fri Jul 22 17:35:38 2005 From: dkurtz at olenick.com (Daniel Kurtz) Date: Fri, 22 Jul 2005 16:35:38 -0500 Subject: [Wtr-general] Assertion failure Message-ID: <82E50B4081E1354AAC1F917519B13F0D4E022A@OLENICK-01-EX.atlarge.net> I'm confused. This is my script, pretty much copied out of the user guide: begin assert(ie.contains_text("verification text") ) puts("TEST PASSED.") rescue puts("TEST FAILED.") end This is what the last couple of lines of output look like: Go to the test site: http://search.msn.com TEST PASSED. Go to the test site: http://www.findit-quick.com TEST FAILED. Go to the test site: http://www.truesearch.com TEST PASSED. Go to the test site: http://www.waply.com/ TEST FAILED. . Finished in 112.515 seconds. 1 tests, 19 assertions, 0 failures, 0 errors Why does the framework-generated text at the end not indicate that assertions failed? How do I capture that info? Daniel Kurtz Consultant Olenick & Associates 205 W. Wacker Drive Suite 2010 Chicago, IL 60606 312-332-0096 www.olenick.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050722/eb0c84ab/attachment.html From michael.net at gmail.com Fri Jul 22 18:34:30 2005 From: michael.net at gmail.com (Mike) Date: Fri, 22 Jul 2005 18:34:30 -0400 Subject: [Wtr-general] Expanding JavaScript-based TreeViews In-Reply-To: <5.1.0.14.2.20050722155058.032e68b8@127.0.0.1> References: <5.1.0.14.2.20050722145403.0313edc8@127.0.0.1> <86388bc705072213463c1b8046@mail.gmail.com> <5.1.0.14.2.20050722155058.032e68b8@127.0.0.1> Message-ID: <86388bc7050722153455538744@mail.gmail.com> > > Use the one with the underscores. Just like the old K&R C/Unix/Perl days...I always knew they'd be back! To answer my own question about treeviews, I found one approach, which worked, here: http://wtr.rubyforge.org/wiki/wiki.pl?FrequentQuestions Interestingly, some of the images I need can not be seen in view source, but the above method does find them. It's kind of laborious, and I keep ending up with many browsers open, but I'm sure I'll work out more efficient ways over time, and even as is, it's still faster and more powerful than any other web testing approaches I'm aware of. Good stuff! Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050722/f5ef6f4c/attachment.html From tuyet.ctn at mscibarra.com Fri Jul 22 19:27:59 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Fri, 22 Jul 2005 16:27:59 -0700 Subject: [Wtr-general] Access is denied and Exception Errors Message-ID: You are right. The development servers can serve the page from different servers because there is a "traffic" cop server that manages the load. I don't think that's the case for our staging server. I hope I included the info you need below, but if not, please let me know the exact irb command result(s) I need to send you. Thanks! I appreciate it. irb(main):008:0> ie = Watir::IE.new => #], @logger=#, @shift_size=nil>>, @typingspeed=0.08, @activeObjectHighLightColor="yellow" , @enable_spinner=false, @url_list=[], @form=nil, @ie=#> irb(main):009:0> ie.goto("https://qa-b1.test.com/araneae/app") W, [22-Jul-2005 16:11:30#2708] WARN -- : frame error in waitdocument OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1470:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1470:in `waitForIE' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1469:in `upto' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1469:in `waitForIE' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1332:in `goto' (irb):9:in `irb_binding' c:/ruby/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding' c:/ruby/lib/ruby/1.8/irb/workspace.rb:52 W, [22-Jul-2005 16:11:30#2708] WARN -- : runtime error in wait => 0.391 irb(main):010:0> ie.html => "" irb(main):011:0> ie.show_frames there are 2 frames frame index: 0 --Access Denied-- frame index: 1 --Access Denied-- * 0..1 irb(main):012:0> ie.frame(:index, 1).show_all_objects -----------Objects in page ------------- WIN32OLERuntimeError: document OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1844:in `method_missing' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1844:in `getDocument' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1667:in `show_all_objects' from (irb):12 irb(main):013:0> ie.frame(:index, 2).show_all_objects -----------Objects in page ------------- WIN32OLERuntimeError: document OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1844:in `method_missing' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1844:in `getDocument' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1667:in `show_all_objects' from (irb):13 irb(main):015:0> ie.show_all_objects -----------Objects in page ------------- id= src=/include/top.js HTML Document name=relay id= src=/include/blank.htm l HTML Document name=main id= src=/araneae/login * nil irb(main):016:0> ie.frame("main").show_all_objects Watir::Exception::UnknownFrameException: Unable to locate a frame with name main from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1832:in `initialize' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `new' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `frame' from (irb):16 from :0 irb(main):017:0> ie.frame("relay").show_all_objects Watir::Exception::UnknownFrameException: Unable to locate a frame with name relay from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1832:in `initialize' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `new' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `frame' from (irb):17 from :0 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050722/ce76d585/attachment.html From bret at pettichord.com Fri Jul 22 19:49:31 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 22 Jul 2005 18:49:31 -0500 Subject: [Wtr-general] new support for referencing frames Message-ID: <5.1.0.14.2.20050722184803.033af330@127.0.0.1> I have committed changes that allow you to reference frames using id's or regexps: ie.frame(:name, /foo/) ie.frame(:id, 'whatever') Bret _____________________ Bret Pettichord www.pettichord.com From kls at merlot.com Sat Jul 23 03:30:31 2005 From: kls at merlot.com (Kurt Sussman) Date: Sat, 23 Jul 2005 00:30:31 -0700 Subject: [Wtr-general] finding javascript-created browser window Message-ID: <20050723073031.GZ25531@merlot.com> I'm trying to write a script that tests a relatively simple web app. There are two factors that make this difficult: the page I need to test is created by a javascript function (indirectly via a link), and the developers are unwilling to make any changes to that code to increase testability. My first thought was to sleep for a while, waiting for the javascript function to run and load the new window, then find it by name. This isn't working for me and I can't figure out why. Any ideas? If the archives were searchable, I'd search them before asking... I hope this isn't a common question. I did browse the archives, but that's not the same as searching. Thanks. --Kurt -- ---------------------------------------------------------------------- Merlot Research Group, Inc http://www.merlot.com kls[at]merlot.com GPG key 82505A74 Jabber: MerlotQA From getboni at yahoo.co.in Sat Jul 23 05:39:55 2005 From: getboni at yahoo.co.in (boni uday) Date: Sat, 23 Jul 2005 10:39:55 +0100 (BST) Subject: [Wtr-general] Re:Multiple Inheritance Message-ID: <20050723093955.22075.qmail@web8304.mail.in.yahoo.com> Hi I've One user defined calss whose defination is as follows: class TestForViewingProjectDetails < Test::Unit::TestCase def x end end Now i want to inherit another class (CreateLogger) for this class Is it possible pls help me --------------------------------- How much free photo storage do you get? Store your friends n family photos for FREE with Yahoo! Photos. http://in.photos.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050723/3457d129/attachment.html From bret at pettichord.com Sat Jul 23 13:04:00 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 23 Jul 2005 12:04:00 -0500 Subject: [Wtr-general] Access is denied and Exception Errors In-Reply-To: Message-ID: <5.1.0.14.2.20050723120212.033ad070@127.0.0.1> Try these: ie.goto("https://qa-b1.test.com/araneae/login") ie.goto("https://qa-b1.test.com/include/blank.html") Bret At 06:27 PM 7/22/2005, Tuyet Cong-Ton-Nu wrote: >You are right. The development servers can serve the page from different >servers because there is a traffic cop server that manages the load. I >don t think that s the case for our staging server. > >I hope I included the info you need below, but if not, please let me know >the exact irb command result(s) I need to send you. Thanks! I appreciate it. > > > > > >irb(main):008:0> ie = Watir::IE.new > >=> #@error_checkers=[# >50 at c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1213>], >@logger=# >r:0x2ad44c8 @level=2, @datetime_format="%d-%b-%Y %H:%M:%S", @progname=nil, >@logd > >ev=#@dev=# >7d0>, @shift_size=nil>>, @typingspeed=0.08, >@activeObjectHighLightColor="yellow" > >, @enable_spinner=false, @url_list=[], @form=nil, @ie=#> > > > >irb(main):009:0> ie.goto("https://qa-b1.test.com/araneae/app") > >W, [22-Jul-2005 16:11:30#2708] WARN -- : frame error in waitdocument > > OLE error code:80070005 in > > Access is denied. > > > > HRESULT error code:0x80020009 > > Exception occurred. > >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1470:in `method_missing' > >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1470:in `waitForIE' > >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1469:in `upto' > >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1469:in `waitForIE' > >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1332:in `goto' > >(irb):9:in `irb_binding' > >c:/ruby/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding' > >c:/ruby/lib/ruby/1.8/irb/workspace.rb:52 > >W, [22-Jul-2005 16:11:30#2708] WARN -- : runtime error in wait > >=> 0.391 > > > >irb(main):010:0> ie.html > >=> "border=0 nam > >e=relay marginWidth=0 marginHeight=0 src=\"/include/blank.html\" >frameBorder=\"\ > >" noResize scrolling=no>marginHeight=0 s > >rc=\"/araneae/login\" frameBorder=0 scrolling=no>" > >irb(main):011:0> ie.show_frames > >there are 2 frames > >frame index: 0 --Access Denied-- > >frame index: 1 --Access Denied-- > >? 0..1 > > > >irb(main):012:0> ie.frame(:index, 1).show_all_objects > >-----------Objects in page ------------- > >WIN32OLERuntimeError: document > > OLE error code:80070005 in > > Access is denied. > > > > HRESULT error code:0x80020009 > > Exception occurred. > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1844:in `method_missing' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1844:in `getDocument' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1667:in > `show_all_objects' > > from (irb):12 > > > >irb(main):013:0> ie.frame(:index, 2).show_all_objects > >-----------Objects in page ------------- > >WIN32OLERuntimeError: document > > OLE error code:80070005 in > > Access is denied. > > > > HRESULT error code:0x80020009 > > Exception occurred. > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1844:in `method_missing' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1844:in `getDocument' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1667:in > `show_all_objects' > > from (irb):13 > > > >irb(main):015:0> ie.show_all_objects > >-----------Objects in page ------------- > > id= src=/include/top.js > >HTML >Document name=relay id= src=/include/blank.htm > >l > >HTML Document name=main id= src=/araneae/login > > > >? nil > > > > > >irb(main):016:0> ie.frame("main").show_all_objects > >Watir::Exception::UnknownFrameException: Unable to locate a frame with >name main > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1832:in `initialize' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `new' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `frame' > > from (irb):16 > > from :0 > > > >irb(main):017:0> ie.frame("relay").show_all_objects > >Watir::Exception::UnknownFrameException: Unable to locate a frame with >name relay > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1832:in `initialize' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `new' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `frame' > > from (irb):17 > > from :0 >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From zeljko.filipin at gmail.com Sat Jul 23 16:49:44 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Sat, 23 Jul 2005 22:49:44 +0200 Subject: [Wtr-general] finding javascript-created browser window In-Reply-To: <20050723073031.GZ25531@merlot.com> Message-ID: <42e2ad34.271e670c.1cea.0cb3@mx.gmail.com> For searching archives try this in Google: site:rubyforge.org "[Wtr-general]" javascript (instead of "javascript" you can use anything you think can be usefull) Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Kurt Sussman Sent: Saturday, July 23, 2005 9:31 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] finding javascript-created browser window I'm trying to write a script that tests a relatively simple web app. There are two factors that make this difficult: the page I need to test is created by a javascript function (indirectly via a link), and the developers are unwilling to make any changes to that code to increase testability. My first thought was to sleep for a while, waiting for the javascript function to run and load the new window, then find it by name. This isn't working for me and I can't figure out why. Any ideas? If the archives were searchable, I'd search them before asking... I hope this isn't a common question. I did browse the archives, but that's not the same as searching. Thanks. --Kurt -- ---------------------------------------------------------------------- Merlot Research Group, Inc http://www.merlot.com kls[at]merlot.com GPG key 82505A74 Jabber: MerlotQA _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Sun Jul 24 02:02:13 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sun, 24 Jul 2005 01:02:13 -0500 Subject: [Wtr-general] finding javascript-created browser window In-Reply-To: <20050723073031.GZ25531@merlot.com> Message-ID: <5.1.0.14.2.20050724005524.02948390@127.0.0.1> At 02:30 AM 7/23/2005, Kurt Sussman wrote: >I'm trying to write a script that tests a relatively simple web app. >There are two factors that make this difficult: the page I need to test >is created by a javascript function (indirectly via a link), and the >developers are unwilling to make any changes to that code to increase >testability. > >My first thought was to sleep for a while, waiting for the javascript >function to run and load the new window, then find it by name. This >isn't working for me and I can't figure out why. > >Any ideas? > >If the archives were searchable, I'd search them before asking... I hope >this isn't a common question. I did browse the archives, but that's not >the same as searching. > >Thanks. This is the biggest weakness with Watir: modal javascript popups. None of us have figured out a way to get to the popups DOM, and from what i've been able to tell, this actually stems from a weakness in the DOM specification, rather than a fault in the Microsoft implementation. I did find a MS technical note that indicated a workaround, but it would have to be coded in C and would require an optional Accessibility feature -- i'm not sure whether it is worth pursuing. (I'm offline at the moment, google for ihtmldocument2 and its the third or fourth link.) In the mean time, the best we've been able to to do is to send key events to the popup window to get it to go away. This "solution" is in the FAQ. Bret _____________________ Bret Pettichord www.pettichord.com From huemach at Cybersoft-VN.com Sun Jul 24 23:06:38 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Mon, 25 Jul 2005 10:06:38 +0700 Subject: [Wtr-general] Get 2D Array size? Message-ID: <99DF6C0285C2CE4C99F02D78385719660177FC9A@hue.cybersoft-vn.com> Dear ALL I would like get size of 2D array, as like this table_data = ie.frame("rightframe").frame("result").table(:id, "table").to_a puts table_data.length But it's seemed incorrect. And Do you have any suggestion for verify value in table? Thank you for help Hue From shaorobics at gmail.com Sun Jul 24 23:46:47 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Sun, 24 Jul 2005 23:46:47 -0400 Subject: [Wtr-general] finding javascript-created browser window In-Reply-To: <5.1.0.14.2.20050724005524.02948390@127.0.0.1> References: <20050723073031.GZ25531@merlot.com> <5.1.0.14.2.20050724005524.02948390@127.0.0.1> Message-ID: <593b9ae805072420463ab180a4@mail.gmail.com> Speaking of modal dialogs, one of the developers from my company has figured out a way to deal with them (by changing them into regular pop ups at run time). There is one trick that must be employed, and that is to have a check in the Javascript code, for example, in pseudo code (since I don't remember the exact coding from home) if showModal not defined give a regular alert box else show them the modal dialog end Now, in the browser, if you type in the URL: javascript: var x; showModal = x; and hit enter any action you do that would normally generate the modal dialog would generate a regular alert pop up which you can use autoit to get rid of. The only problem with this is that if you use WATIR to set the URL to line mentioned above, it hangs.. From kls at merlot.com Mon Jul 25 00:17:37 2005 From: kls at merlot.com (Kurt Sussman) Date: Sun, 24 Jul 2005 21:17:37 -0700 Subject: [Wtr-general] finding javascript-created browser window In-Reply-To: <5.1.0.14.2.20050724005524.02948390@127.0.0.1> References: <20050723073031.GZ25531@merlot.com> <5.1.0.14.2.20050724005524.02948390@127.0.0.1> Message-ID: <20050725041737.GW25531@merlot.com> Bret Pettichord (bret at pettichord.com) typed this ... > At 02:30 AM 7/23/2005, Kurt Sussman wrote: > >I'm trying to write a script that tests a relatively simple web app. > >There are two factors that make this difficult: the page I need to test > >is created by a javascript function (indirectly via a link), and the Replying to myself... I think the 'attach' method might work for me... I'll check as soon as my test system is available again. http://rubyforge.org/pipermail/wtr-general/2005-June/002142.html > >If the archives were searchable, I'd search them before asking... I hope Thatks for the reminder about google's 'site:' tag. That helped a lot. > This is the biggest weakness with Watir: modal javascript popups. It's not a modal javascript popup; it's a new browser window spawned by a javascript function. The original page goes to a new URL after spawning the new window. > In the mean time, the best we've been able to to do is to send key events > to the popup window to get it to go away. This "solution" is in the FAQ. I don't want the popup to go away. The app I need to test is in it. If I wanted it to go away, the FAQ would probably have gotten me there. Does this clarify the problem I'm having? Do you think the 'attach' method is the right approach? Now I'm trying to get my client to think about giving the testers a direct URL instead of this javascript-spawned indirection. The dev-test people test the engine without these tricks on the front end; their clients add all kinds of impediments to testing the apps that are built using the engine. Maybe the solution is bureacratic instead of technical. #:) Thanks for the tips. --Kurt -- ---------------------------------------------------------------------- Merlot Research Group, Inc http://www.merlot.com kls[at]merlot.com GPG key 82505A74 Jabber: MerlotQA From jared at kilmore.info Mon Jul 25 00:24:45 2005 From: jared at kilmore.info (Jared Quinert) Date: Mon, 25 Jul 2005 14:24:45 +1000 Subject: [Wtr-general] Get 2D Array size? In-Reply-To: <99DF6C0285C2CE4C99F02D78385719660177FC9A@hue.cybersoft-vn.com> References: <99DF6C0285C2CE4C99F02D78385719660177FC9A@hue.cybersoft-vn.com> Message-ID: <42E4698D.4010505@kilmore.info> What was returned, and what were you expecting? Could you get the information by using table.row_count and table.column_count? Jared Hue Mach Dieu wrote: >Dear ALL >I would like get size of 2D array, as like this > >table_data = ie.frame("rightframe").frame("result").table(:id, >"table").to_a > >puts table_data.length > >But it's seemed incorrect. > >And Do you have any suggestion for verify value in table? > >Thank you for help > >Hue > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > From huemach at Cybersoft-VN.com Mon Jul 25 01:33:46 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Mon, 25 Jul 2005 12:33:46 +0700 Subject: [Wtr-general] Re: Get 2D Array size? Message-ID: <99DF6C0285C2CE4C99F02D78385719660177FDAF@hue.cybersoft-vn.com> Hi Jared, Currently, I test the table as like this ----------------------------------- |Time | Event |... ----------------------------------- ----------------------------------- ----------------------------------- ----------------------------------- ----------------------------------- ----------------------------------- -----Original Message----- From: wtr-general-request at rubyforge.org [mailto:wtr-general-request at rubyforge.org] Sent: Monday, July 25, 2005 11:20 AM To: wtr-general at rubyforge.org Subject: Wtr-general Digest, Vol 20, Issue 39 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. new support for referencing frames (Bret Pettichord) 2. finding javascript-created browser window (Kurt Sussman) 3. Re:Multiple Inheritance (boni uday) 4. Re: Access is denied and Exception Errors (Bret Pettichord) 5. RE: finding javascript-created browser window (Zeljko Filipin) 6. Re: finding javascript-created browser window (Bret Pettichord) 7. Get 2D Array size? (Hue Mach Dieu) 8. Re: finding javascript-created browser window (Shao Kang Tat) 9. Re: finding javascript-created browser window (Kurt Sussman) 10. Re: Get 2D Array size? (Jared Quinert) ---------------------------------------------------------------------- Message: 1 Date: Fri, 22 Jul 2005 18:49:31 -0500 From: Bret Pettichord Subject: [Wtr-general] new support for referencing frames To: wtr-general at rubyforge.org Message-ID: <5.1.0.14.2.20050722184803.033af330 at 127.0.0.1> Content-Type: text/plain; charset="us-ascii"; format=flowed I have committed changes that allow you to reference frames using id's or regexps: ie.frame(:name, /foo/) ie.frame(:id, 'whatever') Bret _____________________ Bret Pettichord www.pettichord.com ------------------------------ Message: 2 Date: Sat, 23 Jul 2005 00:30:31 -0700 From: Kurt Sussman Subject: [Wtr-general] finding javascript-created browser window To: wtr-general at rubyforge.org Message-ID: <20050723073031.GZ25531 at merlot.com> Content-Type: text/plain; charset=us-ascii I'm trying to write a script that tests a relatively simple web app. There are two factors that make this difficult: the page I need to test is created by a javascript function (indirectly via a link), and the developers are unwilling to make any changes to that code to increase testability. My first thought was to sleep for a while, waiting for the javascript function to run and load the new window, then find it by name. This isn't working for me and I can't figure out why. Any ideas? If the archives were searchable, I'd search them before asking... I hope this isn't a common question. I did browse the archives, but that's not the same as searching. Thanks. --Kurt -- ---------------------------------------------------------------------- Merlot Research Group, Inc http://www.merlot.com kls[at]merlot.com GPG key 82505A74 Jabber: MerlotQA ------------------------------ Message: 3 Date: Sat, 23 Jul 2005 10:39:55 +0100 (BST) From: boni uday Subject: [Wtr-general] Re:Multiple Inheritance To: ruby form Message-ID: <20050723093955.22075.qmail at web8304.mail.in.yahoo.com> Content-Type: text/plain; charset="iso-8859-1" Hi I've One user defined calss whose defination is as follows: class TestForViewingProjectDetails < Test::Unit::TestCase def x end end Now i want to inherit another class (CreateLogger) for this class Is it possible pls help me --------------------------------- How much free photo storage do you get? Store your friends n family photos for FREE with Yahoo! Photos. http://in.photos.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050723/3457d129/attachment-0001.htm ------------------------------ Message: 4 Date: Sat, 23 Jul 2005 12:04:00 -0500 From: Bret Pettichord Subject: Re: [Wtr-general] Access is denied and Exception Errors To: wtr-general at rubyforge.org Message-ID: <5.1.0.14.2.20050723120212.033ad070 at 127.0.0.1> Content-Type: text/plain; charset="iso-8859-1"; format=flowed Try these: ie.goto("https://qa-b1.test.com/araneae/login") ie.goto("https://qa-b1.test.com/include/blank.html") Bret At 06:27 PM 7/22/2005, Tuyet Cong-Ton-Nu wrote: >You are right. The development servers can serve the page from different >servers because there is a traffic cop server that manages the load. I >don t think that s the case for our staging server. > >I hope I included the info you need below, but if not, please let me know >the exact irb command result(s) I need to send you. Thanks! I appreciate it. > > > > > >irb(main):008:0> ie = Watir::IE.new > >=> #@error_checkers=[# >50 at c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1213>], >@logger=# >r:0x2ad44c8 @level=2, @datetime_format="%d-%b-%Y %H:%M:%S", @progname=nil, >@logd > >ev=#@dev=# >7d0>, @shift_size=nil>>, @typingspeed=0.08, >@activeObjectHighLightColor="yellow" > >, @enable_spinner=false, @url_list=[], @form=nil, @ie=#> > > > >irb(main):009:0> ie.goto("https://qa-b1.test.com/araneae/app") > >W, [22-Jul-2005 16:11:30#2708] WARN -- : frame error in waitdocument > > OLE error code:80070005 in > > Access is denied. > > > > HRESULT error code:0x80020009 > > Exception occurred. > >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1470:in `method_missing' > >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1470:in `waitForIE' > >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1469:in `upto' > >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1469:in `waitForIE' > >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1332:in `goto' > >(irb):9:in `irb_binding' > >c:/ruby/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding' > >c:/ruby/lib/ruby/1.8/irb/workspace.rb:52 > >W, [22-Jul-2005 16:11:30#2708] WARN -- : runtime error in wait > >=> 0.391 > > > >irb(main):010:0> ie.html > >=> "border=0 nam > >e=relay marginWidth=0 marginHeight=0 src=\"/include/blank.html\" >frameBorder=\"\ > >" noResize scrolling=no>marginHeight=0 s > >rc=\"/araneae/login\" frameBorder=0 scrolling=no>" > >irb(main):011:0> ie.show_frames > >there are 2 frames > >frame index: 0 --Access Denied-- > >frame index: 1 --Access Denied-- > >? 0..1 > > > >irb(main):012:0> ie.frame(:index, 1).show_all_objects > >-----------Objects in page ------------- > >WIN32OLERuntimeError: document > > OLE error code:80070005 in > > Access is denied. > > > > HRESULT error code:0x80020009 > > Exception occurred. > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1844:in `method_missing' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1844:in `getDocument' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1667:in > `show_all_objects' > > from (irb):12 > > > >irb(main):013:0> ie.frame(:index, 2).show_all_objects > >-----------Objects in page ------------- > >WIN32OLERuntimeError: document > > OLE error code:80070005 in > > Access is denied. > > > > HRESULT error code:0x80020009 > > Exception occurred. > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1844:in `method_missing' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1844:in `getDocument' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1667:in > `show_all_objects' > > from (irb):13 > > > >irb(main):015:0> ie.show_all_objects > >-----------Objects in page ------------- > > id= src=/include/top.js > >HTML >Document name=relay id= src=/include/blank.htm > >l > >HTML Document name=main id= src=/araneae/login > > > >? nil > > > > > >irb(main):016:0> ie.frame("main").show_all_objects > >Watir::Exception::UnknownFrameException: Unable to locate a frame with >name main > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1832:in `initialize' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `new' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `frame' > > from (irb):16 > > from :0 > > > >irb(main):017:0> ie.frame("relay").show_all_objects > >Watir::Exception::UnknownFrameException: Unable to locate a frame with >name relay > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1832:in `initialize' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `new' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `frame' > > from (irb):17 > > from :0 >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com ------------------------------ Message: 5 Date: Sat, 23 Jul 2005 22:49:44 +0200 From: "Zeljko Filipin" Subject: RE: [Wtr-general] finding javascript-created browser window To: Message-ID: <42e2ad34.271e670c.1cea.0cb3 at mx.gmail.com> Content-Type: text/plain; charset="us-ascii" For searching archives try this in Google: site:rubyforge.org "[Wtr-general]" javascript (instead of "javascript" you can use anything you think can be usefull) Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Kurt Sussman Sent: Saturday, July 23, 2005 9:31 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] finding javascript-created browser window I'm trying to write a script that tests a relatively simple web app. There are two factors that make this difficult: the page I need to test is created by a javascript function (indirectly via a link), and the developers are unwilling to make any changes to that code to increase testability. My first thought was to sleep for a while, waiting for the javascript function to run and load the new window, then find it by name. This isn't working for me and I can't figure out why. Any ideas? If the archives were searchable, I'd search them before asking... I hope this isn't a common question. I did browse the archives, but that's not the same as searching. Thanks. --Kurt -- ---------------------------------------------------------------------- Merlot Research Group, Inc http://www.merlot.com kls[at]merlot.com GPG key 82505A74 Jabber: MerlotQA _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ------------------------------ Message: 6 Date: Sun, 24 Jul 2005 01:02:13 -0500 From: Bret Pettichord Subject: Re: [Wtr-general] finding javascript-created browser window To: wtr-general at rubyforge.org Message-ID: <5.1.0.14.2.20050724005524.02948390 at 127.0.0.1> Content-Type: text/plain; charset="us-ascii"; format=flowed At 02:30 AM 7/23/2005, Kurt Sussman wrote: >I'm trying to write a script that tests a relatively simple web app. >There are two factors that make this difficult: the page I need to test >is created by a javascript function (indirectly via a link), and the >developers are unwilling to make any changes to that code to increase >testability. > >My first thought was to sleep for a while, waiting for the javascript >function to run and load the new window, then find it by name. This >isn't working for me and I can't figure out why. > >Any ideas? > >If the archives were searchable, I'd search them before asking... I hope >this isn't a common question. I did browse the archives, but that's not >the same as searching. > >Thanks. This is the biggest weakness with Watir: modal javascript popups. None of us have figured out a way to get to the popups DOM, and from what i've been able to tell, this actually stems from a weakness in the DOM specification, rather than a fault in the Microsoft implementation. I did find a MS technical note that indicated a workaround, but it would have to be coded in C and would require an optional Accessibility feature -- i'm not sure whether it is worth pursuing. (I'm offline at the moment, google for ihtmldocument2 and its the third or fourth link.) In the mean time, the best we've been able to to do is to send key events to the popup window to get it to go away. This "solution" is in the FAQ. Bret _____________________ Bret Pettichord www.pettichord.com ------------------------------ Message: 7 Date: Mon, 25 Jul 2005 10:06:38 +0700 From: "Hue Mach Dieu" Subject: [Wtr-general] Get 2D Array size? To: Message-ID: <99DF6C0285C2CE4C99F02D78385719660177FC9A at hue.cybersoft-vn.com> Content-Type: text/plain; charset="us-ascii" Dear ALL I would like get size of 2D array, as like this table_data = ie.frame("rightframe").frame("result").table(:id, "table").to_a puts table_data.length But it's seemed incorrect. And Do you have any suggestion for verify value in table? Thank you for help Hue ------------------------------ Message: 8 Date: Sun, 24 Jul 2005 23:46:47 -0400 From: Shao Kang Tat Subject: Re: [Wtr-general] finding javascript-created browser window To: wtr-general at rubyforge.org Message-ID: <593b9ae805072420463ab180a4 at mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Speaking of modal dialogs, one of the developers from my company has figured out a way to deal with them (by changing them into regular pop ups at run time). There is one trick that must be employed, and that is to have a check in the Javascript code, for example, in pseudo code (since I don't remember the exact coding from home) if showModal not defined give a regular alert box else show them the modal dialog end Now, in the browser, if you type in the URL: javascript: var x; showModal = x; and hit enter any action you do that would normally generate the modal dialog would generate a regular alert pop up which you can use autoit to get rid of. The only problem with this is that if you use WATIR to set the URL to line mentioned above, it hangs.. ------------------------------ Message: 9 Date: Sun, 24 Jul 2005 21:17:37 -0700 From: Kurt Sussman Subject: Re: [Wtr-general] finding javascript-created browser window To: wtr-general at rubyforge.org Message-ID: <20050725041737.GW25531 at merlot.com> Content-Type: text/plain; charset=us-ascii Bret Pettichord (bret at pettichord.com) typed this ... > At 02:30 AM 7/23/2005, Kurt Sussman wrote: > >I'm trying to write a script that tests a relatively simple web app. > >There are two factors that make this difficult: the page I need to test > >is created by a javascript function (indirectly via a link), and the Replying to myself... I think the 'attach' method might work for me... I'll check as soon as my test system is available again. http://rubyforge.org/pipermail/wtr-general/2005-June/002142.html > >If the archives were searchable, I'd search them before asking... I hope Thatks for the reminder about google's 'site:' tag. That helped a lot. > This is the biggest weakness with Watir: modal javascript popups. It's not a modal javascript popup; it's a new browser window spawned by a javascript function. The original page goes to a new URL after spawning the new window. > In the mean time, the best we've been able to to do is to send key events > to the popup window to get it to go away. This "solution" is in the FAQ. I don't want the popup to go away. The app I need to test is in it. If I wanted it to go away, the FAQ would probably have gotten me there. Does this clarify the problem I'm having? Do you think the 'attach' method is the right approach? Now I'm trying to get my client to think about giving the testers a direct URL instead of this javascript-spawned indirection. The dev-test people test the engine without these tricks on the front end; their clients add all kinds of impediments to testing the apps that are built using the engine. Maybe the solution is bureacratic instead of technical. #:) Thanks for the tips. --Kurt -- ---------------------------------------------------------------------- Merlot Research Group, Inc http://www.merlot.com kls[at]merlot.com GPG key 82505A74 Jabber: MerlotQA ------------------------------ Message: 10 Date: Mon, 25 Jul 2005 14:24:45 +1000 From: Jared Quinert Subject: Re: [Wtr-general] Get 2D Array size? To: wtr-general at rubyforge.org Message-ID: <42E4698D.4010505 at kilmore.info> Content-Type: text/plain; charset=ISO-8859-1; format=flowed What was returned, and what were you expecting? Could you get the information by using table.row_count and table.column_count? Jared Hue Mach Dieu wrote: >Dear ALL >I would like get size of 2D array, as like this > >table_data = ie.frame("rightframe").frame("result").table(:id, >"table").to_a > >puts table_data.length > >But it's seemed incorrect. > >And Do you have any suggestion for verify value in table? > >Thank you for help > >Hue > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > ------------------------------ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general End of Wtr-general Digest, Vol 20, Issue 39 ******************************************* From huemach at Cybersoft-VN.com Mon Jul 25 01:43:20 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Mon, 25 Jul 2005 12:43:20 +0700 Subject: [Wtr-general] RE: Get 2D Array size? Message-ID: <99DF6C0285C2CE4C99F02D78385719660177FDB6@hue.cybersoft-vn.com> Hi Jared Currently, I would like get test the data in table as like this ----------------------------------------------- |Time | Event |... ----------------------------------------------- |2005/07/19 10:49:30 |Exposure end (normal) ----------------------------------------------- |2005/07/19 10:58:12 |Event 2 ----------------------------------------------- |2005/07/19 11:03:44 |Exposure end (Error) ----------------------------------------------- ... Bc have several table like this, so I develop the procedure check the result Def check_result(array_input, expected_result) .... End So I would like to know the array_input content how many data, And I compare one by one with expected_result Thank for help Hue -----Original Message----- From: wtr-general-request at rubyforge.org [mailto:wtr-general-request at rubyforge.org] Sent: Monday, July 25, 2005 11:20 AM To: wtr-general at rubyforge.org Subject: Wtr-general Digest, Vol 20, Issue 39 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. new support for referencing frames (Bret Pettichord) 2. finding javascript-created browser window (Kurt Sussman) 3. Re:Multiple Inheritance (boni uday) 4. Re: Access is denied and Exception Errors (Bret Pettichord) 5. RE: finding javascript-created browser window (Zeljko Filipin) 6. Re: finding javascript-created browser window (Bret Pettichord) 7. Get 2D Array size? (Hue Mach Dieu) 8. Re: finding javascript-created browser window (Shao Kang Tat) 9. Re: finding javascript-created browser window (Kurt Sussman) 10. Re: Get 2D Array size? (Jared Quinert) ---------------------------------------------------------------------- Message: 1 Date: Fri, 22 Jul 2005 18:49:31 -0500 From: Bret Pettichord Subject: [Wtr-general] new support for referencing frames To: wtr-general at rubyforge.org Message-ID: <5.1.0.14.2.20050722184803.033af330 at 127.0.0.1> Content-Type: text/plain; charset="us-ascii"; format=flowed I have committed changes that allow you to reference frames using id's or regexps: ie.frame(:name, /foo/) ie.frame(:id, 'whatever') Bret _____________________ Bret Pettichord www.pettichord.com ------------------------------ Message: 2 Date: Sat, 23 Jul 2005 00:30:31 -0700 From: Kurt Sussman Subject: [Wtr-general] finding javascript-created browser window To: wtr-general at rubyforge.org Message-ID: <20050723073031.GZ25531 at merlot.com> Content-Type: text/plain; charset=us-ascii I'm trying to write a script that tests a relatively simple web app. There are two factors that make this difficult: the page I need to test is created by a javascript function (indirectly via a link), and the developers are unwilling to make any changes to that code to increase testability. My first thought was to sleep for a while, waiting for the javascript function to run and load the new window, then find it by name. This isn't working for me and I can't figure out why. Any ideas? If the archives were searchable, I'd search them before asking... I hope this isn't a common question. I did browse the archives, but that's not the same as searching. Thanks. --Kurt -- ---------------------------------------------------------------------- Merlot Research Group, Inc http://www.merlot.com kls[at]merlot.com GPG key 82505A74 Jabber: MerlotQA ------------------------------ Message: 3 Date: Sat, 23 Jul 2005 10:39:55 +0100 (BST) From: boni uday Subject: [Wtr-general] Re:Multiple Inheritance To: ruby form Message-ID: <20050723093955.22075.qmail at web8304.mail.in.yahoo.com> Content-Type: text/plain; charset="iso-8859-1" Hi I've One user defined calss whose defination is as follows: class TestForViewingProjectDetails < Test::Unit::TestCase def x end end Now i want to inherit another class (CreateLogger) for this class Is it possible pls help me --------------------------------- How much free photo storage do you get? Store your friends n family photos for FREE with Yahoo! Photos. http://in.photos.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050723/3457d129/attachment-0001.htm ------------------------------ Message: 4 Date: Sat, 23 Jul 2005 12:04:00 -0500 From: Bret Pettichord Subject: Re: [Wtr-general] Access is denied and Exception Errors To: wtr-general at rubyforge.org Message-ID: <5.1.0.14.2.20050723120212.033ad070 at 127.0.0.1> Content-Type: text/plain; charset="iso-8859-1"; format=flowed Try these: ie.goto("https://qa-b1.test.com/araneae/login") ie.goto("https://qa-b1.test.com/include/blank.html") Bret At 06:27 PM 7/22/2005, Tuyet Cong-Ton-Nu wrote: >You are right. The development servers can serve the page from different >servers because there is a traffic cop server that manages the load. I >don t think that s the case for our staging server. > >I hope I included the info you need below, but if not, please let me know >the exact irb command result(s) I need to send you. Thanks! I appreciate it. > > > > > >irb(main):008:0> ie = Watir::IE.new > >=> #@error_checkers=[# >50 at c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1213>], >@logger=# >r:0x2ad44c8 @level=2, @datetime_format="%d-%b-%Y %H:%M:%S", @progname=nil, >@logd > >ev=#@dev=# >7d0>, @shift_size=nil>>, @typingspeed=0.08, >@activeObjectHighLightColor="yellow" > >, @enable_spinner=false, @url_list=[], @form=nil, @ie=#> > > > >irb(main):009:0> ie.goto("https://qa-b1.test.com/araneae/app") > >W, [22-Jul-2005 16:11:30#2708] WARN -- : frame error in waitdocument > > OLE error code:80070005 in > > Access is denied. > > > > HRESULT error code:0x80020009 > > Exception occurred. > >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1470:in `method_missing' > >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1470:in `waitForIE' > >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1469:in `upto' > >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1469:in `waitForIE' > >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1332:in `goto' > >(irb):9:in `irb_binding' > >c:/ruby/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding' > >c:/ruby/lib/ruby/1.8/irb/workspace.rb:52 > >W, [22-Jul-2005 16:11:30#2708] WARN -- : runtime error in wait > >=> 0.391 > > > >irb(main):010:0> ie.html > >=> "border=0 nam > >e=relay marginWidth=0 marginHeight=0 src=\"/include/blank.html\" >frameBorder=\"\ > >" noResize scrolling=no>marginHeight=0 s > >rc=\"/araneae/login\" frameBorder=0 scrolling=no>" > >irb(main):011:0> ie.show_frames > >there are 2 frames > >frame index: 0 --Access Denied-- > >frame index: 1 --Access Denied-- > >? 0..1 > > > >irb(main):012:0> ie.frame(:index, 1).show_all_objects > >-----------Objects in page ------------- > >WIN32OLERuntimeError: document > > OLE error code:80070005 in > > Access is denied. > > > > HRESULT error code:0x80020009 > > Exception occurred. > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1844:in `method_missing' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1844:in `getDocument' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1667:in > `show_all_objects' > > from (irb):12 > > > >irb(main):013:0> ie.frame(:index, 2).show_all_objects > >-----------Objects in page ------------- > >WIN32OLERuntimeError: document > > OLE error code:80070005 in > > Access is denied. > > > > HRESULT error code:0x80020009 > > Exception occurred. > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1844:in `method_missing' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1844:in `getDocument' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1667:in > `show_all_objects' > > from (irb):13 > > > >irb(main):015:0> ie.show_all_objects > >-----------Objects in page ------------- > > id= src=/include/top.js > >HTML >Document name=relay id= src=/include/blank.htm > >l > >HTML Document name=main id= src=/araneae/login > > > >? nil > > > > > >irb(main):016:0> ie.frame("main").show_all_objects > >Watir::Exception::UnknownFrameException: Unable to locate a frame with >name main > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1832:in `initialize' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `new' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `frame' > > from (irb):16 > > from :0 > > > >irb(main):017:0> ie.frame("relay").show_all_objects > >Watir::Exception::UnknownFrameException: Unable to locate a frame with >name relay > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1832:in `initialize' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `new' > > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `frame' > > from (irb):17 > > from :0 >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com ------------------------------ Message: 5 Date: Sat, 23 Jul 2005 22:49:44 +0200 From: "Zeljko Filipin" Subject: RE: [Wtr-general] finding javascript-created browser window To: Message-ID: <42e2ad34.271e670c.1cea.0cb3 at mx.gmail.com> Content-Type: text/plain; charset="us-ascii" For searching archives try this in Google: site:rubyforge.org "[Wtr-general]" javascript (instead of "javascript" you can use anything you think can be usefull) Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Kurt Sussman Sent: Saturday, July 23, 2005 9:31 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] finding javascript-created browser window I'm trying to write a script that tests a relatively simple web app. There are two factors that make this difficult: the page I need to test is created by a javascript function (indirectly via a link), and the developers are unwilling to make any changes to that code to increase testability. My first thought was to sleep for a while, waiting for the javascript function to run and load the new window, then find it by name. This isn't working for me and I can't figure out why. Any ideas? If the archives were searchable, I'd search them before asking... I hope this isn't a common question. I did browse the archives, but that's not the same as searching. Thanks. --Kurt -- ---------------------------------------------------------------------- Merlot Research Group, Inc http://www.merlot.com kls[at]merlot.com GPG key 82505A74 Jabber: MerlotQA _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ------------------------------ Message: 6 Date: Sun, 24 Jul 2005 01:02:13 -0500 From: Bret Pettichord Subject: Re: [Wtr-general] finding javascript-created browser window To: wtr-general at rubyforge.org Message-ID: <5.1.0.14.2.20050724005524.02948390 at 127.0.0.1> Content-Type: text/plain; charset="us-ascii"; format=flowed At 02:30 AM 7/23/2005, Kurt Sussman wrote: >I'm trying to write a script that tests a relatively simple web app. >There are two factors that make this difficult: the page I need to test >is created by a javascript function (indirectly via a link), and the >developers are unwilling to make any changes to that code to increase >testability. > >My first thought was to sleep for a while, waiting for the javascript >function to run and load the new window, then find it by name. This >isn't working for me and I can't figure out why. > >Any ideas? > >If the archives were searchable, I'd search them before asking... I hope >this isn't a common question. I did browse the archives, but that's not >the same as searching. > >Thanks. This is the biggest weakness with Watir: modal javascript popups. None of us have figured out a way to get to the popups DOM, and from what i've been able to tell, this actually stems from a weakness in the DOM specification, rather than a fault in the Microsoft implementation. I did find a MS technical note that indicated a workaround, but it would have to be coded in C and would require an optional Accessibility feature -- i'm not sure whether it is worth pursuing. (I'm offline at the moment, google for ihtmldocument2 and its the third or fourth link.) In the mean time, the best we've been able to to do is to send key events to the popup window to get it to go away. This "solution" is in the FAQ. Bret _____________________ Bret Pettichord www.pettichord.com ------------------------------ Message: 7 Date: Mon, 25 Jul 2005 10:06:38 +0700 From: "Hue Mach Dieu" Subject: [Wtr-general] Get 2D Array size? To: Message-ID: <99DF6C0285C2CE4C99F02D78385719660177FC9A at hue.cybersoft-vn.com> Content-Type: text/plain; charset="us-ascii" Dear ALL I would like get size of 2D array, as like this table_data = ie.frame("rightframe").frame("result").table(:id, "table").to_a puts table_data.length But it's seemed incorrect. And Do you have any suggestion for verify value in table? Thank you for help Hue ------------------------------ Message: 8 Date: Sun, 24 Jul 2005 23:46:47 -0400 From: Shao Kang Tat Subject: Re: [Wtr-general] finding javascript-created browser window To: wtr-general at rubyforge.org Message-ID: <593b9ae805072420463ab180a4 at mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Speaking of modal dialogs, one of the developers from my company has figured out a way to deal with them (by changing them into regular pop ups at run time). There is one trick that must be employed, and that is to have a check in the Javascript code, for example, in pseudo code (since I don't remember the exact coding from home) if showModal not defined give a regular alert box else show them the modal dialog end Now, in the browser, if you type in the URL: javascript: var x; showModal = x; and hit enter any action you do that would normally generate the modal dialog would generate a regular alert pop up which you can use autoit to get rid of. The only problem with this is that if you use WATIR to set the URL to line mentioned above, it hangs.. ------------------------------ Message: 9 Date: Sun, 24 Jul 2005 21:17:37 -0700 From: Kurt Sussman Subject: Re: [Wtr-general] finding javascript-created browser window To: wtr-general at rubyforge.org Message-ID: <20050725041737.GW25531 at merlot.com> Content-Type: text/plain; charset=us-ascii Bret Pettichord (bret at pettichord.com) typed this ... > At 02:30 AM 7/23/2005, Kurt Sussman wrote: > >I'm trying to write a script that tests a relatively simple web app. > >There are two factors that make this difficult: the page I need to test > >is created by a javascript function (indirectly via a link), and the Replying to myself... I think the 'attach' method might work for me... I'll check as soon as my test system is available again. http://rubyforge.org/pipermail/wtr-general/2005-June/002142.html > >If the archives were searchable, I'd search them before asking... I hope Thatks for the reminder about google's 'site:' tag. That helped a lot. > This is the biggest weakness with Watir: modal javascript popups. It's not a modal javascript popup; it's a new browser window spawned by a javascript function. The original page goes to a new URL after spawning the new window. > In the mean time, the best we've been able to to do is to send key events > to the popup window to get it to go away. This "solution" is in the FAQ. I don't want the popup to go away. The app I need to test is in it. If I wanted it to go away, the FAQ would probably have gotten me there. Does this clarify the problem I'm having? Do you think the 'attach' method is the right approach? Now I'm trying to get my client to think about giving the testers a direct URL instead of this javascript-spawned indirection. The dev-test people test the engine without these tricks on the front end; their clients add all kinds of impediments to testing the apps that are built using the engine. Maybe the solution is bureacratic instead of technical. #:) Thanks for the tips. --Kurt -- ---------------------------------------------------------------------- Merlot Research Group, Inc http://www.merlot.com kls[at]merlot.com GPG key 82505A74 Jabber: MerlotQA ------------------------------ Message: 10 Date: Mon, 25 Jul 2005 14:24:45 +1000 From: Jared Quinert Subject: Re: [Wtr-general] Get 2D Array size? To: wtr-general at rubyforge.org Message-ID: <42E4698D.4010505 at kilmore.info> Content-Type: text/plain; charset=ISO-8859-1; format=flowed What was returned, and what were you expecting? Could you get the information by using table.row_count and table.column_count? Jared Hue Mach Dieu wrote: >Dear ALL >I would like get size of 2D array, as like this > >table_data = ie.frame("rightframe").frame("result").table(:id, >"table").to_a > >puts table_data.length > >But it's seemed incorrect. > >And Do you have any suggestion for verify value in table? > >Thank you for help > >Hue > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > ------------------------------ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general End of Wtr-general Digest, Vol 20, Issue 39 ******************************************* From getboni at yahoo.co.in Mon Jul 25 02:09:42 2005 From: getboni at yahoo.co.in (boni uday) Date: Mon, 25 Jul 2005 07:09:42 +0100 (BST) Subject: [Wtr-general] Rg:Multiple Inhertiance In RUBY Message-ID: <20050725060942.85739.qmail@web8301.mail.in.yahoo.com> Hi I've One user defined calss whose defination is as follows: class TestForViewingProjectDetails < Test::Unit::TestCase def x end end Now i want to inherit another class (CreateLogger) for this class Is it possible pls help me --------------------------------- How much free photo storage do you get? Store your friends n family photos for FREE with Yahoo! Photos. http://in.photos.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050725/88ddf4fa/attachment.html From michael.net at gmail.com Mon Jul 25 07:01:40 2005 From: michael.net at gmail.com (Mike) Date: Mon, 25 Jul 2005 07:01:40 -0400 Subject: [Wtr-general] IE Tabstrip.htc control In-Reply-To: <5.1.0.14.2.20050713120124.02fb1960@127.0.0.1> References: <5.1.0.14.2.20050713120124.02fb1960@127.0.0.1> Message-ID: <86388bc70507250401333428db@mail.gmail.com> Did this method work for the original poster? It hasn't yet worked for me. Has anyone successfully changed tabs on the ie tabstrip control? Thanks, Mike At 06:44 PM 7/7/2005, Alexander, Kim (Kim) wrote: > >However when the page is contained in the frame the ie.goto just times > >out. Code I m using for frames is below. > > > >$ie.frame(:index,1).goto("javascript: > document.Form1.__ucMasterEntityMaintHeader_tabDefaultTabs_State__.value='2' > ;__doPostBack('ucMasterEntityMaintHeader$tabDefaultTabs','2')") > > It's a bug that there is even a goto method for frames. > > I would try referencing the frame inside your javascript. Something like > this: > > >$ie.goto("javascript: > Frame1.document.Form1.__ucMasterEntityMaintHeader_tabDefaultTabs_State__.value='2' > ;__doPostBack('ucMasterEntityMaintHeader$tabDefaultTabs','2')") > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050725/05cdee0b/attachment.html From huemach at Cybersoft-VN.com Mon Jul 25 07:15:43 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Mon, 25 Jul 2005 18:15:43 +0700 Subject: [Wtr-general] Click OK button on Popup Dialog? Message-ID: <99DF6C0285C2CE4C99F02D78385719660177FFA7@hue.cybersoft-vn.com> Hi All, My script for click on OK button on popup warning message dialog box, but it doesn't work ie.frame("rightframe").frame("search").button(:name, "Submit").click w = WinClicker.new w.clickWindowsButton("Microsoft Internet Explorer","OK") w.clickJavaScriptDialog("OK") Thank for help From Mark_Cain at rl.gov Mon Jul 25 10:11:14 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Mon, 25 Jul 2005 07:11:14 -0700 Subject: [Wtr-general] Click OK button on Popup Dialog? Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D2E8@EX5V.rl.gov> Hue, you have to start the WinClicker BEFORE you click the button that produces the popup. I have a function (right out of the unittests) #Popup clicker def startClicker( button , waitTime = 3) w = WinClicker.new longName = $ie.dir.gsub("/" , "\\" ) shortName = w.getShortFileName(longName) c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button } #{ waitTime} " puts "Starting #{c}" w.winsystem(c) w=nil end #Then I call it... startClicker ("OK", 3) #Then I click the button that produces the popup. ie.frame("rightframe").frame("search").button(:name, "Submit").click Hope this helps, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Hue Mach Dieu Sent: Monday, July 25, 2005 4:16 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Click OK button on Popup Dialog? Hi All, My script for click on OK button on popup warning message dialog box, but it doesn't work ie.frame("rightframe").frame("search").button(:name, "Submit").click w = WinClicker.new w.clickWindowsButton("Microsoft Internet Explorer","OK") w.clickJavaScriptDialog("OK") Thank for help _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050725/480db375/attachment.html From tuyet.ctn at mscibarra.com Mon Jul 25 18:06:29 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Mon, 25 Jul 2005 15:06:29 -0700 Subject: [Wtr-general] Access is denied and Exception Errors Message-ID: Thanks, Bret for your suggestions. Still some issues though.... Any suggestion is appreciated! I used this command: irb(main):002:0> ie = Watir::IE.new irb(main):004:0* ie.goto("https://qa-b1.test.com/araneae/login") * 8.547 * Which worked fine, but then I did this command: irb(main):006:0> ie.form(:name, "loginForm").submit => 1 A new IE instance was launched and the "Home" page is displayed (that is what it's supposed to do) However, now I have 2 instances of IE opened: 1) The first IE is still opened with the login form 2) The second IE has the Home page (resulting from clicking on the Login button) What can I do to not launch the second IE? Why did it launch the second IE? Also, after the goto command was executed, I couldn't see any frames at all from the login page. This is before I did the second command: irb(main):013:0> ie.show_frames there are 0 frames => 0..-1 There should be 2 frames: main and relay as you can see from my previous posting. Because it can't recognize "main", my script won't run. For example: irb(main):005:0> ie.frame("main").text_field(:name, "UserId").fire_event("onFocus") Watir::Exception::UnknownFrameException: Unable to locate a frame with name main from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1832:in `initialize' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `new' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:218:in `frame' -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050725/c69de093/attachment.html From tuyet.ctn at mscibarra.com Mon Jul 25 19:04:43 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Mon, 25 Jul 2005 16:04:43 -0700 Subject: [Wtr-general] Access is denied and Exception Errors Message-ID: I checked with the engineer that knows the hardware/software configuration of this application and forwarded him your take on why the error is generated, and here is his answer: "I don't think this is the case. All the requests are being processed from one domain. I think the microsoft issue is more in line with a solution..." This is the Microsoft issue that I stumbled upon. I've been trying to get the download of this HotFix from MS, but it's not working. The support person I talked to was not very competent. I will have to try again. Just want to let you know and get your feedback on this. Thanks. http://support.microsoft.com/?kbid=889407 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050725/88253508/attachment.html From Jan.Montano at thomson.com Mon Jul 25 20:24:58 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Tue, 26 Jul 2005 08:24:58 +0800 Subject: [Wtr-general] bug resolution Message-ID: http://rubyforge.org/pipermail/wtr-general/2005-June/002240.html will this bug be fixed with the new release of watir? (pls see link above) and what's correct way of invoking WIN32OLE.new('Shell.Application') with internet explorer in Watir? Thanks! Jan M. Montano QA Lead / Developer Regional Application Development Thomson (Philippines) Corporation 18th Floor Ayala Life - FGU Center 6811 Ayala Ave., Makati City Philippines (632) 878-5890 From huemach at Cybersoft-VN.com Mon Jul 25 21:07:20 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Tue, 26 Jul 2005 08:07:20 +0700 Subject: [Wtr-general] RE: Click OK button on Popup Dialog? Message-ID: <99DF6C0285C2CE4C99F02D7838571966017B6C6F@hue.cybersoft-vn.com> Hi I define click popup method like this: $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'watir' require 'watir/WinClicker' include Watir def startClicker( button , waitTime = 0.5) w = WinClicker.new longName = $ie.dir.gsub("/" , "\\" ) shortName = w.getShortFileName(longName) c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button } #{waitTime} " puts "Starting #{c}" w.winsystem(c ) w=nil end #Then I call it... startClicker ("OK", 3) #Then I click the button that produces the popup. ie.frame("rightframe").frame("search").button(:name, "Submit").click but I get the error like this ../Util/clickPopup.rb:8:in `startClicker': undefined method `dir' for nil:NilClass (NoMethodError) Thank for help From Jan.Montano at thomson.com Mon Jul 25 22:00:03 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Tue, 26 Jul 2005 10:00:03 +0800 Subject: [Wtr-general] can't run googlesearch.rb successfully Message-ID: Hi! I've installed ruby and watir (latest releases) on another terminal. However, When i run googlesearch.rb this error pops out. What's with this error? and why does this happen now? I have no problem with watir on my original terminal. Thank you. >ruby googleSearch.rb ## Beginning of test: Google search Step 1: go to the test site: http://www.google.com Action: entered http://www.google.com in the address bar. Step 2: enter 'pickaxe' in the search text field c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3620:in `method_missing': Unknown property or method `fireEvent' (WIN32OLERuntimeError) HRESULT error code:0x80020006 Unknown name. from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3620:in `set' from googleSearch.rb:33 >Exit code: 1 Jan M. Montano QA Lead / Developer Regional Application Development Thomson (Philippines) Corporation 18th Floor Ayala Life - FGU Center 6811 Ayala Ave., Makati City Philippines (632) 878-5890 From bret at pettichord.com Tue Jul 26 01:49:59 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 26 Jul 2005 00:49:59 -0500 Subject: [Wtr-general] Access is denied and Exception Errors In-Reply-To: Message-ID: <5.1.0.14.2.20050726004645.02d5ce18@127.0.0.1> if one frame is hosted by web1.company.com and the other is hosted by web2.company.com, you will run into a cross-site scripting limitation and get an access is denied error. load-balancing will do this. your engineer's response does not explain why you only see the problem on one environment. At 06:04 PM 7/25/2005, Tuyet Cong-Ton-Nu wrote: >I checked with the engineer that knows the hardware/software configuration >of this application and forwarded him your take on why the error is >generated, and here is his answer: > >I don't think this is the case. All the requests are being processed from >one domain. I think the microsoft issue is more in line with a solution... > >This is the Microsoft issue that I stumbled upon. I ve been trying to get >the download of this HotFix from MS, but it s not working. The support >person I talked to was not very competent. I will have to try >again. Just want to let you know and get your feedback on this. Thanks. > >http://support.microsoft.com/?kbid=889407 >_______________________________________________ >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 Tue Jul 26 01:43:54 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 26 Jul 2005 00:43:54 -0500 Subject: [Wtr-general] Access is denied and Exception Errors In-Reply-To: Message-ID: <5.1.0.14.2.20050726004249.02d4c110@127.0.0.1> At 05:06 PM 7/25/2005, Tuyet Cong-Ton-Nu wrote: >irb(main):005:0> ie.frame("main").text_field(:name, >"UserId").fire_event("onFocus ) try ie.text_field(:name, 'UserId").fire_event('onFocus') Watir won't work with frames served by different servers. I'm giving you a way to keep that from happening. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Jul 26 01:54:20 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 26 Jul 2005 00:54:20 -0500 Subject: [Wtr-general] RE: Click OK button on Popup Dialog? In-Reply-To: <99DF6C0285C2CE4C99F02D7838571966017B6C6F@hue.cybersoft-vn. com> Message-ID: <5.1.0.14.2.20050726005240.02d6c800@127.0.0.1> At 08:07 PM 7/25/2005, Hue Mach Dieu wrote: >Hi >I define click popup method like this: > >$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == >__FILE__ >require 'watir' >require 'watir/WinClicker' >include Watir > >def startClicker( button , waitTime = 0.5) > w = WinClicker.new > longName = $ie.dir.gsub("/" , "\\" ) > shortName = w.getShortFileName(longName) > c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button >} #{waitTime} " > puts "Starting #{c}" > w.winsystem(c ) > w=nil >end > >#Then I call it... > >startClicker ("OK", 3) > >#Then I click the button that produces the popup. > >ie.frame("rightframe").frame("search").button(:name, "Submit").click > >but I get the error like this > >../Util/clickPopup.rb:8:in `startClicker': undefined method `dir' for >nil:NilClass (NoMethodError) > >Thank for help This error message is telling you that $ie is nil. I'm not sure what you are trying to do with $ie.dir.gsub... >_______________________________________________ >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 Tue Jul 26 01:58:55 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 26 Jul 2005 00:58:55 -0500 Subject: [Wtr-general] bug resolution In-Reply-To: Message-ID: <5.1.0.14.2.20050726005633.02d6c0e0@127.0.0.1> At 07:24 PM 7/25/2005, Jan.Montano at thomson.com wrote: >http://rubyforge.org/pipermail/wtr-general/2005-June/002240.html > >will this bug be fixed with the new release of watir? (pls see link above) No. Currently the best approach is to spawn a new process. >and what's correct way of invoking WIN32OLE.new('Shell.Application') with >internet explorer in Watir? Uh, however you want. I don't understand the question. _____________________ Bret Pettichord www.pettichord.com From huemach at Cybersoft-VN.com Tue Jul 26 02:03:26 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Tue, 26 Jul 2005 13:03:26 +0700 Subject: [Wtr-general] RE: Click OK button on Popup Dialog? Message-ID: <99DF6C0285C2CE4C99F02D7838571966017B6DF4@hue.cybersoft-vn.com> Hi All, Could you please give me an example do the click OK button in popup dialog Thank for help! Hue From satti at qantom.com Tue Jul 26 02:15:15 2005 From: satti at qantom.com (Sathya Shankar) Date: Tue, 26 Jul 2005 11:45:15 +0530 Subject: [Wtr-general] Getting the data from the Openoffice In-Reply-To: <5.1.0.14.2.20050726005633.02d6c0e0@127.0.0.1> References: <5.1.0.14.2.20050726005633.02d6c0e0@127.0.0.1> Message-ID: <42E5D4F3.80308@qantom.com> Hi all, I have the datas that are to be used in my scripts in the open office . I want to get the Data values from the Open office is there any way for that or is there any API refrence for the same. Thanks for all help Sathya Shankar From Jan.Montano at thomson.com Tue Jul 26 02:15:00 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Tue, 26 Jul 2005 14:15:00 +0800 Subject: [Wtr-general] bug resolution Message-ID: I don't know the code to spawn a new process in watir. sorry for the idiot question. -jan -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Bret Pettichord Sent: Tuesday, July 26, 2005 1:59 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] bug resolution At 07:24 PM 7/25/2005, Jan.Montano at thomson.com wrote: >http://rubyforge.org/pipermail/wtr-general/2005-June/002240.html > >will this bug be fixed with the new release of watir? (pls see link above) No. Currently the best approach is to spawn a new process. >and what's correct way of invoking WIN32OLE.new('Shell.Application') with >internet explorer in Watir? Uh, however you want. I don't understand the question. _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Tue Jul 26 02:20:05 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 26 Jul 2005 01:20:05 -0500 Subject: [Wtr-general] bug resolution In-Reply-To: Message-ID: <5.1.0.14.2.20050726011932.02d7ccf8@127.0.0.1> At 01:15 AM 7/26/2005, Jan.Montano at thomson.com wrote: >I don't know the code to spawn a new process in watir. http://wtr.rubyforge.org/wiki/wiki.pl?FrequentQuestions _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Jul 26 02:22:26 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 26 Jul 2005 01:22:26 -0500 Subject: [Wtr-general] RE: Click OK button on Popup Dialog? In-Reply-To: <99DF6C0285C2CE4C99F02D7838571966017B6DF4@hue.cybersoft-vn. com> Message-ID: <5.1.0.14.2.20050726012207.02d6f708@127.0.0.1> Take a look at WindowHelper.rb. At 01:03 AM 7/26/2005, Hue Mach Dieu wrote: >Hi All, >Could you please give me an example do the click OK button in popup >dialog > >Thank for help! > >Hue > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From michael.net at gmail.com Tue Jul 26 09:21:21 2005 From: michael.net at gmail.com (Mike) Date: Tue, 26 Jul 2005 09:21:21 -0400 Subject: [Wtr-general] IE Tabstrip.htc control In-Reply-To: <86388bc70507250401333428db@mail.gmail.com> References: <5.1.0.14.2.20050713120124.02fb1960@127.0.0.1> <86388bc70507250401333428db@mail.gmail.com> Message-ID: <86388bc705072606213bbb6a95@mail.gmail.com> Hi, OK, silence usually means, "I don't know", and I've since discovered the answer, so here it is: If you are using the IE tabstrip control on a frame, here is how you can make it work. Here we are switching to the second tab, i.e., tab #1. Typing from memory... $main = ie.frame("main") $main.hidden(:name, "__MyTabStrip_State__").value = 1 $main.form(:name, "MyFormName").submit It seems that the "$ie.goto("javascript:" construct does not work when using frames. Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050726/dcf033dd/attachment.html From dkurtz at olenick.com Tue Jul 26 09:50:50 2005 From: dkurtz at olenick.com (Daniel Kurtz) Date: Tue, 26 Jul 2005 08:50:50 -0500 Subject: [Wtr-general] Script return values Message-ID: <82E50B4081E1354AAC1F917519B13F0D4E022D@OLENICK-01-EX.atlarge.net> I'm confused. This is my script, pretty much copied out of the user guide: begin assert(ie.contains_text("verification text") ) puts("TEST PASSED.") rescue puts("TEST FAILED.") end This is what the last couple of lines of output look like: Go to the test site: http://search.msn.com TEST PASSED. Go to the test site: http://www.findit-quick.com TEST FAILED. Go to the test site: http://www.truesearch.com TEST PASSED. Go to the test site: http://www.waply.com/ TEST FAILED. . Finished in 112.515 seconds. 1 tests, 19 assertions, 0 failures, 0 errors Why does the framework-generated text at the end not indicate that assertions failed? How do I capture that info? Daniel Kurtz Consultant Olenick & Associates 205 W. Wacker Drive Suite 2010 Chicago, IL 60606 312-332-0096 www.olenick.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050726/8e660eca/attachment.html From Mark_Cain at rl.gov Tue Jul 26 10:14:19 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Tue, 26 Jul 2005 07:14:19 -0700 Subject: [Wtr-general] RE: Click OK button on Popup Dialog? Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D2ED@EX5V.rl.gov> If you are using the example below as is then you'll need to be consistent with your ie declaration. In the startClicker method you use $ie and in the code below (where you click the submit button) that you use ie without the $. However you begin ie = IE.new() OR $ie = IE.new() you will need to be consistent throughout. Hope this helps, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Hue Mach Dieu Sent: Monday, July 25, 2005 6:07 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] RE: Click OK button on Popup Dialog? Hi I define click popup method like this: $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'watir' require 'watir/WinClicker' include Watir def startClicker( button , waitTime = 0.5) w = WinClicker.new longName = $ie.dir.gsub("/" , "\\" ) shortName = w.getShortFileName(longName) c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button } #{waitTime} " puts "Starting #{c}" w.winsystem(c ) w=nil end #Then I call it... startClicker ("OK", 3) #Then I click the button that produces the popup. ie.frame("rightframe").frame("search").button(:name, "Submit").click but I get the error like this ../Util/clickPopup.rb:8:in `startClicker': undefined method `dir' for nil:NilClass (NoMethodError) Thank for help _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From zeljko.filipin at gmail.com Tue Jul 26 10:31:50 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 26 Jul 2005 16:31:50 +0200 Subject: [Wtr-general] bug in text_field.to_s Message-ID: <42e6492c.16711c3b.6e2e.ffff8f64@mx.gmail.com> There seems to be a bug in text_field.to_s: ----- HTML (valid): textarea

----- IRB: irb require 'watir' ie = Watir::IE.attach(:title, //) ie.textField(:index, 1).to_s ----- OUTPUT: WIN32OLERuntimeError: Unknown property or method `size' HRESULT error code:0x80020006 Unknown name. from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3470:in `method_missing' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3470:in `size' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3480:in `text_string_creator' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3490:in `to_s' from (irb):3 from :0 ----- It works just fine if instead of there is or . Zeljko From zeljko.filipin at gmail.com Tue Jul 26 10:39:20 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 26 Jul 2005 16:39:20 +0200 Subject: [Wtr-general] RE: bug in text_field.to_s Message-ID: <42e64ae8.7738e8cc.6f3c.03a7@mx.gmail.com> I think the problem is that "size" and "maxLength" are not defined for textarea. Zeljko -----Original Message----- From: Zeljko Filipin [mailto:zeljko.filipin at gmail.com] Sent: Tuesday, July 26, 2005 4:32 PM To: wtr-general at rubyforge.org Subject: bug in text_field.to_s There seems to be a bug in text_field.to_s: ----- HTML (valid): textarea

----- IRB: irb require 'watir' ie = Watir::IE.attach(:title, //) ie.textField(:index, 1).to_s ----- OUTPUT: WIN32OLERuntimeError: Unknown property or method `size' HRESULT error code:0x80020006 Unknown name. from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3470:in `method_missing' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3470:in `size' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3480:in `text_string_creator' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3490:in `to_s' from (irb):3 from :0 ----- It works just fine if instead of there is or . Zeljko From Kim.Alexander at ElPaso.com Tue Jul 26 10:55:23 2005 From: Kim.Alexander at ElPaso.com (Alexander, Kim (Kim)) Date: Tue, 26 Jul 2005 09:55:23 -0500 Subject: [Wtr-general] IE Tabstrip.htc control Message-ID: <51A0D9881DD5F1498CA1AAC9D30AFD2C1A2359@corhouexs08m.corp.epec.com> Mike, Just saw your message and the follow-up workaround you found. No the Goto didn't work for me but am glad to see you found a solution. I'm looking forward to trying it myself. Best Regards, Kim ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Sent: Monday, July 25, 2005 6:02 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] IE Tabstrip.htc control Did this method work for the original poster? It hasn't yet worked for me. Has anyone successfully changed tabs on the ie tabstrip control? Thanks, Mike At 06:44 PM 7/7/2005, Alexander, Kim (Kim) wrote: >However when the page is contained in the frame the ie.goto just times >out. Code I m using for frames is below. > >$ie.frame(:index,1).goto("javascript:document.Form1.__ucMasterEntityMai ntHeader_tabDefaultTabs_State__.value='2';__doPostBack('ucMasterEntityMa intHeader$tabDefaultTabs','2')") It's a bug that there is even a goto method for frames. I would try referencing the frame inside your javascript. Something like this: >$ie.goto("javascript:Frame1.document.Form1.__ucMasterEntityMaintHeader_ tabDefaultTabs_State__.value='2' ;__doPostBack('ucMasterEntityMaintHeader$tabDefaultTabs','2')") ****************************************************************** This email and any files transmitted with it from the ElPaso Corporation are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. ****************************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050726/229d6ac4/attachment.html From Kim.Alexander at ElPaso.com Tue Jul 26 11:00:07 2005 From: Kim.Alexander at ElPaso.com (Alexander, Kim (Kim)) Date: Tue, 26 Jul 2005 10:00:07 -0500 Subject: [Wtr-general] Click OK button on Popup Dialog? Message-ID: <51A0D9881DD5F1498CA1AAC9D30AFD2C1A235D@corhouexs08m.corp.epec.com> Mark, Does this work with Modal dialogs as well? I've not been able to get Winclicker to work as well as the unittest example. I start it before my dialog pops up but nothing ever happens. Frustrated, Kim ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: Monday, July 25, 2005 9:11 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Click OK button on Popup Dialog? Hue, you have to start the WinClicker BEFORE you click the button that produces the popup. I have a function (right out of the unittests) #Popup clicker def startClicker( button , waitTime = 3) w = WinClicker.new longName = $ie.dir.gsub("/" , "\\" ) shortName = w.getShortFileName(longName) c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button } #{ waitTime} " puts "Starting #{c}" w.winsystem(c) w=nil end #Then I call it... startClicker ("OK", 3) #Then I click the button that produces the popup. ie.frame("rightframe").frame("search").button(:name, "Submit").click Hope this helps, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Hue Mach Dieu Sent: Monday, July 25, 2005 4:16 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Click OK button on Popup Dialog? Hi All, My script for click on OK button on popup warning message dialog box, but it doesn't work ie.frame("rightframe").frame("search").button(:name, "Submit").click w = WinClicker.new w.clickWindowsButton("Microsoft Internet Explorer","OK") w.clickJavaScriptDialog("OK") Thank for help _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ****************************************************************** This email and any files transmitted with it from the ElPaso Corporation are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. ****************************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050726/eadc741a/attachment.html From Kim.Alexander at ElPaso.com Tue Jul 26 11:02:48 2005 From: Kim.Alexander at ElPaso.com (Alexander, Kim (Kim)) Date: Tue, 26 Jul 2005 10:02:48 -0500 Subject: [Wtr-general] new support for referencing frames Message-ID: <51A0D9881DD5F1498CA1AAC9D30AFD2C1A235F@corhouexs08m.corp.epec.com> Awesome, Thanks Brett, How about frames with no names. Seems these are second-class objects as some frame methods don't seem to support frames referenced by index? Best Regards, Kim -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Friday, July 22, 2005 6:50 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] new support for referencing frames I have committed changes that allow you to reference frames using id's or regexps: ie.frame(:name, /foo/) ie.frame(:id, 'whatever') Bret _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ****************************************************************** This email and any files transmitted with it from the ElPaso Corporation are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. ****************************************************************** From dkurtz at olenick.com Tue Jul 26 11:53:34 2005 From: dkurtz at olenick.com (Daniel Kurtz) Date: Tue, 26 Jul 2005 10:53:34 -0500 Subject: [Wtr-general] Error in concurrent_search.rb example Message-ID: <82E50B4081E1354AAC1F917519B13F0D4E022E@OLENICK-01-EX.atlarge.net> When I run it I get the following: c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1979:in `object_exist_check': Unable to locate object, using name and q (Watir::Exception::UnknownObjectException) from C:/watir_bonus/examples/concurrent_search.rb:18:in `join' from C:/watir_bonus/examples/concurrent_search.rb:18 from C:/watir_bonus/examples/concurrent_search.rb:18:in `each' from C:/watir_bonus/examples/concurrent_search.rb:18 I don't understand why the UnknownObjectException error is appearing. "name" and "q" are the values for the object in question, and the other examples doing the Google search with those values work fine. Daniel Kurtz Consultant Olenick & Associates 205 W. Wacker Drive Suite 2010 Chicago, IL 60606 312-332-0096 www.olenick.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050726/b670e643/attachment.html From tuyet.ctn at mscibarra.com Tue Jul 26 17:51:44 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Tue, 26 Jul 2005 14:51:44 -0700 Subject: [Wtr-general] Access is denied and Exception Errors Message-ID: This command does take me to the login page: 1) irb(main):005:0> ie.goto("https://qa-common-b1.barra.com/araneae/login") * 0.188 * 2) Then I do this: irb(main):007:0> ie.form(:name, "loginForm").submit => 0 Which launches another IE instance to display the Analysis page (the page after login). But the original IE where the Login page is displayed is also opened. So I have 2 instances of IE at this point. This doesn't seem right. Why doesn't the first IE close? 3) then I attach to the second IE which is successful irb(main):009:0> ie = Watir::IE.attach(:url, "https://qa-common-b1.barra.com/ara neae/app") 4) now I get the html of the Analysis page: irb(main):010:0> ie.html => "" Now that Iam here, the objects that I want to manipulate lives inside embedded frames. This was the command that used to work: ie.frame("main").frame("sidebar").frame("analysisSidebarTabContent").image(: src, /icon_report_positions.gif/).click 5) but now since the frames cannot be "seen", how do I access click on the "icon_report_positions.gift" irb(main):011:0> ie.show_frames there are 2 frames frame index: 0 --Access Denied-- frame index: 1 --Access Denied-- * 0..1 What you suggest below will work if the object is at the main level as this example is, but won't work if the object is found within frames like the example above: At 05:06 PM 7/25/2005, Tuyet Cong-Ton-Nu wrote: >irb(main):005:0> ie.frame("main").text_field(:name, >"UserId").fire_event("onFocus ) try ie.text_field(:name, 'UserId").fire_event('onFocus') Watir won't work with frames served by different servers. I'm giving you a way to keep that from happening. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050726/c3983054/attachment.html From Ben.Torres at rhi.com Tue Jul 26 20:12:49 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Tue, 26 Jul 2005 17:12:49 -0700 Subject: [Wtr-general] typing in text Message-ID: <1641BB0AA7287848817A63C3EE9677D506FD7763@hqp-ex-mb05.na.msds.rhi.com> Is there any way I can speed up text being typed into a text field? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050726/28d4b45c/attachment.html From shaorobics at gmail.com Tue Jul 26 20:19:31 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Tue, 26 Jul 2005 20:19:31 -0400 Subject: [Wtr-general] typing in text In-Reply-To: <1641BB0AA7287848817A63C3EE9677D506FD7763@hqp-ex-mb05.na.msds.rhi.com> References: <1641BB0AA7287848817A63C3EE9677D506FD7763@hqp-ex-mb05.na.msds.rhi.com> Message-ID: <593b9ae805072617197c48b380@mail.gmail.com> ie.typingspeed = 0 Shao On 7/26/05, Torres, Ben (HQP) wrote: > Is there any way I can speed up text being typed into a text field? From bret at pettichord.com Tue Jul 26 20:43:56 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 26 Jul 2005 19:43:56 -0500 Subject: [Wtr-general] bug in text_field.to_s In-Reply-To: <42e6492c.16711c3b.6e2e.ffff8f64@mx.gmail.com> Message-ID: <5.1.0.14.2.20050726194324.02c73c88@127.0.0.1> Thanks for the report. It's been logged. http://rubyforge.org/tracker/index.php?group_id=104&atid=487 At 09:31 AM 7/26/2005, you wrote: >There seems to be a bug in text_field.to_s: > >----- >HTML (valid): > >"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > >----- >IRB: > >irb >require 'watir' >ie = Watir::IE.attach(:title, //) >ie.textField(:index, 1).to_s >----- >OUTPUT: > >WIN32OLERuntimeError: Unknown property or method `size' > HRESULT error code:0x80020006 > Unknown name. > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3470:in >`method_missing' > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3470:in `size' > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3480:in >`text_string_creator' > from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3490:in `to_s' > from (irb):3 > from :0 >----- >It works just fine if instead of > > > >there is > > > >or > >. > >Zeljko > >_______________________________________________ >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 Tue Jul 26 20:48:55 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 26 Jul 2005 19:48:55 -0500 Subject: [Wtr-general] how to tell what version you are using Message-ID: <5.1.0.14.2.20050726194835.02c68e78@127.0.0.1> ruby -e 'require "watir"; puts Watir::IE::VERSION' _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Jul 26 20:55:03 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 26 Jul 2005 19:55:03 -0500 Subject: [Wtr-general] new support for referencing frames In-Reply-To: <51A0D9881DD5F1498CA1AAC9D30AFD2C1A235F@corhouexs08m.corp.e pec.com> Message-ID: <5.1.0.14.2.20050726195441.02ca6f38@127.0.0.1> At 10:02 AM 7/26/2005, Alexander, Kim (Kim) wrote: >How about frames with no names. Seems these are second-class objects as >some frame methods don't seem to support frames referenced by index? That is news to me. Can you give more details for why you say this? _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Jul 26 20:57:55 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 26 Jul 2005 19:57:55 -0500 Subject: [Wtr-general] Access is denied and Exception Errors In-Reply-To: Message-ID: <5.1.0.14.2.20050726195637.02ca71b8@127.0.0.1> Whenever you see a frame with access denied, you'll have to 'goto' the frame's url and then go from there. This will give you extra IE windows. This isn't pretty, but it should 'work'. Bret At 04:51 PM 7/26/2005, Tuyet Cong-Ton-Nu wrote: >This command does take me to the login page: > >1) irb(main):005:0> ie.goto("https://qa-common-b1.barra.com/araneae/login") > >? 0.188 > >? > >2) Then I do this: > >irb(main):007:0> ie.form(:name, "loginForm").submit > >=> 0 > >Which launches another IE instance to display the Analysis page (the page >after login). > >But the original IE where the Login page is displayed is also opened. > >So I have 2 instances of IE at this point. This doesn t seem right. Why >doesn t the first IE close? > > > >3) then I attach to the second IE which is successful > > > >irb(main):009:0> ie = Watir::IE.attach(:url, >"https://qa-common-b1.barra.com/ara > >neae/app") > > > >4) now I get the html of the Analysis page: > >irb(main):010:0> ie.html > >=> "border=0 nam > >e=relay marginWidth=0 marginHeight=0 src=\"/include/blank.html\" >frameBorder=\"\ > >" noResize scrolling=no>marginHeight=0 s > >rc=\"/araneae/Analysis/home?common.sessionId=99siQl7h0gSTwCwQCHDDKg99\" >frameBor > >der=0 scrolling=no>" > > > >Now that Iam here, the objects that I want to manipulate lives inside >embedded frames. > >This was the command that used to work: > >ie.frame("main").frame("sidebar").frame("analysisSidebarTabContent").image(:src, >/icon_report_positions.gif/).click > > > >5) but now since the frames cannot be seen , how do I access click on the >icon_report_positions.gift > >irb(main):011:0> ie.show_frames > >there are 2 frames > >frame index: 0 --Access Denied-- > >frame index: 1 --Access Denied-- > >? 0..1 > > > >What you suggest below will work if the object is at the main level as >this example is, but won t work if the object is found within frames like >the example above: > > > > > >At 05:06 PM 7/25/2005, Tuyet Cong-Ton-Nu wrote: > > >irb(main):005:0> ie.frame("main").text_field(:name, > > >"UserId").fire_event("onFocus ) > > > >try ie.text_field(:name, 'UserId").fire_event('onFocus') > > > >Watir won't work with frames served by different servers. I'm giving you a > >way to keep that from happening. > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From tuyet.ctn at mscibarra.com Tue Jul 26 21:13:52 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Tue, 26 Jul 2005 18:13:52 -0700 Subject: [Wtr-general] Sending Email Notifications Message-ID: After a test has finished running, is there a way to send out an email notification to several people to notify them whether the test has passed or failed? We use blat.exe for our SilkTest application to send out emails. What options do we have for WATIR/Ruby? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050726/4bfbeb9e/attachment.html From bret at pettichord.com Tue Jul 26 21:06:41 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 26 Jul 2005 20:06:41 -0500 Subject: [Wtr-general] typing in text In-Reply-To: <593b9ae805072617197c48b380@mail.gmail.com> References: <1641BB0AA7287848817A63C3EE9677D506FD7763@hqp-ex-mb05.na.msds.rhi.com> <1641BB0AA7287848817A63C3EE9677D506FD7763@hqp-ex-mb05.na.msds.rhi.com> Message-ID: <5.1.0.14.2.20050726200310.02cb6e30@127.0.0.1> OR: ruby myscript.rb -f OR: ie.set_fast_speed At 07:19 PM 7/26/2005, Shao Kang Tat wrote: >ie.typingspeed = 0 > >Shao > > > >On 7/26/05, Torres, Ben (HQP) wrote: > > Is there any way I can speed up text being typed into a text field? > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From huemach at Cybersoft-VN.com Tue Jul 26 21:53:46 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Wed, 27 Jul 2005 08:53:46 +0700 Subject: [Wtr-general] RE: Click OK button on Popup Dialog? Message-ID: <99DF6C0285C2CE4C99F02D7838571966017B6FDA@hue.cybersoft-vn.com> Hi I change the startClicker() a little bit, I work fine def startClicker(objected, button , waitTime = 3) w = WinClicker.new longName = objectIE.dir.gsub("/" , "\\" ) .... End .... And I use it as.. ie = IE::new startClicker (ie, "OK", 3) #Then I click the button that produces the popup. ie.frame("rightframe").frame("search").button(:name, "Submit").click Hope useful Hue From scott at hanselman.com Tue Jul 26 23:46:40 2005 From: scott at hanselman.com (Scott Hanselman) Date: Tue, 26 Jul 2005 20:46:40 -0700 Subject: [Wtr-general] RE: Click OK button on Popup Dialog? In-Reply-To: <99DF6C0285C2CE4C99F02D7838571966017B6FDA@hue.cybersoft-vn.com> Message-ID: Why do folks do all this tricky stuff with Winclicker and starting new instances of the ruby process? I do this: Thread.new { sleep 0.1; WindowHelper.new.push_alert_button } ie.link(:id, "whatever").click #this causes an Alert() and it works great. Am I doing something silly? Scott -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Hue Mach Dieu Sent: Tuesday, July 26, 2005 6:54 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] RE: Click OK button on Popup Dialog? Hi I change the startClicker() a little bit, I work fine def startClicker(objected, button , waitTime = 3) w = WinClicker.new longName = objectIE.dir.gsub("/" , "\\" ) .... End .... And I use it as.. ie = IE::new startClicker (ie, "OK", 3) #Then I click the button that produces the popup. ie.frame("rightframe").frame("search").button(:name, "Submit").click Hope useful Hue From zeljko.filipin at gmail.com Wed Jul 27 04:21:36 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 27 Jul 2005 10:21:36 +0200 Subject: [Wtr-general] Sending Email Notifications In-Reply-To: Message-ID: <42e743e0.63e94b95.7109.ffffdc40@mx.gmail.com> I use net/smtp. http://www.ruby-doc.org/stdlib/libdoc/net/smtp/rdoc/ Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tuyet Cong-Ton-Nu Sent: Wednesday, July 27, 2005 3:14 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Sending Email Notifications After a test has finished running, is there a way to send out an email notification to several people to notify them whether the test has passed or failed? We use blat.exe for our SilkTest application to send out emails. What options do we have for WATIR/Ruby? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050727/ba42daab/attachment.html From scott at hanselman.com Wed Jul 27 06:43:15 2005 From: scott at hanselman.com (Scott Hanselman) Date: Wed, 27 Jul 2005 03:43:15 -0700 Subject: [Wtr-general] (possibly) Introducing WatirMaker Message-ID: <42E76543.8070409@hanselman.com> Hey folks, I got tired of waiting and wrote a 0.1 version of what I'm calling WatirMaker. It's puts IE on a string and attempts to record a Watir script from events. Take a look here http://www.hanselman.com/blog/IntroducingWatirMakerRecordingForRubybasedWatir.aspx - there is a *flash movie *demonstration of what I've accomplished in a few hours. I'd like to get a few people together to take this to a 0.9 release. Note, though, it's probably less about understanding Watir and more about understanding COM and the HTMLDocumentEvents2 classes. If you've got deep COM and IE object model and you're in this group, I'd like to talk to you. If it's successful the Watir community can have it and maybe Bret would bless it. ;) Scott Hanselman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050727/cab69fef/attachment.html From zeljko.filipin at gmail.com Wed Jul 27 09:03:42 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 27 Jul 2005 15:03:42 +0200 Subject: [Wtr-general] Script return values In-Reply-To: <82E50B4081E1354AAC1F917519B13F0D4E022D@OLENICK-01-EX.atlarge.net> Message-ID: <42e78600.022f54d4.29b8.22cc@mx.gmail.com> I am new to unit testing, but try this: assert(ie.contains_text("verification text"), "TEST FAILED.") assert(boolean, [ message ] ) - Fails if boolean is false or nil. "rescue" seems to rescue your failure. Zeljko ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Daniel Kurtz Sent: Tuesday, July 26, 2005 3:51 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Script return values I'm confused. This is my script, pretty much copied out of the user guide: begin assert(ie.contains_text("verification text") ) puts("TEST PASSED.") rescue puts("TEST FAILED.") end This is what the last couple of lines of output look like: Go to the test site: http://search.msn.com TEST PASSED. Go to the test site: http://www.findit-quick.com TEST FAILED. Go to the test site: http://www.truesearch.com TEST PASSED. Go to the test site: http://www.waply.com/ TEST FAILED. . Finished in 112.515 seconds. 1 tests, 19 assertions, 0 failures, 0 errors Why does the framework-generated text at the end not indicate that assertions failed? How do I capture that info? Daniel Kurtz Consultant Olenick & Associates 205 W. Wacker Drive Suite 2010 Chicago, IL 60606 312-332-0096 www.olenick.com From christopher.mcmahon at gmail.com Wed Jul 27 09:45:08 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 27 Jul 2005 08:45:08 -0500 Subject: [Wtr-general] RE: Click OK button on Popup Dialog? In-Reply-To: References: <99DF6C0285C2CE4C99F02D7838571966017B6FDA@hue.cybersoft-vn.com> Message-ID: <72799cd70507270645edf31ce@mail.gmail.com> On 7/26/05, Scott Hanselman wrote: > Why do folks do all this tricky stuff with Winclicker and starting new > instances of the ruby process? > > I do this: > > Thread.new { sleep 0.1; WindowHelper.new.push_alert_button } > ie.link(:id, "whatever").click #this causes an Alert() I discovered this myself independently: the way to handle popups is in another thread. Those unfamiliar with threads accomplish the same thing by handling popups in another process altogether. (Some silly people have handled popups with an entirely different script running in another scripting *language* altogether...) -Chris From raghu at qantom.com Wed Jul 27 09:57:19 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Wed, 27 Jul 2005 19:27:19 +0530 Subject: [Wtr-general] RE: Click OK button on Popup Dialog? In-Reply-To: <72799cd70507270645edf31ce@mail.gmail.com> References: <99DF6C0285C2CE4C99F02D7838571966017B6FDA@hue.cybersoft-vn.com> <72799cd70507270645edf31ce@mail.gmail.com> Message-ID: <42E792BF.9040305@qantom.com> Chris McMahon wrote: >On 7/26/05, Scott Hanselman wrote: > > >>Why do folks do all this tricky stuff with Winclicker and starting new >>instances of the ruby process? >> >>I do this: >> >> Thread.new { sleep 0.1; WindowHelper.new.push_alert_button } >> ie.link(:id, "whatever").click #this causes an Alert() >> >> > >I discovered this myself independently: the way to handle popups is >in another thread. > > Those unfamiliar with threads accomplish the same >thing by handling popups in another process altogether. > Not entirely true. What we found here was that most of the times, when a modal dialog pops up, the calling process and all its child threads wait for the modal dialog to be dismissed before continuing executing. Spawning another process solves this problem. In fact, in one of my experiments I found that even when a child thread opens a modal dialog, the owner thread also waits till the dialog is dismissed. ( I was trying to check if it is possible to call some of the potential dialog creators like clicking etc., could be started off on a separate thread) >(Some silly >people have handled popups with an entirely different script running >in another scripting *language* altogether...) >-Chris > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > From dkurtz at olenick.com Wed Jul 27 09:59:01 2005 From: dkurtz at olenick.com (Daniel Kurtz) Date: Wed, 27 Jul 2005 08:59:01 -0500 Subject: [Wtr-general] Script return values Message-ID: <82E50B4081E1354AAC1F917519B13F0D4E0232@OLENICK-01-EX.atlarge.net> Yea, I guess that's the effect. Unfortunately, not rescuing causes the script to terminate. What I have going on here is a loop... Ideally, at the end of the test case, I see that the loop executed say 20 times, that there were 20 assertions, and that 5 of them failed. I guess I need to redesign the test/script to accomplish that. Daniel Kurtz Consultant Olenick & Associates 205 W. Wacker Drive Suite 2010 Chicago, IL 60606 312-332-0096 www.olenick.com ________________________________ From: wtr-general-bounces at rubyforge.org on behalf of Zeljko Filipin Sent: Wed 7/27/2005 8:03 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Script return values I am new to unit testing, but try this: assert(ie.contains_text("verification text"), "TEST FAILED.") assert(boolean, [ message ] ) - Fails if boolean is false or nil. "rescue" seems to rescue your failure. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 4899 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050727/e7d63bdd/attachment.bin From christopher.mcmahon at gmail.com Wed Jul 27 10:28:48 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 27 Jul 2005 09:28:48 -0500 Subject: [Wtr-general] strange install error Message-ID: <72799cd70507270728410f59cc@mail.gmail.com> Hi... I'm trying to install Watir on a colleague's machine and getting a strange error. Line 155 of install.rb is bonus_location = homeDrive + "\\watir_bonus\\" # the default bonus location Ruby is giving us an "undefined method "+"" error-- it's interpreting the plus-sign (+) as a method for some reason. This is Ruby 1.8.2. Any suggestions about what might cause this or how to fix it? -Chris From christopher.mcmahon at gmail.com Wed Jul 27 10:32:34 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 27 Jul 2005 09:32:34 -0500 Subject: [Wtr-general] Script return values In-Reply-To: <82E50B4081E1354AAC1F917519B13F0D4E022D@OLENICK-01-EX.atlarge.net> References: <82E50B4081E1354AAC1F917519B13F0D4E022D@OLENICK-01-EX.atlarge.net> Message-ID: <72799cd7050727073220ca269f@mail.gmail.com> Do you know about $!? It holds the last error Ruby encountered. Instead of > rescue > puts("TEST FAILED.") > end try rescue puts ("Test failed. Error: " + $!) end From zeljko.filipin at gmail.com Wed Jul 27 10:51:23 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 27 Jul 2005 16:51:23 +0200 Subject: [Wtr-general] Watir::FactoryMethods#file_fields Message-ID: <42e79f3c.7f59967d.54d2.6201@mx.gmail.com> Is there some reason that there is no method Watir::FactoryMethods#file_fields (like Watir::FactoryMethods#buttons)? It would be nice to have it. Zeljko From ati.ozgur at gmail.com Wed Jul 27 10:55:15 2005 From: ati.ozgur at gmail.com (Atilla Ozgur) Date: Wed, 27 Jul 2005 17:55:15 +0300 Subject: [Wtr-general] (possibly) Introducing WatirMaker In-Reply-To: <42E76543.8070409@hanselman.com> References: <42E76543.8070409@hanselman.com> Message-ID: I would like to look at it as my day time job is .Net developer. But I took a 3 months contract with microsoft, as a consultant in Turkey. My current company rents (is this correct use) me to microsoft. Therefore I do not know, if I will have a time for it. From Mark_Cain at rl.gov Wed Jul 27 11:59:49 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Wed, 27 Jul 2005 08:59:49 -0700 Subject: [Wtr-general] Sending Email Notifications Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D2F4@EX5V.rl.gov> This works if you have the CDOEX.DLL on you machine. require 'win32ole' cdoMail = WIN32OLE.new("CDO.Message") cdoMail.From = "AutomatedTestRun at mscibarra.com" cdoMail.To = "AutomatedTestResults at mscibarra.com " cdoMail.Subject = "This is a test" cdoMail.TextBody = "This is a test" cdoMail.Send cdoMail = nil --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tuyet Cong-Ton-Nu Sent: Tuesday, July 26, 2005 6:14 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Sending Email Notifications After a test has finished running, is there a way to send out an email notification to several people to notify them whether the test has passed or failed? We use blat.exe for our SilkTest application to send out emails. What options do we have for WATIR/Ruby? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050727/843973b0/attachment.html From Peter.Ch at NETeller.com Wed Jul 27 12:00:29 2005 From: Peter.Ch at NETeller.com (Peter Chau) Date: Wed, 27 Jul 2005 10:00:29 -0600 Subject: [Wtr-general] strange install error Message-ID: I would try bonus_location = "#{homeDrive}\\watir_bonus\\" Peter From dkurtz at olenick.com Wed Jul 27 12:02:44 2005 From: dkurtz at olenick.com (Daniel Kurtz) Date: Wed, 27 Jul 2005 11:02:44 -0500 Subject: [Wtr-general] Script return values Message-ID: <82E50B4081E1354AAC1F917519B13F0D4E0233@OLENICK-01-EX.atlarge.net> I'm familar with it. I don't think it would make much of a difference for what I'm doing here. Your code is exactly equivelant to: try rescue => e puts ("Test failed. Error: " + e) end Daniel Kurtz Consultant Olenick & Associates 205 W. Wacker Drive Suite 2010 Chicago, IL 60606 312-332-0096 www.olenick.com ________________________________ From: wtr-general-bounces at rubyforge.org on behalf of Chris McMahon Sent: Wed 7/27/2005 9:32 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Script return values Do you know about $!? It holds the last error Ruby encountered. Instead of > rescue > puts("TEST FAILED.") > end try rescue puts ("Test failed. Error: " + $!) end -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 5051 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050727/c2390ad4/attachment.bin From Peter.Ch at NETeller.com Wed Jul 27 12:19:57 2005 From: Peter.Ch at NETeller.com (Peter Chau) Date: Wed, 27 Jul 2005 10:19:57 -0600 Subject: [Wtr-general] Script return values Message-ID: I came across some situations where the exceptions thrown by Watir were not picked up by the rescue. The work around for me was rescue Exception => e log("Exception in #{getFunctionName()} " + e.message + "\n" + e.backtrace.join("\n")) return false, e.message ensure ____________________________________________ Peter Chau Intermediate Automation Tester peter.ch at NETeller.com Toll Free: 888.258.5859 ext. 4443 Local: 403.233.9466 ext. 4443 Fax: 403.277.7996 www.NETeller.com ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Daniel Kurtz Sent: Wednesday, July 27, 2005 10:03 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Script return values I'm familar with it. I don't think it would make much of a difference for what I'm doing here. Your code is exactly equivelant to: try rescue => e puts ("Test failed. Error: " + e) end Daniel Kurtz Consultant Olenick & Associates 205 W. Wacker Drive Suite 2010 Chicago, IL 60606 312-332-0096 www.olenick.com ________________________________ From: wtr-general-bounces at rubyforge.org on behalf of Chris McMahon Sent: Wed 7/27/2005 9:32 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Script return values Do you know about $!? It holds the last error Ruby encountered. Instead of > rescue > puts("TEST FAILED.") > end try rescue puts ("Test failed. Error: " + $!) end -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050727/6acdd682/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/gif Size: 7356 bytes Desc: netlogo.gif Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050727/6acdd682/attachment.gif From dkurtz at olenick.com Wed Jul 27 12:26:23 2005 From: dkurtz at olenick.com (Daniel Kurtz) Date: Wed, 27 Jul 2005 11:26:23 -0500 Subject: [Wtr-general] Script non-responsive Message-ID: <82E50B4081E1354AAC1F917519B13F0D4E0234@OLENICK-01-EX.atlarge.net> >> From: "Peter Chau" >> Try this, >> >> ie.image(:src, /searchbutton_5_0.gif.).click Hi Peter; No go. I find I get the same thing no matter how I click the thing (the only attributes on this object that Watir recognizes is the SRC and its index position.) I think the issue is that the form, on Submit, calls a JavaScript function. Its like Watir never gets the word the function has finished. Actually, this is what's defined in the FORM tag on this particular page (which, BTW, is search.aol.com, in case anybody wants to go and look at it): onsubmit="sb_doSubmit(this.query);return false;" Daniel Kurtz Consultant Olenick & Associates 205 W. Wacker Drive Suite 2010 Chicago, IL 60606 312-332-0096 www.olenick.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050727/0c3ec69e/attachment.html From Peter.Ch at NETeller.com Wed Jul 27 12:55:45 2005 From: Peter.Ch at NETeller.com (Peter Chau) Date: Wed, 27 Jul 2005 10:55:45 -0600 Subject: [Wtr-general] Script non-responsive Message-ID: Sorry there was a typo on my part... try ie.image(:src, /searchbutton_5_0.gif/).click ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Daniel Kurtz Sent: Wednesday, July 27, 2005 10:26 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Script non-responsive >> From: "Peter Chau" >> Try this, >> >> ie.image(:src, /searchbutton_5_0.gif.).click Hi Peter; No go. I find I get the same thing no matter how I click the thing (the only attributes on this object that Watir recognizes is the SRC and its index position.) I think the issue is that the form, on Submit, calls a JavaScript function. Its like Watir never gets the word the function has finished. Actually, this is what's defined in the FORM tag on this particular page (which, BTW, is search.aol.com, in case anybody wants to go and look at it): onsubmit="sb_doSubmit(this.query);return false;" Daniel Kurtz Consultant Olenick & Associates 205 W. Wacker Drive Suite 2010 Chicago, IL 60606 312-332-0096 www.olenick.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050727/102b2c37/attachment.html From paul.rogers at shaw.ca Wed Jul 27 13:19:31 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 27 Jul 2005 11:19:31 -0600 Subject: [Wtr-general] Watir::FactoryMethods#file_fields In-Reply-To: <42e79f3c.7f59967d.54d2.6201@mx.gmail.com> Message-ID: <004b01c592cf$5a0045a0$6400a8c0@NewDell> I see this in my one: Im not sure when it was added, I have watir.rb 1.194 # This is the main method for accessing a file field. Usually an HTML tag. # * how - symbol - how we access the field , :index, :id, :name etc # * what - string, int or re , what we are looking for, # # returns a FileField object # # Typical Usage # # ie.file_field(:id, 'up_1') # access the file upload field with an ID of up_1 # ie.file_field(:name, 'upload') # access the file upload field with a name of upload # ie.file_field(:index, 2) # access the second file upload on the page ( 1 based, so the first field is accessed with :index,1) # def file_field( how , what ) return FileField.new(self , how, what) end -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 27 July 2005 08:51 To: wtr-general at rubyforge.org Subject: [Wtr-general] Watir::FactoryMethods#file_fields Is there some reason that there is no method Watir::FactoryMethods#file_fields (like Watir::FactoryMethods#buttons)? It would be nice to have it. Zeljko _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From dkurtz at olenick.com Wed Jul 27 13:12:16 2005 From: dkurtz at olenick.com (Daniel Kurtz) Date: Wed, 27 Jul 2005 12:12:16 -0500 Subject: [Wtr-general] Script non-responsive Message-ID: <82E50B4081E1354AAC1F917519B13F0D4E0236@OLENICK-01-EX.atlarge.net> Actually, I hadn't even noticed the typo in your code . In any event, the problem is not that Watir can't locate or click the button. The issue is that, once clicked, control never comes back to Watir from the page/browser, so the script hangs. Daniel Kurtz Consultant Olenick & Associates 205 W. Wacker Drive Suite 2010 Chicago, IL 60606 312-332-0096 www.olenick.com ________________________________ From: wtr-general-bounces at rubyforge.org on behalf of Peter Chau Sent: Wed 7/27/2005 11:55 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Script non-responsive Sorry there was a typo on my part... try ie.image(:src, /searchbutton_5_0.gif/).click -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 5132 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050727/e46dc1c1/attachment.bin From paul.rogers at shaw.ca Wed Jul 27 13:22:51 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 27 Jul 2005 11:22:51 -0600 Subject: [Wtr-general] strange install error In-Reply-To: <72799cd70507270728410f59cc@mail.gmail.com> Message-ID: <004c01c592cf$d122c6d0$6400a8c0@NewDell> homeDrive is probably nil. I think that comes from an environment variable. I think this needs to change anyway, recently I had watir install to a network drive, as the users home path was set to be k: I imagine most people would want to install to c: - rather than the place where the HomeDrive env variable is set to Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: 27 July 2005 08:29 To: wtr-general at rubyforge.org Subject: [Wtr-general] strange install error Hi... I'm trying to install Watir on a colleague's machine and getting a strange error. Line 155 of install.rb is bonus_location = homeDrive + "\\watir_bonus\\" # the default bonus location Ruby is giving us an "undefined method "+"" error-- it's interpreting the plus-sign (+) as a method for some reason. This is Ruby 1.8.2. Any suggestions about what might cause this or how to fix it? -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Kim.Alexander at ElPaso.com Wed Jul 27 13:24:41 2005 From: Kim.Alexander at ElPaso.com (Alexander, Kim (Kim)) Date: Wed, 27 Jul 2005 12:24:41 -0500 Subject: [Wtr-general] new support for referencing frames Message-ID: <51A0D9881DD5F1498CA1AAC9D30AFD2C1A2557@corhouexs08m.corp.epec.com> Brett, Sorry, I don't have a definate example. It's been a while since I've worked on my test scripts (due to other responsiblities). If I recall I'll post here. Thanks, Kim -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Tuesday, July 26, 2005 7:55 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] new support for referencing frames At 10:02 AM 7/26/2005, Alexander, Kim (Kim) wrote: >How about frames with no names. Seems these are second-class objects as >some frame methods don't seem to support frames referenced by index? That is news to me. Can you give more details for why you say this? _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ****************************************************************** This email and any files transmitted with it from the ElPaso Corporation are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. ****************************************************************** From Ben.Torres at rhi.com Wed Jul 27 13:35:32 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Wed, 27 Jul 2005 10:35:32 -0700 Subject: [Wtr-general] Inserting variable name in string Message-ID: <1641BB0AA7287848817A63C3EE9677D5071D4E4E@hqp-ex-mb05.na.msds.rhi.com> Right now, I am doing this: var1 = 'ghi' new_string = 'abcdef' + var1 + 'jklmnop' Is there any way I can insert the variable name within the string? I tried doing this, but it didn't work: New_string = 'abcdef{var1}jklmnop' From paul.rogers at shaw.ca Wed Jul 27 13:42:39 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 27 Jul 2005 11:42:39 -0600 Subject: [Wtr-general] Inserting variable name in string In-Reply-To: <1641BB0AA7287848817A63C3EE9677D5071D4E4E@hqp-ex-mb05.na.msds.rhi.com> Message-ID: <005201c592d2$954917b0$6400a8c0@NewDell> You're close! New_string = 'abcdef#{var1}jklmnop' -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Torres, Ben (HQP) Sent: 27 July 2005 11:36 To: wtr-general at rubyforge.org Subject: [Wtr-general] Inserting variable name in string Right now, I am doing this: var1 = 'ghi' new_string = 'abcdef' + var1 + 'jklmnop' Is there any way I can insert the variable name within the string? I tried doing this, but it didn't work: New_string = 'abcdef{var1}jklmnop' _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Kim.Alexander at ElPaso.com Wed Jul 27 13:58:12 2005 From: Kim.Alexander at ElPaso.com (Alexander, Kim (Kim)) Date: Wed, 27 Jul 2005 12:58:12 -0500 Subject: [Wtr-general] Javascript not running during WATIR testing Message-ID: <51A0D9881DD5F1498CA1AAC9D30AFD2C1A256B@corhouexs08m.corp.epec.com> Hi All, I'm noticing differences in the behavior of a page between automated testing and manually doing the same thing. The app I'm testing registers (sends) a piece of javascript code to display validation error messages. It adds this to the html stream upon processing a postback. When running the app manually these error messages are displayed. However when running with test script (same actions as manual only automated) the javascript fails to fire and I get no browser error messages window. Any Ideas? Here's the javascript. It's at the top of the page (doing browser view source). I apologize in advance, but watir is great, but I'm stumped why I'm seeing this. Thanks, Kim ****************************************************************** This email and any files transmitted with it from the ElPaso Corporation are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. ****************************************************************** From paul.rogers at shaw.ca Wed Jul 27 14:04:19 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 27 Jul 2005 12:04:19 -0600 Subject: [Wtr-general] Javascript not running during WATIR testing In-Reply-To: <51A0D9881DD5F1498CA1AAC9D30AFD2C1A256B@corhouexs08m.corp.epec.com> Message-ID: <005301c592d5$9bec2140$6400a8c0@NewDell> Are these messages fired by the onBlur or onChange events on a text field? If so Bret has fixed the problem and it will be in the next release. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Alexander, Kim (Kim) Sent: 27 July 2005 11:58 To: wtr-general at rubyforge.org Subject: [Wtr-general] Javascript not running during WATIR testing Hi All, I'm noticing differences in the behavior of a page between automated testing and manually doing the same thing. The app I'm testing registers (sends) a piece of javascript code to display validation error messages. It adds this to the html stream upon processing a postback. When running the app manually these error messages are displayed. However when running with test script (same actions as manual only automated) the javascript fails to fire and I get no browser error messages window. Any Ideas? Here's the javascript. It's at the top of the page (doing browser view source). I apologize in advance, but watir is great, but I'm stumped why I'm seeing this. Thanks, Kim ****************************************************************** This email and any files transmitted with it from the ElPaso Corporation are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. ****************************************************************** _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Kim.Alexander at ElPaso.com Wed Jul 27 14:22:08 2005 From: Kim.Alexander at ElPaso.com (Alexander, Kim (Kim)) Date: Wed, 27 Jul 2005 13:22:08 -0500 Subject: [Wtr-general] Javascript not running during WATIR testing Message-ID: <51A0D9881DD5F1498CA1AAC9D30AFD2C1A2575@corhouexs08m.corp.epec.com> Everyone Please excuse this earlier message. I'm just being obtuse. The pages I'm testing are meant to reside in a frame that provides the error message display element. My test scripts are not exercising the pages in the frame yet. Thanks for the speedy reply, and please forgive the false alarm. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, July 27, 2005 1:04 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Javascript not running during WATIR testing Are these messages fired by the onBlur or onChange events on a text field? If so Bret has fixed the problem and it will be in the next release. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Alexander, Kim (Kim) Sent: 27 July 2005 11:58 To: wtr-general at rubyforge.org Subject: [Wtr-general] Javascript not running during WATIR testing Hi All, I'm noticing differences in the behavior of a page between automated testing and manually doing the same thing. The app I'm testing registers (sends) a piece of javascript code to display validation error messages. It adds this to the html stream upon processing a postback. When running the app manually these error messages are displayed. However when running with test script (same actions as manual only automated) the javascript fails to fire and I get no browser error messages window. Any Ideas? Here's the javascript. It's at the top of the page (doing browser view source). I apologize in advance, but watir is great, but I'm stumped why I'm seeing this. Thanks, Kim ****************************************************************** This email and any files transmitted with it from the ElPaso Corporation are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. ****************************************************************** _______________________________________________ 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 ****************************************************************** This email and any files transmitted with it from the ElPaso Corporation are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. ****************************************************************** From paul.rogers at shaw.ca Wed Jul 27 14:26:27 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 27 Jul 2005 12:26:27 -0600 Subject: [Wtr-general] can't run googlesearch.rb successfully In-Reply-To: Message-ID: <005601c592d8$b3eb4a20$6400a8c0@NewDell> Well, it works for me too! Whats the windows/IE version on the other machine? I think fireEvent was added in IE 5.5 Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jan.Montano at thomson.com Sent: 25 July 2005 20:00 To: wtr-general at rubyforge.org Subject: [Wtr-general] can't run googlesearch.rb successfully Hi! I've installed ruby and watir (latest releases) on another terminal. However, When i run googlesearch.rb this error pops out. What's with this error? and why does this happen now? I have no problem with watir on my original terminal. Thank you. >ruby googleSearch.rb ## Beginning of test: Google search Step 1: go to the test site: http://www.google.com Action: entered http://www.google.com in the address bar. Step 2: enter 'pickaxe' in the search text field c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3620:in `method_missing': Unknown property or method `fireEvent' (WIN32OLERuntimeError) HRESULT error code:0x80020006 Unknown name. from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3620:in `set' from googleSearch.rb:33 >Exit code: 1 Jan M. Montano QA Lead / Developer Regional Application Development Thomson (Philippines) Corporation 18th Floor Ayala Life - FGU Center 6811 Ayala Ave., Makati City Philippines (632) 878-5890 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Wed Jul 27 14:31:13 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 27 Jul 2005 12:31:13 -0600 Subject: [Wtr-general] Pop up handling improvements Message-ID: <005701c592d9$5e6a9910$6400a8c0@NewDell> The scripts that handle pop ups are in the unit test directory jscriptExtraAlert.rb jscriptExtraConfirmCancel.rb jscriptExtraConfirmOk.rb jscriptPushButton.rb I suggest we move these to a better location - The C:\ruby\lib\ruby\site_ruby\1.8\watir seems like the best place ( or maybe another dir below) We can then maybe add some methods to launch these from watir directly - ie.launch_js_confirm_clicker() Or similar. I think this would be one small step to making these popups easier to deal with. Any suggestions? Paul From mkelly at elevenwireless.com Wed Jul 27 15:06:41 2005 From: mkelly at elevenwireless.com (Michael Kelly) Date: Wed, 27 Jul 2005 12:06:41 -0700 Subject: [Wtr-general] (possibly) Introducing WatirMaker Message-ID: <640C9D8653C87C44AB5F00F91A91FE210D4B1F@edison.elevenwireless.com> Scott, I got tired of waiting as well. I've started an IE toolbar that will do the same thing. While I really like the idea of having a Watir toolbar for this, it has taken me into the black art of C++ / COM / ATL (not my greatest strength). I've gotten a lot of legs from an excellent ShareWare utility called ToolbarCreator, but it's still relatively slow going. In the same time that it took you to produce a relatively functional prototype, I've just gotten to the point where the event sinks work for the DOM. In addition to concerns over the development velocity, I've been worried about producing a solution that few people in the Watir community would be interested in (or able to) maintain. So, long story short, we have a need for WaterMaker and I'd like to throw my hat in the ring. -=michael=- P.S. If you ever have a need for an IE toolbar, I highly recommend ToolbarCreator (http://www.diodia.com/toolbarcreator.htm). They've done an excellent job of creating a wizard that will spit out a C++ VS 7 project for your toolbar, and they provide libraries that hide much of the COM / ATL complexity. -- Michael Kelly Sr. Software Engineer Eleven Wireless Inc. - The Possibilities are Wireless http://www.elevenwireless.com -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Scott Hanselman Sent: Wednesday, July 27, 2005 3:43 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] (possibly) Introducing WatirMaker Hey folks, I got tired of waiting and wrote a 0.1 version of what I'm calling WatirMaker. It's puts IE on a string and attempts to record a Watir script from events. Take a look here http://www.hanselman.com/blog/IntroducingWatirMakerRecordingForRubybased Watir.aspx - there is a flash movie demonstration of what I've accomplished in a few hours. I'd like to get a few people together to take this to a 0.9 release. Note, though, it's probably less about understanding Watir and more about understanding COM and the HTMLDocumentEvents2 classes. If you've got deep COM and IE object model and you're in this group, I'd like to talk to you. If it's successful the Watir community can have it and maybe Bret would bless it. ;) Scott Hanselman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050727/6901e895/attachment.html From michael.net at gmail.com Wed Jul 27 15:15:11 2005 From: michael.net at gmail.com (Mike) Date: Wed, 27 Jul 2005 15:15:11 -0400 Subject: [Wtr-general] Script non-responsive In-Reply-To: <82E50B4081E1354AAC1F917519B13F0D4E0226@OLENICK-01-EX.atlarge.net> References: <82E50B4081E1354AAC1F917519B13F0D4E0226@OLENICK-01-EX.atlarge.net> Message-ID: <86388bc705072712154d001154@mail.gmail.com> > > The command equivelant: > ie.button(:src, " > http://cdn.search.aol.com/aolsearch/searchbutton_5_0.gif").click > works fine in IRB. Running in a script however, it does click the button, > but never returns, causing the script to stall without any error reporting. > Running fine in IRB but not in a script strongly indicates a race. I've already encountered one of these myself, and I'm brand new to this. You might try strategically adding a sleep anywhere you think that javascript may be altering your html. Show_all_objects can be used to make sure what you think is there really is. (It can also function as the "sleep".) The button may not even be part in the real problem. Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050727/3e0569b0/attachment.html From dkurtz at olenick.com Wed Jul 27 16:09:20 2005 From: dkurtz at olenick.com (Daniel Kurtz) Date: Wed, 27 Jul 2005 15:09:20 -0500 Subject: [Wtr-general] Script non-responsive Message-ID: <82E50B4081E1354AAC1F917519B13F0D4E0237@OLENICK-01-EX.atlarge.net> Actually, when I was going back to it earlier today, I couldn't get it to work in IRB either. I have the same problem whether I'm using button.click or form.submit. The browser does what I want it to do, but IRB just sits there with a blank prompt until you hit Ctrl-C. Daniel Kurtz Consultant Olenick & Associates 205 W. Wacker Drive Suite 2010 Chicago, IL 60606 312-332-0096 www.olenick.com ________________________________ From: wtr-general-bounces at rubyforge.org on behalf of Mike Sent: Wed 7/27/2005 2:15 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Script non-responsive Running fine in IRB but not in a script strongly indicates a race. I've already encountered one of these myself, and I'm brand new to this. You might try strategically adding a sleep anywhere you think that javascript may be altering your html. Show_all_objects can be used to make sure what you think is there really is. (It can also function as the "sleep".) The button may not even be part in the real problem. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 5108 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050727/0a8530bf/attachment.bin From zeljko.filipin at gmail.com Wed Jul 27 17:08:07 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 27 Jul 2005 23:08:07 +0200 Subject: [Wtr-general] Watir::FactoryMethods#file_fields In-Reply-To: <004b01c592cf$5a0045a0$6400a8c0@NewDell> Message-ID: <42e7f786.0af5f9aa.088e.ffff929a@mx.gmail.com> Thanks, I also have file_field, but I need file_fields (plural). :) Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, July 27, 2005 7:20 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Watir::FactoryMethods#file_fields I see this in my one: Im not sure when it was added, I have watir.rb 1.194 # This is the main method for accessing a file field. Usually an HTML tag. # * how - symbol - how we access the field , :index, :id, :name etc # * what - string, int or re , what we are looking for, # # returns a FileField object # # Typical Usage # # ie.file_field(:id, 'up_1') # access the file upload field with an ID of up_1 # ie.file_field(:name, 'upload') # access the file upload field with a name of upload # ie.file_field(:index, 2) # access the second file upload on the page ( 1 based, so the first field is accessed with :index,1) # def file_field( how , what ) return FileField.new(self , how, what) end -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 27 July 2005 08:51 To: wtr-general at rubyforge.org Subject: [Wtr-general] Watir::FactoryMethods#file_fields Is there some reason that there is no method Watir::FactoryMethods#file_fields (like Watir::FactoryMethods#buttons)? It would be nice to have it. Zeljko _______________________________________________ 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 zeljko.filipin at gmail.com Wed Jul 27 17:12:33 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 27 Jul 2005 23:12:33 +0200 Subject: [Wtr-general] Inserting variable name in string In-Reply-To: <005201c592d2$954917b0$6400a8c0@NewDell> Message-ID: <42e7f890.65d997bb.2703.5433@mx.gmail.com> But it will not work if you use single quotes ('), you have to use double quotes (") if you have variable inside the string. new_string = "abcdef#{var1}jklmnop" Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, July 27, 2005 7:43 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Inserting variable name in string You're close! New_string = 'abcdef#{var1}jklmnop' -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Torres, Ben (HQP) Sent: 27 July 2005 11:36 To: wtr-general at rubyforge.org Subject: [Wtr-general] Inserting variable name in string Right now, I am doing this: var1 = 'ghi' new_string = 'abcdef' + var1 + 'jklmnop' Is there any way I can insert the variable name within the string? I tried doing this, but it didn't work: New_string = 'abcdef{var1}jklmnop' _______________________________________________ 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 Jul 27 17:53:02 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 27 Jul 2005 15:53:02 -0600 Subject: [Wtr-general] Watir::FactoryMethods#file_fields In-Reply-To: <42e7f786.0af5f9aa.088e.ffff929a@mx.gmail.com> Message-ID: <007d01c592f5$8f7c7bb0$6400a8c0@NewDell> Ah. I'll see how difficult it is to add! Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 27 July 2005 15:08 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Watir::FactoryMethods#file_fields Thanks, I also have file_field, but I need file_fields (plural). :) Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, July 27, 2005 7:20 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Watir::FactoryMethods#file_fields I see this in my one: Im not sure when it was added, I have watir.rb 1.194 # This is the main method for accessing a file field. Usually an HTML tag. # * how - symbol - how we access the field , :index, :id, :name etc # * what - string, int or re , what we are looking for, # # returns a FileField object # # Typical Usage # # ie.file_field(:id, 'up_1') # access the file upload field with an ID of up_1 # ie.file_field(:name, 'upload') # access the file upload field with a name of upload # ie.file_field(:index, 2) # access the second file upload on the page ( 1 based, so the first field is accessed with :index,1) # def file_field( how , what ) return FileField.new(self , how, what) end -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 27 July 2005 08:51 To: wtr-general at rubyforge.org Subject: [Wtr-general] Watir::FactoryMethods#file_fields Is there some reason that there is no method Watir::FactoryMethods#file_fields (like Watir::FactoryMethods#buttons)? It would be nice to have it. Zeljko _______________________________________________ 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 Jul 27 17:58:23 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 27 Jul 2005 15:58:23 -0600 Subject: [Wtr-general] Script non-responsive In-Reply-To: <82E50B4081E1354AAC1F917519B13F0D4E0237@OLENICK-01-EX.atlarge.net> Message-ID: <007e01c592f6$4f3c7720$6400a8c0@NewDell> I had the same problem with the controller I used before Watir. If I remember it was caused by the page loading faster than we could detect, so the wait method is still waiting, as it doesnt realise its already loaded. This was one of the reasons I wanted to move to an event based system ( which caused way too many problems with IRB) If you feel like trying something, in watir.rb in the wait method, try the following log "wait: readystate=" + @ie.readyState.to_s puts "Readystate = " + @ie.readyState.to_s # new line until @ie.readyState == READYSTATE_COMPLETE @pageHasReloaded = true sleep 0.02 s.spin end sleep 0.02 puts "Readystate = " + @ie.readyState.to_s # new line puts "doc Readystate = " + @ie.document.readyState.to_s # new line until @ie.document.readyState == "complete" sleep 0.02 s.spin end I think there is already a bug in to be able to specify a maximum wait time -----Original Message----- From: Daniel Kurtz [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Daniel Kurtz Sent: 27 July 2005 14:09 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Script non-responsive Actually, when I was going back to it earlier today, I couldn't get it to work in IRB either. I have the same problem whether I'm using button.click or form.submit. The browser does what I want it to do, but IRB just sits there with a blank prompt until you hit Ctrl-C. Daniel Kurtz Consultant Olenick & Associates 205 W. Wacker Drive Suite 2010 Chicago, IL 60606 312-332-0096 www.olenick.com _____ From: wtr-general-bounces at rubyforge.org on behalf of Mike Sent: Wed 7/27/2005 2:15 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Script non-responsive Running fine in IRB but not in a script strongly indicates a race. I've already encountered one of these myself, and I'm brand new to this. You might try strategically adding a sleep anywhere you think that javascript may be altering your html. Show_all_objects can be used to make sure what you think is there really is. (It can also function as the "sleep".) The button may not even be part in the real problem. -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 8536 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050727/e1fd4560/attachment.bin From paul.rogers at shaw.ca Wed Jul 27 18:02:25 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 27 Jul 2005 16:02:25 -0600 Subject: [Wtr-general] (possibly) Introducing WatirMaker In-Reply-To: <42E76543.8070409@hanselman.com> Message-ID: <008201c592f6$df7abc20$6400a8c0@NewDell> Way cool! I couldnt see anywhere - what language is it written in? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Scott Hanselman Sent: 27 July 2005 04:43 To: wtr-general at rubyforge.org Subject: [Wtr-general] (possibly) Introducing WatirMaker Hey folks, I got tired of waiting and wrote a 0.1 version of what I'm calling WatirMaker. It's puts IE on a string and attempts to record a Watir script from events. Take a look here http://www.hanselman.com/blog/IntroducingWatirMakerRecordingForRubybased Watir.aspx - there is a flash movie demonstration of what I've accomplished in a few hours. I'd like to get a few people together to take this to a 0.9 release. Note, though, it's probably less about understanding Watir and more about understanding COM and the HTMLDocumentEvents2 classes. If you've got deep COM and IE object model and you're in this group, I'd like to talk to you. If it's successful the Watir community can have it and maybe Bret would bless it. ;) Scott Hanselman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050727/3233c539/attachment.html From paul.rogers at shaw.ca Wed Jul 27 18:24:46 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 27 Jul 2005 16:24:46 -0600 Subject: [Wtr-general] Watir::FactoryMethods#file_fields In-Reply-To: <42e7f786.0af5f9aa.088e.ffff929a@mx.gmail.com> Message-ID: <009201c592f9$fef46a30$6400a8c0@NewDell> Ok, this time Im sure I got it right ;-). Its in cvs with a very basic unit test. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 27 July 2005 15:08 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Watir::FactoryMethods#file_fields Thanks, I also have file_field, but I need file_fields (plural). :) Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, July 27, 2005 7:20 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Watir::FactoryMethods#file_fields I see this in my one: Im not sure when it was added, I have watir.rb 1.194 # This is the main method for accessing a file field. Usually an HTML tag. # * how - symbol - how we access the field , :index, :id, :name etc # * what - string, int or re , what we are looking for, # # returns a FileField object # # Typical Usage # # ie.file_field(:id, 'up_1') # access the file upload field with an ID of up_1 # ie.file_field(:name, 'upload') # access the file upload field with a name of upload # ie.file_field(:index, 2) # access the second file upload on the page ( 1 based, so the first field is accessed with :index,1) # def file_field( how , what ) return FileField.new(self , how, what) end -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 27 July 2005 08:51 To: wtr-general at rubyforge.org Subject: [Wtr-general] Watir::FactoryMethods#file_fields Is there some reason that there is no method Watir::FactoryMethods#file_fields (like Watir::FactoryMethods#buttons)? It would be nice to have it. Zeljko _______________________________________________ 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 Jul 27 18:45:01 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 27 Jul 2005 16:45:01 -0600 Subject: [Wtr-general] RE: image.to_s In-Reply-To: <42dfa01f.7970a341.3080.0051@mx.gmail.com> Message-ID: <009701c592fc$d2efec40$6400a8c0@NewDell> I added alt as a property and included it in the to_s As to why the typs= 'image' is available. It's a standard property from IE on input controls, like button, etc. I just continued it on. Maybe this is something that should be removed? At some point I think we want to add a elements iterator that goes through all the items on the page, and I guess having the type available may help Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 21 July 2005 07:17 To: wtr-general at rubyforge.org Subject: [Wtr-general] RE: image.to_s And also required property "alt" is not displayed. Zeljko -----Original Message----- From: Zeljko Filipin [mailto:zeljko.filipin at gmail.com] Sent: Thursday, July 21, 2005 3:08 PM To: wtr-general at rubyforge.org Subject: image.to_s I am making unit tests for my methods and I found a bug in watir. I wanted to display properties of an image. HTML is valid according to http://validator.w3.org/. ---------- HTML: images

flower

---------- IRB: irb require 'watir' ie = Watir::IE.attach(:title, //) ie.images.each { |i| puts i.to_s } ---------- OUTPUT: type: image id: name: value: disabled: false src: file:///C:/Documents%20and%20Settings/zfilipin/My%20Documents/Tests/test /htm l/images/flower.png file date: 07/13/2005 file size: 1252 width: 20 height: 20 ---------- Then I added missing id, name, value, and disabled, so img tag is: flower ---------- OUTPUT: ... id: image_id name: image_name value: image_value disabled: true ... ---------- So where is the bug? My page is no longer valid. I get this error messages: "there is no attribute name/value/disabled". Even if I change my page back to html 4.01 I get error messages: "there is no attribute value/disabled". So, name was once alloved, but value and disabled not even then. What is the purpose of displaying properties that do not exist? Not related to this, but what is purpose of "type: image" in output? Can it be anything else except image? Zeljko _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From scott at hanselman.com Wed Jul 27 21:29:44 2005 From: scott at hanselman.com (Scott Hanselman) Date: Wed, 27 Jul 2005 18:29:44 -0700 Subject: [Wtr-general] (possibly) Introducing WatirMaker In-Reply-To: <008201c592f6$df7abc20$6400a8c0@NewDell> Message-ID: C# on .NET 1.1. _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, July 27, 2005 3:02 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] (possibly) Introducing WatirMaker Way cool! I couldnt see anywhere - what language is it written in? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Scott Hanselman Sent: 27 July 2005 04:43 To: wtr-general at rubyforge.org Subject: [Wtr-general] (possibly) Introducing WatirMaker Hey folks, I got tired of waiting and wrote a 0.1 version of what I'm calling WatirMaker. It's puts IE on a string and attempts to record a Watir script from events. Take a look here http://www.hanselman.com/blog/IntroducingWatirMakerRecordingForRubybasedWati r.aspx - there is a flash movie demonstration of what I've accomplished in a few hours. I'd like to get a few people together to take this to a 0.9 release. Note, though, it's probably less about understanding Watir and more about understanding COM and the HTMLDocumentEvents2 classes. If you've got deep COM and IE object model and you're in this group, I'd like to talk to you. If it's successful the Watir community can have it and maybe Bret would bless it. ;) Scott Hanselman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050727/c603d8b6/attachment.html From paul.rogers at shaw.ca Wed Jul 27 22:13:37 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 27 Jul 2005 20:13:37 -0600 Subject: [Wtr-general] Pop up handling improvements In-Reply-To: <005701c592d9$5e6a9910$6400a8c0@NewDell> Message-ID: <00a001c59319$f6bf3a00$6400a8c0@NewDell> Ive just seen Scotts post on the 26th and I think I like his solution better. - Scott have you tried all the popup windows - file requester, security etc? What OS did you use? I seem to remember having problems with one type or one os that required a new process rather than a thread. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: 27 July 2005 12:31 To: wtr-general at rubyforge.org Subject: [Wtr-general] Pop up handling improvements The scripts that handle pop ups are in the unit test directory jscriptExtraAlert.rb jscriptExtraConfirmCancel.rb jscriptExtraConfirmOk.rb jscriptPushButton.rb I suggest we move these to a better location - The C:\ruby\lib\ruby\site_ruby\1.8\watir seems like the best place ( or maybe another dir below) We can then maybe add some methods to launch these from watir directly - ie.launch_js_confirm_clicker() Or similar. I think this would be one small step to making these popups easier to deal with. Any suggestions? Paul _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From tuyet.ctn at mscibarra.com Wed Jul 27 22:15:35 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Wed, 27 Jul 2005 19:15:35 -0700 Subject: [Wtr-general] Sending Email Notifications Message-ID: Thanks, Mark. I did find CDOEX.DLL on my machine, so I copied your code and ran it, but got this error: C:\watir\watir>email2.rb C:/watir/watir/email2.rb:20:in `method_missing': Send (WIN32OLERuntimeError) OLE error code:80040220 in CDO.Message.1 The "SendUsing" configuration value is invalid. HRESULT error code:0x80020009 Exception occurred. from C:/watir/watir/email2.rb:20 Here is my code: require 'watir' include Watir require 'win32ole' cdoMail = WIN32OLE.new("CDO.Message") cdoMail.From = "test at mscibarra.com" cdoMail.To = "tuyet.ctn at mscibarra.com " cdoMail.Subject = "This is a test" cdoMail.TextBody = "This is a test" cdoMail.Send cdoMail = nil -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050727/b3b6450a/attachment.html From tuyet.ctn at mscibarra.com Wed Jul 27 22:17:53 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Wed, 27 Jul 2005 19:17:53 -0700 Subject: [Wtr-general] Sending Email Notifications Message-ID: Thanks for the good link, Zeljko. I also tried using the example from the link but didn't get anything through. Probably didn't enter the right SMTP. Would you mind posting an example that worked for you? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050727/60208779/attachment.html From Jan.Montano at thomson.com Wed Jul 27 22:18:42 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Thu, 28 Jul 2005 10:18:42 +0800 Subject: [Wtr-general] click image problem Message-ID: Hi! I have this problem clicking this image... pls see attached htm for added info. here's the line of the image I want to click...
I tried $ie.link(:url,"javascript:AddText(' AND ')").click $ie.button(:url,"javascript:AddText(' AND ')").click but it says unable to locate object. The only difference with this object is that the link does not appear in the status bar during mouseover. Thanks. <> -Jan -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: KeyWordPopUp.txt Url: http://rubyforge.org/pipermail/wtr-general/attachments/20050728/0ccd2829/attachment.txt From paul.rogers at shaw.ca Wed Jul 27 22:43:30 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 27 Jul 2005 20:43:30 -0600 Subject: [Wtr-general] click image problem In-Reply-To: Message-ID: <00b601c5931e$23bce0d0$6400a8c0@NewDell> Give this a go: $ie.image(:src ,/FBK-and/).click You may have to change the reg-exp if there are other images with the same ( or similar) name Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jan.Montano at thomson.com Sent: 27 July 2005 20:19 To: wtr-general at rubyforge.org Subject: [Wtr-general] click image problem Hi! I have this problem clicking this image... pls see attached htm for added info. here's the line of the image I want to click... I tried $ie.link(:url,"javascript:AddText(' AND ')").click $ie.button(:url,"javascript:AddText(' AND ')").click but it says unable to locate object. The only difference with this object is that the link does not appear in the status bar during mouseover. Thanks. <> -Jan From Jan.Montano at thomson.com Wed Jul 27 22:53:57 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Thu, 28 Jul 2005 10:53:57 +0800 Subject: [Wtr-general] click image problem Message-ID: Thanks paul! It's working now. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Paul Rogers Sent: Thursday, July 28, 2005 10:44 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] click image problem Give this a go: $ie.image(:src ,/FBK-and/).click You may have to change the reg-exp if there are other images with the same ( or similar) name Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jan.Montano at thomson.com Sent: 27 July 2005 20:19 To: wtr-general at rubyforge.org Subject: [Wtr-general] click image problem Hi! I have this problem clicking this image... pls see attached htm for added info. here's the line of the image I want to click... I tried $ie.link(:url,"javascript:AddText(' AND ')").click $ie.button(:url,"javascript:AddText(' AND ')").click but it says unable to locate object. The only difference with this object is that the link does not appear in the status bar during mouseover. Thanks. <> -Jan _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Jan.Montano at thomson.com Wed Jul 27 23:04:42 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Thu, 28 Jul 2005 11:04:42 +0800 Subject: [Wtr-general] can't run googlesearch.rb successfully Message-ID: It's 5.00. I guess this is a limitation for testing with IE 5.00. Thanks. JAN -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Paul Rogers Sent: Thursday, July 28, 2005 2:26 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] can't run googlesearch.rb successfully Well, it works for me too! Whats the windows/IE version on the other machine? I think fireEvent was added in IE 5.5 Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jan.Montano at thomson.com Sent: 25 July 2005 20:00 To: wtr-general at rubyforge.org Subject: [Wtr-general] can't run googlesearch.rb successfully Hi! I've installed ruby and watir (latest releases) on another terminal. However, When i run googlesearch.rb this error pops out. What's with this error? and why does this happen now? I have no problem with watir on my original terminal. Thank you. >ruby googleSearch.rb ## Beginning of test: Google search Step 1: go to the test site: http://www.google.com Action: entered http://www.google.com in the address bar. Step 2: enter 'pickaxe' in the search text field c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3620:in `method_missing': Unknown property or method `fireEvent' (WIN32OLERuntimeError) HRESULT error code:0x80020006 Unknown name. from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3620:in `set' from googleSearch.rb:33 >Exit code: 1 Jan M. Montano QA Lead / Developer Regional Application Development Thomson (Philippines) Corporation 18th Floor Ayala Life - FGU Center 6811 Ayala Ave., Makati City Philippines (632) 878-5890 _______________________________________________ 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 scott at hanselman.com Wed Jul 27 23:46:35 2005 From: scott at hanselman.com (Scott Hanselman) Date: Wed, 27 Jul 2005 20:46:35 -0700 Subject: [Wtr-general] Pop up handling improvements In-Reply-To: <00a001c59319$f6bf3a00$6400a8c0@NewDell> Message-ID: Nope, just the Javascript alert() type. I'm just learning Ruby, so I don't know if it's cool or not, but it sure seemed cleaner than fork'ing. It is/was on XPSP2 Scott -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, July 27, 2005 7:14 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Pop up handling improvements Ive just seen Scotts post on the 26th and I think I like his solution better. - Scott have you tried all the popup windows - file requester, security etc? What OS did you use? I seem to remember having problems with one type or one os that required a new process rather than a thread. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: 27 July 2005 12:31 To: wtr-general at rubyforge.org Subject: [Wtr-general] Pop up handling improvements The scripts that handle pop ups are in the unit test directory jscriptExtraAlert.rb jscriptExtraConfirmCancel.rb jscriptExtraConfirmOk.rb jscriptPushButton.rb I suggest we move these to a better location - The C:\ruby\lib\ruby\site_ruby\1.8\watir seems like the best place ( or maybe another dir below) We can then maybe add some methods to launch these from watir directly - ie.launch_js_confirm_clicker() Or similar. I think this would be one small step to making these popups easier to deal with. Any suggestions? Paul _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Jan.Montano at thomson.com Wed Jul 27 23:50:54 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Thu, 28 Jul 2005 11:50:54 +0800 Subject: [Wtr-general] wair for start explorer to load Message-ID: Hi! What's the best approach to know if the explorer has finished loading. sometimes, 1 sec is not enough. it depends. What's the best way to do this? Pls look at the code below. w.winsystem("start explorer #{thread_number}_#{i}.html ") sleep(1) $ie_array[i] = IE.attach(:title , "#{thread_number}_#{i}" ) if the html is not yet loaded, attach will fail unable to locate object From singh_angrez at rediffmail.com Thu Jul 28 01:34:04 2005 From: singh_angrez at rediffmail.com (Angrez Singh) Date: 28 Jul 2005 05:34:04 -0000 Subject: [Wtr-general] Inserting variable name in string Message-ID: <20050728053404.12738.qmail@webmail17.rediffmail.com> ? Hi, Try this.. var1 = 'ghi' new_string = "abcdef#{var1}jklmnop" I think you forgot to put the # before the braces and also double quoted string is must for this kind of substitution. Regards, Angrez On Wed, 27 Jul 2005 Torres,Ben(HQP) wrote : >Right now, I am doing this: > >var1 = 'ghi' >new_string = 'abcdef' + var1 + 'jklmnop' > >Is there any way I can insert the variable name within the string? I >tried doing this, but it didn't work: > >New_string = 'abcdef{var1}jklmnop' > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050728/5b79ab84/attachment.html From singh_angrez at rediffmail.com Thu Jul 28 01:34:03 2005 From: singh_angrez at rediffmail.com (Angrez Singh) Date: 28 Jul 2005 05:34:03 -0000 Subject: [Wtr-general] Inserting variable name in string Message-ID: <20050728053403.30897.qmail@webmail49.rediffmail.com> ? Hi, Try this.. var1 = 'ghi' var1 = 'ghi' new_string = "abcdef#{var1}jklmnop" I think you forgot to put the # before the braces and also double quoted string is must for this kind of substitution. Regards, Angrez On Wed, 27 Jul 2005 Torres,Ben(HQP) wrote : >Right now, I am doing this: > >var1 = 'ghi' >new_string = 'abcdef' + var1 + 'jklmnop' > >Is there any way I can insert the variable name within the string? I >tried doing this, but it didn't work: > >New_string = 'abcdef{var1}jklmnop' > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050728/11fab4d4/attachment.html From zeljko.filipin at gmail.com Thu Jul 28 01:44:11 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 28 Jul 2005 07:44:11 +0200 Subject: [Wtr-general] Watir::FactoryMethods#file_fields In-Reply-To: <009201c592f9$fef46a30$6400a8c0@NewDell> Message-ID: <42e87079.1a2ac6cb.33b0.3260@mx.gmail.com> Thanks, I will try it at once. Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Thursday, July 28, 2005 12:25 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Watir::FactoryMethods#file_fields Ok, this time Im sure I got it right ;-). Its in cvs with a very basic unit test. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 27 July 2005 15:08 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Watir::FactoryMethods#file_fields Thanks, I also have file_field, but I need file_fields (plural). :) Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, July 27, 2005 7:20 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Watir::FactoryMethods#file_fields I see this in my one: Im not sure when it was added, I have watir.rb 1.194 # This is the main method for accessing a file field. Usually an HTML tag. # * how - symbol - how we access the field , :index, :id, :name etc # * what - string, int or re , what we are looking for, # # returns a FileField object # # Typical Usage # # ie.file_field(:id, 'up_1') # access the file upload field with an ID of up_1 # ie.file_field(:name, 'upload') # access the file upload field with a name of upload # ie.file_field(:index, 2) # access the second file upload on the page ( 1 based, so the first field is accessed with :index,1) # def file_field( how , what ) return FileField.new(self , how, what) end -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 27 July 2005 08:51 To: wtr-general at rubyforge.org Subject: [Wtr-general] Watir::FactoryMethods#file_fields Is there some reason that there is no method Watir::FactoryMethods#file_fields (like Watir::FactoryMethods#buttons)? It would be nice to have it. Zeljko _______________________________________________ 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 zeljko.filipin at gmail.com Thu Jul 28 01:45:50 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 28 Jul 2005 07:45:50 +0200 Subject: [Wtr-general] RE: image.to_s In-Reply-To: <009701c592fc$d2efec40$6400a8c0@NewDell> Message-ID: <42e870dc.09fc33b3.6278.ffffe856@mx.gmail.com> Thanks again. About "type: image" - after I thought about it, I also think it should not be removed. Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Thursday, July 28, 2005 12:45 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RE: image.to_s I added alt as a property and included it in the to_s As to why the typs= 'image' is available. It's a standard property from IE on input controls, like button, etc. I just continued it on. Maybe this is something that should be removed? At some point I think we want to add a elements iterator that goes through all the items on the page, and I guess having the type available may help Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 21 July 2005 07:17 To: wtr-general at rubyforge.org Subject: [Wtr-general] RE: image.to_s And also required property "alt" is not displayed. Zeljko -----Original Message----- From: Zeljko Filipin [mailto:zeljko.filipin at gmail.com] Sent: Thursday, July 21, 2005 3:08 PM To: wtr-general at rubyforge.org Subject: image.to_s I am making unit tests for my methods and I found a bug in watir. I wanted to display properties of an image. HTML is valid according to http://validator.w3.org/. ---------- HTML: images

flower

---------- IRB: irb require 'watir' ie = Watir::IE.attach(:title, //) ie.images.each { |i| puts i.to_s } ---------- OUTPUT: type: image id: name: value: disabled: false src: file:///C:/Documents%20and%20Settings/zfilipin/My%20Documents/Tests/test /htm l/images/flower.png file date: 07/13/2005 file size: 1252 width: 20 height: 20 ---------- Then I added missing id, name, value, and disabled, so img tag is: flower ---------- OUTPUT: ... id: image_id name: image_name value: image_value disabled: true ... ---------- So where is the bug? My page is no longer valid. I get this error messages: "there is no attribute name/value/disabled". Even if I change my page back to html 4.01 I get error messages: "there is no attribute value/disabled". So, name was once alloved, but value and disabled not even then. What is the purpose of displaying properties that do not exist? Not related to this, but what is purpose of "type: image" in output? Can it be anything else except image? Zeljko _______________________________________________ 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 zeljko.filipin at gmail.com Thu Jul 28 03:26:14 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 28 Jul 2005 09:26:14 +0200 Subject: [Wtr-general] RE: image.to_s Message-ID: <42e88866.1ab0c98a.286d.ffff87e5@mx.gmail.com> I have tried "new and improved" image.to_s and "brand new" ie.file_fields and they work just fine! :) But... Why "value" and "disabled" are not removed from image.to_s? Is there any reason that it should be there? Unit tests report this failures (I think they were reported also the last time I installed watir, but I forgot to report it then): 1) Failure: test_http_errors(TC_Navigate) [C:/watir_bonus/unitTests/../unittests/navigate_test.rb:51]: exception expected but none was thrown. 2) Failure: test_button_frames(TC_show_frames) [C:/watir_bonus/unitTests/../unittests/frame_test.rb:113:in `capture_and_compare' C:/watir_bonus/unitTests/../unittests/frame_test.rb:125:in `test_button_frames']: <"there are 2 frames\nframe index: 0 name: buttonFrame\nframe index: 1 name: buttonFrame2\n"> expected but was <"there are 2 frames\nframe index: 1 name: buttonFrame\nframe index: 2 name: buttonFrame2\n">. 3) Failure: test_iframes(TC_show_frames) [C:/watir_bonus/unitTests/../unittests/frame_test.rb:113:in `capture_and_compare' C:/watir_bonus/unitTests/../unittests/frame_test.rb:133:in `test_iframes']: <"there are 2 frames\nframe index: 0 name: senderFrame\nframe index: 1 name: receiverFrame\n"> expected but was <"there are 2 frames\nframe index: 1 name: senderFrame\nframe index: 2 name: receiverFrame\n">. 4) Failure: test_show_nested_frames(TC_show_frames) [C:/watir_bonus/unitTests/../unittests/frame_test.rb:113:in `capture_and_compare' C:/watir_bonus/unitTests/../unittests/frame_test.rb:117:in `test_show_nested_frames']: <"there are 2 frames\nframe index: 0 name: nestedFrame\nframe index: 1 name: nestedFrame2\n"> expected but was <"there are 2 frames\nframe index: 1 name: nestedFrame\nframe index: 2 name: nestedFrame2\n">. 182 tests, 1060 assertions, 4 failures, 0 errors Zeljko -----Original Message----- From: Zeljko Filipin [mailto:zeljko.filipin at gmail.com] Sent: Thursday, July 28, 2005 7:46 AM To: 'wtr-general at rubyforge.org' Subject: RE: [Wtr-general] RE: image.to_s Thanks again. About "type: image" - after I thought about it, I also think it should not be removed. Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Thursday, July 28, 2005 12:45 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RE: image.to_s I added alt as a property and included it in the to_s As to why the typs= 'image' is available. It's a standard property from IE on input controls, like button, etc. I just continued it on. Maybe this is something that should be removed? At some point I think we want to add a elements iterator that goes through all the items on the page, and I guess having the type available may help Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 21 July 2005 07:17 To: wtr-general at rubyforge.org Subject: [Wtr-general] RE: image.to_s And also required property "alt" is not displayed. Zeljko -----Original Message----- From: Zeljko Filipin [mailto:zeljko.filipin at gmail.com] Sent: Thursday, July 21, 2005 3:08 PM To: wtr-general at rubyforge.org Subject: image.to_s I am making unit tests for my methods and I found a bug in watir. I wanted to display properties of an image. HTML is valid according to http://validator.w3.org/. ---------- HTML: images

flower

---------- IRB: irb require 'watir' ie = Watir::IE.attach(:title, //) ie.images.each { |i| puts i.to_s } ---------- OUTPUT: type: image id: name: value: disabled: false src: file:///C:/Documents%20and%20Settings/zfilipin/My%20Documents/Tests/test /htm l/images/flower.png file date: 07/13/2005 file size: 1252 width: 20 height: 20 ---------- Then I added missing id, name, value, and disabled, so img tag is: flower ---------- OUTPUT: ... id: image_id name: image_name value: image_value disabled: true ... ---------- So where is the bug? My page is no longer valid. I get this error messages: "there is no attribute name/value/disabled". Even if I change my page back to html 4.01 I get error messages: "there is no attribute value/disabled". So, name was once alloved, but value and disabled not even then. What is the purpose of displaying properties that do not exist? Not related to this, but what is purpose of "type: image" in output? Can it be anything else except image? Zeljko _______________________________________________ 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 zeljko.filipin at gmail.com Thu Jul 28 03:37:09 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 28 Jul 2005 09:37:09 +0200 Subject: [Wtr-general] Sending Email Notifications In-Reply-To: Message-ID: <42e88af4.6b348833.73c1.ffffb0f9@mx.gmail.com> This is something that should work. If it does not work, let me know. require 'net/smtp' Net::SMTP.start( 'your.smtp.server', 25, 'mail.from.domain', 'Your Account', 'Your Password', :plain) do |smtp| smtp.send_message "From: Your Name \nTo: Destination Address \nSubject: test message\n\nbody of message", 'from at address', 'to at address' end Zeljko ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tuyet Cong-Ton-Nu Sent: Thursday, July 28, 2005 4:18 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Sending Email Notifications Thanks for the good link, Zeljko. I also tried using the example from the link but didn't get anything through. Probably didn't enter the right SMTP. Would you mind posting an example that worked for you? Thanks! From tuyet.ctn at mscibarra.com Thu Jul 21 17:40:40 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Thu, 21 Jul 2005 14:40:40 -0700 Subject: [Wtr-general] Switching from Segue's SilkTest to WATIR? Message-ID: Sure, here is the attachment to be added to the Wiki page. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050721/5671ea10/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: Comparisons between Watir and SilkTest.doc Type: application/msword Size: 33280 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050721/5671ea10/attachment.doc From Jan.Montano at thomson.com Thu Jul 28 01:38:48 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Thu, 28 Jul 2005 13:38:48 +0800 Subject: [Wtr-general] bug? Message-ID: Is this a bug or what? written below is a part of my code. it just runs a number of threads. However when i make it to loop 3 or more times. it returns an error in freeride, but not in scite editor. attached below is the console output for the error. Please advise. thanks. #no error 2.times do thread_number = thread_number + 1 threads << Thread.new{perform_t1_test(thread_number)} end #returns an error 3.times do thread_number = thread_number + 1 threads << Thread.new{perform_t1_test(thread_number)} end <> Jan M. Montano QA Lead / Developer Regional Application Development Thomson (Philippines) Corporation 18th Floor Ayala Life - FGU Center 6811 Ayala Ave., Makati City Philippines (632) 878-5890 -------------- next part -------------- A non-text attachment was scrubbed... Name: bug.bmp Type: image/bmp Size: 40970 bytes Desc: bug.bmp Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050728/eb87ba41/attachment.bmp From Mark_Cain at rl.gov Thu Jul 28 10:48:49 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Thu, 28 Jul 2005 07:48:49 -0700 Subject: [Wtr-general] Sending Email Notifications Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D2FB@EX5V.rl.gov> I got the same error when I first ran it. I changed the case of .send to .Send and it worked and continues to work. You might try retyping that line yourself making sure our capitalize .Send. I know it shouldn't matter but sometimes it does. I also ran it line by line in IRB and could see where it was really bombing-that is where changing the case of .Send worked first. Hope this helps, --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tuyet Cong-Ton-Nu Sent: Wednesday, July 27, 2005 7:16 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Sending Email Notifications Thanks, Mark. I did find CDOEX.DLL on my machine, so I copied your code and ran it, but got this error: C:\watir\watir>email2.rb C:/watir/watir/email2.rb:20:in `method_missing': Send (WIN32OLERuntimeError) OLE error code:80040220 in CDO.Message.1 The "SendUsing" configuration value is invalid. HRESULT error code:0x80020009 Exception occurred. from C:/watir/watir/email2.rb:20 Here is my code: require 'watir' include Watir require 'win32ole' cdoMail = WIN32OLE.new("CDO.Message") cdoMail.From = "test at mscibarra.com" cdoMail.To = "tuyet.ctn at mscibarra.com " cdoMail.Subject = "This is a test" cdoMail.TextBody = "This is a test" cdoMail.Send cdoMail = nil -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050728/31c301dd/attachment.html From shaorobics at gmail.com Thu Jul 28 10:55:13 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Thu, 28 Jul 2005 10:55:13 -0400 Subject: [Wtr-general] where's the tarball again? Message-ID: <593b9ae80507280755212dcb5c@mail.gmail.com> Hey I remember someone told me where to get the tarball of the latest updates...but I forgot where it is and I can't find it... Does the current fix support "value" for radio buttons yet? Thanks Shao From mkelly at elevenwireless.com Thu Jul 28 11:27:39 2005 From: mkelly at elevenwireless.com (Michael Kelly) Date: Thu, 28 Jul 2005 08:27:39 -0700 Subject: [Wtr-general] (possibly) Introducing WatirMaker Message-ID: <640C9D8653C87C44AB5F00F91A91FE210D4B25@edison.elevenwireless.com> Dang. I was operating on the assumption that it was written in Ruby. There's no reason why it couldn't be written in Ruby, no? -=michael=- -- Michael Kelly Sr. Software Engineer Eleven Wireless Inc. - The Possibilities are Wireless http://www.elevenwireless.com -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Scott Hanselman Sent: Wednesday, July 27, 2005 6:30 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] (possibly) Introducing WatirMaker C# on .NET 1.1. ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, July 27, 2005 3:02 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] (possibly) Introducing WatirMaker Way cool! I couldnt see anywhere - what language is it written in? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Scott Hanselman Sent: 27 July 2005 04:43 To: wtr-general at rubyforge.org Subject: [Wtr-general] (possibly) Introducing WatirMaker Hey folks, I got tired of waiting and wrote a 0.1 version of what I'm calling WatirMaker. It's puts IE on a string and attempts to record a Watir script from events. Take a look here http://www.hanselman.com/blog/IntroducingWatirMakerRecordingForRubybased Watir.aspx - there is a flash movie demonstration of what I've accomplished in a few hours. I'd like to get a few people together to take this to a 0.9 release. Note, though, it's probably less about understanding Watir and more about understanding COM and the HTMLDocumentEvents2 classes. If you've got deep COM and IE object model and you're in this group, I'd like to talk to you. If it's successful the Watir community can have it and maybe Bret would bless it. ;) Scott Hanselman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050728/54a9f00d/attachment.html From scott at hanselman.com Thu Jul 28 12:39:57 2005 From: scott at hanselman.com (Scott Hanselman) Date: Thu, 28 Jul 2005 09:39:57 -0700 Subject: [Wtr-general] (possibly) Introducing WatirMaker In-Reply-To: <640C9D8653C87C44AB5F00F91A91FE210D4B25@edison.elevenwireless.com> Message-ID: It uses some pretty hairy COM Interop ConnectionPoint/EventSink stuff. You're welcome to try. Scott _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Michael Kelly Sent: Thursday, July 28, 2005 8:28 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] (possibly) Introducing WatirMaker Dang. I was operating on the assumption that it was written in Ruby. There's no reason why it couldn't be written in Ruby, no? -=michael=- -- Michael Kelly Sr. Software Engineer Eleven Wireless Inc. - The Possibilities are Wireless http://www.elevenwireless.com -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Scott Hanselman Sent: Wednesday, July 27, 2005 6:30 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] (possibly) Introducing WatirMaker C# on .NET 1.1. _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, July 27, 2005 3:02 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] (possibly) Introducing WatirMaker Way cool! I couldnt see anywhere - what language is it written in? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Scott Hanselman Sent: 27 July 2005 04:43 To: wtr-general at rubyforge.org Subject: [Wtr-general] (possibly) Introducing WatirMaker Hey folks, I got tired of waiting and wrote a 0.1 version of what I'm calling WatirMaker. It's puts IE on a string and attempts to record a Watir script from events. Take a look here http://www.hanselman.com/blog/IntroducingWatirMakerRecordingForRubybasedWati r.aspx - there is a flash movie demonstration of what I've accomplished in a few hours. I'd like to get a few people together to take this to a 0.9 release. Note, though, it's probably less about understanding Watir and more about understanding COM and the HTMLDocumentEvents2 classes. If you've got deep COM and IE object model and you're in this group, I'd like to talk to you. If it's successful the Watir community can have it and maybe Bret would bless it. ;) Scott Hanselman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050728/e5764a57/attachment.html From paul.rogers at shaw.ca Thu Jul 28 12:45:27 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 28 Jul 2005 10:45:27 -0600 Subject: [Wtr-general] wair for start explorer to load In-Reply-To: Message-ID: <003101c59393$c264aae0$6400a8c0@NewDell> I think this will be fixed in the next release. There was a bug in attach where it wouldn't wait Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jan.Montano at thomson.com Sent: 27 July 2005 21:51 To: wtr-general at rubyforge.org Subject: [Wtr-general] wair for start explorer to load Hi! What's the best approach to know if the explorer has finished loading. sometimes, 1 sec is not enough. it depends. What's the best way to do this? Pls look at the code below. w.winsystem("start explorer #{thread_number}_#{i}.html ") sleep(1) $ie_array[i] = IE.attach(:title , "#{thread_number}_#{i}" ) if the html is not yet loaded, attach will fail unable to locate object _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Thu Jul 28 12:52:11 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 28 Jul 2005 10:52:11 -0600 Subject: [Wtr-general] RE: image.to_s In-Reply-To: <42e88866.1ab0c98a.286d.ffff87e5@mx.gmail.com> Message-ID: <003701c59394$b3bc6b80$6400a8c0@NewDell> Ive just looked at the docs and value isnt supported on images, but disabled is. "Sets or retrieves the value that indicates whether the user can interact with the object." from http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/img.as p?frame=true I suspect that it would be used like this ( I havent tried it, pure speculation) So when the disabled is set to true, the onClick would be ignored. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 28 July 2005 01:26 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RE: image.to_s I have tried "new and improved" image.to_s and "brand new" ie.file_fields and they work just fine! :) But... Why "value" and "disabled" are not removed from image.to_s? Is there any reason that it should be there? Unit tests report this failures (I think they were reported also the last time I installed watir, but I forgot to report it then): 1) Failure: test_http_errors(TC_Navigate) [C:/watir_bonus/unitTests/../unittests/navigate_test.rb:51]: exception expected but none was thrown. 2) Failure: test_button_frames(TC_show_frames) [C:/watir_bonus/unitTests/../unittests/frame_test.rb:113:in `capture_and_compare' C:/watir_bonus/unitTests/../unittests/frame_test.rb:125:in `test_button_frames']: <"there are 2 frames\nframe index: 0 name: buttonFrame\nframe index: 1 name: buttonFrame2\n"> expected but was <"there are 2 frames\nframe index: 1 name: buttonFrame\nframe index: 2 name: buttonFrame2\n">. 3) Failure: test_iframes(TC_show_frames) [C:/watir_bonus/unitTests/../unittests/frame_test.rb:113:in `capture_and_compare' C:/watir_bonus/unitTests/../unittests/frame_test.rb:133:in `test_iframes']: <"there are 2 frames\nframe index: 0 name: senderFrame\nframe index: 1 name: receiverFrame\n"> expected but was <"there are 2 frames\nframe index: 1 name: senderFrame\nframe index: 2 name: receiverFrame\n">. 4) Failure: test_show_nested_frames(TC_show_frames) [C:/watir_bonus/unitTests/../unittests/frame_test.rb:113:in `capture_and_compare' C:/watir_bonus/unitTests/../unittests/frame_test.rb:117:in `test_show_nested_frames']: <"there are 2 frames\nframe index: 0 name: nestedFrame\nframe index: 1 name: nestedFrame2\n"> expected but was <"there are 2 frames\nframe index: 1 name: nestedFrame\nframe index: 2 name: nestedFrame2\n">. 182 tests, 1060 assertions, 4 failures, 0 errors Zeljko -----Original Message----- From: Zeljko Filipin [mailto:zeljko.filipin at gmail.com] Sent: Thursday, July 28, 2005 7:46 AM To: 'wtr-general at rubyforge.org' Subject: RE: [Wtr-general] RE: image.to_s Thanks again. About "type: image" - after I thought about it, I also think it should not be removed. Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Thursday, July 28, 2005 12:45 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RE: image.to_s I added alt as a property and included it in the to_s As to why the typs= 'image' is available. It's a standard property from IE on input controls, like button, etc. I just continued it on. Maybe this is something that should be removed? At some point I think we want to add a elements iterator that goes through all the items on the page, and I guess having the type available may help Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 21 July 2005 07:17 To: wtr-general at rubyforge.org Subject: [Wtr-general] RE: image.to_s And also required property "alt" is not displayed. Zeljko -----Original Message----- From: Zeljko Filipin [mailto:zeljko.filipin at gmail.com] Sent: Thursday, July 21, 2005 3:08 PM To: wtr-general at rubyforge.org Subject: image.to_s I am making unit tests for my methods and I found a bug in watir. I wanted to display properties of an image. HTML is valid according to http://validator.w3.org/. ---------- HTML: images

flower

---------- IRB: irb require 'watir' ie = Watir::IE.attach(:title, //) ie.images.each { |i| puts i.to_s } ---------- OUTPUT: type: image id: name: value: disabled: false src: file:///C:/Documents%20and%20Settings/zfilipin/My%20Documents/Tests/test /htm l/images/flower.png file date: 07/13/2005 file size: 1252 width: 20 height: 20 ---------- Then I added missing id, name, value, and disabled, so img tag is: flower ---------- OUTPUT: ... id: image_id name: image_name value: image_value disabled: true ... ---------- So where is the bug? My page is no longer valid. I get this error messages: "there is no attribute name/value/disabled". Even if I change my page back to html 4.01 I get error messages: "there is no attribute value/disabled". So, name was once alloved, but value and disabled not even then. What is the purpose of displaying properties that do not exist? Not related to this, but what is purpose of "type: image" in output? Can it be anything else except image? Zeljko _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Thu Jul 28 13:06:22 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 28 Jul 2005 11:06:22 -0600 Subject: [Wtr-general] RE: image.to_s In-Reply-To: <003701c59394$b3bc6b80$6400a8c0@NewDell> Message-ID: <004501c59396$ae0f1a50$6400a8c0@NewDell> This was the case, and Ive added a unit test for disabled images. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: 28 July 2005 10:52 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RE: image.to_s Ive just looked at the docs and value isnt supported on images, but disabled is. "Sets or retrieves the value that indicates whether the user can interact with the object." from http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/img.as p?frame=true I suspect that it would be used like this ( I havent tried it, pure speculation) So when the disabled is set to true, the onClick would be ignored. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 28 July 2005 01:26 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RE: image.to_s I have tried "new and improved" image.to_s and "brand new" ie.file_fields and they work just fine! :) But... Why "value" and "disabled" are not removed from image.to_s? Is there any reason that it should be there? Unit tests report this failures (I think they were reported also the last time I installed watir, but I forgot to report it then): 1) Failure: test_http_errors(TC_Navigate) [C:/watir_bonus/unitTests/../unittests/navigate_test.rb:51]: exception expected but none was thrown. 2) Failure: test_button_frames(TC_show_frames) [C:/watir_bonus/unitTests/../unittests/frame_test.rb:113:in `capture_and_compare' C:/watir_bonus/unitTests/../unittests/frame_test.rb:125:in `test_button_frames']: <"there are 2 frames\nframe index: 0 name: buttonFrame\nframe index: 1 name: buttonFrame2\n"> expected but was <"there are 2 frames\nframe index: 1 name: buttonFrame\nframe index: 2 name: buttonFrame2\n">. 3) Failure: test_iframes(TC_show_frames) [C:/watir_bonus/unitTests/../unittests/frame_test.rb:113:in `capture_and_compare' C:/watir_bonus/unitTests/../unittests/frame_test.rb:133:in `test_iframes']: <"there are 2 frames\nframe index: 0 name: senderFrame\nframe index: 1 name: receiverFrame\n"> expected but was <"there are 2 frames\nframe index: 1 name: senderFrame\nframe index: 2 name: receiverFrame\n">. 4) Failure: test_show_nested_frames(TC_show_frames) [C:/watir_bonus/unitTests/../unittests/frame_test.rb:113:in `capture_and_compare' C:/watir_bonus/unitTests/../unittests/frame_test.rb:117:in `test_show_nested_frames']: <"there are 2 frames\nframe index: 0 name: nestedFrame\nframe index: 1 name: nestedFrame2\n"> expected but was <"there are 2 frames\nframe index: 1 name: nestedFrame\nframe index: 2 name: nestedFrame2\n">. 182 tests, 1060 assertions, 4 failures, 0 errors Zeljko -----Original Message----- From: Zeljko Filipin [mailto:zeljko.filipin at gmail.com] Sent: Thursday, July 28, 2005 7:46 AM To: 'wtr-general at rubyforge.org' Subject: RE: [Wtr-general] RE: image.to_s Thanks again. About "type: image" - after I thought about it, I also think it should not be removed. Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Thursday, July 28, 2005 12:45 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RE: image.to_s I added alt as a property and included it in the to_s As to why the typs= 'image' is available. It's a standard property from IE on input controls, like button, etc. I just continued it on. Maybe this is something that should be removed? At some point I think we want to add a elements iterator that goes through all the items on the page, and I guess having the type available may help Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 21 July 2005 07:17 To: wtr-general at rubyforge.org Subject: [Wtr-general] RE: image.to_s And also required property "alt" is not displayed. Zeljko -----Original Message----- From: Zeljko Filipin [mailto:zeljko.filipin at gmail.com] Sent: Thursday, July 21, 2005 3:08 PM To: wtr-general at rubyforge.org Subject: image.to_s I am making unit tests for my methods and I found a bug in watir. I wanted to display properties of an image. HTML is valid according to http://validator.w3.org/. ---------- HTML: images

flower

---------- IRB: irb require 'watir' ie = Watir::IE.attach(:title, //) ie.images.each { |i| puts i.to_s } ---------- OUTPUT: type: image id: name: value: disabled: false src: file:///C:/Documents%20and%20Settings/zfilipin/My%20Documents/Tests/test /htm l/images/flower.png file date: 07/13/2005 file size: 1252 width: 20 height: 20 ---------- Then I added missing id, name, value, and disabled, so img tag is: flower ---------- OUTPUT: ... id: image_id name: image_name value: image_value disabled: true ... ---------- So where is the bug? My page is no longer valid. I get this error messages: "there is no attribute name/value/disabled". Even if I change my page back to html 4.01 I get error messages: "there is no attribute value/disabled". So, name was once alloved, but value and disabled not even then. What is the purpose of displaying properties that do not exist? Not related to this, but what is purpose of "type: image" in output? Can it be anything else except image? Zeljko _______________________________________________ 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 Thu Jul 28 13:38:54 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 28 Jul 2005 11:38:54 -0600 Subject: [Wtr-general] Script non-responsive In-Reply-To: <82E50B4081E1354AAC1F917519B13F0D4E0236@OLENICK-01-EX.atlarge.net> Message-ID: <004c01c5939b$396213b0$6400a8c0@NewDell> I just tried search.aol.com and I get a similar thing, even when attaching to it ie=Watir::IE.attach(:title , /S/) and it just hangs. Stack trace after a ctrl C IRB::Abort: abort then interrupt!! from c:/ruby/lib/ruby/1.8/irb.rb:81:in `irb_abort' from c:/ruby/lib/ruby/1.8/irb.rb:241:in `signal_handle' from c:/ruby/lib/ruby/1.8/irb.rb:66:in `start' from c:/ruby/lib/ruby/1.8/irb.rb:65:in `call' from ../watir.rb:1402:in `sleep' from ../watir.rb:1402:in `wait' from ../watir.rb:1113:in `attach_init' from ../watir.rb:1104:in `attach' from (irb):2 I have some time now, so I'll take a look Paul -----Original Message----- From: Daniel Kurtz [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Daniel Kurtz Sent: 27 July 2005 11:12 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Script non-responsive Actually, I hadn't even noticed the typo in your code . In any event, the problem is not that Watir can't locate or click the button. The issue is that, once clicked, control never comes back to Watir from the page/browser, so the script hangs. Daniel Kurtz Consultant Olenick & Associates 205 W. Wacker Drive Suite 2010 Chicago, IL 60606 312-332-0096 www.olenick.com _____ From: wtr-general-bounces at rubyforge.org on behalf of Peter Chau Sent: Wed 7/27/2005 11:55 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Script non-responsive Sorry there was a typo on my part... try ie.image(:src, /searchbutton_5_0.gif/).click -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 6872 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050728/9ec94cae/attachment.bin From mkelly at elevenwireless.com Thu Jul 28 13:59:26 2005 From: mkelly at elevenwireless.com (Michael Kelly) Date: Thu, 28 Jul 2005 10:59:26 -0700 Subject: [Wtr-general] (possibly) Introducing WatirMaker Message-ID: <640C9D8653C87C44AB5F00F91A91FE210D4B27@edison.elevenwireless.com> Could you post a sample of the hairy-ness? -=michael=- -- Michael Kelly Sr. Software Engineer Eleven Wireless Inc. - The Possibilities are Wireless http://www.elevenwireless.com -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Scott Hanselman Sent: Thursday, July 28, 2005 9:40 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] (possibly) Introducing WatirMaker It uses some pretty hairy COM Interop ConnectionPoint/EventSink stuff. You're welcome to try. Scott ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Michael Kelly Sent: Thursday, July 28, 2005 8:28 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] (possibly) Introducing WatirMaker Dang. I was operating on the assumption that it was written in Ruby. There's no reason why it couldn't be written in Ruby, no? -=michael=- -- Michael Kelly Sr. Software Engineer Eleven Wireless Inc. - The Possibilities are Wireless http://www.elevenwireless.com -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Scott Hanselman Sent: Wednesday, July 27, 2005 6:30 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] (possibly) Introducing WatirMaker C# on .NET 1.1. ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, July 27, 2005 3:02 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] (possibly) Introducing WatirMaker Way cool! I couldnt see anywhere - what language is it written in? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Scott Hanselman Sent: 27 July 2005 04:43 To: wtr-general at rubyforge.org Subject: [Wtr-general] (possibly) Introducing WatirMaker Hey folks, I got tired of waiting and wrote a 0.1 version of what I'm calling WatirMaker. It's puts IE on a string and attempts to record a Watir script from events. Take a look here http://www.hanselman.com/blog/IntroducingWatirMakerRecordingForRubybased Watir.aspx - there is a flash movie demonstration of what I've accomplished in a few hours. I'd like to get a few people together to take this to a 0.9 release. Note, though, it's probably less about understanding Watir and more about understanding COM and the HTMLDocumentEvents2 classes. If you've got deep COM and IE object model and you're in this group, I'd like to talk to you. If it's successful the Watir community can have it and maybe Bret would bless it. ;) Scott Hanselman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050728/d0a14fc6/attachment.html From paul.rogers at shaw.ca Thu Jul 28 14:03:59 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 28 Jul 2005 12:03:59 -0600 Subject: [Wtr-general] Script non-responsive In-Reply-To: <004c01c5939b$396213b0$6400a8c0@NewDell> Message-ID: <005c01c5939e$bad56430$6400a8c0@NewDell> This page at aol has several iframes that get updated with the latest 'hot searches' My guess is that the problem is something to do with these. I altered the wait method, and I got my problm sorted - maybe you could try this and see if it works for you? Paul ## wait with a maximum wait time # This method is used internally to cause an execution to stop until the page has loaded in Internet Explorer. def wait( noSleep = false ) begin @down_load_time=0 pageLoadStart = Time.now @pageHasReloaded= false s= Spinner.new(@enable_spinner) while @ie.busy @pageHasReloaded = true sleep 0.02 s.spin end s.reverse #log "wait: readystate=" + @ie.readyState.to_s puts "wait: readystate=" + @ie.readyState.to_s @max_wait_time = 30 # seconds time_waited=0 sleep_time = 0.02 until @ie.readyState == READYSTATE_COMPLETE or time_waited > @max_wait_time @pageHasReloaded = true sleep sleep_time time_waited += sleep_time puts "Time waited so far: #{time_waited}" s.spin end sleep 0.02 puts "wait: document.readystate=" + @ie.document.readyState.to_s until @ie.document.readyState == "complete" or time_waited > @max_wait_time sleep sleep_time time_waited += sleep_time puts "Time waited so far: #{time_waited}" s.spin end if @ie.document.frames.length > 1 begin 0.upto @ie.document.frames.length-1 do |i| until @ie.document.frames[i.to_s].document.readyState == "complete" sleep 0.02 s.spin end @url_list << @ie.document.frames[i.to_s].document.url unless url_list.include?(@ie.document.frames[i.to_s].document.url) end rescue=>e @logger.warn 'frame error in wait' + e.to_s + "\n" + e.backtrace.join("\n") end else @url_list << @ie.document.url unless @url_list.include?(@ie.document.url) end @down_load_time = Time.now - pageLoadStart run_error_checks print "\b" unless @enable_spinner == false s=nil rescue WIN32OLERuntimeError => e @logger.warn 'runtime error in wait ' # + e.to_s end sleep 0.01 sleep @defaultSleepTime unless noSleep == true end -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] Sent: 28 July 2005 11:39 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Script non-responsive I just tried search.aol.com and I get a similar thing, even when attaching to it ie=Watir::IE.attach(:title , /S/) and it just hangs. Stack trace after a ctrl C IRB::Abort: abort then interrupt!! from c:/ruby/lib/ruby/1.8/irb.rb:81:in `irb_abort' from c:/ruby/lib/ruby/1.8/irb.rb:241:in `signal_handle' from c:/ruby/lib/ruby/1.8/irb.rb:66:in `start' from c:/ruby/lib/ruby/1.8/irb.rb:65:in `call' from ../watir.rb:1402:in `sleep' from ../watir.rb:1402:in `wait' from ../watir.rb:1113:in `attach_init' from ../watir.rb:1104:in `attach' from (irb):2 I have some time now, so I'll take a look Paul -----Original Message----- From: Daniel Kurtz [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Daniel Kurtz Sent: 27 July 2005 11:12 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Script non-responsive Actually, I hadn't even noticed the typo in your code . In any event, the problem is not that Watir can't locate or click the button. The issue is that, once clicked, control never comes back to Watir from the page/browser, so the script hangs. Daniel Kurtz Consultant Olenick & Associates 205 W. Wacker Drive Suite 2010 Chicago, IL 60606 312-332-0096 www.olenick.com _____ From: wtr-general-bounces at rubyforge.org on behalf of Peter Chau Sent: Wed 7/27/2005 11:55 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Script non-responsive Sorry there was a typo on my part... try ie.image(:src, /searchbutton_5_0.gif/).click -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 14384 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050728/e6eb52cc/attachment.bin From tuyet.ctn at mscibarra.com Thu Jul 28 14:35:27 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Thu, 28 Jul 2005 11:35:27 -0700 Subject: [Wtr-general] Sending Email Notifications Message-ID: Thanks, Mark. I did as you suggest and executed each line in irb, and here it what I got, still an error even with capital S and small s: irb(main):014:0> cdoMail = WIN32OLE.new("CDO.Message") => # irb(main):015:0> cdoMail.From = "test at mscibarra.com" => "test at mscibarra.com" irb(main):016:0> cdoMail.To = "tuyet.ctn at mscibarra.com" => "tuyet.ctn at mscibarra.com" irb(main):017:0> cdoMail.Subject = "This is a test" => "This is a test" irb(main):018:0> cdoMail.TextBody = "This is a test - body" => "This is a test - body" irb(main):019:0> cdoMail.Send WIN32OLERuntimeError: Send OLE error code:80040220 in CDO.Message.1 The "SendUsing" configuration value is invalid. HRESULT error code:0x80020009 Exception occurred. from (irb):19:in `method_missing' from (irb):19 from ?:0 irb(main):020:0> cdoMail.send ArgumentError: no method name given from (irb):20:in `send' from (irb):20 from ?:0 irb(main):021:0> cdoMail.Send WIN32OLERuntimeError: Send OLE error code:80040220 in CDO.Message.1 The "SendUsing" configuration value is invalid. HRESULT error code:0x80020009 Exception occurred. from (irb):21:in `method_missing' from (irb):21 from ?:0 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050728/0d5f3012/attachment.html From tuyet.ctn at mscibarra.com Thu Jul 28 15:04:39 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Thu, 28 Jul 2005 12:04:39 -0700 Subject: [Wtr-general] Sending Email Notifications Message-ID: Thanks Zeljko. I copied your code and made the appropriate changes and got this error. Is this a security issue from the SMTP server that I sent the email to? C:\watir\watir>email.rb c:/ruby/lib/ruby/1.8/net/protocol.rb:83:in `initialize': No connection could be made because the target machine actively refused it. - connect(2) (Errno::ECONNREFUSED) from c:/ruby/lib/ruby/1.8/net/protocol.rb:83:in `new' from c:/ruby/lib/ruby/1.8/net/protocol.rb:83:in `connect' from c:/ruby/lib/ruby/1.8/net/protocol.rb:82:in `timeout' from c:/ruby/lib/ruby/1.8/timeout.rb:55:in `timeout' from c:/ruby/lib/ruby/1.8/net/protocol.rb:82:in `connect' from c:/ruby/lib/ruby/1.8/net/protocol.rb:64:in `initialize' from c:/ruby/lib/ruby/1.8/net/smtp.rb:393:in `open' from c:/ruby/lib/ruby/1.8/net/smtp.rb:393:in `do_start' from c:/ruby/lib/ruby/1.8/net/smtp.rb:378:in `start' from c:/ruby/lib/ruby/1.8/net/smtp.rb:316:in `start' from C:/watir/watir/email.rb:21 Here is my code: require 'net/smtp' Net::SMTP.start( 'ISIS', 25, 'msci', 'tuyet', 'password', :plain) do |smtp| smtp.send_message "From: Tuyet \nTo: Destination Address \nSubject: test message\n\nbody of message", 'tuyet.ctn at mscibarra.com', 'tuyet.ctn at mscibarra.com' end -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050728/ed1b1670/attachment.html From tuyet.ctn at mscibarra.com Thu Jul 28 15:09:10 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Thu, 28 Jul 2005 12:09:10 -0700 Subject: [Wtr-general] wair for start explorer to load Message-ID: I have the same problem and was going to post this, so thanks Jan for doing it first. I use sleep statements but have to tweak the time because it varies how long it takes to load the page. I hope the fix will be in the next release. I use a lot of attach statements and the scripts fail if there isn't enough time. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050728/4df78997/attachment.html From tuyet.ctn at mscibarra.com Thu Jul 28 15:32:25 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Thu, 28 Jul 2005 12:32:25 -0700 Subject: [Wtr-general] Sending Email Notifications - Success Message-ID: OK, I figured out why it didn't work, the SMTP name was wrong. But it's working now. Here is the code that worked: require 'net/smtp' msgstr = "This is a test email message" # using block form of SMTP.start Net::SMTP.start('isis.msci.com', 25) do |smtp| smtp.send_message msgstr, "tuyet.ctn at mscibarra.com", ["tuyet.ctn at mscibarra.com", "tuyet.ctn at mscibarra.com"] end Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050728/f29b1b31/attachment.html From zeljko.filipin at gmail.com Thu Jul 28 15:33:22 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 28 Jul 2005 21:33:22 +0200 Subject: [Wtr-general] where's the tarball again? In-Reply-To: <593b9ae80507280755212dcb5c@mail.gmail.com> Message-ID: <42e932d0.12893e3f.0f6c.1d17@mx.gmail.com> At this page there is link Download tarball : http://rubyforge.org/cgi-bin/viewcvs.cgi/?cvsroot=wtr (http://rubyforge.org/projects/wtr/ > SCM > Browse CVS Repository). Or just click http://rubyforge.org/cgi-bin/viewcvs.cgi/cvs_root.tar.gz?tarball=1&cvsroot=w tr to download it. Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Shao Kang Tat Sent: Thursday, July 28, 2005 4:55 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] where's the tarball again? Hey I remember someone told me where to get the tarball of the latest updates...but I forgot where it is and I can't find it... Does the current fix support "value" for radio buttons yet? Thanks Shao _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From zeljko.filipin at gmail.com Thu Jul 28 15:41:59 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 28 Jul 2005 21:41:59 +0200 Subject: [Wtr-general] RE: image.to_s In-Reply-To: <004501c59396$ae0f1a50$6400a8c0@NewDell> Message-ID: <42e934d7.44098f4c.0f6c.23db@mx.gmail.com> Try to validate this html (http://validator.w3.org/) and it returns error 'there is no attribute "disabled"'. image

image

Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Thursday, July 28, 2005 7:06 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RE: image.to_s This was the case, and Ive added a unit test for disabled images. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: 28 July 2005 10:52 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RE: image.to_s Ive just looked at the docs and value isnt supported on images, but disabled is. "Sets or retrieves the value that indicates whether the user can interact with the object." from http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/img.as p?frame=true I suspect that it would be used like this ( I havent tried it, pure speculation) So when the disabled is set to true, the onClick would be ignored. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 28 July 2005 01:26 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RE: image.to_s I have tried "new and improved" image.to_s and "brand new" ie.file_fields and they work just fine! :) But... Why "value" and "disabled" are not removed from image.to_s? Is there any reason that it should be there? Unit tests report this failures (I think they were reported also the last time I installed watir, but I forgot to report it then): 1) Failure: test_http_errors(TC_Navigate) [C:/watir_bonus/unitTests/../unittests/navigate_test.rb:51]: exception expected but none was thrown. 2) Failure: test_button_frames(TC_show_frames) [C:/watir_bonus/unitTests/../unittests/frame_test.rb:113:in `capture_and_compare' C:/watir_bonus/unitTests/../unittests/frame_test.rb:125:in `test_button_frames']: <"there are 2 frames\nframe index: 0 name: buttonFrame\nframe index: 1 name: buttonFrame2\n"> expected but was <"there are 2 frames\nframe index: 1 name: buttonFrame\nframe index: 2 name: buttonFrame2\n">. 3) Failure: test_iframes(TC_show_frames) [C:/watir_bonus/unitTests/../unittests/frame_test.rb:113:in `capture_and_compare' C:/watir_bonus/unitTests/../unittests/frame_test.rb:133:in `test_iframes']: <"there are 2 frames\nframe index: 0 name: senderFrame\nframe index: 1 name: receiverFrame\n"> expected but was <"there are 2 frames\nframe index: 1 name: senderFrame\nframe index: 2 name: receiverFrame\n">. 4) Failure: test_show_nested_frames(TC_show_frames) [C:/watir_bonus/unitTests/../unittests/frame_test.rb:113:in `capture_and_compare' C:/watir_bonus/unitTests/../unittests/frame_test.rb:117:in `test_show_nested_frames']: <"there are 2 frames\nframe index: 0 name: nestedFrame\nframe index: 1 name: nestedFrame2\n"> expected but was <"there are 2 frames\nframe index: 1 name: nestedFrame\nframe index: 2 name: nestedFrame2\n">. 182 tests, 1060 assertions, 4 failures, 0 errors Zeljko -----Original Message----- From: Zeljko Filipin [mailto:zeljko.filipin at gmail.com] Sent: Thursday, July 28, 2005 7:46 AM To: 'wtr-general at rubyforge.org' Subject: RE: [Wtr-general] RE: image.to_s Thanks again. About "type: image" - after I thought about it, I also think it should not be removed. Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Thursday, July 28, 2005 12:45 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RE: image.to_s I added alt as a property and included it in the to_s As to why the typs= 'image' is available. It's a standard property from IE on input controls, like button, etc. I just continued it on. Maybe this is something that should be removed? At some point I think we want to add a elements iterator that goes through all the items on the page, and I guess having the type available may help Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 21 July 2005 07:17 To: wtr-general at rubyforge.org Subject: [Wtr-general] RE: image.to_s And also required property "alt" is not displayed. Zeljko -----Original Message----- From: Zeljko Filipin [mailto:zeljko.filipin at gmail.com] Sent: Thursday, July 21, 2005 3:08 PM To: wtr-general at rubyforge.org Subject: image.to_s I am making unit tests for my methods and I found a bug in watir. I wanted to display properties of an image. HTML is valid according to http://validator.w3.org/. ---------- HTML: images

flower

---------- IRB: irb require 'watir' ie = Watir::IE.attach(:title, //) ie.images.each { |i| puts i.to_s } ---------- OUTPUT: type: image id: name: value: disabled: false src: file:///C:/Documents%20and%20Settings/zfilipin/My%20Documents/Tests/test /htm l/images/flower.png file date: 07/13/2005 file size: 1252 width: 20 height: 20 ---------- Then I added missing id, name, value, and disabled, so img tag is: flower ---------- OUTPUT: ... id: image_id name: image_name value: image_value disabled: true ... ---------- So where is the bug? My page is no longer valid. I get this error messages: "there is no attribute name/value/disabled". Even if I change my page back to html 4.01 I get error messages: "there is no attribute value/disabled". So, name was once alloved, but value and disabled not even then. What is the purpose of displaying properties that do not exist? Not related to this, but what is purpose of "type: image" in output? Can it be anything else except image? Zeljko _______________________________________________ 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 Tim.Feltham at orionhealth.com Thu Jul 28 17:26:42 2005 From: Tim.Feltham at orionhealth.com (Tim Feltham) Date: Fri, 29 Jul 2005 09:26:42 +1200 Subject: [Wtr-general] Modal Dialog with Select lists Message-ID: <0FDF67DB50EC904AAEA1B2A83A281050013A8B03@mail.orion.internal> Hello All, I've been having fun working with/evaluating WATIR and its looking pretty good. But our products have quite a few modal dialogs. I've got a simple ok,cancel dialog with the title "Microsoft Internet Explorer" to work with Thread.new { sleep 0.1; WindowHelper.new.push_confirm_button_ok } but on a more complex model dialog I haven't been able to even get the cancel button to work yet. I suspect its because the name of the pop up window is "New Document Details Selection -- Web Page Dialog" instead of "Microsoft Internet Explorer". This modal dialog that I'm trying to automate has three select lists. The third one is disabled until specific items have been selected from the first two select lists. It then has a text box that holds a date (automatically filled so don't care about this for now), and OK and Cancel buttons. WindowHelper doesn't have any methods for setting values in select lists or for grabbing pop ups that are not titled "Microsoft Internet Explorer". What do I need to do to get this to work. I've had a bit of a look at autoit and presume I need to add some code into WinHelper.rb. I've only been using WATIR and Ruby for about a week though. Thanks, Tim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050729/f48e5f69/attachment.html From Tim.Feltham at orionhealth.com Thu Jul 28 17:38:23 2005 From: Tim.Feltham at orionhealth.com (Tim Feltham) Date: Fri, 29 Jul 2005 09:38:23 +1200 Subject: [Wtr-general] (possibly) Introducing WatirMaker Message-ID: <0FDF67DB50EC904AAEA1B2A83A281050013A8B04@mail.orion.internal> Hey Scott, WatirMaker looks really cool. I'm happy to do some testing of the app if you want. I don't have .NET installed though so I'd need an executable file. Cheers, Tim ________________________________ From: wtr-general-bounces at rubyforge.org on behalf of Scott Hanselman Sent: Fri 29/07/2005 4:39 a.m. To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] (possibly) Introducing WatirMaker It uses some pretty hairy COM Interop ConnectionPoint/EventSink stuff. You're welcome to try. Scott ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Michael Kelly Sent: Thursday, July 28, 2005 8:28 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] (possibly) Introducing WatirMaker Dang. I was operating on the assumption that it was written in Ruby. There's no reason why it couldn't be written in Ruby, no? -=michael=- -- Michael Kelly Sr. Software Engineer Eleven Wireless Inc. - The Possibilities are Wireless http://www.elevenwireless.com -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Scott Hanselman Sent: Wednesday, July 27, 2005 6:30 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] (possibly) Introducing WatirMaker C# on .NET 1.1. ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, July 27, 2005 3:02 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] (possibly) Introducing WatirMaker Way cool! I couldnt see anywhere - what language is it written in? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Scott Hanselman Sent: 27 July 2005 04:43 To: wtr-general at rubyforge.org Subject: [Wtr-general] (possibly) Introducing WatirMaker Hey folks, I got tired of waiting and wrote a 0.1 version of what I'm calling WatirMaker. It's puts IE on a string and attempts to record a Watir script from events. Take a look here http://www.hanselman.com/blog/IntroducingWatirMakerRecordingForRubybasedWatir.aspx - there is a flash movie demonstration of what I've accomplished in a few hours. I'd like to get a few people together to take this to a 0.9 release. Note, though, it's probably less about understanding Watir and more about understanding COM and the HTMLDocumentEvents2 classes. If you've got deep COM and IE object model and you're in this group, I'd like to talk to you. If it's successful the Watir community can have it and maybe Bret would bless it. ;) Scott Hanselman -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 9636 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050729/0f8f20d1/attachment.bin From paul.rogers at shaw.ca Thu Jul 28 18:00:51 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 28 Jul 2005 16:00:51 -0600 Subject: [Wtr-general] Modal Dialog with Select lists In-Reply-To: <0FDF67DB50EC904AAEA1B2A83A281050013A8B03@mail.orion.internal> Message-ID: <008701c593bf$d17b9120$6400a8c0@NewDell> Watir cant access these modal dialogs, various people have tried diferent things. Maybe you can do something with auto-it - I personally havent tried. If you get some code working, please post it to the list Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tim Feltham Sent: 28 July 2005 15:27 To: wtr-general at rubyforge.org Subject: [Wtr-general] Modal Dialog with Select lists Hello All, I've been having fun working with/evaluating WATIR and its looking pretty good. But our products have quite a few modal dialogs. I've got a simple ok,cancel dialog with the title "Microsoft Internet Explorer" to work with Thread.new { sleep 0.1; WindowHelper.new.push_confirm_button_ok } but on a more complex model dialog I haven't been able to even get the cancel button to work yet. I suspect its because the name of the pop up window is "New Document Details Selection -- Web Page Dialog" instead of "Microsoft Internet Explorer". This modal dialog that I'm trying to automate has three select lists. The third one is disabled until specific items have been selected from the first two select lists. It then has a text box that holds a date (automatically filled so don't care about this for now), and OK and Cancel buttons. WindowHelper doesn't have any methods for setting values in select lists or for grabbing pop ups that are not titled "Microsoft Internet Explorer". What do I need to do to get this to work. I've had a bit of a look at autoit and presume I need to add some code into WinHelper.rb. I've only been using WATIR and Ruby for about a week though. Thanks, Tim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050728/1e171d37/attachment.html From paul.rogers at shaw.ca Thu Jul 28 18:06:48 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 28 Jul 2005 16:06:48 -0600 Subject: [Wtr-general] RE: image.to_s In-Reply-To: <42e934d7.44098f4c.0f6c.23db@mx.gmail.com> Message-ID: <009101c593c0$a6c3c960$6400a8c0@NewDell> It may well be an IE extension, although the docs ( http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/dis abled_2.asp?frame=true ) say it belongs to the w3c dom spec. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 28 July 2005 13:42 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RE: image.to_s Try to validate this html (http://validator.w3.org/) and it returns error 'there is no attribute "disabled"'. image

image

Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Thursday, July 28, 2005 7:06 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RE: image.to_s This was the case, and Ive added a unit test for disabled images. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: 28 July 2005 10:52 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RE: image.to_s Ive just looked at the docs and value isnt supported on images, but disabled is. "Sets or retrieves the value that indicates whether the user can interact with the object." from http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/img.as p?frame=true I suspect that it would be used like this ( I havent tried it, pure speculation) So when the disabled is set to true, the onClick would be ignored. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 28 July 2005 01:26 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RE: image.to_s I have tried "new and improved" image.to_s and "brand new" ie.file_fields and they work just fine! :) But... Why "value" and "disabled" are not removed from image.to_s? Is there any reason that it should be there? Unit tests report this failures (I think they were reported also the last time I installed watir, but I forgot to report it then): 1) Failure: test_http_errors(TC_Navigate) [C:/watir_bonus/unitTests/../unittests/navigate_test.rb:51]: exception expected but none was thrown. 2) Failure: test_button_frames(TC_show_frames) [C:/watir_bonus/unitTests/../unittests/frame_test.rb:113:in `capture_and_compare' C:/watir_bonus/unitTests/../unittests/frame_test.rb:125:in `test_button_frames']: <"there are 2 frames\nframe index: 0 name: buttonFrame\nframe index: 1 name: buttonFrame2\n"> expected but was <"there are 2 frames\nframe index: 1 name: buttonFrame\nframe index: 2 name: buttonFrame2\n">. 3) Failure: test_iframes(TC_show_frames) [C:/watir_bonus/unitTests/../unittests/frame_test.rb:113:in `capture_and_compare' C:/watir_bonus/unitTests/../unittests/frame_test.rb:133:in `test_iframes']: <"there are 2 frames\nframe index: 0 name: senderFrame\nframe index: 1 name: receiverFrame\n"> expected but was <"there are 2 frames\nframe index: 1 name: senderFrame\nframe index: 2 name: receiverFrame\n">. 4) Failure: test_show_nested_frames(TC_show_frames) [C:/watir_bonus/unitTests/../unittests/frame_test.rb:113:in `capture_and_compare' C:/watir_bonus/unitTests/../unittests/frame_test.rb:117:in `test_show_nested_frames']: <"there are 2 frames\nframe index: 0 name: nestedFrame\nframe index: 1 name: nestedFrame2\n"> expected but was <"there are 2 frames\nframe index: 1 name: nestedFrame\nframe index: 2 name: nestedFrame2\n">. 182 tests, 1060 assertions, 4 failures, 0 errors Zeljko -----Original Message----- From: Zeljko Filipin [mailto:zeljko.filipin at gmail.com] Sent: Thursday, July 28, 2005 7:46 AM To: 'wtr-general at rubyforge.org' Subject: RE: [Wtr-general] RE: image.to_s Thanks again. About "type: image" - after I thought about it, I also think it should not be removed. Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Thursday, July 28, 2005 12:45 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RE: image.to_s I added alt as a property and included it in the to_s As to why the typs= 'image' is available. It's a standard property from IE on input controls, like button, etc. I just continued it on. Maybe this is something that should be removed? At some point I think we want to add a elements iterator that goes through all the items on the page, and I guess having the type available may help Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 21 July 2005 07:17 To: wtr-general at rubyforge.org Subject: [Wtr-general] RE: image.to_s And also required property "alt" is not displayed. Zeljko -----Original Message----- From: Zeljko Filipin [mailto:zeljko.filipin at gmail.com] Sent: Thursday, July 21, 2005 3:08 PM To: wtr-general at rubyforge.org Subject: image.to_s I am making unit tests for my methods and I found a bug in watir. I wanted to display properties of an image. HTML is valid according to http://validator.w3.org/. ---------- HTML: images

flower

---------- IRB: irb require 'watir' ie = Watir::IE.attach(:title, //) ie.images.each { |i| puts i.to_s } ---------- OUTPUT: type: image id: name: value: disabled: false src: file:///C:/Documents%20and%20Settings/zfilipin/My%20Documents/Tests/test /htm l/images/flower.png file date: 07/13/2005 file size: 1252 width: 20 height: 20 ---------- Then I added missing id, name, value, and disabled, so img tag is: flower ---------- OUTPUT: ... id: image_id name: image_name value: image_value disabled: true ... ---------- So where is the bug? My page is no longer valid. I get this error messages: "there is no attribute name/value/disabled". Even if I change my page back to html 4.01 I get error messages: "there is no attribute value/disabled". So, name was once alloved, but value and disabled not even then. What is the purpose of displaying properties that do not exist? Not related to this, but what is purpose of "type: image" in output? Can it be anything else except image? Zeljko _______________________________________________ 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 tuyet.ctn at mscibarra.com Thu Jul 28 19:15:12 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Thu, 28 Jul 2005 16:15:12 -0700 Subject: [Wtr-general] How to get value out of table? Message-ID: I am able to see that this 3rd table has 10 columns and 24 rows. irb(main):122:0> puts frame1.table(:index, 3).column_count 10 => nil irb(main):123:0> puts frame1.table(:index, 3).row_count 24 => nil How do I get the value of each cell for every row and every column? Here are some things I've tried: irb(main):127:0> puts frame1.table(:index, 3)[3].value => nil (there should have been some value here) irb(main):094:0> puts frame1.table(:index, 3)[24] type: id: name: value: disabled: false => nil Why is value and name blank here? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050728/604c860a/attachment.html From huemach at Cybersoft-VN.com Thu Jul 28 21:45:16 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Fri, 29 Jul 2005 08:45:16 +0700 Subject: [Wtr-general] Help Object Repository? Message-ID: <99DF6C0285C2CE4C99F02D7838571966017B7754@hue.cybersoft-vn.com> Dear ALL, Does anyone have define all object in one file and these object reference by other test cases like [QuickTest Pro] or [Silktest] object repository # ObjectRepository require 'watir' include Watir @ie = IE.new @obj_leftFrame = @ie.frame("leftframe") @obj_btnSubmit = @ie.frame("rightframe").button(:name, "Submit") I create test case # testcase .. @ie('http://localhost:8080') ... @obj_btnSubmit.click But it don't work Thank you for help From shaorobics at gmail.com Thu Jul 28 21:59:40 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Thu, 28 Jul 2005 21:59:40 -0400 Subject: [Wtr-general] How to get value out of table? In-Reply-To: References: Message-ID: <593b9ae805072818593fc61be4@mail.gmail.com> did you try something like this? t = frame1.table(:index, 3) puts t[1][24].text.strip Shao From huemach at Cybersoft-VN.com Thu Jul 28 22:08:31 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Fri, 29 Jul 2005 09:08:31 +0700 Subject: [Wtr-general] Get Radio Button Text? Message-ID: <99DF6C0285C2CE4C99F02D7838571966017B7771@hue.cybersoft-vn.com> Dear All How can I get this Radio Button Text (in this case is Stepper or C/D) The HTML code as below ..
... Thank for help Hue From bret at pettichord.com Thu Jul 28 18:20:55 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 28 Jul 2005 17:20:55 -0500 Subject: [Wtr-general] RE: Click OK button on Popup Dialog? In-Reply-To: <42E792BF.9040305@qantom.com> References: <72799cd70507270645edf31ce@mail.gmail.com> <99DF6C0285C2CE4C99F02D7838571966017B6FDA@hue.cybersoft-vn.com> <72799cd70507270645edf31ce@mail.gmail.com> Message-ID: <5.1.0.14.2.20050728171818.02df7de8@127.0.0.1> I've been trying to understand this all better myself and once i do, i think i want to rework the code that we have so that users don't have to think about threads or processes -- that really should be handled by the tool. Like i said, i'm still trying to track down all the facts -- but at this point it seems to me that WindowHelper (and thus AutoIT) can be called from the same process (different thread) wheras winclicker needs to be in a separate process. True? Bret At 08:57 AM 7/27/2005, Raghu Venkataramana wrote: >Chris McMahon wrote: > >>On 7/26/05, Scott Hanselman wrote: >> >> >>>Why do folks do all this tricky stuff with Winclicker and starting new >>>instances of the ruby process? >>> >>>I do this: >>> >>> Thread.new { sleep 0.1; WindowHelper.new.push_alert_button } >>> ie.link(:id, "whatever").click #this causes an Alert() >>> >> >>I discovered this myself independently: the way to handle popups is >>in another thread. > >>Those unfamiliar with threads accomplish the same >>thing by handling popups in another process altogether. >Not entirely true. What we found here was that most of the times, when a >modal >dialog pops up, the calling process and all its child threads wait for the >modal dialog to be dismissed >before continuing executing. Spawning another process solves this problem. >In fact, in one of >my experiments I found that even when a child thread opens a modal dialog, >the owner thread >also waits till the dialog is dismissed. ( I was trying to check if it is >possible to call some of the >potential dialog creators like clicking etc., could be started off on a >separate thread) > >>(Some silly >>people have handled popups with an entirely different script running >>in another scripting *language* altogether...) >>-Chris >> >>_______________________________________________ >>Wtr-general mailing list >>Wtr-general at rubyforge.org >>http://rubyforge.org/mailman/listinfo/wtr-general >> >> > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Thu Jul 28 22:40:45 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 28 Jul 2005 20:40:45 -0600 Subject: [Wtr-general] RE: Click OK button on Popup Dialog? In-Reply-To: <5.1.0.14.2.20050728171818.02df7de8@127.0.0.1> Message-ID: <00a301c593e6$ebac35a0$6400a8c0@NewDell> Ive been doing the same. I posted some code to deal with file Requesters around the 15th June. It seems this one needs to be in a separate process. I'll need to do some more testing to be really sure. I think there may also be differences between win xp and win 2k Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 28 July 2005 16:21 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] RE: Click OK button on Popup Dialog? I've been trying to understand this all better myself and once i do, i think i want to rework the code that we have so that users don't have to think about threads or processes -- that really should be handled by the tool. Like i said, i'm still trying to track down all the facts -- but at this point it seems to me that WindowHelper (and thus AutoIT) can be called from the same process (different thread) wheras winclicker needs to be in a separate process. True? Bret At 08:57 AM 7/27/2005, Raghu Venkataramana wrote: >Chris McMahon wrote: > >>On 7/26/05, Scott Hanselman wrote: >> >> >>>Why do folks do all this tricky stuff with Winclicker and starting >>>new instances of the ruby process? >>> >>>I do this: >>> >>> Thread.new { sleep 0.1; WindowHelper.new.push_alert_button } >>> ie.link(:id, "whatever").click #this causes an Alert() >>> >> >>I discovered this myself independently: the way to handle popups is >>in another thread. > >>Those unfamiliar with threads accomplish the same >>thing by handling popups in another process altogether. >Not entirely true. What we found here was that most of the times, when >a >modal >dialog pops up, the calling process and all its child threads wait for the >modal dialog to be dismissed >before continuing executing. Spawning another process solves this problem. >In fact, in one of >my experiments I found that even when a child thread opens a modal dialog, >the owner thread >also waits till the dialog is dismissed. ( I was trying to check if it is >possible to call some of the >potential dialog creators like clicking etc., could be started off on a >separate thread) > >>(Some silly >>people have handled popups with an entirely different script running >>in another scripting *language* altogether...) -Chris >> >>_______________________________________________ >>Wtr-general mailing list >>Wtr-general at rubyforge.org >>http://rubyforge.org/mailman/listinfo/wtr-general >> >> > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From raghu at qantom.com Thu Jul 28 22:41:57 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Fri, 29 Jul 2005 08:11:57 +0530 Subject: [Wtr-general] RE: Click OK button on Popup Dialog? In-Reply-To: <5.1.0.14.2.20050728171818.02df7de8@127.0.0.1> References: <72799cd70507270645edf31ce@mail.gmail.com> <99DF6C0285C2CE4C99F02D7838571966017B6FDA@hue.cybersoft-vn.com> <72799cd70507270645edf31ce@mail.gmail.com> <5.1.0.14.2.20050728171818.02df7de8@127.0.0.1> Message-ID: <42E99775.2080803@qantom.com> Bret Pettichord wrote: > I've been trying to understand this all better myself and once i do, i > think i want to rework the code that we have so that users don't have > to think about threads or processes -- that really should be handled > by the tool. > > Like i said, i'm still trying to track down all the facts -- but at > this point it seems to me that WindowHelper (and thus AutoIT) can be > called from the same process (different thread) wheras winclicker > needs to be in a separate process. True? > > Bret I haven't tried AutoIT but WinClicker works _only_ when called from a separate process. > > At 08:57 AM 7/27/2005, Raghu Venkataramana wrote: > >> Chris McMahon wrote: >> >>> On 7/26/05, Scott Hanselman wrote: >>> >>> >>>> Why do folks do all this tricky stuff with Winclicker and starting new >>>> instances of the ruby process? >>>> >>>> I do this: >>>> >>>> Thread.new { sleep 0.1; WindowHelper.new.push_alert_button } >>>> ie.link(:id, "whatever").click #this causes an Alert() >>>> >>> >>> I discovered this myself independently: the way to handle popups is >>> in another thread. >> >> >>> Those unfamiliar with threads accomplish the same >>> thing by handling popups in another process altogether. >> >> Not entirely true. What we found here was that most of the times, >> when a modal >> dialog pops up, the calling process and all its child threads wait >> for the modal dialog to be dismissed >> before continuing executing. Spawning another process solves this >> problem. In fact, in one of >> my experiments I found that even when a child thread opens a modal >> dialog, the owner thread >> also waits till the dialog is dismissed. ( I was trying to check if >> it is possible to call some of the >> potential dialog creators like clicking etc., could be started off on >> a separate thread) >> >>> (Some silly >>> people have handled popups with an entirely different script running >>> in another scripting *language* altogether...) >>> -Chris >>> >>> _______________________________________________ >>> Wtr-general mailing list >>> Wtr-general at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/wtr-general >>> >>> >> >> _______________________________________________ >> Wtr-general mailing list >> Wtr-general at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-general > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From raghu at qantom.com Thu Jul 28 22:53:44 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Fri, 29 Jul 2005 08:23:44 +0530 Subject: [Wtr-general] Help Object Repository? In-Reply-To: <99DF6C0285C2CE4C99F02D7838571966017B7754@hue.cybersoft-vn.com> References: <99DF6C0285C2CE4C99F02D7838571966017B7754@hue.cybersoft-vn.com> Message-ID: <42E99A38.2060503@qantom.com> W are currently in the process of migrating a fairly large set of testcases from Quicktest pro to Watir. The job also involves converting the objects that Quicktest uses into an equivalent that Watir could use. We are using Quicktests's descriptive programming model and Qantom.org's XML Repository. We plan to be ready with a framework that will allow Watir to use the XML repository by Mid-August time frame. Once ready, using objects in Watir will be more managable. For example a script to search for watir in google would be: Repository("MainBrowser").goto "http://www.google.com" Repository("google_search_edit").set "Watir" Repository("google_search_btn").click To take a quick look at how the XML Repository works for Quicktest(also a sneak preview of what's coming up for Watir), please visit http://qantom.shubharaghu.com/html/dor_parser.html and read through the tutorials page. Thanks Raghu Hue Mach Dieu wrote: >Dear ALL, >Does anyone have define all object in one file and these object >reference by other test cases like [QuickTest Pro] or [Silktest] object >repository > ># ObjectRepository >require 'watir' >include Watir > >@ie = IE.new >@obj_leftFrame = @ie.frame("leftframe") >@obj_btnSubmit = @ie.frame("rightframe").button(:name, "Submit") > >I create test case ># testcase > >.. >@ie('http://localhost:8080') >... >@obj_btnSubmit.click > > >But it don't work > >Thank you for help > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > From Tim.Feltham at orionhealth.com Fri Jul 29 02:53:36 2005 From: Tim.Feltham at orionhealth.com (Tim Feltham) Date: Fri, 29 Jul 2005 18:53:36 +1200 Subject: [Wtr-general] Modal Dialog with Select lists Message-ID: <0FDF67DB50EC904AAEA1B2A83A281050013A8B0E@mail.orion.internal> With the help of autoit and AU3Info.exe, in IRB I've managed to capture the pop up window, confirm that a disabled drop down list is disabled, and show and hide the items in the drop down list. I haven't been able to select any items in the list, send a down to move down the opened drop down list or click the OK or Cancel button. AU3Info.exe tells me that the pop up is a TridentDlgFrame. IRB code so far require 'win32ole' autoit = WIN32OLE.new('AutoItX3.Control') autoit.WinWaitActive "New Document Details Selection -- Web Page Dialog" autoit.ControlCommand("New Document Details Selection -- Web Page Dialog", "", "22", "IsEnabled", "") autoit.ControlCommand("New Document Details Selection -- Web Page Dialog", "", "8", "ShowDropDown", "") autoit.ControlCommand("New Document Details Selection -- Web Page Dialog", "", "8", "HideDropDown", "") ????autoit.Send( "{DOWN}") Tim ________________________________ From: wtr-general-bounces at rubyforge.org on behalf of Paul Rogers Sent: Fri 29/07/2005 10:00 a.m. To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Modal Dialog with Select lists Watir cant access these modal dialogs, various people have tried diferent things. Maybe you can do something with auto-it - I personally havent tried. If you get some code working, please post it to the list Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tim Feltham Sent: 28 July 2005 15:27 To: wtr-general at rubyforge.org Subject: [Wtr-general] Modal Dialog with Select lists Hello All, I've been having fun working with/evaluating WATIR and its looking pretty good. But our products have quite a few modal dialogs. I've got a simple ok,cancel dialog with the title "Microsoft Internet Explorer" to work with Thread.new { sleep 0.1; WindowHelper.new.push_confirm_button_ok } but on a more complex model dialog I haven't been able to even get the cancel button to work yet. I suspect its because the name of the pop up window is "New Document Details Selection -- Web Page Dialog" instead of "Microsoft Internet Explorer". This modal dialog that I'm trying to automate has three select lists. The third one is disabled until specific items have been selected from the first two select lists. It then has a text box that holds a date (automatically filled so don't care about this for now), and OK and Cancel buttons. WindowHelper doesn't have any methods for setting values in select lists or for grabbing pop ups that are not titled "Microsoft Internet Explorer". What do I need to do to get this to work. I've had a bit of a look at autoit and presume I need to add some code into WinHelper.rb. I've only been using WATIR and Ruby for about a week though. Thanks, Tim -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 6793 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050729/c5426f5f/attachment.bin From zeljko.filipin at gmail.com Fri Jul 29 03:39:10 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 29 Jul 2005 09:39:10 +0200 Subject: [Wtr-general] Get Radio Button Text? In-Reply-To: <99DF6C0285C2CE4C99F02D7838571966017B7771@hue.cybersoft-vn.com> Message-ID: <42e9dcec.3d28c44e.73c1.fffff2ea@mx.gmail.com> Text displayed near radio button is not really property of radio button, it is just some text in the near. But, in this case you can get all text from the cell with radio buttons like this (this is irb output) irb(main):014:0> ie.table(:index,1)[1][2].to_s => "Stepper C/D" You can split this text into array: irb(main):015:0> ie.table(:index,1)[1][2].to_s.split => ["Stepper", "C/D"] This will give you text near first and second radio button: irb(main):018:0> ie.table(:index,1)[1][2].to_s.split[0] => "Stepper" irb(main):017:0> ie.table(:index,1)[1][2].to_s.split[1] => "C/D" Not an elegant solution, but it is a start. I hope it helps. Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Hue Mach Dieu Sent: Friday, July 29, 2005 4:09 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Get Radio Button Text? Dear All How can I get this Radio Button Text (in this case is Stepper or C/D) The HTML code as below .. ... Thank for help Hue _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From shaorobics at gmail.com Fri Jul 29 09:52:22 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Fri, 29 Jul 2005 09:52:22 -0400 Subject: [Wtr-general] radio button support Message-ID: <593b9ae805072906522dfcb66b@mail.gmail.com> Hey, I got the latest version of watir from the tarball (thanks Zeljko). I currently have a page that has 3 radio buttons..here's the html: when I do: ie.radios.each do|r| puts r end I get the error: WIN32OLERuntimeError: Unknown property or method `value' if I just do a puts r.name I get blanks. Is there a current fix for this? Shao From sgtn2000 at gmail.com Fri Jul 29 10:03:28 2005 From: sgtn2000 at gmail.com (Sean Gallagher) Date: Fri, 29 Jul 2005 07:03:28 -0700 Subject: [Wtr-general] radio button support In-Reply-To: <593b9ae805072906522dfcb66b@mail.gmail.com> References: <593b9ae805072906522dfcb66b@mail.gmail.com> Message-ID: <7f8ae47d05072907035851f66c@mail.gmail.com> Check your HTML. The first line is missing a closing '>'. On 7/29/05, Shao Kang Tat wrote: > Hey, > > I got the latest version of watir from the tarball (thanks Zeljko). I > currently have a page that has 3 radio buttons..here's the html: > > > > > > when I do: > > ie.radios.each do|r| > puts r > end > > I get the error: WIN32OLERuntimeError: Unknown property or method `value' > > if I just do a puts r.name I get blanks. > > Is there a current fix for this? > > Shao > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From shaorobics at gmail.com Fri Jul 29 10:06:41 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Fri, 29 Jul 2005 10:06:41 -0400 Subject: [Wtr-general] radio button support In-Reply-To: <7f8ae47d05072907035851f66c@mail.gmail.com> References: <593b9ae805072906522dfcb66b@mail.gmail.com> <7f8ae47d05072907035851f66c@mail.gmail.com> Message-ID: <593b9ae80507290706251c07ca@mail.gmail.com> Actually it's not missing, I just deleted it by mistake :) I deleted extra stuff since the radios are inside a table. Here I'll put the exact html here :)
Date Time Equipment Code Alarm ON/OFF Alarm Type ALID Alarm Text
Type Stepper C/D
Type Stepper C/D
Associate with an Outlet
Associate with a WebSite
Associate with a Distributor
On 7/29/05, Sean Gallagher wrote: > Check your HTML. The first line is missing a closing '>'. > > On 7/29/05, Shao Kang Tat wrote: > > Hey, > > > > I got the latest version of watir from the tarball (thanks Zeljko). I > > currently have a page that has 3 radio buttons..here's the html: > > > > > > > > > > > > > when I do: > > > > ie.radios.each do|r| > > puts r > > end > > > > I get the error: WIN32OLERuntimeError: Unknown property or method `value' > > > > if I just do a puts r.name I get blanks. > > > > Is there a current fix for this? > > > > Shao > > > > _______________________________________________ > > 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 zeljko.filipin at gmail.com Fri Jul 29 10:15:43 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 29 Jul 2005 16:15:43 +0200 Subject: [Wtr-general] radio button support In-Reply-To: <593b9ae805072906522dfcb66b@mail.gmail.com> Message-ID: <42ea39e3.54bf6ad8.769c.2e92@mx.gmail.com> Well, it works for me. I also downloaded tarball today. HTML: IRB: C:\Documents and Settings\zfilipin\My Documents\Tests\test>irb irb(main):001:0> require 'watir' => true irb(main):002:0> ie = Watir::IE.attach(:title, //) => #], @defaultSleepTime=0.1, @activeObjectHighLightCol or="yellow", @pageHasReloaded=false, @enable_spinner=false, @url_list=["file://C:\\Documents and Settings\\zfilipin\\My Documents\\Tests\\test\\html\\r.htm" ], @logger=#>>, @typingspeed=0.08, @form=nil, @ie=#, @down_load_time=0.125> irb(main):003:0> ie.radios.each do|r| irb(main):004:1* puts r irb(main):005:1> end type: radio id: name: AssociateWith value: Outlet disabled: false type: radio id: name: AssociateWith value: WebSite disabled: false type: radio id: name: AssociateWith value: Distributor disabled: false => 0 Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Shao Kang Tat Sent: Friday, July 29, 2005 3:52 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] radio button support Hey, I got the latest version of watir from the tarball (thanks Zeljko). I currently have a page that has 3 radio buttons..here's the html: when I do: ie.radios.each do|r| puts r end I get the error: WIN32OLERuntimeError: Unknown property or method `value' if I just do a puts r.name I get blanks. Is there a current fix for this? Shao _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From shaorobics at gmail.com Fri Jul 29 10:22:22 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Fri, 29 Jul 2005 10:22:22 -0400 Subject: [Wtr-general] radio button support In-Reply-To: <42ea39e3.54bf6ad8.769c.2e92@mx.gmail.com> References: <593b9ae805072906522dfcb66b@mail.gmail.com> <42ea39e3.54bf6ad8.769c.2e92@mx.gmail.com> Message-ID: <593b9ae805072907221840b8a5@mail.gmail.com> ahh....it didn't install properly. :) I get the install error: c:/ruby/lib/ruby/1.8/FileUtils.rb:525:in `stat': No such file or directory - rdo c (Errno::ENOENT) from c:/ruby/lib/ruby/1.8/FileUtils.rb:525:in `stat' from c:/ruby/lib/ruby/1.8/FileUtils.rb:501:in `_copy_content' from c:/ruby/lib/ruby/1.8/FileUtils.rb:462:in `copy_content' from c:/ruby/lib/ruby/1.8/FileUtils.rb:461:in `preserve' from c:/ruby/lib/ruby/1.8/FileUtils.rb:461:in `copy_content' from c:/ruby/lib/ruby/1.8/FileUtils.rb:424:in `copy_file' from c:/ruby/lib/ruby/1.8/FileUtils.rb:383:in `cp_r' from c:/ruby/lib/ruby/1.8/FileUtils.rb:376:in `fu_each_src_dest' from c:/ruby/lib/ruby/1.8/FileUtils.rb:845:in `fu_each_src_dest0' from c:/ruby/lib/ruby/1.8/FileUtils.rb:845:in `fu_each_src_dest' from c:/ruby/lib/ruby/1.8/FileUtils.rb:376:in `cp_r' from C:/Documents and Settings/stat/Desktop/WatirTarball/wtr/watir/insta ll.rb:120:in `install' from C:/Documents and Settings/stat/Desktop/WatirTarball/wtr/watir/insta ll.rb:202 from C:/Documents and Settings/stat/Desktop/WatirTarball/wtr/watir/insta ll.rb:201:in `call' from c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.2.6-mswin32/lib/fox12/respo nder2.rb:57:in `onHandleMsg' from C:/Documents and Settings/stat/Desktop/WatirTarball/wtr/watir/insta ll.rb:211:in `run' from C:/Documents and Settings/stat/Desktop/WatirTarball/wtr/watir/insta ll.rb:211 any ideas? From zeljko.filipin at gmail.com Fri Jul 29 10:24:43 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 29 Jul 2005 16:24:43 +0200 Subject: [Wtr-general] radio button support In-Reply-To: <593b9ae80507290706251c07ca@mail.gmail.com> Message-ID: <42ea3bff.78b33de3.39c3.0ff7@mx.gmail.com> Well, I just tried this html also, and it works fine: irb(main):003:0> ie.radios.each do|r| irb(main):004:1* puts r irb(main):005:1> end type: radio id: name: AssociateWith value: Outlet disabled: false type: radio id: name: AssociateWith value: WebSite disabled: false type: radio id: name: AssociateWith value: Distributor disabled: false => 0 Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Shao Kang Tat Sent: Friday, July 29, 2005 4:07 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] radio button support Actually it's not missing, I just deleted it by mistake :) I deleted extra stuff since the radios are inside a table. Here I'll put the exact html here :)
Associate with an Outlet
Associate with a WebSite
Associate with a Distributor
On 7/29/05, Sean Gallagher wrote: > Check your HTML. The first line is missing a closing '>'. > > On 7/29/05, Shao Kang Tat wrote: > > Hey, > > > > I got the latest version of watir from the tarball (thanks Zeljko). I > > currently have a page that has 3 radio buttons..here's the html: > > > > > > > > > > > > > when I do: > > > > ie.radios.each do|r| > > puts r > > end > > > > I get the error: WIN32OLERuntimeError: Unknown property or method `value' > > > > if I just do a puts r.name I get blanks. > > > > Is there a current fix for this? > > > > Shao > > > > _______________________________________________ > > 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 shaorobics at gmail.com Fri Jul 29 10:30:17 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Fri, 29 Jul 2005 10:30:17 -0400 Subject: [Wtr-general] radio button support In-Reply-To: <42ea3bff.78b33de3.39c3.0ff7@mx.gmail.com> References: <593b9ae80507290706251c07ca@mail.gmail.com> <42ea3bff.78b33de3.39c3.0ff7@mx.gmail.com> Message-ID: <593b9ae805072907306b5b528f@mail.gmail.com> I'm following the steps to install watir from here: http://wtr.rubyforge.org/watir_user_guide.html ...I'm assuming I don't have to delete the existing folder in order to install on top of it? Seems like I'm not the only one to get this exact error..I've asked my QA head to try installing but he gets the same error too...Anything specific I need to do that's probably not listed? :) Shao From zeljko.filipin at gmail.com Fri Jul 29 10:41:31 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 29 Jul 2005 16:41:31 +0200 Subject: [Wtr-general] radio button support In-Reply-To: <593b9ae805072907306b5b528f@mail.gmail.com> Message-ID: <42ea3fef.63e5544b.3902.3d21@mx.gmail.com> Well, I never delete old watir before I install new one and it works fine. I just did it today. Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Shao Kang Tat Sent: Friday, July 29, 2005 4:30 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] radio button support I'm following the steps to install watir from here: http://wtr.rubyforge.org/watir_user_guide.html ...I'm assuming I don't have to delete the existing folder in order to install on top of it? Seems like I'm not the only one to get this exact error..I've asked my QA head to try installing but he gets the same error too...Anything specific I need to do that's probably not listed? :) Shao _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Fri Jul 29 13:23:36 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 29 Jul 2005 11:23:36 -0600 Subject: [Wtr-general] radio button support In-Reply-To: <593b9ae805072907221840b8a5@mail.gmail.com> Message-ID: <002601c59462$40c511d0$6400a8c0@NewDell> I think this error means the installer couldn't find an rdoc directory to install. Is there an rdoc dir in the tarball? If you just create an rdoc directory it should work. I'll add a bug to the tracker to fix the installer Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Shao Kang Tat Sent: 29 July 2005 08:22 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] radio button support ahh....it didn't install properly. :) I get the install error: c:/ruby/lib/ruby/1.8/FileUtils.rb:525:in `stat': No such file or directory - rdo c (Errno::ENOENT) from c:/ruby/lib/ruby/1.8/FileUtils.rb:525:in `stat' from c:/ruby/lib/ruby/1.8/FileUtils.rb:501:in `_copy_content' from c:/ruby/lib/ruby/1.8/FileUtils.rb:462:in `copy_content' from c:/ruby/lib/ruby/1.8/FileUtils.rb:461:in `preserve' from c:/ruby/lib/ruby/1.8/FileUtils.rb:461:in `copy_content' from c:/ruby/lib/ruby/1.8/FileUtils.rb:424:in `copy_file' from c:/ruby/lib/ruby/1.8/FileUtils.rb:383:in `cp_r' from c:/ruby/lib/ruby/1.8/FileUtils.rb:376:in `fu_each_src_dest' from c:/ruby/lib/ruby/1.8/FileUtils.rb:845:in `fu_each_src_dest0' from c:/ruby/lib/ruby/1.8/FileUtils.rb:845:in `fu_each_src_dest' from c:/ruby/lib/ruby/1.8/FileUtils.rb:376:in `cp_r' from C:/Documents and Settings/stat/Desktop/WatirTarball/wtr/watir/insta ll.rb:120:in `install' from C:/Documents and Settings/stat/Desktop/WatirTarball/wtr/watir/insta ll.rb:202 from C:/Documents and Settings/stat/Desktop/WatirTarball/wtr/watir/insta ll.rb:201:in `call' from c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.2.6-mswin32/lib/fox12/respo nder2.rb:57:in `onHandleMsg' from C:/Documents and Settings/stat/Desktop/WatirTarball/wtr/watir/insta ll.rb:211:in `run' from C:/Documents and Settings/stat/Desktop/WatirTarball/wtr/watir/insta ll.rb:211 any ideas? _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From shaorobics at gmail.com Fri Jul 29 13:33:56 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Fri, 29 Jul 2005 13:33:56 -0400 Subject: [Wtr-general] radio button support In-Reply-To: <002601c59462$40c511d0$6400a8c0@NewDell> References: <593b9ae805072907221840b8a5@mail.gmail.com> <002601c59462$40c511d0$6400a8c0@NewDell> Message-ID: <593b9ae80507291033411d19b8@mail.gmail.com> Actually, rdoc does exist: C:\ruby\lib\ruby\1.8\rdoc or should it exist else where too? From shaorobics at gmail.com Fri Jul 29 13:38:34 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Fri, 29 Jul 2005 13:38:34 -0400 Subject: [Wtr-general] radio button support In-Reply-To: <593b9ae80507291033411d19b8@mail.gmail.com> References: <593b9ae805072907221840b8a5@mail.gmail.com> <002601c59462$40c511d0$6400a8c0@NewDell> <593b9ae80507291033411d19b8@mail.gmail.com> Message-ID: <593b9ae805072910383a676f53@mail.gmail.com> oops, nevermind.....I added it to the tarball and it installs now :) From paul.rogers at shaw.ca Fri Jul 29 13:44:28 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 29 Jul 2005 11:44:28 -0600 Subject: [Wtr-general] radio button support In-Reply-To: <593b9ae80507291033411d19b8@mail.gmail.com> Message-ID: <002701c59465$2b4a6230$6400a8c0@NewDell> Sorry, I meant where you unpack the tarball, there should be a subdir called rdoc Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Shao Kang Tat Sent: 29 July 2005 11:34 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] radio button support Actually, rdoc does exist: C:\ruby\lib\ruby\1.8\rdoc or should it exist else where too? _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Fri Jul 29 13:47:25 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 29 Jul 2005 11:47:25 -0600 Subject: [Wtr-general] radio button support In-Reply-To: <593b9ae80507291033411d19b8@mail.gmail.com> Message-ID: <002801c59465$948c5640$6400a8c0@NewDell> Sorry, I meant where you unpack the tarball, there should be a subdir called rdoc Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Shao Kang Tat Sent: 29 July 2005 11:34 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] radio button support Actually, rdoc does exist: C:\ruby\lib\ruby\1.8\rdoc or should it exist else where too? _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From tuyet.ctn at mscibarra.com Fri Jul 29 13:47:59 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Fri, 29 Jul 2005 10:47:59 -0700 Subject: [Wtr-general] what is tarball? Message-ID: Are the latest/greatest fixes available for download or is it only for the developer at this point? I know 1.4 is in the works but have been seeing some patches/fixes that look like they are available. Sorry, if I don't understand how this works yet. Just want to make sure I am in the loop as far as downloading Any new fixes/enhancements. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050729/67a0066d/attachment.html From shaorobics at gmail.com Fri Jul 29 13:47:56 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Fri, 29 Jul 2005 13:47:56 -0400 Subject: [Wtr-general] radio button support In-Reply-To: <593b9ae805072910383a676f53@mail.gmail.com> References: <593b9ae805072907221840b8a5@mail.gmail.com> <002601c59462$40c511d0$6400a8c0@NewDell> <593b9ae80507291033411d19b8@mail.gmail.com> <593b9ae805072910383a676f53@mail.gmail.com> Message-ID: <593b9ae8050729104769139019@mail.gmail.com> Installation now successful, because the message appears, but when I try to access the radio I still get the same error..though it works for others who have been replying to this thread *scratches head* Below is the installation + script Could there be anything else wrong? C:\Documents and Settings\stat\Desktop\WatirTarball\wtr\watir>install.rb C:\Documents and Settings\stat\Desktop\WatirTarball\wtr\watir\watir.gif Going to install to C:\watir_bonus\ with startMenu=1 and desktop=1 Copying Files watir.rb -> c:\ruby\lib\ruby\site_ruby\1.8/watir.rb cp -r watir c:\ruby\lib\ruby\site_ruby\1.8 cp -r examples C:\watir_bonus\ cp -r unitTests C:\watir_bonus\ cp -r doc C:\watir_bonus\ cp -r rdoc C:\watir_bonus\ Creating start menu shortcuts Creating desktop shortcuts Installation Completed C:\Documents and Settings\stat\Desktop\WatirTarball\wtr\watir>irb irb(main):007:0> require 'watir' => true irb(main):008:0> include Watir => Object irb(main):009:0> ie = IE.attach(:title, //) => #], @logger=#>, @level=2, @datetime_format="%d-%b-%Y %H:%M:%S", @progname=nil> , @activeObjectHighLightColor="yellow", @enable_spinner=false, @url_list=[], @de faultSleepTime=0.1, @form=nil, @typingspeed=0.08, @ie=#> irb(main):010:0> ie.url => "http://radar.klickit.com/cbt/call%20log/new/associate/default.asp?s=1&kciRou te=CreateCallLog&kciStop=AssociateWith&CallLog.CallLogID=92" irb(main):011:0> ie.radios.each do|r| irb(main):012:1* puts r irb(main):013:1> end WIN32OLERuntimeError: Unknown property or method `value' HRESULT error code:0x80020006 Unknown name. from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2205:in `invoke' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2205:in `value' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2232:in `string_creator' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2248:in `to_s' from (irb):12:in `puts' from (irb):12 from (irb):11:in `each' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2382:in `upto' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2382:in `each' from (irb):11 from :0 irb(main):014:0> From paul.rogers at shaw.ca Fri Jul 29 13:57:09 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 29 Jul 2005 11:57:09 -0600 Subject: [Wtr-general] radio button support In-Reply-To: <593b9ae8050729104769139019@mail.gmail.com> Message-ID: <002e01c59466$f1436cb0$6400a8c0@NewDell> In a previous release some one else reported errors on radio buttons, something to do with value. I had never been able to reporuce, but the latest refactoring from bret has a rescue around the value, so it should return an empty string. What os, browser version are you using? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Shao Kang Tat Sent: 29 July 2005 11:48 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] radio button support Installation now successful, because the message appears, but when I try to access the radio I still get the same error..though it works for others who have been replying to this thread *scratches head* Below is the installation + script Could there be anything else wrong? C:\Documents and Settings\stat\Desktop\WatirTarball\wtr\watir>install.rb C:\Documents and Settings\stat\Desktop\WatirTarball\wtr\watir\watir.gif Going to install to C:\watir_bonus\ with startMenu=1 and desktop=1 Copying Files watir.rb -> c:\ruby\lib\ruby\site_ruby\1.8/watir.rb cp -r watir c:\ruby\lib\ruby\site_ruby\1.8 cp -r examples C:\watir_bonus\ cp -r unitTests C:\watir_bonus\ cp -r doc C:\watir_bonus\ cp -r rdoc C:\watir_bonus\ Creating start menu shortcuts Creating desktop shortcuts Installation Completed C:\Documents and Settings\stat\Desktop\WatirTarball\wtr\watir>irb irb(main):007:0> require 'watir' => true irb(main):008:0> include Watir => Object irb(main):009:0> ie = IE.attach(:title, //) => #], @logger=#>, @level=2, @datetime_format="%d-%b-%Y %H:%M:%S", @progname=nil> , @activeObjectHighLightColor="yellow", @enable_spinner=false, @url_list=[], @de faultSleepTime=0.1, @form=nil, @typingspeed=0.08, @ie=#> irb(main):010:0> ie.url => "http://radar.klickit.com/cbt/call%20log/new/associate/default.asp?s=1&k ciRou te=CreateCallLog&kciStop=AssociateWith&CallLog.CallLogID=92" irb(main):011:0> ie.radios.each do|r| irb(main):012:1* puts r irb(main):013:1> end WIN32OLERuntimeError: Unknown property or method `value' HRESULT error code:0x80020006 Unknown name. from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2205:in `invoke' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2205:in `value' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2232:in `string_creator' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2248:in `to_s' from (irb):12:in `puts' from (irb):12 from (irb):11:in `each' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2382:in `upto' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2382:in `each' from (irb):11 from :0 irb(main):014:0> _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Fri Jul 29 14:00:31 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 29 Jul 2005 12:00:31 -0600 Subject: [Wtr-general] what is tarball? In-Reply-To: Message-ID: <002f01c59467$694159c0$6400a8c0@NewDell> the tarball is a download of the latest code. ITs whats currently in cvs. There may be changes/bug fixes when the release is done. And the docs wont have been included. Since there is no compling etc it should generally be safe to use. There have been times when code that didnt work got checked in to cvs ( im certainly guily of that) If you feel comfortable with ruby/watir go ahead and download, if you are a bit unsure , wait for the release. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tuyet Cong-Ton-Nu Sent: 29 July 2005 11:48 To: wtr-general at rubyforge.org Subject: [Wtr-general] what is tarball? Are the latest/greatest fixes available for download or is it only for the developer at this point? I know 1.4 is in the works but have been seeing some patches/fixes that look like they are available. Sorry, if I don't understand how this works yet. Just want to make sure I am in the loop as far as downloading Any new fixes/enhancements. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050729/e0721a7a/attachment.html From jkohl at telusplanet.net Fri Jul 29 14:01:22 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Fri, 29 Jul 2005 12:01:22 -0600 Subject: [Wtr-general] what is tarball? In-Reply-To: Message-ID: <20050729180153.MNDP24317.priv-edtnes40.telusplanet.net@tintin> A tarball is a compressed file, like a zip file. The Watir user guide explains how to get a new tarball in the "Installation" section: http://wtr.rubyforge.org/watir_user_guide.html Latest Version This is the latest version that is currently being worked on by the Watir development team. It is on the cutting edge, so it may have problems that haven't been fixed yet, or partially completed new features. Unless you really want the latest and greatest version, it is recommended to use a regular Watir release. Download the Watir tarball from the WTR RubyForge site (click download tarball). Unzip the watir tarball to a working directory (ex. C:\). You will now have a watir folder containing the source code, unit tests, examples and documentation. The Download Tarball link is at the bottom of the page. -Jonathan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tuyet Cong-Ton-Nu Sent: July 29, 2005 11:48 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] what is tarball? Are the latest/greatest fixes available for download or is it only for the developer at this point? I know 1.4 is in the works but have been seeing some patches/fixes that look like they are available. Sorry, if I don't understand how this works yet. Just want to make sure I am in the loop as far as downloading Any new fixes/enhancements. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050729/8bb57426/attachment.html From shaorobics at gmail.com Fri Jul 29 14:02:56 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Fri, 29 Jul 2005 14:02:56 -0400 Subject: [Wtr-general] radio button support In-Reply-To: <002e01c59466$f1436cb0$6400a8c0@NewDell> References: <593b9ae8050729104769139019@mail.gmail.com> <002e01c59466$f1436cb0$6400a8c0@NewDell> Message-ID: <593b9ae805072911021b2d7bca@mail.gmail.com> Ok all's in working order now :) I'm using Windows XP and IE version 6.0.2900.2180 Actually, the value works fine for radios now (at least for this page). I'm even able to do: ie.radio(:value, "someVal").set Thanks a bunch :) Shao From tuyet.ctn at mscibarra.com Fri Jul 29 14:25:53 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Fri, 29 Jul 2005 11:25:53 -0700 Subject: [Wtr-general] what is tarball? Message-ID: Thanks Paul and Jonathan for the explanation. I did find the section that talked about tarball in the Watir User Guide. I have another important demo coming up next week, So I think I will wait until after that to download the latest code. Appreciate the info. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050729/8bba8e9f/attachment.html From christopher.mcmahon at gmail.com Fri Jul 29 18:54:34 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 29 Jul 2005 17:54:34 -0500 Subject: [Wtr-general] need install tests? Message-ID: <72799cd70507291554c1f72d1@mail.gmail.com> Hi... After reading about the problems with ie.radio() after installing the release version of Watir, I think there may be a problem with the latest versioned Watir installation. A colleague installed Watir this week on a clean XP machine and it was wacky. Files in the wrong place, stuff missing, etc. The main symptom was an error on ie.radio().set. To fix it, I downloaded from CVS head and ran that install.rb, and all was good. I don't think I've ever installed a released Water-- I always grab it from the head of CVS. And I don't really have a machine to do install testing on-- does anyone else? -Chris From tuyet.ctn at mscibarra.com Fri Jul 29 19:16:14 2005 From: tuyet.ctn at mscibarra.com (Tuyet Cong-Ton-Nu) Date: Fri, 29 Jul 2005 16:16:14 -0700 Subject: [Wtr-general] irb: Terminate Batch Job message? Message-ID: I don't know how to get back to irb when it gives me this message: Terminate batch job Y/N? It doesn't matter if I say Y or N, it terminates irb and sends me back to the command prompt which is not what I want when I select N. I want to be able to get back to the irb command line and continue on with my debugging. How do I do that? It's tiring to retype all the irb commands again to get to where I need to test. Maybe there is a better of doing this that I don't know about. Your suggestions are appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050729/eb8052ef/attachment.html From Tim.Feltham at orionhealth.com Fri Jul 29 20:55:33 2005 From: Tim.Feltham at orionhealth.com (Tim Feltham) Date: Sat, 30 Jul 2005 12:55:33 +1200 Subject: [Wtr-general] irb: Terminate Batch Job message? Message-ID: <0FDF67DB50EC904AAEA1B2A83A281050013A8B10@mail.orion.internal> You could keep a script handy that gets you to roughly where you want to go, run it, open IRB and attach to the window that the script opened. the code in irb is something like this ie = IE.new(true) # the true tells it to not open an IE window ie.attach_init("WindowTitle") # whatever the title of your window is then just carry on testing. -----Original Message----- From: wtr-general-bounces at rubyforge.org on behalf of Tuyet Cong-Ton-Nu Sent: Sat 30/07/2005 11:16 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] irb: Terminate Batch Job message? I don't know how to get back to irb when it gives me this message: Terminate batch job Y/N? It doesn't matter if I say Y or N, it terminates irb and sends me back to the command prompt which is not what I want when I select N. I want to be able to get back to the irb command line and continue on with my debugging. How do I do that? It's tiring to retype all the irb commands again to get to where I need to test. Maybe there is a better of doing this that I don't know about. Your suggestions are appreciated. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 3128 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050730/a907f605/attachment.bin From Tim.Feltham at orionhealth.com Fri Jul 29 20:56:50 2005 From: Tim.Feltham at orionhealth.com (Tim Feltham) Date: Sat, 30 Jul 2005 12:56:50 +1200 Subject: [Wtr-general] need install tests? Message-ID: <0FDF67DB50EC904AAEA1B2A83A281050013A8B11@mail.orion.internal> I and three other guys at work installed the latest release about a week and a half ago and haven't had any troubles. We are all on XP SP2. -----Original Message----- From: wtr-general-bounces at rubyforge.org on behalf of Chris McMahon Sent: Sat 30/07/2005 10:54 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] need install tests? Hi... After reading about the problems with ie.radio() after installing the release version of Watir, I think there may be a problem with the latest versioned Watir installation. A colleague installed Watir this week on a clean XP machine and it was wacky. Files in the wrong place, stuff missing, etc. The main symptom was an error on ie.radio().set. To fix it, I downloaded from CVS head and ran that install.rb, and all was good. I don't think I've ever installed a released Water-- I always grab it from the head of CVS. And I don't really have a machine to do install testing on-- does anyone else? -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 3022 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050730/be396447/attachment.bin From chrismo at clabs.org Sat Jul 30 08:35:06 2005 From: chrismo at clabs.org (Chris Morris) Date: Sat, 30 Jul 2005 07:35:06 -0500 Subject: [Wtr-general] irb: Terminate Batch Job message? In-Reply-To: References: Message-ID: <42EB73FA.4030502@clabs.org> Tuyet Cong-Ton-Nu wrote: > I don?t know how to get back to irb when it gives me this message: > > Terminate batch job Y/N? > > It doesn?t matter if I say Y or N, it terminates irb and sends me back > to the command prompt which is not what I want when > > I select N. > The "terminate batch job Y/N" is not a part of irb itself, that's a Windows thing. I believe the Windows installer for Ruby (which is not part of the official Ruby release, but a separate project) creates this batch file to make launching irb a simpler thing to do. The underlying problem in your case is figuring out why irb is terminating suddenly. Once you get the prompt to terminate the batch job or not, irb is already lost, which is why answering N does no good. If you can figure out what sort of steps lead to this behavior and post them here or to the Ruby list, maybe you can get some better assistance. -- Chris http://clabs.org/blogki From bret at pettichord.com Sat Jul 30 18:23:22 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 30 Jul 2005 17:23:22 -0500 Subject: [Wtr-general] away at the agile conference Message-ID: <5.1.0.14.2.20050730172225.02eaf720@127.0.0.1> I've been mostly offline last week, while at that Agile Conference in Denver. I'm catching up on the week's email. Here's my report: Agile Conference Report I just got back from the Agile Conference in Denver. I taught a tutorial on Watir and hosted a workshop on agile acceptance testing tools. I had been worried about the tutorial. My original co-presenter had cancelled and the conference had been sold out. I was expecting 50 people in a hands on class that i normally require having another assitant for every additional 12 people. But actually, it worked out. Well, one reason was simply that many of the people who had signed up for the tutorial didn't get the word that they had to bring a laptop. Some ran back to their hotels to get it. (The conference hotel had sold-out so most attendees were staying in other downtown hotels.) But the actual number of attendees turned out to be about 30. But the main reason that it went well was because i had a lot of last minute volunteers to help out. I was running into Watir users left and right at the conference and many of them volunteered to help out with the class. In fact, i had more volunteers than i needed. I was really surprised by how many people were using Watir. I also got a chance to sit down with Elisabeth Hendrickson and see some of the neat extensions and adjustments that she had made to Watir. I'm looking forward to getting those into the distribution. I also hosted a workshop on agile acceptance testing tools with Tim Wall. We had a lot of Fit users and a lot of discussions about how to use Fit. One big issue was how to get developers to write Fixtures. A hot seller at the conference bookstore was the new Fit book. It's very good and i'll be posting a more detailed review of it soon. Fit has definitely become a force that is changing how people think about automating testing. The other big topic was how to handle the maintenance of test suites. Strategies ranged from creating abstractions for your tests to avoiding testing the GUI entirely. Not necessarily new ideas in themselves, but it was interesting to see how thoroughly these ideas have become embedded in the agile testing community. Anyhow, we talked about other things as well, and decided to continue the conversation on a new mailing list (soon to be set up) called Agile Testing Tools. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Jul 30 19:36:07 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 30 Jul 2005 18:36:07 -0500 Subject: [Wtr-general] nested elements don't work as expected Message-ID: <5.1.0.14.2.20050730183525.02eae628@127.0.0.1> During the tutorial, one of the students asked how they could access a

object. It was contained in Form in a Table, so i tried some things that i thought would work, but they didn't -- very embarrassing. Here are some excerpts from my actual, public IRB session... irb(main):006:0> ie.form(:name, 'refresh').html NoMethodError: undefined method `document' for nil:NilClass from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1400:in `getDocument' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1522:in `html' from (irb):6 irb(main):007:0> ie.form(:name, 'refresh').show_all_objects -----------Objects in page ------------- NoMethodError: undefined method `document' for nil:NilClass from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1400:in `getDocument' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1667:in `show_all_objects' from (irb):7 irb(main):008:0> ie.form(:name, 'refresh').flash NoMethodError: undefined method `flash' for # from (irb):8 (By the way, show_all_objects only shows some objects -- it should be renamed) irb(main):010:0> ie.form(:id, 'refresh').p(:index, 1).flash NoMethodError: undefined method `document' for nil:NilClass from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1400:in `getDocument' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1071:in `getNonControlObjec t' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2430:in `initialize' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2508:in `initialize' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:661:in `new' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:661:in `p' from (irb):10 irb(main):014:0> ie.table(:id, 'job_and_day').show_all_objects NoMethodError: undefined method `show_all_objects' for # from (irb):14 irb(main):015:0> ie.table(:id, 'job_and_day').p(:index, 1).flash NoMethodError: private method `p' called for # from (irb):15 _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Jul 30 20:20:23 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 30 Jul 2005 19:20:23 -0500 Subject: [Wtr-general] RE: image.to_s In-Reply-To: <009701c592fc$d2efec40$6400a8c0@NewDell> References: <42dfa01f.7970a341.3080.0051@mx.gmail.com> Message-ID: <5.1.0.14.2.20050730191818.02eeec48@127.0.0.1> At 05:45 PM 7/27/2005, Paul Rogers wrote: >At some point I think we want to add a elements iterator that goes >through all the items on the page, and I guess having the type available >may help Before we do this, i'd like to see all the iterators bound to Watir objects, rather than COM objects. And that means that first we would need to support ie.element(:name, 'foo').click which would click on the first element (of any type) with the name 'foo'. This week, Elisabeth Hendrickson showed me some cool stuff that essentially would depend on this kind of functionality. Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Jul 30 20:23:57 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 30 Jul 2005 19:23:57 -0500 Subject: [Wtr-general] can't run googlesearch.rb successfully In-Reply-To: Message-ID: <5.1.0.14.2.20050730192322.06c80710@127.0.0.1> We need to document this as a limitation of Watir. Is there anyone else trying to use Watir with IE 5.0 or earlier? Bret At 10:04 PM 7/27/2005, Jan.Montano at thomson.com wrote: >It's 5.00. I guess this is a limitation for testing with IE 5.00. >Thanks. > >JAN > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Paul Rogers >Sent: Thursday, July 28, 2005 2:26 AM >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] can't run googlesearch.rb successfully > > >Well, it works for me too! > >Whats the windows/IE version on the other machine? I think fireEvent was >added in IE 5.5 > >Paul > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of >Jan.Montano at thomson.com >Sent: 25 July 2005 20:00 >To: wtr-general at rubyforge.org >Subject: [Wtr-general] can't run googlesearch.rb successfully > > >Hi! I've installed ruby and watir (latest releases) on another terminal. >However, When i run googlesearch.rb this error pops out. > >What's with this error? and why does this happen now? I have no problem >with watir on my original terminal. Thank you. > > >ruby googleSearch.rb >## Beginning of test: Google search > >Step 1: go to the test site: http://www.google.com > Action: entered http://www.google.com in the address bar. Step 2: >enter 'pickaxe' in the search text field >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3620:in `method_missing': >Unknown property or method `fireEvent' (WIN32OLERuntimeError) > HRESULT error code:0x80020006 > Unknown name. from >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3620:in `set' > from googleSearch.rb:33 > >Exit code: 1 > > > >Jan M. Montano >QA Lead / Developer >Regional Application Development >Thomson (Philippines) Corporation >18th Floor Ayala Life - FGU Center >6811 Ayala Ave., Makati City >Philippines >(632) 878-5890 > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Jul 30 20:31:59 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 30 Jul 2005 19:31:59 -0500 Subject: [Wtr-general] need install tests? In-Reply-To: <72799cd70507291554c1f72d1@mail.gmail.com> Message-ID: <5.1.0.14.2.20050730192906.06c9dc00@127.0.0.1> Dozens of people have installed and used 1.3.1 successfully. It's been out for months. It has been tested extensively. If you can give us more information about the problem, we can look into it. There has been a report that it doesn't install correctly when the HomeDir is something other than C: -- could that be your friend's situation? Bret At 05:54 PM 7/29/2005, Chris McMahon wrote: >Hi... > After reading about the problems with ie.radio() after installing >the release version of Watir, I think there may be a problem with the >latest versioned Watir installation. > A colleague installed Watir this week on a clean XP machine and >it was wacky. Files in the wrong place, stuff missing, etc. The >main symptom was an error on ie.radio().set. > To fix it, I downloaded from CVS head and ran that install.rb, >and all was good. > I don't think I've ever installed a released Water-- I always >grab it from the head of CVS. And I don't really have a machine to do >install testing on-- does anyone else? >-Chris > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From rubytalk at koredesign.com Sun Jul 31 01:30:06 2005 From: rubytalk at koredesign.com (Dmytro) Date: 31 Jul 2005 00:30:06 -0500 Subject: [Wtr-general] press 'Yes' using Watir Message-ID: <200507310524.j6V5OKcR029663@rubyforge.org> press 'Yes' using WatirDoes any one know how to press 'Yes' button on the window using Watir 1.3? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050731/c77e0ecb/attachment.html From raghu at qantom.com Sun Jul 31 13:26:11 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Sun, 31 Jul 2005 22:56:11 +0530 Subject: [Wtr-general] Question - Why ruby? Message-ID: <42ED09B3.1070607@qantom.com> Hi All, I was explaining to my friend about Watir and its nice capabilities. In the middle of the conversation he asked me as to why Watir uses Ruby, which is not as well known as Perl, Python or other scripting languages. Is there a special reason why Ruby is being used or is just incidental. Thanks Raghu From jkohl at telusplanet.net Sun Jul 31 17:29:51 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Sun, 31 Jul 2005 15:29:51 -0600 Subject: [Wtr-general] Question - Why ruby? In-Reply-To: <42ED09B3.1070607@qantom.com> Message-ID: <20050731213025.JIGI21821.priv-edtnes28.telusplanet.net@tintin> Bret sums it up nicely here: http://www.io.com/~wazmo/blog/archives/2004_08.html#000221 Bret will be able to explain things better than I can. Bret Pettichord and Brian Marick are really responsible for bringing Ruby into the forefront in the testing community. If it weren't for them, I probably wouldn't have tried Ruby. >From my point of view, Ruby has a nice object model, and is a language that non-programmers seem to find intuitive to learn. That makes it ideal for teaching testers programming basics. For example, my wife is a non-programmer and finds Ruby's looping constructs make sense. She looks at the C-style "for" loop and says it looks like a complication of a simple concept. Perl looks like gibberish to her compared to using objects and messages in Ruby. Perl, Python and Ruby are all powerful languages with strengths and weaknesses. At the end of the day, it probably boils down to personal preference and what your goals are with a language. My goal with Ruby is to script what I can to help me in computer-assisted testing. Ruby fits that need. I also enjoy teaching programming basics to testers using Ruby. It works well, and I can express ideas in Ruby in a way that is intuitive for me. Non-programming testers seem to respond to the language when learning, and I enjoy seeing eyes light up when a tester discovers something new and expresses it with a programming language. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Raghu Venkataramana > Sent: July 31, 2005 11:26 AM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Question - Why ruby? > > Hi All, > > I was explaining to my friend about Watir and its nice capabilities. > In the middle of the conversation he asked me as to why Watir uses > Ruby, which is not as well known as Perl, Python or other scripting > languages. Is there a special reason why Ruby is being used or is > just incidental. > > Thanks > Raghu > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From huemach at Cybersoft-VN.com Sun Jul 31 21:15:12 2005 From: huemach at Cybersoft-VN.com (Hue Mach Dieu) Date: Mon, 1 Aug 2005 08:15:12 +0700 Subject: [Wtr-general] Re: Help Object Repository? Message-ID: <99DF6C0285C2CE4C99F02D7838571966017B7AFC@hue.cybersoft-vn.com> Hi Raghu, I read the tutorial, I sound good I hope this function will finished for Watir. Regards From bret at pettichord.com Sun Jul 31 16:07:29 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sun, 31 Jul 2005 15:07:29 -0500 Subject: [Wtr-general] Question - Why ruby? In-Reply-To: <42ED09B3.1070607@qantom.com> Message-ID: <5.1.0.14.2.20050731150451.02e201a0@127.0.0.1> Perl encourages cryptic code, which makes it a bad choice. It also lacks an interactive shell. Python could work. Ruby was Brian Marick's choice and he was convinced to switch from Python to Ruby when he sat with Dave Thomas and Andy Hunt on a bus. At 12:26 PM 7/31/2005, Raghu Venkataramana wrote: >Hi All, > >I was explaining to my friend about Watir and its nice capabilities. >In the middle of the conversation he asked me as to why Watir uses >Ruby, which is not as well known as Perl, Python or other scripting >languages. Is there a special reason why Ruby is being used or is >just incidental. > >Thanks >Raghu >_______________________________________________ >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 Sun Jul 31 16:17:26 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sun, 31 Jul 2005 15:17:26 -0500 Subject: [Wtr-general] Script non-responsive In-Reply-To: <005c01c5939e$bad56430$6400a8c0@NewDell> References: <004c01c5939b$396213b0$6400a8c0@NewDell> Message-ID: <5.1.0.14.2.20050731151540.06d166a0@127.0.0.1> The way i read this thread, the problem is that IE#wait() doesn't return until the page has stopped loading but the AOL page has continuously loading frames. Correct? Bret At 01:03 PM 7/28/2005, Paul Rogers wrote: >This page at aol has several iframes that get updated with the latest 'hot >searches' My guess is that the problem is something to do with these. >I altered the wait method, and I got my problm sorted - maybe you could try >this and see if it works for you? > >Paul > ## wait with a maximum wait time > > > > ># This method is used internally to cause an execution to stop until the >page has loaded in Internet Explorer. >def wait( noSleep = false ) > begin > @down_load_time=0 > pageLoadStart = Time.now > @pageHasReloaded= false > > s= Spinner.new(@enable_spinner) > while @ie.busy > @pageHasReloaded = true > sleep 0.02 > s.spin > end > s.reverse > > #log "wait: readystate=" + @ie.readyState.to_s > puts "wait: readystate=" + @ie.readyState.to_s > @max_wait_time = 30 # seconds > time_waited=0 > sleep_time = 0.02 > > until @ie.readyState == READYSTATE_COMPLETE or time_waited > >@max_wait_time > > @pageHasReloaded = true > sleep sleep_time > time_waited += sleep_time > puts "Time waited so far: #{time_waited}" > > s.spin > end > sleep 0.02 > > puts "wait: document.readystate=" + @ie.document.readyState.to_s > > until @ie.document.readyState == "complete" or time_waited > >@max_wait_time > sleep sleep_time > time_waited += sleep_time > puts "Time waited so far: #{time_waited}" > s.spin > end > > > if @ie.document.frames.length > 1 > begin > 0.upto @ie.document.frames.length-1 do |i| > until @ie.document.frames[i.to_s].document.readyState == >"complete" > sleep 0.02 > s.spin > end > > @url_list << @ie.document.frames[i.to_s].document.url >unless url_list.include?(@ie.document.frames[i.to_s].document.url) > end > rescue=>e > @logger.warn 'frame error in wait' + e.to_s + "\n" + >e.backtrace.join("\n") > end > else > @url_list << @ie.document.url unless >@url_list.include?(@ie.document.url) > end > @down_load_time = Time.now - pageLoadStart > > run_error_checks > > print "\b" unless @enable_spinner == false > > s=nil > rescue WIN32OLERuntimeError => e > @logger.warn 'runtime error in wait ' # + e.to_s > end > sleep 0.01 > sleep @defaultSleepTime unless noSleep == true >end > > > > > > > > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] >Sent: 28 July 2005 11:39 >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Script non-responsive > > >I just tried search.aol.com and I get a similar thing, even when attaching >to it > >ie=Watir::IE.attach(:title , /S/) >and it just hangs. >Stack trace after a ctrl C > >IRB::Abort: abort then interrupt!! > from c:/ruby/lib/ruby/1.8/irb.rb:81:in `irb_abort' > from c:/ruby/lib/ruby/1.8/irb.rb:241:in `signal_handle' > from c:/ruby/lib/ruby/1.8/irb.rb:66:in `start' > from c:/ruby/lib/ruby/1.8/irb.rb:65:in `call' > from ../watir.rb:1402:in `sleep' > from ../watir.rb:1402:in `wait' > from ../watir.rb:1113:in `attach_init' > from ../watir.rb:1104:in `attach' > from (irb):2 > >I have some time now, so I'll take a look > >Paul > >-----Original Message----- >From: Daniel Kurtz [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of >Daniel Kurtz >Sent: 27 July 2005 11:12 >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Script non-responsive > > >Actually, I hadn't even noticed the typo in your code . > >In any event, the problem is not that Watir can't locate or click the >button. The issue is that, once clicked, control never comes back to Watir >from the page/browser, so the script hangs. > > >Daniel Kurtz >Consultant >Olenick & Associates >205 W. Wacker Drive >Suite 2010 >Chicago, IL 60606 >312-332-0096 >www.olenick.com > > _____ > >From: wtr-general-bounces at rubyforge.org on behalf of Peter Chau >Sent: Wed 7/27/2005 11:55 AM >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Script non-responsive > > >Sorry there was a typo on my part... try > >ie.image(:src, /searchbutton_5_0.gif/).click > > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From alex at verk.info Sun Jul 31 23:18:55 2005 From: alex at verk.info (Alex Verhovsky) Date: Sun, 31 Jul 2005 21:18:55 -0600 Subject: [Wtr-general] Question - Why ruby? In-Reply-To: <5.1.0.14.2.20050731150451.02e201a0@127.0.0.1> References: <5.1.0.14.2.20050731150451.02e201a0@127.0.0.1> Message-ID: <42ED949F.6090702@verk.info> Bret Pettichord wrote: > Python could work. Ruby was Brian Marick's choice and he was convinced > to switch from Python to Ruby when he sat with Dave Thomas and Andy > Hunt on a bus. Oh! Being a devote Ruby hacker, I don't even want to imagine the possibilities of that bus ride not happening... :) Seriously though, the Python vs Ruby theme is rehashed once in a while on ruby-talk and in other forums. The general consensus seems that qualities of both languages are quite similar to each other, and a choice between the two is a subjective choice more than anything else. In other words, there are many enough people who strongly prefer Ruby over Python (and vice versa), but they have a hard time try to explain the reason. :) See also: http://bluebones.net/news/default.asp?action=view_story&story_id=81 Best regards, Alexey Verkhovsky From raghu at qantom.com Sun Jul 31 23:28:18 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Mon, 01 Aug 2005 08:58:18 +0530 Subject: [Wtr-general] Question - Why ruby? In-Reply-To: <5.1.0.14.2.20050731150451.02e201a0@127.0.0.1> References: <5.1.0.14.2.20050731150451.02e201a0@127.0.0.1> Message-ID: <42ED96D2.7040509@qantom.com> Bret, Jonathan: Thanks for these notes. I personally like Ruby's object oriented approach. The only 'flip' I found about ruby that I find is the relatively scarce resources / documentation when compared to Python. Almost all searches point to a different version of the 'pragmatic programmer'. Are there other online resources that you guys could point me to? For example, when trying to do something with the Win32 API callbacks, I couldn't find much help. Thanks Raghu Bret Pettichord wrote: > Perl encourages cryptic code, which makes it a bad choice. It also > lacks an interactive shell. > > Python could work. Ruby was Brian Marick's choice and he was convinced > to switch from Python to Ruby when he sat with Dave Thomas and Andy > Hunt on a bus. > > At 12:26 PM 7/31/2005, Raghu Venkataramana wrote: > >> Hi All, >> >> I was explaining to my friend about Watir and its nice capabilities. >> In the middle of the conversation he asked me as to why Watir uses >> Ruby, which is not as well known as Perl, Python or other scripting >> languages. Is there a special reason why Ruby is being used or is >> just incidental. >> >> Thanks >> Raghu >> _______________________________________________ >> Wtr-general mailing list >> Wtr-general at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-general > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Sun Jul 31 23:47:05 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sun, 31 Jul 2005 21:47:05 -0600 Subject: [Wtr-general] Script non-responsive Message-ID: <2224a5622239b3.22239b32224a56@shaw.ca> yep, the ready_state never gets to READYSTATE_COMPLET its sits at the first state, 'loading' (or similar) I suspect its the iframes continually updating themseleves that causes it. Paul ----- Original Message ----- From: Bret Pettichord Date: Sunday, July 31, 2005 2:17 pm Subject: RE: [Wtr-general] Script non-responsive > The way i read this thread, the problem is that IE#wait() doesn't > return > until the page has stopped loading but the AOL page has > continuously > loading frames. Correct? > > Bret > > At 01:03 PM 7/28/2005, Paul Rogers wrote: > >This page at aol has several iframes that get updated with the > latest 'hot > >searches' My guess is that the problem is something to do with these. > >I altered the wait method, and I got my problm sorted - maybe you > could try > >this and see if it works for you? > > > >Paul > > ## wait with a maximum wait time > > > > > > > > > ># This method is used internally to cause an execution to stop > until the > >page has loaded in Internet Explorer. > >def wait( noSleep = false ) > > begin > > @down_load_time=0 > > pageLoadStart = Time.now > > @pageHasReloaded= false > > > > s= Spinner.new(@enable_spinner) > > while @ie.busy > > @pageHasReloaded = true > > sleep 0.02 > > s.spin > > end > > s.reverse > > > > #log "wait: readystate=" + @ie.readyState.to_s > > puts "wait: readystate=" + @ie.readyState.to_s > > @max_wait_time = 30 # seconds > > time_waited=0 > > sleep_time = 0.02 > > > > until @ie.readyState == READYSTATE_COMPLETE or > time_waited > > >@max_wait_time > > > > @pageHasReloaded = true > > sleep sleep_time > > time_waited += sleep_time > > puts "Time waited so far: #{time_waited}" > > > > s.spin > > end > > sleep 0.02 > > > > puts "wait: document.readystate=" + > @ie.document.readyState.to_s> > > until @ie.document.readyState == "complete" or > time_waited > > >@max_wait_time > > sleep sleep_time > > time_waited += sleep_time > > puts "Time waited so far: #{time_waited}" > > s.spin > > end > > > > > > if @ie.document.frames.length > 1 > > begin > > 0.upto @ie.document.frames.length-1 do |i| > > until > @ie.document.frames[i.to_s].document.readyState == > >"complete" > > sleep 0.02 > > s.spin > > end > > > > @url_list << > @ie.document.frames[i.to_s].document.url>unless > url_list.include?(@ie.document.frames[i.to_s].document.url)> > end > > rescue=>e > > @logger.warn 'frame error in wait' + e.to_s + > "\n" + > >e.backtrace.join("\n") > > end > > else > > @url_list << @ie.document.url unless > >@url_list.include?(@ie.document.url) > > end > > @down_load_time = Time.now - pageLoadStart > > > > run_error_checks > > > > print "\b" unless @enable_spinner == false > > > > s=nil > > rescue WIN32OLERuntimeError => e > > @logger.warn 'runtime error in wait ' # + e.to_s > > end > > sleep 0.01 > > sleep @defaultSleepTime unless noSleep == true > >end > > > > > > > > > > > > > > > > > >-----Original Message----- > >From: wtr-general-bounces at rubyforge.org > >[wtr-general-bounces at rubyforge.org] > >Sent: 28 July 2005 11:39 > >To: wtr-general at rubyforge.org > >Subject: RE: [Wtr-general] Script non-responsive > > > > > >I just tried search.aol.com and I get a similar thing, even when > attaching>to it > > > >ie=Watir::IE.attach(:title , /S/) > >and it just hangs. > >Stack trace after a ctrl C > > > >IRB::Abort: abort then interrupt!! > > from c:/ruby/lib/ruby/1.8/irb.rb:81:in `irb_abort' > > from c:/ruby/lib/ruby/1.8/irb.rb:241:in `signal_handle' > > from c:/ruby/lib/ruby/1.8/irb.rb:66:in `start' > > from c:/ruby/lib/ruby/1.8/irb.rb:65:in `call' > > from ../watir.rb:1402:in `sleep' > > from ../watir.rb:1402:in `wait' > > from ../watir.rb:1113:in `attach_init' > > from ../watir.rb:1104:in `attach' > > from (irb):2 > > > >I have some time now, so I'll take a look > > > >Paul > > > >-----Original Message----- > >From: Daniel Kurtz [wtr-general-bounces at rubyforge.org] On Behalf Of > >Daniel Kurtz > >Sent: 27 July 2005 11:12 > >To: wtr-general at rubyforge.org > >Subject: RE: [Wtr-general] Script non-responsive > > > > > >Actually, I hadn't even noticed the typo in your code . > > > >In any event, the problem is not that Watir can't locate or click the > >button. The issue is that, once clicked, control never comes back > to Watir > >from the page/browser, so the script hangs. > > > > > >Daniel Kurtz > >Consultant > >Olenick & Associates > >205 W. Wacker Drive > >Suite 2010 > >Chicago, IL 60606 > >312-332-0096 > >www.olenick.com > > > > _____ > > > >From: wtr-general-bounces at rubyforge.org on behalf of Peter Chau > >Sent: Wed 7/27/2005 11:55 AM > >To: wtr-general at rubyforge.org > >Subject: RE: [Wtr-general] Script non-responsive > > > > > >Sorry there was a typo on my part... try > > > >ie.image(:src, /searchbutton_5_0.gif/).click > > > > > > > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general >