From satti at qantom.com Thu Sep 1 00:57:46 2005 From: satti at qantom.com (Sathya Shankar) Date: Thu, 01 Sep 2005 10:27:46 +0530 Subject: [Wtr-general] Works in Watir but NOT in WET...any ideas? In-Reply-To: <30078ddb05083113455917b518@mail.gmail.com> References: <30078ddb05083113455917b518@mail.gmail.com> Message-ID: <43168A4A.2000806@qantom.com> Hi John, The same code is working in my machine. can you just tell me which version of the WET and Watir your using? Thanks Satti John Hobbs wrote: >WATIR Code: > ie = IE.attach(:url , /MY.jsp/ ) > f = ie.frame(:name, "MYFrame") > puts f.html > >WET Code: > b = Browser("url:=/MY.jsp/") > f = b.Frame("name:=MYFrame") > puts f.html > >In both cases, I have already logged in to the system and navigated to MY.jsp. > >When I run the Watir code, the html for "MYFrame" is displayed. > >When I run the WET code, I get the following error message: > >C:\WET/qantom/webobjects/WebFrame.rb:44:in `document': undefined >method `document' for nil:NilClass (NoMethodError) > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1465:in `html' > from C:/RubyCode/WetTest/FrameTest.rb:24 > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > From raghu at qantom.com Thu Sep 1 01:15:17 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Thu, 01 Sep 2005 10:45:17 +0530 Subject: [Wtr-general] new installers In-Reply-To: <5.1.0.14.2.20050831222155.031d4110@127.0.0.1> References: <5.1.0.14.2.20050831222155.031d4110@127.0.0.1> Message-ID: <43168E65.2080002@qantom.com> Gem - preferred installer CLI Installer - Optional components only. That is, the command line installer is over and above the Gem Also, it probably is a good idea to include docs / helper scripts to uninstall older versions of Watir. My few cents. Raghu Bret Pettichord wrote: > Our new installers have been out for a bit. And we need to update our > docs to reflect this. > > Should we tell people about the one-click installer, the gem or both? > > We have scattered reports of problems with the new one-click > installer. We'd appreciate hearing more about it? Is it working for > you. Do you like it? Is it better than the old one. > > I want to update our documentation on how to install Watir and would > like some feedback first. > > I am also planning to convert the old installer to be a simply command > line installer -- that way we have something very reliable for people > who want more than a gem and are having problems with the one-clicker > or want to install directly from HEAD. > > Bret > > > _____________________ > Bret Pettichord > www.pettichord.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 jeff.darklight at gmail.com Thu Sep 1 01:19:11 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 31 Aug 2005 22:19:11 -0700 Subject: [Wtr-general] new installers In-Reply-To: <5.1.0.14.2.20050831222155.031d4110@127.0.0.1> References: <5.1.0.14.2.20050831222155.031d4110@127.0.0.1> Message-ID: <43168F4F.1090703@gmail.com> Bret Pettichord wrote: > Our new installers have been out for a bit. And we need to update our > docs to reflect this. > > Should we tell people about the one-click installer, the gem or both? > > We have scattered reports of problems with the new one-click > installer. We'd appreciate hearing more about it? Is it working for > you. Do you like it? Is it better than the old one. > > I want to update our documentation on how to install Watir and would > like some feedback first. > > I am also planning to convert the old installer to be a simply command > line installer -- that way we have something very reliable for people > who want more than a gem and are having problems with the one-clicker > or want to install directly from HEAD. > > Bret > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > My vote is for the gem... I wish more of the community would just stand behind it and get it "standardized" so that we don't have to deal with language detractors that complain we don't have a CPAN or a PEAR j. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050831/03e7b064/attachment.html From bret at pettichord.com Thu Sep 1 01:36:51 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 01 Sep 2005 00:36:51 -0500 Subject: [Wtr-general] Re: Problem with link inside a DIV (or XML data) In-Reply-To: <42F8403F.1030305@kilmore.info> Message-ID: <5.1.0.14.2.20050901002033.031e36b8@127.0.0.1> Jared, I checked in a fix for this bug. This was quite hairy. The problem occured because you have XML data with an id of 'tags'. This blocks our normal call to document.all.tags(TAGNAME). Thanks for the detailed report. Bret At 12:33 AM 8/9/2005, you wrote: >Hi Bret, > >Paul sent me an e-mail following this up a while back, and I sent this >information back but got no response.. This is an issue I had related to >errors from Watir when I tried to click on a link. The error appeared in >version 1.3. Initially I thought it was related to nested frames, but it >seems to be related to a link in a DIV, or related to the XML data >embedded in the page. > >I've attached a zip file of a page which reproduces the error. With the >attached file open in IE - > >require 'Watir' >include Watir >$ie=IE.attach(:title,"Test") >$ie.showLinks #(links are shown) >$ie.link(:text,"Create").click #(returns an error) > >WIN32OLERuntimeError: tags > OLE error code:80020003 in > > HRESULT error code:0x80020003 > Member not found. > from d:/ruby/lib/ruby/site_ruby/1.8/Watir.rb:969:in `method_missing' > from d:/ruby/lib/ruby/site_ruby/1.8/Watir.rb:969:in `getLink' > from d:/ruby/lib/ruby/site_ruby/1.8/Watir.rb:3148:in `initialize' > from d:/ruby/lib/ruby/site_ruby/1.8/Watir.rb:537:in `new' > from d:/ruby/lib/ruby/site_ruby/1.8/Watir.rb:537:in `link' > from (irb):7 > from : > >Thanks for your help with this...I'm really hanging out to use 1.4. I >haven't been able to find a workaround, so I'm still on 1.2 :) > >Jared > > >-------- Original Message -------- >Subject: Re: [Wtr-general] Problem with multiple frames >Date: Wed, 20 Jul 2005 17:33:34 +1000 >From: Jared Quinert >Reply-To: jared at kilmore.info >To: Paul Rogers >References: <003c01c5569e$3a854080$72d39044 at NewDell> > > > >Hi Paul, > >I think the issue I've had isn't actually related to frames at all. I >finally had some time today to try and track this down. > >With the attached file open - > >require 'Watir' >include Watir >$ie=IE.attach(:title,"Test") >$ie.showLinks (links are shown) >$ie.link(:text,"Create").click (returns an error) > >WIN32OLERuntimeError: tags > OLE error code:80020003 in > > HRESULT error code:0x80020003 > Member not found. > from d:/ruby/lib/ruby/site_ruby/1.8/Watir.rb:969:in `method_missing' > from d:/ruby/lib/ruby/site_ruby/1.8/Watir.rb:969:in `getLink' > from d:/ruby/lib/ruby/site_ruby/1.8/Watir.rb:3148:in `initialize' > from d:/ruby/lib/ruby/site_ruby/1.8/Watir.rb:537:in `new' > from d:/ruby/lib/ruby/site_ruby/1.8/Watir.rb:537:in `link' > from (irb):7 > from : > >Let me know if you need any more information, and thanks for your help! > >Jared > > > >Paul Rogers wrote: > >>Hmm. Maybe that bug only just appeared. Whats the problem you are >>seeing? >> >>Paul >> >>-----Original Message----- >>From: Jared Quinert [mailto:jared at kilmore.info] Sent: 11 May 2005 20:33 >>To: paul.rogers at shaw.ca >>Subject: Re: [Wtr-general] Problem with multiple frames >> >> >>Paul Rogers wrote: >> >> >> >>>There is a bug in here when you use subframes. Its not hard to fix it, >>>but may have repurcussions. I'll discuss it with Bret next week. Is the >>>sleep solution ok for you to use for now? >>> >>> >> >>Hi Paul, >> >>Is this a general frames issue, or specific to the wait problem >>mentioned? My nested frames seem to have broken from version 1.2 to >>version 1.3. >> >>Thanks, >> >>Jared >> >> >> >> >> > > > _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Sep 1 01:49:10 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 01 Sep 2005 00:49:10 -0500 Subject: [Wtr-general] new installers In-Reply-To: <43168E65.2080002@qantom.com> References: <5.1.0.14.2.20050831222155.031d4110@127.0.0.1> <5.1.0.14.2.20050831222155.031d4110@127.0.0.1> Message-ID: <5.1.0.14.2.20050901004720.031f10a8@127.0.0.1> I'm thinking about using rake for the cli installer (rake install, with other targets for lib-install, etc). But that would mean that the users of the installer would need to have rake installed, which isn't part of the ruby distro. (although you can do a gem install rake.) Thoughts? Bret At 12:15 AM 9/1/2005, Raghu Venkataramana wrote: >Gem - preferred installer > >CLI Installer - Optional components only. That is, the command line >installer is >over and above the Gem > >Also, it probably is a good idea to include docs / helper scripts to >uninstall older >versions of Watir. > >My few cents. > >Raghu > >Bret Pettichord wrote: > >>Our new installers have been out for a bit. And we need to update our >>docs to reflect this. >> >>Should we tell people about the one-click installer, the gem or both? >> >>We have scattered reports of problems with the new one-click installer. >>We'd appreciate hearing more about it? Is it working for you. Do you like >>it? Is it better than the old one. >> >>I want to update our documentation on how to install Watir and would like >>some feedback first. >> >>I am also planning to convert the old installer to be a simply command >>line installer -- that way we have something very reliable for people who >>want more than a gem and are having problems with the one-clicker or want >>to install directly from HEAD. >> >>Bret >> >> >>_____________________ >> Bret Pettichord >> www.pettichord.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 >-- > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From jim_che_tih at yahoo.com Thu Sep 1 02:15:43 2005 From: jim_che_tih at yahoo.com (jim che) Date: Wed, 31 Aug 2005 23:15:43 -0700 (PDT) Subject: [Wtr-general] How to detect the number of certain word in a page Message-ID: <20050901061543.19525.qmail@web33306.mail.mud.yahoo.com> Hi all I want to detect the number of certain word in a page .For example in a page there contains 20 'Hello' and I want to get the number of 'Hello' How can I detect it which apis can be used? Thank you --------------------------------- 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/20050831/0b2f93e4/attachment.html From raghu at qantom.com Thu Sep 1 02:23:27 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Thu, 01 Sep 2005 11:53:27 +0530 Subject: [Wtr-general] new installers In-Reply-To: <5.1.0.14.2.20050901004720.031f10a8@127.0.0.1> References: <5.1.0.14.2.20050831222155.031d4110@127.0.0.1> <5.1.0.14.2.20050831222155.031d4110@127.0.0.1> <5.1.0.14.2.20050901004720.031f10a8@127.0.0.1> Message-ID: <43169E5F.30702@qantom.com> I have thoughts going both ways:- One part of me says that the installer itself. should be least-dependant of other packages. At the same time, I was looking at rake yesterday. Rake easily is to 'Ruby' what 'make' is to c/cpp or 'ant' is to Java(and a lot simpler). I was surprised 'Rake' was not shipped along with Ruby - hope it will be soon. That said - it actually may not be a bad idea to force the depandancy of Rake Raghu Bret Pettichord wrote: > I'm thinking about using rake for the cli installer (rake install, > with other targets for lib-install, etc). But that would mean that the > users of the installer would need to have rake installed, which isn't > part of the ruby distro. (although you can do a gem install rake.) > Thoughts? > > Bret > > At 12:15 AM 9/1/2005, Raghu Venkataramana wrote: > >> Gem - preferred installer >> >> CLI Installer - Optional components only. That is, the command line >> installer is >> over and above the Gem >> >> Also, it probably is a good idea to include docs / helper scripts to >> uninstall older >> versions of Watir. >> >> My few cents. >> >> Raghu >> >> Bret Pettichord wrote: >> >>> Our new installers have been out for a bit. And we need to update >>> our docs to reflect this. >>> >>> Should we tell people about the one-click installer, the gem or both? >>> >>> We have scattered reports of problems with the new one-click >>> installer. We'd appreciate hearing more about it? Is it working for >>> you. Do you like it? Is it better than the old one. >>> >>> I want to update our documentation on how to install Watir and would >>> like some feedback first. >>> >>> I am also planning to convert the old installer to be a simply >>> command line installer -- that way we have something very reliable >>> for people who want more than a gem and are having problems with the >>> one-clicker or want to install directly from HEAD. >>> >>> Bret >>> >>> >>> _____________________ >>> Bret Pettichord >>> www.pettichord.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 >> -- >> >> _______________________________________________ >> 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 > -- Qantom Software http://www.qantom.com Ph : 26799269 Xtn. 125 sip : raghu at sip411.com -- From dave at burt.id.au Thu Sep 1 02:24:34 2005 From: dave at burt.id.au (Dave Burt) Date: Thu, 1 Sep 2005 16:24:34 +1000 Subject: [Wtr-general] new installers References: <5.1.0.14.2.20050831222155.031d4110@127.0.0.1><5.1.0.14.2.20050831222155.031d4110@127.0.0.1> <5.1.0.14.2.20050901004720.031f10a8@127.0.0.1> Message-ID: <005a01c5aebd$d530e310$6402a8c0@telperion> Bret Pettichord wrote: > I'm thinking about using rake for the cli installer (rake install, with > other targets for lib-install, etc). But that would mean that the users of > the installer would need to have rake installed, which isn't part of the > ruby distro. (although you can do a gem install rake.) > > Thoughts? "gem install watir" is ideal. Cheers, Dave From dave at burt.id.au Thu Sep 1 02:54:57 2005 From: dave at burt.id.au (Dave Burt) Date: Thu, 1 Sep 2005 16:54:57 +1000 Subject: [Wtr-general] How to detect the number of certain word in a page References: <20050901061543.19525.qmail@web33306.mail.mud.yahoo.com> Message-ID: <007201c5aec2$141e84c0$6402a8c0@telperion> jim che asked: > I want to detect the number of certain word in a page .For example in a > page > there contains 20 'Hello' and I want to get the number of 'Hello' > How can I detect it which apis can be used? Watir::IE#text returns the text in the page (excluding titles, tags, etc) as a String. String#scan(regexp) returns an array of the bits of the string that match the regexp. Array#size returns the number of elements in the array. require 'watir' ie = Watir::IE.new ie.goto("http://hello.com") p ie.text.scan(/hello/i).size Cheers Dave From Mike.Harris at kalido.com Thu Sep 1 04:00:51 2005 From: Mike.Harris at kalido.com (Mike Harris) Date: Thu, 1 Sep 2005 09:00:51 +0100 Subject: [Wtr-general] WARN -- : runtime error in wait busy Message-ID: I just had a look at the post you put up on Watir regarding the problem we had earlier. I'm pretty sure it is to do with the code within setupState1() which does this: $ie.button(:name, state1SpecifiedUserButtonId).click statusMessage = "Looking for an IE window with a title of Select Assigned to" sleep(7) # gives the window time to open ie2 = IE.attach(:title, /Select Assigned to/) statusMessage = "Setting the system party as the user to be assigned to" ie2.radio(:id, "0-SYSTEMPARTY").set I saw that this code was causing someone else the same runtime error so I'm guessing that is the reason we're getting it as well. Mike -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Harris Sent: 31 August 2005 14:49 To: wtr-general at rubyforge.org Subject: [Wtr-general] WARN -- : runtime error in wait busy When I run my script I get this error returned: .Test 7...Creating a workflow W, [31-Aug-2005 14:02:56#2956] WARN -- : runtime error in wait busy OLE error code:80004005 in HRESULT error code:0x80020009 Exception occurred. How can I find the cause of this runtime error? The Test that returned this error is: puts "Test 7...Creating a workflow" goToSignOnPage() login() actAsSystemParty() workflowName = "My Workflow" workflowsLink = $ie.getLink(:text, "Workflows") begin statusMessage = "Looking for workflows link" $ie.goto(workflowsLink) statusMessage = "Looking for new workflow button" $ie.button(:name, "new").click setupState1(workflowName) setupState2() addEvent(workflowName) rescue failTest(7) puts("Failed while " + statusMessage) end Thanks for your Help Mike Harris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Mike.Harris at kalido.com Thu Sep 1 04:04:31 2005 From: Mike.Harris at kalido.com (Mike Harris) Date: Thu, 1 Sep 2005 09:04:31 +0100 Subject: [Wtr-general] Rubyforge stats: Watir #1 Message-ID: AS a new user of Watir I am not surprised that the downloads of Watir are increasing. It is an excellent tool. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 31 August 2005 19:51 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Rubyforge stats: Watir #1 Look at our rate of activity growth: http://rubyforge.org/project/stats/?group_id=104 At 12:51 PM 8/31/2005, Chris McMahon wrote: >Hey... > I just noticed that Watir is the most active project on rubyforge >right now. And it's creeping up the list of top project downloads, >too. >-Chris > >_______________________________________________ >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 jhobbsjr at gmail.com Thu Sep 1 08:47:45 2005 From: jhobbsjr at gmail.com (John Hobbs) Date: Thu, 1 Sep 2005 08:47:45 -0400 Subject: [Wtr-general] Works in Watir but NOT in WET...any ideas? In-Reply-To: <43168A4A.2000806@qantom.com> References: <30078ddb05083113455917b518@mail.gmail.com> <43168A4A.2000806@qantom.com> Message-ID: <30078ddb050901054734ffca8f@mail.gmail.com> Hi Satti, I am using: o watir-v1_4.zip o wet_0.5.2_for_watir_1.4.zip (I downloaded this yesterday) John From satti at qantom.com Thu Sep 1 09:42:49 2005 From: satti at qantom.com (Sathya Shankar) Date: Thu, 01 Sep 2005 19:12:49 +0530 Subject: [Wtr-general] Works in Watir but NOT in WET...any ideas? In-Reply-To: <30078ddb050901054734ffca8f@mail.gmail.com> References: <30078ddb05083113455917b518@mail.gmail.com> <43168A4A.2000806@qantom.com> <30078ddb050901054734ffca8f@mail.gmail.com> Message-ID: <43170559.7010300@qantom.com> Hi John Can you try this? b = Browser("url:=/MY.jsp/") f = b.Frame("name:=MYFrame") puts f Thanks John Hobbs wrote: >Hi Satti, > >I am using: > > o watir-v1_4.zip > o wet_0.5.2_for_watir_1.4.zip (I downloaded this yesterday) > >John > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > -- Sathya Shankar M G Software Testing Engineer Qantom Software http://www.qantom.com Ph : 26799269 Xtn. 123 sip : satti at sip411.com From michael.net at gmail.com Thu Sep 1 09:50:15 2005 From: michael.net at gmail.com (Mike) Date: Thu, 1 Sep 2005 09:50:15 -0400 Subject: [Wtr-general] How to open right-click context menu? In-Reply-To: <5.1.0.14.2.20050831010824.02b794b0@127.0.0.1> References: <20050814202943.55494.qmail@web50912.mail.yahoo.com> <86388bc7050830140244dbbc1a@mail.gmail.com> <5.1.0.14.2.20050831010824.02b794b0@127.0.0.1> Message-ID: <86388bc705090106506f1a3750@mail.gmail.com> > > >but in this case view source is turned off > > Turn it back on! > > > require 'win32ole' > > shell = WIN32OLE.new('Shell.Application') > windows = shell.windows > return unless windows > windows.each do |window| > next unless window.fullname =~ /iexplore.exe/ > window.toolbar = true > window.menubar = true > window.resizable = true > end Hey, I like that! That script will get put to good use in future. Alas, it won't fix my current problem. I can already view source for this particular window, but it's showing me source for just one of the frames, and not the one I care about. Even clicking on the frame I want and then looking at view source doesn't change anything. This page was written by extremely sharp individuals who I believe were intentionally trying to obfuscate. The page has an unnamed frame, which I could only get a handle on by doing this: $main_frame = $ie.frame("") Within this frame are other frames. If you can think of other ways to get at the source of specific frames, please let me know. I'll also try AutoIt as a previous poster recommended. Thanks, Mike P.S. Do you have a good reference for that kind of window scripting, especially IE scripting? Is there a way to banish those annoying splash screens that s-l-o-w Java applications keep putting up in front of my work? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050901/2af81b94/attachment.html From PGarigue at EXTEND.COM Thu Sep 1 09:57:43 2005 From: PGarigue at EXTEND.COM (Pierre Garigue) Date: Thu, 1 Sep 2005 09:57:43 -0400 Subject: [Wtr-general] new installers Message-ID: I like gem -install watir -r It's very elegant and I would rather keep it that way. It reminds me of how things work using CPAN. Cheers Pierre Garigue -----Original Message----- From: Dave Burt [mailto:dave at burt.id.au] Sent: Thursday, September 01, 2005 2:25 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] new installers Bret Pettichord wrote: > I'm thinking about using rake for the cli installer (rake install, with > other targets for lib-install, etc). But that would mean that the users of > the installer would need to have rake installed, which isn't part of the > ruby distro. (although you can do a gem install rake.) > > Thoughts? "gem install watir" is ideal. Cheers, Dave _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jhobbsjr at gmail.com Thu Sep 1 10:31:45 2005 From: jhobbsjr at gmail.com (John Hobbs) Date: Thu, 1 Sep 2005 10:31:45 -0400 Subject: [Wtr-general] Works in Watir but NOT in WET...any ideas? In-Reply-To: <43170559.7010300@qantom.com> References: <30078ddb05083113455917b518@mail.gmail.com> <43168A4A.2000806@qantom.com> <30078ddb050901054734ffca8f@mail.gmail.com> <43170559.7010300@qantom.com> Message-ID: <30078ddb05090107311e21f951@mail.gmail.com> I tried the puts.f with both WET and Watir. WET returned: Frame() Watir returned: # Thanks John From Sean.Gallagher at ticketmaster.com Thu Sep 1 11:42:40 2005 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Thu, 1 Sep 2005 08:42:40 -0700 Subject: [Wtr-general] new installers Message-ID: <71D28C8451BFD5119B2B00508BE26E6409E11AC6@pasmail3.office.tmcs> -1 old installer +1 gem > gem install watir Easy peasy. I have used cvs co, old installer, new installer and the gem. The gem installation was simple. I especially like the fact that it only installs watir. The only issue was having to (manually) remove watir from lib\ruby\site_ruby\1.8 before using the gem installation. If you continue with the old installer for people installing from HEAD, I suggest that you make it a simple mkpath/install type script that just installs watir. I would prefer to see dependencies like AutoIt moved out. Like Ruby itself, I can download and install AutoIt before installing Watir. It should just be referenced as a (possible) dependency in the Installation instructions. Thanks to the Watir development team for all the hard work. It's a great tool. -sean -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Wednesday, August 31, 2005 8:38 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] new installers Our new installers have been out for a bit. And we need to update our docs to reflect this. Should we tell people about the one-click installer, the gem or both? We have scattered reports of problems with the new one-click installer. We'd appreciate hearing more about it? Is it working for you. Do you like it? Is it better than the old one. I want to update our documentation on how to install Watir and would like some feedback first. I am also planning to convert the old installer to be a simply command line installer -- that way we have something very reliable for people who want more than a gem and are having problems with the one-clicker or want to install directly from HEAD. Bret _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Sean.Gallagher at ticketmaster.com Thu Sep 1 11:46:05 2005 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Thu, 1 Sep 2005 08:46:05 -0700 Subject: [Wtr-general] new installers Message-ID: <71D28C8451BFD5119B2B00508BE26E6409E11AC7@pasmail3.office.tmcs> -1 additional dependency -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Wednesday, August 31, 2005 10:49 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] new installers I'm thinking about using rake for the cli installer (rake install, with other targets for lib-install, etc). But that would mean that the users of the installer would need to have rake installed, which isn't part of the ruby distro. (although you can do a gem install rake.) Thoughts? Bret At 12:15 AM 9/1/2005, Raghu Venkataramana wrote: >Gem - preferred installer > >CLI Installer - Optional components only. That is, the command line >installer is >over and above the Gem > >Also, it probably is a good idea to include docs / helper scripts to >uninstall older >versions of Watir. > >My few cents. > >Raghu > >Bret Pettichord wrote: > >>Our new installers have been out for a bit. And we need to update our >>docs to reflect this. >> >>Should we tell people about the one-click installer, the gem or both? >> >>We have scattered reports of problems with the new one-click installer. >>We'd appreciate hearing more about it? Is it working for you. Do you like >>it? Is it better than the old one. >> >>I want to update our documentation on how to install Watir and would like >>some feedback first. >> >>I am also planning to convert the old installer to be a simply command >>line installer -- that way we have something very reliable for people who >>want more than a gem and are having problems with the one-clicker or want >>to install directly from HEAD. >> >>Bret >> >> >>_____________________ >> Bret Pettichord >> www.pettichord.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 >-- > >_______________________________________________ >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 dave at burt.id.au Thu Sep 1 11:46:20 2005 From: dave at burt.id.au (Dave Burt) Date: Fri, 2 Sep 2005 01:46:20 +1000 Subject: [Wtr-general] How to open right-click context menu? References: <20050814202943.55494.qmail@web50912.mail.yahoo.com><86388bc7050830140244dbbc1a@mail.gmail.com><5.1.0.14.2.20050831010824.02b794b0@127.0.0.1> <86388bc705090106506f1a3750@mail.gmail.com> Message-ID: <005001c5af0c$4cd038f0$6402a8c0@telperion> Mike wrote: > Alas, it won't fix my current problem. I can already view source for this > particular > window, but it's showing me source for just one of the frames, and not the one > I > care about. Even clicking on the frame I want and then looking at view source > doesn't change anything. This page was written by extremely sharp individuals > who > I believe were intentionally trying to obfuscate. The page has an unnamed > frame, > which I could only get a handle on by doing this: > > $main_frame = $ie.frame("") > > Within this frame are other frames. > > If you can think of other ways to get at the source of specific frames, please > let me > know. I'll also try AutoIt as a previous poster recommended. > You can try pulling it out of the cache (C:\Documents and Settings\username\Local Settings\Temporary Internet Files). Or AutoIt can probably do it; I imagine that could potentially be harder than looking for a matching filename in the cache. > P.S. Do you have a good reference for that kind of window scripting, > especially > IE scripting? Is there a way to banish those annoying splash screens that > s-l-o-w > Java applications keep putting up in front of my work? AutoIt3 does all that really well, although Bret seems to have demonstrated you can use the Windows COM API quite powerfully, too. You can check the MSDN library for info on Shell and other automation objects, including the IE object which is very handy for Watir stuff. InternetExplorer object (Watier::IE.new.ie or WIN32OLE.new("InternetExplorer.Application") doco is here: http://msdn.microsoft.com/workshop/browser/webbrowser/reference/objects/internetexplorer.asp Remember, too, all WIN32OLE objects have the ole_methods method which exposes all the properties and methods of the object. The AutoIt docs are here: http://www.autoitscript.com/autoit3/docs/ And in particular its API is here: http://www.autoitscript.com/autoit3/docs/functions.htm Cheers, Dave From bret at pettichord.com Thu Sep 1 11:39:19 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 01 Sep 2005 10:39:19 -0500 Subject: [Wtr-general] new installers In-Reply-To: Message-ID: <5.1.0.14.2.20050901103725.03220ad0@127.0.0.1> We will definitely be keeping the gem. Bret At 08:57 AM 9/1/2005, Pierre Garigue wrote: >I like > >gem -install watir -r > >It's very elegant and I would rather keep it that way. It reminds me of >how things work >using CPAN. > >Cheers >Pierre Garigue > >-----Original Message----- >From: Dave Burt [mailto:dave at burt.id.au] >Sent: Thursday, September 01, 2005 2:25 AM >To: wtr-general at rubyforge.org >Subject: Re: [Wtr-general] new installers > > >Bret Pettichord wrote: > > I'm thinking about using rake for the cli installer (rake install, with > > other targets for lib-install, etc). But that would mean that the users of > > the installer would need to have rake installed, which isn't part of the > > ruby distro. (although you can do a gem install rake.) > > > > Thoughts? > >"gem install watir" is ideal. > >Cheers, >Dave >_______________________________________________ >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 Tierney at rdacorp.com Thu Sep 1 12:22:51 2005 From: Tierney at rdacorp.com (Mike Tierney) Date: Thu, 1 Sep 2005 12:22:51 -0400 Subject: [Wtr-general] How do you invoke autoIt from a Watir script ? Message-ID: <7F56E1BD6DF3A34DB97A11A4494C6FB70268EFF1@corpexch.rdacorp.com> First time poster to this group- great job on WATIR ! How do you invoke autoIt from a Watir script ? (I am basically interested in getting to left & right mouseclicks, I assume you can't do mouse clicks with send_keys) All the AutoIt documentation is for VB Script. # I got this to run at least, not sure if its right : class Autoit def initialize(libname) end end $autoit=Autoit.new("AutoItX3.Control") # but I can't get this to work later on in the script $autoIt.MouseClick "left" # I must be missing something, or may be making it too complicated. # It gets : myscript.rb:58: undefined method `MouseClick' for nil:NilClass (NoMethodError) I am a career system tester, not an oo progammer yet, but have used Quick Test Pro, WinRunner, Robot and Win32:GuiTest successfully in the past. I am working through the Dave Thomas Ruby book too. Thanks - Mike Tierney, Baltimore, Md. From christopher.mcmahon at gmail.com Thu Sep 1 12:28:56 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 1 Sep 2005 11:28:56 -0500 Subject: [Wtr-general] Anyone integrate ActiveRecord with Watir? Message-ID: <72799cd705090109283ad6dbbc@mail.gmail.com> Anyone built an object-relational database interface into a Ruby test system? Care to share any code? -Chris From warren at meyer-pollans.net Thu Sep 1 13:26:43 2005 From: warren at meyer-pollans.net (Warren Pollans) Date: Thu, 1 Sep 2005 13:26:43 -0400 Subject: [Wtr-general] finding text in a cell that contains a specified image? In-Reply-To: <593b9ae8050819091663528ab3@mail.gmail.com> References: <20050819115743.183cd83b@localhost.localdomain> <593b9ae8050819091663528ab3@mail.gmail.com> Message-ID: <20050901132643.44e534a3@localhost.localdomain> Thanks for the suggestion. It works - but a little too well :-) It turns out that the page I'm checking has tables inside of tables inside of tables ... So this is returning the text in the highest level cell (including those below it) that contains the image I specify although the actual cell with the image is several layers down. This is OK before I was matching ie.text to some expected text. Now I'm curious. Is there a way to keep track of where I am in the hierarchy of tables so I know when I'm at the deepest level? In your example below, I guess I could save the text from each cell that matches instead of returning one the first match - and then pick the shortest string. Is there a watir way? On or about Fri, 19 Aug 2005 12:16:13 -0400 Shao Kang Tat allegedly wrote: > I'm doing something similar. But I'm not dealing with images, rather > links and texts, so I'd imagine the code would be similar to the one > I"m using and would work: > > > ie.tables.each do|t| # since you don't have ID's, look at every table > for i in 1..t.row_count # for every row in this table > > # for every column in this row, look at its contents > t[i].each{|c| if c.image(:src, xxx).exists? # if true, this > is your cell > return c.text.strip > } > end > end > > > > > > > > On 8/19/05, Warren Pollans wrote: > > Hello again, > > > > Could some please point me to a way of finding text in a cell that > > contains a specified image? There are no ids available for the > > table, row or cell :-( - and there are several tables on the page. > > There is only one cell (at a time) that contains this particular > > image - the text in the cell is displaying status that I'm trying > > to capture. This status msg can occur in one of four different > > tables - depending on which form on the page is submitted - the > > same image is used in all cases. > > > > I think I want to walk through the DOM looking for a td element > > that has "img src=xxx" - I imagine there's a simpler watir way :-) > > > > Thanks, > > > > Warren > > _______________________________________________ > > 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 raghu at qantom.com Thu Sep 1 15:30:35 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Fri, 02 Sep 2005 01:00:35 +0530 Subject: [Wtr-general] Pointer(?) to solving the HTML Popup issue Was(Re: [Wet-users] Fwd: Yet another pop-up question) In-Reply-To: <4317351C.1000004@qantom.com> References: <71ef6790050901073819419920@mail.gmail.com> <71ef679005090108134781def8@mail.gmail.com> <4317351C.1000004@qantom.com> Message-ID: <431756DB.7000703@qantom.com> The popup html dialog issue has been floating around bogging Watir / Wet users. I just tried my luck to see if I could find a solution to this. I didn't find the solution perse, but I think I have got some useful information which could translate to an answer to this problem. The following are the links that I found: ------------------------------------------------------------------------- Microsoft KB article: http://support.microsoft.com/kb/176792/EN-US/ Some pointers: http://groups.google.co.in/group/microsoft.public.inetsdk.programming.webbrowser_ctl/browse_thread/thread/765c51d26e0ebd68/11ee990085234fa7?lnk=st&q=Internet+Explorer_Server&rnum=3&hl=en#11ee990085234fa7 VB code: http://groups.google.co.in/group/microsoft.public.vb.winapi/browse_thread/thread/2068b98ce2e25a55/746f8f145018fa2e?lnk=st&q=Internet+Explorer_Server&rnum=2&hl=en#746f8f145018fa2e http://groups.google.co.in/group/microsoft.public.vb.general.discussion/browse_thread/thread/38cd91d3b763fe60/38d293a938482446?lnk=st&q=Internet+Explorer_Server&rnum=6&hl=en#38d293a938482446 Sample code download: http://www.disoriented.com/IESpy/ -------------------------------------------------------------------------- All of these solutions are by getting the MsHtml document object using the 'hwnd' of the window. If you got the Windows handle for your dialog - you got a means of getting the DOM object. Not only will this address the common HTML popup issue but also take care of the situation where users want to test pages hosted in custom web browser controls. I hope that the COM gurus here are able to use this information to get a solution to the HTML popup issues. Btw, to get the windows handle of the Popup itself, you could use the 'Dialog' method provided by Wet: lnk=ie.Frame("...").Link("...").click_without_blocking() popup = ie.Dialog("text:=").hwnd I think that the ability to handle HTML popups will be a very useful addition to Watir. Did I mention that even Quicktest doesn't handle this kind of popups? - It only shows it as a generic Win32 windows with which you can't pretty much do anything. Raghu Raghu Venkataramana wrote: > Hi Stephanie, > > This looks like the infamous popup webdialog issue. There are > two types of dialogs - 1) Standard windows dialog (eg. Javascript alert) > and 2) HTML dialogs. The Dialog(...) method of Wet can only handle > Standard windows dialogs. > > I will look a bit deeper into this and let you know if I find anything. > > Thanks > Raghu > > > Stephanie Mayfield wrote: > >> Apologies, I confused my version numbers. The correct versions are: >> WET 0.5.2 >> Watir 1.4.1 >> >> Steph >> >> ---------- Forwarded message ---------- >> From: *Stephanie Mayfield* <sirella.maesah at gmail.com >> <mailto:sirella.maesah at gmail.com>> >> Date: Sep 1, 2005 11:38 AM >> Subject: Yet another pop-up question >> To: wet-users at lists.sourceforge.net >> <mailto:wet-users at lists.sourceforge.net> >> >> Using the latest released versions of WET (0.5.1) and Watir (1.42), >> I'm attempting to access a pop-up. I navigate to where the link is >> pressed ("Remove") which produces the pop-up (title on the popup is >> "Confirm Delete -- Web Page Dialog") and then attempt to press a >> button within the popup. Here's the section of code. >> >> lnk=ie.Frame("name:=content").Link("text:=Remove") >> lnk.click_without_blocking() >> popup = ie.Dialog("text:=Confirm Delete -- Web Page Dialog") >> puts "popup contents:" >> puts popup >> puts popup.win_class >> puts popup.text >> puts "end popup contents" >> puts ie.Dialog("text:=Confirm Delete -- Web Page >> Dialog").Button("value:=&Cancel").exists >> puts ie.Dialog("text:=Confirm Delete -- Web Page >> Dialog").Button("text:=Cancel").exists >> puts ie.Dialog("text:=Confirm Delete -- Web Page >> Dialog").Button("id:=docancel").exists >> puts ie.Dialog("text:=Confirm Delete -- Web Page >> Dialog").Button("text:=/.*cancel.*/i").exists >> >> The resulting output is: >> >> DEBUG: >> IN_CMD=Browser.new(11208118).Frame('sourceIndex:=9').Element(28).click() >> DEBUG: >> OUT_CMD=Browser.new(11208118).Frame('sourceIndex:=9').Element(28).click() >> >> DEBUG: spawing => start rubyw -e "begin; require 'WET';include >> WET;Browser.new(11208118).Frame('sourceIndex:=9').Element(28).click();rescue >> => e;puts e;end;sleep 2" >> popup contents: >> Window(text:=Confirm Delete -- Web Page Dialog) >> Internet Explorer_TridentDlgFra >> Confirm Delete -- Web Page Dialog >> end popup contents >> too many callbacks are defined. >> false >> too many callbacks are defined. >> false >> too many callbacks are defined. >> false >> too many callbacks are defined. >> false >> >> What it looks like to me is it is attaching to the popup but it can't >> find the button? >> >> This is the HTML with the button I'm trying to click in the popup: >> >> <input type="button" onClick="window.close()" value="Cancel" >> id="docancel"> >> >> Thanks in advance for any help! >> Steph >> >> >> >> -- >> Steph >> Homepage: www.maesah.ca <http://www.maesah.ca> > > > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle > Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing > & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > wet-users mailing list > wet-users at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wet-users > From DBoyt at anteon.com Thu Sep 1 16:05:21 2005 From: DBoyt at anteon.com (Boyt, Darrel) Date: Thu, 1 Sep 2005 16:05:21 -0400 Subject: [Wtr-general] Frames problem Message-ID: <258593F548C79D4AB7CBA2AE72DEBEC892CDD0@HQ-EXVS02.anteon.com> I am having difficulty showing objects in frames. Shouldn't I be able to do something like ie.frame("topFrame").show_all_objects? I can access objects (linkes, etc.) if I know what I'm looking for, but I can't seem to be able to use the Watir's "show" methods in IRB. Something else I noticed is that once I click on a link in a frame that loads new pages in the other frames, the "src" doesn't change when I call ie.show_all_objects...it shows the same filenames as before the link was clicked. Am I missing something here or is something wrong??? For what it's worth, I'm using the tarball from CVS I downloaded yesterday. AAARGH!!! I'm just a *wee* bit frustrated! Darrel Boyt Systems Analyst Anteon Corporation Montgomery, Alabama From tomfeo at presslogic.com Thu Sep 1 16:38:45 2005 From: tomfeo at presslogic.com (Tom) Date: Thu, 1 Sep 2005 14:38:45 -0600 Subject: [Wtr-general] How do you invoke autoIt from a Watir script ? In-Reply-To: <7F56E1BD6DF3A34DB97A11A4494C6FB70268EFF1@corpexch.rdacorp.com> Message-ID: <TITAN5ZSTqYDqImlXPc00000108@presslogic.com> Mike I believe your problem is you declared $autoit and you are trying to use $autoIt with a capital 'I'. I'm thinking this might be why you are getting the undefined method error. Try $autoit.MouseClick "left" Tom -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Tierney Sent: Thursday, September 01, 2005 10:23 AM To: Watir Subject: [Wtr-general] How do you invoke autoIt from a Watir script ? First time poster to this group- great job on WATIR ! How do you invoke autoIt from a Watir script ? (I am basically interested in getting to left & right mouseclicks, I assume you can't do mouse clicks with send_keys) All the AutoIt documentation is for VB Script. # I got this to run at least, not sure if its right : class Autoit def initialize(libname) end end $autoit=Autoit.new("AutoItX3.Control") # but I can't get this to work later on in the script $autoIt.MouseClick "left" # I must be missing something, or may be making it too complicated. # It gets : myscript.rb:58: undefined method `MouseClick' for nil:NilClass (NoMethodError) I am a career system tester, not an oo progammer yet, but have used Quick Test Pro, WinRunner, Robot and Win32:GuiTest successfully in the past. I am working through the Dave Thomas Ruby book too. Thanks - Mike Tierney, Baltimore, Md. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From dave at burt.id.au Thu Sep 1 18:02:45 2005 From: dave at burt.id.au (Dave Burt) Date: Fri, 2 Sep 2005 08:02:45 +1000 Subject: [Wtr-general] How do you invoke autoIt from a Watir script ? References: <7F56E1BD6DF3A34DB97A11A4494C6FB70268EFF1@corpexch.rdacorp.com> Message-ID: <00c401c5af40$e2073ca0$6402a8c0@telperion> Mike asked: > How do you invoke autoIt from a Watir script ? (I am basically interested in > getting to left & right mouseclicks, I assume you can't do mouse clicks with > send_keys) All the AutoIt documentation is for VB Script. > > # I got this to run at least, not sure if its right : > class Autoit > def initialize(libname) > end > end > $autoit=Autoit.new("AutoItX3.Control") > > # but I can't get this to work later on in the script > > $autoIt.MouseClick "left" > > # I must be missing something, or may be making it too complicated. > # It gets : myscript.rb:58: undefined method `MouseClick' for nil:NilClass > (NoMethodError) Tom's right, $autoit is a different variable from $autoIt, but that will just get you a different error message - a NoMethodError. You can define the Autoit class like this: require 'win32ole' class AutoIt < WIN32OLE def initialize super("AutoItX3.Control") end end $autoit = AutoIt.new But I would just do: require 'win32ole' $autoit = WIN32OLE.new("AutoItX3.Control") And with either, you should be able to use the methods and properties as you expect from the doco: $autoit.mouseclick "left" # or MouseClick or mOuSeClIcK... Another way is a little more complicated: require 'win32ole' module AutoIt class << self def instance unless @instance @instance = WIN32OLE.new("AutoItX3.Control") end @instance end def method_missing(*args, &block) instance.send(*args, &block) end end end This will automatically create the AutoIt control when it's needed. You don't need to explicitly create it -- use it like this: AutoIt.mouseclick "left" Cheers, Dave From bret at pettichord.com Thu Sep 1 18:50:29 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 01 Sep 2005 17:50:29 -0500 Subject: [Wtr-general] Frames problem In-Reply-To: <258593F548C79D4AB7CBA2AE72DEBEC892CDD0@HQ-EXVS02.anteon.co m> Message-ID: <5.1.0.14.2.20050901174856.0326f6c8@127.0.0.1> At 03:05 PM 9/1/2005, Boyt, Darrel wrote: >I am having difficulty showing objects in frames. Shouldn't I be able >to do something like ie.frame("topFrame").show_all_objects? I can >access objects (linkes, etc.) if I know what I'm looking for, but I >can't seem to be able to use the Watir's "show" methods in IRB. You should. I just fixed this now. Get tonight's tarball. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Sep 1 17:13:03 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 01 Sep 2005 16:13:03 -0500 Subject: [Wtr-general] Pointer(?) to solving the HTML Popup issue Was(Re: [Wet-users] Fwd: Yet another pop-up question) In-Reply-To: <431756DB.7000703@qantom.com> References: <4317351C.1000004@qantom.com> <71ef6790050901073819419920@mail.gmail.com> <71ef679005090108134781def8@mail.gmail.com> <4317351C.1000004@qantom.com> Message-ID: <5.1.0.14.2.20050901161215.0325fc80@127.0.0.1> This has been bothering me, and i'm seeing this as an upcoming problem for a couple client accounts. I completely agree that we need to do this. Excellent. Bret At 02:30 PM 9/1/2005, Raghu Venkataramana wrote: >The popup html dialog issue has been floating around bogging >Watir / Wet users. I just tried my luck to see if I could find a solution >to this. I didn't find the solution perse, but I think I have got some useful >information which could translate to an answer to this problem. The following >are the links that I found: > >------------------------------------------------------------------------- >Microsoft KB article: >http://support.microsoft.com/kb/176792/EN-US/ > > >Some pointers: >http://groups.google.co.in/group/microsoft.public.inetsdk.programming.webbrowser_ctl/browse_thread/thread/765c51d26e0ebd68/11ee990085234fa7?lnk=st&q=Internet+Explorer_Server&rnum=3&hl=en#11ee990085234fa7 > >VB code: >http://groups.google.co.in/group/microsoft.public.vb.winapi/browse_thread/thread/2068b98ce2e25a55/746f8f145018fa2e?lnk=st&q=Internet+Explorer_Server&rnum=2&hl=en#746f8f145018fa2e > >http://groups.google.co.in/group/microsoft.public.vb.general.discussion/browse_thread/thread/38cd91d3b763fe60/38d293a938482446?lnk=st&q=Internet+Explorer_Server&rnum=6&hl=en#38d293a938482446 > >Sample code download: >http://www.disoriented.com/IESpy/ >-------------------------------------------------------------------------- > > >All of these solutions are by getting the MsHtml document object using the >'hwnd' of the window. If you got the Windows handle for your dialog - you got >a means of getting the DOM object. Not only will this address the common >HTML popup issue but also take care of the situation where users want to >test pages hosted in custom web browser controls. >I hope that the COM gurus here are able to use this information to get a >solution to the HTML popup issues. > >Btw, to get the windows handle of the Popup itself, you could use the >'Dialog' method provided by Wet: > >lnk=ie.Frame("...").Link("...").click_without_blocking() >popup = ie.Dialog("text:=<title of popup>").hwnd > >I think that the ability to handle HTML popups will be a very useful >addition to Watir. Did I mention that even Quicktest doesn't handle >this kind of popups? - It only shows it as a generic Win32 windows >with which you can't pretty much do anything. > >Raghu > > > > >Raghu Venkataramana wrote: > >>Hi Stephanie, >> >>This looks like the infamous popup webdialog issue. There are >>two types of dialogs - 1) Standard windows dialog (eg. Javascript alert) >>and 2) HTML dialogs. The Dialog(...) method of Wet can only handle >>Standard windows dialogs. >> >>I will look a bit deeper into this and let you know if I find anything. >> >>Thanks >>Raghu >> >> >>Stephanie Mayfield wrote: >> >>>Apologies, I confused my version numbers. The correct versions are: >>>WET 0.5.2 >>>Watir 1.4.1 >>> >>>Steph >>> >>>---------- Forwarded message ---------- >>>From: *Stephanie Mayfield* <sirella.maesah at gmail.com >>><mailto:sirella.maesah at gmail.com>> >>>Date: Sep 1, 2005 11:38 AM >>>Subject: Yet another pop-up question >>>To: wet-users at lists.sourceforge.net <mailto:wet-users at lists.sourceforge.net> >>> >>>Using the latest released versions of WET (0.5.1) and Watir (1.42), I'm >>>attempting to access a pop-up. I navigate to where the link is pressed >>>("Remove") which produces the pop-up (title on the popup is "Confirm >>>Delete -- Web Page Dialog") and then attempt to press a button within >>>the popup. Here's the section of code. >>> >>>lnk=ie.Frame("name:=content").Link("text:=Remove") >>>lnk.click_without_blocking() >>>popup = ie.Dialog("text:=Confirm Delete -- Web Page Dialog") >>>puts "popup contents:" >>>puts popup >>>puts popup.win_class >>>puts popup.text >>>puts "end popup contents" >>>puts ie.Dialog("text:=Confirm Delete -- Web Page >>>Dialog").Button("value:=&Cancel").exists >>>puts ie.Dialog("text:=Confirm Delete -- Web Page >>>Dialog").Button("text:=Cancel").exists >>>puts ie.Dialog("text:=Confirm Delete -- Web Page >>>Dialog").Button("id:=docancel").exists >>>puts ie.Dialog("text:=Confirm Delete -- Web Page >>>Dialog").Button("text:=/.*cancel.*/i").exists >>> >>>The resulting output is: >>> >>>DEBUG: >>>IN_CMD=Browser.new(11208118).Frame('sourceIndex:=9').Element(28).click() >>>DEBUG: >>>OUT_CMD=Browser.new(11208118).Frame('sourceIndex:=9').Element(28).click() >>>DEBUG: spawing => start rubyw -e "begin; require 'WET';include >>>WET;Browser.new(11208118).Frame('sourceIndex:=9').Element(28).click();rescue >>>=> e;puts e;end;sleep 2" >>>popup contents: >>>Window(text:=Confirm Delete -- Web Page Dialog) >>>Internet Explorer_TridentDlgFra >>>Confirm Delete -- Web Page Dialog >>>end popup contents >>>too many callbacks are defined. >>>false >>>too many callbacks are defined. >>>false >>>too many callbacks are defined. >>>false >>>too many callbacks are defined. >>>false >>> >>>What it looks like to me is it is attaching to the popup but it can't >>>find the button? >>> >>>This is the HTML with the button I'm trying to click in the popup: >>> >>><input type="button" onClick="window.close()" value="Cancel" >>>id="docancel"> >>> >>>Thanks in advance for any help! >>>Steph >>> >>> >>> >>>-- >>>Steph >>>Homepage: www.maesah.ca <http://www.maesah.ca> >> >> >> >> >> >>------------------------------------------------------- >>SF.Net email is Sponsored by the Better Software Conference & EXPO >>September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices >>Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA >>Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf >>_______________________________________________ >>wet-users mailing list >>wet-users at lists.sourceforge.net >>https://lists.sourceforge.net/lists/listinfo/wet-users > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From Leon.Ouretski at au.ey.com Thu Sep 1 19:55:45 2005 From: Leon.Ouretski at au.ey.com (Leon.Ouretski at au.ey.com) Date: Fri, 2 Sep 2005 09:55:45 +1000 Subject: [Wtr-general] Need help with Watir/Ruby. Message-ID: <OFAFC369A3.34559FF0-ONCA25706F.00826D60-CA257070.000026B5@au.ey.com> This email is to be read subject to the disclaimer below. Hello guys, The response to my last query was just amazing. I got a few responses the same day. Thank you very much. Hopefully someone will be able to help me with this question too. I have to rb files: Watir test driver, which has the Test::Unit::TestCase def and all the tests; and the other file "Utilities" has a number of functions which i am trying to call from the first file. The Utilities file looks sothing like this: class Utilities def initialize(ie) $ie = ie end def logOff $ie.frame(:name, "FrameMain").image(:index, 9).click end def logOn $ie.text_field(:name, "txtUsername").set($user) $ie.text_field(:name, "txtPassword").set($pwd) $ie.button(:name, "btnLogon").click begin assert($ie.frame("FrameMenu")) $log.info("TEST PASSED: Logon successful") rescue => e $log.error("TEST FAILED: Logon Failed " + e.message + "\n" + e.backtrace.join("\n")) end end end And the Watir tes file: # include the watir classes require 'watir' include Watir #test::unit includes require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' # A test class using Test::Unit::TestCase will run automatically when # included using require. class TC_TaxIntegrator < Test::Unit::TestCase require "utilities/utils.rb" $aUtilities = Utilities.new($ie) def test_logon $aUtilities.logOn end def test_logOff $aUtilities.logOff end end When I run the test, it successfully logs in, but produces the following error on logOff: 1) Error: test_logOff(TC_TaxIntegrator): Watir::Exception::UnknownFrameException: Unable to locate a frame with name FrameMain c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1739:in `initialize' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:222:in `new' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:222:in `frame' ./utilities/utils.rb:75:in `clickLogOffButton' TestContainer.rb:44:in `test_logOff' Any ideas? Best regards Leon -------------------- 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 a scheme approved under Professional Standards Legislation. -------------------- 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/20050902/3df57741/attachment.html From jim_che_tih at yahoo.com Thu Sep 1 22:11:23 2005 From: jim_che_tih at yahoo.com (jim che) Date: Thu, 1 Sep 2005 19:11:23 -0700 (PDT) Subject: [Wtr-general] Dave Burt could you give me some advice Message-ID: <20050902021124.22976.qmail@web33312.mail.mud.yahoo.com> During the ruby code I want to do some database operations.But I don't know how to operate the database with ruby script.So could you mind to give me some advice? Best wishes --------------------------------- 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/20050901/b6b6bbc1/attachment.html From jkohl at telusplanet.net Thu Sep 1 22:15:53 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Thu, 1 Sep 2005 20:15:53 -0600 Subject: [Wtr-general] new installers In-Reply-To: <71D28C8451BFD5119B2B00508BE26E6409E11AC7@pasmail3.office.tmcs> Message-ID: <20050902021631.IZYT12566.priv-edmwes25.telusplanet.net@tintin> I agree. -1 > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sean Gallagher > Sent: September 1, 2005 9:46 AM > To: 'wtr-general at rubyforge.org' > Subject: RE: [Wtr-general] new installers > > -1 additional dependency > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > Pettichord > Sent: Wednesday, August 31, 2005 10:49 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] new installers > > I'm thinking about using rake for the cli installer (rake > install, with other targets for lib-install, etc). But that > would mean that the users of the installer would need to have > rake installed, which isn't part of the ruby distro. > (although you can do a gem install rake.) > > Thoughts? > > Bret > > At 12:15 AM 9/1/2005, Raghu Venkataramana wrote: > >Gem - preferred installer > > > >CLI Installer - Optional components only. That is, the command line > >installer is over and above the Gem > > > >Also, it probably is a good idea to include docs / helper scripts to > >uninstall older versions of Watir. > > > >My few cents. > > > >Raghu > > > >Bret Pettichord wrote: > > > >>Our new installers have been out for a bit. And we need to > update our > >>docs to reflect this. > >> > >>Should we tell people about the one-click installer, the > gem or both? > >> > >>We have scattered reports of problems with the new > one-click installer. > >>We'd appreciate hearing more about it? Is it working for > you. Do you > >>like it? Is it better than the old one. > >> > >>I want to update our documentation on how to install Watir > and would > >>like some feedback first. > >> > >>I am also planning to convert the old installer to be a > simply command > >>line installer -- that way we have something very reliable > for people > >>who want more than a gem and are having problems with the > one-clicker > >>or want to install directly from HEAD. > >> > >>Bret > >> > >> > >>_____________________ > >> Bret Pettichord > >> www.pettichord.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 > >-- > > > >_______________________________________________ > >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 nightphotos at gmail.com Fri Sep 2 01:00:36 2005 From: nightphotos at gmail.com (Wayne Vucenic) Date: Thu, 1 Sep 2005 22:00:36 -0700 Subject: [Wtr-general] Any intellisense IDE for Ruby? Also WatirMaker rocks.. In-Reply-To: <24d0cb3805082422125dfeb663@mail.gmail.com> References: <24d0cb3805082422125dfeb663@mail.gmail.com> Message-ID: <b85b7d4a05090122005028928c@mail.gmail.com> >> For now i want to know if there is any IDE for Ruby that provides intellisense? ArachnoRuby, www.ruby-ide.com <http://www.ruby-ide.com> , is an excellent Ruby IDE that does a good job of providing suggested completions for variable names, etc. Wayne -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050901/bb9f1bd0/attachment.html From bret at pettichord.com Fri Sep 2 01:11:36 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 02 Sep 2005 00:11:36 -0500 Subject: [Wtr-general] new installers In-Reply-To: <20050902021631.IZYT12566.priv-edmwes25.telusplanet.net@tin tin> References: <71D28C8451BFD5119B2B00508BE26E6409E11AC7@pasmail3.office.tmcs> Message-ID: <5.1.0.14.2.20050901234602.0327d990@127.0.0.1> Guess what? The one-click installer can be used as a command line installer. >watir-1.4.1.exe /S I just figured this out. There is also a /D switch that can be used to specify where to install to. >watir-1.4.1.exe /S /D=c:\watir_bonus How does this sound? I do like the idea of a separate script for uninstalling old versions of Watir. At 09:15 PM 9/1/2005, Jonathan Kohl wrote: >I agree. > >-1 > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sean Gallagher > > Sent: September 1, 2005 9:46 AM > > To: 'wtr-general at rubyforge.org' > > Subject: RE: [Wtr-general] new installers > > > > -1 additional dependency > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret > > Pettichord > > Sent: Wednesday, August 31, 2005 10:49 PM > > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] new installers > > > > I'm thinking about using rake for the cli installer (rake > > install, with other targets for lib-install, etc). But that > > would mean that the users of the installer would need to have > > rake installed, which isn't part of the ruby distro. > > (although you can do a gem install rake.) > > > > Thoughts? > > > > Bret > > > > At 12:15 AM 9/1/2005, Raghu Venkataramana wrote: > > >Gem - preferred installer > > > > > >CLI Installer - Optional components only. That is, the command line > > >installer is over and above the Gem > > > > > >Also, it probably is a good idea to include docs / helper scripts to > > >uninstall older versions of Watir. > > > > > >My few cents. > > > > > >Raghu > > > > > >Bret Pettichord wrote: > > > > > >>Our new installers have been out for a bit. And we need to > > update our > > >>docs to reflect this. > > >> > > >>Should we tell people about the one-click installer, the > > gem or both? > > >> > > >>We have scattered reports of problems with the new > > one-click installer. > > >>We'd appreciate hearing more about it? Is it working for > > you. Do you > > >>like it? Is it better than the old one. > > >> > > >>I want to update our documentation on how to install Watir > > and would > > >>like some feedback first. > > >> > > >>I am also planning to convert the old installer to be a > > simply command > > >>line installer -- that way we have something very reliable > > for people > > >>who want more than a gem and are having problems with the > > one-clicker > > >>or want to install directly from HEAD. > > >> > > >>Bret > > >> > > >> > > >>_____________________ > > >> Bret Pettichord > > >> www.pettichord.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 > > >-- > > > > > >_______________________________________________ > > >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 > > > >_______________________________________________ >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 Sep 2 02:07:25 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 02 Sep 2005 01:07:25 -0500 Subject: [Wtr-general] finding text in a cell that contains a specified image? In-Reply-To: <20050901132643.44e534a3@localhost.localdomain> References: <593b9ae8050819091663528ab3@mail.gmail.com> <20050819115743.183cd83b@localhost.localdomain> <593b9ae8050819091663528ab3@mail.gmail.com> Message-ID: <5.1.0.14.2.20050902010044.0325dd28@127.0.0.1> Check out the latest version of Watir from HEAD. Now you can do: ie.table().table().table().cell().image().click Each item searches inside the previous item. This now works with any element type. In your case, you probably want something like: ie.table().table().table().cells.each {|c| c.text.strip if c.image(:src, xxx).exists?} Bret At 12:26 PM 9/1/2005, Warren Pollans wrote: >Thanks for the suggestion. It works - but a little too well :-) > >It turns out that the page I'm checking has tables inside of tables >inside of tables ... > >So this is returning the text in the highest level cell (including >those below it) that contains the image I specify although the actual >cell with the image is several layers down. This is OK before I was >matching ie.text to some expected text. > >Now I'm curious. Is there a way to keep track of where I am in the >hierarchy of tables so I know when I'm at the deepest level? In your >example below, I guess I could save the text from each cell that >matches instead of returning one the first match - and then pick the >shortest string. Is there a watir way? > >On or about Fri, 19 Aug 2005 12:16:13 -0400 >Shao Kang Tat <shaorobics at gmail.com> allegedly wrote: > > > I'm doing something similar. But I'm not dealing with images, rather > > links and texts, so I'd imagine the code would be similar to the one > > I"m using and would work: > > > > > > ie.tables.each do|t| # since you don't have ID's, look at every table > > for i in 1..t.row_count # for every row in this table > > > > # for every column in this row, look at its contents > > t[i].each{|c| if c.image(:src, xxx).exists? # if true, this > > is your cell > > return c.text.strip > > } > > end > > end > > > > > > > > > > > > > > > > On 8/19/05, Warren Pollans <warren at meyer-pollans.net> wrote: > > > Hello again, > > > > > > Could some please point me to a way of finding text in a cell that > > > contains a specified image? There are no ids available for the > > > table, row or cell :-( - and there are several tables on the page. > > > There is only one cell (at a time) that contains this particular > > > image - the text in the cell is displaying status that I'm trying > > > to capture. This status msg can occur in one of four different > > > tables - depending on which form on the page is submitted - the > > > same image is used in all cases. > > > > > > I think I want to walk through the DOM looking for a td element > > > that has "img src=xxx" - I imagine there's a simpler watir way :-) > > > > > > Thanks, > > > > > > Warren > > > _______________________________________________ > > > 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 dave at burt.id.au Fri Sep 2 03:26:57 2005 From: dave at burt.id.au (Dave Burt) Date: Fri, 2 Sep 2005 17:26:57 +1000 Subject: [Wtr-general] new installers, autoit References: <71D28C8451BFD5119B2B00508BE26E6409E11AC7@pasmail3.office.tmcs> <5.1.0.14.2.20050901234602.0327d990@127.0.0.1> Message-ID: <00f501c5af8f$b3d6f380$6402a8c0@telperion> Bret: > Guess what? The one-click installer can be used as a command line installer. > > >watir-1.4.1.exe /S > ... > I do like the idea of a separate script for uninstalling old versions of > Watir. You can't register the AutoIt DLL with the RubyGems, can you? That's another plus for the one-click installer. Do you see AutoIt remaining as part of the Watir distribution, or being replaced by Watir popup-handling methods that just use COM? Cheers, Dave From Mike.Harris at kalido.com Fri Sep 2 09:36:12 2005 From: Mike.Harris at kalido.com (Mike Harris) Date: Fri, 2 Sep 2005 14:36:12 +0100 Subject: [Wtr-general] Connecting to a second window Message-ID: <B0D76BE3D457334C8F418FA27A65B0DF0126FDED@kal-uk-s-003.kalido.local> Thanks for the help I received on this. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Harris Sent: 31 August 2005 08:34 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Connecting to a second window Thanks for this. It is a pop up that is invoked using java script. I have been looking for AutoIt in the Watir API, but can not find it. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 31 August 2005 05:31 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Connecting to a second window If this is a modal popup, then you can't attach to it. If you click on the main window, but the popup window stays on top, then it is modal. If it's small, you can try handling it with AutoIt. Sorry folks. Bret At 09:08 PM 8/30/2005, Jan.Montano at thomson.com wrote: >I'm just curious. Is the second window already there upon running the >program? if not maybe you could try putting wait(5) before the attach >just to be sure. > >what's the exact error message? >and what's the exact title of the page when you view the source? > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Mike Harris >Sent: Tuesday, August 30, 2005 7:19 PM >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Connecting to a second window > > >Thanks.I tried that and still had the same problem. I have just noticed >that when I hover over the link with the mouse the path to the page for >the second window is displayed in the status bar, but this does not >include the name of the file. I am wondering if this is the problem. > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin >Sent: 30 August 2005 10:57 >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Connecting to a second window > >Try this > >$ieAbout = Watir::IE.attach(:title, /About KALIDO MDM/) > >instead of > >$ieAbout = IE.attach(:title, /About KALIDO MDM/) > >Zeljko > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Harris >Sent: Tuesday, August 30, 2005 11:53 AM >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Connecting to a second window > >The last line put to the command console is attach failed. So I assume >that it is the attach that has failed > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin >Sent: 30 August 2005 10:44 >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Connecting to a second window > >In which line does your script fail (goto or attach)? What error >message do you get? > >Zeljko > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Harris >Sent: Tuesday, August 30, 2005 11:39 AM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Connecting to a second window > >I have just started to use Watir and am trying to connect to a new >window using this code, but I fail to goto the link. Can you please >give me some advice about why this may be failing. Thanks def >test_03_ViewAbout > puts "Test 3...View About" > goToSignOnPage() > login() > begin > statusMessage="Invoking About" > aboutlink=$ie.getLink(:text,"About") > statusMessage="goto link failed" > puts("goto link failed") > $ie.goto(aboutlink.href) > puts("attach failed") > statusMessage="attach failed" > $ieAbout = IE.attach(:title, /About KALIDO MDM/) > statusMessage="assert failed" > assert($ieAbout.title=="About KALIDO >MDM","Failed to invoke About") > statusMessage="close failed" > $ieAbout.close > rescue > errorstring ="Failed while " + statusMessage > failTest(3,errorstring) > end > end > >Mike Harris > >_______________________________________________ >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 _____________________ 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 DBoyt at anteon.com Fri Sep 2 09:45:28 2005 From: DBoyt at anteon.com (Boyt, Darrel) Date: Fri, 2 Sep 2005 09:45:28 -0400 Subject: [Wtr-general] Frames problem Message-ID: <258593F548C79D4AB7CBA2AE72DEBEC892CF31@HQ-EXVS02.anteon.com> At 05:50 PM 9/1/2005, Bret Pettichord wrote: >You should. I just fixed this now. Get tonight's tarball. Great! show_all_objects works for frames, now! Thanks! My thinking about frames doesn't seem to be in line with Watir's implementation. My thinking is that a frameset is basically a container of frames that are separate web pages and that the methods I can access with "ie" I should be able to access with "ie.frame(:index, 1)". I'm looking for things that tell me about the page like .url, .html, and the "show" methods (.show_divs, .show_forms, .show_frames, .show_images, .show_labels, .show_links, .show_spans, .show_tables). Am I way off in left field on this??? Darrel Boyt Systems Analyst Anteon Corporation Montgomery, Alabama From tomfeo at presslogic.com Fri Sep 2 09:53:49 2005 From: tomfeo at presslogic.com (Tom) Date: Fri, 2 Sep 2005 07:53:49 -0600 Subject: [Wtr-general] Need help with Watir/Ruby. In-Reply-To: <OFAFC369A3.34559FF0-ONCA25706F.00826D60-CA257070.000026B5@au.ey.com> Message-ID: <TITAN9PH3IhA1qfT7eE00000115@presslogic.com> Leon The one thing that jumps to mind is that you are logging on using "FrameMenu" and you are logging off using "FrameMain". I'm thinking you should be using the same frame name to be logging on and off unless you navigate to another frame, which I don't think you are doing. In your log off try: def logOff $ie.frame(:name, "FrameMenu").image(:index, 9).click end Hope that helps Tom _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Leon.Ouretski at au.ey.com Sent: Thursday, September 01, 2005 5:56 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Need help with Watir/Ruby. This email is to be read subject to the disclaimer below. Hello guys, The response to my last query was just amazing. I got a few responses the same day. Thank you very much. Hopefully someone will be able to help me with this question too. I have to rb files: Watir test driver, which has the Test::Unit::TestCase def and all the tests; and the other file "Utilities" has a number of functions which i am trying to call from the first file. The Utilities file looks sothing like this: class Utilities def initialize(ie) $ie = ie end def logOff $ie.frame(:name, "FrameMain").image(:index, 9).click end def logOn $ie.text_field(:name, "txtUsername").set($user) $ie.text_field(:name, "txtPassword").set($pwd) $ie.button(:name, "btnLogon").click begin assert($ie.frame("FrameMenu")) $log.info("TEST PASSED: Logon successful") rescue => e $log.error("TEST FAILED: Logon Failed " + e.message + "\n" + e.backtrace.join("\n")) end end end And the Watir tes file: # include the watir classes require 'watir' include Watir #test::unit includes require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' # A test class using Test::Unit::TestCase will run automatically when # included using require. class TC_TaxIntegrator < Test::Unit::TestCase require "utilities/utils.rb" $aUtilities = Utilities.new($ie) def test_logon $aUtilities.logOn end def test_logOff $aUtilities.logOff end end When I run the test, it successfully logs in, but produces the following error on logOff: 1) Error: test_logOff(TC_TaxIntegrator): Watir::Exception::UnknownFrameException: Unable to locate a frame with name FrameMain c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1739:in `initialize' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:222:in `new' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:222:in `frame' ./utilities/utils.rb:75:in `clickLogOffButton' TestContainer.rb:44:in `test_logOff' Any ideas? Best regards Leon -------------------- 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 a scheme approved under Professional Standards Legislation. -------------------- 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/20050902/2e1df834/attachment.html From tomfeo at presslogic.com Fri Sep 2 10:07:18 2005 From: tomfeo at presslogic.com (Tom) Date: Fri, 2 Sep 2005 08:07:18 -0600 Subject: [Wtr-general] Need help with Watir/Ruby. In-Reply-To: <TITAN9PH3IhA1qfT7eE00000115@presslogic.com> Message-ID: <TITANj1d4vJFRFWMozg00000116@presslogic.com> Also check your view source for the page in question. If you do log off using a different frame on the page, it may be the developers have misspelled the name for the frame which could explain why Watir can't find it. _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tom Sent: Friday, September 02, 2005 7:54 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Need help with Watir/Ruby. Leon The one thing that jumps to mind is that you are logging on using "FrameMenu" and you are logging off using "FrameMain". I'm thinking you should be using the same frame name to be logging on and off unless you navigate to another frame, which I don't think you are doing. In your log off try: def logOff $ie.frame(:name, "FrameMenu").image(:index, 9).click end Hope that helps Tom _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Leon.Ouretski at au.ey.com Sent: Thursday, September 01, 2005 5:56 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Need help with Watir/Ruby. This email is to be read subject to the disclaimer below. Hello guys, The response to my last query was just amazing. I got a few responses the same day. Thank you very much. Hopefully someone will be able to help me with this question too. I have to rb files: Watir test driver, which has the Test::Unit::TestCase def and all the tests; and the other file "Utilities" has a number of functions which i am trying to call from the first file. The Utilities file looks sothing like this: class Utilities def initialize(ie) $ie = ie end def logOff $ie.frame(:name, "FrameMain").image(:index, 9).click end def logOn $ie.text_field(:name, "txtUsername").set($user) $ie.text_field(:name, "txtPassword").set($pwd) $ie.button(:name, "btnLogon").click begin assert($ie.frame("FrameMenu")) $log.info("TEST PASSED: Logon successful") rescue => e $log.error("TEST FAILED: Logon Failed " + e.message + "\n" + e.backtrace.join("\n")) end end end And the Watir tes file: # include the watir classes require 'watir' include Watir #test::unit includes require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' # A test class using Test::Unit::TestCase will run automatically when # included using require. class TC_TaxIntegrator < Test::Unit::TestCase require "utilities/utils.rb" $aUtilities = Utilities.new($ie) def test_logon $aUtilities.logOn end def test_logOff $aUtilities.logOff end end When I run the test, it successfully logs in, but produces the following error on logOff: 1) Error: test_logOff(TC_TaxIntegrator): Watir::Exception::UnknownFrameException: Unable to locate a frame with name FrameMain c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1739:in `initialize' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:222:in `new' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:222:in `frame' ./utilities/utils.rb:75:in `clickLogOffButton' TestContainer.rb:44:in `test_logOff' Any ideas? Best regards Leon -------------------- 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 a scheme approved under Professional Standards Legislation. -------------------- 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/20050902/4223da80/attachment.html From bret at pettichord.com Fri Sep 2 11:30:44 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 02 Sep 2005 10:30:44 -0500 Subject: [Wtr-general] Frames problem In-Reply-To: <258593F548C79D4AB7CBA2AE72DEBEC892CF31@HQ-EXVS02.anteon.co m> Message-ID: <5.1.0.14.2.20050902101704.0329a048@127.0.0.1> At 08:45 AM 9/2/2005, Boyt, Darrel wrote: >My thinking about frames doesn't seem to be in line with Watir's >implementation. My thinking is that a frameset is basically a container >of frames that are separate web pages and that the methods I can access >with "ie" I should be able to access with "ie.frame(:index, 1)". I'm >looking for things that tell me about the page like .url, .html, and the >"show" methods (.show_divs, .show_forms, .show_frames, .show_images, >.show_labels, .show_links, .show_spans, .show_tables). > >Am I way off in left field on this??? No. I basically agree. We just haven't gotten there yet. For now, try these: ie.frame(...).divs.show ie.frame(...).forms.show ie.frame(...).frames.show ie.frame(...).images.show ie.frame(...).labels.show ie.frame(...).links.show ie.frame(...).spans.show ... These should work in 1.4.x and earlier, too. I plan to fill out this list with ie.frame(...).elements.show, which will work like *.show_all_objects. (In HEAD, these commands will work with any object. In 1.4.x, they only work with frames and forms and cells and ie and divs and spans and paragraphs.) Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Fri Sep 2 11:12:19 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 02 Sep 2005 10:12:19 -0500 Subject: [Wtr-general] new installers, autoit In-Reply-To: <00f501c5af8f$b3d6f380$6402a8c0@telperion> References: <71D28C8451BFD5119B2B00508BE26E6409E11AC7@pasmail3.office.tmcs> <5.1.0.14.2.20050901234602.0327d990@127.0.0.1> Message-ID: <5.1.0.14.2.20050902100714.03285308@127.0.0.1> At 02:26 AM 9/2/2005, Dave Burt wrote: >You can't register the AutoIt DLL with the RubyGems, can you? That's >another plus for the one-click installer. Right now the gem does not register this DLL. I do have a way around this problem, but i don't have a way to unregister it. Consequently, it would block uninstallation. Instead the Gem doc currently instructs you to do this manually. I've talked to Chad Fowler (ruby-gem author) about this. He suggested the workaround, and i think we agreed that it would be better if the gem system had install and uninstall hooks. >Do you see AutoIt remaining as part of the Watir distribution, or being >replaced by Watir popup-handling methods that just use COM? Raghu and the folks and Qantom are creating a Win32 library in Ruby that we plan to switch over to for our popup handling methods. This is an all-ruby library. I'll make sure it has a gem. We plan to switch over to using this library instead of AutoIt. Bret _____________________ Bret Pettichord www.pettichord.com From DBoyt at anteon.com Fri Sep 2 11:51:12 2005 From: DBoyt at anteon.com (Boyt, Darrel) Date: Fri, 2 Sep 2005 11:51:12 -0400 Subject: [Wtr-general] (no subject) Message-ID: <258593F548C79D4AB7CBA2AE72DEBEC898079D@HQ-EXVS02.anteon.com> Thanks, Bret. Works as advertised! Darrel Boyt Systems Analyst Anteon Corporation Montgomery, Alabama At 11:30 AM 9/2/2005, Bret Pettichord wrote: >No. I basically agree. We just haven't gotten there yet. > >For now, try these: > > ie.frame(...).divs.show > ie.frame(...).forms.show > ie.frame(...).frames.show > ie.frame(...).images.show > ie.frame(...).labels.show > ie.frame(...).links.show > ie.frame(...).spans.show > ... > >These should work in 1.4.x and earlier, too. > >I plan to fill out this list with ie.frame(...).elements.show, which will >work like *.show_all_objects. > >(In HEAD, these commands will work with any object. In 1.4.x, they only >work with frames and forms and cells and ie and divs and spans and paragraphs.) > >Bret > > >_____________________ > Bret Pettichord > www.pettichord.com From DBoyt at anteon.com Fri Sep 2 11:55:02 2005 From: DBoyt at anteon.com (Boyt, Darrel) Date: Fri, 2 Sep 2005 11:55:02 -0400 Subject: [Wtr-general] Frames problem Message-ID: <258593F548C79D4AB7CBA2AE72DEBEC89807A4@HQ-EXVS02.anteon.com> Actually, ie.frame(...).forms.show and ie.frame(...).frames.show don't seem to work. I get "NoMethodError: undefined method..." for these two. Darrel Boyt Systems Analyst Anteon Corporation Montgomery, Alabama -----Original Message----- From: Boyt, Darrel Sent: Friday, September 02, 2005 10:51 AM To: 'wtr-general at rubyforge.org' Subject: Thanks, Bret. Works as advertised! Darrel Boyt Systems Analyst Anteon Corporation Montgomery, Alabama At 11:30 AM 9/2/2005, Bret Pettichord wrote: >No. I basically agree. We just haven't gotten there yet. > >For now, try these: > > ie.frame(...).divs.show > ie.frame(...).forms.show > ie.frame(...).frames.show > ie.frame(...).images.show > ie.frame(...).labels.show > ie.frame(...).links.show > ie.frame(...).spans.show > ... > >These should work in 1.4.x and earlier, too. > >I plan to fill out this list with ie.frame(...).elements.show, which >will work like *.show_all_objects. > >(In HEAD, these commands will work with any object. In 1.4.x, they only >work with frames and forms and cells and ie and divs and spans and >paragraphs.) > >Bret > > >_____________________ > Bret Pettichord > www.pettichord.com From bret at pettichord.com Fri Sep 2 12:33:05 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 02 Sep 2005 11:33:05 -0500 Subject: [Wtr-general] Anyone integrate ActiveRecord with Watir? In-Reply-To: <72799cd705090109283ad6dbbc@mail.gmail.com> Message-ID: <5.1.0.14.2.20050902113239.032cbc88@127.0.0.1> At 11:28 AM 9/1/2005, Chris McMahon wrote: >Anyone built an object-relational database interface into a Ruby test >system? Care to share any code? This is a good question for ruby-talk. _____________________ Bret Pettichord www.pettichord.com From Tierney at rdacorp.com Fri Sep 2 13:41:18 2005 From: Tierney at rdacorp.com (Mike Tierney) Date: Fri, 2 Sep 2005 13:41:18 -0400 Subject: [Wtr-general] How do you invoke autoIt from a Watir script ? Message-ID: <7F56E1BD6DF3A34DB97A11A4494C6FB70268EFF8@corpexch.rdacorp.com> Thanks to all. I used this one and it works require 'win32ole' $autoit = WIN32OLE.new("AutoItX3.Control") $autoit.mouseclick "left" ________________________________ From: wtr-general-bounces at rubyforge.org on behalf of Dave Burt Sent: Thu 9/1/2005 6:02 PM -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 3381 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050902/a1fa22c7/attachment.bin From Tierney at rdacorp.com Fri Sep 2 14:25:06 2005 From: Tierney at rdacorp.com (Mike Tierney) Date: Fri, 2 Sep 2005 14:25:06 -0400 Subject: [Wtr-general] multi-selecting a list object Message-ID: <7F56E1BD6DF3A34DB97A11A4494C6FB70268EFF7@corpexch.rdacorp.com> I looked for a method in WATIR to select_list(multiple items within the list) but I didn't see one. This would be equivalent to <CTL> clicking items on the list if that is allowed by the control. Is there one / what would be the syntax ? In any event I have a keystroke workaround for my current problem, so I am just curious if there is a nicer way to do it. thx - Mike T. From dave at burt.id.au Sat Sep 3 02:09:00 2005 From: dave at burt.id.au (Dave Burt) Date: Sat, 3 Sep 2005 16:09:00 +1000 Subject: [Wtr-general] Ruby - database using ActiveRecord, Java integration References: <20050901021030.24503.qmail@web33307.mail.mud.yahoo.com> Message-ID: <004601c5b04d$fc2ec0e0$6402a8c0@telperion> This is a reply to several questions from the last few days on database connectivity. Firstly, ActiveRecord is quite handy for dealing with databases, as long as they don't have multi-column keys and other interesting non-Railsy things like that. Find out how here: http://wiki.rubyonrails.com/rails/show/HowToUseActiveRecordOutsideRails Active Record is available via rubygems: "gem install activerecord". If you need to use ADO (i.e. for a MS SQL Server database), you will also need ADO.rb. You can get it here: http://www.dave.burt.id.au/ruby/dbd-ado.zip Now, that is a DBD (DataBase Driver) for the DBI library (common DataBase Interface), which you can use directly - drivers exist for most popular databases. This is how I would recommend accessing a database from Ruby for testing purposes. You can read about DBI here: http://www.kitebird.com/articles/ruby-dbi.html Now, Java! You can easily interface with Java using JRuby. JRuby isn't a library, it's a separate Ruby interpreter that runs under Java: http://jruby.sourceforge.net/ Then you can do cool stuff like this: http://redhanded.hobix.com/bits/funkedOutJavaRubyAggregator.html Write back if any of this is unclear. Cheers, Dave From dave at burt.id.au Sat Sep 3 02:21:36 2005 From: dave at burt.id.au (Dave Burt) Date: Sat, 3 Sep 2005 16:21:36 +1000 Subject: [Wtr-general] Ruby - database using ActiveRecord, Java integration References: <20050901021030.24503.qmail@web33307.mail.mud.yahoo.com> <004601c5b04d$fc2ec0e0$6402a8c0@telperion> Message-ID: <004c01c5b04f$bd16f330$6402a8c0@telperion> > ...This is how I would recommend accessing a database from Ruby for > testing purposes. You can read about DBI here: DBI's more complicated than using an ORM such as ActiveRecord or Lafcadio http://lafcadio.rubyforge.org/tutorial.html From zeljko.filipin at gmail.com Sat Sep 3 04:53:53 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Sat, 3 Sep 2005 10:53:53 +0200 Subject: [Wtr-general] multi-selecting a list object In-Reply-To: <7F56E1BD6DF3A34DB97A11A4494C6FB70268EFF7@corpexch.rdacorp.com> Message-ID: <4319647b.475d0a68.2314.633d@mx.gmail.com> This will select two options in select box that allows multiple items to be selected. ie.selectBox(:index,1).select('select me') ie.selectBox(:index,1).select('select me too') Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Mike Tierney Sent: Friday, September 02, 2005 8:25 PM To: Watir Subject: [Wtr-general] multi-selecting a list object I looked for a method in WATIR to select_list(multiple items within the list) but I didn't see one. This would be equivalent to <CTL> clicking items on the list if that is allowed by the control. Is there one / what would be the syntax ? In any event I have a keystroke workaround for my current problem, so I am just curious if there is a nicer way to do it. thx - Mike T. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From guptasudhir80 at gmail.com Mon Sep 5 00:18:23 2005 From: guptasudhir80 at gmail.com (SUDHIR GUPTA) Date: Mon, 5 Sep 2005 09:48:23 +0530 Subject: [Wtr-general] Unable to click image In-Reply-To: <mailman.2522.1125892871.4374.wtr-general@rubyforge.org> References: <mailman.2522.1125892871.4374.wtr-general@rubyforge.org> Message-ID: <b1705fe705090421183a83f873@mail.gmail.com> Hii I am new to Watir can some help me. I am unable to click the image which has a javascript associated with it can some one help me. Below is the code line i am using and below that is the HTML reference. ie.image(:src, /sat_login_03c.gif/).fire_event("onclick") i also used, ie.image(:src, /sat_login_03c.gif/).click() ---------html reference-- <tr> <td nowrap><img src="images/sat_login_03a.gif" width="256" height="80"><SCRIPT TYPE="text/javascript"> <!-- var sr = new submitroll("images/sat_login_03b1.gif","images/sat_login_03b2.gif","mysubmit"); sr.alt="Login"; sr.width=60; sr.height=80; sr.write(); //--> </SCRIPT><NOSCRIPT><input name="submit" value="Login"></NOSCRIPT><img src="images/sat_login_03c.gif" width="84" height="80"></td> </tr> Thanks and Regards Sudhir -- A little Consideration, a little Thought for Others, makes all the difference Sudhir Kumar Gupta Persistent System Pvt Ltd ------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050905/e7146c4c/attachment.html From guptasudhir80 at gmail.com Mon Sep 5 01:35:56 2005 From: guptasudhir80 at gmail.com (SUDHIR GUPTA) Date: Mon, 5 Sep 2005 11:05:56 +0530 Subject: [Wtr-general] ie.show_frames gives a output message access denied. Message-ID: <b1705fe705090422357add796a@mail.gmail.com> Hii, ie.show_frames() gives and ouput message frame index 0 --Access denied-- how do in access this frame also when i try to access the frame using ie.frame(:id, 0) the message is wrong number of arguements. can some help me on this. The source for HTML is <html> <head> <title>Satellite Manager Thanks and Regards Sudhir Gupta - A little Consideration, a little Thought for Others, makes all the difference Sudhir Kumar Gupta MTS-Testing and Quality Engg Persistent System Pvt Ltd ------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050905/c72375c6/attachment.html From jim_che_tih at yahoo.com Mon Sep 5 05:36:20 2005 From: jim_che_tih at yahoo.com (jim che) Date: Mon, 5 Sep 2005 02:36:20 -0700 (PDT) Subject: [Wtr-general] Re:Ruby - database using ActiveRecord, Java integration Message-ID: <20050905093620.66208.qmail@web33305.mail.mud.yahoo.com> Hi Dave I am newbee.I found the DBI is for Linux like system not for win32 . Does the DBI for win32 is exist? jim __________________________________________________ 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/20050905/6adb1fbf/attachment.html From guptasudhir80 at gmail.com Mon Sep 5 07:30:32 2005 From: guptasudhir80 at gmail.com (SUDHIR GUPTA) Date: Mon, 5 Sep 2005 17:00:32 +0530 Subject: [Wtr-general] Unable to locate frames Message-ID: Hii, ie.show_all_objects() shows 2 frames but when i try to access this frames using ie.frame('frame name') the error message is displayed 'Unable to locate the frame with name "frame name" Kindly some help me out and give me his valuable suggestion. Thanks and Regards Sudhir -- A little Consideration, a little Thought for Others, makes all the difference Sudhir Kumar Gupta MTS- Testing and Quality Engg Persistent System Pvt Ltd ------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050905/3655700e/attachment.html From dave at burt.id.au Mon Sep 5 17:18:13 2005 From: dave at burt.id.au (Dave Burt) Date: Tue, 6 Sep 2005 07:18:13 +1000 Subject: [Wtr-general] Re:Ruby - database using ActiveRecord, Java integration References: <20050905093620.66208.qmail@web33305.mail.mud.yahoo.com> Message-ID: <000a01c5b25f$53b97ef0$6402a8c0@telperion> > I am newbee.I found the DBI is for Linux like system not for win32 . Does > the > DBI for win32 is exist? I am pretty sure it comes with the One-Click Installer, except that the ADO driver has been left out. Cheers, Dave From exortech at gmail.com Mon Sep 5 22:31:05 2005 From: exortech at gmail.com (Owen Rogers) Date: Mon, 5 Sep 2005 22:31:05 -0400 Subject: [Wtr-general] Problem with running tests in a suite In-Reply-To: <5.1.0.14.2.20050830005355.02e25430@127.0.0.1> References: <5.1.0.14.2.20050830005355.02e25430@127.0.0.1> Message-ID: > # creating a new IE instance immediately after quiting a previous one > # causes intermittent RPC unavailable errors and other weirdness. > # Make sure to wait 1 second after eating before swimming... > until (Time.now - @@closed_last) > 1; sleep 0.1; end if @@closed_last > > immediate preceeds: > > @ie = WIN32OLE.new('InternetExplorer.Application') > > Any reason we shouldn't add this code to Watir? yes. 2 reasons: 1) it will slow down your tests substantially. 1 second doesn't seem like a long delay for a single test, but it quickly adds up. 2) this may still produce intermittent failures on slow machines or servers under heavy load. i still haven't looked at the code that we used to deal with this problem. one approach that i remember that we tried was to monitor the list of running processes to ensure that the closed ie process had properly terminated -- the test thread would simply wait until the ie process it had created was gone. i think that we ended up coming up with something more elegant using the COM api, but i can't remember what it is. cheers, owen. -- Owen Rogers | http://dotnetjunkies.com/weblog/exortech | CruiseControl.NET - http://ccnet.thoughtworks.com From angrez at gmail.com Mon Sep 5 23:44:26 2005 From: angrez at gmail.com (Angrez Singh) Date: Tue, 6 Sep 2005 09:14:26 +0530 Subject: [Wtr-general] ie.show_frames gives a output message access denied. In-Reply-To: References: Message-ID: Hi, I think you should read the documentation before going further with implementation. There are only three ways to access frames as per documentation and these are: ie.frame(:index, 1) ie.frame(:name , 'main_frame') ie.frame('main_frame') # in this case, just a name is supplied :id is not used while accessing the frames, and also the index starts from 1. Regards, Angrez On 9/5/05, SUDHIR GUPTA wrote: > > > Hii, > ie.show_frames() gives and ouput message > frame index 0 --Access denied-- > how do in access this frame also when i try to access the frame using > ie.frame(:id, 0) the message is wrong number of arguements. > can some help me on this. > The source for HTML is > > > Satellite Manager > > > > > > > > Thanks and Regards > Sudhir Gupta > - > > A little Consideration, a little Thought for Others, makes all the > difference > Sudhir Kumar Gupta > MTS-Testing and Quality Engg > Persistent System Pvt Ltd > > ------------------------ > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- Angrez Singh (angrez_singh at persistent.co.in) Member of Technical Staff Persistent Systems Pvt. Ltd (http://www.persistentsys.com/) Ph - +91 (20) 25653458 (o) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050906/5576ad31/attachment.html From jim_che_tih at yahoo.com Tue Sep 6 01:30:56 2005 From: jim_che_tih at yahoo.com (jim che) Date: Mon, 5 Sep 2005 22:30:56 -0700 (PDT) Subject: [Wtr-general] Error in the DBI Message-ID: <20050906053056.73780.qmail@web33301.mail.mud.yahoo.com> The simple.rb is below and when I run it the error appears require "dbi" begin # connect to the MySQL server dbh = DBI.connect("dbi:Mysql:test:localhost", "testuser", "testpass") # get server version string and display it row = dbh.select_one("SELECT VERSION()") puts "Server version: " + row[0] rescue DBI::DatabaseError => e puts "An error occurred" puts "Error code: #{e.err}" puts "Error message: #{e.errstr}" ensure # disconnect from server dbh.disconnect if dbh end Error: c:/program files/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:502:in `load_driver': Co uld not load driver (uninitialized constant MysqlError) (DBI::InterfaceError) from c:/program files/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:392:in `_ge t_full_driver' from c:/program files/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:372:in `con nect' from database.rb:5 but I had installed the DBI I don't know why it happens __________________________________________________ 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/20050905/713b5139/attachment.html From jim_che_tih at yahoo.com Tue Sep 6 02:13:03 2005 From: jim_che_tih at yahoo.com (jim che) Date: Mon, 5 Sep 2005 23:13:03 -0700 (PDT) Subject: [Wtr-general] About the installation of DBI Message-ID: <20050906061303.37793.qmail@web33314.mail.mud.yahoo.com> Hi Dave I found that if I want to use the DBI I first should install the Ruby MySQL Module then install the Ruby DBI Module .But in fact I found these two tools should be installed under the Linux like system. Installation of Ruby MySQL Module : ruby extconf.rb % make % make install Installation of Ruby DBI Module ruby setup.rb config % ruby setup.rb setup % ruby setup.rb install As above shows the Installation of Ruby DBI Module can be executed in win32 but the Ruby MySQL Module cann't installed under windows system the system cann't recognize the 'make' command. So what should I do if I want to use the Ruby DBI under the windows system Thank you very much. jim --------------------------------- Click here to donate to the Hurricane Katrina relief effort. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050905/4785d6da/attachment.html From guptasudhir80 at gmail.com Tue Sep 6 04:14:55 2005 From: guptasudhir80 at gmail.com (SUDHIR GUPTA) Date: Tue, 6 Sep 2005 13:44:55 +0530 Subject: [Wtr-general] Unable to click on links of a frame Message-ID: HIii every one, I am pasting the sample HTML and the code i am using. -----Sample HTML------ Satellite Manager ------Code I am using--------- ie.show_all_objects() shows 2 frames but when i try to access this frames using ie.frame('frame name').links() the error message is displayed 'Unable to locate the frame with name "frame name I am awaiting your kind suggestion on this matter. Thanks and Regards Sudhir Gupta -- A little Consideration, a little Thought for Others, makes all the difference Sudhir Kumar Gupta MTS-Testing and Quality Engg Persistent System Pvt Ltd ------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050906/760e54ad/attachment.html From angrez at gmail.com Tue Sep 6 04:28:41 2005 From: angrez at gmail.com (Angrez Singh) Date: Tue, 6 Sep 2005 13:58:41 +0530 Subject: [Wtr-general] Unable to click on links of a frame In-Reply-To: References: Message-ID: Hi, You are using 'frame name' to access the frame but there is no frame with the name 'frame name'. I think this should work: ie.frame('mainFrame').links() Regards, Angrez On 9/6/05, SUDHIR GUPTA wrote: > > HIii every one, > I am pasting the sample HTML and the code i am using. > -----Sample HTML------ > > > Satellite Manager > > > > > > > > ------Code I am using--------- > ie.show_all_objects() shows 2 frames but when i try to access this > frames > using ie.frame('frame name').links() > the error message is displayed 'Unable to locate the frame with name > "frame name > I am awaiting your kind suggestion on this matter. > > Thanks and Regards > Sudhir Gupta > > > -- > A little Consideration, a little Thought for Others, makes all the > difference > Sudhir Kumar Gupta > MTS-Testing and Quality Engg > Persistent System Pvt Ltd > > ------------------------ > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- Angrez Singh (angrez_singh at persistent.co.in) Member of Technical Staff Persistent Systems Pvt. Ltd (http://www.persistentsys.com/) Ph - +91 (20) 25653458 (o) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050906/de4ccbe8/attachment.html From jim_che_tih at yahoo.com Tue Sep 6 05:29:57 2005 From: jim_che_tih at yahoo.com (jim che) Date: Tue, 6 Sep 2005 02:29:57 -0700 (PDT) Subject: [Wtr-general] What's the problem in my process of DBI installation Message-ID: <20050906092957.90007.qmail@web33305.mail.mud.yahoo.com> Hi all I want to use the database operations in ruby script,so I must install the Mysql-Ruby module and the DBI module The ruby I use is 1.8.2 for win32. I download the mysql-ruby-2.4.2-1-winpkg(the newest version for win32) but the doc of mysql-ruby-2.4.2-1-winpkg said "it support the ruby version 1.6.6 well". I installed the mysql-ruby-2.4.2-1-winpkg by run 'ruby install.rb' first and then installed the ruby-dbi-all-0.0.21 by typing the command ' ruby setup.rb config --with=dbi,dbd_mysql ruby setup.rb setup ruby setup.rb install' but after finish all installation I run the script "simple.rb" the simple.rb contains few programs as below require "dbi" begin # connect to the MySQL server dbh = DBI.connect("dbi:Mysql:test:localhost", "testuser", "testpass") # get server version string and display it row = dbh.select_one("SELECT VERSION()") puts "Server version: " + row[0] rescue DBI::DatabaseError => e puts "An error occurred" puts "Error code: #{e.err}" puts "Error message: #{e.errstr}" ensure # disconnect from server dbh.disconnect if dbh end but the system print the errors c:/program files/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:502:in `load_driver': Co uld not load driver (uninitialized constant MysqlError) (DBI::InterfaceError) from c:/program files/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:392:in `_ge t_full_driver' from c:/program files/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:372:in `con nect' from simple.rb:5 please help me Thank you __________________________________________________ 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/20050906/be6caa9c/attachment.html From christopher.mcmahon at gmail.com Tue Sep 6 09:16:52 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 6 Sep 2005 08:16:52 -0500 Subject: [Wtr-general] About the installation of DBI In-Reply-To: <20050906061303.37793.qmail@web33314.mail.mud.yahoo.com> References: <20050906061303.37793.qmail@web33314.mail.mud.yahoo.com> Message-ID: <72799cd70509060616776dfa07@mail.gmail.com> Google "nmake". -Chris On 9/6/05, jim che wrote: > Hi Dave > I found that if I want to use the DBI I first should install the Ruby > MySQL Module then install the Ruby DBI Module .But in fact I found these two > tools should be installed under the Linux like system. > > Installation of Ruby MySQL Module : > ruby extconf.rb > % make > % make install > > Installation of Ruby DBI Module > ruby setup.rb config > % ruby setup.rb setup > % ruby setup.rb install > > As above shows the Installation of Ruby DBI Module can be executed in win32 > but the Ruby MySQL Module cann't installed under windows system the system > cann't recognize the 'make' command. > > So what should I do if I want to use the Ruby DBI under the windows system > > Thank you very much. > > > > jim > > > > > > > > > ________________________________ > Click here to donate to the Hurricane Katrina relief effort. > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > From dave at burt.id.au Tue Sep 6 09:36:53 2005 From: dave at burt.id.au (Dave Burt) Date: Tue, 6 Sep 2005 23:36:53 +1000 Subject: [Wtr-general] Error in the DBI References: <20050906053056.73780.qmail@web33301.mail.mud.yahoo.com> Message-ID: <005f01c5b2e8$0b1576c0$6402a8c0@telperion> > dbh = DBI.connect("dbi:Mysql:test:localhost", "testuser", "testpass") Ah yes, MySQL. You have some options: 1) Use ODBC. connect("dbi:odbc:your_mysql_db_dsn") 2) Get the pure-Ruby MySQL wrapper (I don't think you can use DBI with this, so your code won't be portable to other DBMSes): http://raa.ruby-lang.org/list.rhtml?name=ruby-mysql 3) Build Ruby/MySQL. That's non-trivial, and probably not an option if you're not a C/C++ programmer. By the way, these questions are the kinds of questions you will find better help on general Ruby forums than this one: * mailto:ruby-talk at ruby-lang.org * news:comp.lang.ruby * http://blade.nagaokaut.ac.jp/ruby/ruby-talk/index.shtml * irc://irc.freenode.net/ruby-talk Cheers, Dave From bret at pettichord.com Tue Sep 6 02:36:51 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 06 Sep 2005 01:36:51 -0500 Subject: [Wtr-general] ie.show_frames gives a output message access denied. In-Reply-To: References: Message-ID: <5.1.0.14.2.20050906013522.033b5fb0@127.0.0.1> Actually adding support for frame(:id, 'foo') was recently added. I think it was included in 1.4.1. The docs may not have been updated (sorry). (Eventually i hope to get these docs to be generated automatically so they are automatically in sync with the code.) Bret At 10:44 PM 9/5/2005, Angrez Singh wrote: >Hi, > >I think you should read the documentation before going further with >implementation. There are only three ways to access frames as per >documentation and these are: > >ie.frame(:index, 1) >ie.frame(:name , 'main_frame') >ie.frame('main_frame') # in this case, just a name is supplied > >:id is not used while accessing the frames, and also the index starts from 1. > >Regards, >Angrez > > >On 9/5/05, SUDHIR GUPTA ><guptasudhir80 at gmail.com> wrote: >> >>Hii, >> ie.show_frames() gives and ouput message >>frame index 0 --Access denied-- >> >>how do in access this frame also when i try to access the frame using >>ie.frame(:id, 0) the message is wrong number of arguements. >> >>can some help me on this. >> >>The source for HTML is >> >> >>Satellite Manager >> >> >> >> >> >> >> >> >> >> >> >>Thanks and Regards >>Sudhir Gupta >>- >> >>A little Consideration, a little Thought for Others, makes all the difference >>Sudhir Kumar Gupta >>MTS-Testing and Quality Engg >>Persistent System Pvt Ltd >> >>------------------------ >> >>_______________________________________________ >>Wtr-general mailing list >>Wtr-general at rubyforge.org >>http://rubyforge.org/mailman/listinfo/wtr-general >> > > > >-- >Angrez Singh >(angrez_singh at persistent.co.in) >Member of Technical Staff >Persistent Systems Pvt. Ltd >(http://www.persistentsys.com/) >Ph - +91 (20) 25653458 (o) >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From kim_hoy at pacbell.net Tue Sep 6 21:29:42 2005 From: kim_hoy at pacbell.net (Kim P. Hoy) Date: Tue, 6 Sep 2005 18:29:42 -0700 Subject: [Wtr-general] Need help on button that can only be activated by mouse Message-ID: ie.button(:name,/save/).click could not cause the button to submit I tried to use AutoIt to click on the button, but that did not work neither t_s() returned name: save type: image id: value: Any help is greatly appreciated. Thank you --Kim From jim_che_tih at yahoo.com Tue Sep 6 22:06:37 2005 From: jim_che_tih at yahoo.com (jim che) Date: Tue, 6 Sep 2005 19:06:37 -0700 (PDT) Subject: [Wtr-general] Re:Error in the DBI Message-ID: <20050907020637.63747.qmail@web33305.mail.mud.yahoo.com> Hi Dave I download the ruby-mysql-0.2.6 and copy the file 'Mysql.rb' to the rubylibdir Then I run the 'test.rb' the result was as below 192.168.0.5 is the host which installed the mysql jim and 123456 is the uername and password jim_opsuite is the database name F:\resources\ruby-mysql-0.2.6>ruby test.rb 192.168.0.5 jim 123456 jim_opsuite connect............../mysql.rb:453:in `read': Client does not support authentica tion protocol requested by server; consider upgrading MySQL client (Mysql::Error ) from ./mysql.rb:130:in `real_connect' from ./mysql.rb:91:in `initialize' from ./mysql.rb:1085:in `new' from ./mysql.rb:1085:in `connect' from ./t/00connect.rb:1 from test.rb:23:in `load' from test.rb:23 from test.rb:19:in `each' from test.rb:19 How can I solve this problem? Thank you jim --------------------------------- Click here to donate to the Hurricane Katrina relief effort. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050906/c5eb9e05/attachment.html From bret at pettichord.com Wed Sep 7 00:59:32 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 06 Sep 2005 23:59:32 -0500 Subject: [Wtr-general] Need help on button that can only be activated by mouse In-Reply-To: Message-ID: <5.1.0.14.2.20050906235746.032e83b8@127.0.0.1> Send us the html for the button. I suspect it's being triggered by an event and you'll have to use ie.button(:name, /save/).fire_event('foo') At 08:29 PM 9/6/2005, Kim P. Hoy wrote: >ie.button(:name,/save/).click could not cause the button to submit >I tried to use AutoIt to click on the button, but that did not work neither >t_s() returned >name: save >type: image >id: >value: > >Any help is greatly appreciated. >Thank you >--Kim _____________________ Bret Pettichord www.pettichord.com From kim_hoy at pacbell.net Wed Sep 7 01:25:12 2005 From: kim_hoy at pacbell.net (Kim P. Hoy) Date: Tue, 6 Sep 2005 22:25:12 -0700 Subject: [Wtr-general] Need help on button that can only beactivated by mouse In-Reply-To: <5.1.0.14.2.20050906235746.032e83b8@127.0.0.1> Message-ID: Thank you --Kim -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Bret Pettichord Sent: Tuesday, September 06, 2005 10:00 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Need help on button that can only beactivated by mouse Send us the html for the button. I suspect it's being triggered by an event and you'll have to use ie.button(:name, /save/).fire_event('foo') At 08:29 PM 9/6/2005, Kim P. Hoy wrote: >ie.button(:name,/save/).click could not cause the button to submit >I tried to use AutoIt to click on the button, but that did not work neither >t_s() returned >name: save >type: image >id: >value: > >Any help is greatly appreciated. >Thank you >--Kim _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050906/abee2a49/attachment.html From jim_che_tih at yahoo.com Wed Sep 7 01:24:22 2005 From: jim_che_tih at yahoo.com (jim che) Date: Tue, 6 Sep 2005 22:24:22 -0700 (PDT) Subject: [Wtr-general] I can use the DBI now Message-ID: <20050907052422.76604.qmail@web33309.mail.mud.yahoo.com> Hi Dave I can use the DBI now . Thank you for your and other people's help. I found the version of Mysql ,ruby and ruby-mysql must match each other The version of these tools should be Mysql-4.0.25 (for win32) (I first use the 4.1.X and it can't work with mysql-ruby) The ruby should be 1.8.2 for win32 The Ruby-Mysql shoud be 0.2.6 (you should copy the 'mysql.rb' to your rubylibdir) And ruby-dbi-all-0.0.21 ps: I do it under the win32. jim --------------------------------- Click here to donate to the Hurricane Katrina relief effort. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050906/bf29ae4c/attachment.html From bret at pettichord.com Wed Sep 7 01:48:31 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 07 Sep 2005 00:48:31 -0500 Subject: [Wtr-general] Problem with running tests in a suite In-Reply-To: References: <5.1.0.14.2.20050830005355.02e25430@127.0.0.1> <5.1.0.14.2.20050830005355.02e25430@127.0.0.1> Message-ID: <5.1.0.14.2.20050907003950.032dc328@127.0.0.1> At 09:31 PM 9/5/2005, Owen Rogers wrote: > > Any reason we shouldn't add this code to Watir? > >yes. 2 reasons: >1) it will slow down your tests substantially. 1 second doesn't seem >like a long delay for a single test, but it quickly adds up. >2) this may still produce intermittent failures on slow machines or >servers under heavy load. > >i still haven't looked at the code that we used to deal with this >problem. one approach that i remember that we tried was to monitor >the list of running processes to ensure that the closed ie process had >properly terminated -- the test thread would simply wait until the ie >process it had created was gone. >i think that we ended up coming up with something more elegant using >the COM api, but i can't remember what it is. Good points. My understanding is that when we do WIN32OLE.new('InternetExplorer.Application') for the first time, both a server and a client are created. This is an Explorer COM Server (not a web server). Later invokations from the same process create a new client attached to the same server. (This is why they share the same session and cookies.) The error occurs when we close the last client of the server, causing it to start shutting down, but then create a new client which is attached to the server that is shutting down. The easy way to avoid this problem is to never shut down the last client until we are done testing. This could be implemented by attaching an extra client (invisible) to a class variable of Watir::IE when IE.new was first called. I think this would be a wholey reliable fix. I'm not sure the cost in performance, but it could be measured. Thoughts? Or to followup on your original post... The Instiki Watir test suite includes some Windows process handling code that we might be able to snarf. Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Sep 7 02:01:47 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 07 Sep 2005 01:01:47 -0500 Subject: [Wtr-general] Need help on button that can only beactivated by mouse In-Reply-To: References: <5.1.0.14.2.20050906235746.032e83b8@127.0.0.1> Message-ID: <5.1.0.14.2.20050907005847.032e6800@127.0.0.1> It looks like a plain old button. I dunno why click doesn't work. You could try ie.form(:action, "adm_sdrinfo.php").submit as an alternative. That should also work.
Bret At 12:25 AM 9/7/2005, Kim P. Hoy wrote: >Thank you > >--Kim > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Bret Pettichord >Sent: Tuesday, September 06, 2005 10:00 PM >To: wtr-general at rubyforge.org >Subject: Re: [Wtr-general] Need help on button that can only beactivated >by mouse > > >Send us the html for the button. I suspect it's being triggered by an event >and you'll have to use > ie.button(:name, /save/).fire_event('foo') > >At 08:29 PM 9/6/2005, Kim P. Hoy wrote: > >ie.button(:name,/save/).click could not cause the button to submit > >I tried to use AutoIt to click on the button, but that did not work neither > >t_s() returned > >name: save > >type: image > >id: > >value: > > > >Any help is greatly appreciated. > >Thank you > >--Kim > >_____________________ > 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 _____________________ Bret Pettichord www.pettichord.com From dave at burt.id.au Wed Sep 7 03:45:27 2005 From: dave at burt.id.au (Dave Burt) Date: Wed, 7 Sep 2005 17:45:27 +1000 Subject: [Wtr-general] I can use the DBI now References: <20050907052422.76604.qmail@web33309.mail.mud.yahoo.com> Message-ID: <002401c5b380$1dc39570$6402a8c0@telperion> That's interesting that you got DBI working with Ruby-Mysql, the pure Ruby MySQL interface. I would like to see that updated for MySQL 4.1 and 5. Cheers, Dave ----- Original Message ----- From: jim che To: wtr-general at rubyforge.org Sent: Wednesday, September 07, 2005 3:24 PM Subject: [Wtr-general] I can use the DBI now Hi Dave I can use the DBI now . Thank you for your and other people's help. I found the version of Mysql ,ruby and ruby-mysql must match each other The version of these tools should be Mysql-4.0.25 (for win32) (I first use the 4.1.X and it can't work with mysql-ruby) The ruby should be 1.8.2 for win32 The Ruby-Mysql shoud be 0.2.6 (you should copy the 'mysql.rb' to your rubylibdir) And ruby-dbi-all-0.0.21 ps: I do it under the win32. jim Click here to donate to the Hurricane Katrina relief effort. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Thu Sep 8 01:02:08 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 08 Sep 2005 00:02:08 -0500 Subject: [Wtr-general] WIN32OLE doesn't seem to support UTF-8. Message-ID: <5.1.0.14.2.20050907234735.033e7e30@127.0.0.1> Has anyone been able to use WIN32OLE with international characters? I would like to access international text from Excel and Explorer using WIN32OLE. But whenever i do this in Ruby, i get "????????". (This code works fine for English). data = $sheet.cells(1, 'b').value $sheet.cells(2, 'b').value = data I'm pretty sure this is a Ruby problem, because the equivalent script in VBA works fine. Set From = Worksheets("Sheet1").Cells(1, "b") Set Target = Worksheets("Sheet1").Cells(2, "b") Target.Value = From.Value I've been testing this with UTF-8 encoded Japanese text, although i am hoping to find a general solution (not specific to any code-page). When i looked through the Ruby code (win32ole.c) and it seems that string return values are being passed through this function: static LPWSTR ole_mb2wc(pm, len) char *pm; int len; { int size; LPWSTR pw; size = MultiByteToWideChar(CP_ACP, 0, pm, len, NULL, 0); pw = SysAllocStringLen(NULL, size - 1); MultiByteToWideChar(CP_ACP, 0, pm, len, pw, size); return pw; } "The MultiByteToWideChar function maps a character string to a wide-character (Unicode) string. The character string mapped by this function is not necessarily from a multibyte character." I don't really understand what is happening here. It seems to me that both the input and output strings have to have their encoding specified here. Here ANSI is hard-coded (CP_ACP) but i don't know if this is for input or output. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/unicode_17si.asp I'd appreciate any insight into this matter that you might have. I've spent a couple days reading up on UTF-8 and Unicode, but don't really have any experience with these things. I am using 1.8.2-15 Bret _____________________ Bret Pettichord www.pettichord.com From alex at verk.info Thu Sep 8 01:14:27 2005 From: alex at verk.info (Alexey Verkhovsky) Date: Wed, 07 Sep 2005 23:14:27 -0600 Subject: [Wtr-general] WIN32OLE doesn't seem to support UTF-8. In-Reply-To: <5.1.0.14.2.20050907234735.033e7e30@127.0.0.1> References: <5.1.0.14.2.20050907234735.033e7e30@127.0.0.1> Message-ID: <431FC8B3.1060202@verk.info> Bret Pettichord wrote: > I'd appreciate any insight into this matter that you might have. I've > spent a couple days reading up on UTF-8 and Unicode, but don't really > have any experience with these things. Bret, hi Try to add this to your code: # Enable UTF-8 support $KCODE = 'u' require 'jcode' Not sure if it will help for OLE, but it may. Alex From bret at pettichord.com Thu Sep 8 01:20:44 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 08 Sep 2005 00:20:44 -0500 Subject: [Wtr-general] Unicode and Watir In-Reply-To: Message-ID: <5.1.0.14.2.20050908001536.03422ea0@127.0.0.1> What i am trying to do is be able to read text from a page encoded in UTF-8. I can see the Japanese text in the browser and can copy it into Excel or WordPad. So i figure i have the fonts i need. But when i use Ruby WIN32OLE to get the text from Excel or IE, i only get "????". If it were in an odd encoding, i could try to use iconv or pack/unpack or something to convert it. But i can't get the text into Ruby. I'm unsure whether WIN32OLE is limited to ANSI. If i understand correctly (probably not) Shift JIS is just a different code page, rather than a different encoding. So that would explain why it could work. I don't much care about regexp right now. Bret At 05:27 PM 8/31/2005, Peter Chau wrote: >I've had scripts running on a Shift-JIS website to read/write Japanese. >I had more problems configuring Windows, DOS, and the text editor than I >did with Ruby/Watir. > > >From what I remember, I had to install an East Asian Language Package in >Control Panel, Regional and Language Options and then activate Japanese >as a non-unicode program in the advance tab. To set up my text editor. I >had to use a Japanese Font (Arial Unicode MS Japanese script). I haven't >tried Regexp with Japanese characters. > >Peter > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From kim_hoy at pacbell.net Thu Sep 8 01:48:25 2005 From: kim_hoy at pacbell.net (Kim P. Hoy) Date: Wed, 7 Sep 2005 22:48:25 -0700 Subject: [Wtr-general] Need help on button that can onlybeactivated by mouse In-Reply-To: <5.1.0.14.2.20050907005847.032e6800@127.0.0.1> Message-ID: I tried ie.form(:action, "adm_sdrinfo.php").submit but it did not work. I also tried ie.button(:name, /save/).fire_event('onMouseDown') sleep 1 ie.button(:name, /save/).fire_event('onMouseUp') but it did not work neither. --Kim -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Bret Pettichord Sent: Tuesday, September 06, 2005 11:02 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Need help on button that can onlybeactivated by mouse It looks like a plain old button. I dunno why click doesn't work. You could try ie.form(:action, "adm_sdrinfo.php").submit as an alternative. That should also work. Bret At 12:25 AM 9/7/2005, Kim P. Hoy wrote: >Thank you > >--Kim > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Bret Pettichord >Sent: Tuesday, September 06, 2005 10:00 PM >To: wtr-general at rubyforge.org >Subject: Re: [Wtr-general] Need help on button that can only beactivated >by mouse > > >Send us the html for the button. I suspect it's being triggered by an event >and you'll have to use > ie.button(:name, /save/).fire_event('foo') > >At 08:29 PM 9/6/2005, Kim P. Hoy wrote: > >ie.button(:name,/save/).click could not cause the button to submit > >I tried to use AutoIt to click on the button, but that did not work neither > >t_s() returned > >name: save > >type: image > >id: > >value: > > > >Any help is greatly appreciated. > >Thank you > >--Kim > >_____________________ > 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 _____________________ 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 Sep 8 01:43:17 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 08 Sep 2005 00:43:17 -0500 Subject: [Wtr-general] WIN32OLE doesn't seem to support UTF-8. In-Reply-To: <431FC8B3.1060202@verk.info> References: <5.1.0.14.2.20050907234735.033e7e30@127.0.0.1> <5.1.0.14.2.20050907234735.033e7e30@127.0.0.1> Message-ID: <5.1.0.14.2.20050908004219.033e5750@127.0.0.1> At 12:14 AM 9/8/2005, Alexey Verkhovsky wrote: >Bret Pettichord wrote: > >>I'd appreciate any insight into this matter that you might have. I've >>spent a couple days reading up on UTF-8 and Unicode, but don't really >>have any experience with these things. > >Bret, hi > >Try to add this to your code: > ># Enable UTF-8 support >$KCODE = 'u' >require 'jcode' > >Not sure if it will help for OLE, but it may. > >Alex Thanks for the idea. No luck. Here's my complete test script: $KCODE = 'u' require 'jcode' require 'spreadsheet' def copy_column (column) data = $sheet.cells(1, column).value $sheet.cells(2, column).value = data puts data puts data.unpack("U*") puts "length: #{data.length}" puts "jlength: #{data.jlength}" require 'breakpoint';breakpoint end this_dir = File.expand_path(File.dirname(__FILE__)) workbook = Workbook.new("#{this_dir}\\intl_text.xls") workbook.visible = true $sheet = workbook.use_page 1 copy_column 'b' copy_column 'c' _____________________ Bret Pettichord www.pettichord.com From saudaziz at gmail.com Thu Sep 8 02:41:55 2005 From: saudaziz at gmail.com (saud aziz) Date: Wed, 7 Sep 2005 23:41:55 -0700 Subject: [Wtr-general] WIN32OLE doesn't seem to support UTF-8. In-Reply-To: <5.1.0.14.2.20050908004219.033e5750@127.0.0.1> References: <5.1.0.14.2.20050907234735.033e7e30@127.0.0.1> <431FC8B3.1060202@verk.info> <5.1.0.14.2.20050908004219.033e5750@127.0.0.1> Message-ID: <24d0cb38050907234178dc35c2@mail.gmail.com> Have you guys tried checking Yoshidam's page? http://www.yoshidam.net/Ruby.html Following text is from there. Also, notice there is a Perl module as well, and i wonder if that could be reused to make Watir use Perl's Win32 module for popup's handling? 2. Uconv module XMLParser module can process UTF-16 and UTF-8, but cannot process Japanese encoding (e.g. EUC-JP, Shift_JIS and ISO-2022-JP). Uconv module provides the methods to convert UTF-16, UTF-8 or UCS-4 into EUC-JP or CP932, and EUC-JP or CP932 into UTF-16, UTF-8 or UCS-4. - version 0.4.12 download - Document (Japanese) - Document (English) Changes of version 0.4.12 - support Ruby 1.8 Changes of version 0.4.11 - append --enable-compat-win32api option for Win32API compatible CP932 table. Changes of version 0.4.10 - fix memory leaks - append --enable-fullwidth-reverse-solidus option. Changes of version 0.4.9 - add replace_invalid Changes of version 0.4.8 - support the tainted status - check non-shortest form UTF-8 - change Exception into Uconv::Error Changes of version 0.4.6 - fix s2u_conv - add USE_WIN32API Changes of version 0.4.5 - fix u2s_conv - change USC/CP932 conversion table Changes of version 0.4.4 - SJIS to UCS conversion bug Changes of version 0.4.3 - Eliminate non-constant initializers Changes of version 0.4.2 - ZWNBSP-preservative mode Changes of version 0.4.0 - Support CP932 (a variant of Shift_JIS for Japanese Windows) Changes of version 0.3.1 - Fix some memory bugs 8. Unicode library This is a library for Unicode Normalization. - version 0.1 download - Document 12. rbuconv library This is a pure Ruby library for Unicode translation. It can be used on systems without C compilers, and almost compatible with Uconv library. Ruby license. - version 0.1.2 download On 9/7/05, Bret Pettichord wrote: > > At 12:14 AM 9/8/2005, Alexey Verkhovsky wrote: > >Bret Pettichord wrote: > > > >>I'd appreciate any insight into this matter that you might have. I've > >>spent a couple days reading up on UTF-8 and Unicode, but don't really > >>have any experience with these things. > > > >Bret, hi > > > >Try to add this to your code: > > > ># Enable UTF-8 support > >$KCODE = 'u' > >require 'jcode' > > > >Not sure if it will help for OLE, but it may. > > > >Alex > > Thanks for the idea. No luck. Here's my complete test script: > > > $KCODE = 'u' > require 'jcode' > require 'spreadsheet' > > def copy_column (column) > data = $sheet.cells(1, column).value > $sheet.cells(2, column).value = data > puts data > puts data.unpack("U*") > puts "length: #{data.length}" > puts "jlength: #{data.jlength}" > require 'breakpoint';breakpoint > end > > this_dir = File.expand_path(File.dirname(__FILE__)) > workbook = Workbook.new("#{this_dir}\\intl_text.xls") > workbook.visible = true > $sheet = workbook.use_page 1 > > copy_column 'b' > copy_column 'c' > > > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "..man is a human being, not because of his physical powers for physically the camel is his superior; not because of his size for the elephant is larger; not because of his courage for the lion is more courageous; not because of his appetite for the ox has the greater; not because of coitus for the least of the birds is more virile than he, but rather by virtue of his noble aims and ideals. [As a matter of fact] he was only created to know." (Al- Ghazali; The book of Knowledge, Section 1) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050907/150dfbd5/attachment.html From Neumann at encoway.de Thu Sep 8 04:56:19 2005 From: Neumann at encoway.de (Neumann, Carsten - ENCOWAY) Date: Thu, 8 Sep 2005 10:56:19 +0200 Subject: [Wtr-general] get URL of pages shown in frames Message-ID: <0E46E3619326224CB40CC30C2E36364E362BC9@zde008.lenze.com> Is there any possibility of getting the URL or he name of a page shown in a frame? Just like ie.url() returns the URL shown in the address bar. Or is there another possibility to check if the right page is shown in a frame, if I can't check the contained text? Thanks! Carsten Neumann -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050908/ce51b426/attachment.html From christopher.mcmahon at gmail.com Thu Sep 8 09:43:11 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 8 Sep 2005 08:43:11 -0500 Subject: [Wtr-general] Unicode and Watir In-Reply-To: <5.1.0.14.2.20050908001536.03422ea0@127.0.0.1> References: <5.1.0.14.2.20050908001536.03422ea0@127.0.0.1> Message-ID: <72799cd705090806439276829@mail.gmail.com> > I can see the Japanese text in the browser and can copy it into Excel or > WordPad. > > So i figure i have the fonts i need. But when i use Ruby WIN32OLE to get > the text from Excel or IE, i only get "????". Make sure that you can actually *save* the Excel doc with the Japanese text. Save and re-open-- I've got $0.25 that says you get "????" when you re-open your Excel doc. -Chris From bret at pettichord.com Thu Sep 8 11:42:30 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 08 Sep 2005 10:42:30 -0500 Subject: [Wtr-general] WIN32OLE doesn't seem to support UTF-8. In-Reply-To: <24d0cb38050907234178dc35c2@mail.gmail.com> References: <5.1.0.14.2.20050908004219.033e5750@127.0.0.1> <5.1.0.14.2.20050907234735.033e7e30@127.0.0.1> <431FC8B3.1060202@verk.info> <5.1.0.14.2.20050908004219.033e5750@127.0.0.1> Message-ID: <5.1.0.14.2.20050908101937.03438968@127.0.0.1> Watir mostly uses WIN32OLE to access Windows COM API's. For example, the document object has an 'outerHTML' COM method. When the text is ANSI, this method call works, but when the text in the web page is UTF8 and includes Japanese, then the non-ANSI text (non ASCII) is not returned. It's not a matter of translation -- the text is exactly "???????" with a question-mark replacing all the non-ansi text. Once it is munged, there is no possibility to fix the text, no matter if i use unconv or iconv or foo-conv. I need a way to get WIN32OLE to give me non-munged text. I fear that the WIN32OLE library needs to be changed to support UTF-8 (or other encodings). Because the same method call works in VBA, i believe that the problem is with the WIN32OLE library rather than the COM method itself.... WIN32OLE author Nobu Nakada tells me that WIN32OLE codepage support will be in Ruby 1.8.3. I'm checking it out right now... Bret At 01:41 AM 9/8/2005, saud aziz wrote: >Have you guys tried checking Yoshidam's page? > >http://www.yoshidam.net/Ruby.html > >Following text is from there. Also, notice there is a Perl module as well, >and i wonder if that could be reused to make Watir use Perl's Win32 module >for popup's handling? > > > >2. Uconv module > > > >XMLParser module can process UTF-16 and UTF-8, but cannot process Japanese >encoding (e.g. EUC-JP, Shift_JIS and ISO-2022-JP). Uconv module provides >the methods to convert UTF-16, UTF-8 or UCS-4 into EUC-JP or CP932, and >EUC-JP or CP932 into UTF-16, UTF-8 or UCS-4. > * version 0.4.12 > download > * Document (Japanese) > > * Document (English) >Changes of version 0.4.12 > * support Ruby 1.8 >Changes of version 0.4.11 > * append --enable-compat-win32api option for Win32API compatible CP932 > table. >Changes of version 0.4.10 > * fix memory leaks > * append --enable-fullwidth-reverse-solidus option. >Changes of version 0.4.9 > * add replace_invalid >Changes of version 0.4.8 > * support the tainted status > * check non-shortest form UTF-8 > * change Exception into Uconv::Error >Changes of version 0.4.6 > * fix s2u_conv > * add USE_WIN32API >Changes of version 0.4.5 > * fix u2s_conv > * change USC/CP932 conversion table >Changes of version 0.4.4 > * SJIS to UCS conversion bug >Changes of version 0.4.3 > * Eliminate non-constant initializers >Changes of version 0.4.2 > * ZWNBSP-preservative mode >Changes of version 0.4.0 > * Support CP932 (a variant of Shift_JIS for Japanese Windows) >Changes of version 0.3.1 > * Fix some memory bugs > > > >8. Unicode library > > > >This is a library for Unicode Normalization. > * version 0.1 download > * Document > > > >12. rbuconv library > > > >This is a pure Ruby library for Unicode translation. It can be used on >systems without C compilers, and almost compatible with Uconv library. >Ruby license. > * version 0.1.2 > download > > > > >On 9/7/05, Bret Pettichord ><bret at pettichord.com> wrote: >At 12:14 AM 9/8/2005, Alexey Verkhovsky wrote: > >Bret Pettichord wrote: > > > >>I'd appreciate any insight into this matter that you might have. I've > >>spent a couple days reading up on UTF-8 and Unicode, but don't really > >>have any experience with these things. > > > >Bret, hi > > > >Try to add this to your code: > > > ># Enable UTF-8 support > >$KCODE = 'u' > >require 'jcode' > > > >Not sure if it will help for OLE, but it may. > > > >Alex > >Thanks for the idea. No luck. Here's my complete test script: > > > >$KCODE = 'u' >require 'jcode' >require 'spreadsheet' > >def copy_column (column) > data = $sheet.cells(1, column).value > $sheet.cells(2, column).value = data > puts data > puts data.unpack("U*") > puts "length: #{ data.length}" > puts "jlength: #{data.jlength}" > require 'breakpoint';breakpoint >end > >this_dir = File.expand_path(File.dirname(__FILE__)) >workbook = Workbook.new("#{this_dir}\\intl_text.xls") >workbook.visible = true >$sheet = workbook.use_page 1 > >copy_column 'b' >copy_column 'c' > > > > > > > >_____________________ >Bret Pettichord >www.pettichord.com > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > > >-- >"..man is a human being, not because of his physical powers for physically >the camel is his superior; not because of his size for the elephant is >larger; not because of his courage for the lion is more courageous; not >because of his appetite for the ox has the greater; not because of coitus >for the least of the birds is more virile than he, but rather by virtue of >his noble aims and ideals. [As a matter of fact] he was only created to >know." (Al- Ghazali; The book of Knowledge, Section 1) > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Sep 8 11:28:13 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 08 Sep 2005 10:28:13 -0500 Subject: [Wtr-general] Unicode and Watir In-Reply-To: <72799cd705090806439276829@mail.gmail.com> References: <5.1.0.14.2.20050908001536.03422ea0@127.0.0.1> <5.1.0.14.2.20050908001536.03422ea0@127.0.0.1> Message-ID: <5.1.0.14.2.20050908102627.03459168@127.0.0.1> At 08:43 AM 9/8/2005, Chris McMahon wrote: >Make sure that you can actually *save* the Excel doc with the Japanese >text. Save and re-open-- I've got $0.25 that says you get "????" when >you re-open your Excel doc. You owe me a quarter. Check cell B1. I can see Japanese when i open the doc. Can you? (If you see boxes, that means that the text is intact, you just don't have the fonts to display them.) Bret _____________________ Bret Pettichord www.pettichord.com -------------- next part -------------- A non-text attachment was scrubbed... Name: intl_text.xls Type: application/octet-stream Size: 13824 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050908/034c8a3f/attachment.obj From christopher.mcmahon at gmail.com Thu Sep 8 12:09:31 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 8 Sep 2005 11:09:31 -0500 Subject: [Wtr-general] Unicode and Watir In-Reply-To: <5.1.0.14.2.20050908102627.03459168@127.0.0.1> References: <5.1.0.14.2.20050908001536.03422ea0@127.0.0.1> <72799cd705090806439276829@mail.gmail.com> <5.1.0.14.2.20050908102627.03459168@127.0.0.1> Message-ID: <72799cd7050908090975dc078b@mail.gmail.com> I owe you a quarter! -Chris On 9/8/05, Bret Pettichord wrote: > At 08:43 AM 9/8/2005, Chris McMahon wrote: > >Make sure that you can actually *save* the Excel doc with the Japanese > >text. Save and re-open-- I've got $0.25 that says you get "????" when > >you re-open your Excel doc. > > You owe me a quarter. > > Check cell B1. I can see Japanese when i open the doc. Can you? > > (If you see boxes, that means that the text is intact, you just don't have > the fonts to display them.) From bret at pettichord.com Thu Sep 8 13:52:31 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 08 Sep 2005 12:52:31 -0500 Subject: [Wtr-general] Unicode and Watir In-Reply-To: <72799cd7050908090975dc078b@mail.gmail.com> References: <5.1.0.14.2.20050908102627.03459168@127.0.0.1> <5.1.0.14.2.20050908001536.03422ea0@127.0.0.1> <72799cd705090806439276829@mail.gmail.com> <5.1.0.14.2.20050908102627.03459168@127.0.0.1> Message-ID: <5.1.0.14.2.20050908124523.0349fe50@127.0.0.1> I just verified that Ruby 1.8.3 gives us the Unicode support i was looking for. I just added one line of code: WIN32OLE.codepage = WIN32OLE::CP_UTF8 Neat! Bret _____________________ Bret Pettichord www.pettichord.com From dannyyuan at gmail.com Thu Sep 8 14:30:38 2005 From: dannyyuan at gmail.com (Danny Yuan) Date: Thu, 08 Sep 2005 14:30:38 -0400 Subject: [Wtr-general] Watir for javascript-driven pages? Message-ID: <4320834E.40404@gmail.com> Hi, Can anyone please let me know if we are able to use Watir to test JavaScript-drive web pages? By JavaScript-driven, I mean that most of the links/buttons/tree views/forms/drop-down menus are generated by JavaScript libraries. For example, WebSphere Commerce's administration consoles are all like that. When I issued ie.showAllObjects, all that was returned as something as follows: irb(main):006:0> ie.showAllObjects -----------Objects in page ------------- text/css id= text/javascript id= src=/wcs/javascript/tools/common/Util.js text/javascript id= src=/wcs/javascript/tools/common/URLParser .js text/javascript id= src= text/javascript id= src=/wcs/javascript/tools/common/NumberFor mat.js text/javascript id= src= HTML Document name=mccbanner id= src=ToolsUIBanner HTML Document name=mccmenu id= src=ToolsUIMenu HTML Document name=mccmain id= src=ToolsUIMain However, the page does show all kinds of links, drop-down menus, or forms. I know it would be hard to handle such situation, but is it at least possible to test such web pages using Watir, say click a link or pull down a drop-down menu? Thank you very much! From dannyyuan at gmail.com Thu Sep 8 14:42:37 2005 From: dannyyuan at gmail.com (Danny Yuan) Date: Thu, 08 Sep 2005 14:42:37 -0400 Subject: [Wtr-general] Re: Watir for javascript-driven pages? In-Reply-To: <4320834E.40404@gmail.com> References: <4320834E.40404@gmail.com> Message-ID: <4320861D.90602@gmail.com> Sorry, I did not see a similar message and reply in the mail archive. I'll see if moving to different frame will help. By the way, is there a search function for the mail achive? As a side issue, would it be great if we can have Watir look for a page widget across all frames because from an web user's perspective, a page is a page, the frame is transparent to the user most of the time. Thanks. Danny Yuan wrote: > Hi, > > Can anyone please let me know if we are able to use Watir to test > JavaScript-drive web pages? By JavaScript-driven, I mean that most of > the links/buttons/tree views/forms/drop-down menus are generated by > JavaScript libraries. For example, WebSphere Commerce's administration > consoles are all like that. When I issued ie.showAllObjects, all that > was returned as something as follows: > irb(main):006:0> ie.showAllObjects > -----------Objects in page ------------- > text/css id= > text/javascript id= > src=/wcs/javascript/tools/common/Util.js > text/javascript id= > src=/wcs/javascript/tools/common/URLParser > .js > text/javascript id= src= > text/javascript id= > src=/wcs/javascript/tools/common/NumberFor > mat.js > text/javascript id= src= > HTML Document name=mccbanner id= > src=ToolsUIBanner > HTML Document name=mccmenu id= src=ToolsUIMenu > HTML Document name=mccmain id= src=ToolsUIMain > > > However, the page does show all kinds of links, drop-down menus, or > forms. I know it would be hard to handle such situation, but is it at > least possible to test such web pages using Watir, say click a link or > pull down a drop-down menu? Thank you very much! > From bret at pettichord.com Thu Sep 8 16:23:08 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 08 Sep 2005 15:23:08 -0500 Subject: [Wtr-general] Re: Watir for javascript-driven pages? In-Reply-To: <4320861D.90602@gmail.com> References: <4320834E.40404@gmail.com> <4320834E.40404@gmail.com> Message-ID: <5.1.0.14.2.20050908151906.034a4d38@127.0.0.1> Watir can work with javascript-driven pages. I suggest you use Watir with a more normal page first, to learn the tool, or else get help from someone with Watir experience. Bret At 01:42 PM 9/8/2005, Danny Yuan wrote: >Sorry, I did not see a similar message and reply in the mail archive. I'll >see if moving to different frame will help. By the way, is there a search >function for the mail achive? As a side issue, would it be great if we can >have Watir look for a page widget across all frames because from an web >user's perspective, a page is a page, the frame is transparent to the user >most of the time. Thanks. > >Danny Yuan wrote: > >>Hi, >> >>Can anyone please let me know if we are able to use Watir to test >>JavaScript-drive web pages? By JavaScript-driven, I mean that most of the >>links/buttons/tree views/forms/drop-down menus are generated by >>JavaScript libraries. For example, WebSphere Commerce's administration >>consoles are all like that. When I issued ie.showAllObjects, all that was >>returned as something as follows: >>irb(main):006:0> ie.showAllObjects >>-----------Objects in page ------------- >>text/css id= >>text/javascript id= >>src=/wcs/javascript/tools/common/Util.js >>text/javascript id= >>src=/wcs/javascript/tools/common/URLParser >>.js >>text/javascript id= src= >>text/javascript id= >>src=/wcs/javascript/tools/common/NumberFor >>mat.js >>text/javascript id= src= >>HTML Document name=mccbanner id= >>src=ToolsUIBanner >>HTML Document name=mccmenu id= src=ToolsUIMenu >>HTML Document name=mccmain id= src=ToolsUIMain >> >> >>However, the page does show all kinds of links, drop-down menus, or >>forms. I know it would be hard to handle such situation, but is it at >>least possible to test such web pages using Watir, say click a link or >>pull down a drop-down menu? Thank you very much! > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Sep 8 16:31:19 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 08 Sep 2005 15:31:19 -0500 Subject: [Wtr-general] Need help on button that can onlybeactivated by mouse In-Reply-To: References: <5.1.0.14.2.20050907005847.032e6800@127.0.0.1> Message-ID: <5.1.0.14.2.20050908152923.033521c0@127.0.0.1> ie.button(:name, 'save').click works fine with the page that you sent. If this doesn't work for your app, then there is something about your app that is different from the file you sent. When you say it 'doesn't work', are you getting an error message? What is it? Send your complete script. Bret At 12:48 AM 9/8/2005, Kim P. Hoy wrote: >I tried >ie.form(:action, "adm_sdrinfo.php").submit > >but it did not work. > >I also tried > ie.button(:name, /save/).fire_event('onMouseDown') > sleep 1 > ie.button(:name, /save/).fire_event('onMouseUp') >but it did not work neither. > >--Kim > > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Bret Pettichord >Sent: Tuesday, September 06, 2005 11:02 PM >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] Need help on button that can onlybeactivated >by mouse > > >It looks like a plain old button. > > > >I dunno why click doesn't work. > >You could try ie.form(:action, "adm_sdrinfo.php").submit as an alternative. >That should also work. > > > >Bret > >At 12:25 AM 9/7/2005, Kim P. Hoy wrote: > >Thank you > > > >--Kim > > > >-----Original Message----- > >From: wtr-general-bounces at rubyforge.org > >[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Bret Pettichord > >Sent: Tuesday, September 06, 2005 10:00 PM > >To: wtr-general at rubyforge.org > >Subject: Re: [Wtr-general] Need help on button that can only beactivated > >by mouse > > > > > >Send us the html for the button. I suspect it's being triggered by an event > >and you'll have to use > > ie.button(:name, /save/).fire_event('foo') > > > >At 08:29 PM 9/6/2005, Kim P. Hoy wrote: > > >ie.button(:name,/save/).click could not cause the button to submit > > >I tried to use AutoIt to click on the button, but that did not work >neither > > >t_s() returned > > >name: save > > >type: image > > >id: > > >value: > > > > > >Any help is greatly appreciated. > > >Thank you > > >--Kim > > > >_____________________ > > 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 > >_____________________ > 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 _____________________ Bret Pettichord www.pettichord.com From christopher.mcmahon at gmail.com Fri Sep 9 14:02:36 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 9 Sep 2005 13:02:36 -0500 Subject: [Wtr-general] getting popup menu handle (from perlguitest list) In-Reply-To: <1126287571.221.14554.m20@yahoogroups.com> References: <1126287571.221.14554.m20@yahoogroups.com> Message-ID: <72799cd70509091102ced8c@mail.gmail.com> FYI... ---------- Forwarded message ---------- From: perlguitest at yahoogroups.com Date: 9 Sep 2005 17:39:31 -0000 Subject: [perlguitest] Digest Number 387 To: perlguitest at yahoogroups.com ------------------------ Yahoo! Groups Sponsor --------------------~--> Most low income households are not online. Help bridge the digital divide today! http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/ndFolB/TM --------------------------------------------------------------------~-> There are 2 messages in this issue. Topics in this digest: 1. Getting the Popup menu handle. It may work but it's hedious From: "rafelafrance" 2. Re: Getting the Popup menu handle. It may work but it's hedious From: "Piotr Kaluski" ________________________________________________________________________ ________________________________________________________________________ Message: 1 Date: Thu, 08 Sep 2005 23:40:46 -0000 From: "rafelafrance" Subject: Getting the Popup menu handle. It may work but it's hedious *Ugh* The current method (I'll space you the XS code): THERE HAS TO BE A BETTER WAY! 1) Call up the context menu using MouseClick() or SendKeys() 2) Set up an event trap to look for the WM_MENUSELECT event 3) SendKeys('{DOWN}'); #Which will post the WM_MENUSELECT 4) In the callback HookProc() get the popup handle from lParam. 5) Call another routine to retrive the popup handle GetPopupHandle() This should sound like nails on a chalkboard by about now. The problems are legion and here are just a few. - If you never call GetPopupHandle() the hook isn't released. BAD! Sure I test & release it if I can but there's no guarantee. - You have to dirty the menu by pressing {DOWN} to get its handle ================================== I've tried to get the popup handle all in one fell swoop by doing the SendKeys() etc in the C code but that wasn't working. Tho it seems like the way to go. Maybe... I'm looking for other events to trap that don't dirty the menu but I haven't found any that would be generally useful. Any suggestions? Maybe I can set up an XS object so that the trap will be set up once during New(). Have all popups post to this object and release the hook during the DESTROY method. A lot of work for little reward. ===================================== Any ideas please. ________________________________________________________________________ ________________________________________________________________________ Message: 2 Date: Fri, 09 Sep 2005 06:46:02 -0000 From: "Piotr Kaluski" Subject: Re: Getting the Popup menu handle. It may work but it's hedious Hi, Some time ago I was trying to find a solution for the same problem. I was thinking on the way to handle IE menu bar and its submenus. This problem is related to what you write about, since IE menu is a toolbar with popup menus. And yes, you are right about the main problem - how to get a menu handle. Win32 API provides many fancy functions for managing menus but most of them expect menu handle as a parameter. I have found one promising function - GetMenuBarInfo. However I could not make the function work. I was getting really strange error messages (including "Function was successful", with an indication that there is an error). I tried to post the question to win32 programming newsgroup, but did not get any help. It would be good to have some real windows guru to have a look at it. -Piotr --- In perlguitest at yahoogroups.com, "rafelafrance" wrote: > *Ugh* The current method (I'll space you the XS code): THERE HAS TO > BE A BETTER WAY! > > 1) Call up the context menu using MouseClick() or SendKeys() > 2) Set up an event trap to look for the WM_MENUSELECT event > 3) SendKeys('{DOWN}'); #Which will post the WM_MENUSELECT > 4) In the callback HookProc() get the popup handle from lParam. > 5) Call another routine to retrive the popup handle GetPopupHandle() > > This should sound like nails on a chalkboard by about now. The > problems are legion and here are just a few. > > - If you never call GetPopupHandle() the hook isn't released. BAD! > Sure I test & release it if I can but there's no guarantee. > - You have to dirty the menu by pressing {DOWN} to get its handle > > ================================== > I've tried to get the popup handle all in one fell swoop by doing the > SendKeys() etc in the C code but that wasn't working. Tho it seems > like the way to go. Maybe... > > I'm looking for other events to trap that don't dirty the menu but I > haven't found any that would be generally useful. Any suggestions? > > Maybe I can set up an XS object so that the trap will be set up once > during New(). Have all popups post to this object and release the > hook during the DESTROY method. A lot of work for little reward. > ===================================== > > Any ideas please. ________________________________________________________________________ ________________________________________________________________________ ------------------------------------------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/perlguitest/ <*> To unsubscribe from this group, send an email to: perlguitest-unsubscribe at yahoogroups.com <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ ------------------------------------------------------------------------ From Ben.Torres at rhi.com Fri Sep 9 19:02:33 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Fri, 9 Sep 2005 16:02:33 -0700 Subject: [Wtr-general] How to find watir version number Message-ID: <1641BB0AA7287848817A63C3EE9677D507D9D150@hqp-ex-mb05.na.msds.rhi.com> What's the easiest way to find the version I am using for watir? Can I have it print to screen during a script execution? From dannyyuan at gmail.com Fri Sep 9 19:13:21 2005 From: dannyyuan at gmail.com (Danny Yuan) Date: Fri, 09 Sep 2005 19:13:21 -0400 Subject: [Wtr-general] How to find watir version number In-Reply-To: <1641BB0AA7287848817A63C3EE9677D507D9D150@hqp-ex-mb05.na.msds.rhi.com> References: <1641BB0AA7287848817A63C3EE9677D507D9D150@hqp-ex-mb05.na.msds.rhi.com> Message-ID: <43221711.9060107@gmail.com> You can try Watir::IE::VERSION and Watir::IE::REVISION. Torres, Ben (HQP) wrote: >What's the easiest way to find the version I am using for watir? Can I >have it print to screen during a script execution? > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > From gary_maxwell at transcanada.com Fri Sep 9 20:22:49 2005 From: gary_maxwell at transcanada.com (Gary Maxwell) Date: Fri, 9 Sep 2005 18:22:49 -0600 Subject: [Wtr-general] all_test.rb... Message-ID: <656F1E1AF2CF664AB5A82AB678EBD81D028530E5@TCMAIL1.tcpl.ca> I am a newbie to both ruby and watir and I am experiencing problems with the installation. I have ruby 1.8.2-15 and watir 1.4.1 installed on Windows XP SP2. The primary problem is running all_tests.rb. This fails with 163 errors. The only way I can get all_tests.rb to work is to open two command consoles. In the first I run ruby: irb require 'watir' ie = Watir::IE.start("http://www.google.ca") Opening a second console allows me to navigate to unittests and run all_tests.rb successfully. Closing the browser window opened in console one will cause the all_tests.rb script to fail again. Am I missing some configuration item? On another note the watir 1.4.1 installation appears to be missing the unittests/html/images directory and files. This electronic message and any attached documents are intended only for the named addressee(s). This communication from TransCanada may contain information that is privileged, confidential or otherwise protected from disclosure and it must not be disclosed, copied, forwarded or distributed without authorization. If you have received this message in error, please notify the sender immediately and delete the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050909/df82dcea/attachment.html From gary_maxwell at transcanada.com Fri Sep 9 20:48:07 2005 From: gary_maxwell at transcanada.com (Gary Maxwell) Date: Fri, 9 Sep 2005 18:48:07 -0600 Subject: [Wtr-general] Recall: all_test.rb... Message-ID: <656F1E1AF2CF664AB5A82AB678EBD81D028530E7@TCMAIL1.tcpl.ca> Gary Maxwell would like to recall the message, "all_test.rb...". This electronic message and any attached documents are intended only for the named addressee(s). This communication from TransCanada may contain information that is privileged, confidential or otherwise protected from disclosure and it must not be disclosed, copied, forwarded or distributed without authorization. If you have received this message in error, please notify the sender immediately and delete the original message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050909/27cd0111/attachment.html From dannyyuan at gmail.com Sat Sep 10 04:40:48 2005 From: dannyyuan at gmail.com (Danny Yuan) Date: Sat, 10 Sep 2005 04:40:48 -0400 Subject: [Wtr-general] right-click event Message-ID: <43229C10.3040006@gmail.com> Hi, May I know how to fire an event for right click? fireEvent("oncontextmenu") does not bring up the treeview's context menu (the context menu is constructed by JavaScript). Firing oncontextmenu simply highlight the link being clicked to bright yellow instead of bring up the expected context menu. Therefore, I was wondering if there are any other ways of firing "right-click" event. Say, can I fire onMouseDown with specifying that the mousekey=2? Thanks a lot! By the way, Watir is truely amazing. With a few hours of trial-and-error (and I do not know much about Ruby yet), I can do really smoothly what QuickTest Professional just can't handle well enough. Thanks for the awesome tool. From exortech at gmail.com Sun Sep 11 14:11:52 2005 From: exortech at gmail.com (Owen Rogers) Date: Sun, 11 Sep 2005 14:11:52 -0400 Subject: [Wtr-general] Problem with running tests in a suite In-Reply-To: <5.1.0.14.2.20050907003950.032dc328@127.0.0.1> References: <5.1.0.14.2.20050830005355.02e25430@127.0.0.1> <5.1.0.14.2.20050907003950.032dc328@127.0.0.1> Message-ID: hi bret, On 07/09/05, Bret Pettichord wrote: > The easy way to avoid this problem is to never shut down the last client > until we are done testing. > > This could be implemented by attaching an extra client (invisible) to a > class variable of Watir::IE when IE.new was first called. I think this > would be a wholey reliable fix. I'm not sure the cost in performance, but > it could be measured. > > Thoughts? this sounds like it will work in most circumstances -- except for when you have tests that need to clear the session (though this might be solvable by logging out of the web app). another option is to use the WebBrowser control. it is designed for hosting the browser in a custom client. AFAIK it doesn't lauch an new process for the COM server like IE does; however, it will need to be hosted in some custom winform. btw, i looked up how i solved this problem before: we just interacted with the mshtml library directly. we were using the mshtml engine to help with unit testing javascript, hence we didn't need to pop up a browser window; so, this approach worked for us, but i don't know if it will work for watir. also, for anyone interested, i've written some C# code around IE to help do test-first UI development of ASP.NET code. it enables you to "reveal" an ASP.NET web control in IE from within your unit test. (i just need a good name for the library before i open source it). email me if you want a look at the code. cheers, owen. -- Owen Rogers | http://dotnetjunkies.com/weblog/exortech | CruiseControl.NET - http://ccnet.thoughtworks.com From Leon.Ouretski at au.ey.com Sun Sep 11 21:55:23 2005 From: Leon.Ouretski at au.ey.com (Leon.Ouretski at au.ey.com) Date: Mon, 12 Sep 2005 11:55:23 +1000 Subject: [Wtr-general] Finding text on page. Message-ID: This email is to be read subject to the disclaimer below. Hello all, My question is: " Is there a way in Watir to find text on a page and then click it?" The reason I need this, is that I have objects on some pages that are allocated an id during "run-time", which means, that I will know what text I am looking for, but will not have a way of referring to that object. Thanks in advance. Regards Leon -------------------- 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 a scheme approved under Professional Standards Legislation. -------------------- 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/20050912/0f26f649/attachment.html From bret at pettichord.com Mon Sep 12 01:39:38 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 12 Sep 2005 00:39:38 -0500 Subject: [Wtr-general] Finding text on page. In-Reply-To: Message-ID: <5.1.0.14.2.20050912003749.033378e0@127.0.0.1> At 08:55 PM 9/11/2005, Leon.Ouretski at au.ey.com wrote: >" Is there a way in Watir to find text on a page and then click it?" ie.link(:text, "some text").click This works in 1.4.x. Watir 1.5 will support the :text attribute for all types of objects. Bret _____________________ Bret Pettichord www.pettichord.com From Jan.Montano at thomson.com Mon Sep 12 02:26:55 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Mon, 12 Sep 2005 14:26:55 +0800 Subject: [Wtr-general] check what's the content of this certain text Message-ID: attached is the source of the webpage I want to test. I need to check a certain text in this area. in this example... particularly the "1-1/1" string. and that's dynamic depending on the number of reports returned. It could be 1-3/3, etc... What's the best way in doing this? Thanks. <> -Jan -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: SearchResult[1].txt Url: http://rubyforge.org/pipermail/wtr-general/attachments/20050912/57b0aa4b/attachment.txt From ati.ozgur at gmail.com Mon Sep 12 07:21:10 2005 From: ati.ozgur at gmail.com (Atilla Ozgur) Date: Mon, 12 Sep 2005 14:21:10 +0300 Subject: [Wtr-general] check what's the content of this certain text In-Reply-To: References: Message-ID: try regular expressions? \d-\d\\\d \d matches digits. assert($ie.contains_text(/\d-\d\\\d/)) this should match 1-1\1 to 9-9\9 but if you reports will have more than one digit, you should use. \d\d to match two digits. Hope it will be usefull. On 9/12/05, Jan.Montano at thomson.com wrote: > attached is the source of the webpage I want to test. I need to check a certain text in this area. in this example... particularly the "1-1/1" string. and that's dynamic depending on the number of reports returned. It could be 1-3/3, etc... What's the best way in doing this? Thanks. > > > <> > > > -Jan > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > > From Jan.Montano at thomson.com Mon Sep 12 07:45:41 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Mon, 12 Sep 2005 19:45:41 +0800 Subject: [Wtr-general] check what's the content of this certain text Message-ID: but i need to retrieve the actual value of that text... I will be doing some checking based on that figure -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Atilla Ozgur Sent: Monday, September 12, 2005 7:21 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] check what's the content of this certain text try regular expressions? \d-\d\\\d \d matches digits. assert($ie.contains_text(/\d-\d\\\d/)) this should match 1-1\1 to 9-9\9 but if you reports will have more than one digit, you should use. \d\d to match two digits. Hope it will be usefull. On 9/12/05, Jan.Montano at thomson.com wrote: > attached is the source of the webpage I want to test. I need to check a certain text in this area. in this example... particularly the "1-1/1" string. and that's dynamic depending on the number of reports returned. It could be 1-3/3, etc... What's the best way in doing this? Thanks. > > > <> > > > -Jan > > > _______________________________________________ > 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 Mon Sep 12 08:21:09 2005 From: ati.ozgur at gmail.com (Atilla Ozgur) Date: Mon, 12 Sep 2005 15:21:09 +0300 Subject: [Wtr-general] watir features Message-ID: I am writing an article about watir to Internet in Turkey Conference, inet-tr http://cyberchair.inet-tr.org.tr/ I want to list features of watir, in this article. Below is the list of features. If you see a feature i forget to add or feature I added is wrong please inform me. I would be grateful. watir can handle multiple ie windows with attach methods, It can find new windows with url or title. Regular expression are supported when finding new windows. watir supports javascript events. Normal events are triggered by watir (i.e. when you set a text in input) but you can also have fine grained control (i.e ie.text_field(:name, "my_field").fire_event("onchange")) watir supports frames and also nested frames. watir supports visible and invisible running of test cases. watir supports links,options, radio buttons, tables,forms,button, select list,checkboxes, labels,pre,p,div and a lot more. When it does not support an element you can reach them via getObject method. Also most of these supports iterators. watir supports send_keys method using (autoit com dll) watir automatically waits for page to be loaded. watir have helper methods to find interested object in page. Like show_forms,show_images,show_links watir supports file uploads watir supports saving images in a page. watir supports hidden fields watir supports pop-up dialogs, though this support is limited to very simple cases and does not support modal dialogs. watir supports capturing of screens. From bret at pettichord.com Mon Sep 12 11:34:02 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 12 Sep 2005 10:34:02 -0500 Subject: [Wtr-general] check what's the content of this certain text In-Reply-To: Message-ID: <5.1.0.14.2.20050912103230.0338d070@127.0.0.1> After calling ie.contains_text(), check the value of $& -- it'll be the value that was matched. Bret At 06:45 AM 9/12/2005, Jan.Montano at thomson.com wrote: >but i need to retrieve the actual value of that text... I will be doing >some checking based on that figure > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Atilla Ozgur >Sent: Monday, September 12, 2005 7:21 PM >To: wtr-general at rubyforge.org >Subject: Re: [Wtr-general] check what's the content of this certain text > > >try regular expressions? >\d-\d\\\d > >\d matches digits. > >assert($ie.contains_text(/\d-\d\\\d/)) > >this should match 1-1\1 to 9-9\9 but if you reports will have more >than one digit, you should use. >\d\d to match two digits. > >Hope it will be usefull. > >On 9/12/05, Jan.Montano at thomson.com wrote: > > attached is the source of the webpage I want to test. I need to check a > certain text in this area. in this example... particularly the "1-1/1" > string. and that's dynamic depending on the number of reports returned. > It could be 1-3/3, etc... What's the best way in doing this? Thanks. > > > > > > <> > > > > > > -Jan > > > > > > _______________________________________________ > > 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 Mon Sep 12 11:39:25 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 12 Sep 2005 10:39:25 -0500 Subject: [Wtr-general] watir features In-Reply-To: Message-ID: <5.1.0.14.2.20050912103858.0337ff20@127.0.0.1> At 07:21 AM 9/12/2005, Atilla Ozgur wrote: >watir supports pop-up dialogs, though this support is limited to very >simple cases and does not support modal dialogs. We will have support for all types of modal dialogs in Watir 1.5. Bret _____________________ Bret Pettichord www.pettichord.com From Mark_Cain at rl.gov Mon Sep 12 12:23:56 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Mon, 12 Sep 2005 09:23:56 -0700 Subject: [Wtr-general] Test Case Management Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D370@EX5V.rl.gov> There may be a better forum to ask this, but since I don't know of one here goes... Does anyone know of a good (open source or inexpensive) Test Case Management system? One that can keep track of my automation as well as my manual test cases? The one am currently using is not adequate anymore and volume of automation and manual test cases is growing to the point of being a little unwieldy. Thanks in advance, ____________________ Mark L. Cain LMIT - E*STARS(r) ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99354 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050912/b42a2022/attachment.html From Sean.Gallagher at ticketmaster.com Mon Sep 12 13:34:41 2005 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Mon, 12 Sep 2005 10:34:41 -0700 Subject: [Wtr-general] 1.4.1 gem version, revision Message-ID: <71D28C8451BFD5119B2B00508BE26E6409E11B00@pasmail3.office.tmcs> The watir 1.4.1 gem is a different version and revision than watir in the 1.4.1 installer. I am troubleshooting a watir gem issue and am curious why/how this happened. Can anyone comment? gem: irb(main):001:0> require 'rubygems' => true irb(main):002:0> require_gem 'watir' => true irb(main):003:0> Watir::IE::VERSION => "1.4.1" irb(main):004:0> Watir::IE::REVISION => "$Revision: 1.211.2.2 $" installer: irb(main):003:0> require 'watir' => true irb(main):004:0> ver2 = Watir::IE::VERSION => "1.4" irb(main):005:0> rev2 = Watir::IE::REVISION => "$Revision: 1.224 $" Is this a valid way to query version and revision? Thanks. -sean From Sean.Gallagher at ticketmaster.com Mon Sep 12 13:49:40 2005 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Mon, 12 Sep 2005 10:49:40 -0700 Subject: [Wtr-general] FW: 1.4.1 gem version, revision Message-ID: <71D28C8451BFD5119B2B00508BE26E6409E11B01@pasmail3.office.tmcs> my mistake. i re-ran the new installer and both gem and installer and the same. seems like i ran install.rb from the wrong dir. :-( -----Original Message----- From: Sean Gallagher Sent: Monday, September 12, 2005 10:35 AM To: 'wtr-general at rubyforge.org' Subject: 1.4.1 gem version, revision The watir 1.4.1 gem is a different version and revision than watir in the 1.4.1 installer. I am troubleshooting a watir gem issue and am curious why/how this happened. Can anyone comment? gem: irb(main):001:0> require 'rubygems' => true irb(main):002:0> require_gem 'watir' => true irb(main):003:0> Watir::IE::VERSION => "1.4.1" irb(main):004:0> Watir::IE::REVISION => "$Revision: 1.211.2.2 $" installer: irb(main):003:0> require 'watir' => true irb(main):004:0> ver2 = Watir::IE::VERSION => "1.4" irb(main):005:0> rev2 = Watir::IE::REVISION => "$Revision: 1.224 $" Is this a valid way to query version and revision? Thanks. -sean From dave at burt.id.au Mon Sep 12 17:25:48 2005 From: dave at burt.id.au (Dave Burt) Date: Tue, 13 Sep 2005 07:25:48 +1000 Subject: [Wtr-general] watir features References: <5.1.0.14.2.20050912103858.0337ff20@127.0.0.1> Message-ID: <000301c5b7e0$8bc8ff10$6402a8c0@telperion> > At 07:21 AM 9/12/2005, Atilla Ozgur wrote: >>watir supports pop-up dialogs, though this support is limited to very >>simple cases and does not support modal dialogs. Bret responded: > We will have support for all types of modal dialogs in Watir 1.5. And I posted code earlier that handles modal dialogs using AutoIt. It's not that hard in 1.4. Cheers, Dave From bret at pettichord.com Mon Sep 12 17:26:16 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 12 Sep 2005 16:26:16 -0500 Subject: [Wtr-general] Installer Bug Message-ID: <5.1.0.14.2.20050912162536.033ec2e8@127.0.0.1> >From: "Tom Lichtenberg" >I see a Watir 1.4.1 on the rubyforge site, but the windows installer >crashes on my XP machine so I haven t upgraded _____________________ Bret Pettichord www.pettichord.com From Jan.Montano at thomson.com Mon Sep 12 20:59:58 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Tue, 13 Sep 2005 08:59:58 +0800 Subject: [Wtr-general] check what's the content of this certain text Message-ID: oh I see. Thanks a lot! -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Bret Pettichord Sent: Monday, September 12, 2005 11:34 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] check what's the content of this certain text After calling ie.contains_text(), check the value of $& -- it'll be the value that was matched. Bret At 06:45 AM 9/12/2005, Jan.Montano at thomson.com wrote: >but i need to retrieve the actual value of that text... I will be doing >some checking based on that figure > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Atilla Ozgur >Sent: Monday, September 12, 2005 7:21 PM >To: wtr-general at rubyforge.org >Subject: Re: [Wtr-general] check what's the content of this certain text > > >try regular expressions? >\d-\d\\\d > >\d matches digits. > >assert($ie.contains_text(/\d-\d\\\d/)) > >this should match 1-1\1 to 9-9\9 but if you reports will have more >than one digit, you should use. >\d\d to match two digits. > >Hope it will be usefull. > >On 9/12/05, Jan.Montano at thomson.com wrote: > > attached is the source of the webpage I want to test. I need to check a > certain text in this area. in this example... particularly the "1-1/1" > string. and that's dynamic depending on the number of reports returned. > It could be 1-3/3, etc... What's the best way in doing this? Thanks. > > > > > > <> > > > > > > -Jan > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Jan.Montano at thomson.com Mon Sep 12 23:14:19 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Tue, 13 Sep 2005 11:14:19 +0800 Subject: [Wtr-general] check what's the content of this certain text Message-ID: hi I used this... if $ie.contains_text("/25") then puts $& end but it returns nil. don't know why. I'm assuming it will return /25 or rather the whole text. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Bret Pettichord Sent: Monday, September 12, 2005 11:34 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] check what's the content of this certain text After calling ie.contains_text(), check the value of $& -- it'll be the value that was matched. Bret At 06:45 AM 9/12/2005, Jan.Montano at thomson.com wrote: >but i need to retrieve the actual value of that text... I will be doing >some checking based on that figure > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Atilla Ozgur >Sent: Monday, September 12, 2005 7:21 PM >To: wtr-general at rubyforge.org >Subject: Re: [Wtr-general] check what's the content of this certain text > > >try regular expressions? >\d-\d\\\d > >\d matches digits. > >assert($ie.contains_text(/\d-\d\\\d/)) > >this should match 1-1\1 to 9-9\9 but if you reports will have more >than one digit, you should use. >\d\d to match two digits. > >Hope it will be usefull. > >On 9/12/05, Jan.Montano at thomson.com wrote: > > attached is the source of the webpage I want to test. I need to check a > certain text in this area. in this example... particularly the "1-1/1" > string. and that's dynamic depending on the number of reports returned. > It could be 1-3/3, etc... What's the best way in doing this? Thanks. > > > > > > <> > > > > > > -Jan > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Tue Sep 13 00:33:33 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 12 Sep 2005 23:33:33 -0500 Subject: [Wtr-general] check what's the content of this certain text In-Reply-To: Message-ID: <5.1.0.14.2.20050912233200.025c8088@127.0.0.1> At 10:14 PM 9/12/2005, Jan.Montano at thomson.com wrote: >hi I used this... > >if $ie.contains_text("/25") then puts $& end > >but it returns nil. don't know why. I'm assuming it will return /25 or >rather the whole text. You have to use a regular expression: $ie.contains_text(/\/25/); puts $& (You have to back-quote the slash.) _____________________ Bret Pettichord www.pettichord.com From Jan.Montano at thomson.com Tue Sep 13 01:30:41 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Tue, 13 Sep 2005 13:30:41 +0800 Subject: [Wtr-general] check what's the content of this certain text Message-ID: still it returns nil. the whole text I'm searching for is 1-25/25. but of course this is dynamic. Does $& by any chance interprets and computes 1-25/25 as nil instead? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Bret Pettichord Sent: Tuesday, September 13, 2005 12:34 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] check what's the content of this certain text At 10:14 PM 9/12/2005, Jan.Montano at thomson.com wrote: >hi I used this... > >if $ie.contains_text("/25") then puts $& end > >but it returns nil. don't know why. I'm assuming it will return /25 or >rather the whole text. You have to use a regular expression: $ie.contains_text(/\/25/); puts $& (You have to back-quote the slash.) _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From ati.ozgur at gmail.com Tue Sep 13 10:44:06 2005 From: ati.ozgur at gmail.com (Atilla Ozgur) Date: Tue, 13 Sep 2005 17:44:06 +0300 Subject: [Wtr-general] check what's the content of this certain text In-Reply-To: References: Message-ID: parantheses gives you what is matched. for example you have something like this. (\d\d)-(\d) if this expression matches to 25-1 $1 gives you 25, $2 gives you 1. Since you have not parantheses in your regular expression, ruby gives you nil. You find that string but do not parse it correctly. in your case i think $ie.contains_text(/(\/25)/); puts $& would give you correct answer. On 9/13/05, Jan.Montano at thomson.com wrote: > still it returns nil. the whole text I'm searching for is 1-25/25. but of course this is dynamic. Does $& by any chance interprets and computes 1-25/25 as nil instead? > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Bret Pettichord > Sent: Tuesday, September 13, 2005 12:34 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] check what's the content of this certain text > > > At 10:14 PM 9/12/2005, Jan.Montano at thomson.com wrote: > >hi I used this... > > > >if $ie.contains_text("/25") then puts $& end > > > >but it returns nil. don't know why. I'm assuming it will return /25 or > >rather the whole text. > > You have to use a regular expression: > > $ie.contains_text(/\/25/); puts $& > > (You have to back-quote the slash.) > > _____________________ > 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 bret at pettichord.com Tue Sep 13 13:34:31 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 13 Sep 2005 12:34:31 -0500 Subject: [Wtr-general] check what's the content of this certain text In-Reply-To: References: Message-ID: <5.1.0.14.2.20050913123000.033781e8@127.0.0.1> At 09:44 AM 9/13/2005, Atilla Ozgur wrote: >parantheses gives you what is matched. for example you have something like >this. >(\d\d)-(\d) if this expression matches to 25-1 >$1 gives you 25, $2 gives you 1. Since you have not parantheses in >your regular expression, ruby gives you nil. You find that string but >do not parse it correctly. >in your case i think > > $ie.contains_text(/(\/25)/); puts $& > >would give you correct answer. This isn't quite right. Both of you are getting confused. I suggest that you use IRB to experiment a bit with regular expressions. irb(main):001:0> sentence = "The rain in spain falls mainly on the plain." => "The rain in spain falls mainly on the plain." irb(main):002:0> sentence =~ /rain/ => 4 irb(main):003:0> $& => "rain" irb(main):004:0> $1 => nil irb(main):005:0> sentence =~ /rain in (spain)/ => 4 irb(main):006:0> $& => "rain in spain" irb(main):007:0> $1 => "spain" $ie.contains_text is completely analogous to the =~ operator, except that it works with the text of the document. Bret _____________________ Bret Pettichord www.pettichord.com From shaorobics at gmail.com Tue Sep 13 15:15:12 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Tue, 13 Sep 2005 15:15:12 -0400 Subject: [Wtr-general] image within a link Message-ID: <593b9ae805091312153b97ea07@mail.gmail.com> Hey this is similar to the thread "Image within a table cell" where Bret points out you can get to the image by something like this: ie.table().table().table().cells.each {|c| c.text.strip if c.image(:src, xxx).exists?} I'm interested in images inside a link (i.e. I've tried ie.link().each {|x| puts l.image(:id, //).exists?} and the error I get back is: ArgumentError: wrong number of arguments (0 for 1) from (irb):26:in `link' from (irb):26 I've tried different variations as well..Any tips? Shao -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050913/024e3360/attachment.html From bret at pettichord.com Tue Sep 13 18:11:24 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 13 Sep 2005 17:11:24 -0500 Subject: [Wtr-general] image within a link In-Reply-To: <593b9ae805091312153b97ea07@mail.gmail.com> Message-ID: <5.1.0.14.2.20050913170751.033fc5e8@127.0.0.1> Your immediate error is caused because you used "link" instead of "links". But that won't really fix things because these collection objects are, sadly, collection of OLE objects rather than Watir objects (I'll change this someday...) But for now you can only use OLE calls with them. Use: ie.link(:how, 'what').images {|i| puts i.src} Bret At 02:15 PM 9/13/2005, Shao Kang Tat wrote: >Hey > >this is similar to the thread "Image within a table cell" where Bret >points out you can get to the image by something like this: > >ie.table().table().table().cells.each {|c| c.text.strip if c.image(:src, >xxx).exists?} > >I'm interested in images inside a link (i.e. > >I've tried > >ie.link().each {|x| puts l.image(:id, //).exists?} > >and the error I get back is: > >ArgumentError: wrong number of arguments (0 for 1) > from (irb):26:in `link' > from (irb):26 > > >I've tried different variations as well..Any tips? > >Shao > > > >_______________________________________________ >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 Sep 14 02:54:58 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 14 Sep 2005 01:54:58 -0500 Subject: [Wtr-general] Road Map for 1.5 Message-ID: <5.1.0.14.2.20050914012810.0341dd60@127.0.0.1> Watir 1.5 will be a major update. It will include: - Support Modal Dialogs - Improve Consistency - Lazy Evaluation - Installer Updates - Stableize IE Class - Updated Website & Examples - Infrastructure Updates Here's the details: http://wtr.rubyforge.org/wiki/wiki.pl?RoadMap Comments? Questions? I've also gone through the trackers are marked the items that are planned to be fixed in 1.5: 1713 IE.file_field broken with Non English OS; also problem with winClicker. 1916 Error message for ie.link(:unknown_way, 'value') is incorrect 1945 Image.save method flaw 2262 show_all_objects only shows some objects -- it should be renamed 2292 Watir 1.4.1 installer - error opening file for writing 2351 http://wtr.rubyforge.org/example_testcase.html errors 2320 Homepage too wide 2310 watir home page should have search box 2274 Standard Tag Attributes ... should all be search criteria... 2299 Add ability to access a Label by its text 2282 Attach should wait for window to appear 1766 add ability to save images 1371 methods for visible/hidden 1432 Rename methods and variables from camelCase to under_score 1792 get_link needs refactoring 1860 add new frames methods: 1863 add a maximum page load time 1912 add a page to the wiki, with details onhow to contribute 2278 Reorganize rdoc 2280 Rdoc needs to be set up as an enry point to Watir Documentation 2338 rdoc on website needs update _____________________ Bret Pettichord www.pettichord.com From guru_ks2004 at yahoo.co.in Wed Sep 14 04:03:26 2005 From: guru_ks2004 at yahoo.co.in (Guru) Date: Wed, 14 Sep 2005 09:03:26 +0100 (BST) Subject: [Wtr-general] How to get data records from a excel file Message-ID: <20050914080326.32047.qmail@web8205.mail.in.yahoo.com> --------------------------------- Yahoo! India Matrimony: Find your partner now. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050914/118d4175/attachment.html From nishita.acharya at tatainfotech.com Wed Sep 14 06:49:58 2005 From: nishita.acharya at tatainfotech.com (Nishita Acharya) Date: Wed, 14 Sep 2005 16:19:58 +0530 Subject: [Wtr-general] queries Message-ID: <000d01c5b91a$0d05a850$950d7aa3@PC131> Glacier hi, 1> How do i automate an image map object? This is how my html source looks like 2> Is there any chance that watir can support other web browsers in future versions atleast. 3> In web pages like yahoo,the links change dyanmically.In this case is using watir feasible...especially if i have to run my testcases several times over a stretch of 2-3 days.....? 4> Is t possible to embed SQL queries in ruby script? if so how? eg: i have an app which enters data thru a form and whichgets stored in the database.I have to go back to my DB ,enter a sql query (select*...) and then verify if it has been saved .can i do the above thru my ruby script? any takers??? Regards, Nishita Acharya. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050914/0db55f4e/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 2743 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050914/0db55f4e/attachment.jpe From satti at qantom.com Wed Sep 14 07:37:15 2005 From: satti at qantom.com (Sathya Shankar) Date: Wed, 14 Sep 2005 17:07:15 +0530 Subject: [Wtr-general] queries In-Reply-To: <000d01c5b91a$0d05a850$950d7aa3@PC131> References: <000d01c5b91a$0d05a850$950d7aa3@PC131> Message-ID: <43280B6B.1020908@qantom.com> Nishita Acharya wrote: > > hi, > > 1> How do i automate an image map object? This is how my html source > looks like > > > > > href="mailto:webmaster at ihip.com"> > > > > 2> Is there any chance that watir can support other web browsers in > future versions atleast. > > 3> In web pages like yahoo,the links change dyanmically.In this case > is using watir feasible...especially if i have to run my testcases > several times over a stretch of 2-3 days.....? Use the Repository in wet that would be the best options right now. > > 4> Is t possible to embed SQL queries in ruby script? if so how? > eg: i have an app which enters data thru a form and whichgets stored > in the database.I have to go back to my DB ,enter a sql query > (select*...) and then verify if it has been saved .can i do the above > thru my ruby script? > http://sqlrelay.sourceforge.net/sqlrelay/programming/rubydbi.html this article will help you how to use the DB with Ruby. > any takers??? > > Regards, > Nishita Acharya. > > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > -- Sathya Shankar M G Software Testing Engineer Qantom Software http://www.qantom.com Ph : 26799269 Xtn. 123 sip : satti at sip411.com From raghu at qantom.com Wed Sep 14 07:48:25 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Wed, 14 Sep 2005 17:18:25 +0530 Subject: [Wtr-general] queries In-Reply-To: <43280B6B.1020908@qantom.com> References: <000d01c5b91a$0d05a850$950d7aa3@PC131> <43280B6B.1020908@qantom.com> Message-ID: <43280E09.7010009@qantom.com> Sathya Shankar wrote: > Nishita Acharya wrote: > >> >> hi, >> >> 1> How do i automate an image map object? This is how my html source >> looks like >> >> >> >> >> > href="mailto:webmaster at ihip.com"> >> >> >> >> 2> Is there any chance that watir can support other web browsers in >> future versions atleast. >> >> 3> In web pages like yahoo,the links change dyanmically.In this case >> is using watir feasible...especially if i have to run my testcases >> several times over a stretch of 2-3 days.....? > > > Use the Repository in wet that would be the best options right now. No. Using the repository by itself wont solve your problem. You need to specify what you mean by 'dynamically' changing. If you know that, then you can identify the links easiliy using Watir. > >> >> 4> Is t possible to embed SQL queries in ruby script? if so how? >> eg: i have an app which enters data thru a form and whichgets stored >> in the database.I have to go back to my DB ,enter a sql query >> (select*...) and then verify if it has been saved .can i do the above >> thru my ruby script? >> > > > http://sqlrelay.sourceforge.net/sqlrelay/programming/rubydbi.html > this article will help you how to use the DB with Ruby. > >> any takers??? >> >> Regards, >> Nishita Acharya. >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Wtr-general mailing list >> Wtr-general at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-general >> >> > > -- Qantom Software http://www.qantom.com Ph : 91-80-26799269 Xtn. 125 sip : raghu at sip411.com -- From raghu at qantom.com Wed Sep 14 07:49:25 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Wed, 14 Sep 2005 17:19:25 +0530 Subject: [Wtr-general] How to get data records from a excel file In-Reply-To: <20050914080326.32047.qmail@web8205.mail.in.yahoo.com> References: <20050914080326.32047.qmail@web8205.mail.in.yahoo.com> Message-ID: <43280E45.2060904@qantom.com> There are a few past threads which talk about accesing xls. Or you could check how we do it in Wet's datatables. Raghu Guru wrote: > ------------------------------------------------------------------------ > Yahoo! India Matrimony : Find your partner now. > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > -- Qantom Software http://www.qantom.com Ph : 91-80-26799269 Xtn. 125 sip : raghu at sip411.com -- From ati.ozgur at gmail.com Wed Sep 14 09:10:12 2005 From: ati.ozgur at gmail.com (Atilla Ozgur) Date: Wed, 14 Sep 2005 16:10:12 +0300 Subject: [Wtr-general] check what's the content of this certain text In-Reply-To: <5.1.0.14.2.20050913123000.033781e8@127.0.0.1> References: <5.1.0.14.2.20050913123000.033781e8@127.0.0.1> Message-ID: put textsearch.html to 1-25/25 puts pagecontainstext_test.rb def test_match_regexp_found2 $~ = $ie.contains_text(/\/25/) assert_equal('/25', $&) end def test_match_regexp_found3 $~ = $ie.contains_text(/(\/25)/) assert_equal('/25', $1) end these two test pass. From mich.mueller at fhso.ch Wed Sep 14 09:14:49 2005 From: mich.mueller at fhso.ch (=?iso-8859-1?Q?Michael_M=FCller?=) Date: Wed, 14 Sep 2005 15:14:49 +0200 Subject: [Wtr-general] How to click the Windows 'Save' button when downloading a file In-Reply-To: <43280E45.2060904@qantom.com> Message-ID: <000201c5b92e$4c30fc00$2144590a@wsvali001> In a script in clicking the download link. Then a Windows window appears with the button Open, Save and Cancel. I?d like to click the save button. How can I do that? The Next window opening is the window to specify the location to save the file. How can I set the Path to that window? Thanks for your help -----Urspr?ngliche Nachricht----- Von: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] Im Auftrag von Raghu Venkataramana Gesendet: Mittwoch, 14. September 2005 13:49 An: wtr-general at rubyforge.org Betreff: Re: [Wtr-general] How to get data records from a excel file There are a few past threads which talk about accesing xls. Or you could check how we do it in Wet's datatables. Raghu Guru wrote: > ------------------------------------------------------------------------ > Yahoo! India Matrimony : Find your partner now. > >----------------------------------------------------------------------- - > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > -- Qantom Software http://www.qantom.com Ph : 91-80-26799269 Xtn. 125 sip : raghu at sip411.com -- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Wed Sep 14 10:55:10 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 14 Sep 2005 09:55:10 -0500 Subject: [Wtr-general] How to get data records from a excel file In-Reply-To: <20050914080326.32047.qmail@web8205.mail.in.yahoo.com> Message-ID: <5.1.0.14.2.20050914095444.034444e8@127.0.0.1> An excellent discussion... http://rubygarden.org/ruby?ScriptingExcel _____________________ Bret Pettichord www.pettichord.com From Ben.Torres at rhi.com Wed Sep 14 12:09:54 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Wed, 14 Sep 2005 09:09:54 -0700 Subject: [Wtr-general] Passing args from the command line Message-ID: <1641BB0AA7287848817A63C3EE9677D507D9DC5C@hqp-ex-mb05.na.msds.rhi.com> Hi, Can someone show me how I can pass 3 arguments from the command line? I am trying to be able to type in >>colors.rb red white blue, and watir reads color1 = red, color2 = white, and color3 = blue. Thanks in advance... -ben From newton at pingsite.com Wed Sep 14 15:22:05 2005 From: newton at pingsite.com (Dave Newton) Date: Wed, 14 Sep 2005 15:22:05 -0400 Subject: [Wtr-general] Testing "assistant classes" Message-ID: <4328785D.8090402@pingsite.com> Hola, Just downloaded Watir yesterday and am pretty excited to be using it--thanks developers! I don't know if anybody has already done this, but I'm slowly hacking together some classes to help me out with testing to let me write code like the following: class Page0 < WatirPage has_text 'fname' has_text 'lname' has_select 'desired_effective_date_year' has_select 'desired_effective_date_day' has_select 'desired_effective_date_month' has_select 'current_insurance' has_select 'num_household' has_radio_group 'three_year_requirement', 'Y', 'N' has_radio_group 'previous_w_njcure', 'Y', 'N' has_radio_group 'reside_w_njcure', 'Y', 'N' end page0 = Page0.new page0.fname = 'Dave' page0.lname = 'Newton' page0.desired_effective_date_year = "2006" page0.desired_effective_date_day = "15" page0.desired_effective_date_month = "Oct" page0.current_insurance = 'Yes.' page0.three_year_requirement = 'N' page0.previous_w_us = 'N' page0.reside_w_us = 'Y' page0.form_set($ie) that pretty much does what you would expect. I don't have the "create class from web page" done yet (probably not until Thursday), the code is tweaky (relatively new to Ruby, and code only 2 hrs old :), it might not work the way people might want it to, etc. Anybody interested? Dave From dave at burt.id.au Wed Sep 14 22:32:18 2005 From: dave at burt.id.au (Dave Burt) Date: Thu, 15 Sep 2005 12:32:18 +1000 Subject: [Wtr-general] Passing args from the command line References: <1641BB0AA7287848817A63C3EE9677D507D9DC5C@hqp-ex-mb05.na.msds.rhi.com> Message-ID: <000301c5b99d$b1c8ad50$6402a8c0@telperion> Ben Torres wrote: > Can someone show me how I can pass 3 arguments from the command line? I > am trying to be able to type in >>colors.rb red white blue, and watir > reads color1 = red, color2 = white, and color3 = blue. ARGV Cheers, Dave From dave at burt.id.au Wed Sep 14 23:22:51 2005 From: dave at burt.id.au (Dave Burt) Date: Thu, 15 Sep 2005 13:22:51 +1000 Subject: [Wtr-general] How to click the Windows 'Save' button whendownloading a file References: <000201c5b92e$4c30fc00$2144590a@wsvali001> Message-ID: <001a01c5b9a4$c1740b30$6402a8c0@telperion> Michael M?ller gebetenes... > In a script in clicking the download link. Then a Windows window appears > with the button Open, Save and Cancel. I?d like to click the save > button. How can I do that? > > The Next window opening is the window to specify the location to save > the file. How can I set the Path to that window? You can do this stuff with AutoIt: require 'win32ole' autoit = WIN32OLE.new("AutoItX3.Control") autoit.WinWait("File Download", "Do you want to open or save", 3) autoit.ControlClick("File Download", "Do you want to open or save", "&Save") autoit.WinWait("Save As", "Save &in", 3) autoit.ControlSetText("Save As", "Save &in", "Edit1", "path\\filename.ext") autoit.ControlClick("Save As", "Save &in", "&Save") See AutoIt3 reference here: http://www.autoitscript.com/autoit3/docs/functions.htm Note to Bret Pettichord: This is something you'd need to take care of before you remove AutoIt from version 1.5. Cheers, Dave From Jan.Montano at thomson.com Thu Sep 15 04:27:25 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Thu, 15 Sep 2005 16:27:25 +0800 Subject: [Wtr-general] How to check if radio button is selected Message-ID: I tried checked and selected, but I guess there's no existing method for those :) From mich.mueller at fhso.ch Thu Sep 15 04:30:33 2005 From: mich.mueller at fhso.ch (=?iso-8859-1?Q?M=FCller_Michael_=28BB=29?=) Date: Thu, 15 Sep 2005 10:30:33 +0200 Subject: [Wtr-general] How to click the Windows 'Save' buttonwhendownloading a file Message-ID: <758B32E3B66A334AADC77A92032105610EF6B4@Mercurius.so.fhnw.ch> Hi Dave, Thanks for the answer. I tried this approach, but the Windows opens and nothing happens. the scripts is seems to "wait" for an action but nothing happens. When I cancel the script no error is reported in the log file. Any Idea why it doesnt work? Do i have to install some additional components? Thanks ________________________________ Von: wtr-general-bounces at rubyforge.org im Auftrag von Dave Burt Gesendet: Do 15.09.2005 05:22 An: wtr-general at rubyforge.org Betreff: Re: [Wtr-general] How to click the Windows 'Save' buttonwhendownloading a file Michael M?ller gebetenes... > In a script in clicking the download link. Then a Windows window appears > with the button Open, Save and Cancel. I?d like to click the save > button. How can I do that? > > The Next window opening is the window to specify the location to save > the file. How can I set the Path to that window? You can do this stuff with AutoIt: require 'win32ole' autoit = WIN32OLE.new("AutoItX3.Control") autoit.WinWait("File Download", "Do you want to open or save", 3) autoit.ControlClick("File Download", "Do you want to open or save", "&Save") autoit.WinWait("Save As", "Save &in", 3) autoit.ControlSetText("Save As", "Save &in", "Edit1", "path\\filename.ext") autoit.ControlClick("Save As", "Save &in", "&Save") See AutoIt3 reference here: http://www.autoitscript.com/autoit3/docs/functions.htm Note to Bret Pettichord: This is something you'd need to take care of before you remove AutoIt from version 1.5. Cheers, Dave _______________________________________________ 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: 5199 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050915/b2780424/attachment.bin From angrez at gmail.com Thu Sep 15 04:50:04 2005 From: angrez at gmail.com (Angrez Singh) Date: Thu, 15 Sep 2005 14:20:04 +0530 Subject: [Wtr-general] How to check if radio button is selected In-Reply-To: References: Message-ID: Hi, Try using isSet?() method. This will return true if radiobutton is checked and false if it is not.... Regards, Angrez On 9/15/05, Jan.Montano at thomson.com wrote: > > I tried checked and selected, but I guess there's no existing method for > those :) > > _______________________________________________ > 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/20050915/2fcccd59/attachment.html From dave at burt.id.au Thu Sep 15 05:21:02 2005 From: dave at burt.id.au (Dave Burt) Date: Thu, 15 Sep 2005 19:21:02 +1000 Subject: [Wtr-general] How to click the Windows 'Save'buttonwhendownloading a file References: <758B32E3B66A334AADC77A92032105610EF6B4@Mercurius.so.fhnw.ch> Message-ID: <000d01c5b9d6$cb88d790$6402a8c0@telperion> Mueller schrieb: > Thanks for the answer. I tried this approach, but the Windows opens and > nothing > happens. the scripts is seems to "wait" for an action but nothing happens. > When I > cancel the script no error is reported in the log file. > > Any Idea why it doesnt work? Do i have to install some additional components? Try typing the script line by line into IRB, see where it stops working. If it's not getting a control or window (perhaps because you have a different version of IE or Windows to me, and the text or controls in the windows are different), you might have to change some of the parameters I'm passing to WindowWait or ControlClick etc. You can download AutoIt from http://www.autoitscript.com/autoit3/downloads.php - get the ZIP, and just pick AU3Info.exe out of it - if you run it, then cause the dialogs to be shown, that will tell you the info you need for your script. Cheers, Dave From Jan.Montano at thomson.com Thu Sep 15 05:57:06 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Thu, 15 Sep 2005 17:57:06 +0800 Subject: [Wtr-general] How to check if radio button is selected Message-ID: perfect. Thanks! -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Angrez Singh Sent: Thursday, September 15, 2005 4:50 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How to check if radio button is selected Hi, Try using isSet?() method. This will return true if radiobutton is checked and false if it is not.... Regards, Angrez On 9/15/05, Jan.Montano at thomson.com < Jan.Montano at thomson.com > wrote: I tried checked and selected, but I guess there's no existing method for those :) _______________________________________________ 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/20050915/a2b24e58/attachment.html From mich.mueller at fhso.ch Thu Sep 15 08:42:08 2005 From: mich.mueller at fhso.ch (=?iso-8859-1?Q?M=FCller_Michael_=28BB=29?=) Date: Thu, 15 Sep 2005 14:42:08 +0200 Subject: [Wtr-general] How to click the Windows'Save'buttonwhendownloading a file Message-ID: <758B32E3B66A334AADC77A92032105610EF6B6@Mercurius.so.fhnw.ch> It doesn't work. I don't know what to do. I checked the documentation and tried several different things. I also started AUInfo.exe and the Controls and Information are exactely the same as in your example script. I've inserted also statement to give out if a function was executed. The logfile then has all the Statements inside, as all function where executed properly, but also a Error is stated: WIN32OLERuntimeError: Unknown property or method 'document' HRESULT error code:0x800706ba The RPC Server is unavailable c:\ruby\.......\watir.rb: in 'method_missing' c:\ruby\.......\watir.rb: in 'document' c:\ruby\.......\watir.rb: in 'getLink' c:\ruby\.......\watir.rb: in 'initialize' c:\ruby\.......\watir.rb: in 'new' c:\ruby\.......\watir.rb: in 'link' c:\watir_bonus\...\document_lib.rb (stating the line number where the error started, is the next fnuction after the autoit functions) ________________________________ Von: wtr-general-bounces at rubyforge.org im Auftrag von Dave Burt Gesendet: Do 15.09.2005 11:21 An: wtr-general at rubyforge.org Betreff: Re: [Wtr-general] How to click the Windows'Save'buttonwhendownloading a file Mueller schrieb: > Thanks for the answer. I tried this approach, but the Windows opens and > nothing > happens. the scripts is seems to "wait" for an action but nothing happens. > When I > cancel the script no error is reported in the log file. > > Any Idea why it doesnt work? Do i have to install some additional components? Try typing the script line by line into IRB, see where it stops working. If it's not getting a control or window (perhaps because you have a different version of IE or Windows to me, and the text or controls in the windows are different), you might have to change some of the parameters I'm passing to WindowWait or ControlClick etc. You can download AutoIt from http://www.autoitscript.com/autoit3/downloads.php - get the ZIP, and just pick AU3Info.exe out of it - if you run it, then cause the dialogs to be shown, that will tell you the info you need for your script. Cheers, Dave _______________________________________________ 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: 5653 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050915/45fa9eec/attachment.bin From noreply at rubyforge.org Thu Sep 15 11:15:39 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 15 Sep 2005 10:15:39 -0500 Subject: [Wtr-general] [ wtr-Feature Requests-2467 ] Save File Download Message-ID: <200509151515.j8FFFd48013999@rubyforge.org> Feature Requests item #2467, was opened at 2005-09-15 10:15 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=490&aid=2467&group_id=104 Category: None Group: 1.5 Status: Open Resolution: None Priority: 3 Submitted By: Bret Pettichord (bret) Assigned to: Nobody (None) Summary: Save File Download Initial Comment: Dave Burt responding to Michael M?ller: > In a script in clicking the download link. Then a Windows window appears > with the button Open, Save and Cancel. I?d like to click the save > button. How can I do that? > > The Next window opening is the window to specify the location to save > the file. How can I set the Path to that window? You can do this stuff with AutoIt: require 'win32ole' autoit = WIN32OLE.new("AutoItX3.Control") autoit.WinWait("File Download", "Do you want to open or save", 3) autoit.ControlClick("File Download", "Do you want to open or save", "&Save") autoit.WinWait("Save As", "Save &in", 3) autoit.ControlSetText("Save As", "Save &in", "Edit1", "path\filename.ext") autoit.ControlClick("Save As", "Save &in", "&Save") See AutoIt3 reference here: http://www.autoitscript.com/autoit3/docs/functions.htm Note to Bret Pettichord: This is something you'd need to take care of before you remove AutoIt from version 1.5. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=490&aid=2467&group_id=104 From bret at pettichord.com Thu Sep 15 11:23:58 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 15 Sep 2005 10:23:58 -0500 Subject: [Wtr-general] How to click the Windows 'Save' button whendownloading a file In-Reply-To: <001a01c5b9a4$c1740b30$6402a8c0@telperion> References: <000201c5b92e$4c30fc00$2144590a@wsvali001> Message-ID: <5.1.0.14.2.20050915102307.02253278@127.0.0.1> At 10:22 PM 9/14/2005, Dave Burt wrote: >Note to Bret Pettichord: This is something you'd need to take care of >before you >remove AutoIt from version 1.5. My goal is to remove the dependency of Watir on AutoIt. But of course, people who use AutoIt in their Watir scripts are welcome to continue to use it. Bret _____________________ Bret Pettichord www.pettichord.com From noreply at rubyforge.org Thu Sep 15 11:20:13 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 15 Sep 2005 10:20:13 -0500 Subject: [Wtr-general] [ wtr-Stories-2468 ] radio().checked? isn't there Message-ID: <200509151520.j8FFKDFE019982@rubyforge.org> Stories item #2468, was opened at 2005-09-15 10:20 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1999&aid=2468&group_id=104 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Bret Pettichord (bret) Assigned to: Nobody (None) Summary: radio().checked? isn't there Initial Comment: Instead we have IsSet? -- this needs to be made more consistent ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1999&aid=2468&group_id=104 From Mark_Cain at rl.gov Thu Sep 15 13:09:00 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Thu, 15 Sep 2005 10:09:00 -0700 Subject: [Wtr-general] How to click the Windows'Save'buttonwhendownloading a file Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D38D@EX5V.rl.gov> Try this, it works on my computer. You may need to change the required path to your Watir install directory. Change the "" to some save path of your choosing $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'C:\watir\unittests\setup' require 'watir' require 'win32ole' include Watir docName = "XUS8120873file1.pdf (19 Kb)" testSite ="http://www.stickyminds.com/r.asp?F=DART_9601" $path = "C\:\\\\" #e.g. "C\:\\watir_bonus\\working\\" $ie = IE.new puts "Beginning of Example: Sticky Minds" sleep 1 puts "Step 1: go to the test site: " + testSite $ie.goto(testSite) $ie.link(:text, "XUS8120873file1.pdf (19 Kb)").click $autoit = WIN32OLE.new("AutoItX3.Control") $autoit.WinWait("File Download", "Do you want to open or save this file?", 3) $autoit.ControlClick("File Download", "Do you want to open or save this file?", "&Save") $autoit.WinWait("Save As", "Save &in", 3) $autoit.ControlSend("Save As", "", "Edit1", "#{$path}temp.pdf") $autoit.ControlClick("Save As", "Save &in", "&Save") --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of M?ller Michael (BB) Sent: Thursday, September 15, 2005 5:42 AM To: wtr-general at rubyforge.org Subject: AW: [Wtr-general] How to click the Windows'Save'buttonwhendownloading a file It doesn't work. I don't know what to do. I checked the documentation and tried several different things. I also started AUInfo.exe and the Controls and Information are exactely the same as in your example script. I've inserted also statement to give out if a function was executed. The logfile then has all the Statements inside, as all function where executed properly, but also a Error is stated: WIN32OLERuntimeError: Unknown property or method 'document' HRESULT error code:0x800706ba The RPC Server is unavailable c:\ruby\.......\watir.rb: in 'method_missing' c:\ruby\.......\watir.rb: in 'document' c:\ruby\.......\watir.rb: in 'getLink' c:\ruby\.......\watir.rb: in 'initialize' c:\ruby\.......\watir.rb: in 'new' c:\ruby\.......\watir.rb: in 'link' c:\watir_bonus\...\document_lib.rb (stating the line number where the error started, is the next fnuction after the autoit functions) ________________________________ Von: wtr-general-bounces at rubyforge.org im Auftrag von Dave Burt Gesendet: Do 15.09.2005 11:21 An: wtr-general at rubyforge.org Betreff: Re: [Wtr-general] How to click the Windows'Save'buttonwhendownloading a file Mueller schrieb: > Thanks for the answer. I tried this approach, but the Windows opens and > nothing > happens. the scripts is seems to "wait" for an action but nothing happens. > When I > cancel the script no error is reported in the log file. > > Any Idea why it doesnt work? Do i have to install some additional components? Try typing the script line by line into IRB, see where it stops working. If it's not getting a control or window (perhaps because you have a different version of IE or Windows to me, and the text or controls in the windows are different), you might have to change some of the parameters I'm passing to WindowWait or ControlClick etc. You can download AutoIt from http://www.autoitscript.com/autoit3/downloads.php - get the ZIP, and just pick AU3Info.exe out of it - if you run it, then cause the dialogs to be shown, that will tell you the info you need for your script. Cheers, Dave _______________________________________________ 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/20050915/e24aa760/attachment.html From Mark_Cain at rl.gov Thu Sep 15 13:38:10 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Thu, 15 Sep 2005 10:38:10 -0700 Subject: [Wtr-general] How to click theWindows'Save'buttonwhendownloading a file Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D38F@EX5V.rl.gov> This also works ... $autoit.ControlSetText("Save As", "", "Edit1", "#{$path}temp.pdf") ... --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: Thursday, September 15, 2005 10:09 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How to click theWindows'Save'buttonwhendownloading a file Try this, it works on my computer. You may need to change the required path to your Watir install directory. Change the "" to some save path of your choosing $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'C:\watir\unittests\setup' require 'watir' require 'win32ole' include Watir docName = "XUS8120873file1.pdf (19 Kb)" testSite ="http://www.stickyminds.com/r.asp?F=DART_9601" $path = "C\:\\\\" #e.g. "C\:\\watir_bonus\\working\\" $ie = IE.new puts "Beginning of Example: Sticky Minds" sleep 1 puts "Step 1: go to the test site: " + testSite $ie.goto(testSite) $ie.link(:text, "XUS8120873file1.pdf (19 Kb)").click $autoit = WIN32OLE.new("AutoItX3.Control") $autoit.WinWait("File Download", "Do you want to open or save this file?", 3) $autoit.ControlClick("File Download", "Do you want to open or save this file?", "&Save") $autoit.WinWait("Save As", "Save &in", 3) $autoit.ControlSend("Save As", "", "Edit1", "#{$path}temp.pdf") $autoit.ControlClick("Save As", "Save &in", "&Save") --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of M?ller Michael (BB) Sent: Thursday, September 15, 2005 5:42 AM To: wtr-general at rubyforge.org Subject: AW: [Wtr-general] How to click the Windows'Save'buttonwhendownloading a file It doesn't work. I don't know what to do. I checked the documentation and tried several different things. I also started AUInfo.exe and the Controls and Information are exactely the same as in your example script. I've inserted also statement to give out if a function was executed. The logfile then has all the Statements inside, as all function where executed properly, but also a Error is stated: WIN32OLERuntimeError: Unknown property or method 'document' HRESULT error code:0x800706ba The RPC Server is unavailable c:\ruby\.......\watir.rb: in 'method_missing' c:\ruby\.......\watir.rb: in 'document' c:\ruby\.......\watir.rb: in 'getLink' c:\ruby\.......\watir.rb: in 'initialize' c:\ruby\.......\watir.rb: in 'new' c:\ruby\.......\watir.rb: in 'link' c:\watir_bonus\...\document_lib.rb (stating the line number where the error started, is the next fnuction after the autoit functions) ________________________________ Von: wtr-general-bounces at rubyforge.org im Auftrag von Dave Burt Gesendet: Do 15.09.2005 11:21 An: wtr-general at rubyforge.org Betreff: Re: [Wtr-general] How to click the Windows'Save'buttonwhendownloading a file Mueller schrieb: > Thanks for the answer. I tried this approach, but the Windows opens and > nothing > happens. the scripts is seems to "wait" for an action but nothing happens. > When I > cancel the script no error is reported in the log file. > > Any Idea why it doesnt work? Do i have to install some additional components? Try typing the script line by line into IRB, see where it stops working. If it's not getting a control or window (perhaps because you have a different version of IE or Windows to me, and the text or controls in the windows are different), you might have to change some of the parameters I'm passing to WindowWait or ControlClick etc. You can download AutoIt from http://www.autoitscript.com/autoit3/downloads.php - get the ZIP, and just pick AU3Info.exe out of it - if you run it, then cause the dialogs to be shown, that will tell you the info you need for your script. Cheers, Dave _______________________________________________ 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/20050915/209759b9/attachment.html From atuisheva at gmail.com Thu Sep 15 16:16:35 2005 From: atuisheva at gmail.com (Anna Tuisheva) Date: Thu, 15 Sep 2005 13:16:35 -0700 Subject: [Wtr-general] Modal IE popups with frames Message-ID: <4b3ccea505091513164418af4@mail.gmail.com> Yes, I know there've been many discussions about popup windows. Yet I'm starting another one. I'm trying to access a modal popup dialog that contains a frame inside it (well, the reality is not that simple: IFRAME inside a FRAME to make things more interesting...) I need to click objects inside this frame (IFRAME). This is what I tried: 1. AutoIt. I can get a handle of the popup window and close/ move it, but AutoIt does not see controls inside this window - the window itself is one big control - at least this is how AU3Info tool sees it. AuotIt does not retrieve handles of any controls inside the window as if the window was empty. 2. WinClicker. Same as AutoIt, it works OK as long as I only need to move/ close the window, but it does not access any controls inside it. 3. capture_events. The script execution hangs after the popup window opens and does not resume until the window is closed (manually, sigh). 4. Clicking objects by coordinates. Well, that works but it is not really way to go as we QA folks know ;-) I am evaluating whether Watir can be used for our product's test automation, and without a stable way to handle this window I'd have to say "no". Any help will be very appreciated. Thanks, Anna. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050915/af2431e9/attachment.html From bret at pettichord.com Thu Sep 15 17:08:56 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 15 Sep 2005 16:08:56 -0500 Subject: [Wtr-general] Modal IE popups with frames In-Reply-To: <4b3ccea505091513164418af4@mail.gmail.com> Message-ID: <5.1.0.14.2.20050915155501.022b6fe0@127.0.0.1> This is a very accurate assessment of where we stand today. I have most of solid solution in place. I'll be done when i find someone who can make a small change to Ruby's WIN32OLE library (written in C). Is there anyone here who knows COM and can compile C++? Bret At 03:16 PM 9/15/2005, Anna Tuisheva wrote: >Yes, I know there've been many discussions about popup windows. Yet I'm >starting another one. > >I'm trying to access a modal popup dialog that contains a frame inside it >(well, the reality is not that simple: IFRAME inside a FRAME to make >things more interesting...) I need to click objects inside this frame >(IFRAME). This is what I tried: > >1. AutoIt. I can get a handle of the popup window and close/ move it, but >AutoIt does not see controls inside this window - the window itself is one >big control - at least this is how AU3Info tool sees it. AuotIt does not >retrieve handles of any controls inside the window as if the window was empty. > >2. WinClicker. Same as AutoIt, it works OK as long as I only need to move/ >close the window, but it does not access any controls inside it. > >3. capture_events. The script execution hangs after the popup window opens >and does not resume until the window is closed (manually, sigh). > >4. Clicking objects by coordinates. Well, that works but it is not really >way to go as we QA folks know ;-) > >I am evaluating whether Watir can be used for our product's test >automation, and without a stable way to handle this window I'd have to say >"no". Any help will be very appreciated. > >Thanks, >Anna. >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From nishita.acharya at tatainfotech.com Fri Sep 16 01:11:34 2005 From: nishita.acharya at tatainfotech.com (Nishita Acharya) Date: Fri, 16 Sep 2005 10:41:34 +0530 Subject: [Wtr-general] Wtr-general Digest, Vol 22, Issue 16 References: <200509141609.j8EG9NcS009286@rubyforge.org> Message-ID: <000a01c5ba7d$1b7f40d0$950d7aa3@PC131> Hello, This question may have been dealt with before..but can someone tell me how i can install auotIt.Am not able to find the exe... Also i find some ODBC.rb and Oracle.rb progs in ruby...i want to know how they can be used for db connectivity. Regards, Nishita Acharya From jim_che_tih at yahoo.com Fri Sep 16 01:06:50 2005 From: jim_che_tih at yahoo.com (jim che) Date: Thu, 15 Sep 2005 22:06:50 -0700 (PDT) Subject: [Wtr-general] Dave did you update the Ruby-Mysql for mysql4.1.XX Message-ID: <20050916050650.49589.qmail@web33309.mail.mud.yahoo.com> Dear Dave I have to connect the mysql4.1.25 but the Ruby-Mysql just support the mysql4.0.XX. Have you updated the Ruby-Mysql to support the mysql4.1.XX Thank you jim --------------------------------- Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050915/d815d48b/attachment.html From bret at pettichord.com Fri Sep 16 11:12:17 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 16 Sep 2005 10:12:17 -0500 Subject: [Wtr-general] Database Connectivity Message-ID: <5.1.0.14.2.20050916100804.031561a0@127.0.0.1> There has been a lot of discussion regarding how to use Ruby to connect to a database. It would be great if someone collected this information and published it. These would be welcome on the Web Testing for Ruby wiki pages: http://wtr.rubyforge.org/wiki/wiki.pl?HomePage Another good place would be the RubyGarden wiki: http://rubygarden.org/ruby _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Fri Sep 16 11:07:38 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 16 Sep 2005 10:07:38 -0500 Subject: [Wtr-general] Wtr-general Digest, Vol 22, Issue 16 In-Reply-To: <000a01c5ba7d$1b7f40d0$950d7aa3@PC131> References: <200509141609.j8EG9NcS009286@rubyforge.org> Message-ID: <5.1.0.14.2.20050916100541.03145080@127.0.0.1> AutoIt is automatically included with the Watir Installer. AutoItX3.dll is in the watir library directory. Bret At 12:11 AM 9/16/2005, Nishita Acharya wrote: >Hello, > This question may have been dealt with before..but can someone tell me how >i can install auotIt.Am not able to find the exe... >Also i find some ODBC.rb and Oracle.rb progs in ruby...i want to know how >they can be used for db connectivity. > >Regards, >Nishita Acharya > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From Sean.Gallagher at ticketmaster.com Fri Sep 16 11:27:56 2005 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Fri, 16 Sep 2005 08:27:56 -0700 Subject: [Wtr-general] Multiple IE instances and session state Message-ID: <71D28C8451BFD5119B2B00508BE26E6409E11B27@pasmail3.office.tmcs> I am working on a script to run multiple IE instances that do not share the same session state. I need/want to run tests concurrently for different users in separate threads. Everything seems OK. I am able to launch separate instances of IE in separate threads and they do not seem to share the same session state. But how can I be sure? Can anyone give me some advice? Does anyone have a snippet of code that checks session cookies? I would like to confirm state somehow from inside my test. Thanks. -sean From saudaziz at gmail.com Fri Sep 16 12:50:46 2005 From: saudaziz at gmail.com (saud aziz) Date: Fri, 16 Sep 2005 09:50:46 -0700 Subject: [Wtr-general] Test Case Management In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D370@EX5V.rl.gov> References: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D370@EX5V.rl.gov> Message-ID: <24d0cb3805091609505fb4339b@mail.gmail.com> Which one are you using? I am actually in the process of evaluating Test Link. Good thing about it is that you can tie your database of test case management with bug tracker (bugzilla is somewhat supported only right now with some support for mantis in new beta). It's free and if i can tie it in mantis, i am all set. http://testlink.sourceforge.net Saud On 9/12/05, Cain, Mark wrote: > > There may be a better forum to ask this, but since I don't know of one > here goes? > > Does anyone know of a good (open source or inexpensive) Test Case > Management system? One that can keep track of my automation as well as my > manual test cases? The one am currently using is not adequate anymore and > volume of automation and manual test cases is growing to the point of being > a little unwieldy. > > Thanks in advance, > > ____________________ > *Mark L. Cain* > *LMIT -** **E*****STARS*(r)* **~** **Lead Test Engineer* > *1981 Snyder, MSIN: G3-62, Richland, WA 99354** > Mark_Cain at RL.gov > 509.376.5458* > *"640 Kilobytes of computer memory ought to be enough for anybody."** - > Bill Gates, 1981 * > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- "..man is a human being, not because of his physical powers for physically the camel is his superior; not because of his size for the elephant is larger; not because of his courage for the lion is more courageous; not because of his appetite for the ox has the greater; not because of coitus for the least of the birds is more virile than he, but rather by virtue of his noble aims and ideals. [As a matter of fact] he was only created to know." (Al- Ghazali; The book of Knowledge, Section 1) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050916/d6c885bd/attachment.html From bret at pettichord.com Fri Sep 16 13:06:37 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 16 Sep 2005 12:06:37 -0500 Subject: [Wtr-general] Multiple IE instances and session state In-Reply-To: <71D28C8451BFD5119B2B00508BE26E6409E11B27@pasmail3.office.t mcs> Message-ID: <5.1.0.14.2.20050916120543.031d5e50@127.0.0.1> At 10:27 AM 9/16/2005, Sean Gallagher wrote: >Can anyone give me some advice? Does anyone have a snippet of code that >checks session cookies? I would like to confirm state somehow from inside my >test. You can access the cookie object using ie.ie.cookie Bret _____________________ Bret Pettichord www.pettichord.com From Sean.Gallagher at ticketmaster.com Fri Sep 16 13:26:26 2005 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Fri, 16 Sep 2005 10:26:26 -0700 Subject: [Wtr-general] Multiple IE instances and session state Message-ID: <71D28C8451BFD5119B2B00508BE26E6409E11B2B@pasmail3.office.tmcs> Is that a new method? It doesn't seem to be in 1.4.1. Anyway, I did figure out an acceptable solution to my problem. I only needed to check the cookie while debugging my script, so I just inserted a debug clause, like so: $debug = true if $debug ie.goto("javascript:document.cookie") sleep 2 exit end -sean -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Friday, September 16, 2005 10:07 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Multiple IE instances and session state At 10:27 AM 9/16/2005, Sean Gallagher wrote: >Can anyone give me some advice? Does anyone have a snippet of code that >checks session cookies? I would like to confirm state somehow from inside my >test. You can access the cookie object using ie.ie.cookie Bret _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From newton at pingsite.com Fri Sep 16 13:37:55 2005 From: newton at pingsite.com (Dave Newton) Date: Fri, 16 Sep 2005 13:37:55 -0400 Subject: [Wtr-general] Exception during IE.attach_browser_window? Message-ID: <432B02F3.4040904@pingsite.com> Hi, Yesterday a script that had been working fine suddenly broke with an exception during the :title case of attach_browser_window. I added an empty 'rescue' clause in addition to the WIN32OLERuntimeError already there, but I'm not sure why things suddenly crapped out on me. Any ideas? I hadn't installed any software (well, I gem installed DBI then uninstalled it) so I'm at a bit of a loss. Dave From bret at pettichord.com Fri Sep 16 16:32:29 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 16 Sep 2005 15:32:29 -0500 Subject: [Wtr-general] Multiple IE instances and session state In-Reply-To: <71D28C8451BFD5119B2B00508BE26E6409E11B2B@pasmail3.office.t mcs> Message-ID: <5.1.0.14.2.20050916153131.032be058@127.0.0.1> My mistake. I should have said: ie.ie.document.cookie. At 12:26 PM 9/16/2005, Sean Gallagher wrote: >Is that a new method? It doesn't seem to be in 1.4.1. > >Anyway, I did figure out an acceptable solution to my problem. I only needed >to check the cookie while debugging my script, so I just inserted a debug >clause, like so: > > $debug = true > > if $debug > ie.goto("javascript:document.cookie") > sleep 2 > exit > end > >-sean > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord >Sent: Friday, September 16, 2005 10:07 AM >To: wtr-general at rubyforge.org >Subject: Re: [Wtr-general] Multiple IE instances and session state > >At 10:27 AM 9/16/2005, Sean Gallagher wrote: > >Can anyone give me some advice? Does anyone have a snippet of code that > >checks session cookies? I would like to confirm state somehow from inside >my > >test. > >You can access the cookie object using > ie.ie.cookie > >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 _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Fri Sep 16 16:33:19 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 16 Sep 2005 15:33:19 -0500 Subject: [Wtr-general] Exception during IE.attach_browser_window? In-Reply-To: <432B02F3.4040904@pingsite.com> Message-ID: <5.1.0.14.2.20050916153303.032c0b40@127.0.0.1> What was the error message? At 12:37 PM 9/16/2005, Dave Newton wrote: >Hi, > >Yesterday a script that had been working fine suddenly broke with an >exception during the :title case of attach_browser_window. I added an >empty 'rescue' clause in addition to the WIN32OLERuntimeError already >there, but I'm not sure why things suddenly crapped out on me. > >Any ideas? I hadn't installed any software (well, I gem installed DBI >then uninstalled it) so I'm at a bit of a loss. > >Dave > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From christopher.mcmahon at gmail.com Fri Sep 16 16:50:46 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 16 Sep 2005 15:50:46 -0500 Subject: [Wtr-general] Database Connectivity In-Reply-To: <5.1.0.14.2.20050916100804.031561a0@127.0.0.1> References: <5.1.0.14.2.20050916100804.031561a0@127.0.0.1> Message-ID: <72799cd70509161350365bf00@mail.gmail.com> On 9/16/05, Bret Pettichord wrote: > There has been a lot of discussion regarding how to use Ruby to connect to > a database. It would be great if someone collected this information and > published it. I've been doing lots of ODBC recently, and reading http://www.ch-werner.de/rubyodbc/odbc.html It's pretty handy. A nifty aspect of Ruby's ODBC (true of all of Ruby DBI?) is that the fetch methods consistently return arrays of arrays (AoA). That is SELECT a, b, c FROM table yields [[a1,b1,c1],[a2,b2,c2],etc]. Which I find really easy to use. I suspect that the reason that more Ruby DBI docs don't exist is that DBI is pretty old and extremely well-documented in other languages, particularly Perl. http://search.cpan.org/~timb/DBI-1.48/DBI.pm. There are whole books about Perl's DBI, and a DBI libraries all work in roughly the same way. -Chris From newton at pingsite.com Fri Sep 16 17:46:20 2005 From: newton at pingsite.com (Dave Newton) Date: Fri, 16 Sep 2005 17:46:20 -0400 Subject: [Wtr-general] Exception during IE.attach_browser_window? In-Reply-To: <5.1.0.14.2.20050916153303.032c0b40@127.0.0.1> References: <5.1.0.14.2.20050916153303.032c0b40@127.0.0.1> Message-ID: <432B3D2C.6080902@pingsite.com> Bret Pettichord wrote: >What was the error message? > > Something along the lines of a nilClass not having a title (so aWin.document didn't exist). Sorry I can't be more specific at the moment (and a resounding *thwack* for my crappy error question :/ but I'm under a crunch on an unrelated issue and can't pop the stack for awhile. Dave From atuisheva at gmail.com Fri Sep 16 19:26:25 2005 From: atuisheva at gmail.com (Anna Tuisheva) Date: Fri, 16 Sep 2005 16:26:25 -0700 Subject: [Wtr-general] Modal IE popups with frames In-Reply-To: <5.1.0.14.2.20050915155501.022b6fe0@127.0.0.1> References: <4b3ccea505091513164418af4@mail.gmail.com> <5.1.0.14.2.20050915155501.022b6fe0@127.0.0.1> Message-ID: <4b3ccea505091616267a206388@mail.gmail.com> Brett, our company does not really use C++, but if you give me more details on what needs to be done, I can ask for development assistance. Anna. On 9/15/05, Bret Pettichord wrote: > > This is a very accurate assessment of where we stand today. > > I have most of solid solution in place. I'll be done when i find someone > who can make a small change to Ruby's WIN32OLE library (written in C). Is > there anyone here who knows COM and can compile C++? > > Bret > > At 03:16 PM 9/15/2005, Anna Tuisheva wrote: > >Yes, I know there've been many discussions about popup windows. Yet I'm > >starting another one. > > > >I'm trying to access a modal popup dialog that contains a frame inside it > >(well, the reality is not that simple: IFRAME inside a FRAME to make > >things more interesting...) I need to click objects inside this frame > >(IFRAME). This is what I tried: > > > >1. AutoIt. I can get a handle of the popup window and close/ move it, but > >AutoIt does not see controls inside this window - the window itself is > one > >big control - at least this is how AU3Info tool sees it. AuotIt does not > >retrieve handles of any controls inside the window as if the window was > empty. > > > >2. WinClicker. Same as AutoIt, it works OK as long as I only need to > move/ > >close the window, but it does not access any controls inside it. > > > >3. capture_events. The script execution hangs after the popup window > opens > >and does not resume until the window is closed (manually, sigh). > > > >4. Clicking objects by coordinates. Well, that works but it is not really > >way to go as we QA folks know ;-) > > > >I am evaluating whether Watir can be used for our product's test > >automation, and without a stable way to handle this window I'd have to > say > >"no". Any help will be very appreciated. > > > >Thanks, > >Anna. > >_______________________________________________ > >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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050916/b83e0937/attachment.html From atuisheva at gmail.com Fri Sep 16 19:57:00 2005 From: atuisheva at gmail.com (Anna Tuisheva) Date: Fri, 16 Sep 2005 16:57:00 -0700 Subject: [Wtr-general] Clicking a tablecell does fire up an event Message-ID: <4b3ccea5050916165727b411d1@mail.gmail.com> I'm working with a page that has a table with two events - onKeyDown and onDblClick. When these events occur, an input text box is displayed in a cell that's been clicked. It's always the same input, but repositioned to a new cell each time. It is not visible when no cells are active: it is located on an invisible layer. All these objects are in a frame. Luckily, all table cells have IDs. Watir clicks and sets focus to the cells, but the events are never fired up. No errors returned; the cells are highlighted as they are clicked, so this part works. I need to enter values into the cells using the input that is displayed after clicking them (this is a table event). I tried Table[1][1].click, Table[1].[1].focus, Table.fireEvent, Table[1][1].fireEvent, send_keys, and several AutoIt tricks. I also tried various combinations of all these methods. The only thing that seems to work is clicking cells by coordinates. This is not an option at all. Any ideas? Thanks, Anna. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050916/cb9c4645/attachment.html From john.lloydjones at gmail.com Fri Sep 16 20:10:04 2005 From: john.lloydjones at gmail.com (John Lloyd-Jones) Date: Fri, 16 Sep 2005 17:10:04 -0700 Subject: [Wtr-general] Clicking a tablecell does fire up an event In-Reply-To: <4b3ccea5050916165727b411d1@mail.gmail.com> References: <4b3ccea5050916165727b411d1@mail.gmail.com> Message-ID: <6fcd26f10509161710739829c9@mail.gmail.com> Anna Difficult to say without seeing the event handler code, but I would guess that the event handler is using some information from the event that you are not supplying in your fireEvent call. When you say it seems to work "clicking cells by coordinates", how did you pass those values? In the event object? John On 9/16/05, Anna Tuisheva wrote: > > I'm working with a page that has a table with two events - onKeyDown and > onDblClick. When these events occur, an input text box is displayed in a > cell that's been clicked. It's always the same input, but repositioned to a > new cell each time. It is not visible when no cells are active: it is > located on an invisible layer. All these objects are in a frame. > Luckily, all table cells have IDs. Watir clicks and sets focus to the > cells, but the events are never fired up. No errors returned; the cells are > highlighted as they are clicked, so this part works. > I need to enter values into the cells using the input that is displayed > after clicking them (this is a table event). I tried Table[1][1].click, > Table[1].[1].focus, Table.fireEvent, Table[1][1].fireEvent, send_keys, and > several AutoIt tricks. I also tried various combinations of all these > methods. The only thing that seems to work is clicking cells by coordinates. > This is not an option at all. > Any ideas? > Thanks, > Anna. > > _______________________________________________ > 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/20050916/28605f29/attachment.html From dave at burt.id.au Fri Sep 16 20:08:47 2005 From: dave at burt.id.au (Dave Burt) Date: Sat, 17 Sep 2005 10:08:47 +1000 Subject: [Wtr-general] Wtr-general Digest, Vol 22, Issue 16 References: <200509141609.j8EG9NcS009286@rubyforge.org> <000a01c5ba7d$1b7f40d0$950d7aa3@PC131> Message-ID: <007301c5bb1b$fa3fe650$6402a8c0@telperion> Nishita Acharya asked: > This question may have been dealt with before..but can someone tell me how > i can install auotIt.Am not able to find the exe... As Bret said, the DLL is really most of what you need. although the Info tool is helpful, too. Look it up at http://www.autoitscript.com/autoit3/ > Also i find some ODBC.rb and Oracle.rb progs in ruby...i want to know how > they can be used for db connectivity. These are under the DBI/DBD directory. Here is the documentation for DBI: http://ruby-dbi.rubyforge.org/DBI_SPEC.html http://www.kitebird.com/articles/ruby-dbi.html Cheers, Dave From dave at burt.id.au Fri Sep 16 20:10:00 2005 From: dave at burt.id.au (Dave Burt) Date: Sat, 17 Sep 2005 10:10:00 +1000 Subject: [Wtr-general] Dave did you update the Ruby-Mysql for mysql4.1.XX References: <20050916050650.49589.qmail@web33309.mail.mud.yahoo.com> Message-ID: <007b01c5bb1c$256372c0$6402a8c0@telperion> jim asked: > I have to connect the mysql4.1.25 but the Ruby-Mysql just support the > mysql4.0.XX. > Have you updated the Ruby-Mysql to support the mysql4.1.XX Try this advice (from ruby-talk): use mysql-administrator & check the Startup Parameters->Security->Use Old Passwords checkbox restart mysql server try again. Cheers, Dave From atuisheva at gmail.com Fri Sep 16 21:00:12 2005 From: atuisheva at gmail.com (Anna Tuisheva) Date: Fri, 16 Sep 2005 18:00:12 -0700 Subject: [Wtr-general] Clicking a tablecell does fire up an event In-Reply-To: <6fcd26f10509161710739829c9@mail.gmail.com> References: <4b3ccea5050916165727b411d1@mail.gmail.com> <6fcd26f10509161710739829c9@mail.gmail.com> Message-ID: <4b3ccea50509161800127673c6@mail.gmail.com> Thanks for your reply, John. I used AutoIt to click by coordinates - MouseClick("left", x, y). When I fire one of the events (MyTable[1][6].fireEvent("ondblclick")), I get script error that complains about no cells being selected. Is there a way to select table cell? Or may be a way to assign a value to the cell's custom properties? The cells have cellValue attribute, and may be I can assign a value to this attribute directly? Anna. On 9/16/05, John Lloyd-Jones wrote: > > Anna > Difficult to say without seeing the event handler code, but I would guess > that the event handler is using some information from the event that you are > not supplying in your fireEvent call. When you say it seems to work > "clicking cells by coordinates", how did you pass those values? In the event > object? > John > > > On 9/16/05, Anna Tuisheva wrote: > > > I'm working with a page that has a table with two events - onKeyDown > > and onDblClick. When these events occur, an input text box is displayed in a > > cell that's been clicked. It's always the same input, but repositioned to a > > new cell each time. It is not visible when no cells are active: it is > > located on an invisible layer. All these objects are in a frame. > > Luckily, all table cells have IDs. Watir clicks and sets focus to the > > cells, but the events are never fired up. No errors returned; the cells are > > highlighted as they are clicked, so this part works. > > I need to enter values into the cells using the input that is displayed > > after clicking them (this is a table event). I tried Table[1][1].click, > > Table[1].[1].focus, Table.fireEvent, Table[1][1].fireEvent, send_keys, > > and several AutoIt tricks. I also tried various combinations of all these > > methods. The only thing that seems to work is clicking cells by coordinates. > > This is not an option at all. > > Any ideas? > > Thanks, > > Anna. > > > > _______________________________________________ > > 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 > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050916/e112e058/attachment.html From john.lloydjones at gmail.com Sat Sep 17 14:24:37 2005 From: john.lloydjones at gmail.com (John Lloyd-Jones) Date: Sat, 17 Sep 2005 11:24:37 -0700 Subject: [Wtr-general] Clicking a tablecell does fire up an event In-Reply-To: <4b3ccea50509161800127673c6@mail.gmail.com> References: <4b3ccea5050916165727b411d1@mail.gmail.com> <6fcd26f10509161710739829c9@mail.gmail.com> <4b3ccea50509161800127673c6@mail.gmail.com> Message-ID: <6fcd26f1050917112413ab96f3@mail.gmail.com> > > I used AutoIt to click by coordinates - MouseClick("left", x, y). > When I fire one of the events Mmm, that strengthens my suspicion that the event handler is using the mouse co-ordinates from the event object. > (MyTable[1][6].fireEvent("ondblclick")), I get script error > that complains about no cells being selected. > Is there a way to select table cell? Table cells do not have an inate "selected" property, though like all objects, they can have a "selected" property set by the script. > Or may be a way to assign a value to the cell's custom properties? The cells > have cellValue attribute, and may be I can assign a value to this attribute > directly? > That might work, but it would depend on what attribute(s) the script expects. Is there any chance that you could post the event handler script here? [Tried to reply ealier today, but the mail seems to have got lost, so this is a retry.] > Anna. > > > > On 9/16/05, John Lloyd-Jones wrote: > > Anna > > Difficult to say without seeing the event handler code, but I would guess > that the event handler is using some information from the event that you are > not supplying in your fireEvent call. When you say it seems to work > "clicking cells by coordinates", how did you pass those values? In the event > object? > > John > > > > > > > > > > On 9/16/05, Anna Tuisheva < atuisheva at gmail.com> wrote: > > > > > > > > > I'm working with a page that has a table with two events - onKeyDown and > onDblClick. When these events occur, an input text box is displayed in a > cell that's been clicked. It's always the same input, but repositioned to a > new cell each time. It is not visible when no cells are active: it is > located on an invisible layer. All these objects are in a frame. > > > Luckily, all table cells have IDs. Watir clicks and sets focus to the > cells, but the events are never fired up. No errors returned; the cells are > highlighted as they are clicked, so this part works. > > > I need to enter values into the cells using the input that is displayed > after clicking them (this is a table event). I tried Table[1][1].click, > Table[1].[1].focus, Table.fireEvent, Table[1][1].fireEvent, send_keys, and > several AutoIt tricks. I also tried various combinations of all these > methods. The only thing that seems to work is clicking cells by coordinates. > This is not an option at all. > > > Any ideas? > > > > > > Thanks, > > > Anna. > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > From bret at pettichord.com Sun Sep 18 12:09:26 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sun, 18 Sep 2005 11:09:26 -0500 Subject: [Wtr-general] Modal IE popups with frames In-Reply-To: <4b3ccea505091616267a206388@mail.gmail.com> References: <5.1.0.14.2.20050915155501.022b6fe0@127.0.0.1> <4b3ccea505091513164418af4@mail.gmail.com> <5.1.0.14.2.20050915155501.022b6fe0@127.0.0.1> Message-ID: <5.1.0.14.2.20050918110801.03409d78@127.0.0.1> Actually, since my last note, i've received word from a programmer helping me that he has a solution to this problem. I'll keep you all posted... Bret At 06:26 PM 9/16/2005, Anna Tuisheva wrote: >Brett, our company does not really use C++, but if you give me more >details on what needs to be done, I can ask for development assistance. > >Anna. > > >On 9/15/05, Bret Pettichord ><bret at pettichord.com> wrote: >This is a very accurate assessment of where we stand today. > >I have most of solid solution in place. I'll be done when i find someone >who can make a small change to Ruby's WIN32OLE library (written in C). Is >there anyone here who knows COM and can compile C++? > >Bret > >At 03:16 PM 9/15/2005, Anna Tuisheva wrote: > >Yes, I know there've been many discussions about popup windows. Yet I'm > >starting another one. > > > >I'm trying to access a modal popup dialog that contains a frame inside it > >(well, the reality is not that simple: IFRAME inside a FRAME to make > >things more interesting...) I need to click objects inside this frame > >(IFRAME). This is what I tried: > > > >1. AutoIt. I can get a handle of the popup window and close/ move it, but > >AutoIt does not see controls inside this window - the window itself is one > >big control - at least this is how AU3Info tool sees it. AuotIt does not > >retrieve handles of any controls inside the window as if the window was > empty. > > > >2. WinClicker. Same as AutoIt, it works OK as long as I only need to move/ > >close the window, but it does not access any controls inside it. > > > >3. capture_events. The script execution hangs after the popup window opens > >and does not resume until the window is closed (manually, sigh). > > > >4. Clicking objects by coordinates. Well, that works but it is not really > >way to go as we QA folks know ;-) > > > >I am evaluating whether Watir can be used for our product's test > >automation, and without a stable way to handle this window I'd have to say > >"no". Any help will be very appreciated. > > > >Thanks, > >Anna. > >_______________________________________________ > >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 _____________________ Bret Pettichord www.pettichord.com From zeljko.filipin at gmail.com Mon Sep 19 03:22:25 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Mon, 19 Sep 2005 09:22:25 +0200 Subject: [Wtr-general] Watir for javascript-driven pages? In-Reply-To: <4320861D.90602@gmail.com> Message-ID: <432e670d.5e908999.0dd7.021e@mx.gmail.com> http://wtr.rubyforge.org/wiki/wiki.pl?FrequentQuestions Zeljko -----Original Message----- By the way, is there a search function for the mail achive? From zeljko.filipin at gmail.com Mon Sep 19 03:32:48 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Mon, 19 Sep 2005 09:32:48 +0200 Subject: [Wtr-general] How to find watir version number In-Reply-To: <1641BB0AA7287848817A63C3EE9677D507D9D150@hqp-ex-mb05.na.msds.rhi.com> Message-ID: <432e697c.5a776cbd.5dfa.70f8@mx.gmail.com> Type in command line: ruby -e 'require "watir"; puts Watir::IE::VERSION' Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Torres, Ben (HQP) Sent: Saturday, September 10, 2005 1:03 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] How to find watir version number What's the easiest way to find the version I am using for watir? Can I have it print to screen during a script execution? _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Mark_Cain at rl.gov Mon Sep 19 10:10:51 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Mon, 19 Sep 2005 07:10:51 -0700 Subject: [Wtr-general] Clicking a tablecell does fire up an event Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D399@EX5V.rl.gov> Anna, I had something similar as you describe-in my case dynamically add/removed buttons on a page inside a table. When add/removing I had to reload the table object before WATIR could see and respond to the newly added/removed object. My code was something like this: #navigate to the page to test gotoPopUpPage() $ie.link(:text, /Functional Area/i).click #load the table before removing any rows table = $ie.table(:index, 8) #get the number of rows rowCount = table.row_count #remove a row from the table table[rowCount][2].button("Delete").click #reload table to account for removal of row table = $ie.table(:index, 8) begin #compare row count before and after assert_not_equal(rowCount,table.row_count) rescue => e puts "*FAILED*." + e.message + "\n" + e.backtrace.join("\n") end $ie.close You might try reloading your MyTable object before you try clicking the dynamically added objects. Hope this helps. --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Anna Tuisheva Sent: Friday, September 16, 2005 6:00 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Clicking a tablecell does fire up an event Thanks for your reply, John. I used AutoIt to click by coordinates - MouseClick("left", x, y). When I fire one of the events (MyTable[1][6].fireEvent("ondblclick")), I get script error that complains about no cells being selected. Is there a way to select table cell? Or may be a way to assign a value to the cell's custom properties? The cells have cellValue attribute, and may be I can assign a value to this attribute directly? Anna. On 9/16/05, John Lloyd-Jones wrote: Anna Difficult to say without seeing the event handler code, but I would guess that the event handler is using some information from the event that you are not supplying in your fireEvent call. When you say it seems to work "clicking cells by coordinates", how did you pass those values? In the event object? John On 9/16/05, Anna Tuisheva < atuisheva at gmail.com > wrote: I'm working with a page that has a table with two events - onKeyDown and onDblClick. When these events occur, an input text box is displayed in a cell that's been clicked. It's always the same input, but repositioned to a new cell each time. It is not visible when no cells are active: it is located on an invisible layer. All these objects are in a frame. Luckily, all table cells have IDs. Watir clicks and sets focus to the cells, but the events are never fired up. No errors returned; the cells are highlighted as they are clicked, so this part works. I need to enter values into the cells using the input that is displayed after clicking them (this is a table event). I tried Table[1][1].click, Table[1].[1].focus, Table.fireEvent, Table[1][1].fireEvent, send_keys, and several AutoIt tricks. I also tried various combinations of all these methods. The only thing that seems to work is clicking cells by coordinates. This is not an option at all. Any ideas? Thanks, Anna. _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050919/85d316f3/attachment.html From alf at klickit.com Mon Sep 19 14:13:19 2005 From: alf at klickit.com (Alfred Whitehead) Date: Mon, 19 Sep 2005 14:13:19 -0400 Subject: [Wtr-general] Trapping page source on error Message-ID: <432EFFBF.2000108@klickit.com> Hi everyone, We run Watir in a pretty conventional way at my company - using the Test::Unit framework. This works really well, but when tests are running unattended, it would be really nice to get some more feedback from scripts that have errors. Our developers pointed out that providing the HTML source of the page loaded in IE at the time of the error would be great. Does anyone know of an elegant way to trap this sort of information? I have been considering extending Test::Unit::Error to query a global $ie variable and interrogate it for its page source, but this may not be the optimal solution. Thanks for your feedback! -- Alf Whitehead 416-214-4977 x260 Quality Assurance Specialist Klick Communications, http://klick.com/ From christopher.mcmahon at gmail.com Mon Sep 19 14:48:41 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 19 Sep 2005 13:48:41 -0500 Subject: [Wtr-general] Trapping page source on error In-Reply-To: <432EFFBF.2000108@klickit.com> References: <432EFFBF.2000108@klickit.com> Message-ID: <72799cd70509191148625febfc@mail.gmail.com> > from scripts that have errors. Our developers pointed out that > providing the HTML source of the page loaded in IE at the time of the > error would be great. begin assert(ie.foo == x) rescue => e puts ie.getHTML end would do it, yes? -C From alf at klickit.com Mon Sep 19 15:06:33 2005 From: alf at klickit.com (Alfred Whitehead) Date: Mon, 19 Sep 2005 15:06:33 -0400 Subject: [Wtr-general] Trapping page source on error In-Reply-To: <72799cd70509191148625febfc@mail.gmail.com> References: <432EFFBF.2000108@klickit.com> <72799cd70509191148625febfc@mail.gmail.com> Message-ID: <432F0C39.20505@klickit.com> Chris McMahon wrote: >>from scripts that have errors. Our developers pointed out that >>providing the HTML source of the page loaded in IE at the time of the >>error would be great. >> >> > > begin > assert(ie.foo == x) > rescue => e > puts ie.getHTML > end > >would do it, yes? >-C > > Yeah, that'll do fine for a single assertion or even a single test_ method if it is wrapped around. You are forced to duplicate the code around every area that's liable to break. I think I figure out a solution that is more convenient in terms of reducing code duplication... here's an example: class PageSourceError < Test::Unit::Error def initialize(test_name, exception) if $ie begin @pagesource = $ie.getHTML rescue @pagesource = nil end end super end def long_display if @pagesource return "#{super}\nPage Source: #{@pagesource}" else return super end end end class PageSourceTestCase < Test::Unit::TestCase # Overrides the default add_error method to trap the page source (if available) def add_error(exception) @test_passed = false @_result.add_error(PageSourceError.new(name, exception)) end private :add_error end You then declare your test cases to inherit from PageSourceTestCase instead of Test::TestCase and you get error trapping for free. Note that I have just been playing with this code... it has a few issues, and isn't ready for prime time yet. -- Alf Whitehead 416-214-4977 x260 Quality Assurance Specialist Klick Communications, http://klick.com/ From kkaminski at kcura.com Mon Sep 19 20:11:41 2005 From: kkaminski at kcura.com (Keith Kaminski) Date: Mon, 19 Sep 2005 19:11:41 -0500 Subject: [Wtr-general] Focus Issue Message-ID: First off, I just wanted to say that I've been pretty impressed with Watir so far. I've only been playing around with it for about 30 minutes and I've already got a few comprehensive tests running. I'm very excited about the prospect of integrating Watir with NUnit and having it be a part of our automated build process. Anyway, I am having a problem right now with window focus. I'm writing test scripts and executing them from the cmd console by invoking the appropriate .rb file. The problem is that the focus of window doesn't shift from the command prompt to the new IE window. This isn't a problem for most of the tests I've written so far, but it does screw up Javascript dialog boxes. The WindowHelper doesn't seem to know that my javascript dialog boxes exist unless the focus is on the IE window. If I manually click on the window prior to the point where I need to click "OK" in my javascript dialog box, it works fine. I can't count on the ability to do this during automated testing, however. Any help would be appreciated. Thanks! - Keith -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050919/2d72aef6/attachment.html From kkaminski at kcura.com Mon Sep 19 20:24:22 2005 From: kkaminski at kcura.com (Keith Kaminski) Date: Mon, 19 Sep 2005 19:24:22 -0500 Subject: [Wtr-general] Focus Issue Message-ID: Sorry, just a point of clarification. I know that I can just double click on a .rb file from explorer and have it run fine. I guess what I'm asking is if there is a command that will automatically set the focus to the new IE window. - Keith ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Keith Kaminski Sent: Monday, September 19, 2005 7:12 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Focus Issue First off, I just wanted to say that I've been pretty impressed with Watir so far. I've only been playing around with it for about 30 minutes and I've already got a few comprehensive tests running. I'm very excited about the prospect of integrating Watir with NUnit and having it be a part of our automated build process. Anyway, I am having a problem right now with window focus. I'm writing test scripts and executing them from the cmd console by invoking the appropriate .rb file. The problem is that the focus of window doesn't shift from the command prompt to the new IE window. This isn't a problem for most of the tests I've written so far, but it does screw up Javascript dialog boxes. The WindowHelper doesn't seem to know that my javascript dialog boxes exist unless the focus is on the IE window. If I manually click on the window prior to the point where I need to click "OK" in my javascript dialog box, it works fine. I can't count on the ability to do this during automated testing, however. Any help would be appreciated. Thanks! - Keith -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050919/cdb2d32d/attachment.html From jim_che_tih at yahoo.com Tue Sep 20 03:32:55 2005 From: jim_che_tih at yahoo.com (jim che) Date: Tue, 20 Sep 2005 00:32:55 -0700 (PDT) Subject: [Wtr-general] Help, how to click the button of the windows that poped up by javascript? Message-ID: <20050920073255.43296.qmail@web33311.mail.mud.yahoo.com> Hi all the ruby code was as below ie.link(:text,"Delete").click if $au3.WinExists("Microsoft Internet Explorer") log("win exist") sleep(1) $au3.Send("{TAB 1}{ENTER}") else log("win not exist") end After click the link "Delete" a small window will pop up by script I want to click the "ok" button of that small window but it can't The system will log the "win exist" but can't send the operation "enter" to the small window. How can I do this? Thank you --------------------------------- Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050920/c90dc15c/attachment.html From Jamuna.Nithyanandam at honeywell.com Tue Sep 20 04:49:26 2005 From: Jamuna.Nithyanandam at honeywell.com (Jamuna, Nithyanandam (IE10)) Date: Tue, 20 Sep 2005 01:49:26 -0700 Subject: [Wtr-general] Help, how to click the button of the windows th at poped up by javascript? Message-ID: <77ED2BF75D59D1439F90412CC5B1097424E9E316@ie10-sahara.hiso.honeywell.com> Hi Jim, a) Include the definition of startClicker (available in winClicker.rb) def startClicker( button , waitTime = 0) 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 b) Before you click on delete call startClicker, say startClicker("OK") c) Call the button click for Delete Hope this helps you, all the best Regards, Jamuna Nithyanandam _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of jim che Sent: Tuesday, September 20, 2005 1:03 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Help, how to click the button of the windows that poped up by javascript? Hi all the ruby code was as below ie.link(:text,"Delete").click if $au3.WinExists("Microsoft Internet Explorer") log("win exist") sleep(1) $au3.Send("{TAB 1}{ENTER}") else log("win not exist") end After click the link "Delete" a small window will pop up by script I want to click the "ok" button of that small window but it can't The system will log the "win exist" but can't send the operation "enter" to the small window. How can I do this? Thank you _____ Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050920/2180563e/attachment.html From noreply at rubyforge.org Tue Sep 20 10:51:13 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 20 Sep 2005 10:51:13 -0400 Subject: [Wtr-general] [ wtr-Bugs-2485 ] WinClicker problems when ruby/watir installed in program files Message-ID: <200509201451.j8KEpD1H022006@rubyforge.org> Bugs item #2485, was opened at 2005-09-20 10:51 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2485&group_id=104 Category: Dialogs Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: WinClicker problems when ruby/watir installed in program files Initial Comment: Just been down to diagnose/workaround a problem with some colleagues. The stuff in winclicker that uses 'start' and @path_to_clicker has some problems when the clicker is installed in a dir with spaces. Our bug manifested in setFileRequesterFileName_newProcess, but I'd expect to see it elsewhere too. The current version of the method renders this command line for winsystem to execute: start C:\Program Files\ruby\lib\ruby\site_ruby\1.8\watir\setFileDialog.rb c:\myfile.txt We started by quoting the commmand, so the result was: start "C:\Program Files\ruby\lib\ruby\site_ruby\1.8\watir\setFileDialog.rb" c:\myfile.txt We discovered that start interprets the "" as a window title (see help for start) , so we needed to prefix a dummy window title to keep moving: start "windowtitle" "C:\Program Files\ruby\lib\ruby\site_ruby\1.8\watir\setFileDialog.rb" c:\myfile.txt The resultant method looks like this: def setFileRequesterFileName_newProcess ( textToSet ) myapp = "\#{@path_to_clicker}/setFileDialog.rb\ #{textToSet}" puts "Starting win setFileDialog in new process. Setting text #{textToSet}" puts "Starting app: #{myapp}" winsystem( "start \windowtitle\ #{myapp}" ) end ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2485&group_id=104 From bret at pettichord.com Tue Sep 20 12:16:46 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 20 Sep 2005 11:16:46 -0500 Subject: [Wtr-general] Focus Issue In-Reply-To: Message-ID: <5.1.0.14.2.20050920111633.034dd2c8@127.0.0.1> At 07:11 PM 9/19/2005, Keith Kaminski wrote: >Anyway, I am having a problem right now with window focus. I m writing >test scripts and executing them from the cmd console by invoking the >appropriate .rb file. The problem is that the focus of window doesn t >shift from the command prompt to the new IE window. This isn t a problem >for most of the tests I ve written so far, but it does screw up Javascript >dialog boxes. The WindowHelper doesn t seem to know that my javascript >dialog boxes exist unless the focus is on the IE window. If I manually >click on the window prior to the point where I need to click OK in my >javascript dialog box, it works fine. I can t count on the ability to do >this during automated testing, however. Any help would be appreciated. Did you try ie.focus? _____________________ Bret Pettichord www.pettichord.com From kkaminski at kcura.com Tue Sep 20 12:40:58 2005 From: kkaminski at kcura.com (Keith Kaminski) Date: Tue, 20 Sep 2005 11:40:58 -0500 Subject: [Wtr-general] Focus Issue Message-ID: I can't get focus to do anything. In fact, whenever I try to use it I get an error. It should be as easy as something like this right? $ie = IE.new $ie.goto("http://www.google.com") $ie.focus() -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Tuesday, September 20, 2005 11:17 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Focus Issue At 07:11 PM 9/19/2005, Keith Kaminski wrote: >Anyway, I am having a problem right now with window focus. I m writing >test scripts and executing them from the cmd console by invoking the >appropriate .rb file. The problem is that the focus of window doesn t >shift from the command prompt to the new IE window. This isn t a problem >for most of the tests I ve written so far, but it does screw up Javascript >dialog boxes. The WindowHelper doesn t seem to know that my javascript >dialog boxes exist unless the focus is on the IE window. If I manually >click on the window prior to the point where I need to click OK in my >javascript dialog box, it works fine. I can t count on the ability to do >this during automated testing, however. Any help would be appreciated. Did you try ie.focus? _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From kkaminski at kcura.com Tue Sep 20 12:44:16 2005 From: kkaminski at kcura.com (Keith Kaminski) Date: Tue, 20 Sep 2005 11:44:16 -0500 Subject: [Wtr-general] Help, how to click the button of the windows th at poped up by javascript? Message-ID: I'm having a similar issue. I'm a complete ruby/watir newbie... can you explain what you mean by "include the definition of startClicker"? I couldn't find the code you produced within my winClicker.rb file. Thanks. - Keith ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jamuna, Nithyanandam (IE10) Sent: Tuesday, September 20, 2005 3:49 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Help,how to click the button of the windows th at poped up by javascript? Hi Jim, a) Include the definition of startClicker (available in winClicker.rb) def startClicker( button , waitTime = 0) 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 b) Before you click on delete call startClicker, say startClicker("OK") c) Call the button click for Delete Hope this helps you, all the best Regards, Jamuna Nithyanandam ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of jim che Sent: Tuesday, September 20, 2005 1:03 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Help, how to click the button of the windows that poped up by javascript? Hi all the ruby code was as below ie.link(:text,"Delete").click if $au3.WinExists("Microsoft Internet Explorer") log("win exist") sleep(1) $au3.Send("{TAB 1}{ENTER}") else log("win not exist") end After click the link "Delete" a small window will pop up by script I want to click the "ok" button of that small window but it can't The system will log the "win exist" but can't send the operation "enter" to the small window. How can I do this? Thank you ________________________________ Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050920/2031da82/attachment.html From bret at pettichord.com Tue Sep 20 12:46:00 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 20 Sep 2005 11:46:00 -0500 Subject: [Wtr-general] Focus Issue In-Reply-To: Message-ID: <5.1.0.14.2.20050920114326.034d3668@127.0.0.1> At 11:40 AM 9/20/2005, Keith Kaminski wrote: >I can't get focus to do anything. In fact, whenever I try to use it I >get an error. What error do you get? >It should be as easy as something like this right? > >$ie = IE.new >$ie.goto("http://www.google.com") >$ie.focus() Yes. This works for me. _____________________ Bret Pettichord www.pettichord.com From kkaminski at kcura.com Tue Sep 20 13:15:50 2005 From: kkaminski at kcura.com (Keith Kaminski) Date: Tue, 20 Sep 2005 12:15:50 -0500 Subject: [Wtr-general] Focus Issue Message-ID: I had been getting this error: WIN32OLERuntimeError: document OLE error code:80004005 in HRESULT error code:0x80020009 Exception occurred. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `document' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1652:in `focus' I decided to restart my machine and try again, and now I'm able to run my script without any errors. However, focus still isn't doing what I would expect. The focus remains on the command prompt even though it's called and executed. I did a little bit more experimenting and have discovered that this is only problem if I have an existing IE window open. If I close up all of my IE windows and then run my ruby scripts, everything is perfect. The focus automatically shifts from my command prompt to IE. If I open up my browser, head to google, and then run my ruby scripts from the command prompt... the focus remains on the command prompt. Anyone else have this issue? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Tuesday, September 20, 2005 11:46 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Focus Issue At 11:40 AM 9/20/2005, Keith Kaminski wrote: >I can't get focus to do anything. In fact, whenever I try to use it I >get an error. What error do you get? >It should be as easy as something like this right? > >$ie = IE.new >$ie.goto("http://www.google.com") >$ie.focus() Yes. This works for me. _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From joe.yakich at eplanservices.com Tue Sep 20 15:38:25 2005 From: joe.yakich at eplanservices.com (Joe Yakich) Date: Tue, 20 Sep 2005 13:38:25 -0600 Subject: [Wtr-general] Problem filling out a text entry item in a form/table Message-ID: <20050920193829.EDB50EBD0E@mail1.firstlink.com> From noreply at rubyforge.org Tue Sep 20 18:07:03 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Tue, 20 Sep 2005 15:07:03 -0700 Subject: [Wtr-general] [ wtr-Support Requests-2489 ] Ugly assertionFailedErrors thrown in watir Message-ID: <200509202207.j8KM73UM020191@rubyforge.org> Support Requests item #2489, was opened at 2005-09-20 15:07 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=488&aid=2489&group_id=104 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Dustin Woodhouse (dustinwoodhouse) Assigned to: Nobody (None) Summary: Ugly assertionFailedErrors thrown in watir Initial Comment: I'm using watir to script my site testing. When an assert fails in one of my watir scripts, instead of it displaying the fail text I include in the assert, I get the following ugly ODBC error message. ODBC::Error: INTERN (1) [RubyODBC]# and then a stack trace. I need to get the fail message I include in the assert b/c it provides critical debug information to me. Any ideas why this is happening? Thanks! Dustin- dmw_30 at yahoo.com ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=488&aid=2489&group_id=104 From joe.yakich at eplanservices.com Tue Sep 20 18:23:11 2005 From: joe.yakich at eplanservices.com (Joe Yakich) Date: Tue, 20 Sep 2005 16:23:11 -0600 Subject: [Wtr-general] Problem filling out a text entry item in a form/table [resend] Message-ID: <20050920222400.B0822EBE49@mail1.firstlink.com> From joe.yakich at eplanservices.com Tue Sep 20 18:24:23 2005 From: joe.yakich at eplanservices.com (Joe Yakich) Date: Tue, 20 Sep 2005 16:24:23 -0600 Subject: [Wtr-general] Problem filling out a text entry item in a form/table [resend] Message-ID: <20050920222511.1FCFEEBE6A@mail4.firstlink.com> I have a pretty simple file upload page that I'm trying to test using Watir, but I'm having difficulty figuring out how to actually enter the filename in the field. I'm probably overlooking something absurdly simple. Using irb, I was able to get the element (or at least elements in the neighborhood) to flash with either of: ie.table(:index, 3)[5][2].flash ie.form(:id, 'uploadForm').flash I was expecting ie.table(:index, 3)[5][2].text_field(:name, 'file').set('some_filename') to work, but it doesn't. I've tried a variety of other things, but haven't hit on the right thing. What am I doing wrong? Thanks in advance! Joe ie.show_all_objects includes the following: hidden name=formName id= value=uploadForm al t= src= file name=file id=file value= al t= src= Here's the HTML: Some title
Login: bob
Bob
Step 2

 Step 1. Step 2 Step 3 Step 4

Enter (or 'Browse') the name of your file and click 'Next Step' to continue.


Contribution File:

   

 
From joe.yakich at eplanservices.com Tue Sep 20 18:31:19 2005 From: joe.yakich at eplanservices.com (Joe Yakich) Date: Tue, 20 Sep 2005 16:31:19 -0600 Subject: [Wtr-general] Sorry for the blank emails Message-ID: <20050920223208.392F0EBE70@mail4.firstlink.com> Since I now have sent 2 blank emails to the list, I thought I'd better apologize. My goofy email client--you can probably guess which one I use--automatically formats email as HTML. Well, my email question formatted as HTML exceeds the 40k size limit for the mailing list. When that happens, the list sends me an email informing me, and provides a link to cancel the email, which I did. I figure, ok, I'll just resend the first message as Plain Text. Although I can see the existing text on my screen, the actual email it sends is blank. To my complete mortification, I then did it again. :-( Sorry. From jim_che_tih at yahoo.com Tue Sep 20 23:32:30 2005 From: jim_che_tih at yahoo.com (jim che) Date: Tue, 20 Sep 2005 20:32:30 -0700 (PDT) Subject: [Wtr-general] Help, how to click the button of the windows th at poped up by javascript? Message-ID: <20050921033230.23955.qmail@web33315.mail.mud.yahoo.com> Hi Jamuna Thank you for your help The problem still exist. I found that all the codes were paused to execute when the small window poped up. For example ie.link(:text,"Delete").click puts "111111111" After click the link "Delete",I found the small window poped up and the system didn't print the info "11111111" after I click the button "ok" on the samll window then I saw the system print out the "11111111". So It means that if the samll window poped up and not closed manually the ruby code below will not be executed. Does anyone meet this problem? Any advice is appreciated jim _________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jamuna, Nithyanandam (IE10) Sent: Tuesday, September 20, 2005 3:49 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Help,how to click the button of the windows th at poped up by javascript? Hi Jim, a) Include the definition of startClicker (available in winClicker.rb) def startClicker( button , waitTime = 0) 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 b) Before you click on delete call startClicker, say startClicker("OK") c) Call the button click for Delete Hope this helps you, all the best Regards, Jamuna Nithyanandam ________________________________ __________________________________________________ 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/20050920/bb95e4cb/attachment.html From bret at pettichord.com Wed Sep 21 00:02:28 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 20 Sep 2005 23:02:28 -0500 Subject: [Wtr-general] Focus Issue In-Reply-To: Message-ID: <5.1.0.14.2.20050920225712.0359f4f8@127.0.0.1> At 12:15 PM 9/20/2005, Keith Kaminski wrote: >I had been getting this error: > >WIN32OLERuntimeError: document > OLE error code:80004005 in > > HRESULT error code:0x80020009 > Exception occurred. > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `method_missing' > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `document' > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1652:in `focus' This error will occur when the IE browser is empty. For example, this will reproduce it: ie.goto('about:blank') ie.focus >I decided to restart my machine and try again, and now I'm able to run >my script without any errors. However, focus still isn't doing what I >would expect. The focus remains on the command prompt even though it's >called and executed. > >I did a little bit more experimenting and have discovered that this is >only problem if I have an existing IE window open. If I close up all of >my IE windows and then run my ruby scripts, everything is perfect. The >focus automatically shifts from my command prompt to IE. If I open up my >browser, head to google, and then run my ruby scripts from the command >prompt... the focus remains on the command prompt. > >Anyone else have this issue? I've heard reports like this and have seen some of this myself. I do see somewhat different behavior if i run a script with an IE window already open, instead of not. I also wonder if some of this variation is based on OS (2000 vs XP, e.g.). I wrote the following code to make sure extra IE windows were closed before running Watir scripts: count = 0 while true begin browser = Watir::IE.attach(:title, //) browser.close count += 1 rescue Watir::Exception::NoMatchingWindowFoundException break end end puts "#{count} windows closed" _____________________ Bret Pettichord www.pettichord.com From Jamuna.Nithyanandam at honeywell.com Wed Sep 21 00:16:32 2005 From: Jamuna.Nithyanandam at honeywell.com (Jamuna, Nithyanandam (IE10)) Date: Tue, 20 Sep 2005 21:16:32 -0700 Subject: [Wtr-general] Help, how to click the button of the windows th at poped up by javascript? Message-ID: <77ED2BF75D59D1439F90412CC5B1097424F8368E@ie10-sahara.hiso.honeywell.com> Hi Jim, I faced the same problem, logically we would put the startClicker after pop up has been issued, but for the startClicker to function it is to be called before the pop up is fired Internally startClicker calls clickJSDialog.rb, startClicker is present in popups_test.rb (not in winclicker) So try calling the startClicker before you click on Delete like: require "watir" include Watir 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 $ie = Watir::IE.new $ie.goto(".........") startClicker("OK") $ie.link(:text,"Delete").click puts "111111111" Also wait for some time to find out if the pop up is getting closed or not, I hope this helps you to solve the issue. Guys, correct me in case I am wrong Jamuna _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of jim che Sent: Wednesday, September 21, 2005 9:03 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Help, how to click the button of the windows th at poped up by javascript? Hi Jamuna Thank you for your help The problem still exist. I found that all the codes were paused to execute when the small window poped up. For example ie.link(:text,"Delete").click puts "111111111" After click the link "Delete",I found the small window poped up and the system didn't print the info "11111111" after I click the button "ok" on the samll window then I saw the system print out the "11111111". So It means that if the samll window poped up and not closed manually the ruby code below will not be executed. Does anyone meet this problem? Any advice is appreciated jim _________________________ From: wtr-general-bounces at rubyforge.org [mailto: wtr-general-bounces at rubyforge.org] On Behalf Of Jamuna, Nithyanandam (IE10) Sent: Tuesday, September 20, 2005 3:49 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Help,how to click the button of the windows th at poped up by javascript? Hi Jim, a) Include the definition! of startClicker (available in winClicker.rb) def startClicker( button , waitTime = 0) 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 b) Before you click on delete call startClicker, say startClicker("OK") c) Call the button click for Delete Hope this helps you, all the best Regards, Jamuna Nithyanandam ________________________________ __________________________________________________ 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/20050920/c7ba4a04/attachment.html From raghu at qantom.com Wed Sep 21 00:33:08 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Wed, 21 Sep 2005 10:03:08 +0530 Subject: [Wtr-general] Help, how to click the button of the windows th at poped up by javascript? In-Reply-To: <77ED2BF75D59D1439F90412CC5B1097424F8368E@ie10-sahara.hiso.honeywell.com> References: <77ED2BF75D59D1439F90412CC5B1097424F8368E@ie10-sahara.hiso.honeywell.com> Message-ID: <4330E284.8010102@qantom.com> Or you could try the WET addon. Using WET, your synatx would look something like: ie.Link("text:=Delete").click_without_blocking ie.Dialog("title:=Microsoft Internet Explorer").Button("text:=OK").click Raghu Jamuna, Nithyanandam (IE10) wrote: > Hi Jim, > > I faced the same problem, logically we would put the startClicker > after pop up has been issued, but for the startClicker to function it > is to be called before the pop up is fired > > Internally startClicker calls clickJSDialog.rb, startClicker is > present in popups_test.rb (not in winclicker) > > So try calling the startClicker before you click on Delete like: > > require "watir" > include Watir > 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 > $ie = Watir::IE.new > $ie.goto(".........") > startClicker("OK") > $ie.link(:text,"Delete").click > puts "111111111" > > Also wait for some time to find out if the pop up is getting closed or > not, > > I hope this helps you to solve the issue. > > Guys, correct me in case I am wrong > > Jamuna > > ------------------------------------------------------------------------ > *From:* wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] *On Behalf Of *jim che > *Sent:* Wednesday, September 21, 2005 9:03 AM > *To:* wtr-general at rubyforge.org > *Subject:* Re: [Wtr-general] Help, how to click the button of the > windows th at poped up by javascript? > > Hi Jamuna > Thank you for your help > The problem still exist. > I found that all the codes were paused to execute when the small > window poped up. > For example > > ie.link(:text,"Delete").click > puts "111111111" > After click the link "Delete",I found the small window poped up and > the system didn't print the info "11111111" after I click the button > "ok" on the samll window then I saw the system print out the "11111111". > So It means that if the samll window poped up and not closed > manually the ruby code below will not be executed. > Does anyone meet this problem? > Any advice is appreciated > > jim > > > _________________________ > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org > ] > On Behalf Of Jamuna, > Nithyanandam (IE10) > Sent: Tuesday, September 20, 2005 3:49 AM > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] Help,how to click the button of the windows > th at poped up by javascript? > > > > Hi Jim, > > > > a) Include the definition! of startClicker (available in winClicker.rb) > > def startClicker( button , waitTime = 0) > 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 > > b) Before you click on delete call startClicker, say startClicker("OK") > > c) Call the button click for Delete > > > > Hope this helps you, all the best > > > > Regards, > > Jamuna Nithyanandam > > ________________________________ > > __________________________________________________ > 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 > > -- Qantom Software http://www.qantom.com Ph : 91-80-26799269 Xtn. 125 sip : raghu at sip411.com -- From angrez at gmail.com Wed Sep 21 01:05:02 2005 From: angrez at gmail.com (Angrez Singh) Date: Wed, 21 Sep 2005 10:35:02 +0530 Subject: [Wtr-general] Problem filling out a text entry item in a form/table [resend] In-Reply-To: <20050920222511.1FCFEEBE6A@mail4.firstlink.com> References: <20050920222511.1FCFEEBE6A@mail4.firstlink.com> Message-ID: Hi Joe, value="[enter or browse a filename]" type="file" size="80" > name="file"> > The element in which you want to fill the text is not of text_field type. Its type is file. So what you need to do is: ie.table(:index, 3)[5][2].file_field(:name,'file').set('some_filename') Regards, Angrez On 9/21/05, Joe Yakich wrote: > > I have a pretty simple file upload page that I'm trying to test using > Watir, > but I'm having difficulty figuring out how to actually enter the filename > in > the field. I'm probably overlooking something absurdly simple. > > > > Using irb, I was able to get the element (or at least elements in the > neighborhood) to flash with either of: > > > > ie.table(:index, 3)[5][2].flash > > ie.form(:id, 'uploadForm').flash > > > > I was expecting ie.table(:index, 3)[5][2].text_field(:name, > 'file').set('some_filename') to work, but it doesn't. I've tried a variety > of other things, but haven't hit on the right thing. What am I doing > wrong? > > > > Thanks in advance! > > > > Joe > > > > > > > > > > ie.show_all_objects includes the following: > > > > hidden name=formName id= value=uploadForm > al > > t= src= > > file name=file id=file value= > al > > t= src= > > > > > > Here's the HTML: > > > > > > > > > > Some title > > > > > > > > > > > > > > > > > > href="/include/connect/style.css"> > > > > > > > > > > width="100%">
> >
> > > > > >
class="primary">Login: bob
> >
class="title" id="stdTitle">Bob
> >
class="subtitle" id="stdSubtitle">Step 2
> >
> > > >
> >
method="post"> > > > > > > > > > > > > > > > > > >
class="form"> cellpadding="0"> > > > >
class="stepCompleted"> src="/include/image/c16.gif" name="image1" readonly> Step > 1. class="stepCurrent"> Step 2 valign="middle" width="25%" class="stepDisabled"> Step > 3 align="center" valign="middle" width="25%" > class="stepDisabled"> Step 4
> >
class="form">

id="paragraph21" tabindex="1">Enter (or 'Browse') the name of your > file and click 'Next Step' to continue.

class="form">
class="thin">
class="form">Contribution File: width="70%" class="form"> value="[enter or browse a filename]" type="file" size="80" > name="file">
> > > >
> >
> > class="wideButton" onclick="javascript: location.href = > '/contribution/home.vm';" name="cancel">  tabindex="1" value="Save & Finish Later" type="submit" class="wideButton" > name="submit">  type="submit" class="wideButton" name="prevStep">  id="nextStep" > tabindex="1" value="Next Step" type="submit" class="wideButton" > name="nextStep"> > >
> >
> >
> > > > > >
class="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/20050921/6a82ec92/attachment.html From guru_ks2004 at yahoo.co.in Wed Sep 21 04:36:52 2005 From: guru_ks2004 at yahoo.co.in (Guru) Date: Wed, 21 Sep 2005 09:36:52 +0100 (BST) Subject: [Wtr-general] Help regarding assert commands in watir. Message-ID: <20050921083653.49253.qmail@web8205.mail.in.yahoo.com> Dear ppl, Can anyone send me some information abt how various Assert commands are used in watir?. Thank You Bye. __________________________________________________________ Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com From guru_ks2004 at yahoo.co.in Wed Sep 21 04:37:04 2005 From: guru_ks2004 at yahoo.co.in (Guru) Date: Wed, 21 Sep 2005 09:37:04 +0100 (BST) Subject: [Wtr-general] Help regarding assert commands in watir. Message-ID: <20050921083705.81515.qmail@web8202.mail.in.yahoo.com> Dear ppl, Can anyone send me some information abt how various Assert commands are used in watir?. Thank You Regards Guru. __________________________________________________________ Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com From nishita.acharya at tatainfotech.com Wed Sep 21 04:49:56 2005 From: nishita.acharya at tatainfotech.com (Nishita Acharya) Date: Wed, 21 Sep 2005 14:19:56 +0530 Subject: [Wtr-general] Wtr-general Digest, Vol 22, Issue 26 References: Message-ID: <011801c5be89$70e43c50$950d7aa3@PC131> hi, I am preparing a ppt on watie ,so i wanted to list out the features of watir....i want to include 'autoit' also in it. Can u plz tell me the capabilities of autoit so that it'll be easier for me list it out. Regards, Nishita Acharya From zeljko.filipin at gmail.com Wed Sep 21 04:48:17 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 21 Sep 2005 10:48:17 +0200 Subject: [Wtr-general] Help regarding assert commands in watir. In-Reply-To: <20050921083653.49253.qmail@web8205.mail.in.yahoo.com> Message-ID: <43311e2e.14f7426e.3e16.0c3f@mx.gmail.com> See WATIR User Guide http://wtr.rubyforge.org/watir_user_guide.html (Use Assertions headline) Also see files in unitTests folder (in watir folder) on your machine. Hope it helps. Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Guru Sent: Wednesday, September 21, 2005 10:37 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Help regarding assert commands in watir. Dear ppl, Can anyone send me some information abt how various Assert commands are used in watir?. Thank You Bye. __________________________________________________________ Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From zeljko.filipin at gmail.com Wed Sep 21 04:50:23 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 21 Sep 2005 10:50:23 +0200 Subject: [Wtr-general] Wtr-general Digest, Vol 22, Issue 26 In-Reply-To: <011801c5be89$70e43c50$950d7aa3@PC131> Message-ID: <43311eac.38ed6952.4069.ffff8cb8@mx.gmail.com> See AutoIt Reference on your machine (at my machine it is here C:\ruby\lib\ruby\site_ruby\1.8\watir\AutoItX.chm) Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Nishita Acharya Sent: Wednesday, September 21, 2005 10:50 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Wtr-general Digest, Vol 22, Issue 26 hi, I am preparing a ppt on watie ,so i wanted to list out the features of watir....i want to include 'autoit' also in it. Can u plz tell me the capabilities of autoit so that it'll be easier for me list it out. Regards, Nishita Acharya _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From raghu at qantom.com Wed Sep 21 05:33:28 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Wed, 21 Sep 2005 15:03:28 +0530 Subject: [Wtr-general] Wtr-general Digest, Vol 22, Issue 26 In-Reply-To: <011801c5be89$70e43c50$950d7aa3@PC131> References: <011801c5be89$70e43c50$950d7aa3@PC131> Message-ID: <433128E8.3070405@qantom.com> I would actually hold off on writing up much about autoit. Autoit is likely to be deprecated in the next release of Watir. Raghu Nishita Acharya wrote: >hi, >I am preparing a ppt on watie ,so i wanted to list out the features of >watir....i want to include 'autoit' also in it. Can u plz tell me the >capabilities of autoit so that it'll be easier for me list it out. > > >Regards, >Nishita Acharya > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > -- Qantom Software http://www.qantom.com Ph : 91-80-26799269 Xtn. 125 sip : raghu at sip411.com -- From nerimarco at hotmail.com Wed Sep 21 07:03:34 2005 From: nerimarco at hotmail.com (Marco Neri) Date: Wed, 21 Sep 2005 21:03:34 +1000 Subject: [Wtr-general] how to rescue failed assertion and still generate the correct test stats? Message-ID: Hi 1st time newbie post. below is part of a script I'd put together based on the user guide examples. begin assert($ie.contains_text(AttendanceHomeProperties::Reports) ) puts("Found test string " + AttendanceHomeProperties::Reports ) assert($ie.contains_text(AttendanceHomeProperties::UnknownPerson) ) puts("Found test string " + AttendanceHomeProperties::UnknownPerson ) result = 'TEST PASSED.' #rescue => e #rescue Test::Unit::Error => e rescue Test::Unit::AssertionFailure=> e $ie.screen_capture(prefix_test_name(@@test_name, 'assertion failure.jpg') , true, false) puts("TEST FAILED." + e.message + "\n" + e.backtrace.join("\n")) ensure puts(result) $ie.close() puts " " puts "## finish test: "+ @@test_name end I have 3 scenarios. 1. if i use rescue => e then when for eg 2nd assertion fails execution steps into the rescue block and the screen capture and TEST FAILED and back trace are output to console. but this results in 1 tests, 2 assertions, 0 failures, 0 errors. obviously not what I want 0 failure and 0 error isn't correct. 2. if i use rescue Test::Unit::Error => e then when 2nd assertion fails execution seems to bypass the rescue block ( no screen capture ) but it does report 1 tests, 2 assertions, 0 failures 1 error ( or the other way round 1 failure 0 error can't remember off the top of my head ) 3. if i use rescue Test::Unit::AssertionFailure=> e its the same behaiviour as for 2. but it reports the opposite 1failure, 0 error. which method should I use to capture a failed assertion ( rescue => e captures everything but breaks the test unit count of the failures and errors? ) and still have it execute the code in the rescue block? I'm hoping someone has come up against this before and thought up a better solution as I only started trapping Test::Unit::AssertionFailure based on a comments I'd read in the ruby rdoc re Test::Unit::Assertions. thanks Marco -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050921/3c67cd03/attachment.html From noreply at rubyforge.org Wed Sep 21 11:52:58 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 21 Sep 2005 11:52:58 -0400 Subject: [Wtr-general] [ wtr-Support Requests-2493 ] Problem with a nested table Message-ID: <200509211552.j8LFqwvT017611@rubyforge.org> Support Requests item #2493, was opened at 2005-09-21 11:52 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=488&aid=2493&group_id=104 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: Problem with a nested table Initial Comment: Hi, I am trying to access to a table inside one form and two frames (ie.frame(x).frame(y).form(z)) and I am finding a lot of problems. I get this error message: "c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `document': undefined method `document' for nil:NilClass (NoMethodError) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:899:in `getLink' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2843:in `initialize' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:570:in `new' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:570:in `link' from C:/Archivos de programa/Watir/examples/pp02.rb:38" Anyone can help me? Thanks, Alberto Sotillo ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=488&aid=2493&group_id=104 From christopher.mcmahon at gmail.com Wed Sep 21 18:44:34 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 21 Sep 2005 17:44:34 -0500 Subject: [Wtr-general] Help regarding assert commands in watir. In-Reply-To: <20050921083705.81515.qmail@web8202.mail.in.yahoo.com> References: <20050921083705.81515.qmail@web8202.mail.in.yahoo.com> Message-ID: <72799cd7050921154431c06a3a@mail.gmail.com> > Can anyone send me some information abt how various > Assert commands are used in watir?. Also see "Programming Ruby" (the Pickaxe book) 2ed. pp 151-162. -Chris From jim_che_tih at yahoo.com Wed Sep 21 23:20:36 2005 From: jim_che_tih at yahoo.com (jim che) Date: Wed, 21 Sep 2005 20:20:36 -0700 (PDT) Subject: [Wtr-general] Database connection error after patching the Mysql4.1.XX patch Message-ID: <20050922032036.3646.qmail@web33311.mail.mud.yahoo.com> The error shows as below F:\rbtest>ruby 2.rb Server version: 4.1.11-nt c:/program files/ruby/lib/ruby/site_ruby/1.8/DBD/Mysql/Mysql.rb:403:in `execute' : #3D000No database selected (DBI::DatabaseError) from c:/program files/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:768:in `exe cute' from 2.rb:18 F:\rbtest> The code 2.rb is as below require "dbi" begin # connect to the MySQL server # dbh = DBI.connect("dbi:Mysql:test:localhost", "root", "000000") dbh = DBI.connect("dbi:Mysql:jim_opsuite:192.168.0.5", "jim", "123456") # get server version string and display it row = dbh.select_one("SELECT VERSION()") puts "Server version: " + row[0] rescue DBI::DatabaseError => e puts "An error occurred" puts "Error code: #{e.err}" puts "Error message: #{e.errstr}" ensure # disconnect from server sth=dbh.prepare('select * from user') sth.execute while row=sth.fetch do puts row end dbh.disconnect if dbh end This code can run correctly with the Mysql 4.0.XX I am using the patch http://www.tmtm.org/ruby/mysql/ruby_mysql4.patch to update the ruby_mysql to support the Mysql 4.1.XX after patching that patch I run the 2.rb for testing but the error above was printed. So does anybody meet this problem before? Any advice is appriciated Thank you jim --------------------------------- Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050921/ecf59568/attachment.html From saudaziz at gmail.com Thu Sep 22 01:06:40 2005 From: saudaziz at gmail.com (saud aziz) Date: Wed, 21 Sep 2005 22:06:40 -0700 Subject: [Wtr-general] Road Map for 1.5 In-Reply-To: <5.1.0.14.2.20050914012810.0341dd60@127.0.0.1> References: <5.1.0.14.2.20050914012810.0341dd60@127.0.0.1> Message-ID: <24d0cb3805092122061564d31b@mail.gmail.com> Is it possible to inquire when would this release happen? Any due dates? I am most interested in Modal Dialogs support ... On 9/13/05, Bret Pettichord wrote: > > Watir 1.5 will be a major update. It will include: > - Support Modal Dialogs > - Improve Consistency > - Lazy Evaluation > - Installer Updates > - Stableize IE Class > - Updated Website & Examples > - Infrastructure Updates > > Here's the details: > http://wtr.rubyforge.org/wiki/wiki.pl?RoadMap > > Comments? Questions? > > I've also gone through the trackers are marked the items that are planned > to be fixed in 1.5: > > 1713 IE.file_field broken with Non English OS; also problem with > winClicker. > 1916 Error message for ie.link(:unknown_way, 'value') is incorrect > 1945 Image.save method flaw > 2262 show_all_objects only shows some objects -- it should be > renamed > 2292 Watir 1.4.1 installer - error opening file for writing > 2351 http://wtr.rubyforge.org/example_testcase.html errors > > 2320 Homepage too wide > 2310 watir home page should have search box > 2274 Standard Tag Attributes ... should all be search criteria... > 2299 Add ability to access a Label by its text > 2282 Attach should wait for window to appear > 1766 add ability to save images > 1371 methods for visible/hidden > > 1432 Rename methods and variables from camelCase to > under_score > 1792 get_link needs refactoring > 1860 add new frames methods: > 1863 add a maximum page load time > 1912 add a page to the wiki, with details onhow to > contribute > 2278 Reorganize rdoc > 2280 Rdoc needs to be set up as an enry point to Watir Documentation > 2338 rdoc on website needs update > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "..man is a human being, not because of his physical powers for physically the camel is his superior; not because of his size for the elephant is larger; not because of his courage for the lion is more courageous; not because of his appetite for the ox has the greater; not because of coitus for the least of the birds is more virile than he, but rather by virtue of his noble aims and ideals. [As a matter of fact] he was only created to know." (Al- Ghazali; The book of Knowledge, Section 1) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050921/c3353e7a/attachment.html From bret at pettichord.com Thu Sep 22 01:56:03 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 22 Sep 2005 00:56:03 -0500 Subject: [Wtr-general] Road Map for 1.5 In-Reply-To: <24d0cb3805092122061564d31b@mail.gmail.com> References: <5.1.0.14.2.20050914012810.0341dd60@127.0.0.1> <5.1.0.14.2.20050914012810.0341dd60@127.0.0.1> Message-ID: <5.1.0.14.2.20050922005340.033fae10@127.0.0.1> At 12:06 AM 9/22/2005, saud aziz wrote: >Is it possible to inquire when would this release happen? Any due dates? I >am most interested in Modal Dialogs support ... I expect it to take me a month or so to get this in. Hard to say... a lot depends on how much other consulting work i have and whether it is Watir related or not. One of the purposes of the Road Map was to find out who might be helping out. Raghu and Kingsley have responded but i haven't really heard from any one else. Bret _____________________ Bret Pettichord www.pettichord.com From kingsley at icecode.org Thu Sep 22 18:29:39 2005 From: kingsley at icecode.org (kingsley) Date: Thu, 22 Sep 2005 23:29:39 +0100 Subject: [Wtr-general] Road Map for 1.5 In-Reply-To: <5.1.0.14.2.20050922005340.033fae10@127.0.0.1> References: <5.1.0.14.2.20050914012810.0341dd60@127.0.0.1> <5.1.0.14.2.20050914012810.0341dd60@127.0.0.1> <5.1.0.14.2.20050922005340.033fae10@127.0.0.1> Message-ID: <43333053.9090002@icecode.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I hope to be free again in the coming weeks so I will be able to get back on Track with helping out with Watir. My workload has been very heavy the last month. Cheers Kingsley Bret Pettichord wrote: > At 12:06 AM 9/22/2005, saud aziz wrote: > >> Is it possible to inquire when would this release happen? Any due >> dates? I am most interested in Modal Dialogs support ... > > > I expect it to take me a month or so to get this in. Hard to say... > a lot depends on how much other consulting work i have and whether > it is Watir related or not. > > One of the purposes of the Road Map was to find out who might be > helping out. Raghu and Kingsley have responded but i haven't really > heard from any one else. > > Bret > > > _____________________ Bret Pettichord www.pettichord.com > > _______________________________________________ Wtr-general mailing > list Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDMzBT5KfQPskW/NoRAgm7AKDRdWWhWzldaX2U4Bg2RApxkA+8DgCaAuJQ Fj+fyV2DW9rt8z5MtoaZr1o= =eM0O -----END PGP SIGNATURE----- From guru_ks2004 at yahoo.co.in Fri Sep 23 00:15:25 2005 From: guru_ks2004 at yahoo.co.in (Guru Raj) Date: Thu, 22 Sep 2005 21:15:25 -0700 Subject: [Wtr-general] New Birthday Calendar Message-ID: <200509230408.j8N48C05029045@rubyforge.org> Hi I'm setting up a birthday calendar and need your help. Just click the link below and enter your birthday details. (It's quick, easy and you can keep your age secret!) http://www.birthdayalarm.com/bd2/54057552a79822690b774449854c151160714d905 Thanks Guru From nishita.acharya at tatainfotech.com Fri Sep 23 02:36:10 2005 From: nishita.acharya at tatainfotech.com (Nishita Acharya) Date: Fri, 23 Sep 2005 12:06:10 +0530 Subject: [Wtr-general] Wtr-general Digest, Vol 22, Issue 27 References: Message-ID: <000b01c5c009$16442310$950d7aa3@PC131> hello people, Watir is quite popular now in our center. Since i am making a presentation on the functionality of watir to our senior mgmt i need a few pointers to improvise on my presenattion. I will be listing out the benifits and drawbacks benifits: >watir can handle multiple ie windows with attach methods >can i get an estimation of how many windows exactly??? >how can test cases be run invisiblly? >how can one capture screens.?? drawbacks: >will ur next version support modal dialogs? >The tool doesnt support active X plugins,java applets,macromedia flash etc...will any of the further versions support it or is it not possible at all? plz reply asap...am in urgent need of this info Regards, Nishita Acharya From raghu at qantom.com Fri Sep 23 02:45:38 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Fri, 23 Sep 2005 12:15:38 +0530 Subject: [Wtr-general] Wtr-general Digest, Vol 22, Issue 27 In-Reply-To: <000b01c5c009$16442310$950d7aa3@PC131> References: <000b01c5c009$16442310$950d7aa3@PC131> Message-ID: <4333A492.6040700@qantom.com> Nishita Acharya wrote: >hello people, >Watir is quite popular now in our center. Since i am making a presentation >on the functionality of watir to our senior mgmt i need a few pointers to >improvise on my presenattion. >I will be listing out the benifits and drawbacks > >benifits: > > >>watir can handle multiple ie windows with attach methods >>can i get an estimation of how many windows exactly??? >>how can test cases be run invisiblly? >>how can one capture screens.?? >> >> > >drawbacks: > > >>will ur next version support modal dialogs? >>The tool doesnt support active X plugins,java applets,macromedia flash >> >> Modal dialogs is will be supported in 1.5. >etc...will any of the further versions support it or is it not possible at >all? > > I dont think there is any plan immediately. But that's the advantage of open source - Nothing is impossible, especially in the opensource bazaar model. Therefore I dont see a reason as to why it wont be supported in a future model. >plz reply asap...am in urgent need of this info > >Regards, >Nishita Acharya > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > -- Qantom Software http://www.qantom.com Ph : 91-80-26799269 Xtn. 125 sip : raghu at sip411.com -- From Jan.Montano at thomson.com Fri Sep 23 03:51:17 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Fri, 23 Sep 2005 15:51:17 +0800 Subject: [Wtr-general] Wtr-general Digest, Vol 22, Issue 27 Message-ID: I'm not sure about the estimation on ie window numbers But I've been able to handle 50-60 browsers in most computers with p4 3.ghz and 1gb ram. you could use -b as parameter for silent mode -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Nishita Acharya Sent: Friday, September 23, 2005 2:36 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Wtr-general Digest, Vol 22, Issue 27 hello people, Watir is quite popular now in our center. Since i am making a presentation on the functionality of watir to our senior mgmt i need a few pointers to improvise on my presenattion. I will be listing out the benifits and drawbacks benifits: >watir can handle multiple ie windows with attach methods >can i get an estimation of how many windows exactly??? >how can test cases be run invisiblly? >how can one capture screens.?? drawbacks: >will ur next version support modal dialogs? >The tool doesnt support active X plugins,java applets,macromedia flash etc...will any of the further versions support it or is it not possible at all? plz reply asap...am in urgent need of this info Regards, Nishita Acharya _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From angrez at gmail.com Fri Sep 23 07:08:56 2005 From: angrez at gmail.com (Angrez Singh) Date: Fri, 23 Sep 2005 16:38:56 +0530 Subject: [Wtr-general] Unable to run newWindow_test.rb Message-ID: Hi, I am using Watir 1.4. When I run this test the scripts gets blocked and I have to manually close the Internet explorer. It seems like everything hangs when I run this test. I had to exclude this file from the Test Suite to make it run from end to end. images_test.rb and frame_test.rb also fails. But they are fixed in Watir 1.4.1. Is this test also fixed in that release? What am I doing wrong here? Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050923/49f97dea/attachment.html From rsankarsub at gmail.com Sat Sep 24 04:33:51 2005 From: rsankarsub at gmail.com (Sankar) Date: Sat, 24 Sep 2005 01:33:51 -0700 Subject: [Wtr-general] Regarding Install shield setup Message-ID: Hi there, I am new to ruby and watir. I am finding it very interesting. I am trying to automate the testing of entire webiste which we developed. In our system, we need to pick a file location using folder select dialog box and also we need to install an install shield setup, Is it possible to handle these 2 things in watir. Thanks in Advance, Sankar -- If you enjoy programming computers, you are in a very fortunate minority of people who can make a great living doing work they enjoy. - Joel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050924/147413fc/attachment.html From wkruse at sars.gov.za Sat Sep 24 04:40:45 2005 From: wkruse at sars.gov.za (Walter Kruse) Date: Sat, 24 Sep 2005 08:40:45 -0000 Subject: [Wtr-general] About the installation of DBI Message-ID: <373AA889F642934D8983245F7A514588D95BD7@gaptarcbnt00002.sars.prod> NB: This email and its contents are subject to our email legal notice which can be viewed at http://www.sars.gov.za/Email_Disclaimer.pdf ---- I think Ruby's DBI (at least for Win32) is not as mature as Perl's by a long shot. I really miss that, because I make *extensive* use of the Perl DBI. I found this on the web somewhere and played with it for a while. It connects to the Northwind Access database, if it is set up as an ODBC data source. May help. require 'dbi' begin #dbh = DBI.connect("DBI:ODBC:database", "username", "password") dbh = DBI.connect("DBI:ODBC:Northwind", "", "") #get server version string and display it row = dbh.select_one("SELECT 'Connected !'") puts "Connected ?: " + row[0] rescue DBI::DatabaseError => e puts "An error occurred" puts "Error code: #{e.err}" puts "Error message: #{e.errstr}" ensure #disconnect from server dbh.disconnect if dbh end -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] Sent: 06 September 2005 08:13 To: wtr-general at rubyforge.org Subject: [Wtr-general] About the installation of DBI Hi Dave I found that if I want to use the DBI I first should install the Ruby MySQL Module then install the Ruby DBI Module .But in fact I found these two tools should be installed under the Linux like system. Installation of Ruby MySQL Module : ruby extconf.rb % make % make install Installation of Ruby DBI Module ruby setup.rb config % ruby setup.rb setup % ruby setup.rb install As above shows the Installation of Ruby DBI Module can be executed in win32 but the Ruby MySQL Module cann't installed under windows system the system cann't recognize the 'make' command. So what should I do if I want to use the Ruby DBI under the windows system Thank you very much. jim _____ Click here to donate to the Hurricane Katrina relief effort. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050924/d5f6e1d0/attachment.html From bret at pettichord.com Fri Sep 23 12:41:00 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 23 Sep 2005 11:41:00 -0500 Subject: [Wtr-general] request for information In-Reply-To: <000b01c5c009$16442310$950d7aa3@PC131> References: Message-ID: <5.1.0.14.2.20050923113817.0367bfc0@127.0.0.1> At 01:36 AM 9/23/2005, Nishita Acharya wrote: >benifits: > >watir can handle multiple ie windows with attach methods > >can i get an estimation of how many windows exactly??? It depends on the resources of the machine it is running on. Watir does not have limits, but it drives IE and there are only so many instances of IE that can be run on a machine. You can manually create IE windows to see what your machine is capable of. > >how can test cases be run invisiblly? -b > >how can one capture screens.?? See screen_capture.rb and its unit tests. >drawbacks: > >will ur next version support modal dialogs? Yes, we have this working experimentally, but have not yet checked in this code. > >The tool doesnt support active X plugins,java applets,macromedia flash >etc...will any of the further versions support it or is it not possible at >all? These could be supported if someone volunteers the code. ____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Fri Sep 23 12:43:19 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 23 Sep 2005 11:43:19 -0500 Subject: [Wtr-general] Unable to run newWindow_test.rb In-Reply-To: Message-ID: <5.1.0.14.2.20050923114210.036c3008@127.0.0.1> At 06:08 AM 9/23/2005, Angrez Singh wrote: >What am I doing wrong here? Nothing. This code is broken and both the test and the code it tested have been removed from HEAD and will not be in 1.5.0. Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Fri Sep 23 12:44:40 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 23 Sep 2005 11:44:40 -0500 Subject: [Wtr-general] how to rescue failed assertion and still generate the correct test stats? In-Reply-To: Message-ID: <5.1.0.14.2.20050923114347.03691aa0@127.0.0.1> At 06:03 AM 9/21/2005, Marco Neri wrote: >I'm hoping someone has come up against this before and thought up a better >solution as I only started trapping Test::Unit::AssertionFailure based on >a comments I'd read in the ruby rdoc re Test::Unit::Assertions. The documentation you are reading is in error. It has been updated in HEAD and still needs to be posted to our website. I am sorry for the confusion. Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Sep 24 09:10:41 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 24 Sep 2005 08:10:41 -0500 Subject: [Wtr-general] Regarding Install shield setup In-Reply-To: Message-ID: <5.1.0.14.2.20050924080743.036c6378@127.0.0.1> At 03:33 AM 9/24/2005, Sankar wrote: >I am new to ruby and watir. I am finding it very interesting. I am trying >to automate the testing of entire webiste which we developed. >In our system, we need to pick a file location using folder select dialog >box and also we need to install an install shield setup, > >Is it possible to handle these 2 things in watir. InstallShield has a silent install that allows it to be run from a command line using a response file. This is usually the best way to automate installations. This approach works with batch files, or most any language, including Ruby. Bret _____________________ Bret Pettichord www.pettichord.com From rsankarsub at gmail.com Sat Sep 24 11:21:46 2005 From: rsankarsub at gmail.com (Sankar) Date: Sat, 24 Sep 2005 08:21:46 -0700 Subject: [Wtr-general] Regarding Install shield setup In-Reply-To: <5.1.0.14.2.20050924080743.036c6378@127.0.0.1> References: <5.1.0.14.2.20050924080743.036c6378@127.0.0.1> Message-ID: Thanks for yur reply. The application which i am trying to automate the flow needs some user input as well. I guess i should leave the part of the application for automation testing. Regards - Sankar On 9/24/05, Bret Pettichord wrote: > > At 03:33 AM 9/24/2005, Sankar wrote: > >I am new to ruby and watir. I am finding it very interesting. I am trying > >to automate the testing of entire webiste which we developed. > >In our system, we need to pick a file location using folder select dialog > >box and also we need to install an install shield setup, > > > >Is it possible to handle these 2 things in watir. > > InstallShield has a silent install that allows it to be run from a command > line using a response file. This is usually the best way to automate > installations. This approach works with batch files, or most any language, > including Ruby. > > Bret > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- If you enjoy programming computers, you are in a very fortunate minority of people who can make a great living doing work they enjoy. - Joel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050924/1b17274d/attachment.html From jim_che_tih at yahoo.com Sun Sep 25 01:27:34 2005 From: jim_che_tih at yahoo.com (jim che) Date: Sat, 24 Sep 2005 22:27:34 -0700 (PDT) Subject: [Wtr-general] Could anyone give me some advice Message-ID: <20050925052734.96754.qmail@web33308.mail.mud.yahoo.com> Hi all I want to do some research of ruby in order to finish my graduation paper of Master degree. But I don't know which part can be researched by me and can be finished in three or four monthes. Any advice is appreciated Thank you jim __________________________________________________ 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/20050924/1bcef365/attachment.html From christopher.mcmahon at gmail.com Mon Sep 26 10:39:31 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 26 Sep 2005 09:39:31 -0500 Subject: [Wtr-general] About the installation of DBI In-Reply-To: <373AA889F642934D8983245F7A514588D95BD7@gaptarcbnt00002.sars.prod> References: <373AA889F642934D8983245F7A514588D95BD7@gaptarcbnt00002.sars.prod> Message-ID: <72799cd7050926073917f2d80f@mail.gmail.com> OT, disregard if you don't care about ODBC or Perl... > ---- I think Ruby's DBI (at least for Win32) is not as mature as Perl's by a > long shot. I really miss that, because I make *extensive* use of the Perl > DBI. I've been doing heavy ODBC work with Ruby's DBI (on Win32) for the last few weeks, and it looks good from here-- that is, I haven't yet found anything I can't do with the Ruby DBI. In some ways, Ruby's DBI is easier to use (for me) than Perl's. Mostly because returns from SQL statements seem to always be either arrays or AoAs, which I find really intuitive to use, where in Perl's DBI, returns are generally hashes, and you have to be pretty familiar with the DBI docs to figure out how to address the data. I realize that Perl's DBI is a lot older and has a lot more bells and whistles, but (so far) I haven't needed those features, and Ruby DBI seems to be easier to use. And that's not even talking about ActiveRecord, which I have yet to fool with. That said, the instant I need a feature available with Perl's DBI not available with Ruby's DBI, I'm switching to Perl. =) -Chris From newton at pingsite.com Mon Sep 26 13:02:18 2005 From: newton at pingsite.com (Dave Newton) Date: Mon, 26 Sep 2005 13:02:18 -0400 Subject: [Wtr-general] [OT] Re: About the installation of DBI In-Reply-To: <72799cd7050926073917f2d80f@mail.gmail.com> References: <373AA889F642934D8983245F7A514588D95BD7@gaptarcbnt00002.sars.prod> <72799cd7050926073917f2d80f@mail.gmail.com> Message-ID: <4338299A.6040203@pingsite.com> Chris McMahon wrote: >In some ways, Ruby's DBI is easier to use (for me) than Perl's. >Mostly because returns from SQL statements seem to always be either >arrays or AoAs, which I find really intuitive to use, where in Perl's >DBI, returns are generally hashes, and you have to be pretty familiar >with the DBI docs to figure out how to address the data. > I've always retrieved the data using regular hash notation. Also, how the data is returned is determined by which retrieval method you use: you can choose to get data back as an array or as a hash, IIRC. Dave From Sean.Gallagher at ticketmaster.com Mon Sep 26 17:48:12 2005 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Mon, 26 Sep 2005 14:48:12 -0700 Subject: [Wtr-general] Watir and Ajax Message-ID: <71D28C8451BFD5119B2B00508BE26E6409E11B67@pasmail3.office.tmcs> Has anyone tried using Watir to test a website that uses Ajax? As a test, I am looking at the new Yahoo Instant Search. http://instant.search.yahoo.com/ Here is the form HTML:
I don't know how to handle the input that includes the onkeydown event using Watir. Does anyone have any suggestions and/or advice? Thanks. -sean From kononovichma at yahoo.com Mon Sep 26 18:32:47 2005 From: kononovichma at yahoo.com (Max Kononovich) Date: Tue, 27 Sep 2005 02:32:47 +0400 (MSD) Subject: [Wtr-general] How to click on image Message-ID: <20050926223247.85777.qmail@web35702.mail.mud.yahoo.com> Hello, I am a new in Watir. I have a html page with the number of images. Each of them belong to one of the tree elements. So I have the following in the View Source for each of two buttons. menus_edit_item  menus_add_item  And I need to click on the image with defined in the href menu_id and action type(add_item or edit ). If anybody know how I can do it? Thanks in advance, Max ________________________________________________________ ?? ??? ? Yahoo!? ????????? ??????????? ? ??????????. Yahoo! ?????! http://ru.mail.yahoo.com From jeff.darklight at gmail.com Mon Sep 26 19:33:13 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 26 Sep 2005 16:33:13 -0700 Subject: [Wtr-general] Watir and Ajax In-Reply-To: <71D28C8451BFD5119B2B00508BE26E6409E11B67@pasmail3.office.tmcs> References: <71D28C8451BFD5119B2B00508BE26E6409E11B67@pasmail3.office.tmcs> Message-ID: What specifically are you looking for? I was able to use WATiR to load the page ... enter a criteria... validate the result ... follow the link ... and on from there ... ie = IE.new ie.goto "instant.search.yahoo.com" ie.text_field( :name, "p" ).set "boston weather" ie.link( :text, /Extended/ ).click if ie.contains_text "Currently" ... hope that's enough. Realize that all you are doing with WATiR is directing IE and looking at the page it has loaded and the current content of that page... So, if the underlying system is changing the content ... it doesn't care. That's what is so nice about WATiR vs other tools like HTTPUnit that would have to emulate all of the functionality that IE takes care of for us... ... I hope that helps answer your question. j. On 9/26/05, Sean Gallagher wrote: > Has anyone tried using Watir to test a website that uses Ajax? > > As a test, I am looking at the new Yahoo Instant Search. > > http://instant.search.yahoo.com/ > > Here is the form HTML: > >
action="http://rds.yahoo.com/;_ylt=AsI0.1halgK5ggoEYqqRJtOSA8oF;_ylu=X3oDMTB > hNjRqazhxBHNlYwNzZWFyY2g-/SIG=11ia1q7e9/EXP=1127856681/*-http%3A//search.yah > oo.com/search"> name=fr value="sfp-inst">
> >
> onkeydown="instant_key(event);return true;"> > > >
>
> > I don't know how to handle the input that includes the onkeydown event using > Watir. > > Does anyone have any suggestions and/or advice? > > Thanks. > > -sean > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "http://ruby-lang.org -- do you ruby?" Jeff Wood From jeff.darklight at gmail.com Mon Sep 26 19:35:21 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 26 Sep 2005 16:35:21 -0700 Subject: [Wtr-general] How to click on image In-Reply-To: <20050926223247.85777.qmail@web35702.mail.mud.yahoo.com> References: <20050926223247.85777.qmail@web35702.mail.mud.yahoo.com> Message-ID: ... easy. ie = IE.newie.goto site_urlie.link( :url, /menu_id=1/ ).click j. On 9/26/05, Max Kononovich wrote:> Hello, I am a new in Watir. I have a html page with> the number of images. Each of them belong to one of> the tree elements. So I have the following in the View> Source for each of two buttons.>> > href="http://test.test.net/admin/menus/edit/?menu_id=1";> > height="19" align="top" title="menus_edit_item"> alt="menus_edit_item" />> href="http://conf.xxxxxxx.net/admin/menus/add_item/?menu_id=1";> > height="19" align="top" title="menus_add_item"> alt="menus_add_item" />> >> And I need to click on the image with defined in the> href menu_id and action type(add_item or edit ).> If anybody know how I can do it?>> Thanks in advance,>> Max>>>>>>> ________________________________________________________> ?? ??? ? Yahoo!?> ????????? ??????????? ? ??????????. Yahoo! ?????! http://ru.mail.yahoo.com> _______________________________________________> Wtr-general mailing list> Wtr-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/wtr-general> --"http://ruby-lang.org -- do you ruby?" Jeff Wood From jim_che_tih at yahoo.com Mon Sep 26 21:56:37 2005 From: jim_che_tih at yahoo.com (jim che) Date: Mon, 26 Sep 2005 18:56:37 -0700 (PDT) Subject: [Wtr-general] How to click this kind of button Message-ID: <20050927015637.43456.qmail@web33314.mail.mud.yahoo.com> Hi all I want to know how to click the "reset" button the code as below Thank you jim --------------------------------- Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050926/7170b04d/attachment.html From bret at pettichord.com Mon Sep 26 23:57:20 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 26 Sep 2005 22:57:20 -0500 Subject: [Wtr-general] How to click this kind of button In-Reply-To: <20050927015637.43456.qmail@web33314.mail.mud.yahoo.com> Message-ID: <5.1.0.14.2.20050926225639.035efbc0@127.0.0.1> ie.button(:value, 'Reset').click At 08:56 PM 9/26/2005, jim che wrote: >Hi all > I want to know how to click the "reset" button the code as below > > > > Thank you >jim > > >Yahoo! for Good >Click here to donate to the >Hurricane Katrina relief effort. >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From wkruse at sars.gov.za Tue Sep 27 01:32:12 2005 From: wkruse at sars.gov.za (Walter Kruse) Date: Tue, 27 Sep 2005 07:32:12 +0200 Subject: [Wtr-general] About the installation of DBI Message-ID: <373AA889F642934D8983245F7A514588D95C43@gaptarcbnt00002.sars.prod> NB: This email and its contents are subject to our email legal notice which can be viewed at http://www.sars.gov.za/Email_Disclaimer.pdf ---- Still OT Chris, what is AoAs ? At my current site, I use WATiR, but cannot do any DB work in Ruby, because the DB (DB2 on zOS) doesn't allow ODBC connections. You need to access certain sys/admin tables to get an ODBC connection, and we don't have even select rights on those. I cannot get the Ruby DB2 driver to work on my 'doze box. So, Perl + DBD::DB2. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] Sent: 26 September 2005 04:40 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] About the installation of DBI OT, disregard if you don't care about ODBC or Perl... > ---- I think Ruby's DBI (at least for Win32) is not as mature as > Perl's by a long shot. I really miss that, because I make *extensive* > use of the Perl DBI. I've been doing heavy ODBC work with Ruby's DBI (on Win32) for the last few weeks, and it looks good from here-- that is, I haven't yet found anything I can't do with the Ruby DBI. In some ways, Ruby's DBI is easier to use (for me) than Perl's. Mostly because returns from SQL statements seem to always be either arrays or AoAs, which I find really intuitive to use, where in Perl's DBI, returns are generally hashes, and you have to be pretty familiar with the DBI docs to figure out how to address the data. I realize that Perl's DBI is a lot older and has a lot more bells and whistles, but (so far) I haven't needed those features, and Ruby DBI seems to be easier to use. And that's not even talking about ActiveRecord, which I have yet to fool with. That said, the instant I need a feature available with Perl's DBI not available with Ruby's DBI, I'm switching to Perl. =) -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From dave at burt.id.au Tue Sep 27 02:26:05 2005 From: dave at burt.id.au (Dave Burt) Date: Tue, 27 Sep 2005 16:26:05 +1000 Subject: [Wtr-general] About the installation of DBI References: <373AA889F642934D8983245F7A514588D95C43@gaptarcbnt00002.sars.prod> Message-ID: <004501c5c32c$578b9530$6402a8c0@telperion> Hi Walter, > Chris, what is AoAs ? Not a special data type, just arrays of arrays. > At my current site, I use WATiR, but cannot do any DB work in Ruby, > because the DB (DB2 on zOS) doesn't allow ODBC connections. You need to > access certain sys/admin tables to get an ODBC connection, and we don't > have even select rights on those. I cannot get the Ruby DB2 driver to > work on my 'doze box. So, Perl + DBD::DB2. Ruby's DBI does have a DBD for DB2. You can get the "ruby-dbi-all" package with all the DBDs from here: http://sourceforge.net/project/showfiles.php?group_id=43737 The DB2 DBD depends on Ruby/DB2, which you'd have to compile; AFAIK Windows binaries aren't available for download: http://raa.ruby-lang.org/project/ruby-db2 Cheers, Dave From padraigoleary at gmail.com Tue Sep 27 05:27:28 2005 From: padraigoleary at gmail.com (Padraig O'Leary) Date: Tue, 27 Sep 2005 10:27:28 +0100 Subject: [Wtr-general] Tree Views and child nodes Message-ID: <3b4e13d105092702277393bb2d@mail.gmail.com> Hi all! I have a problem with a tree view with which I would really appreciate any help that you could provide: The name, src and id attributes of an image I want to click all contain the same data. The only thing identifying the images is the text beside them. So, I can expand the parent node of the tree, but I cant identify any of the child nodes. The HTML is as follows for the child nodes:
Team A
Team B
Team C
Is there any way I can identify the image by the text beside it? Can Watir navigate the DOM? If I can identify the parent DIV node, is there any way I can tell it to access the first child node of the parent node? Thanks for all your help in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050927/fff13a5f/attachment.html From christopher.mcmahon at gmail.com Tue Sep 27 10:03:29 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 27 Sep 2005 09:03:29 -0500 Subject: [Wtr-general] About the installation of DBI In-Reply-To: <373AA889F642934D8983245F7A514588D95C43@gaptarcbnt00002.sars.prod> References: <373AA889F642934D8983245F7A514588D95C43@gaptarcbnt00002.sars.prod> Message-ID: <72799cd705092707035a073471@mail.gmail.com> > Still OT > Chris, what is AoAs ? As Dave Burt noted, AoA is "array of arrays", like [[A,B,C,],[1,2,3],[X,Y,Z]] for instance. Ruby's array handling is nifty. > At my current site, I use WATiR, but cannot do any DB work in Ruby, > because the DB (DB2 on zOS) doesn't allow ODBC connections. I'm using DB2 on AS/400 (!!!) at the moment. IBM supplies a nice DB2 ODBC interface for Windows through their "iSeries Navigator" suite of tools, and Ruby's ODBC drivers plays very nicely with it. You need to > access certain sys/admin tables to get an ODBC connection, and we don't > have even select rights on those. I cannot get the Ruby DB2 driver to > work on my 'doze box. So, Perl + DBD::DB2. I can't help with your permissions. =) BTW, I guess it's not a big secret, but: I *like* Perl. I'm working in a culture that's excited about Ruby. And right now I have no need for Watir. So I could actually do my current work in either Ruby or Perl, and it's just more funner right now in Ruby. It's also nice to have Plan B: the moment I run into something Ruby can't do, I'll happily switch to Perl. Nice to have alternatives... Look through the archives and you'll see mention of my handling Javascript popups with a Perl Win32::GuiTest layer. I still think that's a valid approach, with all due respect to the Wet and AutoIT fans. -Chris From Sean.Gallagher at ticketmaster.com Tue Sep 27 11:21:01 2005 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Tue, 27 Sep 2005 08:21:01 -0700 Subject: [Wtr-general] Watir and Ajax Message-ID: <71D28C8451BFD5119B2B00508BE26E6409E11B68@pasmail3.office.tmcs> No, that does not answer my question. I am looking to test updates to the page from the Ajax engine. In the case of instant search, I need to be able to test that when I type "ruby" into the form field, the browser is updated and shows the link for "Ruby Home Page" without clicking the button and submitting the form. (try typing that manually in the browser and you will see what I mean) I do not think that Watir can "see" this type of change...(?) -sean -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood Sent: Monday, September 26, 2005 4:33 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Watir and Ajax What specifically are you looking for? I was able to use WATiR to load the page ... enter a criteria... validate the result ... follow the link ... and on from there ... ie = IE.new ie.goto "instant.search.yahoo.com" ie.text_field( :name, "p" ).set "boston weather" ie.link( :text, /Extended/ ).click if ie.contains_text "Currently" ... hope that's enough. Realize that all you are doing with WATiR is directing IE and looking at the page it has loaded and the current content of that page... So, if the underlying system is changing the content ... it doesn't care. That's what is so nice about WATiR vs other tools like HTTPUnit that would have to emulate all of the functionality that IE takes care of for us... ... I hope that helps answer your question. j. On 9/26/05, Sean Gallagher wrote: > Has anyone tried using Watir to test a website that uses Ajax? > > As a test, I am looking at the new Yahoo Instant Search. > > http://instant.search.yahoo.com/ > > Here is the form HTML: > >
action="http://rds.yahoo.com/;_ylt=AsI0.1halgK5ggoEYqqRJtOSA8oF;_ylu=X3oDMTB > hNjRqazhxBHNlYwNzZWFyY2g-/SIG=11ia1q7e9/EXP=1127856681/*-http%3A//search.yah > oo.com/search"> name=fr value="sfp-inst">
> >
> onkeydown="instant_key(event);return true;"> > > >
>
> > I don't know how to handle the input that includes the onkeydown event using > Watir. > > Does anyone have any suggestions and/or advice? > > Thanks. > > -sean > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "http://ruby-lang.org -- do you ruby?" Jeff Wood _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Tue Sep 27 11:28:01 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 27 Sep 2005 10:28:01 -0500 Subject: [Wtr-general] Tree Views and child nodes In-Reply-To: <3b4e13d105092702277393bb2d@mail.gmail.com> Message-ID: <5.1.0.14.2.20050927102601.03593bf8@127.0.0.1> ie.div(:text, 'TEAM A').image(:index, 1).click I'm not 100% sure this will work in 1.4.1, but it will work in HEAD. Bret At 04:27 AM 9/27/2005, Padraig O'Leary wrote: >Hi all! > >I have a problem with a tree view with which I would really appreciate any >help that you could provide: The name, src and id attributes of an image I >want to click all contain the same data. The only thing identifying the >images is the text beside them. > >So, I can expand the parent node of the tree, but I cant identify any of >the child nodes. >The HTML is as follows for the child nodes: > >
name="childNode">Team A
>
name="childNode">Team B
>
name="childNode">Team C
> >Is there any way I can identify the image by the text beside it? > >Can Watir navigate the DOM? If I can identify the parent DIV node, is >there any way I can tell it to access the first child node of the parent node? > >Thanks for all your help in advance >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From jeff.darklight at gmail.com Tue Sep 27 12:05:10 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Tue, 27 Sep 2005 09:05:10 -0700 Subject: [Wtr-general] Watir and Ajax In-Reply-To: <71D28C8451BFD5119B2B00508BE26E6409E11B68@pasmail3.office.tmcs> References: <71D28C8451BFD5119B2B00508BE26E6409E11B68@pasmail3.office.tmcs> Message-ID: Sean, I don't think you were really looking at the code ... notice that the "click" action only happens after simply testing the existance of text within the page... So, extending the example to a small test suite ... It can see things fine. Anything that IE can do, WATiR can. --SCRIPT-- require 'test/unit' require 'watir' class MyTest < Test::Unit::TestCase include Watir def setup @ie = IE.new @ie.goto( "instant.search.yahoo.com " ) end def teardown @ie.close sleep( 5 ) end def test_one assert( @ie.contains_text( "Ruby Home Page" ) == nil ) @ie.text_field( :name, "p" ).set "ruby" assert( @ie.link( :text, "Ruby Home Page" ) ) end def test_two assert( @ie.contains_text( "Forecast" ) == nil ) @ie.text_field( :name, "p" ).set "boston weather" assert( @ie.link( :text, /Forecast/ ) ) end end --SCRIPT-- ... I hope that helps... j. On 9/27/05, Sean Gallagher wrote: > > No, that does not answer my question. > > I am looking to test updates to the page from the Ajax engine. In the case > of instant search, I need to be able to test that when I type "ruby" into > the form field, the browser is updated and shows the link for "Ruby Home > Page" without clicking the button and submitting the form. (try typing > that > manually in the browser and you will see what I mean) > > I do not think that Watir can "see" this type of change...(?) > > -sean > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050927/3a7f34a0/attachment.html From jkohl at telusplanet.net Tue Sep 27 12:06:05 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Tue, 27 Sep 2005 09:06:05 -0700 Subject: [Wtr-general] Watir and Ajax In-Reply-To: <71D28C8451BFD5119B2B00508BE26E6409E11B68@pasmail3.office.tmcs> References: <71D28C8451BFD5119B2B00508BE26E6409E11B68@pasmail3.office.tmcs> Message-ID: <1127837165.43396deda9a2b@webmail.telusplanet.net> This is what I did in IRB: irb(main):001:0> require 'watir' => true irb(main):002:0> ie = Watir::IE.new => #, @shift_size=nil, @shift_age=nil>, @level=2, @datetime_format="%d-% b-%Y %H:%M:%S">, @typingspeed=0.08, @form=nil, @ie=#, @error _checkers=[#]> irb(main):003:0> ie.goto("http://instant.search.yahoo.com/") => 0.109 irb(main):004:0> ie.text_field(:index, 1).set("testing") => true #at this point, the search bubble appears irb(main):005:0> ie.contains_text(/Testing Foundations/) => # irb(main):006:0> ie.link(:text, /Testing Foundations/).click Does this do what you need? -Jonathan Quoting Sean Gallagher : > No, that does not answer my question. > > I am looking to test updates to the page from the Ajax engine. In the case > of instant search, I need to be able to test that when I type "ruby" into > the form field, the browser is updated and shows the link for "Ruby Home > Page" without clicking the button and submitting the form. (try typing that > manually in the browser and you will see what I mean) > > I do not think that Watir can "see" this type of change...(?) > > -sean > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood > Sent: Monday, September 26, 2005 4:33 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] Watir and Ajax > > What specifically are you looking for? > > I was able to use WATiR to load the page ... enter a criteria... > validate the result ... follow the link ... and on from there ... > > ie = IE.new > ie.goto "instant.search.yahoo.com" > ie.text_field( :name, "p" ).set "boston weather" > ie.link( :text, /Extended/ ).click if ie.contains_text "Currently" > > ... hope that's enough. > > Realize that all you are doing with WATiR is directing IE and looking > at the page it has loaded and the current content of that page... > > So, if the underlying system is changing the content ... it doesn't care. > > That's what is so nice about WATiR vs other tools like HTTPUnit that > would have to emulate all of the functionality that IE takes care of > for us... > > ... I hope that helps answer your question. > > j. > > > On 9/26/05, Sean Gallagher wrote: > > Has anyone tried using Watir to test a website that uses Ajax? > > > > As a test, I am looking at the new Yahoo Instant Search. > > > > http://instant.search.yahoo.com/ > > > > Here is the form HTML: > > > >
> > action="http://rds.yahoo.com/;_ylt=AsI0.1halgK5ggoEYqqRJtOSA8oF;_ylu=X3oDMTB > > > hNjRqazhxBHNlYwNzZWFyY2g-/SIG=11ia1q7e9/EXP=1127856681/*-http%3A//search.yah > > oo.com/search"> > name=fr value="sfp-inst">
> > > >
> > > onkeydown="instant_key(event);return true;"> > > > > > >
> >
> > > > I don't know how to handle the input that includes the onkeydown event > using > > Watir. > > > > Does anyone have any suggestions and/or advice? > > > > Thanks. > > > > -sean > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > -- > "http://ruby-lang.org -- do you ruby?" > > Jeff Wood > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From bret at pettichord.com Tue Sep 27 12:17:39 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 27 Sep 2005 11:17:39 -0500 Subject: [Wtr-general] Watir and Ajax In-Reply-To: <71D28C8451BFD5119B2B00508BE26E6409E11B68@pasmail3.office.t mcs> Message-ID: <5.1.0.14.2.20050927110115.0361aa50@127.0.0.1> At 10:21 AM 9/27/2005, Sean Gallagher wrote: >I am looking to test updates to the page from the Ajax engine. In the case >of instant search, I need to be able to test that when I type "ruby" into >the form field, the browser is updated and shows the link for "Ruby Home >Page" without clicking the button and submitting the form. (try typing that >manually in the browser and you will see what I mean) This works: require 'watir' ie = Watir::IE.start("http://instant.search.yahoo.com") ie.text_field(:name, 'p').set('ruby') while ! ie.link(:id, 'yschakis').exists? do sleep 0.1; end puts ie.link(:id, 'yschakis').text Watir assumes that certain commands will trigger a traditional http request/response process and accordingly will automatically wait for the browser to complete loading a new page. These assumptions don't work with Ajax. Thus Ajax scripts must explicitly include code for synchronization. (That's what the 'while' statement does.) Watir could be modified to have calls like ie.link(:id, 'yschakis') automatically include this kind of synchronization (also adding a timeout if the object didn't appear in a certain amount of time). This would make ajax scripting easier. And it's arguably a more reliable model in general that the current heuristics. With JavaScript, any event could end up triggering a page request. Bret _____________________ Bret Pettichord www.pettichord.com From Sean.Gallagher at ticketmaster.com Tue Sep 27 12:25:55 2005 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Tue, 27 Sep 2005 09:25:55 -0700 Subject: [Wtr-general] Watir and Ajax Message-ID: <71D28C8451BFD5119B2B00508BE26E6409E11B6A@pasmail3.office.tmcs> Doh! I was too focused on the 'click' in the first example. I will be more careful next time. :-) Thanks for your help! (and to others who responded) -sean ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood Sent: Tuesday, September 27, 2005 9:05 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Watir and Ajax Sean, I don't think you were really looking at the code ... notice that the "click" action only happens after simply testing the existance of text within the page... So, extending the example to a small test suite ... It can see things fine. Anything that IE can do, WATiR can. --SCRIPT-- require 'test/unit' require 'watir' class MyTest < Test::Unit::TestCase include Watir def setup @ie = IE.new @ie.goto( "instant.search.yahoo.com" ) end def teardown @ie.close sleep( 5 ) end def test_one assert( @ie.contains_text( "Ruby Home Page" ) == nil ) @ie.text_field( :name, "p" ).set "ruby" assert( @ie.link( :text, "Ruby Home Page" ) ) end def test_two assert( @ie.contains_text( "Forecast" ) == nil ) @ie.text_field( :name, "p" ).set "boston weather" assert( @ie.link( :text, /Forecast/ ) ) end end --SCRIPT-- ... I hope that helps... j. On 9/27/05, Sean Gallagher wrote: No, that does not answer my question. I am looking to test updates to the page from the Ajax engine. In the case of instant search, I need to be able to test that when I type "ruby" into the form field, the browser is updated and shows the link for "Ruby Home Page" without clicking the button and submitting the form. (try typing that manually in the browser and you will see what I mean) I do not think that Watir can "see" this type of change...(?) -sean From dave at burt.id.au Tue Sep 27 17:13:35 2005 From: dave at burt.id.au (Dave Burt) Date: Wed, 28 Sep 2005 07:13:35 +1000 Subject: [Wtr-general] About the installation of DBI References: <373AA889F642934D8983245F7A514588D95C43@gaptarcbnt00002.sars.prod> <72799cd705092707035a073471@mail.gmail.com> Message-ID: <007201c5c3a8$5565bca0$6402a8c0@telperion> Chris McMahon wrote: > BTW, I guess it's not a big secret, but: I *like* Perl. I'm working > in a culture that's excited about Ruby. And right now I have no need > for Watir. So I could actually do my current work in either Ruby or > Perl, and it's just more funner right now in Ruby. It's also nice to > have Plan B: the moment I run into something Ruby can't do, I'll > happily switch to Perl. Nice to have alternatives... > > Look through the archives and you'll see mention of my handling > Javascript popups with a Perl Win32::GuiTest layer. I still think > that's a valid approach, with all due respect to the Wet and AutoIT > fans. Interesting. I've hardly touched Perl since I started with Ruby. I used to like Perl; I wonder If I can still handle it (Ruby seems to click easier with more complex data structures than simple arrays and hashes.) I'm going to have to dig up your Win32::GuiTest posts and have a play, I think, Chris. Cheers, Dave From christopher.mcmahon at gmail.com Tue Sep 27 17:23:29 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 27 Sep 2005 16:23:29 -0500 Subject: [Wtr-general] About the installation of DBI In-Reply-To: <007201c5c3a8$5565bca0$6402a8c0@telperion> References: <373AA889F642934D8983245F7A514588D95C43@gaptarcbnt00002.sars.prod> <72799cd705092707035a073471@mail.gmail.com> <007201c5c3a8$5565bca0$6402a8c0@telperion> Message-ID: <72799cd705092714233acfe163@mail.gmail.com> Hi Dave... > > Look through the archives and you'll see mention of my handling > > Javascript popups with a Perl Win32::GuiTest layer. I still think > > that's a valid approach, with all due respect to the Wet and AutoIT > > fans. > > Interesting. I've hardly touched Perl since I started with Ruby. I used to like > Perl; I wonder If I can still handle it (Ruby seems to click easier with more > complex data structures than simple arrays and hashes.) I'm going to have to > dig up your Win32::GuiTest posts and have a play, I think, Chris. Here ya go! Just BTW, the following code is in an article in next month's Better Software magazine: use Win32::GuiTest qw(FindWindowLike GetWindowText SetForegroundWindow SendKeys); system (1, "C:\\ruby\\bin\\ruby.exe C:\\watir\\examples\\Demo.rb"); while (1) { #INFINITE LOOP sleep 5; #CHECK FOR NEW WINDOW EVERY 5 SEC my @windows = FindWindowLike(0, "^Microsoft Internet Explorer" ); for (@windows) { SetForegroundWindow($_); #BRING THE RIGHT WINDOW IN FOCUS SendKeys("{ENTER}"); } } From dave at burt.id.au Tue Sep 27 19:02:56 2005 From: dave at burt.id.au (Dave Burt) Date: Wed, 28 Sep 2005 09:02:56 +1000 Subject: [Wtr-general] Perl, Win32::GuiTest (was: About the installation of DBI) Message-ID: <3ad74bc80509271602394cfce8@mail.gmail.com> > > ... I'm going to have to > > dig up your Win32::GuiTest posts and have a play, I think, Chris. > > Here ya go! Just BTW, the following code is in an article in next > month's Better Software magazine: > > use Win32::GuiTest qw(FindWindowLike GetWindowText > SetForegroundWindow SendKeys); > system (1, "C:\\ruby\\bin\\ruby.exe C:\\watir\\examples\\Demo.rb"); > while (1) { #INFINITE LOOP > sleep 5; #CHECK FOR NEW WINDOW EVERY 5 SEC > my @windows = FindWindowLike(0, "^Microsoft Internet Explorer" > ); > for (@windows) { > SetForegroundWindow($_); #BRING THE RIGHT WINDOW IN FOCUS > SendKeys("{ENTER}"); > } > } Thanks for the preview, Chris. I'm going to have to check out that library for sure. Cheers, Dave From jfry at lyris.com Tue Sep 27 19:23:06 2005 From: jfry at lyris.com (Jeff Fry) Date: Tue, 27 Sep 2005 16:23:06 -0700 Subject: [Wtr-general] Full-Time Ruby/Watir Contractor Needed Message-ID: <4339D45A.6000601@lyris.com> Hey, would you like the chance to code in Watir/Ruby 100% of the time, in a contract that has the potential to grow for the right person? At Lyris Technologies we create server-side spam blocking software and applications to manage and report on legitimate email campaigns. We are a small and very profitable public company, and our customers include major businesses, non-profits, universities and both major political parties. We have a full time contract position available for an experienced Watir/Ruby Automation Engineer. This isn't a test automation position - we use GUI automation in one of our core business applications - but we are looking for someone who understands how to design and build a solid, flexible, reusable test automation framework. Solid experience with Watir is essential, as is experience coding in Ruby (beyond Watir). Having contributed to Watir development is a big plus. Contractors close to the San Francisco Bay area are preferable, but we are open to anyone with the legal right to work in the U.S. We are looking to find someone who can come in to this high-profile contract position and show quick results. If the above sounds interesting to you, please email me at jfry at lyris.com. Jeff Fry From rsankarsub at gmail.com Tue Sep 27 20:40:35 2005 From: rsankarsub at gmail.com (Sankar) Date: Tue, 27 Sep 2005 17:40:35 -0700 Subject: [Wtr-general] Regarding Frames and SSL Message-ID: Hi There, I am trying to automate a web site which uses "Frames" using WATIR. For the login of user account, the web page is hosted on https:// For that particular page alone, $ie.frame("frame2").button(:name,"login").click doesnt work . Any idea why is that ?? is there a way of work around ? Thanks, - Sankar -- If you enjoy programming computers, you are in a very fortunate minority of people who can make a great living doing work they enjoy. - Joel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050927/2d3021dc/attachment.html From bret at pettichord.com Tue Sep 27 22:07:54 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 27 Sep 2005 21:07:54 -0500 Subject: [Wtr-general] Gems undermine unit testing Message-ID: <5.1.0.14.2.20050927205944.037770f0@127.0.0.1> I put the following line at the top of each of my unit tests for Watir: $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ This ensures that the version of Watir that is being tested is the one that is in the same hierarchy as the unit tests (by putting its directory in the front of the load-path). You can accomplish the same thing by setting the load path at the command line. ... Unless you are using a gem. I recently started packaging Watir as a gem and i now see that, somehow, the gem mechanism prepends the gem library directories to the very front, so the gem-installed version is tested instead of the one under development. Now i need to make sure that i do a "gem uninstall watir" before running unit tests or else they are going to be testing the wrong version -- the one that has already been tested and released. This is a type II error -- the tests say they've passed but in fact they haven't actually tested what they were supposed to and could easily miss errors. Since i have many contributors to the project, i would like a more reliable mechanism to help ensure that the people running unit tests are actually testing the version under development. Any suggestions? Bret _____________________ Bret Pettichord www.pettichord.com From jeff.darklight at gmail.com Wed Sep 28 00:23:16 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Tue, 27 Sep 2005 21:23:16 -0700 Subject: [Wtr-general] Regarding Frames and SSL In-Reply-To: References: Message-ID: Provide us with a bit more information ( like the actual error that you're getting ) and it'll help us provide you with an answer... j. On 9/27/05, Sankar wrote: > Hi There, > I am trying to automate a web site which uses "Frames" using WATIR. > For the login of user account, the web page is hosted on https:// > For that particular page alone, > $ie.frame("frame2").button(:name,"login").click doesnt work > . > > Any idea why is that ?? > is there a way of work around ? > > Thanks, > - Sankar > > -- > If you enjoy programming computers, you are in a very fortunate minority of > people who can make a great living doing work they enjoy. - Joel > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- "http://ruby-lang.org -- do you ruby?" Jeff Wood From rsankarsub at gmail.com Wed Sep 28 00:51:09 2005 From: rsankarsub at gmail.com (Sankar) Date: Tue, 27 Sep 2005 21:51:09 -0700 Subject: [Wtr-general] Regarding Frames and SSL In-Reply-To: References: Message-ID: I am testing an application whose main page is like this All my testing controls are in frame b. when the frame b contains http pages, WATIR is able to access it, When the frame b contains a login page which is https, WATIR is throwing an error. I understand it is due to the cross domain scripting. Is there a way to over home this error there are 3 frames frame index: 0 name: header frame index: 1 --Access Denied-- frame index: 2 name: download W, [27-Sep-2005 21:49:45#3704] 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 `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 `waitForIE' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2099:in `click' E:/home-ST.rb:97:in `test_print_assertion' c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `__send__' c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `run' c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:in `run_suite' c:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:65:in `start_mediato c:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in `start' c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in `run' c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:194:in `run' c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:14:in `run' c:/ruby/lib/ruby/1.8/test/unit.rb:285 c:/ruby/lib/ruby/1.8/test/unit.rb:283 W, [27-Sep-2005 21:49:45#3704] WARN -- : runtime error in wait These are the errors i get Thanks, Sankar On 9/27/05, Jeff Wood wrote: > > Provide us with a bit more information ( like the actual error that > you're getting ) and it'll help us provide you with an answer... > > j. > > On 9/27/05, Sankar wrote: > > Hi There, > > I am trying to automate a web site which uses "Frames" using WATIR. > > For the login of user account, the web page is hosted on https:// > > For that particular page alone, > > $ie.frame("frame2").button(:name,"login").click doesnt work > > . > > > > Any idea why is that ?? > > is there a way of work around ? > > > > Thanks, > > - Sankar > > > > -- > > If you enjoy programming computers, you are in a very fortunate minority > of > > people who can make a great living doing work they enjoy. - Joel > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > -- > "http://ruby-lang.org -- do you ruby?" > > Jeff Wood > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- If you enjoy programming computers, you are in a very fortunate minority of people who can make a great living doing work they enjoy. - Joel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050927/91929a7e/attachment.html From raghu at qantom.com Wed Sep 28 00:56:35 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Wed, 28 Sep 2005 10:26:35 +0530 Subject: [Wtr-general] Gems undermine unit testing In-Reply-To: <5.1.0.14.2.20050927205944.037770f0@127.0.0.1> References: <5.1.0.14.2.20050927205944.037770f0@127.0.0.1> Message-ID: <433A2283.5020909@qantom.com> I ran into a similar situation recently and the workaround that I use is to run a small batch file before running all unit tests. The batch file has just two lines in it: call gem build wet-web.gemspec call gem install wet-web*.gem pause This ensures that the installed machine on my test machine is the _development_ version and not the release version. Raghu Bret Pettichord wrote: >I put the following line at the top of each of my unit tests for Watir: > > $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ > >This ensures that the version of Watir that is being tested is the one that >is in the same hierarchy as the unit tests (by putting its directory in the >front of the load-path). You can accomplish the same thing by setting the >load path at the command line. > >... Unless you are using a gem. I recently started packaging Watir as a gem >and i now see that, somehow, the gem mechanism prepends the gem library >directories to the very front, so the gem-installed version is tested >instead of the one under development. > >Now i need to make sure that i do a "gem uninstall watir" before running >unit tests or else they are going to be testing the wrong version -- the >one that has already been tested and released. This is a type II error -- >the tests say they've passed but in fact they haven't actually tested what >they were supposed to and could easily miss errors. > >Since i have many contributors to the project, i would like a more reliable >mechanism to help ensure that the people running unit tests are actually >testing the version under development. > >Any suggestions? > >Bret > > >_____________________ > Bret Pettichord > www.pettichord.com > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > -- Qantom Software http://www.qantom.com Ph : 91-80-26799269 Xtn. 125 sip : raghu at sip411.com -- From ashetty at velozglobal.com Wed Sep 28 01:37:10 2005 From: ashetty at velozglobal.com (Amita Shetty) Date: Wed, 28 Sep 2005 00:37:10 -0500 Subject: [Wtr-general] Is there a way to select items in the select list based on their position? Message-ID: <48966054EF494649A988314F1C83077323B7F3@DC1Mail01> Hi, Is there a way to select items in the select list based on their position? one way is: ie.select_list(:name,"NAME").select_value(/2/) Since the items in the select list are added dynamically based on the selection in the previous Select list, its value is not known priorly.So I am not able to do that way.. I want to write a test case such that in the first iteration, first item in the list is selected, in the second iteration second item is selected and so on. Thanks in advance, Amitha.. From Jan.Montano at thomson.com Wed Sep 28 03:04:08 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Wed, 28 Sep 2005 15:04:08 +0800 Subject: [Wtr-general] clicking this image Message-ID: hi I've had a hard time clicking this image $ie.image(:src,/RBJ_LoginButtonOff/).click # results with unable to locate object error attached is the html source. -> <> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rbjadmin[2].txt Url: http://rubyforge.org/pipermail/wtr-general/attachments/20050928/8bcf149c/attachment.txt From zeljko.filipin at gmail.com Wed Sep 28 03:26:25 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 28 Sep 2005 09:26:25 +0200 Subject: [Wtr-general] clicking this image In-Reply-To: Message-ID: <433a4581.69141769.665f.043a@mx.gmail.com> It is because it is a button, not an image. Try $ie.button(:src,/RBJ_LoginButtonOff/).click 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: Wednesday, September 28, 2005 9:04 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] clicking this image hi I've had a hard time clicking this image $ie.image(:src,/RBJ_LoginButtonOff/).click # results with unable to locate object error attached is the html source. -> <> From Jan.Montano at thomson.com Wed Sep 28 03:29:44 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Wed, 28 Sep 2005 15:29:44 +0800 Subject: [Wtr-general] clicking this image Message-ID: I just used the form submit method instead. it works fine now. THanks. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Montano, Jan (Corp,IB&IM) Sent: Wednesday, September 28, 2005 3:04 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] clicking this image hi I've had a hard time clicking this image $ie.image(:src,/RBJ_LoginButtonOff/).click # results with unable to locate object error attached is the html source. -> <> From jim_che_tih at yahoo.com Wed Sep 28 04:18:22 2005 From: jim_che_tih at yahoo.com (jim che) Date: Wed, 28 Sep 2005 01:18:22 -0700 (PDT) Subject: [Wtr-general] Help, why cann't find the database Message-ID: <20050928081822.4346.qmail@web33309.mail.mud.yahoo.com> hi all I use the DBI to connect the mysql4.1.11 but the error was showed as below # Server version: 4.1.11-nt 4.1.11-nt # true handle..... # //handle of database connection //above is the info I printed c:/program files/ruby/lib/ruby/site_ruby/1.8/DBD/Mysql/Mysql.rb:238:in `tables': #3D000No database selected (DBI::DatabaseError) from c:/program files/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:674:in `tab les' from 4.rb:14 F:\rbtest> Does anybody meet this error before? any advice is appreciated Thank you Jim --------------------------------- Yahoo! for Good Click here to donate to the Hurricane Katrina relief effort. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050928/aff3a530/attachment.html From kononovichma at yahoo.com Wed Sep 28 07:46:45 2005 From: kononovichma at yahoo.com (Max Kononovich) Date: Wed, 28 Sep 2005 15:46:45 +0400 (MSD) Subject: [Wtr-general] How to click on specified link Message-ID: <20050928114646.85587.qmail@web35706.mail.mud.yahoo.com> Dear all, I have the following tabletree structure for each of the element (see below). And I have to click the links with the specified operation (edit, add or delete) and menu id. I know the operation type. How I can get menu id from tabletree and how then I can click on the link having this two variables? It will be great if I can define somthig like this ie.link(:url, /operation+id/).click. If it possible? max_level1
menus_item_down  menus_item_down  menus_edit_item  menus_add_item  --------------------------------- ?? ??? ? Yahoo!? ????????? ??????????? ? ?????????? Yahoo! ?????! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050928/86f01e43/attachment.html From raghu at qantom.com Wed Sep 28 08:19:21 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Wed, 28 Sep 2005 17:49:21 +0530 Subject: [Wtr-general] How to click on specified link In-Reply-To: <20050928114646.85587.qmail@web35706.mail.mud.yahoo.com> References: <20050928114646.85587.qmail@web35706.mail.mud.yahoo.com> Message-ID: <433A8A49.1080005@qantom.com> WET addresses this problem. You can identify objects using multiple parameters by using: Browser(...).Link("href:=/.*menu_item", "src:=.*list_add") and so on. Thanks Raghu Max Kononovich wrote: > Dear all, > > I have the following tabletree structure for each of the element (see > below). And I have to click the links with the specified operation > (edit, add or delete) and menu id. I know the operation type. How I > can get menu id from tabletree and how then I can click on the link > having this two variables? > It will be great if I can define somthig like this ie.link(:url, > /operation+id/).click. If it possible? > > > > value="-1" /> > > > width="17" /> > src="/images/join.gif" > alt="" align="top" border="0" height="21" width="17" /> > onclick="mayBeAction('122');">max_level1 > >
> > align="top" title="menus_item_down" alt="menus_item_down" />  > href="http://xxx.xxx.net/admin/menus/?operation=menu_item_down&menu_item_id=122 > " > > title="menus_item_down" alt="menus_item_down" />  > > title="menus_edit_item" alt="menus_edit_item" />  > > title="menus_add_item" alt="menus_add_item" />  > > > > ------------------------------------------------------------------------ > ?? ??? ? Yahoo!? > ????????? ??????????? ? ?????????? Yahoo! ????? > ! > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > -- Qantom Software http://www.qantom.com Ph : 91-80-26799269 Xtn. 125 sip : raghu at sip411.com -- From alex at verk.info Wed Sep 28 09:06:18 2005 From: alex at verk.info (Alexey Verkhovsky) Date: Wed, 28 Sep 2005 07:06:18 -0600 Subject: [Wtr-general] Gems undermine unit testing In-Reply-To: <433A2283.5020909@qantom.com> References: <5.1.0.14.2.20050927205944.037770f0@127.0.0.1> <433A2283.5020909@qantom.com> Message-ID: <433A954A.8060902@verk.info> The current version of RubyGems library (0.8.10) doesn't alter the LOADPATH. Instead it overrides Kernel#require with something like this: module Kernel alias require__ require def require(path) require__ path rescue LoadError => load_error ... tries to require a gem ... end end So, it will always try to get stuff from LOADPATH first, only then go to RubyGems. Earlier versions used to change LOADPATH, indeed. So, the answer to your question _may_ be as simple as "upgrade RubyGems" Alex From Mark_Cain at rl.gov Wed Sep 28 10:29:58 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Wed, 28 Sep 2005 07:29:58 -0700 Subject: [Wtr-general] Is there a way to select items in the select listbased on their position? Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D3C1@EX5V.rl.gov> I had a similar problem, a set of dropdowns whose values are determined by whatever is previously selected in the preceding dropdown. Mine happened to be in a new window that was popped up but the principle is the same. What I needed to do was look at the 'View Source' for the page and determine what the potential values were for a given selection, and then code my example accordingly. E.g. For dropdown A, if I select A1 then the possible options fro dropdown B are B1, B2, B3, etc. And if B2 is selected from dropdown B then the possible values for dropdown C are C4, C5, C7, etc. and so on. Here is the code I used... cw = IE.attach(:title, /PER Causal Code Management/i) cw.selectBox(:index, 1).select(/A1/) cw.selectBox(:index, 3).select(/B1/) cw.selectBox(:index, 12).select(/C01/) cw.button(:caption,"Add Causal Codes").click cw.button("Close Window").click A matrix for this would be pretty ugly for more than 3 dropdown with many values each, but it might save some time in the long run to do it. It would look something like this: A1 B1 C1 C4 C5 B3 C2 C7 B5 C3 C6 C8 A2 B2 C9 C10 B4 C11 C12 Hope this helps answer your question. --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Amita Shetty Sent: Tuesday, September 27, 2005 10:37 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Is there a way to select items in the select listbased on their position? Hi, Is there a way to select items in the select list based on their position? one way is: ie.select_list(:name,"NAME").select_value(/2/) Since the items in the select list are added dynamically based on the selection in the previous Select list, its value is not known priorly.So I am not able to do that way.. I want to write a test case such that in the first iteration, first item in the list is selected, in the second iteration second item is selected and so on. Thanks in advance, Amitha.. _______________________________________________ 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/20050928/a2780513/attachment.html From Padraig.OLeary at FINEOS.com Wed Sep 28 10:44:37 2005 From: Padraig.OLeary at FINEOS.com (Padraig O'Leary (ext. 955)) Date: Wed, 28 Sep 2005 15:44:37 +0100 Subject: [Wtr-general] Tree Views and child nodes Message-ID: Hi, Thanks Bret, unfortunately that didn't work. I got the following exception when I execute it: rb:1027:in `getNonControlObject': unknown way of finding a DIV ( {what} ) (Watir::Exception::MissingWayOfFindingObjectException) I heard from Angrez that there's a Watir extension that can be found which has an :xpath attribute extension. Will these extensions be included in ver. 1.5? When is this version likely to be released? Any other suggestions on how to rectify this problem, are very much appreciated. Thanks P?draig Bret replied on 28th of September 12.12pm ie.div(:text, 'TEAM A').image(:index, 1).click I'm not 100% sure this will work in 1.4.1, but it will work in HEAD. Bret On 9/27/05, Padraig O'Leary < padrai g.oleary at fineos.com> wrote: Hi all! I have a problem with a tree view with which I would really appreciate any help that you could provide: The name, src and id attributes of an image I want to click all contain the same data. The only thing identifying the images is the text beside them. So, I can expand the parent node of the tree, but I cant identify any of the child nodes. The HTML is as follows for the child nodes:
Team A
Team B
Team C
Is there any way I can identify the image by the text beside it? Can Watir navigate the DOM? If I can identify the parent DIV node, is there any way I can tell it to access the first child node of the parent node? Thanks for all your help in advance ********************************************************************** The information contained in this e-mail is confidential, may be privileged and is intended only for the user of the recipient named above. If you are not the intended recipient or a representative of the intended recipient, you have received this e-mail in error and must not copy, use or disclose the contents of this e-mail to anybody else. If you have received this e-mail in error, please notify the sender immediately by return e-mail and permanently delete the copy you received. This e-mail has been swept for computer viruses. However, you should carry out your own virus checks. Registered in Ireland, No. 205721. http://www.FINEOS.com ********************************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050928/679db10d/attachment.html From jeff.darklight at gmail.com Wed Sep 28 10:57:07 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 28 Sep 2005 07:57:07 -0700 Subject: [Wtr-general] clicking this image In-Reply-To: References: Message-ID: I ran into the same problem recently ... wrote: > I just used the form submit method instead. it works fine now. THanks. > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Montano, Jan (Corp,IB&IM) > Sent: Wednesday, September 28, 2005 3:04 PM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] clicking this image > > > hi I've had a hard time clicking this image > > > > $ie.image(:src,/RBJ_LoginButtonOff/).click > # results with unable to locate object error > > attached is the html source. > > -> > <> > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "http://ruby-lang.org -- do you ruby?" Jeff Wood From jeff.darklight at gmail.com Wed Sep 28 11:04:55 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 28 Sep 2005 08:04:55 -0700 Subject: [Wtr-general] Regarding Frames and SSL In-Reply-To: References: Message-ID: In my current installation of IE, there are options to allow cross-domain scripting ... you might want to see what's available ... j. On 9/27/05, Sankar wrote: > > I am testing an application whose main page is like this > > rows="130,*,0" marginheight="0" > marginwidth="0"> > > > > > > All my testing controls are in frame b. > when the frame b contains http pages, WATIR is able to access it, > When the frame b contains a login page which is https, WATIR is throwing an > error. > > I understand it is due to the cross domain scripting. Is there a way to over > home this error > > there are 3 frames > frame index: 0 name: header > frame index: 1 --Access Denied-- > frame index: 2 name: download > > > > > > W, [27-Sep-2005 21:49:45#3704] 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 `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 `waitForIE' > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2099:in `click' > E:/home-ST.rb:97:in `test_print_assertion' > c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `__send__' > c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `run' > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' > c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:in > `run_suite' > c:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:65:in > `start_mediato > c:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in > `start' > c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in > `run' > c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:194:in `run' > c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:14:in `run' > c:/ruby/lib/ruby/1.8/test/unit.rb:285 > c:/ruby/lib/ruby/1.8/test/unit.rb:283 > W, [27-Sep-2005 21:49:45#3704] WARN -- : runtime error in wait > > > > > > These are the errors i get > > > > Thanks, > > Sankar > > > On 9/27/05, Jeff Wood wrote: > > > > Provide us with a bit more information ( like the actual error that > > you're getting ) and it'll help us provide you with an answer... > > > > j. > > > > On 9/27/05, Sankar wrote: > > > Hi There, > > > I am trying to automate a web site which uses "Frames" using WATIR. > > > For the login of user account, the web page is hosted on https:// > > > For that particular page alone, > > > $ie.frame("frame2").button(:name,"login").click doesnt > work > > > . > > > > > > Any idea why is that ?? > > > is there a way of work around ? > > > > > > Thanks, > > > - Sankar > > > > > > -- > > > If you enjoy programming computers, you are in a very fortunate minority > of > > > people who can make a great living doing work they enjoy. - Joel > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > > > -- > > "http://ruby-lang.org -- do you ruby?" > > > > Jeff Wood > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > -- > > If you enjoy programming computers, you are in a very fortunate minority of > people who can make a great living doing work they enjoy. - Joel > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- "http://ruby-lang.org -- do you ruby?" Jeff Wood From iain.rose at gmail.com Wed Sep 28 11:38:04 2005 From: iain.rose at gmail.com (Iain Rose) Date: Wed, 28 Sep 2005 08:38:04 -0700 Subject: [Wtr-general] Is there a way to select items in the select listbased on their position? In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D3C1@EX5V.rl.gov> References: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D3C1@EX5V.rl.gov> Message-ID: There's a command you can use to return the entire contents of a select box as an array. I don't have access to the API right now but I think it's called ie.select_list.selectall or something similar. Once you have the contents of the selectbox as an array, you can get the length of the array and set a loop to iterate the same amount of times. Each time you loop you just get the next value of the array based on it's index and use the value to select an item from the select box. Sorry I can't give you any example code but the approach should work. On 28/09/05, Cain, Mark wrote: > > I had a similar problem, a set of dropdowns whose values are determined > by whatever is previously selected in the preceding dropdown. Mine happened > to be in a new window that was popped up but the principle is the same. What > I needed to do was look at the 'View Source' for the page and determine what > the potential values were for a given selection, and then code my example > accordingly. > > E.g. For dropdown A, if I select A1 then the possible options fro dropdown > B are B1, B2, B3, etc. And if B2 is selected from dropdown B then the > possible values for dropdown C are C4, C5, C7, etc. and so on. > > Here is the code I used... > > cw = IE.attach(:title, /PER Causal Code Management/i) > > cw.selectBox(:index, 1).select(/A1/) > > cw.selectBox(:index, 3).select(/B1/) > > cw.selectBox(:index, 12).select(/C01/) > > cw.button(:caption,"Add Causal Codes").click > > cw.button("Close Window").click > > A matrix for this would be pretty ugly for more than 3 dropdown with many > values each, but it might save some time in the long run to do it. > > It would look something like this: > > A1 > > B1 > > C1 > > C4 > > C5 > > B3 > > C2 > > C7 > > B5 > > C3 > > C6 > > C8 > > A2 > > B2 > > C9 > > C10 > > B4 > > C11 > > C12 > > Hope this helps answer your question. > > --Mark > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org] On Behalf Of Amita Shetty > Sent: Tuesday, September 27, 2005 10:37 PM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Is there a way to select items in the select > listbased on their position? > > Hi, > > Is there a way to select items in the select list based on their position? > > one way is: > > ie.select_list(:name,"NAME").select_value(/2/) > > Since the items in the select list are added dynamically based on the > selection in the previous Select list, its value is not known priorly.So I > am not able to do that way.. > > I want to write a test case such that in the first iteration, first item > in the list is selected, in the second iteration second item is selected and > so on. > > Thanks in advance, > > Amitha.. > > _______________________________________________ > > 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 > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050928/c3939cc9/attachment.html From bret at pettichord.com Wed Sep 28 11:41:33 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 28 Sep 2005 10:41:33 -0500 Subject: [Wtr-general] Tree Views and child nodes In-Reply-To: Message-ID: <5.1.0.14.2.20050928103926.0393bdd8@127.0.0.1> At 09:44 AM 9/28/2005, Padraig O'Leary (ext. 955) wrote: >Thanks Bret, unfortunately that didn't work. I got the following exception >when I execute it: >rb:1027:in `getNonControlObject': unknown way of finding a DIV ( {what} ) >(Watir::Exception::MissingWayOfFindingObjectException) OK. Well it will work in HEAD. >I heard from Angrez that there's a Watir extension that can be found which >has an :xpath attribute extension. Will these extensions be included in >ver. 1.5? When is this version likely to be released? These extensions were committed to HEAD last night. There are a number of manual setup tasks you'll need to do: see the doc for details. I'd like to make a BETA release of 1.5 out of head soon. You can always download the tarball. HEAD is currently stable. Bret _____________________ Bret Pettichord www.pettichord.com From kononovichma at yahoo.com Wed Sep 28 12:01:34 2005 From: kononovichma at yahoo.com (Max Kononovich) Date: Wed, 28 Sep 2005 20:01:34 +0400 (MSD) Subject: [Wtr-general] How to get digital id and problem with confirmation message Message-ID: <20050928160135.23323.qmail@web35708.mail.mud.yahoo.com> Thanks for your help, And can you tell me how I can get digital Id having string "http://xxx.xxx.net/admin/menus/edit_item/?menu_item_id=122" And another question can you propose any way how I can click "ok" button on the confirmation message. I try to use the following require 'watir/WindowHelper' $helper = WindowHelper.new $ie.link(:url, /menu_delete_item/).click $helper.push_confirm_button_ok() When confirmation message appeares it wait for somthing. I click "Cancel" manually and click link again after then it works. What heppens? Thanks, Max --------------------------------- ?? ??? ? Yahoo!? ????????? ??????????? ? ?????????? Yahoo! ?????! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050928/77230725/attachment.html From rsankarsub at gmail.com Wed Sep 28 12:57:36 2005 From: rsankarsub at gmail.com (Sankar) Date: Wed, 28 Sep 2005 09:57:36 -0700 Subject: [Wtr-general] Regarding Frames and SSL In-Reply-To: References: Message-ID: I have enabled that option as well. i am still getting the error.. is there a way to overcome this ?? - Sankar On 9/28/05, Jeff Wood wrote: > > In my current installation of IE, there are options to allow > cross-domain scripting ... you might want to see what's available ... > > j. > > On 9/27/05, Sankar wrote: > > > > I am testing an application whose main page is like this > > > > > rows="130,*,0" marginheight="0" > > marginwidth="0"> > > > > > > > > > > > > All my testing controls are in frame b. > > when the frame b contains http pages, WATIR is able to access it, > > When the frame b contains a login page which is https, WATIR is throwing > an > > error. > > > > I understand it is due to the cross domain scripting. Is there a way to > over > > home this error > > > > there are 3 frames > > frame index: 0 name: header > > frame index: 1 --Access Denied-- > > frame index: 2 name: download > > > > > > > > > > > > W, [27-Sep-2005 21:49:45#3704] 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 `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 `waitForIE' > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2099:in `click' > > E:/home-ST.rb:97:in `test_print_assertion' > > c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `__send__' > > c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `run' > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each' > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' > > c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:in > > `run_suite' > > c:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:65:in > > `start_mediato > > c:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in > > `start' > > c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in > > `run' > > c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:194:in `run' > > c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:14:in `run' > > c:/ruby/lib/ruby/1.8/test/unit.rb:285 > > c:/ruby/lib/ruby/1.8/test/unit.rb:283 > > W, [27-Sep-2005 21:49:45#3704] WARN -- : runtime error in wait > > > > > > > > > > > > These are the errors i get > > > > > > > > Thanks, > > > > Sankar > > > > > > On 9/27/05, Jeff Wood wrote: > > > > > > Provide us with a bit more information ( like the actual error that > > > you're getting ) and it'll help us provide you with an answer... > > > > > > j. > > > > > > On 9/27/05, Sankar wrote: > > > > Hi There, > > > > I am trying to automate a web site which uses "Frames" using WATIR. > > > > For the login of user account, the web page is hosted on https:// > > > > For that particular page alone, > > > > $ie.frame("frame2").button(:name,"login").click doesnt > > work > > > > . > > > > > > > > Any idea why is that ?? > > > > is there a way of work around ? > > > > > > > > Thanks, > > > > - Sankar > > > > > > > > -- > > > > If you enjoy programming computers, you are in a very fortunate > minority > > of > > > > people who can make a great living doing work they enjoy. - Joel > > > > _______________________________________________ > > > > Wtr-general mailing list > > > > Wtr-general at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > > > > > > > > > -- > > > "http://ruby-lang.org -- do you ruby?" > > > > > > Jeff Wood > > > > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > -- > > > > If you enjoy programming computers, you are in a very fortunate minority > of > > people who can make a great living doing work they enjoy. - Joel > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > -- > "http://ruby-lang.org -- do you ruby?" > > Jeff Wood > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- If you enjoy programming computers, you are in a very fortunate minority of people who can make a great living doing work they enjoy. - Joel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050928/9af9e18e/attachment.html From mstucki at 1800contacts.com Wed Sep 28 13:56:37 2005 From: mstucki at 1800contacts.com (Mathew Stucki) Date: Wed, 28 Sep 2005 11:56:37 -0600 Subject: [Wtr-general] Text entry dialogs in Watir Message-ID: <25CF2ACF58705B428C62B82923B90F96ECC889@EXCH02.CTAC.1800contacts.com> I am trying to display a dialog in Watir allowing the user to enter text to navigate a captcha component. Is this possible? Thanks. ---------------------------------------------- Mathew J. Stucki Quality Assurance 1-800 CONTACTS mstucki at 1800contacts.com 801.858.2220 ---------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050928/3bcbbc9b/attachment.html From bret at pettichord.com Wed Sep 28 12:07:48 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 28 Sep 2005 11:07:48 -0500 Subject: [Wtr-general] How to click on specified link In-Reply-To: <20050928114646.85587.qmail@web35706.mail.mud.yahoo.com> Message-ID: <5.1.0.14.2.20050928110714.03592cf0@127.0.0.1> At 06:46 AM 9/28/2005, Max Kononovich wrote: >It will be great if I can define somthig like this ie.link(:url, >/operation+id/).click. If it possible? Yes, this should work in Watir 1.4. What problems are you having? _____________________ Bret Pettichord www.pettichord.com From jeff.darklight at gmail.com Wed Sep 28 16:02:06 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 28 Sep 2005 13:02:06 -0700 Subject: [Wtr-general] Regarding Frames and SSL In-Reply-To: References: Message-ID: Hmm, I'll have to look into it a bit further. I don't have any sites with an SSL sitting around to play with... I'll see what I can do ... maybe somebody else has an idea ... ?? j. On 9/28/05, Sankar wrote: > I have enabled that option as well. > i am still getting the error.. > > is there a way to overcome this ?? > > - Sankar > > > On 9/28/05, Jeff Wood wrote: > > > > In my current installation of IE, there are options to allow > > cross-domain scripting ... you might want to see what's available ... > > > > j. > > > > On 9/27/05, Sankar wrote: > > > > > > I am testing an application whose main page is like this > > > > > > > > rows="130,*,0" marginheight="0" > > > marginwidth="0"> > > > > > > > > > > > > > > > > > > All my testing controls are in frame b. > > > when the frame b contains http pages, WATIR is able to access it, > > > When the frame b contains a login page which is https, WATIR is throwing > an > > > error. > > > > > > I understand it is due to the cross domain scripting. Is there a way to > over > > > home this error > > > > > > there are 3 frames > > > frame index: 0 name: header > > > frame index: 1 --Access Denied-- > > > frame index: 2 name: download > > > > > > > > > > > > > > > > > > W, [27-Sep-2005 21:49:45#3704] 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 `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 > `waitForIE' > > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2099:in `click' > > > E:/home-ST.rb:97:in `test_print_assertion' > > > c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in > `__send__' > > > c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `run' > > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' > > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in > `each' > > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' > > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' > > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in > `each' > > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' > > > > c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:in > > > `run_suite' > > > > c:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:65:in > > > `start_mediato > > > > c:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in > > > `start' > > > > c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in > > > `run' > > > c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:194:in > `run' > > > c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:14:in > `run' > > > c:/ruby/lib/ruby/1.8/test/unit.rb:285 > > > c:/ruby/lib/ruby/1.8/test/unit.rb:283 > > > W, [27-Sep-2005 21:49:45#3704] WARN -- : runtime error in wait > > > > > > > > > > > > > > > > > > These are the errors i get > > > > > > > > > > > > Thanks, > > > > > > Sankar > > > > > > > > > On 9/27/05, Jeff Wood wrote: > > > > > > > > Provide us with a bit more information ( like the actual error that > > > > you're getting ) and it'll help us provide you with an answer... > > > > > > > > j. > > > > > > > > On 9/27/05, Sankar wrote: > > > > > Hi There, > > > > > I am trying to automate a web site which uses "Frames" using WATIR. > > > > > For the login of user account, the web page is hosted on https:// > > > > > For that particular page alone, > > > > > $ie.frame("frame2").button(:name,"login").click > doesnt > > > work > > > > > . > > > > > > > > > > Any idea why is that ?? > > > > > is there a way of work around ? > > > > > > > > > > Thanks, > > > > > - Sankar > > > > > > > > > > -- > > > > > If you enjoy programming computers, you are in a very fortunate > minority > > > of > > > > > people who can make a great living doing work they enjoy. - Joel > > > > > _______________________________________________ > > > > > Wtr-general mailing list > > > > > Wtr-general at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > "http://ruby-lang.org -- do you ruby?" > > > > > > > > Jeff Wood > > > > > > > > _______________________________________________ > > > > Wtr-general mailing list > > > > Wtr-general at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > > > > -- > > > > > > If you enjoy programming computers, you are in a very fortunate minority > of > > > people who can make a great living doing work they enjoy. - Joel > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > > > -- > > "http://ruby-lang.org -- do you ruby?" > > > > Jeff Wood > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > -- > If you enjoy programming computers, you are in a very fortunate minority of > people who can make a great living doing work they enjoy. - Joel > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- "http://ruby-lang.org -- do you ruby?" Jeff Wood From jeff.darklight at gmail.com Wed Sep 28 16:06:36 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 28 Sep 2005 13:06:36 -0700 Subject: [Wtr-general] How to get digital id and problem with confirmation message In-Reply-To: <20050928160135.23323.qmail@web35708.mail.mud.yahoo.com> References: <20050928160135.23323.qmail@web35708.mail.mud.yahoo.com> Message-ID: If I remember correctly, you should put the $helper.push_confirm_button_ok() BEFORE the $ie.link( :url, /menu_delete_item/ ).click ... the explanation is that the helper then spawns the seperatethread/process that watches for the box to pop up. Then when youcilck it sees it ... Otherwise, it's already popped, so the helperdoesn't have anything to help with. ... hope that helps. j. On 9/28/05, Max Kononovich wrote:>> Thanks for your help,>> And can you tell me how I can get digital Id having string> "http://xxx.xxx.net/admin/menus/edit_item/?menu_item_id=122">> And another question can you propose any way how I can click "ok" button on> the confirmation message. I try to use the following>> require 'watir/WindowHelper'> $helper = WindowHelper.new> $ie.link(:url, /menu_delete_item/).click> $helper.push_confirm_button_ok()>> When confirmation message appeares it wait for somthing. I click "Cancel"> manually and click link again after then it works. What heppens?>> Thanks,>> Max>> ________________________________> ?? ??? ? Yahoo!?> ????????? ??????????? ? ?????????? Yahoo! ?????!> _______________________________________________> Wtr-general mailing list> Wtr-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/wtr-general>>> --"http://ruby-lang.org -- do you ruby?" Jeff Wood From bret at pettichord.com Wed Sep 28 16:17:53 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 28 Sep 2005 15:17:53 -0500 Subject: [Wtr-general] How to get digital id and problem with confirmation message In-Reply-To: <20050928160135.23323.qmail@web35708.mail.mud.yahoo.com> Message-ID: <5.1.0.14.2.20050928151444.03986ba0@127.0.0.1> At 11:01 AM 9/28/2005, Max Kononovich wrote: >And can you tell me how I can get digital Id having string >"http://xxx.xxx.net/admin/menus/edit_item/?menu_item_id=122" $ie.link(:url, /admin\/menus\/edit_item\/?menu_item_id=22/).click _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Wed Sep 28 16:31:07 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 28 Sep 2005 15:31:07 -0500 Subject: [Wtr-general] Regarding Frames and SSL In-Reply-To: References: Message-ID: <5.1.0.14.2.20050928152308.0399aad8@127.0.0.1> I'm pretty sure this is the standard cross-site scripting problem. AKA the same-origin policy: "a script can read only the properties of windows and documents that have the same origin (i.e., that were loaded from the (1) same host, (2) through the same port, and (3) by the same protocol) as the script itself." In this case, the protocol is different, but i'm pretty sure a workaround that worked for different hosts would also work for different protocols. Bret At 03:02 PM 9/28/2005, Jeff Wood wrote: >Hmm, I'll have to look into it a bit further. > >I don't have any sites with an SSL sitting around to play with... I'll >see what I can do ... maybe somebody else has an idea ... ?? > >j. > >On 9/28/05, Sankar wrote: > > I have enabled that option as well. > > i am still getting the error.. > > > > is there a way to overcome this ?? > > > > - Sankar > > > > > > On 9/28/05, Jeff Wood wrote: > > > > > > In my current installation of IE, there are options to allow > > > cross-domain scripting ... you might want to see what's available ... > > > > > > j. > > > > > > On 9/27/05, Sankar wrote: > > > > > > > > I am testing an application whose main page is like this > > > > > > > > > > > rows="130,*,0" marginheight="0" > > > > marginwidth="0"> > > > > > > > > > > > > > > > > > > > > > > > > All my testing controls are in frame b. > > > > when the frame b contains http pages, WATIR is able to access it, > > > > When the frame b contains a login page which is https, WATIR is > throwing > > an > > > > error. > > > > > > > > I understand it is due to the cross domain scripting. Is there a way to > > over > > > > home this error > > > > > > > > there are 3 frames > > > > frame index: 0 name: header > > > > frame index: 1 --Access Denied-- > > > > frame index: 2 name: download > > > > > > > > > > > > > > > > > > > > > > > > W, [27-Sep-2005 21:49:45#3704] 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 `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 > > `waitForIE' > > > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2099:in `click' > > > > E:/home-ST.rb:97:in `test_print_assertion' > > > > c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in > > `__send__' > > > > c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `run' > > > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' > > > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in > > `each' > > > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' > > > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' > > > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in > > `each' > > > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' > > > > > > c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:in > > > > `run_suite' > > > > > > c:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:65:in > > > > `start_mediato > > > > > > c:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in > > > > `start' > > > > > > c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in > > > > `run' > > > > c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:194:in > > `run' > > > > c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:14:in > > `run' > > > > c:/ruby/lib/ruby/1.8/test/unit.rb:285 > > > > c:/ruby/lib/ruby/1.8/test/unit.rb:283 > > > > W, [27-Sep-2005 21:49:45#3704] WARN -- : runtime error in wait > > > > > > > > > > > > > > > > > > > > > > > > These are the errors i get > > > > > > > > > > > > > > > > Thanks, > > > > > > > > Sankar > > > > > > > > > > > > On 9/27/05, Jeff Wood wrote: > > > > > > > > > > Provide us with a bit more information ( like the actual error that > > > > > you're getting ) and it'll help us provide you with an answer... > > > > > > > > > > j. > > > > > > > > > > On 9/27/05, Sankar wrote: > > > > > > Hi There, > > > > > > I am trying to automate a web site which uses "Frames" using > WATIR. > > > > > > For the login of user account, the web page is hosted on https:// > > > > > > For that particular page alone, > > > > > > $ie.frame("frame2").button(:name,"login").click > > doesnt > > > > work > > > > > > . > > > > > > > > > > > > Any idea why is that ?? > > > > > > is there a way of work around ? > > > > > > > > > > > > Thanks, > > > > > > - Sankar > > > > > > > > > > > > -- > > > > > > If you enjoy programming computers, you are in a very fortunate > > minority > > > > of > > > > > > people who can make a great living doing work they enjoy. - Joel > > > > > > _______________________________________________ > > > > > > Wtr-general mailing list > > > > > > Wtr-general at rubyforge.org > > > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > "http://ruby-lang.org -- do you ruby?" > > > > > > > > > > Jeff Wood > > > > > > > > > > _______________________________________________ > > > > > Wtr-general mailing list > > > > > Wtr-general at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > If you enjoy programming computers, you are in a very fortunate > minority > > of > > > > people who can make a great living doing work they enjoy. - Joel > > > > _______________________________________________ > > > > Wtr-general mailing list > > > > Wtr-general at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > > > > > > > > > -- > > > "http://ruby-lang.org -- do you ruby?" > > > > > > Jeff Wood > > > > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > -- > > If you enjoy programming computers, you are in a very fortunate minority of > > people who can make a great living doing work they enjoy. - Joel > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > >-- >"http://ruby-lang.org -- do you ruby?" > >Jeff Wood > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From rsankarsub at gmail.com Wed Sep 28 17:27:38 2005 From: rsankarsub at gmail.com (Sankar) Date: Wed, 28 Sep 2005 14:27:38 -0700 Subject: [Wtr-general] Regarding Frames and SSL In-Reply-To: <5.1.0.14.2.20050928152308.0399aad8@127.0.0.1> References: <5.1.0.14.2.20050928152308.0399aad8@127.0.0.1> Message-ID: Bret, Can you link me to any of the workarounds you mentioned here. Ill give a try with work around. Thanks, Sankar On 9/28/05, Bret Pettichord wrote: > > I'm pretty sure this is the standard cross-site scripting problem. > > AKA the same-origin policy: "a script can read only the properties of > windows and documents that have the same origin (i.e., that were loaded > from the (1) same host, (2) through the same port, and (3) by the same > protocol) as the script itself." > > In this case, the protocol is different, but i'm pretty sure a workaround > that worked for different hosts would also work for different protocols. > > Bret > > At 03:02 PM 9/28/2005, Jeff Wood wrote: > >Hmm, I'll have to look into it a bit further. > > > >I don't have any sites with an SSL sitting around to play with... I'll > >see what I can do ... maybe somebody else has an idea ... ?? > > > >j. > > > >On 9/28/05, Sankar wrote: > > > I have enabled that option as well. > > > i am still getting the error.. > > > > > > is there a way to overcome this ?? > > > > > > - Sankar > > > > > > > > > On 9/28/05, Jeff Wood wrote: > > > > > > > > In my current installation of IE, there are options to allow > > > > cross-domain scripting ... you might want to see what's available > ... > > > > > > > > j. > > > > > > > > On 9/27/05, Sankar wrote: > > > > > > > > > > I am testing an application whose main page is like this > > > > > > > > > > framespacing="0" > > > > > rows="130,*,0" marginheight="0" > > > > > marginwidth="0"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > All my testing controls are in frame b. > > > > > when the frame b contains http pages, WATIR is able to access it, > > > > > When the frame b contains a login page which is https, WATIR is > > throwing > > > an > > > > > error. > > > > > > > > > > I understand it is due to the cross domain scripting. Is there a > way to > > > over > > > > > home this error > > > > > > > > > > there are 3 frames > > > > > frame index: 0 name: header > > > > > frame index: 1 --Access Denied-- > > > > > frame index: 2 name: download > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > W, [27-Sep-2005 21:49:45#3704] 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 `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 > > > `waitForIE' > > > > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2099:in `click' > > > > > E:/home-ST.rb:97:in `test_print_assertion' > > > > > c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in > > > `__send__' > > > > > c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `run' > > > > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' > > > > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in > > > `each' > > > > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' > > > > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' > > > > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in > > > `each' > > > > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' > > > > > > > > c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:in > > > > > `run_suite' > > > > > > > > c:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:65:in > > > > > `start_mediato > > > > > > > > c:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in > > > > > `start' > > > > > > > > c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in > > > > > `run' > > > > > c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:194:in > > > `run' > > > > > c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:14:in > > > `run' > > > > > c:/ruby/lib/ruby/1.8/test/unit.rb:285 > > > > > c:/ruby/lib/ruby/1.8/test/unit.rb:283 > > > > > W, [27-Sep-2005 21:49:45#3704] WARN -- : runtime error in wait > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > These are the errors i get > > > > > > > > > > > > > > > > > > > > Thanks, > > > > > > > > > > Sankar > > > > > > > > > > > > > > > On 9/27/05, Jeff Wood wrote: > > > > > > > > > > > > Provide us with a bit more information ( like the actual error > that > > > > > > you're getting ) and it'll help us provide you with an answer... > > > > > > > > > > > > j. > > > > > > > > > > > > On 9/27/05, Sankar wrote: > > > > > > > Hi There, > > > > > > > I am trying to automate a web site which uses "Frames" using > > WATIR. > > > > > > > For the login of user account, the web page is hosted on > https:// > > > > > > > For that particular page alone, > > > > > > > $ie.frame("frame2").button(:name,"login").click > > > doesnt > > > > > work > > > > > > > . > > > > > > > > > > > > > > Any idea why is that ?? > > > > > > > is there a way of work around ? > > > > > > > > > > > > > > Thanks, > > > > > > > - Sankar > > > > > > > > > > > > > > -- > > > > > > > If you enjoy programming computers, you are in a very > fortunate > > > minority > > > > > of > > > > > > > people who can make a great living doing work they enjoy. - > Joel > > > > > > > _______________________________________________ > > > > > > > Wtr-general mailing list > > > > > > > Wtr-general at rubyforge.org > > > > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > "http://ruby-lang.org -- do you ruby?" > > > > > > > > > > > > Jeff Wood > > > > > > > > > > > > _______________________________________________ > > > > > > Wtr-general mailing list > > > > > > Wtr-general at rubyforge.org > > > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > If you enjoy programming computers, you are in a very fortunate > > minority > > > of > > > > > people who can make a great living doing work they enjoy. - Joel > > > > > _______________________________________________ > > > > > Wtr-general mailing list > > > > > Wtr-general at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > "http://ruby-lang.org -- do you ruby?" > > > > > > > > Jeff Wood > > > > > > > > _______________________________________________ > > > > Wtr-general mailing list > > > > Wtr-general at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > > > > -- > > > If you enjoy programming computers, you are in a very fortunate > minority of > > > people who can make a great living doing work they enjoy. - Joel > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > > >-- > >"http://ruby-lang.org -- do you ruby?" > > > >Jeff Wood > > > >_______________________________________________ > >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 > -- If you enjoy programming computers, you are in a very fortunate minority of people who can make a great living doing work they enjoy. - Joel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050928/fdd94e1c/attachment.html From christopher.mcmahon at gmail.com Wed Sep 28 17:55:13 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 28 Sep 2005 16:55:13 -0500 Subject: [Wtr-general] OT: double-quotes and substitution in same string? Message-ID: <72799cd705092814554c50d0fd@mail.gmail.com> Hi... Sorry for the OT post, but this is driving me crazy... I have an XML string that needs double-quotes, so to turn it into a string, I enclose in single quotes. It looks a little like this: '' But I also need to substitute a variable into the string with #{}, like so: a = 123 '' but #{} doesn't work inside of single-quoted strings, and double-quotes inside of double-quotes are illegal, and slashes also don't work, i.e a = 123 // Any suggestions to substitute a string and use double-quotes simultaneously in a single string? I'm sure it's possible, I just can't figure out how.... -Chris From rsankarsub at gmail.com Wed Sep 28 18:01:36 2005 From: rsankarsub at gmail.com (Sankar) Date: Wed, 28 Sep 2005 15:01:36 -0700 Subject: [Wtr-general] OT: double-quotes and substitution in same string? In-Reply-To: <72799cd705092814554c50d0fd@mail.gmail.com> References: <72799cd705092814554c50d0fd@mail.gmail.com> Message-ID: can you give a try using xsl attribute ? Hope this helps . ' checkbox chkPrice ' - Sankar On 9/28/05, Chris McMahon wrote: > > Hi... > > Sorry for the OT post, but this is driving me crazy... > > I have an XML string that needs double-quotes, so to turn it into a > string, I enclose in single quotes. It looks a little like this: > > '' > > But I also need to substitute a variable into the string with #{}, like > so: > > a = 123 > '' > > but #{} doesn't work inside of single-quoted strings, and > double-quotes inside of double-quotes are illegal, and slashes also > don't work, i.e > > a = 123 > // > > Any suggestions to substitute a string and use double-quotes > simultaneously in a single string? I'm sure it's possible, I just > can't figure out how.... > -Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- If you enjoy programming computers, you are in a very fortunate minority of people who can make a great living doing work they enjoy. - Joel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050928/5454adb6/attachment.html From Mark_Cain at rl.gov Wed Sep 28 18:08:04 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Wed, 28 Sep 2005 15:08:04 -0700 Subject: [Wtr-general] OT: double-quotes and substitution in same string? Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D3C5@EX5V.rl.gov> What about this it worked for me: '' --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: Wednesday, September 28, 2005 2:55 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] OT: double-quotes and substitution in same string? Hi... Sorry for the OT post, but this is driving me crazy... I have an XML string that needs double-quotes, so to turn it into a string, I enclose in single quotes. It looks a little like this: '' But I also need to substitute a variable into the string with #{}, like so: a = 123 '' but #{} doesn't work inside of single-quoted strings, and double-quotes inside of double-quotes are illegal, and slashes also don't work, i.e a = 123 // Any suggestions to substitute a string and use double-quotes simultaneously in a single string? I'm sure it's possible, I just can't figure out how.... -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From christopher.mcmahon at gmail.com Wed Sep 28 18:11:01 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 28 Sep 2005 17:11:01 -0500 Subject: [Wtr-general] Got it. (thanks Mark) Re: OT: double-quotes and substitution in same string? Message-ID: <72799cd705092815112c4f33d1@mail.gmail.com> On 9/28/05, Cain, Mark wrote: > What about this it worked for me: > > '' > Almost. Trouble is that the whole thing had to be assigned to a variable. What worked was escaping the double-quotes, like str = " Message-ID: <5.1.0.14.2.20050928174618.039eb9f0@127.0.0.1> %Q is ticket for this kind of thing: %Q[] %Q can use any character following it as a "double-quote" character. It knows that some characters (like '[') are left-handed and will use their right-handed counterparts (']') to close the quote. (I also considered using '|' and '!'.) Another option is to backquote the interior double-quotes: "" Any questions about testing with Ruby are on-topic for this list. Bret At 04:55 PM 9/28/2005, Chris McMahon wrote: >Hi... > >Sorry for the OT post, but this is driving me crazy... > >I have an XML string that needs double-quotes, so to turn it into a >string, I enclose in single quotes. It looks a little like this: > >'' > >But I also need to substitute a variable into the string with #{}, like so: > >a = 123 >'' > >but #{} doesn't work inside of single-quoted strings, and >double-quotes inside of double-quotes are illegal, and slashes also >don't work, i.e > >a = 123 >// > >Any suggestions to substitute a string and use double-quotes >simultaneously in a single string? I'm sure it's possible, I just >can't figure out how.... >-Chris > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From christopher.mcmahon at gmail.com Thu Sep 29 09:54:13 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 29 Sep 2005 08:54:13 -0500 Subject: [Wtr-general] OT: double-quotes and substitution in same string? In-Reply-To: <5.1.0.14.2.20050928174618.039eb9f0@127.0.0.1> References: <72799cd705092814554c50d0fd@mail.gmail.com> <5.1.0.14.2.20050928174618.039eb9f0@127.0.0.1> Message-ID: <72799cd705092906547f403243@mail.gmail.com> On 9/28/05, Bret Pettichord wrote: > %Q is ticket for this kind of thing: > > %Q[] Oooh. This is cool. =) > Another option is to backquote the interior double-quotes: > > "" This is what I eventually discovered. > Any questions about testing with Ruby are on-topic for this list. I think so too. Do we have etiquette in place for msgs. not having to do with Watir directly? I've been using "OT", but maybe that's not the best. I'd go to ruby-talk, but the volume there is just too high. -Chris From christopher.mcmahon at gmail.com Thu Sep 29 11:17:52 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 29 Sep 2005 10:17:52 -0500 Subject: [Wtr-general] OT again: REXML to extract only values from XML? Message-ID: <72799cd7050929081730a4f616@mail.gmail.com> Again, apologies for non-Watir content, but some REXML: say I have an XML record like CHRIS MCMAHON 111223333 I'd like to extract each value of each tag (without regard to hierarchy) and add it to an array: ["CHRIS","MCMAHON","111223333"] The REXML docs don't seem to address this. I've tried various methods, but I can't seem to find the way to address only the contents of each tag. Any suggestions would be welcome OBLIGATORY WATIR CONTENT: the Watir distro has a REXML logging scheme with lots of nice comments. -Chris From dave at burt.id.au Thu Sep 29 11:25:40 2005 From: dave at burt.id.au (Dave Burt) Date: Fri, 30 Sep 2005 01:25:40 +1000 Subject: [Wtr-general] OT: double-quotes and substitution in same string? References: <72799cd705092814554c50d0fd@mail.gmail.com><5.1.0.14.2.20050928174618.039eb9f0@127.0.0.1> <72799cd705092906547f403243@mail.gmail.com> Message-ID: <001e01c5c50a$0dcc8820$6402a8c0@telperion> Chris: > I think so too. Do we have etiquette in place for msgs. not having to > do with Watir directly? I've been using "OT", but maybe that's not > the best. No need, I think. > I'd go to ruby-talk, but the volume there is just too high. You might consider using the newsgroup comp.lang.ruby instead - it's cross-mirrored with the mailing list. I find it a lot easier to deal with than the flood of emails it represents. Google has an interface here: http://groups.google.com/group/comp.lang.ruby If you have a Gmail account, you can even use that to post. Cheers, Dave From bret at pettichord.com Thu Sep 29 14:41:39 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 29 Sep 2005 13:41:39 -0500 Subject: [Wtr-general] list etiquette, was Re: OT: double-quotes and substitution in same string? In-Reply-To: <72799cd705092906547f403243@mail.gmail.com> References: <5.1.0.14.2.20050928174618.039eb9f0@127.0.0.1> <72799cd705092814554c50d0fd@mail.gmail.com> <5.1.0.14.2.20050928174618.039eb9f0@127.0.0.1> Message-ID: <5.1.0.14.2.20050929133900.03a4ae80@127.0.0.1> At 08:54 AM 9/29/2005, Chris McMahon wrote: >Do we have etiquette in place for msgs. not having to >do with Watir directly? I've been using "OT", but maybe that's not >the best. I'm happy as long as you have an accurate subject line. I haven't had any trouble telling which messages are watir-specific and which are on related topics, like databases. Also, i suspect that many of the new people on the list are unclear where watir ends and the rest of ruby starts. Bret _____________________ Bret Pettichord www.pettichord.com From rsankarsub at gmail.com Thu Sep 29 16:32:54 2005 From: rsankarsub at gmail.com (Sankar) Date: Thu, 29 Sep 2005 13:32:54 -0700 Subject: [Wtr-general] Regarding Frames and SSL In-Reply-To: <5.1.0.14.2.20050928152308.0399aad8@127.0.0.1> References: <5.1.0.14.2.20050928152308.0399aad8@127.0.0.1> Message-ID: Can anyone suggest some possible workarounds to overcome this issue. I am stuck at this point. Thanks in Advance, Sankar On 9/28/05, Bret Pettichord wrote: > > I'm pretty sure this is the standard cross-site scripting problem. > > AKA the same-origin policy: "a script can read only the properties of > windows and documents that have the same origin (i.e., that were loaded > from the (1) same host, (2) through the same port, and (3) by the same > protocol) as the script itself." > > In this case, the protocol is different, but i'm pretty sure a workaround > that worked for different hosts would also work for different protocols. > > Bret > > At 03:02 PM 9/28/2005, Jeff Wood wrote: > >Hmm, I'll have to look into it a bit further. > > > >I don't have any sites with an SSL sitting around to play with... I'll > >see what I can do ... maybe somebody else has an idea ... ?? > > > >j. > > > >On 9/28/05, Sankar wrote: > > > I have enabled that option as well. > > > i am still getting the error.. > > > > > > is there a way to overcome this ?? > > > > > > - Sankar > > > > > > > > > On 9/28/05, Jeff Wood wrote: > > > > > > > > In my current installation of IE, there are options to allow > > > > cross-domain scripting ... you might want to see what's available > ... > > > > > > > > j. > > > > > > > > On 9/27/05, Sankar wrote: > > > > > > > > > > I am testing an application whose main page is like this > > > > > > > > > > framespacing="0" > > > > > rows="130,*,0" marginheight="0" > > > > > marginwidth="0"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > All my testing controls are in frame b. > > > > > when the frame b contains http pages, WATIR is able to access it, > > > > > When the frame b contains a login page which is https, WATIR is > > throwing > > > an > > > > > error. > > > > > > > > > > I understand it is due to the cross domain scripting. Is there a > way to > > > over > > > > > home this error > > > > > > > > > > there are 3 frames > > > > > frame index: 0 name: header > > > > > frame index: 1 --Access Denied-- > > > > > frame index: 2 name: download > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > W, [27-Sep-2005 21:49:45#3704] 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 `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 > > > `waitForIE' > > > > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2099:in `click' > > > > > E:/home-ST.rb:97:in `test_print_assertion' > > > > > c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in > > > `__send__' > > > > > c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `run' > > > > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' > > > > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in > > > `each' > > > > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' > > > > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' > > > > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in > > > `each' > > > > > c:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' > > > > > > > > c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:in > > > > > `run_suite' > > > > > > > > c:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:65:in > > > > > `start_mediato > > > > > > > > c:/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in > > > > > `start' > > > > > > > > c:/ruby/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in > > > > > `run' > > > > > c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:194:in > > > `run' > > > > > c:/ruby/lib/ruby/1.8/test/unit/autorunner.rb:14:in > > > `run' > > > > > c:/ruby/lib/ruby/1.8/test/unit.rb:285 > > > > > c:/ruby/lib/ruby/1.8/test/unit.rb:283 > > > > > W, [27-Sep-2005 21:49:45#3704] WARN -- : runtime error in wait > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > These are the errors i get > > > > > > > > > > > > > > > > > > > > Thanks, > > > > > > > > > > Sankar > > > > > > > > > > > > > > > On 9/27/05, Jeff Wood wrote: > > > > > > > > > > > > Provide us with a bit more information ( like the actual error > that > > > > > > you're getting ) and it'll help us provide you with an answer... > > > > > > > > > > > > j. > > > > > > > > > > > > On 9/27/05, Sankar wrote: > > > > > > > Hi There, > > > > > > > I am trying to automate a web site which uses "Frames" using > > WATIR. > > > > > > > For the login of user account, the web page is hosted on > https:// > > > > > > > For that particular page alone, > > > > > > > $ie.frame("frame2").button(:name,"login").click > > > doesnt > > > > > work > > > > > > > . > > > > > > > > > > > > > > Any idea why is that ?? > > > > > > > is there a way of work around ? > > > > > > > > > > > > > > Thanks, > > > > > > > - Sankar > > > > > > > > > > > > > > -- > > > > > > > If you enjoy programming computers, you are in a very > fortunate > > > minority > > > > > of > > > > > > > people who can make a great living doing work they enjoy. - > Joel > > > > > > > _______________________________________________ > > > > > > > Wtr-general mailing list > > > > > > > Wtr-general at rubyforge.org > > > > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > "http://ruby-lang.org -- do you ruby?" > > > > > > > > > > > > Jeff Wood > > > > > > > > > > > > _______________________________________________ > > > > > > Wtr-general mailing list > > > > > > Wtr-general at rubyforge.org > > > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > If you enjoy programming computers, you are in a very fortunate > > minority > > > of > > > > > people who can make a great living doing work they enjoy. - Joel > > > > > _______________________________________________ > > > > > Wtr-general mailing list > > > > > Wtr-general at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > "http://ruby-lang.org -- do you ruby?" > > > > > > > > Jeff Wood > > > > > > > > _______________________________________________ > > > > Wtr-general mailing list > > > > Wtr-general at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > > > > -- > > > If you enjoy programming computers, you are in a very fortunate > minority of > > > people who can make a great living doing work they enjoy. - Joel > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > > >-- > >"http://ruby-lang.org -- do you ruby?" > > > >Jeff Wood > > > >_______________________________________________ > >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 > -- If you enjoy programming computers, you are in a very fortunate minority of people who can make a great living doing work they enjoy. - Joel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050929/15ef6481/attachment.html From ashetty at velozglobal.com Fri Sep 30 03:21:52 2005 From: ashetty at velozglobal.com (Amita Shetty) Date: Fri, 30 Sep 2005 02:21:52 -0500 Subject: [Wtr-general] Is there a way to select items in the selectlistbased on their position? Message-ID: <48966054EF494649A988314F1C83077323B801@DC1Mail01> Thanks a lot.... I used getAllContents method and array index for iterations.It worked fine. -----Original Message----- From: wtr-general-bounces at rubyforge.org on behalf of Iain Rose Sent: Wed 9/28/2005 9:08 PM To: wtr-general at rubyforge.org Cc: Subject: Re: [Wtr-general] Is there a way to select items in the selectlistbased on their position? There's a command you can use to return the entire contents of a select box as an array. I don't have access to the API right now but I think it's called ie.select_list.selectall or something similar. Once you have the contents of the selectbox as an array, you can get the length of the array and set a loop to iterate the same amount of times. Each time you loop you just get the next value of the array based on it's index and use the value to select an item from the select box. Sorry I can't give you any example code but the approach should work. On 28/09/05, Cain, Mark wrote: I had a similar problem, a set of dropdowns whose values are determined by whatever is previously selected in the preceding dropdown. Mine happened to be in a new window that was popped up but the principle is the same. What I needed to do was look at the 'View Source' for the page and determine what the potential values were for a given selection, and then code my example accordingly. E.g. For dropdown A, if I select A1 then the possible options fro dropdown B are B1, B2, B3, etc. And if B2 is selected from dropdown B then the possible values for dropdown C are C4, C5, C7, etc. and so on. Here is the code I used... cw = IE.attach(:title, /PER Causal Code Management/i) cw.selectBox(:index, 1).select(/A1/) cw.selectBox(:index, 3).select(/B1/) cw.selectBox(:index, 12).select(/C01/) cw.button(:caption,"Add Causal Codes").click cw.button("Close Window").click A matrix for this would be pretty ugly for more than 3 dropdown with many values each, but it might save some time in the long run to do it. It would look something like this: A1 B1 C1 C4 C5 B3 C2 C7 B5 C3 C6 C8 A2 B2 C9 C10 B4 C11 C12 Hope this helps answer your question. --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Amita Shetty Sent: Tuesday, September 27, 2005 10:37 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Is there a way to select items in the select listbased on their position? Hi, Is there a way to select items in the select list based on their position? one way is: ie.select_list(:name,"NAME").select_value(/2/) Since the items in the select list are added dynamically based on the selection in the previous Select list, its value is not known priorly.So I am not able to do that way.. I want to write a test case such that in the first iteration, first item in the list is selected, in the second iteration second item is selected and so on. Thanks in advance, Amitha.. _______________________________________________ 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 13242 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050930/907e580c/attachment.bin From kononovichma at yahoo.com Fri Sep 30 04:50:39 2005 From: kononovichma at yahoo.com (Max Kononovich) Date: Fri, 30 Sep 2005 12:50:39 +0400 (MSD) Subject: [Wtr-general] Problem with clicking on the buttons of confirmation buttons Message-ID: <20050930085039.98932.qmail@web35710.mail.mud.yahoo.com> Hello, Firstly I use the following structure require 'watir/WindowHelper' #and then $helper = WindowHelper.new $ie.link(:url, /menu_delete/).click $helper.push_confirm_button_ok() But the helper didn't click on the message from the first time. Then you propose to paste $helper.push_confirm_button_ok() before the $ie.link(:url, /menu_delete/).click In this case the link doesn't click at all - helper waits for a cofirmation. So it doesn't help. Could you please propose somthing else. Thanks, Max Вы уже с Yahoo!? Испытайте обновленную и улучшенную Yahoo! Почту! http://ru.mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050930/dd833616/attachment.html From kononovichma at yahoo.com Fri Sep 30 05:02:06 2005 From: kononovichma at yahoo.com (Max Kononovich) Date: Fri, 30 Sep 2005 13:02:06 +0400 (MSD) Subject: [Wtr-general] Please help to get the item id Message-ID: <20050930090206.46400.qmail@web35712.mail.mud.yahoo.com> Hello, Is anybody know how to get digital id having the string "http://soft-bogomazov:88/admin/menus/add_item/?menu_id=14" I mean that I need for "14". It is very important for me. Please help. Thanks, Max --------------------------------- ?? ??? ? Yahoo!? ????????? ??????????? ? ?????????? Yahoo! ?????! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050930/24e85dec/attachment.html From angrez at gmail.com Fri Sep 30 05:45:20 2005 From: angrez at gmail.com (Angrez Singh) Date: Fri, 30 Sep 2005 15:15:20 +0530 Subject: [Wtr-general] Problem with clicking on the buttons of confirmation buttons In-Reply-To: <20050930085039.98932.qmail@web35710.mail.mud.yahoo.com> References: <20050930085039.98932.qmail@web35710.mail.mud.yahoo.com> Message-ID: Hi Max, Try this out like this: # This you should write in the script Thread.new { system("rubyw myclicker.rb") } $ie.link(:url, /menu_delete/).click Now create a new file called myclicker.rb require 'watir/WindowHelper' $helper = WindowHelper.new $helper.push_confirm_button_ok() Hope this helps, P.S.: You can change the name of the file from myclicker.rb but make sure both the names are same (the names shown in bold text). Regards, Angrez On 9/30/05, Max Kononovich wrote: > > Hello, > Firstly I use the following structure > require 'watir/WindowHelper' > #and then > $helper = WindowHelper.new > $ie.link(:url, /menu_delete/).click > $helper.push_confirm_button_ok() > But the helper didn't click on the message from the first time. Then you > propose to paste $helper.push_confirm_button_ok() > before the $ie.link(:url, /menu_delete/).click In this case the link > doesn't click at all - helper waits for a cofirmation. So it doesn't help. > Could you please propose somthing else. > Thanks, > Max > > ?? ??? ? Yahoo!? ????????? ??????????? ? ?????????? Yahoo! ?????! > http://ru.mail.yahoo.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050930/06621156/attachment.html From angrez at gmail.com Fri Sep 30 05:52:31 2005 From: angrez at gmail.com (Angrez Singh) Date: Fri, 30 Sep 2005 15:22:31 +0530 Subject: [Wtr-general] Please help to get the item id In-Reply-To: <20050930090206.46400.qmail@web35712.mail.mud.yahoo.com> References: <20050930090206.46400.qmail@web35712.mail.mud.yahoo.com> Message-ID: Hi Max, Try this, str = "http://soft-bogomazov:88/admin/menus/add_item/?menu_id=14" str =~ /.\?menu_id=(\d*)/ puts $1 this should return 14 Regards, Angrez On 9/30/05, Max Kononovich wrote: > > Hello, > Is anybody know how to get digital id having the string > "http://soft-bogomazov:88/admin/menus/add_item/?menu_id=14" > I mean that I need for "14". It is very important for me. Please help. > Thanks, > Max > > ------------------------------ > ?? ??? ? Yahoo!? > ????????? ??????????? ? ?????????? Yahoo! ?????! > > > > _______________________________________________ > 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/20050930/9b45cd0a/attachment.html From kononovichma at yahoo.com Fri Sep 30 06:49:49 2005 From: kononovichma at yahoo.com (Max Kononovich) Date: Fri, 30 Sep 2005 14:49:49 +0400 (MSD) Subject: [Wtr-general] How to use the log4r.rb Message-ID: <20050930104949.8602.qmail@web35704.mail.mud.yahoo.com> Hello, Please, tell me how to use log4r.rb for writting logs into file. The example on site http://log4r.sourceforge.net/ doesn't work. Thanks, Max --------------------------------- ?? ??? ? Yahoo!? ????????? ??????????? ? ?????????? Yahoo! ?????! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050930/fb47a3c1/attachment.html From joe.yakich at eplanservices.com Fri Sep 30 16:53:51 2005 From: joe.yakich at eplanservices.com (Joe Yakich) Date: Fri, 30 Sep 2005 14:53:51 -0600 Subject: [Wtr-general] How do I save a web page from a test run (attempt using Win32API)? Message-ID: <006b01c5c601$106e7af0$3601010a@eplansrvcs.com> Everyone, Canoo WebTest has a nice feature whereby the HTML pages of the application under test are saved for viewing later, which is very handy when a test case fails. So, I went looking for something similar in Rubyland, and ran across this posting. http://rubyforge.org/pipermail/win32utils-devel/2005-April/000358.html With some modification (since I want to save the HTML, not get a screen print), I came up with the following code that doesn't quite work. As a bonus, it somehow hoses Windows (DOS command windows become gigantic and non-functional, keyboard input no longer functions, etc.) Any Win32 experts see what I've left out? Thanks in advance! Joe class SaveWebPage require 'Win32API' def initialize @KEYEVENTF_KEYUP = 0x2 @SW_HIDE = 0 @SW_SHOW = 5 @SW_SHOWNORMAL = 1 @VK_CONTROL = 0x11 @VK_F4 = 0x73 @VK_MENU = 0x12 @VK_RETURN = 0x0D @VK_SHIFT = 0x10 @VK_SNAPSHOT = 0x2C @VK_TAB = 0x09 end # Use IE's "save page as" menu selection (Alt, F, A, S) def save_page keybd_event = Win32API.new("user32", "keybd_event", ['I','I','L','L'], 'V') vkKeyScan = Win32API.new("user32", "VkKeyScan", ['I'], 'I') keybd_event.Call(@VK_MENU, 1, 0, 0) keybd_event.Call(vkKeyScan.Call(?F), 1, 0, 0) keybd_event.Call(vkKeyScan.Call(?A), 1, 0, 0) keybd_event.Call(vkKeyScan.Call(?S), 1, 0, 0) end end From jeff.darklight at gmail.com Fri Sep 30 17:00:24 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Fri, 30 Sep 2005 14:00:24 -0700 Subject: [Wtr-general] How do I save a web page from a test run (attempt using Win32API)? In-Reply-To: <006b01c5c601$106e7af0$3601010a@eplansrvcs.com> References: <006b01c5c601$106e7af0$3601010a@eplansrvcs.com> Message-ID: There is also the AutoIT active x control that is currently installed with WATiR that should give you similar ability to grab a window by title, and then send keystrokes to it ... and I know it to work. Of course, I do believe that Bret is working to remove the AutoIT stuff from the distribution, but it is available to you now. I hope that helps. Documentation & such are all available online ... j. On 9/30/05, Joe Yakich wrote: > > Everyone, > > Canoo WebTest has a nice feature whereby the HTML pages of the application > under test are saved for viewing later, which is very handy when a test > case > fails. > > So, I went looking for something similar in Rubyland, and ran across this > posting. > > http://rubyforge.org/pipermail/win32utils-devel/2005-April/000358.html > > With some modification (since I want to save the HTML, not get a screen > print), I came up with the following code that doesn't quite work. As a > bonus, it somehow hoses Windows (DOS command windows become gigantic and > non-functional, keyboard input no longer functions, etc.) > > Any Win32 experts see what I've left out? > > Thanks in advance! > > Joe > > > > class SaveWebPage > require 'Win32API' > > def initialize > @KEYEVENTF_KEYUP = 0x2 > @SW_HIDE = 0 > @SW_SHOW = 5 > @SW_SHOWNORMAL = 1 > @VK_CONTROL = 0x11 > @VK_F4 = 0x73 > @VK_MENU = 0x12 > @VK_RETURN = 0x0D > @VK_SHIFT = 0x10 > @VK_SNAPSHOT = 0x2C > @VK_TAB = 0x09 > end > > # Use IE's "save page as" menu selection (Alt, F, A, S) > def save_page > keybd_event = Win32API.new("user32", "keybd_event", ['I','I','L','L'], > 'V') > vkKeyScan = Win32API.new("user32", "VkKeyScan", ['I'], 'I') > > keybd_event.Call(@VK_MENU, 1, 0, 0) > keybd_event.Call(vkKeyScan.Call(?F), 1, 0, 0) > keybd_event.Call(vkKeyScan.Call(?A), 1, 0, 0) > keybd_event.Call(vkKeyScan.Call(?S), 1, 0, 0) > end > end > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "http://ruby-lang.org -- do you ruby?" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050930/e56dae35/attachment.html From Sean.Gallagher at ticketmaster.com Fri Sep 30 17:07:01 2005 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Fri, 30 Sep 2005 14:07:01 -0700 Subject: [Wtr-general] How do I save a web page from a test run (attem pt using Win32API)? Message-ID: <71D28C8451BFD5119B2B00508BE26E6409E11B95@pasmail3.office.tmcs> If all you want is the html, why not just get the html using watir? pagehtml = ie.html -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Joe Yakich Sent: Friday, September 30, 2005 1:54 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] How do I save a web page from a test run (attempt using Win32API)? Everyone, Canoo WebTest has a nice feature whereby the HTML pages of the application under test are saved for viewing later, which is very handy when a test case fails. So, I went looking for something similar in Rubyland, and ran across this posting. http://rubyforge.org/pipermail/win32utils-devel/2005-April/000358.html With some modification (since I want to save the HTML, not get a screen print), I came up with the following code that doesn't quite work. As a bonus, it somehow hoses Windows (DOS command windows become gigantic and non-functional, keyboard input no longer functions, etc.) Any Win32 experts see what I've left out? Thanks in advance! Joe class SaveWebPage require 'Win32API' def initialize @KEYEVENTF_KEYUP = 0x2 @SW_HIDE = 0 @SW_SHOW = 5 @SW_SHOWNORMAL = 1 @VK_CONTROL = 0x11 @VK_F4 = 0x73 @VK_MENU = 0x12 @VK_RETURN = 0x0D @VK_SHIFT = 0x10 @VK_SNAPSHOT = 0x2C @VK_TAB = 0x09 end # Use IE's "save page as" menu selection (Alt, F, A, S) def save_page keybd_event = Win32API.new("user32", "keybd_event", ['I','I','L','L'], 'V') vkKeyScan = Win32API.new("user32", "VkKeyScan", ['I'], 'I') keybd_event.Call(@VK_MENU, 1, 0, 0) keybd_event.Call(vkKeyScan.Call(?F), 1, 0, 0) keybd_event.Call(vkKeyScan.Call(?A), 1, 0, 0) keybd_event.Call(vkKeyScan.Call(?S), 1, 0, 0) end end _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From christopher.mcmahon at gmail.com Fri Sep 30 17:10:00 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 30 Sep 2005 16:10:00 -0500 Subject: [Wtr-general] How do I save a web page from a test run (attempt using Win32API)? In-Reply-To: <006b01c5c601$106e7af0$3601010a@eplansrvcs.com> References: <006b01c5c601$106e7af0$3601010a@eplansrvcs.com> Message-ID: <72799cd70509301410q4377343cufcabc44ee31772ba@mail.gmail.com> > Canoo WebTest has a nice feature whereby the HTML pages of the application > under test are saved for viewing later, which is very handy when a test case > fails. Why not if "#{test_passed}" puts "Yay!" else puts ie.getHTML end ? -Chris From bret at pettichord.com Fri Sep 30 17:10:29 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 30 Sep 2005 16:10:29 -0500 Subject: [Wtr-general] How do I save a web page from a test run (attempt using Win32API)? In-Reply-To: <006b01c5c601$106e7af0$3601010a@eplansrvcs.com> Message-ID: <5.1.0.14.2.20050930160756.023b5f28@127.0.0.1> Try this instead: ie.ie.document.body.parentelement.outerhtml By rights, ie.html should give you what you want, but it actually only includes the body of the document. I think this is a bug and am inclined to replace it with the former. Comments? Bret At 03:53 PM 9/30/2005, Joe Yakich wrote: >Everyone, > >Canoo WebTest has a nice feature whereby the HTML pages of the application >under test are saved for viewing later, which is very handy when a test case >fails. > >So, I went looking for something similar in Rubyland, and ran across this >posting. > >http://rubyforge.org/pipermail/win32utils-devel/2005-April/000358.html > >With some modification (since I want to save the HTML, not get a screen >print), I came up with the following code that doesn't quite work. As a >bonus, it somehow hoses Windows (DOS command windows become gigantic and >non-functional, keyboard input no longer functions, etc.) > >Any Win32 experts see what I've left out? > >Thanks in advance! > >Joe > > > >class SaveWebPage > require 'Win32API' > > def initialize > @KEYEVENTF_KEYUP = 0x2 > @SW_HIDE = 0 > @SW_SHOW = 5 > @SW_SHOWNORMAL = 1 > @VK_CONTROL = 0x11 > @VK_F4 = 0x73 > @VK_MENU = 0x12 > @VK_RETURN = 0x0D > @VK_SHIFT = 0x10 > @VK_SNAPSHOT = 0x2C > @VK_TAB = 0x09 > end > > # Use IE's "save page as" menu selection (Alt, F, A, S) > def save_page > keybd_event = Win32API.new("user32", "keybd_event", ['I','I','L','L'], >'V') > vkKeyScan = Win32API.new("user32", "VkKeyScan", ['I'], 'I') > > keybd_event.Call(@VK_MENU, 1, 0, 0) > keybd_event.Call(vkKeyScan.Call(?F), 1, 0, 0) > keybd_event.Call(vkKeyScan.Call(?A), 1, 0, 0) > keybd_event.Call(vkKeyScan.Call(?S), 1, 0, 0) > end >end > > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From Sean.Gallagher at ticketmaster.com Fri Sep 30 17:17:59 2005 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Fri, 30 Sep 2005 14:17:59 -0700 Subject: [Wtr-general] How do I save a web page from a test run (attem pt using Win32API)? Message-ID: <71D28C8451BFD5119B2B00508BE26E6409E11B96@pasmail3.office.tmcs> +1 -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Friday, September 30, 2005 2:10 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How do I save a web page from a test run (attempt using Win32API)? Try this instead: ie.ie.document.body.parentelement.outerhtml By rights, ie.html should give you what you want, but it actually only includes the body of the document. I think this is a bug and am inclined to replace it with the former. Comments? Bret At 03:53 PM 9/30/2005, Joe Yakich wrote: >Everyone, > >Canoo WebTest has a nice feature whereby the HTML pages of the application >under test are saved for viewing later, which is very handy when a test case >fails. > >So, I went looking for something similar in Rubyland, and ran across this >posting. > >http://rubyforge.org/pipermail/win32utils-devel/2005-April/000358.html > >With some modification (since I want to save the HTML, not get a screen >print), I came up with the following code that doesn't quite work. As a >bonus, it somehow hoses Windows (DOS command windows become gigantic and >non-functional, keyboard input no longer functions, etc.) > >Any Win32 experts see what I've left out? > >Thanks in advance! > >Joe > > > >class SaveWebPage > require 'Win32API' > > def initialize > @KEYEVENTF_KEYUP = 0x2 > @SW_HIDE = 0 > @SW_SHOW = 5 > @SW_SHOWNORMAL = 1 > @VK_CONTROL = 0x11 > @VK_F4 = 0x73 > @VK_MENU = 0x12 > @VK_RETURN = 0x0D > @VK_SHIFT = 0x10 > @VK_SNAPSHOT = 0x2C > @VK_TAB = 0x09 > end > > # Use IE's "save page as" menu selection (Alt, F, A, S) > def save_page > keybd_event = Win32API.new("user32", "keybd_event", ['I','I','L','L'], >'V') > vkKeyScan = Win32API.new("user32", "VkKeyScan", ['I'], 'I') > > keybd_event.Call(@VK_MENU, 1, 0, 0) > keybd_event.Call(vkKeyScan.Call(?F), 1, 0, 0) > keybd_event.Call(vkKeyScan.Call(?A), 1, 0, 0) > keybd_event.Call(vkKeyScan.Call(?S), 1, 0, 0) > end >end > > > > >_______________________________________________ >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 Fri Sep 30 17:21:19 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Sat, 01 Oct 2005 02:51:19 +0530 Subject: [Wtr-general] How do I save a web page from a test run (attem pt using Win32API)? In-Reply-To: <71D28C8451BFD5119B2B00508BE26E6409E11B95@pasmail3.office.tmcs> References: <71D28C8451BFD5119B2B00508BE26E6409E11B95@pasmail3.office.tmcs> Message-ID: <433DAC4F.2030009@qantom.com> Sean Gallagher wrote: >If all you want is the html, why not just get the html using watir? > > Will work if page is plain html. But since most of today's web applications use css, frames,images, etc., the resulting page may not be what you actually see. >pagehtml = ie.html > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Joe Yakich >Sent: Friday, September 30, 2005 1:54 PM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] How do I save a web page from a test run (attempt >using Win32API)? > >Everyone, > >Canoo WebTest has a nice feature whereby the HTML pages of the application >under test are saved for viewing later, which is very handy when a test case >fails. > >So, I went looking for something similar in Rubyland, and ran across this >posting. > >http://rubyforge.org/pipermail/win32utils-devel/2005-April/000358.html > >With some modification (since I want to save the HTML, not get a screen >print), I came up with the following code that doesn't quite work. As a >bonus, it somehow hoses Windows (DOS command windows become gigantic and >non-functional, keyboard input no longer functions, etc.) > >Any Win32 experts see what I've left out? > >Thanks in advance! > >Joe > > > >class SaveWebPage > require 'Win32API' > > def initialize > @KEYEVENTF_KEYUP = 0x2 > @SW_HIDE = 0 > @SW_SHOW = 5 > @SW_SHOWNORMAL = 1 > @VK_CONTROL = 0x11 > @VK_F4 = 0x73 > @VK_MENU = 0x12 > @VK_RETURN = 0x0D > @VK_SHIFT = 0x10 > @VK_SNAPSHOT = 0x2C > @VK_TAB = 0x09 > end > > # Use IE's "save page as" menu selection (Alt, F, A, S) > def save_page > keybd_event = Win32API.new("user32", "keybd_event", ['I','I','L','L'], >'V') > vkKeyScan = Win32API.new("user32", "VkKeyScan", ['I'], 'I') > > keybd_event.Call(@VK_MENU, 1, 0, 0) > keybd_event.Call(vkKeyScan.Call(?F), 1, 0, 0) > keybd_event.Call(vkKeyScan.Call(?A), 1, 0, 0) > keybd_event.Call(vkKeyScan.Call(?S), 1, 0, 0) > end >end > > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > From joe.yakich at eplanservices.com Fri Sep 30 17:31:47 2005 From: joe.yakich at eplanservices.com (Joe Yakich) Date: Fri, 30 Sep 2005 15:31:47 -0600 Subject: [Wtr-general] How do I save a web page from a test run Message-ID: <009501c5c606$5cb3fc50$3601010a@eplansrvcs.com> >Date: Fri, 30 Sep 2005 14:07:01 -0700 >From: Sean Gallagher >Subject: Re: [Wtr-general] How do I save a web page from a test run > (attem pt using Win32API)? > >If all you want is the html, why not just get the html using watir? > >pagehtml = ie.html Well, I was hoping to grab the entire page, including graphics, etc., just as IE does. Joe From raghu at qantom.com Fri Sep 30 17:48:19 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Sat, 01 Oct 2005 03:18:19 +0530 Subject: [Wtr-general] How do I save a web page from a test run (attem pt using Win32API)? In-Reply-To: <71D28C8451BFD5119B2B00508BE26E6409E11B96@pasmail3.office.tmcs> References: <71D28C8451BFD5119B2B00508BE26E6409E11B96@pasmail3.office.tmcs> Message-ID: <433DB2A2.9030007@qantom.com> +1 Sean Gallagher wrote: >+1 > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord >Sent: Friday, September 30, 2005 2:10 PM >To: wtr-general at rubyforge.org >Subject: Re: [Wtr-general] How do I save a web page from a test run (attempt >using Win32API)? > >Try this instead: ie.ie.document.body.parentelement.outerhtml > >By rights, ie.html should give you what you want, but it actually only >includes the body of the document. I think this is a bug and am inclined to >replace it with the former. Comments? > >Bret > >At 03:53 PM 9/30/2005, Joe Yakich wrote: > > >>Everyone, >> >>Canoo WebTest has a nice feature whereby the HTML pages of the application >>under test are saved for viewing later, which is very handy when a test >> >> >case > > >>fails. >> >>So, I went looking for something similar in Rubyland, and ran across this >>posting. >> >>http://rubyforge.org/pipermail/win32utils-devel/2005-April/000358.html >> >>With some modification (since I want to save the HTML, not get a screen >>print), I came up with the following code that doesn't quite work. As a >>bonus, it somehow hoses Windows (DOS command windows become gigantic and >>non-functional, keyboard input no longer functions, etc.) >> >>Any Win32 experts see what I've left out? >> >>Thanks in advance! >> >>Joe >> >> >> >>class SaveWebPage >> require 'Win32API' >> >> def initialize >> @KEYEVENTF_KEYUP = 0x2 >> @SW_HIDE = 0 >> @SW_SHOW = 5 >> @SW_SHOWNORMAL = 1 >> @VK_CONTROL = 0x11 >> @VK_F4 = 0x73 >> @VK_MENU = 0x12 >> @VK_RETURN = 0x0D >> @VK_SHIFT = 0x10 >> @VK_SNAPSHOT = 0x2C >> @VK_TAB = 0x09 >> end >> >> # Use IE's "save page as" menu selection (Alt, F, A, S) >> def save_page >> keybd_event = Win32API.new("user32", "keybd_event", ['I','I','L','L'], >>'V') >> vkKeyScan = Win32API.new("user32", "VkKeyScan", ['I'], 'I') >> >> keybd_event.Call(@VK_MENU, 1, 0, 0) >> keybd_event.Call(vkKeyScan.Call(?F), 1, 0, 0) >> keybd_event.Call(vkKeyScan.Call(?A), 1, 0, 0) >> keybd_event.Call(vkKeyScan.Call(?S), 1, 0, 0) >> end >>end >> >> >> >> >>_______________________________________________ >>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 > > >