From wangjun at neusoft.com Tue Nov 1 01:06:29 2005 From: wangjun at neusoft.com (JamesWang) Date: Tue, 01 Nov 2005 14:06:29 +0800 Subject: [Wtr-general] The problem about method logon of WindowHelper Message-ID: <008d01c5deaa$6647b830$3824a8c0@jameswangneu> Hi, The example WindowLogonExample.rb with watir 1.4 can't work in my computer. I think the problem is in the code of WindowLogonExtra.rb of below: helper = WindowHelper.new helper.logon('Connect to clio.lyris.com') there should be three parameters in method logon of WindowHelper as declared in WindowHelper.rb def logon(title,name = 'john doe',password = 'john doe') @autoit.WinWait title, "" @autoit.Send name @autoit.Send "{TAB}" @autoit.Send password @autoit.Send "{ENTER}" end Why is there only title defined in WindowLogonExtra.rb? Why the title is "Connect to clio.lyris.com" instead of "Enter Network Password"? Thanks in advance and best regards! James From theebh at gmail.com Tue Nov 1 10:43:21 2005 From: theebh at gmail.com (boonhoo) Date: Tue, 1 Nov 2005 23:43:21 +0800 Subject: [Wtr-general] Preceding text of textfield Message-ID: <158e6acb0511010743r10dab3c6o2f7ab1d5a1818ee1@mail.gmail.com> Hi, is it possible to obtain the preceding text of a textfield in Watir? For e.g. consider this html - username : I would like to obtain the string 'username' that appear before the textfield. Thanks! Regards boonhoo From john.lloydjones at gmail.com Tue Nov 1 12:10:17 2005 From: john.lloydjones at gmail.com (John Lloyd-Jones) Date: Tue, 1 Nov 2005 09:10:17 -0800 Subject: [Wtr-general] Preceding text of textfield In-Reply-To: <158e6acb0511010743r10dab3c6o2f7ab1d5a1818ee1@mail.gmail.com> References: <158e6acb0511010743r10dab3c6o2f7ab1d5a1818ee1@mail.gmail.com> Message-ID: <6fcd26f10511010910t21f29c92t6577b010a4b71f7@mail.gmail.com> For the example you provide, the string you want is a text node. Watir doesn't really support this very well. I do note that internally, Watir does use the method "getAdjacentText" to get preceding (object.getAdjacentText("beforeBegin")) or following (object.getAdjacentText("afterEnd")) text. The object is the Element's OLE object (use getOLEObject to get it). The draw-back is that this stuff might change in later versions (See the comment for getOLEObject which suggests that it will be "renamed appropriately"). Use with care. John On 11/1/05, boonhoo wrote: > > Hi, is it possible to obtain the preceding text of a textfield in > Watir? For e.g. consider this html - > > username : > > I would like to obtain the string 'username' that appear before the > textfield. Thanks! > > Regards > boonhoo > > _______________________________________________ > 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/20051101/ab3a4d10/attachment.html From christopher.mcmahon at gmail.com Tue Nov 1 12:28:16 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 1 Nov 2005 11:28:16 -0600 Subject: [Wtr-general] Preceding text of textfield In-Reply-To: <158e6acb0511010743r10dab3c6o2f7ab1d5a1818ee1@mail.gmail.com> References: <158e6acb0511010743r10dab3c6o2f7ab1d5a1818ee1@mail.gmail.com> Message-ID: <72799cd70511010928k7e4b6e30y8a81c49739108609@mail.gmail.com> On 11/1/05, boonhoo wrote: > Hi, is it possible to obtain the preceding text of a textfield in > Watir? For e.g. consider this html - > > username : > > I would like to obtain the string 'username' that appear before the > textfield. Thanks! Here's a Perlish sort of approach: ################################33 string = "username : " string =~ /:/ before = $` match = $& after = $' puts before puts after ################# Hope that helps. From bret at pettichord.com Tue Nov 1 13:22:45 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 01 Nov 2005 12:22:45 -0600 Subject: [Wtr-general] Preceding text of textfield In-Reply-To: <158e6acb0511010743r10dab3c6o2f7ab1d5a1818ee1@mail.gmail.co m> Message-ID: <5.1.0.14.2.20051101122053.036c7698@pop.gmail.com> At 09:43 AM 11/1/2005, boonhoo wrote: >Hi, is it possible to obtain the preceding text of a textfield in >Watir? For e.g. consider this html - > >username : > >I would like to obtain the string 'username' that appear before the >textfield. Thanks! try ie.text_field(:beforeText, 'username') _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Nov 1 13:27:02 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 01 Nov 2005 12:27:02 -0600 Subject: [Wtr-general] MAP and AREA tags... In-Reply-To: <656F1E1AF2CF664AB5A82AB678EBD81D02AA3B04@TCMAIL1.tcpl.ca> Message-ID: <5.1.0.14.2.20051101122558.0373a6d8@pop.gmail.com> At 02:50 PM 10/31/2005, Gary Maxwell wrote: >I have some html web pages that use the html tags MAP and AREA. Is there >a way in watir to access and click these types of tags? Watir can be extended to support any tag. Look at how we support Spans. Because Ruby is dynamic, you can add methods to existing classes. You don't actually have to edit the watir.rb file. Bret _____________________ Bret Pettichord www.pettichord.com From john.lloydjones at gmail.com Tue Nov 1 13:47:06 2005 From: john.lloydjones at gmail.com (John Lloyd-Jones) Date: Tue, 1 Nov 2005 10:47:06 -0800 Subject: [Wtr-general] Preceding text of textfield In-Reply-To: <5.1.0.14.2.20051101122053.036c7698@pop.gmail.com> References: <5.1.0.14.2.20051101122053.036c7698@pop.gmail.com> Message-ID: <6fcd26f10511011047k77e00413jb3d8984d5fad02a8@mail.gmail.com> Bret That's the right way if you know the preceding text. If I understood the original question correctly, the aim was to find the (possibly unknown) text preceding a known text input field. John On 11/1/05, Bret Pettichord wrote: > > At 09:43 AM 11/1/2005, boonhoo wrote: > >Hi, is it possible to obtain the preceding text of a textfield in > >Watir? For e.g. consider this html - > > > >username : > > > >I would like to obtain the string 'username' that appear before the > >textfield. Thanks! > > try ie.text_field(:beforeText, 'username') > > > _____________________ > 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/20051101/947534c8/attachment.html From bret at pettichord.com Tue Nov 1 15:37:27 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 01 Nov 2005 14:37:27 -0600 Subject: [Wtr-general] Preceding text of textfield In-Reply-To: <6fcd26f10511011047k77e00413jb3d8984d5fad02a8@mail.gmail.co m> References: <5.1.0.14.2.20051101122053.036c7698@pop.gmail.com> <5.1.0.14.2.20051101122053.036c7698@pop.gmail.com> Message-ID: <5.1.0.14.2.20051101143621.037c6c08@pop.gmail.com> At 12:47 PM 11/1/2005, John Lloyd-Jones wrote: >That's the right way if you know the preceding text. If I understood the >original question correctly, the aim was to find the (possibly unknown) >text preceding a known text input field. My mistake. In HEAD, this can be done as ie.text_field(:name, "whatever").before_text Bret _____________________ Bret Pettichord www.pettichord.com From lsusilo at rsasecurity.com Tue Nov 1 16:08:21 2005 From: lsusilo at rsasecurity.com (Susilo, Laudhi) Date: Tue, 1 Nov 2005 13:08:21 -0800 Subject: [Wtr-general] Accessing IE toolbar Message-ID: <2548B245CD5B9D45AC32CF3889D2E6D0028C20A2@rsana-ex-va1.NA.RSA.NET> Hi, I know that Watir provides some functions to control IE menus such as refresh, maximize, etc. I was wondering whether it is possible to extend the control to third party toolbars such as Google or Yahoo toolbar. Is there a way to programmatically control those toolbars? Thanks, Laudhi -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of boonhoo Sent: Tuesday, November 01, 2005 7:43 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Preceding text of textfield Hi, is it possible to obtain the preceding text of a textfield in Watir? For e.g. consider this html - username : I would like to obtain the string 'username' that appear before the textfield. Thanks! Regards boonhoo _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From john.lloydjones at gmail.com Tue Nov 1 18:02:03 2005 From: john.lloydjones at gmail.com (John Lloyd-Jones) Date: Tue, 1 Nov 2005 15:02:03 -0800 Subject: [Wtr-general] Preceding text of textfield In-Reply-To: <5.1.0.14.2.20051101143621.037c6c08@pop.gmail.com> References: <5.1.0.14.2.20051101122053.036c7698@pop.gmail.com> <5.1.0.14.2.20051101143621.037c6c08@pop.gmail.com> Message-ID: <6fcd26f10511011502q67a7cb54u671f628fc5b28f@mail.gmail.com> Splendid. On 11/1/05, Bret Pettichord wrote: > > At 12:47 PM 11/1/2005, John Lloyd-Jones wrote: > >That's the right way if you know the preceding text. If I understood the > >original question correctly, the aim was to find the (possibly unknown) > >text preceding a known text input field. > > My mistake. In HEAD, this can be done as > > ie.text_field(:name, "whatever").before_text > > Bret > > _____________________ > 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/20051101/d8040616/attachment.html From spammer.sbt at gmail.com Tue Nov 1 18:07:56 2005 From: spammer.sbt at gmail.com (SPAMMER.ME) Date: Tue, 1 Nov 2005 15:07:56 -0800 Subject: [Wtr-general] The problem about method logon of WindowHelper References: <008d01c5deaa$6647b830$3824a8c0@jameswangneu> Message-ID: <004f01c5df39$18970ed0$6bb0a042@corp.lyris.com> Hi James, I'm kinda new at Watir and i was looking at the same WindowLogonExtra.rb example last week. >>> def logon(title,name = 'john doe',password = 'john doe') Means that if the 'name' and 'password' variables are not passed in, use the default values of 'john doe' and 'john doe'. That is what is happening in WindowLogonExtra.rb. > Why the title is "Connect to clio.lyris.com" instead of "Enter Network > Password"? The title needs to match the frame caption of the logon window. In the example, the page we are pointing to contains the caption "Connect to clio....". For your usage you'll have to figure out the caption of the page you are trying to login to. Hope that helps. Steve ----- Original Message ----- From: "JamesWang" To: Sent: Monday, October 31, 2005 10:06 PM Subject: [Wtr-general] The problem about method logon of WindowHelper > Hi, > The example WindowLogonExample.rb with watir 1.4 can't work in my > computer. > I think the problem is in the code of WindowLogonExtra.rb of below: > > helper = WindowHelper.new > helper.logon('Connect to clio.lyris.com') > > there should be three parameters in method logon of WindowHelper as > declared > in WindowHelper.rb > > def logon(title,name = 'john doe',password = 'john doe') > @autoit.WinWait title, "" > @autoit.Send name > @autoit.Send "{TAB}" > @autoit.Send password > @autoit.Send "{ENTER}" > end > > Why is there only title defined in WindowLogonExtra.rb? > Why the title is "Connect to clio.lyris.com" instead of "Enter Network > Password"? > > Thanks in advance and best regards! > > James > > -------------------------------------------------------------------------------- > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From roy_sin at yahoo.com Tue Nov 1 19:56:11 2005 From: roy_sin at yahoo.com (Roy Sin) Date: Tue, 1 Nov 2005 16:56:11 -0800 (PST) Subject: [Wtr-general] I'm still unable to click Ok on a confirmation javascript popup Message-ID: <20051102005611.8028.qmail@web52911.mail.yahoo.com> Hi wtr lists I have tried a few options like WinClicker, and the jscript_test in the unittests examples but I couldn't get it to work. Now I'm invoking autoIt from my Watir script. Description: I click a delete asset icon which brings up a javascript popup with the title "Microsoft Internet Explorer" and with the text "Are you sure you want to delete this asset?". The popup has two buttons: Ok and Cancel. This is what i have at the top of my script require 'win32ole' autoit = WIN32OLE.new('AutoItX3.Control') ... and to click the Ok button on the popup I have autoit.ControlGetFocus "Microsoft Internet Explorer", "Are you sure you want to delete this asset?" autoit.ControlClick "Microsoft Internet Explorer", "Ok", "1", "left", 1 but my Watir script just hangs there without throwing any errors. thanks __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com From theebh at gmail.com Tue Nov 1 20:06:26 2005 From: theebh at gmail.com (boonhoo) Date: Wed, 2 Nov 2005 09:06:26 +0800 Subject: [Wtr-general] Preceding text of textfield In-Reply-To: <5.1.0.14.2.20051101143621.037c6c08@pop.gmail.com> References: <5.1.0.14.2.20051101122053.036c7698@pop.gmail.com> <5.1.0.14.2.20051101143621.037c6c08@pop.gmail.com> Message-ID: <158e6acb0511011706pc7b6c3ck32707e8d21e4e08e@mail.gmail.com> great! I will try it later... i was toying with ie.document.forms(i).elements(i) and it doesn't seem to support the before_text() method. I will try this method on text_field.. My purpose is to find the preceding text to 'guess' what possible value to enter into the text field. Thanks eveyrone :) boonhoo On 11/2/05, Bret Pettichord wrote: > At 12:47 PM 11/1/2005, John Lloyd-Jones wrote: > >That's the right way if you know the preceding text. If I understood the > >original question correctly, the aim was to find the (possibly unknown) > >text preceding a known text input field. > > My mistake. In HEAD, this can be done as > > ie.text_field(:name, "whatever").before_text > > Bret > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From Tuyet.Ctn at mscibarra.com Tue Nov 1 20:18:28 2005 From: Tuyet.Ctn at mscibarra.com (Cong-Ton-Nu, Tuyet (MSCIBARRA)) Date: Tue, 1 Nov 2005 20:18:28 -0500 Subject: [Wtr-general] Architecting WATIR for a WEB application Message-ID: <937C75B544E7E8428436C67056A3A1730CC6DD@NYWEXMB83.msad.ms.com> What are some considerations that will help the planning and layout of WATIR architecture if you are to start from scratch to automate a WEB site? I would appreciate hearing from experienced WATIR users on what approaches you have chosen to structure/architect the way you use WATIR for your WEB application. Thanks. -------------------------------------------------------- NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051101/b0044ed6/attachment.html From jeff.darklight at gmail.com Tue Nov 1 20:25:25 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Tue, 1 Nov 2005 17:25:25 -0800 Subject: [Wtr-general] CookieManager::WatirHelper ... ??? In-Reply-To: <1678386167807c.167807c1678386@shaw.ca> References: <1678386167807c.167807c1678386@shaw.ca> Message-ID: I'm kinda surprised, with as well as so many other parts of watir are covered with test cases, this slipped by... It would be cool to simply add a small webrick script into the distro to actually have a web server to test some of this stuff with... j. On 10/31/05, Paul Rogers wrote: > > I recently went to use this and had problems too. I have a fix, I'll see > if I can get it in. Wont be this week though > > Paul > Content-Type: multipart/alternative; > boundary="----=_Part_4823_25613369.1130805182222" > > > ------=_Part_4823_25613369.1130805182222 > Content-Type: text/plain; charset=ISO-8859-1 > Content-Transfer-Encoding: quoted-printable > Content-Disposition: inline > > I went looking through the Unittests for Watir and I couldn't find one > testcase/example of use with the CookieManager. > So, I dug around a bit, and when I thought I'd figured it out, I'm getting > a "can't load Dir::Find" ... > Can anybody shed some light? > I'd like to clear my cookies ??? Is there an easy way? > j. > > -- > "http://ruby-lang.org -- do you ruby?" > > Jeff Wood > > ------=_Part_4823_25613369.1130805182222 > Content-Type: text/html; charset=ISO-8859-1 > Content-Transfer-Encoding: quoted-printable > Content-Disposition: inline > >
I went looking through the Unittests for Watir and I couldn't find > one= > testcase/example of use with the CookieManager.
>
 
>
So, I dug around a bit, and when I thought I'd figured it out, I'm > get= > ting a "can't load Dir::Find" ...
>
 
>
Can anybody shed some light?
>
 
>
I'd like to clear my cookies ??? Is there an easy way?
>
 
>
j.

--
" >= > http://ruby-lang.org -- do you ruby?"

Jeff Wood
> > ------=_Part_4823_25613369.1130805182222-- > > > _______________________________________________ > 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 > > > -- "http://ruby-lang.org -- do you ruby?" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051101/c1986e59/attachment.html From amithashettyb at yahoo.co.in Tue Nov 1 23:48:15 2005 From: amithashettyb at yahoo.co.in (Amitha Shetty) Date: Wed, 2 Nov 2005 04:48:15 +0000 (GMT) Subject: [Wtr-general] Text box gives an Alert Window when input is giventhrough Watir In-Reply-To: <5.1.0.14.2.20051028004451.03aa4058@pop.gmail.com> Message-ID: <20051102044815.62316.qmail@web8514.mail.in.yahoo.com> I tried $ie.text_field(:name, "NAME").o.value = '60000' But I got the following exception: undefined method `o' for # (NoMethodError) >Exit code: 1 Bret Pettichord wrote: At 12:17 AM 10/26/2005, Amitha Shetty wrote: >$ie.text_field(:name,"NAME").set('60000') also gives alert window but does >not throw any exception.On clicking 'Ok' on alert window, 6(first digit) >will be entered onto the text box followed by an alert window again for >the next digit. >This continues for all the digits of the number given as a string. Try $ie.text_field(:name, "NAME").o.value = '60000' _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051102/dad8e149/attachment.html From bret at pettichord.com Wed Nov 2 01:29:19 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 02 Nov 2005 00:29:19 -0600 Subject: [Wtr-general] CookieManager::WatirHelper ... ??? In-Reply-To: References: <1678386167807c.167807c1678386@shaw.ca> <1678386167807c.167807c1678386@shaw.ca> Message-ID: <5.1.0.14.2.20051102002458.03828df0@pop.gmail.com> At 07:25 PM 11/1/2005, Jeff Wood wrote: >I'm kinda surprised, with as well as so many other parts of watir are >covered with test cases, this slipped by... It didn't slip by. Someone wrote it and it seemed useful, so we added it to the distribution. However, you have to specifically require this (require 'watir/cookiemanager') to get it. I have wondered whether we shouldn't have a clearer way of separating the supported part of Watir from the random contributions. Especially, since we are in the process of beefing up the supported stuff. I'd appreciate any suggestions. We often get pleas for example code, so it would seem nasty to omit stuff like this just because it didn't have tests. Yet it obviously is misleading/surprising to include untested and possibly half-baked stuff like this in our library. Suggestions? >It would be cool to simply add a small webrick script into the distro to >actually have a web server to test some of this stuff with... We have a test in there somewhere (else) that does just this. Bret _____________________ Bret Pettichord www.pettichord.com From jeff.darklight at gmail.com Wed Nov 2 02:23:43 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Tue, 1 Nov 2005 23:23:43 -0800 Subject: [Wtr-general] CookieManager::WatirHelper ... ??? In-Reply-To: <5.1.0.14.2.20051102002458.03828df0@pop.gmail.com> References: <1678386167807c.167807c1678386@shaw.ca> <5.1.0.14.2.20051102002458.03828df0@pop.gmail.com> Message-ID: I had used require 'watir/cookiemanager' it's just when trying to use it I get a wierd error about not being able to find Dir::Find I'll send a copy later. Don't have it handy @ the moment. j. On 11/1/05, Bret Pettichord wrote: > > At 07:25 PM 11/1/2005, Jeff Wood wrote: > >I'm kinda surprised, with as well as so many other parts of watir are > >covered with test cases, this slipped by... > > It didn't slip by. Someone wrote it and it seemed useful, so we added it > to > the distribution. > > However, you have to specifically require this (require > 'watir/cookiemanager') to get it. > > I have wondered whether we shouldn't have a clearer way of separating the > supported part of Watir from the random contributions. Especially, since > we > are in the process of beefing up the supported stuff. > > I'd appreciate any suggestions. We often get pleas for example code, so it > would seem nasty to omit stuff like this just because it didn't have > tests. > Yet it obviously is misleading/surprising to include untested and possibly > half-baked stuff like this in our library. > > Suggestions? > > >It would be cool to simply add a small webrick script into the distro to > >actually have a web server to test some of this stuff with... > > We have a test in there somewhere (else) that does just this. > > Bret > > > _____________________ > Bret Pettichord > www.pettichord.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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051101/8bd28056/attachment.html From amithashettyb at yahoo.co.in Wed Nov 2 07:25:25 2005 From: amithashettyb at yahoo.co.in (Amitha Shetty) Date: Wed, 2 Nov 2005 12:25:25 +0000 (GMT) Subject: [Wtr-general] How to get Image Source from Excel Input file? Message-ID: <20051102122525.47836.qmail@web8506.mail.in.yahoo.com> Hi, I am getting Inputs from an Excel file for my test cases and its working fine for all except Image source. I tried: IMAGE = worksheet.range('b11')['Value'] and value in excel corresponding to Cell b11 is /icons2.gif/ $ie.image(:src,IMAGE).click gives the following exception- `assert_exists': Unable to locate object, using src and /icons2.gif/(Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2009:in `click' However if I hardcode the source it works fine.... i.e $ie.image(:src,/icons2.gif/).click clicks on the image. I think the problem is because input is read from excel as a string.How do I handle this? Thanks, Amitha --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051102/bdb51d78/attachment.html From zeljko.filipin at gmail.com Wed Nov 2 07:44:28 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 2 Nov 2005 13:44:28 +0100 Subject: [Wtr-general] How to get Image Source from Excel Input file? In-Reply-To: <20051102122525.47836.qmail@web8506.mail.in.yahoo.com> Message-ID: <001301c5dfab$2afb2170$c6e7fea9@officezg.wa> Enter icons2.gif in excel instead of /icons2.gif/. Then try this: IMAGE = worksheet.range('b11')['Value'] $ie.image(:src, /#{IMAGE}/).click Zeljko ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Amitha Shetty Sent: Wednesday, November 02, 2005 1:25 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] How to get Image Source from Excel Input file? Hi, I am getting Inputs from an Excel file for my test cases and its working fine for all except Image source. I tried: IMAGE = worksheet.range('b11')['Value'] and value in excel corresponding to Cell b11 is /icons2.gif/ $ie.image(:src,IMAGE).click gives the following exception- `assert_exists': Unable to locate object, using src and /icons2.gif/(Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2009:in `click' However if I hardcode the source it works fine.... i.e $ie.image(:src,/icons2.gif/).click clicks on the image. I think the problem is because input is read from excel as a string.How do I handle this? Thanks, Amitha ________________________________ Enjoy this Diwali with Y! India Click here From christopher.mcmahon at gmail.com Wed Nov 2 09:33:32 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 2 Nov 2005 08:33:32 -0600 Subject: [Wtr-general] Architecting WATIR for a WEB application In-Reply-To: <937C75B544E7E8428436C67056A3A1730CC6DD@NYWEXMB83.msad.ms.com> References: <937C75B544E7E8428436C67056A3A1730CC6DD@NYWEXMB83.msad.ms.com> Message-ID: <72799cd70511020633heb94bd3r64b74ee79ac5bbf6@mail.gmail.com> > What are some considerations that will help the planning and layout of WATIR > architecture if you are to start from scratch to automate a WEB site? I > would appreciate hearing from experienced WATIR users on what approaches you > have chosen to structure/architect the way you use WATIR for your WEB > application. Thanks. I suspect that the sophisticated Watir users on this list would tell you that the answer to your question depends on individual context. That is, every project is different. As a general principle, though, a lot of people suggest that your framework should be abstracted from your implementation. In other words: start solving problems; refactor; repeat; don't worry about architecture so much as you worry about solving the immediate problem-- your architecture will grow as your ability to solve problems does. As always, I'll cite Kevin Lawrence's March 2005 Better Software article called "Grow Your Test Harness Naturally" which seems to be the most important reference out there for doing this sort of work. -Chris From jkohl at telusplanet.net Wed Nov 2 09:51:43 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Wed, 2 Nov 2005 07:51:43 -0700 Subject: [Wtr-general] Architecting WATIR for a WEB application In-Reply-To: <72799cd70511020633heb94bd3r64b74ee79ac5bbf6@mail.gmail.com> Message-ID: <002001c5dfbc$f10a58c0$6500a8c0@tintin> +1 > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon > Sent: November 2, 2005 7:34 AM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] Architecting WATIR for a WEB application > > > What are some considerations that will help the planning > and layout of > > WATIR architecture if you are to start from scratch to > automate a WEB > > site? I would appreciate hearing from experienced WATIR > users on what > > approaches you have chosen to structure/architect the way you use > > WATIR for your WEB application. Thanks. > > > I suspect that the sophisticated Watir users on this list > would tell you that the answer to your question depends on > individual context. > That is, every project is different. > > As a general principle, though, a lot of people suggest that > your framework should be abstracted from your implementation. > In other > words: start solving problems; refactor; repeat; don't worry > about architecture so much as you worry about solving the immediate > problem-- your architecture will grow as your ability to > solve problems does. As always, I'll cite Kevin Lawrence's > March 2005 Better Software article called "Grow Your Test > Harness Naturally" > which seems to be the most important reference out there for > doing this sort of work. > > -Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From bret at pettichord.com Wed Nov 2 13:58:17 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 02 Nov 2005 12:58:17 -0600 Subject: [Wtr-general] Architecting WATIR for a WEB application In-Reply-To: <72799cd70511020633heb94bd3r64b74ee79ac5bbf6@mail.gmail.com > References: <937C75B544E7E8428436C67056A3A1730CC6DD@NYWEXMB83.msad.ms.com> <937C75B544E7E8428436C67056A3A1730CC6DD@NYWEXMB83.msad.ms.com> Message-ID: <5.1.0.14.2.20051102125758.037e04a8@pop.gmail.com> At 08:33 AM 11/2/2005, Chris McMahon wrote: >start solving problems; refactor +1. This is how i always proceed. _____________________ Bret Pettichord www.pettichord.com From alex at verk.info Wed Nov 2 21:19:29 2005 From: alex at verk.info (Alexey Verkhovsky) Date: Wed, 02 Nov 2005 19:19:29 -0700 Subject: [Wtr-general] Architecting WATIR for a WEB application In-Reply-To: <002001c5dfbc$f10a58c0$6500a8c0@tintin> References: <002001c5dfbc$f10a58c0$6500a8c0@tintin> Message-ID: <436973B1.5080702@verk.info> +1 I, too, am scared when I hear the 'A' word applied to something as simple as an automated test suite :) Having said that, there is certain amount of design that can go into a test suite before you start writing it. So, how about turning the conversation in a direction like this: GENERAL GUIDELINES FOR ORGANISING A SUITE OF WATIR TESTS ------------------------------- Organize the tests as a Test::Unit suite. Start with a single Test::Unit:TestCase class in a single file, split it into smaller logical pieces when it becomes too big (around 1000 lines). As soon as you have to repeat the same code twice, think about extracting a method. Certainly extract a method from anything that is repeated three times. Expect at least the following helper classes (or modules) to evolve: * URL generator, to extract things like ie.goto url_for('AccountView', :account_id => 1, :billing_month => '2005-11') * GUI navigator, to extract things like logon(:user => 'tester', :password => '12345') ) * custom assertions, for methods like assert_current_account_is_active Your real tests will probably have to talk to the database, to test assertions about things that are hard or impossible to access through the GUI, to generate expected results, to manage initial state of the database before the test, etc. This often means that you need something quite similar to domain and data access layers. It will probably be much simpler than the production domain, but the same design principles generally apply. Resist the temptation to reuse the production domain layer (you don't want your test oracles to share implementation with the system under test). Production data access layer, on the other hand, is OK. Test results may need to be published and/or reported. Roll your own, or use http://rubyforge.org/projects/test-report/ It is not currently supported by anybody, but I've heard some people were still using it. After all, it's merely a few hundred lines of Ruby :) Other than reporting along the lines of "TestAccountView => PASS/FAIL", don't try to make contents of Watir tests accessible to non-programmers. It proves counter-productive. If you need automated tests that business can understand, use FIT and test the domain logic with it. ... Beg pardon if I'm answering a wrong question here :) But I'd like to hear what other people do. Alexey Verkhovsky Jonathan Kohl wrote: >+1 > > >>-----Original Message----- >>From: wtr-general-bounces at rubyforge.org >>[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon >> >> >>start solving problems; refactor; repeat; don't worry >>about architecture so much as you worry about solving the immediate >>problem-- your architecture will grow as your ability to >>solve problems does. >> From amithashettyb at yahoo.co.in Thu Nov 3 00:07:08 2005 From: amithashettyb at yahoo.co.in (Amitha Shetty) Date: Thu, 3 Nov 2005 05:07:08 +0000 (GMT) Subject: [Wtr-general] How to get Image Source from Excel Input file? In-Reply-To: <001301c5dfab$2afb2170$c6e7fea9@officezg.wa> Message-ID: <20051103050708.67527.qmail@web8505.mail.in.yahoo.com> This works fine. Thanks. Zeljko Filipin wrote:Enter icons2.gif in excel instead of /icons2.gif/. Then try this: IMAGE = worksheet.range('b11')['Value'] $ie.image(:src, /#{IMAGE}/).click Zeljko ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Amitha Shetty Sent: Wednesday, November 02, 2005 1:25 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] How to get Image Source from Excel Input file? Hi, I am getting Inputs from an Excel file for my test cases and its working fine for all except Image source. I tried: IMAGE = worksheet.range('b11')['Value'] and value in excel corresponding to Cell b11 is /icons2.gif/ $ie.image(:src,IMAGE).click gives the following exception- `assert_exists': Unable to locate object, using src and /icons2.gif/(Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2009:in `click' However if I hardcode the source it works fine.... i.e $ie.image(:src,/icons2.gif/).click clicks on the image. I think the problem is because input is read from excel as a string.How do I handle this? Thanks, Amitha ________________________________ Enjoy this Diwali with Y! India Click here _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051103/1b426945/attachment.html From zeljko.filipin at gmail.com Thu Nov 3 03:19:44 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 3 Nov 2005 09:19:44 +0100 Subject: [Wtr-general] OO and test/unit In-Reply-To: <4353B568.7070105@clabs.org> Message-ID: <000e01c5e04f$5985b420$c6e7fea9@officezg.wa> I forgot to say thanks. :) I do not use test/unit any more, but this: require 'test/unit/assertions' include Test::Unit::Assertions and now I can use assert where ever I like. :) Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris Morris Sent: Monday, October 17, 2005 4:30 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] OO and test/unit Zeljko Filipin wrote: >When I comment assertions (lines 16 and 20) it works. But I really like >assertions. I made class User child of Test::Unit::TestCase (class User < >Test::Unit::TestCase) but it does not work. > That /should/ work, perhaps you could report your error message on that. Another (perhaps better option) is to use a Module and mixins. Instead of making User a class, make it a Module, then include that module in whatever TestCase class you make. I don't have time to detail this for you, but look at rubycentral.com for the older 1.6 Ruby book and find its write-up on Modules and mixins, or hit up the main Ruby list for more assistance with this. -- Chris http://clabs.org/blogki _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Jan.Montano at thomson.com Thu Nov 3 03:26:54 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Thu, 3 Nov 2005 16:26:54 +0800 Subject: [Wtr-general] if textfield is read only? Message-ID: How will we know if a text box is read only or not? From zeljko.filipin at gmail.com Thu Nov 3 03:53:36 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 3 Nov 2005 09:53:36 +0100 Subject: [Wtr-general] if textfield is read only? In-Reply-To: Message-ID: <001101c5e054$152c59f0$c6e7fea9@officezg.wa> html: watir: ie.textField(:index, 1).readonly? Watir code will return true if text box is readonly, and false if not. I found it at http://wtr.rubyforge.org/rdoc/index.html 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: Thursday, November 03, 2005 9:27 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] if textfield is read only? How will we know if a text box is read only or not? _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From chaya_b_s at yahoo.co.in Thu Nov 3 07:19:56 2005 From: chaya_b_s at yahoo.co.in (chaya shetty) Date: Thu, 3 Nov 2005 12:19:56 +0000 (GMT) Subject: [Wtr-general] Unintialized Constant exception is thrown when All tests is run In-Reply-To: <001101c5e054$152c59f0$c6e7fea9@officezg.wa> Message-ID: <20051103121956.50296.qmail@web8311.mail.in.yahoo.com> Hi, I am using excel file as input to my test cases. In a test case "TESTCASE1" I am calling a "Methods.rb"(which includes only methods) which requires a constant "CONSTANT1". "CONSTANT1" is initialized in excel input file. When I run "TESTCASE1" individually ,it runs successfully but when All Tests is run it throws " Unintialized Constant" exception. When I initialize "CONSTANT1" in a input ruby file or declare "CONSTANT1" as a global and then run "AllTests" it runs successfully. Hence I think it is the excel input which is the problem. How do I handle this?? Thanks, Chaya --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051103/8ffde690/attachment.html From carl.l.shaulis at convergys.com Thu Nov 3 11:50:22 2005 From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com) Date: Thu, 3 Nov 2005 10:50:22 -0600 Subject: [Wtr-general] Reliability and thread management Message-ID: Good morning: I hope this is not a redundant post. I submitted it yesterday, but I did not see this topic in the archives. We have successfully been able to work with modals and pop ups; however, I am concerned about the reliability of the scripts. We will run script A and it makes it through the modals and pop ups just fine and completes without error. We make no changes to this script and run it a second time and the script fails on the modals. In my opinion it a timing issue between the browser, latency and using multiple threads. Our application is extremely sensitive to double clicks. Occasionally a routine click will act as though it was clicked twice and the script breaks due to the error message generated on a doubleclick. Only one click is specified in Ruby. Again I suspect this is a timing concern. Has anyone else experienced this type of concern? What are some things that can be done to manage threads and the timing of the browser interactions? What are the best ways to control script speed? Any thoughts on making these scripts more reliable would be greatly appreciated. Thanks, Carl -- "NOTICE: The information contained in this electronic mail transmission is intended by Convergys Corporation for the use of the named individual or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone (collect), so that the sender's address records can be corrected." From christopher.mcmahon at gmail.com Thu Nov 3 13:22:08 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 3 Nov 2005 12:22:08 -0600 Subject: [Wtr-general] whytheluckystiff on Selenium and Watir Message-ID: <72799cd70511031022k3dc83069nea5d37ac24b861c7@mail.gmail.com> http://redhanded.hobix.com/inspect/theSoundsOfSeleniumTestingYourWeblickation.html The comment from user "<|:{" is really funny. BTW, if you're not surfing redhanded.hobix.com, and "why's Poignant Guide To Ruby", you should do so. Immediately. -Chris From theebh at gmail.com Fri Nov 4 02:13:34 2005 From: theebh at gmail.com (boonhoo) Date: Fri, 4 Nov 2005 15:13:34 +0800 Subject: [Wtr-general] Preceding text of textfield In-Reply-To: <158e6acb0511011706pc7b6c3ck32707e8d21e4e08e@mail.gmail.com> References: <5.1.0.14.2.20051101122053.036c7698@pop.gmail.com> <5.1.0.14.2.20051101143621.037c6c08@pop.gmail.com> <158e6acb0511011706pc7b6c3ck32707e8d21e4e08e@mail.gmail.com> Message-ID: <158e6acb0511032313i63b6e220md754353dd5717e00@mail.gmail.com> Latest update - i copied the 'before_text' and 'after_text' code from HEAD to my version of watir, but the functions return empty string when i try it on a text field. Likewise when i use object.getAdjacentText("beforeBegin")... On 11/2/05, boonhoo wrote: > great! I will try it later... i was toying with > ie.document.forms(i).elements(i) and it doesn't seem to support the > before_text() method. I will try this method on text_field.. > > My purpose is to find the preceding text to 'guess' what possible > value to enter into the text field. Thanks eveyrone :) > > boonhoo > > On 11/2/05, Bret Pettichord wrote: > > At 12:47 PM 11/1/2005, John Lloyd-Jones wrote: > > >That's the right way if you know the preceding text. If I understood the > > >original question correctly, the aim was to find the (possibly unknown) > > >text preceding a known text input field. > > > > My mistake. In HEAD, this can be done as > > > > ie.text_field(:name, "whatever").before_text > > > > Bret > > > > _____________________ > > Bret Pettichord > > www.pettichord.com > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > From amit.garde at gmail.com Fri Nov 4 02:15:53 2005 From: amit.garde at gmail.com (Amit Garde) Date: Fri, 4 Nov 2005 12:45:53 +0530 Subject: [Wtr-general] WATiR for Mozilla/Firefox Message-ID: <7661e6730511032315w7b1fddc3r8553635f07213dfa@mail.gmail.com> (I think this question has come up before, but please bear with me...) What would it take to write a layer of code for Mozilla/Firefox on the lines of what WATiR currently has available for IE, that would let WATiR drive Mozilla/Firefox instances the way it's done for IE right now ? Specifically, what to target and what to use to target it ? Some delving suggests that an XPCOM based approach might be the way to go, but I haven't been able to figure out exactly how to approach this. Can anyone on this list offer some advice or pointers ? We might be able to offer some resources to work on this, but right now knowing where to look and how to start is the tough part. It would be kind of neat to have the browser parameterized so that apart from the instantiation of a specific browser, a WATiR script for a given application could run unchanged for IE/FireFox/, modulo differences in browser functionality (e.g. tabs). Amit -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051104/d81299eb/attachment.html From theebh at gmail.com Fri Nov 4 04:02:34 2005 From: theebh at gmail.com (boonhoo) Date: Fri, 4 Nov 2005 17:02:34 +0800 Subject: [Wtr-general] submit form Message-ID: <158e6acb0511040102r7ab5f4aaj6e92299af47c3ec4@mail.gmail.com> Hi, (hope my question is not confusing). Is there a way in watir to determine if after submitting a form, a) whether the form really make a POST and move to a new page, or b) the form just redisplay itself and did not get POSTed? (e.g. if there are incomplete fields and caught by javascript validation) I was thinking probably by comparing the last url in the history object, i would be able to tell whether the form really did a POST. However from Microsoft DHTML website, the history object don't seem to show the last URL traversed due to security reason... Appreciate any reply. Thanks... bh From wkruse at sars.gov.za Fri Nov 4 04:12:23 2005 From: wkruse at sars.gov.za (Walter Kruse) Date: Fri, 4 Nov 2005 11:12:23 +0200 Subject: [Wtr-general] submit form Message-ID: <373AA889F642934D8983245F7A5145880106F03F@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 check if the insert happened on the database. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] Sent: 04 November 2005 11:03 To: wtr-general at rubyforge.org Subject: [Wtr-general] submit form Hi, (hope my question is not confusing). Is there a way in watir to determine if after submitting a form, a) whether the form really make a POST and move to a new page, or b) the form just redisplay itself and did not get POSTed? (e.g. if there are incomplete fields and caught by javascript validation) I was thinking probably by comparing the last url in the history object, i would be able to tell whether the form really did a POST. However from Microsoft DHTML website, the history object don't seem to show the last URL traversed due to security reason... Appreciate any reply. Thanks... bh _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From chaya_b_s at yahoo.co.in Fri Nov 4 05:48:51 2005 From: chaya_b_s at yahoo.co.in (chaya shetty) Date: Fri, 4 Nov 2005 10:48:51 +0000 (GMT) Subject: [Wtr-general] How to hide the explorer window in Watir Message-ID: <20051104104851.59415.qmail@web8304.mail.in.yahoo.com> Hi, I want the internet explorer window to be hidden while my script is running. One option for this is: $ie.getIE.visible = false But this will just hide the main window, the popups are not hidden. Is there any other way to do this?? Thanks Chaya --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051104/ddd09735/attachment.html From tomfeo at presslogic.com Fri Nov 4 09:41:39 2005 From: tomfeo at presslogic.com (Tom) Date: Fri, 4 Nov 2005 07:41:39 -0700 Subject: [Wtr-general] How to hide the explorer window in Watir In-Reply-To: <20051104104851.59415.qmail@web8304.mail.in.yahoo.com> Message-ID: You could try: $ie.minimize, but I'm not sure if that will also keep your pop ups minimized. Failing that, you could run the -b when calling your script from the command line: >C:/Watir/my_script.rb -b This will make your script run in the background. Since this does not create an ie window, you will not be able peek at what's happening. I believe this should avoid the pop ups from appearing, but I haven't tried this myself. Tom _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of chaya shetty Sent: Friday, November 04, 2005 3:49 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] How to hide the explorer window in Watir Hi, I want the internet explorer window to be hidden while my script is running. One option for this is: $ie.getIE.visible = false But this will just hide the main window, the popups are not hidden. Is there any other way to do this?? Thanks Chaya _____ Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051104/d6bc3365/attachment.html From zeljko.filipin at gmail.com Fri Nov 4 09:49:08 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 4 Nov 2005 15:49:08 +0100 Subject: [Wtr-general] How to hide the explorer window in Watir In-Reply-To: Message-ID: <002e01c5e14e$ea40ef70$c6e7fea9@officezg.wa> I just tried -b option and file upload pop-ups appear. Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tom Sent: Friday, November 04, 2005 3:42 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How to hide the explorer window in Watir You could try: $ie.minimize, but I'm not sure if that will also keep your pop ups minimized. Failing that, you could run the -b when calling your script from the command line: >C:/Watir/my_script.rb -b This will make your script run in the background. Since this does not create an ie window, you will not be able peek at what's happening. I believe this should avoid the pop ups from appearing, but I haven't tried this myself. Tom _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of chaya shetty Sent: Friday, November 04, 2005 3:49 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] How to hide the explorer window in Watir Hi, I want the internet explorer window to be hidden while my script is running. One option for this is: $ie.getIE.visible = false But this will just hide the main window, the popups are not hidden. Is there any other way to do this?? Thanks Chaya _____ Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051104/802f5227/attachment.html From vishalworld at sqatester.com Fri Nov 4 09:59:31 2005 From: vishalworld at sqatester.com (Vishal Chavan) Date: Fri, 4 Nov 2005 06:59:31 -0800 (PST) Subject: [Wtr-general] Help required for custom JS Menu Message-ID: <20051104065931.59D17A55@dm21.mta.everyone.net> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051104/64166521/attachment.html From mooola00 at hotmail.com Fri Nov 4 11:01:22 2005 From: mooola00 at hotmail.com (Eugene Kula) Date: Fri, 04 Nov 2005 09:01:22 -0700 Subject: [Wtr-general] Assertions trouble Message-ID: My apologies in advance if this turns out to be a double-post by me. We are extracting test methods from test cases into helper scripts. The problem I'm running across is I'm not able to assert(NoMethodError: undefined method 'assert'), and I assume it's because I'm either not requiring the right scripts or I'm not inheriting from TestCase. Any help much appreciated! My Test Case script: require 'tabularHelper.rb' include TabularHelper class TC_EventTabular < Test::Unit::TestCase def test_Columns columntable = [ {'col'=>'Date/Time', 'issortable'=>true}, {'col'=>'Description', 'issortable'=>true}, {'col'=>'Lead', 'issortable'=>true}, {'col'=>'Folder', 'issortable'=>true} ] TabularHelper.run_column_test(columntable, $ie) end end MY Helper script: require 'watir' require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' module TabularHelper def run_column_test(columntable, ie) assert($ie.something.exists?) assert_equal(somevalue, $ie.something.value) end end From zeljko.filipin at gmail.com Fri Nov 4 11:07:48 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 4 Nov 2005 17:07:48 +0100 Subject: [Wtr-general] Assertions trouble In-Reply-To: Message-ID: <003c01c5e159$e839d3d0$c6e7fea9@officezg.wa> Add this to your MY Helper script and it will work just fine. require 'test/unit/assertions' include Test::Unit::Assertions I think you can remove require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' from that script (but I am not sure). Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Eugene Kula Sent: Friday, November 04, 2005 5:01 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Assertions trouble My apologies in advance if this turns out to be a double-post by me. We are extracting test methods from test cases into helper scripts. The problem I'm running across is I'm not able to assert(NoMethodError: undefined method 'assert'), and I assume it's because I'm either not requiring the right scripts or I'm not inheriting from TestCase. Any help much appreciated! My Test Case script: require 'tabularHelper.rb' include TabularHelper class TC_EventTabular < Test::Unit::TestCase def test_Columns columntable = [ {'col'=>'Date/Time', 'issortable'=>true}, {'col'=>'Description', 'issortable'=>true}, {'col'=>'Lead', 'issortable'=>true}, {'col'=>'Folder', 'issortable'=>true} ] TabularHelper.run_column_test(columntable, $ie) end end MY Helper script: require 'watir' require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' module TabularHelper def run_column_test(columntable, ie) assert($ie.something.exists?) assert_equal(somevalue, $ie.something.value) end end _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From mooola00 at hotmail.com Fri Nov 4 11:14:39 2005 From: mooola00 at hotmail.com (Eugene Kula) Date: Fri, 04 Nov 2005 09:14:39 -0700 Subject: [Wtr-general] Assertions trouble In-Reply-To: <003c01c5e159$e839d3d0$c6e7fea9@officezg.wa> Message-ID: That worked! Now that the assertions work, how do I get the results to display correctly (e.g. 0 assertions, 0 failures, 0 errors)? >From: "Zeljko Filipin" >Reply-To: wtr-general at rubyforge.org >To: >Subject: Re: [Wtr-general] Assertions trouble >Date: Fri, 4 Nov 2005 17:07:48 +0100 > >Add this to your MY Helper script and it will work just fine. > >require 'test/unit/assertions' >include Test::Unit::Assertions > >I think you can remove > >require 'test/unit' >require 'test/unit/ui/console/testrunner' >require 'watir/testUnitAddons' > >from that script (but I am not sure). > >Zeljko > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Eugene Kula >Sent: Friday, November 04, 2005 5:01 PM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Assertions trouble > >My apologies in advance if this turns out to be a double-post by me. > >We are extracting test methods from test cases into helper scripts. The >problem I'm running across is I'm not able to assert(NoMethodError: >undefined method 'assert'), and I assume it's because I'm either not >requiring the right scripts or I'm not inheriting from TestCase. Any help >much appreciated! > >My Test Case script: > >require 'tabularHelper.rb' >include TabularHelper >class TC_EventTabular < Test::Unit::TestCase >def test_Columns > columntable = [ > {'col'=>'Date/Time', 'issortable'=>true}, > {'col'=>'Description', 'issortable'=>true}, > {'col'=>'Lead', 'issortable'=>true}, > {'col'=>'Folder', 'issortable'=>true} > ] > > TabularHelper.run_column_test(columntable, $ie) >end >end > >MY Helper script: >require 'watir' >require 'test/unit' >require 'test/unit/ui/console/testrunner' >require 'watir/testUnitAddons' > >module TabularHelper >def run_column_test(columntable, ie) > assert($ie.something.exists?) > assert_equal(somevalue, $ie.something.value) >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 vishalworld at sqatester.com Fri Nov 4 12:10:28 2005 From: vishalworld at sqatester.com (Vishal Chavan) Date: Fri, 4 Nov 2005 09:10:28 -0800 (PST) Subject: [Wtr-general] Calling function from another RB file. Message-ID: <20051104091029.59D16F7E@dm20.mta.everyone.net> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051104/d59de53f/attachment.html From tomfeo at presslogic.com Fri Nov 4 12:27:23 2005 From: tomfeo at presslogic.com (Tom) Date: Fri, 4 Nov 2005 10:27:23 -0700 Subject: [Wtr-general] Calling function from another RB file. In-Reply-To: <20051104091029.59D16F7E@dm20.mta.everyone.net> Message-ID: Require statements use single quotes. In your driver.rb file try: require 'watir' require 'one.rb' load "one.rb" Act.contains_html("test") Note: Commenting out load "one.rb" as in require 'watir' require 'one.rb' #load "one.rb" Act.contains_html("test") also works, so not sure if you need this load statement or not. I'm guessing not. Tom _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Vishal Chavan Sent: Friday, November 04, 2005 10:10 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Calling function from another RB file. Hi All, I wanted to seek your help in calling a function from another .RB file. Suppose I have a file one.rb which has following function: require 'watir' class Act def Act.contains_html( input ) puts input end end Now from driver.rb file I want to call this Act.contains_html( input ) function. I have following code: require 'watir' require "one.rb" load "one.rb" Act.contains_html("test") This does not work please advice how do I get this working... Thanks, Vishal _____ Join SQAtester.com Community ---> http://www.sqatester.com/testersarea/joinus.htm -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051104/8c066b32/attachment.html From Sean.Gallagher at ticketmaster.com Fri Nov 4 12:31:54 2005 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Fri, 4 Nov 2005 09:31:54 -0800 Subject: [Wtr-general] Calling function from another RB file. Message-ID: <71D28C8451BFD5119B2B00508BE26E640B63F25C@pasmail3.office.tmcs> Read up on Modules and Mixins: http://www.rubycentral.com/book/tut_modules.html -sean _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Vishal Chavan Sent: Friday, November 04, 2005 9:10 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Calling function from another RB file. Hi All, I wanted to seek your help in calling a function from another .RB file. Suppose I have a file one.rb which has following function: require 'watir' class Act def Act.contains_html( input ) puts input end end Now from driver.rb file I want to call this Act.contains_html( input ) function. I have following code: require 'watir' require "one.rb" load "one.rb" Act.contains_html("test") This does not work please advice how do I get this working... Thanks, Vishal _____ Join SQAtester.com Community ---> http://www.sqatester.com/testersarea/joinus.htm -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051104/229c5cd7/attachment.html From sy1234 at gmail.com Fri Nov 4 16:46:40 2005 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 4 Nov 2005 15:46:40 -0600 Subject: [Wtr-general] FAQ Update In-Reply-To: <5.1.0.14.2.20051028010239.03a76340@pop.gmail.com> References: <5.1.0.14.2.20051028010239.03a76340@pop.gmail.com> Message-ID: <1e55af990511041346h496350a1l1448d00a37bd6935@mail.gmail.com> On 10/28/05, Bret Pettichord wrote: > Jonathan has updated the FAQ. > http://wtr.rubyforge.org/wiki/wiki.pl?FrequentQuestions > > Awesome! Good to see. I'd still rather like to update the entire wiki by migrating it to mediawiki. It was rather annoying to have had to wade through that FAQ the few times that I did in order to clean it up somewhat (and also answer my own questions). From sy1234 at gmail.com Fri Nov 4 17:03:50 2005 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 4 Nov 2005 16:03:50 -0600 Subject: [Wtr-general] iexplore process remains after closing IE? In-Reply-To: References: <72799cd70510311235p1f42f340v87cb9a6289d5eca2@mail.gmail.com> Message-ID: <1e55af990511041403l4e39e7fdt6719b7559ba5693d@mail.gmail.com> On 10/31/05, Jeff Wood wrote: > require 'watir' > include Watir > > ie = IE.new > ie.goto "www.google.com" > ie.close Is there a way to report the pid of IE.new ? From sy1234 at gmail.com Fri Nov 4 17:07:22 2005 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 4 Nov 2005 16:07:22 -0600 Subject: [Wtr-general] CookieManager::WatirHelper ... ??? In-Reply-To: <5.1.0.14.2.20051102002458.03828df0@pop.gmail.com> References: <1678386167807c.167807c1678386@shaw.ca> <5.1.0.14.2.20051102002458.03828df0@pop.gmail.com> Message-ID: <1e55af990511041407w416de3a5r93cb67d09b3c57ed@mail.gmail.com> On 11/2/05, Bret Pettichord wrote: > I'd appreciate any suggestions. We often get pleas for example code, so it > would seem nasty to omit stuff like this just because it didn't have tests. > Yet it obviously is misleading/surprising to include untested and possibly > half-baked stuff like this in our library. > > Suggestions? Perhaps just have all that stuff called things like "contrib-cookiemanager".. then note them in a nice list in the docs / on the website, with a page per-item. Separate them somewhat from the main documentation. Maybe also have it all downloadable as a separate addon/gem? From christopher.mcmahon at gmail.com Fri Nov 4 17:08:35 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 4 Nov 2005 16:08:35 -0600 Subject: [Wtr-general] iexplore process remains after closing IE? In-Reply-To: <1e55af990511041403l4e39e7fdt6719b7559ba5693d@mail.gmail.com> References: <72799cd70510311235p1f42f340v87cb9a6289d5eca2@mail.gmail.com> <1e55af990511041403l4e39e7fdt6719b7559ba5693d@mail.gmail.com> Message-ID: <72799cd70511041408o7c52a3cbl86ceb96979afeabe@mail.gmail.com> > Is there a way to report the pid of IE.new ? This question just got asked on the perlguitest mail list today, too. I'll keep my eyes open there for an answer, too. -Chris From sy1234 at gmail.com Fri Nov 4 17:21:59 2005 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 4 Nov 2005 16:21:59 -0600 Subject: [Wtr-general] WATiR for Mozilla/Firefox In-Reply-To: <7661e6730511032315w7b1fddc3r8553635f07213dfa@mail.gmail.com> References: <7661e6730511032315w7b1fddc3r8553635f07213dfa@mail.gmail.com> Message-ID: <1e55af990511041421n255c10ecj12f2925a3e91e3cb@mail.gmail.com> On 11/4/05, Amit Garde wrote: > What would it take to write a layer of code for Mozilla/Firefox on the > lines of what WATiR currently has available for IE, that would let WATiR > drive Mozilla/Firefox instances the way it's done for IE right now ? I wonder if the plugin angle could help.. there is the TestGen4Web project, for example: http://developer.spikesource.com/wiki/index.php/Projects:TestGen4Web From roy_sin at yahoo.com Fri Nov 4 20:55:26 2005 From: roy_sin at yahoo.com (Roy Sin) Date: Fri, 4 Nov 2005 17:55:26 -0800 (PST) Subject: [Wtr-general] How to leave the Browser Window open after test is completed... Message-ID: <20051105015527.92835.qmail@web52905.mail.yahoo.com> this is weird I have a TC, which is not very different from my other TCs. That is it requires setup which creates an instance of IE and goto a URL. And in my report_test.rb, all my tests complete successfully but at the end the Browser closes. My other TCs, the Browser window stays on the screen after test completion only for that particular TC. Any idea!! thanks __________________________________ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs From vishalworld at sqatester.com Sat Nov 5 07:21:02 2005 From: vishalworld at sqatester.com (Vishal Chavan) Date: Sat, 5 Nov 2005 04:21:02 -0800 (PST) Subject: [Wtr-general] Calling function from another RB file. Message-ID: <20051105042103.59D1D897@dm20.mta.everyone.net> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051105/899536fc/attachment.html From bret at pettichord.com Sat Nov 5 21:33:17 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 05 Nov 2005 20:33:17 -0600 Subject: [Wtr-general] Assertions trouble In-Reply-To: References: <003c01c5e159$e839d3d0$c6e7fea9@officezg.wa> Message-ID: <5.1.0.14.2.20051105202710.03c599f8@pop.gmail.com> At 10:14 AM 11/4/2005, Eugene Kula wrote: >Now that the assertions work, how do I get the results to display correctly >(e.g. 0 assertions, 0 failures, 0 errors)? The assert method in Test::Unit::Assertions is different from the assert method in Test::Unit::TestCase in one way: it is not included in the total count. I am wondering if something like the following might not work for you. If it does, let us know. Bret >def test_Columns > columntable = [ > {'col'=>'Date/Time', 'issortable'=>true}, > {'col'=>'Description', 'issortable'=>true}, > {'col'=>'Lead', 'issortable'=>true}, > {'col'=>'Folder', 'issortable'=>true} > ] > > TabularHelper.run_column_test(columntable, $ie, self) >end > >MY Helper script: >require 'watir' >require 'test/unit' > >module TabularHelper >def run_column_test(columntable, ie, testcase) > testcase.assert($ie.something.exists?) > testcase.assert_equal(somevalue, $ie.something.value) >end >end _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Nov 5 21:37:29 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 05 Nov 2005 20:37:29 -0600 Subject: [Wtr-general] FAQ Update In-Reply-To: <1e55af990511041346h496350a1l1448d00a37bd6935@mail.gmail.co m> References: <5.1.0.14.2.20051028010239.03a76340@pop.gmail.com> <5.1.0.14.2.20051028010239.03a76340@pop.gmail.com> Message-ID: <5.1.0.14.2.20051105203413.03da8e88@pop.gmail.com> At 03:46 PM 11/4/2005, Sy Ali wrote: >I'd still rather like to update the entire wiki by >migrating it to mediawiki. It was rather annoying to have had to wade >through that FAQ the few times that I did in order to clean it up >somewhat (and also answer my own questions). Thanks for cleaning it up. It looks a lot bettter. We are always open to specific proposals. Why would media wiki be better? Where would it be hosted? Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Nov 5 21:43:34 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 05 Nov 2005 20:43:34 -0600 Subject: [Wtr-general] WATiR for Mozilla/Firefox In-Reply-To: <7661e6730511032315w7b1fddc3r8553635f07213dfa@mail.gmail.co m> Message-ID: <5.1.0.14.2.20051105203836.03b5bbc8@pop.gmail.com> At 01:15 AM 11/4/2005, Amit Garde wrote: >What would it take to write a layer of code for Mozilla/Firefox on the >lines of what WATiR currently has available for IE, that would let WATiR >drive Mozilla/Firefox instances the way it's done for IE right now ? >Specifically, what to target and what to use to target it ? Some delving >suggests that an XPCOM based approach might be the way to go, but I >haven't been able to figure out exactly how to approach this. Can anyone >on this list offer some advice or pointers ? We might be able to offer >some resources to work on this, but right now knowing where to look and >how to start is the tough part. This is a great idea. Several others have also looked into this and threatened to write an implentation, but no one has yet to dive it. It would be great to see you take a stab and this and share what you learn, whether it be the start of an implementaiton or notes on what is difficult. There are many people in the open source community who mostly like Watir, except for the fact that is tied to proprietary technology. Supporting an option of using Firefox would actually bring a lot support and involvement and help from the larger Ruby community to Watir. >It would be kind of neat to have the browser parameterized so that apart >from the instantiation of a specific browser, a WATiR script for a given >application could run unchanged for IE/FireFox/, modulo >differences in browser functionality (e.g. tabs). I completely agree and would be eager to work on developing a plug in interface that separated and connected the existing Watir test API from its currnet IE/COM driver interface. Bret _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Sun Nov 6 00:50:22 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sat, 05 Nov 2005 22:50:22 -0700 Subject: [Wtr-general] iexplore process remains after closing IE? In-Reply-To: <1e55af990511041403l4e39e7fdt6719b7559ba5693d@mail.gmail.com> Message-ID: <004601c5e295$fa46b6f0$6600a8c0@NewDell> Try this require 'Win32API' hWnd = 985158 # use the hWnd for your process # pid is a dword pid=" " * 32 thread= Win32API.new("user32", "GetWindowThreadProcessId", 'IP', 'I').Call(hWnd,pid) puts pid.unpack("L")[0] I think you can do ie.hWnd to get the hWnd on the second line Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sy Ali Sent: 04 November 2005 15:04 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] iexplore process remains after closing IE? On 10/31/05, Jeff Wood wrote: > require 'watir' > include Watir > > ie = IE.new > ie.goto "www.google.com" > ie.close Is there a way to report the pid of IE.new ? _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Sun Nov 6 13:02:00 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sun, 06 Nov 2005 12:02:00 -0600 Subject: [Wtr-general] Calling function from another RB file. In-Reply-To: <20051105042103.59D1D897@dm20.mta.everyone.net> Message-ID: <5.1.0.14.2.20051106120023.03cadb00@pop.gmail.com> At 06:21 AM 11/5/2005, Vishal Chavan wrote: >Finally, Wanted your opinion if its better to use Require or to load a >library... Is there any other benefit between them when compared head to head? Load just loads a library file. Require will load a library 1. if it hasn't already been loaded 2. located anywhere in the load path In general, people find it more useful to use require for libraries. Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sun Nov 6 13:06:58 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sun, 06 Nov 2005 12:06:58 -0600 Subject: [Wtr-general] submit form In-Reply-To: <158e6acb0511040102r7ab5f4aaj6e92299af47c3ec4@mail.gmail.co m> Message-ID: <5.1.0.14.2.20051106120627.03cc6548@pop.gmail.com> At 03:02 AM 11/4/2005, boonhoo wrote: >Is there a way in watir to determine if after submitting a form, >a) whether the form really make a POST and move to a new page, or >b) the form just redisplay itself and did not get POSTed? (e.g. if >there are incomplete fields and caught by javascript validation) You could check to see if the current page still contains the form after submitting it. _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Sun Nov 6 15:18:00 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sun, 06 Nov 2005 13:18:00 -0700 Subject: [Wtr-general] submit form In-Reply-To: <5.1.0.14.2.20051106120627.03cc6548@pop.gmail.com> Message-ID: <000201c5e30f$2f58a3c0$6600a8c0@NewDell> Tghere used to be a variable - I think it was ie.pageHasReloaded or similar thjat would show wether a page had been reloaded - just for situations like this. I don't know if its still there or nor Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 06 November 2005 11:07 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] submit form At 03:02 AM 11/4/2005, boonhoo wrote: >Is there a way in watir to determine if after submitting a form, >a) whether the form really make a POST and move to a new page, or >b) the form just redisplay itself and did not get POSTed? (e.g. if >there are incomplete fields and caught by javascript validation) You could check to see if the current page still contains the form after submitting it. _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From sy1234 at gmail.com Sun Nov 6 17:45:42 2005 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 6 Nov 2005 16:45:42 -0600 Subject: [Wtr-general] FAQ Update In-Reply-To: <5.1.0.14.2.20051105203413.03da8e88@pop.gmail.com> References: <5.1.0.14.2.20051028010239.03a76340@pop.gmail.com> <5.1.0.14.2.20051105203413.03da8e88@pop.gmail.com> Message-ID: <1e55af990511061445w72a16630x7526b44c60dd851e@mail.gmail.com> On 11/5/05, Bret Pettichord wrote: > At 03:46 PM 11/4/2005, Sy Ali wrote: > >I'd still rather like to update the entire wiki by > >migrating it to mediawiki. It was rather annoying to have had to wade > >through that FAQ the few times that I did in order to clean it up > >somewhat (and also answer my own questions). > > Thanks for cleaning it up. It looks a lot bettter. > > We are always open to specific proposals. Why would media wiki be better? > Where would it be hosted? My main issue with the existing wiki is their markup language. The insistance of "CamelCase" links forces broken english titles and poor sentances and is an eyesore to edit. The main benefits of mediawiki would be the various different skins. I'm a particular fan of the default skin. It's quite beautiful. This is the first and foremost thing that everyday users would see. The second would be the much nicer organization of the information. From experience, I can say that it's been intuitive to organize and maintain a lot of information within a mediawiki installation. On the inside, the editing is very easy (the markup language is good). It's extremely nice to be able to edit just a section of a page.. one doesn't get lost on more complecated pages like a FAQ. Automatic table of contents is nice. The templating engine allows for easy re-use of snippets of information. Adding inline images is trivial. For more technical reasons, mediawiki is very easy to update and maintain. Updating it amounts to unpacking the new tarball over the previous directory and running "php update.php" (or without ssh access, it's still quite easy). It's extremely easy to supervise, with controls for viewing recent changes and the lke. For more social reasons, MediaWiki is wildly popular and in my mind proved as an excellent tool because of its use for the Wikipedia. This is what would assure continued development.. there are a lot of interested people. My only warnings are to require usernames for editing, to use the spamblacklist extension and to include a one-liner regex to ban certain types of content. I can provide help with these things. If hosting is an issue, I'd be pleased to host it with my resources.. but it'll go anywhere php/mysql does. Curiously, it looks like the markup language is almost the same from the existing wiki to mediawiki. This means that it would be nearly trivial to hand-port the content from the existing wiki to a mediawiki installation. Yes, I would be willing to do this and unless you've got hundreds of pages of content I could get it done within two weeks. This would include the original wiki's content as well. My own wiki: http://jrandomhacker.info http://jrandomhacker.info/MediaWiki I also help maintain two other wikis: My local Linux user group (GTALUG): http://gtalug.org My local Ruby user group (TRUG): http://trug.stok.co.uk/wiki/ soon to be http://trug.ca I've set up MediaWiki for my old work and my current business. This is after a long and tiring history with a few other wikis. MediaWiki has been amazing. In the meantime, I intend to open up a Watir-specific section in TRUG since I've just begun working with watir and need to begin a resource and code repository. Sorry for being long-winded.. but I just got back from our meeting and am revved up. =) Sy, From sy1234 at gmail.com Sun Nov 6 23:35:03 2005 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 6 Nov 2005 22:35:03 -0600 Subject: [Wtr-general] How to leave the Browser Window open after test is completed... In-Reply-To: <20051105015527.92835.qmail@web52905.mail.yahoo.com> References: <20051105015527.92835.qmail@web52905.mail.yahoo.com> Message-ID: <1e55af990511062035r4cf9248ey31bd580c6a50a55d@mail.gmail.com> On 11/4/05, Roy Sin wrote: > My other TCs, the Browser window stays on the screen after > test completion only for that particular TC. Any idea!! That's odd.. I had to specifically throw in a line to close the window after my test case was done. Perhaps what you could do is some kind of delay at the end. I do a simple: foobar = gets and the window will hang there waiting for input. This is a cheap hack, but I should think it'd work. From chaya_b_s at yahoo.co.in Mon Nov 7 00:17:07 2005 From: chaya_b_s at yahoo.co.in (chaya shetty) Date: Mon, 7 Nov 2005 05:17:07 +0000 (GMT) Subject: [Wtr-general] How to hide the explorer window in Watir In-Reply-To: Message-ID: <20051107051707.47490.qmail@web8301.mail.in.yahoo.com> Hi, I tried with both $ie.minimize and with -b option, but still the popups were not hidden. Is there any other way?? Thanks Chaya Tom wrote: v\:* {behavior:url(#default#VML);}o\:* {behavior:url(#default#VML);}w\:* {behavior:url(#default#VML);}.shape {behavior:url(#default#VML);}st1\:*{behavior:url(#default#ieooui) } You could try: $ie.minimize, but I?m not sure if that will also keep your pop ups minimized. Failing that, you could run the ?b when calling your script from the command line: >C:/Watir/my_script.rb ?b This will make your script run in the background. Since this does not create an ie window, you will not be able peek at what?s happening. I believe this should avoid the pop ups from appearing, but I haven?t tried this myself. Tom --------------------------------- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of chaya shetty Sent: Friday, November 04, 2005 3:49 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] How to hide the explorer window in Watir Hi, I want the internet explorer window to be hidden while my script is running. One option for this is: $ie.getIE.visible = false But this will just hide the main window, the popups are not hidden. Is there any other way to do this?? Thanks Chaya --------------------------------- Enjoy this Diwali with Y! India Click here _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051107/89ad327d/attachment.html From satti at qantom.com Mon Nov 7 01:04:34 2005 From: satti at qantom.com (Sathya Shankar) Date: Mon, 07 Nov 2005 11:34:34 +0530 Subject: [Wtr-general] How to hide the explorer window in Watir In-Reply-To: <20051107051707.47490.qmail@web8301.mail.in.yahoo.com> References: <20051107051707.47490.qmail@web8301.mail.in.yahoo.com> Message-ID: <436EEE72.2000901@qantom.com> Hi chaya shetty... I think by definition popups or modal dialog windows cannot be hidden eventhough the modal dialogs are owned by the IE at that point of time. So you can make only the IE browser to run in the background but not any Modal dialog boxes or Popups. :-( Sathya Shankar chaya shetty wrote: > Hi, > I tried with both $ie.minimize and with -b option, but still the > popups were not hidden. Is there any other way?? > Thanks > Chaya > > */Tom /* wrote: > > You could try: > > $ie.minimize, but I?m not sure if that will also keep your pop ups > minimized. > > Failing that, you could run the ?b when calling your script from > the command line: > >>C:/Watir/my_script.rb ?b > > This will make your script run in the background. Since this does > not create an ie window, you will not be able peek at what?s > happening. I believe this should avoid the pop ups from appearing, > but I haven?t tried this myself. > > Tom > > ------------------------------------------------------------------------ > > *From:* wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] *On Behalf Of *chaya shetty > *Sent:* Friday, November 04, 2005 3:49 AM > *To:* wtr-general at rubyforge.org > *Subject:* [Wtr-general] How to hide the explorer window in Watir > > / / > > //Hi,// > I want the internet explorer window to be hidden while my script > is running. > One option for this is: > $ie.getIE.visible = false > But this will just hide the main window, the popups are not hidden. > Is there any other way to do this??// > > / //Thanks / > > Chaya > > / > > > / > > ------------------------------------------------------------------------ > > Enjoy this Diwali with Y! India Click here > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > ------------------------------------------------------------------------ > Enjoy this Diwali with Y! India Click here > > >------------------------------------------------------------------------ > >_______________________________________________ >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 christopher.mcmahon at gmail.com Mon Nov 7 10:07:23 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 7 Nov 2005 09:07:23 -0600 Subject: [Wtr-general] How to hide the explorer window in Watir In-Reply-To: <20051107051707.47490.qmail@web8301.mail.in.yahoo.com> References: <20051107051707.47490.qmail@web8301.mail.in.yahoo.com> Message-ID: <72799cd70511070707l52ced587mbb51b9d853f45aa3@mail.gmail.com> On 11/6/05, chaya shetty wrote: > Hi, > I tried with both $ie.minimize and with -b option, but still the popups were > not hidden. Is there any other way?? Selenium does this, I think-- but it intercepts the Javascript before the popup fires, if I'm not mistaken. -Chris From theebh at gmail.com Mon Nov 7 10:43:20 2005 From: theebh at gmail.com (boonhoo) Date: Mon, 7 Nov 2005 23:43:20 +0800 Subject: [Wtr-general] submit form In-Reply-To: <5.1.0.14.2.20051106120627.03cc6548@pop.gmail.com> References: <5.1.0.14.2.20051106120627.03cc6548@pop.gmail.com> Message-ID: <158e6acb0511070743v11b8a75bjd3a9dd5c96277ffd@mail.gmail.com> Hi, in situation where server-side validation is being used to check the form submission, I believe the form will still exist in the page after submitting. I have decided to use proxomitron as a local proxy to remove client-side validation code, so that all forms will act as (a), i.e. submitted to server. Rgds boonhoo On 11/7/05, Bret Pettichord wrote: > At 03:02 AM 11/4/2005, boonhoo wrote: > >Is there a way in watir to determine if after submitting a form, > >a) whether the form really make a POST and move to a new page, or > >b) the form just redisplay itself and did not get POSTed? (e.g. if > >there are incomplete fields and caught by javascript validation) > > You could check to see if the current page still contains the form after > submitting it. > > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From mooola00 at hotmail.com Mon Nov 7 11:14:01 2005 From: mooola00 at hotmail.com (Gene) Date: Mon, 7 Nov 2005 09:14:01 -0700 Subject: [Wtr-general] Assertions trouble In-Reply-To: <5.1.0.14.2.20051105202710.03c599f8@pop.gmail.com> Message-ID: I ended up stumbling across something similar by accident. I removed the module name (TabularHelper) from the method in the test case and it works. Thanks for the help! require 'tabularHelper.rb' include TabularHelper class TC_EventTabular < Test::Unit::TestCase def test_Columns columntable = [ {'col'=>'Date/Time', 'issortable'=>true}, {'col'=>'Description', 'issortable'=>true}, {'col'=>'Lead', 'issortable'=>true}, {'col'=>'Folder', 'issortable'=>true} ] run_column_test(columntable, $ie) end end MY Helper script: require 'watir' require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' module TabularHelper def run_column_test(columntable, ie) assert($ie.something.exists?) assert_equal(somevalue, $ie.something.value) end end From christopher.mcmahon at gmail.com Mon Nov 7 12:33:47 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 7 Nov 2005 11:33:47 -0600 Subject: [Wtr-general] iexplore process remains after closing IE? In-Reply-To: <004601c5e295$fa46b6f0$6600a8c0@NewDell> References: <1e55af990511041403l4e39e7fdt6719b7559ba5693d@mail.gmail.com> <004601c5e295$fa46b6f0$6600a8c0@NewDell> Message-ID: <72799cd70511070933t70adecedv1fb3fc6ab5142a28@mail.gmail.com> Paul, I'm not following your example below. It's clearly valid code, I run it and pid.unpack("L")[0] is "538976288", but I don't get how the pid is related to a Watir "IE.new". Sorry if it's a silly question, but I'm not getting it... -Chris On 11/5/05, Paul Rogers wrote: > Try this > > require 'Win32API' > > hWnd = 985158 # use the hWnd for your process > # pid is a dword > pid=" " * 32 > thread= Win32API.new("user32", "GetWindowThreadProcessId", 'IP', > 'I').Call(hWnd,pid) > puts pid.unpack("L")[0] > > I think you can do ie.hWnd to get the hWnd on the second line > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sy Ali > Sent: 04 November 2005 15:04 > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] iexplore process remains after closing IE? > > > On 10/31/05, Jeff Wood wrote: > > require 'watir' > > include Watir > > > > ie = IE.new > > ie.goto "www.google.com" > > ie.close > > Is there a way to report the pid of IE.new ? > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Mon Nov 7 13:04:11 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 07 Nov 2005 11:04:11 -0700 Subject: [Wtr-general] iexplore process remains after closing IE? Message-ID: <8250a7f58d.7f58d8250a@shaw.ca> you'll need to get the hWnd of the browser first require 'Win32API' ie = IE.new ie.goto "www.google.com" hWnd = ie.ie.hWnd pid=" " * 32 thread= Win32API.new("user32", "GetWindowThreadProcessId", 'IP', 'I').Call(hWnd,pid) puts pid.unpack("L")[0] ----- Original Message ----- From: Chris McMahon Date: Monday, November 7, 2005 10:33 am Subject: Re: [Wtr-general] iexplore process remains after closing IE? > Paul, I'm not following your example below. It's clearly valid code, > I run it and pid.unpack("L")[0] is "538976288", but I don't get how > the pid is related to a Watir "IE.new". Sorry if it's a silly > question, but I'm not getting it... > -Chris > > On 11/5/05, Paul Rogers wrote: > > Try this > > > > require 'Win32API' > > > > hWnd = 985158 # use the hWnd for your process > > # pid is a dword > > pid=" " * 32 > > thread= Win32API.new("user32", "GetWindowThreadProcessId", 'IP', > > 'I').Call(hWnd,pid) > > puts pid.unpack("L")[0] > > > > I think you can do ie.hWnd to get the hWnd on the second line > > > > Paul > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [wtr-general-bounces at rubyforge.org] On Behalf Of Sy Ali > > Sent: 04 November 2005 15:04 > > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] iexplore process remains after > closing IE? > > > > > > On 10/31/05, Jeff Wood wrote: > > > require 'watir' > > > include Watir > > > > > > ie = IE.new > > > ie.goto "www.google.com" > > > ie.close > > > > Is there a way to report the pid of IE.new ? > > > > _______________________________________________ > > 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 roy_sin at yahoo.com Mon Nov 7 13:12:34 2005 From: roy_sin at yahoo.com (Roy Sin) Date: Mon, 7 Nov 2005 10:12:34 -0800 (PST) Subject: [Wtr-general] How to leave the Browser Window open after test is completed... In-Reply-To: <1e55af990511062035r4cf9248ey31bd580c6a50a55d@mail.gmail.com> Message-ID: <20051107181234.59732.qmail@web52905.mail.yahoo.com> Sy, Instead of the gets I have added puts "this test case has now completed." at the end of my script works great now. thanks p.s: still weird :-) that is my only TC I had to do that. --- Sy Ali wrote: > On 11/4/05, Roy Sin wrote: > > My other TCs, the Browser window stays on the screen > after > > test completion only for that particular TC. Any idea!! > > That's odd.. I had to specifically throw in a line to > close the window > after my test case was done. > > Perhaps what you could do is some kind of delay at the > end. I do a simple: > foobar = gets > and the window will hang there waiting for input. This > is a cheap > hack, but I should think it'd work. > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com From christopher.mcmahon at gmail.com Mon Nov 7 13:54:55 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 7 Nov 2005 12:54:55 -0600 Subject: [Wtr-general] Last but not least Re: iexplore process remains after closing IE? Message-ID: <72799cd70511071054t3ff930bai8414a8a65b0f0b60@mail.gmail.com> OK, I got it now-- What's the syntax to actually close the browser using the pid/wHnd? -Chris On 11/7/05, Paul Rogers wrote: > you'll need to get the hWnd of the browser first > > require 'Win32API' > > > ie = IE.new > ie.goto "www.google.com" > > hWnd = ie.ie.hWnd > pid=" " * 32 > thread= Win32API.new("user32", "GetWindowThreadProcessId", 'IP', 'I').Call(hWnd,pid) > puts pid.unpack("L")[0] > > From paul.rogers at shaw.ca Mon Nov 7 14:15:58 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 07 Nov 2005 12:15:58 -0700 Subject: [Wtr-general] Last but not least Re: iexplore process remains after closing IE? Message-ID: I think its Process.kill( 9 , pid) http://www.ruby-doc.org/core/classes/Process.html#M001765 ----- Original Message ----- From: Chris McMahon Date: Monday, November 7, 2005 11:54 am Subject: [Wtr-general] Last but not least Re: iexplore process remains after closing IE? > OK, I got it now-- > What's the syntax to actually close the browser using the pid/wHnd? > -Chris > > On 11/7/05, Paul Rogers wrote: > > you'll need to get the hWnd of the browser first > > > > require 'Win32API' > > > > > > ie = IE.new > > ie.goto "www.google.com" > > > > hWnd = ie.ie.hWnd > > pid=" " * 32 > > thread= Win32API.new("user32", "GetWindowThreadProcessId", > 'IP', 'I').Call(hWnd,pid) > > puts pid.unpack("L")[0] > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From christopher.mcmahon at gmail.com Mon Nov 7 14:42:51 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 7 Nov 2005 13:42:51 -0600 Subject: [Wtr-general] Last but not least Re: iexplore process remains after closing IE? In-Reply-To: References: Message-ID: <72799cd70511071142g75b23c17waa17a7a07f270102@mail.gmail.com> On 11/7/05, Paul Rogers wrote: > I think its > > Process.kill( 9 , pid) This rawks, thanks! Works great. (Note-- have to use the unpacked pid to kill the process, but it works like a charm.) -Chris PS Whoda thunk Ruby would let you do a "kill -9" on Windows? I'm amused... From christopher.mcmahon at gmail.com Mon Nov 7 15:17:35 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 7 Nov 2005 14:17:35 -0600 Subject: [Wtr-general] Code to really really really kill IE Message-ID: <72799cd70511071217o4990a83bo8767c9a627102e40@mail.gmail.com> Thanks Paul, I put it together in an easy example. This is tested and works: require 'win32ole' require 'watir' # the controller include Watir require 'Win32API' @ie = IE.new hWnd = @ie.ie.hWnd pid=" " * 32 thread= Win32API.new("user32", "GetWindowThreadProcessId", 'IP', 'I').Call(hWnd,pid) fixnum_pid = pid.unpack("L")[0] puts fixnum_pid Process.kill( 9 , fixnum_pid) From carl.l.shaulis at convergys.com Mon Nov 7 15:55:01 2005 From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com) Date: Mon, 7 Nov 2005 14:55:01 -0600 Subject: [Wtr-general] Controlling threads & testing speed Message-ID: Good afternoon, Unfortunately I did not receive any response to a post on Nov. 3 -Reliability and thread management, so I thought I would try again. I am having some problems with a couple of our scripts. What tricks are available for timing threads and controlling the speed of WATIR? How can we make sure a thread has ended? The basic concern is that the WATIR script will work, then it may not work, and eventually it will work again without any modification to the code or application. These scripts involve modals and pop ups. I believe it is a timing issue, but I am not certain. Has anyone else experienced this type of behavior? Any thoughts and suggestions would be greatly appreciated. Thanks, Carl -- "NOTICE: The information contained in this electronic mail transmission is intended by Convergys Corporation for the use of the named individual or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone (collect), so that the sender's address records can be corrected." From paul.rogers at shaw.ca Mon Nov 7 16:05:20 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 07 Nov 2005 14:05:20 -0700 Subject: [Wtr-general] Code to really really really kill IE Message-ID: we should probably add this as a ( or some ) methods ie.hWnd ie.pid ie.kill ----- Original Message ----- From: Chris McMahon Date: Monday, November 7, 2005 1:17 pm Subject: [Wtr-general] Code to really really really kill IE > Thanks Paul, I put it together in an easy example. This is tested > and works: > > require 'win32ole' > require 'watir' # the controller > include Watir > require 'Win32API' > > @ie = IE.new > hWnd = @ie.ie.hWnd > pid=" " * 32 > thread= Win32API.new("user32", "GetWindowThreadProcessId", 'IP', > 'I').Call(hWnd,pid) > fixnum_pid = pid.unpack("L")[0] > puts fixnum_pid > Process.kill( 9 , fixnum_pid) > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Mon Nov 7 16:06:46 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 07 Nov 2005 14:06:46 -0700 Subject: [Wtr-general] Controlling threads & testing speed Message-ID: hi Carl, if you can post some repeatable code/html unit tests that really helps getting things fixed. The pop up handling has not been very good in watir, and we need to improve it. Paul ----- Original Message ----- From: carl.l.shaulis at convergys.com Date: Monday, November 7, 2005 1:55 pm Subject: [Wtr-general] Controlling threads & testing speed > > > > > Good afternoon, > > Unfortunately I did not receive any response to a post on Nov. 3 > -Reliability and thread management, so I thought I would try again. > > I am having some problems with a couple of our scripts. > > What tricks are available for timing threads and controlling the > speed of > WATIR? > How can we make sure a thread has ended? > > The basic concern is that the WATIR script will work, then it may > not work, > and eventually it will work again without any modification to the > code or > application. These scripts involve modals and pop ups. I believe > it is a > timing issue, but I am not certain. > > Has anyone else experienced this type of behavior? > > Any thoughts and suggestions would be greatly appreciated. > > Thanks, > > Carl > -- > "NOTICE: The information contained in this electronic mail > transmission is > intended by Convergys Corporation for the use of the named > individual or > entity to which it is directed and may contain information that is > privileged or otherwise confidential. If you have received this > electronicmail transmission in error, please delete it from your > system without > copying or forwarding it, and notify the sender of the error by > reply email > or by telephone (collect), so that the sender's address records > can be > corrected." > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From bagee at aventail.com Mon Nov 7 16:12:36 2005 From: bagee at aventail.com (Bill Agee) Date: Mon, 7 Nov 2005 13:12:36 -0800 Subject: [Wtr-general] Controlling threads & testing speed Message-ID: <30561FB511309F44A56833A491C9FEC6026A1F1F@exchange2.in.aventail.com> > -----Original Message----- > Subject: [Wtr-general] Controlling threads & testing speed > What tricks are available for timing threads and controlling > the speed of WATIR? How can we make sure a thread has ended? > > The basic concern is that the WATIR script will work, then it > may not work, and eventually it will work again without any > modification to the code or application. These scripts > involve modals and pop ups. I believe it is a timing issue, > but I am not certain. > > Has anyone else experienced this type of behavior? > [...snip...] I too initially had some problems with timing issues in my popup-dismissing threads. But since then I've had success using sleep() mixed in with creation of threads, as in the example below. Since doing this I've had no further problems with timing issues and simple popup dismissing tasks (knock wood): ============================================= def navigate (address) req01 = Thread.new { goto(address) } # wait a sec for the 'entering HTTPS' IE prompt to appear: sleep(1) # dismiss first IE prompt: req02 = Thread.new { btnclk('Security Alert', 'OK') } # wait for the SSL y/n/cancel prompt to appear: sleep(1) # another button click to dismiss the SSL cert prompt: req03 = Thread.new { btnclk('Security Alert', 'Yes') } # wait for all threads to complete before continuing: req01.join req02.join req03.join end ============================================= (The 'btnclk' method shown above is just a wrapper around an autoit-like DLL I'm using to dismiss windows.) Thanks Bill From sy1234 at gmail.com Mon Nov 7 21:51:19 2005 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 7 Nov 2005 20:51:19 -0600 Subject: [Wtr-general] How to leave the Browser Window open after test is completed... In-Reply-To: <20051107181234.59732.qmail@web52905.mail.yahoo.com> References: <1e55af990511062035r4cf9248ey31bd580c6a50a55d@mail.gmail.com> <20051107181234.59732.qmail@web52905.mail.yahoo.com> Message-ID: <1e55af990511071851s467c70f2h30047a9e1570bc2a@mail.gmail.com> On 11/7/05, Roy Sin wrote: > Sy, > > Instead of the gets I have added > puts "this test case has now completed." > at the end of my script works great now. > > thanks > > p.s: still weird :-) that is my only TC I had to do that. This is wierd enough that perhaps it should be posted and noted as a bug.. I hate when inconsistant things like that happen. From bret at pettichord.com Tue Nov 8 01:54:23 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 08 Nov 2005 00:54:23 -0600 Subject: [Wtr-general] New Watir Wiki, was Re: FAQ Update In-Reply-To: <1e55af990511061445w72a16630x7526b44c60dd851e@mail.gmail.co m> References: <5.1.0.14.2.20051105203413.03da8e88@pop.gmail.com> <5.1.0.14.2.20051028010239.03a76340@pop.gmail.com> <5.1.0.14.2.20051105203413.03da8e88@pop.gmail.com> Message-ID: <5.1.0.14.2.20051108004740.03e0cf48@pop.gmail.com> I'm very interested in Sy's proposal (below) to host the Watir project wiki using Media Wiki. I've used Wikipedia before, and i did find it to be a pretty good system. I don't have any particular attachment to what we are using now, which is just what rubyforge provides. I'm particular interested to know the views of the people who've made a lot of contibutions to our wiki. My only concern is that if we have usernames to access, it would be nice if we could recycle the rubyforge usernames, just because that would make it easier for our contributors. But i'm not sure if that is really possible. Comments? Bret At 04:45 PM 11/6/2005, Sy Ali wrote: >On 11/5/05, Bret Pettichord wrote: > > At 03:46 PM 11/4/2005, Sy Ali wrote: > > >I'd still rather like to update the entire wiki by > > >migrating it to mediawiki. It was rather annoying to have had to wade > > >through that FAQ the few times that I did in order to clean it up > > >somewhat (and also answer my own questions). > > > > Thanks for cleaning it up. It looks a lot bettter. > > > > We are always open to specific proposals. Why would media wiki be better? > > Where would it be hosted? > >My main issue with the existing wiki is their markup language. The >insistance of "CamelCase" links forces broken english titles and poor >sentances and is an eyesore to edit. > >The main benefits of mediawiki would be the various different skins. >I'm a particular fan of the default skin. It's quite beautiful. This >is the first and foremost thing that everyday users would see. The >second would be the much nicer organization of the information. From >experience, I can say that it's been intuitive to organize and >maintain a lot of information within a mediawiki installation. > >On the inside, the editing is very easy (the markup language is good). > It's extremely nice to be able to edit just a section of a page.. one >doesn't get lost on more complecated pages like a FAQ. Automatic >table of contents is nice. The templating engine allows for easy >re-use of snippets of information. Adding inline images is trivial. > >For more technical reasons, mediawiki is very easy to update and >maintain. Updating it amounts to unpacking the new tarball over the >previous directory and running "php update.php" (or without ssh >access, it's still quite easy). It's extremely easy to supervise, >with controls for viewing recent changes and the lke. > >For more social reasons, MediaWiki is wildly popular and in my mind >proved as an excellent tool because of its use for the Wikipedia. >This is what would assure continued development.. there are a lot of >interested people. > > >My only warnings are to require usernames for editing, to use the >spamblacklist extension and to include a one-liner regex to ban >certain types of content. I can provide help with these things. > >If hosting is an issue, I'd be pleased to host it with my resources.. >but it'll go anywhere php/mysql does. > >Curiously, it looks like the markup language is almost the same from >the existing wiki to mediawiki. This means that it would be nearly >trivial to hand-port the content from the existing wiki to a mediawiki >installation. Yes, I would be willing to do this and unless you've >got hundreds of pages of content I could get it done within two weeks. > This would include the original wiki's content as well. > >My own wiki: >http://jrandomhacker.info >http://jrandomhacker.info/MediaWiki > >I also help maintain two other wikis: >My local Linux user group (GTALUG): >http://gtalug.org > >My local Ruby user group (TRUG): >http://trug.stok.co.uk/wiki/ >soon to be http://trug.ca > >I've set up MediaWiki for my old work and my current business. This >is after a long and tiring history with a few other wikis. MediaWiki >has been amazing. > > >In the meantime, I intend to open up a Watir-specific section in TRUG >since I've just begun working with watir and need to begin a resource >and code repository. Sorry for being long-winded.. but I just got >back from our meeting and am revved up. =) > > >Sy, > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From Jan.Montano at thomson.com Tue Nov 8 02:31:20 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Tue, 8 Nov 2005 15:31:20 +0800 Subject: [Wtr-general] 1.4_1 Message-ID: hi! I installed 1.4_1.exe of watir and It is installed on program files\watir. I run myy script created from 1.3 but this error occurs No such file to load -- unittests/setup c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__' Press ENTER to close the window... What's the meaning of this and how do I fix it? tnx. From Jan.Montano at thomson.com Tue Nov 8 02:34:16 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Tue, 8 Nov 2005 15:34:16 +0800 Subject: [Wtr-general] 1.4_1 Message-ID: I put my script on unittest from the 1.4 installation ffolder. > -----Original Message----- > From: Montano, Jan (Corp,IB&IM) > Sent: Tuesday, November 08, 2005 3:31 PM > To: Watir (E-mail) > Subject: 1.4_1 > > hi! I installed 1.4_1.exe of watir > > and It is installed on program files\watir. > > I run myy script created from 1.3 but this error occurs > > No such file to load -- unittests/setup > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__' > Press ENTER to close the window... > > What's the meaning of this and how do I fix it? tnx. From Jan.Montano at thomson.com Tue Nov 8 05:52:52 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Tue, 8 Nov 2005 18:52:52 +0800 Subject: [Wtr-general] if textfield is read only? Message-ID: Thanks! but how about if s radio, select_list is disabled or not? I can't find it in the rdoc. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Zeljko Filipin Sent: Thursday, November 03, 2005 4:54 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] if textfield is read only? html: watir: ie.textField(:index, 1).readonly? Watir code will return true if text box is readonly, and false if not. I found it at http://wtr.rubyforge.org/rdoc/index.html 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: Thursday, November 03, 2005 9:27 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] if textfield is read only? How will we know if a text box is read only or not? _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From zeljko.filipin at gmail.com Tue Nov 8 06:16:45 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 8 Nov 2005 12:16:45 +0100 Subject: [Wtr-general] if textfield is read only? In-Reply-To: Message-ID: <001401c5e455$e8b7f450$c6e7fea9@officezg.wa> This works for me ie.textField(:index, 1).disabled and, yes, I also think this would be more intuititve ie.textField(:index, 1).disabled? Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jan.Montano at thomson.com Sent: Tuesday, November 08, 2005 11:53 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] if textfield is read only? Thanks! but how about if s radio, select_list is disabled or not? I can't find it in the rdoc. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Zeljko Filipin Sent: Thursday, November 03, 2005 4:54 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] if textfield is read only? html: watir: ie.textField(:index, 1).readonly? Watir code will return true if text box is readonly, and false if not. I found it at http://wtr.rubyforge.org/rdoc/index.html 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: Thursday, November 03, 2005 9:27 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] if textfield is read only? How will we know if a text box is read only or not? _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From zeljko.filipin at gmail.com Tue Nov 8 06:19:24 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 8 Nov 2005 12:19:24 +0100 Subject: [Wtr-general] if textfield is read only? In-Reply-To: Message-ID: <001501c5e456$484a81d0$c6e7fea9@officezg.wa> And I could not find it in rdoc, too. :) Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jan.Montano at thomson.com Sent: Tuesday, November 08, 2005 11:53 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] if textfield is read only? Thanks! but how about if s radio, select_list is disabled or not? I can't find it in the rdoc. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Zeljko Filipin Sent: Thursday, November 03, 2005 4:54 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] if textfield is read only? html: watir: ie.textField(:index, 1).readonly? Watir code will return true if text box is readonly, and false if not. I found it at http://wtr.rubyforge.org/rdoc/index.html 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: Thursday, November 03, 2005 9:27 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] if textfield is read only? How will we know if a text box is read only or not? _______________________________________________ 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 Jan.Montano at thomson.com Tue Nov 8 09:42:28 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Tue, 8 Nov 2005 22:42:28 +0800 Subject: [Wtr-general] if textfield is read only? Message-ID: the funny thing is I only tried enabled and enabled? hehehe. Thanks Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Zeljko Filipin Sent: Tuesday, November 08, 2005 7:19 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] if textfield is read only? And I could not find it in rdoc, too. :) Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jan.Montano at thomson.com Sent: Tuesday, November 08, 2005 11:53 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] if textfield is read only? Thanks! but how about if s radio, select_list is disabled or not? I can't find it in the rdoc. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Zeljko Filipin Sent: Thursday, November 03, 2005 4:54 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] if textfield is read only? html: watir: ie.textField(:index, 1).readonly? Watir code will return true if text box is readonly, and false if not. I found it at http://wtr.rubyforge.org/rdoc/index.html 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: Thursday, November 03, 2005 9:27 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] if textfield is read only? How will we know if a text box is read only or not? _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From zeljko.filipin at gmail.com Tue Nov 8 09:54:06 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 8 Nov 2005 15:54:06 +0100 Subject: [Wtr-general] if textfield is read only? In-Reply-To: Message-ID: <003601c5e474$45575de0$c6e7fea9@officezg.wa> I think I found it with this ie.textField(:index, 1).methods Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jan.Montano at thomson.com Sent: Tuesday, November 08, 2005 3:42 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] if textfield is read only? the funny thing is I only tried enabled and enabled? hehehe. Thanks Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Zeljko Filipin Sent: Tuesday, November 08, 2005 7:19 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] if textfield is read only? And I could not find it in rdoc, too. :) Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jan.Montano at thomson.com Sent: Tuesday, November 08, 2005 11:53 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] if textfield is read only? Thanks! but how about if s radio, select_list is disabled or not? I can't find it in the rdoc. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Zeljko Filipin Sent: Thursday, November 03, 2005 4:54 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] if textfield is read only? html: watir: ie.textField(:index, 1).readonly? Watir code will return true if text box is readonly, and false if not. I found it at http://wtr.rubyforge.org/rdoc/index.html 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: Thursday, November 03, 2005 9:27 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] if textfield is read only? How will we know if a text box is read only or not? _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From maillist at roomity.com Tue Nov 8 16:51:07 2005 From: maillist at roomity.com (shenanigans) Date: Tue, 8 Nov 2005 13:51:07 -0800 (PST) Subject: [Wtr-general] Roomity.com v 1.5 is a web 2.01 Message-ID: <19884999.3171131486667278.JavaMail.tomcat5@slave1.roomity.com> I was interested in getting feedback from current mail group users. We have mirrored your mail list in a new application that provides a more aggregated and safe environment which utilizes the power of broadband. Roomity.com v 1.5 is a web 2.01 community webapp. Our newest version adds broadcast video and social networking such as favorite authors and an html editor. It?s free to join and any feedback would be appreciated. S. -------------------------------------------------------------------------------------------------------------------------------------------------- Broadband interface (RIA) + mail box saftey = WTR_General_Discussion_List.roomity.com *Your* clubs, no sign up to read, ad supported; try broadband internet. ~~1131486667275~~ -------------------------------------------------------------------------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051108/c08c10de/attachment.html From Ben.Torres at rhi.com Tue Nov 8 20:04:54 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Tue, 8 Nov 2005 17:04:54 -0800 Subject: [Wtr-general] Get index for image Message-ID: <1641BB0AA7287848817A63C3EE9677D508FD8234@hqp-ex-mb05.na.msds.rhi.com> The web page I am testing has images that have the same src. I can click the first one by doing ie.image(:src, /add/).click. Is there any way I can click the next /add/ button? I was hoping the get the index number of the first image and just do a +1 to get to the next button. From bret at pettichord.com Tue Nov 8 23:28:57 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 08 Nov 2005 22:28:57 -0600 Subject: [Wtr-general] Load error, was Re: 1.4_1 In-Reply-To: Message-ID: <5.1.0.14.2.20051108222641.03df98d0@pop.gmail.com> At 01:31 AM 11/8/2005, Jan.Montano at thomson.com wrote: >No such file to load -- unittests/setup >c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__' >Press ENTER to close the window... > >What's the meaning of this and how do I fix it? It means that the file unittests/setup.rb is not in your load path. This file is part of the unit tests for Watir. You probably shouldn't be using it for your own scripts. This will show you what your load path is: > ruby -e 'puts $LOAD_PATH' _____________________ Bret Pettichord www.pettichord.com From jeff.darklight at gmail.com Wed Nov 9 04:04:01 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 9 Nov 2005 01:04:01 -0800 Subject: [Wtr-general] Get index for image In-Reply-To: <1641BB0AA7287848817A63C3EE9677D508FD8234@hqp-ex-mb05.na.msds.rhi.com> References: <1641BB0AA7287848817A63C3EE9677D508FD8234@hqp-ex-mb05.na.msds.rhi.com> Message-ID: Well, you could do ie.images( :src, /add/ )[x].click where x is the number you want.... 1, 2, 3 ( one-based index ) j. On 11/8/05, Torres, Ben (HQP) wrote: > > The web page I am testing has images that have the same src. I can > click the first one by doing ie.image(:src, /add/).click. Is there any > way I can click the next /add/ button? I was hoping the get the index > number of the first image and just do a +1 to get to the next button. > > > _______________________________________________ > 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/20051109/3b0344aa/attachment.html From buggins at byte-force.com Wed Nov 9 04:11:52 2005 From: buggins at byte-force.com (Yury Krasavin) Date: Wed, 9 Nov 2005 12:11:52 +0300 Subject: [Wtr-general] Assertions trouble Message-ID: <000701c5e50d$9fa01050$5864bbd5@byteforce.yar.ru> >The assert method in Test::Unit::Assertions is different from the >assert method in Test::Unit::TestCase in one way: it is not included in >the total count. >I am wondering if something like the following might not work for you. >If it does, let us know. >Bret Hi. Many thanks for the tool! I preciate it much, and write here first time, because I have some ideas and questions on the subject. To be included in the test case's count the class should call its "add_assertion". As the "assert" method itself calls its virtual "add_assertion", now I use this kind of a mixin: module TestManager include Test::Unit::Assertions def add_assertion @currentCase.send :add_assertion end def assertions_bind_to(testCase) @bindStack = Array.new unless @bindStack @bindStack.push @currentCase if @currentCase @currentCase = testCase end def assertions_unbind_from(testCase) raise "No binds were made" unless @currentCase raise ArgumentError.new( "Last bind was to #{@currentCase} not to #{testCase}" ) unless @currentCase == testCase @currentCase = @bindStack.pop end end That is the way I use it: require 'TestManager' class UserManager include TestManager def login . assert is_logged_in end . end And that is the test case will look like: class TC_User < Test::Unit::TestCase def test_scenario user = UserManager.new user.assertions_bind_to self . end # I use setup and teardown methods to bind global asserting utilities. def setup TestApplication.assertions_bind_to self end def teardown TestApplication.assertions_unbind_from self end end But I still wonder if it could be done more elegant. For instance, I would like to use reflection in the TestManager, to define the test case it was called from. Still I am not aware it is possible. Yury From Ben.Torres at rhi.com Wed Nov 9 18:46:20 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Wed, 9 Nov 2005 15:46:20 -0800 Subject: [Wtr-general] Get index for image Message-ID: <1641BB0AA7287848817A63C3EE9677D508FD863F@hqp-ex-mb05.na.msds.rhi.com> I tried this: ie.images(:src, /add/)[2].click But got this error, "C:/watir/CRIScripts/test.rb:22:in `images': wrong number of arguments (2 for 0)(ArgumentError)" I tried using image instead of images: ie.image(:src, /add/)[2].click But got this error, "C:/watir/CRIScripts/test.rb:22: undefined method `[]' for # (NoMethodError)" Is my syntax correct? From jeff.darklight at gmail.com Wed Nov 9 19:13:13 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 9 Nov 2005 16:13:13 -0800 Subject: [Wtr-general] Get index for image In-Reply-To: <1641BB0AA7287848817A63C3EE9677D508FD863F@hqp-ex-mb05.na.msds.rhi.com> References: <1641BB0AA7287848817A63C3EE9677D508FD863F@hqp-ex-mb05.na.msds.rhi.com> Message-ID: Interesting, in my testing ie.images[1] ie.images[2] work fine, but if you add any selection criteria, you can't do the indexing. .images is the correct thing to call. we'll have to check with bret. j. On 11/9/05, Torres, Ben (HQP) wrote: > > I tried this: > ie.images(:src, /add/)[2].click > > But got this error, "C:/watir/CRIScripts/test.rb:22:in `images': wrong > number of arguments (2 for 0)(ArgumentError)" > > I tried using image instead of images: > ie.image(:src, /add/)[2].click > > But got this error, "C:/watir/CRIScripts/test.rb:22: undefined method > `[]' for # (NoMethodError)" > > Is my syntax correct? > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051109/5526b2ac/attachment.html From dara.lillis at kiodex.com Wed Nov 9 19:27:34 2005 From: dara.lillis at kiodex.com (Dara Lillis) Date: Wed, 9 Nov 2005 16:27:34 -0800 Subject: [Wtr-general] IE.contains_text and assert Message-ID: <4AE2782C2093B34784E67971035A81600A83842E@ehost011-2.exch011.intermedia.net> Hi, I'm relatively new to Watir and am having some problems with asserts on IE.contains_text, hoping for some enlightenment. Basically, my problem is as follows; I have some code that says (essentially): assert(ie.contains_text("abcd")) This seems to work ok when "abcd" is present, but fails (and causes my test to stop running) when "abcd" is not present. The reason for the failure seems to be that ie.contains_text returns rather than "false" In attempting to find out what is going on I've been outputting the result of ie.contains_text to the console and notice that when "abcd" is present (and the assert passes) the returned value of contains_text is "522" when I was expecting "true" I'm finding this all a bit confusing. Can someone explain it to me? Thanks, -Dara -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051109/e20af5cf/attachment.html From jeff.darklight at gmail.com Wed Nov 9 19:29:25 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 9 Nov 2005 16:29:25 -0800 Subject: [Wtr-general] Get index for image In-Reply-To: References: <1641BB0AA7287848817A63C3EE9677D508FD863F@hqp-ex-mb05.na.msds.rhi.com> Message-ID: Ah, images takes NO input parameters. So, you can only get the collection. then iterate them. So, to do what you want ... you would have to do something like: ie.images.select { |curr| curr.src =~ /add] }[2].click ... j. On 11/9/05, Jeff Wood wrote: > > Interesting, in my testing > > ie.images[1] > ie.images[2] > > work fine, but if you add any selection criteria, you can't do the > indexing. > > .images is the correct thing to call. > > we'll have to check with bret. > > j. > > > On 11/9/05, Torres, Ben (HQP) wrote: > > > > I tried this: > > ie.images(:src, /add/)[2].click > > > > But got this error, "C:/watir/CRIScripts/test.rb:22:in `images': wrong > > number of arguments (2 for 0)(ArgumentError)" > > > > I tried using image instead of images: > > ie.image(:src, /add/)[2].click > > > > But got this error, "C:/watir/CRIScripts/test.rb:22: undefined method > > `[]' for # (NoMethodError)" > > > > Is my syntax correct? > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > -- > "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" > > Jeff Wood -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051109/c87cfe3b/attachment.html From jeff.darklight at gmail.com Wed Nov 9 19:30:00 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 9 Nov 2005 16:30:00 -0800 Subject: [Wtr-general] Get index for image In-Reply-To: References: <1641BB0AA7287848817A63C3EE9677D508FD863F@hqp-ex-mb05.na.msds.rhi.com> Message-ID: just remember that the index after the block is zero-based not one based like watir does things. j. On 11/9/05, Jeff Wood wrote: > > Ah, images takes NO input parameters. > > So, you can only get the collection. then iterate them. > > So, to do what you want ... you would have to do something like: > > ie.images.select { |curr| curr.src =~ /add] }[2].click > > ... > > j. > > On 11/9/05, Jeff Wood wrote: > > > > Interesting, in my testing > > > > ie.images[1] > > ie.images[2] > > > > work fine, but if you add any selection criteria, you can't do the > > indexing. > > > > .images is the correct thing to call. > > > > we'll have to check with bret. > > > > j. > > > > > > On 11/9/05, Torres, Ben (HQP) wrote: > > > > > > I tried this: > > > ie.images(:src, /add/)[2].click > > > > > > But got this error, "C:/watir/CRIScripts/test.rb:22:in `images': wrong > > > number of arguments (2 for 0)(ArgumentError)" > > > > > > I tried using image instead of images: > > > ie.image(:src, /add/)[2].click > > > > > > But got this error, "C:/watir/CRIScripts/test.rb:22: undefined method > > > `[]' for # (NoMethodError)" > > > > > > Is my syntax correct? > > > > > > > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > -- > > "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" > > > > Jeff Wood > > > > > -- > "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" > > Jeff Wood > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051109/f3d0b336/attachment.html From jeff.darklight at gmail.com Wed Nov 9 19:31:28 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 9 Nov 2005 16:31:28 -0800 Subject: [Wtr-general] IE.contains_text and assert In-Reply-To: <4AE2782C2093B34784E67971035A81600A83842E@ehost011-2.exch011.intermedia.net> References: <4AE2782C2093B34784E67971035A81600A83842E@ehost011-2.exch011.intermedia.net> Message-ID: contains_text returns the index where the text was found or nil when it's not.. try assert( ie.contains_text( "abcd" ) != nil ) j. On 11/9/05, Dara Lillis wrote: > > Hi, > > I'm relatively new to Watir and am having some problems with asserts on > IE.contains_text, hoping for some enlightenment. > > Basically, my problem is as follows; I have some code that says > (essentially): > > assert(ie.contains_text("abcd")) > > This seems to work ok when "abcd" is present, but fails (and causes my > test to stop running) when "abcd" is not present. The reason for the failure > seems to be that ie.contains_text returns rather than "false" > > In attempting to find out what is going on I've been outputting the result > of ie.contains_text to the console and notice that when "abcd" is present > (and the assert passes) the returned value of contains_text is "522" when I > was expecting "true" > > I'm finding this all a bit confusing. Can someone explain it to me? > > Thanks, > > -Dara > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051109/901eb852/attachment.html From bret at pettichord.com Wed Nov 9 19:52:51 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 09 Nov 2005 18:52:51 -0600 Subject: [Wtr-general] IE.contains_text and assert In-Reply-To: <4AE2782C2093B34784E67971035A81600A83842E@ehost011-2.exch01 1.intermedia.net> Message-ID: <5.1.0.14.2.20051109185100.029331a0@pop.gmail.com> At 06:27 PM 11/9/2005, Dara Lillis wrote: >assert(ie.contains_text("abcd")) This is correct. >This seems to work ok when "abcd" is present, but fails (and causes my >test to stop running) when "abcd" is not present. The reason for the >failure seems to be that ie.contains_text returns rather than "false" This is how it is supposed to work. Assert means to fail and stop running. In Ruby, nil counts as false, so that is not a problem at all. What did you want it to do? _____________________ Bret Pettichord www.pettichord.com From dara.lillis at kiodex.com Wed Nov 9 20:10:18 2005 From: dara.lillis at kiodex.com (Dara Lillis) Date: Wed, 9 Nov 2005 17:10:18 -0800 Subject: [Wtr-general] IE.contains_text and assert Message-ID: <4AE2782C2093B34784E67971035A81600A83848C@ehost011-2.exch011.intermedia.net> That explains it. Thanks for the quick answer. No good deed goes unpunished, so: The Rdoc for contains_text (http://wtr.rubyforge.org/rdoc/classes/Watir/IE.html#M000294) does say "Returns true if the specified text was found." Is that wrong? Why were my asserts passing when receiving an index (i.e. a number string) rather than "true"? -D Date: Wed, 9 Nov 2005 16:31:28 -0800 From: Jeff Wood Subject: Re: [Wtr-general] IE.contains_text and assert To: wtr-general at rubyforge.org Message-ID: Content-Type: text/plain; charset="iso-8859-1" contains_text returns the index where the text was found or nil when it's not.. try assert( ie.contains_text( "abcd" ) != nil ) j. On 11/9/05, Dara Lillis wrote: > > Hi, > > I'm relatively new to Watir and am having some problems with asserts > on IE.contains_text, hoping for some enlightenment. > > Basically, my problem is as follows; I have some code that says > (essentially): > > assert(ie.contains_text("abcd")) > > This seems to work ok when "abcd" is present, but fails (and causes my > test to stop running) when "abcd" is not present. The reason for the > failure seems to be that ie.contains_text returns rather than "false" > > In attempting to find out what is going on I've been outputting the > result of ie.contains_text to the console and notice that when "abcd" > is present (and the assert passes) the returned value of contains_text > is "522" when I was expecting "true" > > I'm finding this all a bit confusing. Can someone explain it to me? > > Thanks, > > -Dara > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051109/901eb852 /attachment.htm ------------------------------ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general End of Wtr-general Digest, Vol 24, Issue 12 ******************************************* From wmwilson01 at gmail.com Wed Nov 9 20:46:07 2005 From: wmwilson01 at gmail.com (wmwilson) Date: Wed, 9 Nov 2005 20:46:07 -0500 Subject: [Wtr-general] IE.contains_text and assert In-Reply-To: <4AE2782C2093B34784E67971035A81600A83848C@ehost011-2.exch011.intermedia.net> References: <4AE2782C2093B34784E67971035A81600A83848C@ehost011-2.exch011.intermedia.net> Message-ID: <501fe3800511091746o3f01a021g4ad0b96cda8fc575@mail.gmail.com> On 11/9/05, Dara Lillis wrote: > That explains it. Thanks for the quick answer. No good deed goes > unpunished, so: > > The Rdoc for contains_text > (http://wtr.rubyforge.org/rdoc/classes/Watir/IE.html#M000294) does say > "Returns true if the specified text was found." Is that wrong? > > Why were my asserts passing when receiving an index (i.e. a number > string) rather than "true"? > Because, in Ruby, everything is true except for nil and false From Jan.Montano at thomson.com Wed Nov 9 22:47:16 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Thu, 10 Nov 2005 11:47:16 +0800 Subject: [Wtr-general] can't find label Message-ID: given: 2005/10 I tried this: assert($ie.label(:id,"lblMonth1").innerText=="2005/10") but: Watir::Exception::UnknownObjectException: Unable to locate object, using id and lblMonth1 Am I doing it wrong? From bret at pettichord.com Thu Nov 10 00:15:32 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 09 Nov 2005 23:15:32 -0600 Subject: [Wtr-general] IE.contains_text and assert In-Reply-To: <4AE2782C2093B34784E67971035A81600A83848C@ehost011-2.exch01 1.intermedia.net> Message-ID: <5.1.0.14.2.20051109231433.02d47cd0@pop.gmail.com> At 07:10 PM 11/9/2005, Dara Lillis wrote: >The Rdoc for contains_text >(http://wtr.rubyforge.org/rdoc/classes/Watir/IE.html#M000294) does say >"Returns true if the specified text was found." Is that wrong? > >Why were my asserts passing when receiving an index (i.e. a number >string) rather than "true"? I'm happy to update the rdoc for this. Please suggest something that would be accurate and helpful. _____________________ Bret Pettichord www.pettichord.com From jeff.darklight at gmail.com Thu Nov 10 01:20:46 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 9 Nov 2005 22:20:46 -0800 Subject: [Wtr-general] can't find label In-Reply-To: References: Message-ID: It's not a label, it's a span. try: assert( $ie.span( :id, "lblMonth1" ).innerText == "2005/10" ) ... j. On 11/9/05, Jan.Montano at thomson.com wrote: > given: > 2005/10 > > I tried this: > assert($ie.label(:id,"lblMonth1").innerText=="2005/10") > > but: > Watir::Exception::UnknownObjectException: Unable to locate object, using id and lblMonth1 > > Am I doing it wrong? > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood From mfeliz at hphis.com Thu Nov 10 03:52:14 2005 From: mfeliz at hphis.com (=?iso-8859-1?Q?Miguel_Jos=E9_MFB=2E_Feliz_Bernardino?=) Date: Thu, 10 Nov 2005 09:52:14 +0100 Subject: [Wtr-general] Knowing when a browser closes Message-ID: <5B2AE0722B941D459DDDB2D3B09C202A8960AA@hphis1.hisdom.hphis.com> Hi I'm having some problems with the use of wait(), so the first solution I took was to replace them in the places where i had problems, with some sleep() statement. The problem is that the application I'm running my scripts on, takes different execution times every time I run the scripts. The solution was to place some while() routines in order to know if the application has finished it's work. Until this point no much problem....the real problem is that the application starts some other browsers that will auto close themselves, and that I'm unable to figure out when they're closed. I'll show you a bit of the script: (I'm using a mix of Watir/Wet on this) @b.Frame("name:=xxxxx").Link("title:=x").click() b1 = Browser("title:=yyyy") b1.Image("title:=yy").click() sleep 3 b2 = Browser("title:=zzzzz") b2.frame("z").text_field(:name, "zzz").set zzz b2.Frame("name:=z1").Image("alt:=z").click() sleep 2 b2.Frame("name:=z2").Link("text:=" + zzzzzzz).click() sleep 5 b1.Image("title:=yyy").click() The browser b2 closes itself.....how can I know when It closes? Regards Miguel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051110/918735d4/attachment.html From satti at qantom.com Thu Nov 10 08:07:39 2005 From: satti at qantom.com (Sathya Shankar) Date: Thu, 10 Nov 2005 18:37:39 +0530 Subject: [Wtr-general] Knowing when a browser closes In-Reply-To: <5B2AE0722B941D459DDDB2D3B09C202A8960AA@hphis1.hisdom.hphis.com> References: <5B2AE0722B941D459DDDB2D3B09C202A8960AA@hphis1.hisdom.hphis.com> Message-ID: <4373461B.8080503@qantom.com> Hi Unfortunately there is no option for the checking the browser exists or not :-( . But this is a nasty workaround for this issue. Here is the sample script that i used to test this. ie=Browser.new() ie.goto("http://www.wet.qantom.org") b = Browser("title:=/.*WET.*/") puts b.browser_hwnd() sleep 10 begin puts b.browser_hwnd() rescue puts "Browser closed ? " end As soon as the browser was opened and then the website was opened. I closed the browser(at lesser than 10 seconds). and it did work fine. So use the browser_hwnd() option to check the existance of the Browser. I am going to put a bug on your behalf in the wet bug tracker. The users should be able to check weather the browser exists or not directly. Sathya Shankar Miguel Jos? MFB. Feliz Bernardino wrote: > Hi > > I?m having some problems with the use of wait(), so the first solution > I took was to replace them in the places where i had problems, with > some sleep() statement. > > The problem is that the application I?m running my scripts on, takes > different execution times every time I run the scripts. The solution > was to place some while() routines in order to know if the application > has finished it?s work. Until this point no much problem?.the real > problem is that the application starts some other browsers that will > auto close themselves, and that I?m unable to figure out when they?re > closed. > > I?ll show you a bit of the script: (I?m using a mix of Watir/Wet on this) > > @b.Frame("name:=xxxxx").Link("title:=x").click() > > b1 = Browser("title:=yyyy") > > b1.Image("title:=yy").click() > > sleep 3 > > b2 = Browser("title:=zzzzz") > > b2.frame("z").text_field(:name, "zzz").set zzz > > b2.Frame("name:=z1").Image("alt:=z").click() > > sleep 2 > > b2.Frame("name:=z2").Link("text:=" + zzzzzzz).click() > > sleep 5 > > b1.Image("title:=yyy").click() > > The browser b2 closes itself?..how can I know when It closes? > > Regards > > Miguel > >------------------------------------------------------------------------ > >_______________________________________________ >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 christopher.mcmahon at gmail.com Thu Nov 10 10:19:57 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 10 Nov 2005 09:19:57 -0600 Subject: [Wtr-general] Watir bug? Message-ID: <72799cd70511100719g4cd84b81kdedc9bbb5aabf046@mail.gmail.com> This is strange, I don't think there should have been a security error-- anyone know what's going on here? irb(main):007:0> @ie.goto("http://msdn.microsoft.com/msdnmag/issues/05/11/CodeAc cessSecurity/default.aspx#void") W, [10-Nov-2005 09:18:55#3184] 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:1340:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1340:in `wait' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1339:in `upto' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1339:in `wait' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1179:in `goto' (irb):7:in `irb_binding' c:/ruby/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding' :0 => 0.02 irb(main):008:0> -Chris From dara.lillis at kiodex.com Thu Nov 10 10:57:46 2005 From: dara.lillis at kiodex.com (Dara Lillis) Date: Thu, 10 Nov 2005 07:57:46 -0800 Subject: [Wtr-general] IE.contains_text and assert Message-ID: <4AE2782C2093B34784E67971035A81600A89B808@ehost011-2.exch011.intermedia.net> How about, "If found, returns the index the where text was found. Returns nil when the text is not found." The Watir Cheat Sheet entry for contains_text says "Return true if the current page has the specified text somewhere on the page. Otherwise, false." Perhaps this should be updated too? Thanks, -Dara ------------------------------ Date: Wed, 09 Nov 2005 23:15:32 -0600 From: Bret Pettichord Subject: Re: [Wtr-general] IE.contains_text and assert To: wtr-general at rubyforge.org Message-ID: <5.1.0.14.2.20051109231433.02d47cd0 at pop.gmail.com> Content-Type: text/plain; charset="us-ascii"; format=flowed At 07:10 PM 11/9/2005, Dara Lillis wrote: >The Rdoc for contains_text >(http://wtr.rubyforge.org/rdoc/classes/Watir/IE.html#M000294) does say >"Returns true if the specified text was found." Is that wrong? > >Why were my asserts passing when receiving an index (i.e. a number >string) rather than "true"? I'm happy to update the rdoc for this. Please suggest something that would be accurate and helpful. _____________________ Bret Pettichord www.pettichord.com ------------------------------ From bret at pettichord.com Thu Nov 10 12:57:51 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 10 Nov 2005 11:57:51 -0600 Subject: [Wtr-general] Watir bug? In-Reply-To: <72799cd70511100719g4cd84b81kdedc9bbb5aabf046@mail.gmail.co m> Message-ID: <5.1.0.14.2.20051110115623.03b197d8@pop.gmail.com> The page contains a frame that is posted on a separate server. http://ads.ddj.com/msdnmag/premium.htm This is known behavior, and this is only a warning. But perhaps we should suppress it. Bret At 09:19 AM 11/10/2005, Chris McMahon wrote: >This is strange, I don't think there should have been a security >error-- anyone know what's going on here? > > >irb(main):007:0> >@ie.goto("http://msdn.microsoft.com/msdnmag/issues/05/11/CodeAc >cessSecurity/default.aspx#void") >W, [10-Nov-2005 09:18:55#3184] 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:1340:in `method_missing' >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1340:in `wait' >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1339:in `upto' >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1339:in `wait' >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1179:in `goto' >(irb):7:in `irb_binding' >c:/ruby/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding' >:0 >=> 0.02 >irb(main):008:0> > >-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 Nov 10 13:24:23 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 10 Nov 2005 12:24:23 -0600 Subject: [Wtr-general] Watir bug? In-Reply-To: <5.1.0.14.2.20051110115623.03b197d8@pop.gmail.com> References: <5.1.0.14.2.20051110115623.03b197d8@pop.gmail.com> Message-ID: <72799cd70511101024n3ead0017u6c7f116a955f92d2@mail.gmail.com> On 11/10/05, Bret Pettichord wrote: > The page contains a frame that is posted on a separate server. > http://ads.ddj.com/msdnmag/premium.htm DARN those Microsoft people !!! =) -Chris From bret at pettichord.com Thu Nov 10 13:13:21 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 10 Nov 2005 12:13:21 -0600 Subject: [Wtr-general] Knowing when a browser closes In-Reply-To: <5B2AE0722B941D459DDDB2D3B09C202A8960AA@hphis1.hisdom.hphis .com> Message-ID: <5.1.0.14.2.20051110121244.03b6a780@pop.gmail.com> At 02:52 AM 11/10/2005, Miguel Jos? MFB. Feliz Bernardino wrote: >The browser b2 closes itself&..how can I know when It closes? You could attach to the new window and then poll it in a while loop. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Nov 10 13:40:11 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 10 Nov 2005 12:40:11 -0600 Subject: [Wtr-general] IE.contains_text and assert In-Reply-To: <4AE2782C2093B34784E67971035A81600A89B808@ehost011-2.exch01 1.intermedia.net> Message-ID: <5.1.0.14.2.20051110121353.03bd32f0@pop.gmail.com> At 09:57 AM 11/10/2005, Dara Lillis wrote: >How about, "If found, returns the index the where text was found. >Returns nil when the text is not found." This is accurate, but i'd like to also get accross that this is intended to be used in if or assert statements. I'm wondering if it might not be better to deprecate ie.contains_text and just encourage people to use ie.text.index or ie.text.match instead. Bret _____________________ Bret Pettichord www.pettichord.com From Tuyet.Ctn at mscibarra.com Thu Nov 10 14:29:17 2005 From: Tuyet.Ctn at mscibarra.com (Cong-Ton-Nu, Tuyet (MSCIBARRA)) Date: Thu, 10 Nov 2005 14:29:17 -0500 Subject: [Wtr-general] Architecting/ Implementing WATIR for a WEB application Message-ID: <937C75B544E7E8428436C67056A3A1730CC6F3@NYWEXMB83.msad.ms.com> Thanks for all the good feedback. Sorry I used the "A" word. What I meant is that we have the chance to start from a blank slate with WATIR, and I'd like to know how others have handled this so we can learn from their experience. It's not often that we get to start all over and I know we'll make "mistakes" along the way, and may have to redo some things, but I'd like to minimize this as much as possible. Thanks again for your valuable input. -------------------------------------------------------- NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051110/06cf63e3/attachment.html From Peter.Ch at NETeller.com Thu Nov 10 15:36:59 2005 From: Peter.Ch at NETeller.com (Peter Chau) Date: Thu, 10 Nov 2005 13:36:59 -0700 Subject: [Wtr-general] Knowing when a browser closes Message-ID: I ran into this problem before and create a method that looks like this # detects whether an IE windows exists or not # returns true if the IE browser still exists (hasn't been closed) or false otherwise class IE def exists? begin return false if @ie.hWnd== -1 return true rescue return false end end end From jeff.darklight at gmail.com Thu Nov 10 15:48:20 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Thu, 10 Nov 2005 12:48:20 -0800 Subject: [Wtr-general] IE.contains_text and assert In-Reply-To: <5.1.0.14.2.20051110121353.03bd32f0@pop.gmail.com> References: <5.1.0.14.2.20051110121353.03bd32f0@pop.gmail.com> Message-ID: Actually, I would say changing the existing function to actually return true or false would be appropriate. Add the ? to the end of the function name, and then let people use ie.text.index etc to get the index of occurance. j. ... the example would be: assert( ie.contains_text? "blah" ) On 11/10/05, Bret Pettichord wrote: > > At 09:57 AM 11/10/2005, Dara Lillis wrote: > >How about, "If found, returns the index the where text was found. > >Returns nil when the text is not found." > > This is accurate, but i'd like to also get accross that this is intended > to > be used in if or assert statements. > > I'm wondering if it might not be better to deprecate ie.contains_text and > just encourage people to use ie.text.index or ie.text.match instead. > > Bret > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051110/9d6ca2e8/attachment.html From jkohl at telusplanet.net Thu Nov 10 17:08:43 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Thu, 10 Nov 2005 14:08:43 -0800 Subject: [Wtr-general] IE.contains_text and assert In-Reply-To: References: <5.1.0.14.2.20051110121353.03bd32f0@pop.gmail.com> Message-ID: <1131660523.4373c4eb1106a@webmail.telusplanet.net> +1 Quoting Jeff Wood : > Actually, I would say changing the existing function to actually return true > or false would be appropriate. Add the ? to the end of the function name, > and then let people use ie.text.index etc to get the index of occurance. > > j. > > ... the example would be: > assert( ie.contains_text? "blah" ) > > > On 11/10/05, Bret Pettichord wrote: > > > > At 09:57 AM 11/10/2005, Dara Lillis wrote: > > >How about, "If found, returns the index the where text was found. > > >Returns nil when the text is not found." > > > > This is accurate, but i'd like to also get accross that this is intended > > to > > be used in if or assert statements. > > > > I'm wondering if it might not be better to deprecate ie.contains_text and > > just encourage people to use ie.text.index or ie.text.match instead. > > > > Bret > > > > _____________________ > > Bret Pettichord > > www.pettichord.com > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > -- > "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" > > Jeff Wood > From c_balzen at yahoo.com Thu Nov 10 19:38:04 2005 From: c_balzen at yahoo.com (Cecil) Date: Thu, 10 Nov 2005 16:38:04 -0800 (PST) Subject: [Wtr-general] Setting request headers Message-ID: <20051111003805.77517.qmail@web34606.mail.mud.yahoo.com> Hi, Would someone share an example or supply links demostrating how to set and get headers the browser will send with the HTTP request? I'm trying to create tests using watir for a site where the returned content differs by header (such as Accept-Language) values. Thanks, -Cecil __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com From roy_sin at yahoo.com Thu Nov 10 20:35:39 2005 From: roy_sin at yahoo.com (Roy Sin) Date: Thu, 10 Nov 2005 17:35:39 -0800 (PST) Subject: [Wtr-general] How to set a checkbox that has no id but has two values attribute Message-ID: <20051111013540.34489.qmail@web52902.mail.yahoo.com> Hi Watir list, I have a check box type as How do I set the check box ? I have tried $ie.frame("admin").checkbox(:name, "nottype[]", 9,16).set but as expected I'm getting wrong number of arguments (4 for 3). thanks __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com From Jan.Montano at thomson.com Thu Nov 10 20:35:07 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Fri, 11 Nov 2005 09:35:07 +0800 Subject: [Wtr-general] can't find label Message-ID: thanks! -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Jeff Wood Sent: Thursday, November 10, 2005 2:21 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] can't find label It's not a label, it's a span. try: assert( $ie.span( :id, "lblMonth1" ).innerText == "2005/10" ) ... j. On 11/9/05, Jan.Montano at thomson.com wrote: > given: > 2005/10 > > I tried this: > assert($ie.label(:id,"lblMonth1").innerText=="2005/10") > > but: > Watir::Exception::UnknownObjectException: Unable to locate object, using id and lblMonth1 > > Am I doing it wrong? > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jeff.darklight at gmail.com Thu Nov 10 21:32:58 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Thu, 10 Nov 2005 18:32:58 -0800 Subject: [Wtr-general] How to set a checkbox that has no id but has two values attribute In-Reply-To: <20051111013540.34489.qmail@web52902.mail.yahoo.com> References: <20051111013540.34489.qmail@web52902.mail.yahoo.com> Message-ID: hmm, try finding it by value using a regular expression $ie.frame( "admin" ).checkbox( :value, /9,16/ ).click ... let me know. I'll try to come up with something else if necessary ... use whatever value shows up when you do a show_all_objects ... Hope that helps ... if it's something that's online, give a url then I can play with it live. Look forward to hearing from you. j. On 11/10/05, Roy Sin wrote: > > Hi Watir list, > > I have a check box type as > > > How do I set the check box ? > > I have tried > $ie.frame("admin").checkbox(:name, "nottype[]", 9,16).set > but as expected I'm getting wrong number of arguments (4 > for 3). > > thanks > > > > > __________________________________ > Yahoo! FareChase: Search multiple travel sites in one click. > http://farechase.yahoo.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051110/2128ef05/attachment.html From jeff.darklight at gmail.com Thu Nov 10 21:39:53 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Thu, 10 Nov 2005 18:39:53 -0800 Subject: [Wtr-general] Setting request headers In-Reply-To: <20051111003805.77517.qmail@web34606.mail.mud.yahoo.com> References: <20051111003805.77517.qmail@web34606.mail.mud.yahoo.com> Message-ID: Hmm, I don't know of a way to do this with WATiR. I would simply do it with a direct HTTP client... YMMV j. On 11/10/05, Cecil wrote: > > Hi, > > Would someone share an example or supply links > demostrating how to set and get headers the browser > will send with the HTTP request? > > I'm trying to create tests using watir for a site > where the returned content differs by header (such as > Accept-Language) values. > > > Thanks, > -Cecil > > > > > > > __________________________________ > Yahoo! Mail - PC Magazine Editors' Choice 2005 > http://mail.yahoo.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051110/cdc6c598/attachment.html From jkohl at telusplanet.net Thu Nov 10 22:02:28 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Thu, 10 Nov 2005 20:02:28 -0700 Subject: [Wtr-general] Setting request headers In-Reply-To: Message-ID: <003a01c5e66c$5a7c7710$6500a8c0@tintin> HTTPUnit, JWebUnit et al would probably work, or maybe something like PureTest from Minq software. -Jonathan ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood Sent: November 10, 2005 7:40 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Setting request headers Hmm, I don't know of a way to do this with WATiR. I would simply do it with a direct HTTP client... YMMV j. On 11/10/05, Cecil wrote: Hi, Would someone share an example or supply links demostrating how to set and get headers the browser will send with the HTTP request? I'm trying to create tests using watir for a site where the returned content differs by header (such as Accept-Language) values. Thanks, -Cecil __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood From paul.rogers at shaw.ca Thu Nov 10 23:08:13 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 10 Nov 2005 21:08:13 -0700 Subject: [Wtr-general] How to set a checkbox that has no id but has twovalues attribute In-Reply-To: Message-ID: <00b501c5e675$890167e0$6600a8c0@NewDell> ie.checkbox(:name , 'notype[]' , '9.16') should work the third argument is a string value that is the value of the radio button or check box Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood Sent: 10 November 2005 19:33 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How to set a checkbox that has no id but has twovalues attribute hmm, try finding it by value using a regular expression $ie.frame( "admin" ).checkbox( :value, /9,16/ ).click ... let me know. I'll try to come up with something else if necessary ... use whatever value shows up when you do a show_all_objects ... Hope that helps ... if it's something that's online, give a url then I can play with it live. Look forward to hearing from you. j. On 11/10/05, Roy Sin wrote: Hi Watir list, I have a check box type as How do I set the check box ? I have tried $ie.frame("admin").checkbox(:name, "nottype[]", 9,16).set but as expected I'm getting wrong number of arguments (4 for 3). thanks __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051110/9c70e5f3/attachment.html From bret at pettichord.com Fri Nov 11 00:37:15 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 10 Nov 2005 23:37:15 -0600 Subject: [Wtr-general] IE.contains_text and assert In-Reply-To: References: <5.1.0.14.2.20051110121353.03bd32f0@pop.gmail.com> <5.1.0.14.2.20051110121353.03bd32f0@pop.gmail.com> Message-ID: <5.1.0.14.2.20051110230117.03c4d588@pop.gmail.com> At 02:48 PM 11/10/2005, Jeff Wood wrote: >Actually, I would say changing the existing function to actually return >true or false would be appropriate. Add the ? to the end of the function >name, and then let people use ie.text.index etc to get the index of occurance. > >j. Hmm. That was how it originally was coded, but it was changed to the current behavior (without updating the rdoc) based on an earlier request on this list. Changing it back will break scripts. Originally, we made several attempts to shield Watir users from Ruby, and in the end, this only created more confusion -- the best of example of this was how we decided to use 1-based indexing in Watir. The lesson i learned is that we are much better off if we follow the Ruby conventions in Watir, explaining them when they may not be intuitive to new users, rather than trying to put together a separate set of conventions that are possibly more intuitive. The suggestion that this method end in a question mark, therefore a good one, since this is the Ruby convention for this kind of thing. But the Ruby way would be to do ie.text.contains? rather than ie.contains_text. And in fact, to do ie.text.contain? since the Ruby convention is to not use the final s (another convention we haven't yet followed very closely with Watir, but would be good to move towards). That suggests ie.text.contain? The biggest qualm i have with this is that implementing this means adding a method to the string class. I don't object to this in principle, but will this confuse users? Looking at the String API, i see that it already provides the method string.include? which does exactly what we want with string arguments. But users would have to use ie.string.match() if they wanted to use regular expressions. A little awkward, but then that is the awkwardness of Ruby and i think the principle that we should follow is not to avoid this. Another reason for my attention to this issue is that we also have TextField#verify_contains which really should have the same method name as IE#contains_text -- it does the same thing. This is another Watir inconsistency that needs to be addressed -- it would be best to move things correctly. Therefore, my proposal: Slowly, deprecate IE#contains_text(), starting with removing it from the intro user documentation, instead encouraging users to use IE#text.include?() instead. (And also introducing IE#text.match() when regular expressions are used.) In the mean time, we update the rdoc for IE#contains_text() to be more accurate, as suggested by the OP. Both the rdoc for IE#contains_text and TextField#verify_contains would be suggest that these more direct forms be used instead. Bret _____________________ Bret Pettichord www.pettichord.com From roy_sin at yahoo.com Fri Nov 11 02:03:09 2005 From: roy_sin at yahoo.com (Roy Sin) Date: Thu, 10 Nov 2005 23:03:09 -0800 (PST) Subject: [Wtr-general] How to set a checkbox that has no id but has twovalues attribute In-Reply-To: <00b501c5e675$890167e0$6600a8c0@NewDell> Message-ID: <20051111070309.53769.qmail@web52908.mail.yahoo.com> Happy to say that both solutions work. i.e passing the two values as a regular expression and passing the two values as a string as a single argument. thanks this mailing list rocks --- Paul Rogers wrote: > ie.checkbox(:name , 'notype[]' , '9.16') should work > the third argument is a string value that is the value of > the radio > button or check box > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of > Jeff Wood > Sent: 10 November 2005 19:33 > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] How to set a checkbox that has > no id but has > twovalues attribute > > > hmm, try finding it by value using a regular expression > > > $ie.frame( "admin" ).checkbox( :value, /9,16/ ).click > > ... let me know. I'll try to come up with something else > if necessary > ... use whatever value shows up when you do a > show_all_objects ... > > Hope that helps ... if it's something that's online, give > a url then I > can play with it live. Look forward to hearing from you. > > j. > > > On 11/10/05, Roy Sin wrote: > > Hi Watir list, > > I have a check box type as > > > How do I set the check box ? > > I have tried > $ie.frame("admin").checkbox(:name, "nottype[]", 9,16).set > > but as expected I'm getting wrong number of arguments (4 > for 3). > > thanks > > > > > __________________________________ > Yahoo! FareChase: Search multiple travel sites in one > click. > http://farechase.yahoo.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > -- > "Remember. Understand. Believe. Yield! -> > http://ruby-lang.org" > > Jeff Wood > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com From Sean.Gallagher at ticketmaster.com Fri Nov 11 09:46:04 2005 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Fri, 11 Nov 2005 06:46:04 -0800 Subject: [Wtr-general] IE.contains_text and assert Message-ID: <71D28C8451BFD5119B2B00508BE26E640B63F2AA@pasmail3.office.tmcs> +1 I prefer that Watir conform as closely as possible to Ruby standards. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Thursday, November 10, 2005 9:37 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] IE.contains_text and assert At 02:48 PM 11/10/2005, Jeff Wood wrote: >Actually, I would say changing the existing function to actually return >true or false would be appropriate. Add the ? to the end of the function >name, and then let people use ie.text.index etc to get the index of occurance. > >j. Hmm. That was how it originally was coded, but it was changed to the current behavior (without updating the rdoc) based on an earlier request on this list. Changing it back will break scripts. Originally, we made several attempts to shield Watir users from Ruby, and in the end, this only created more confusion -- the best of example of this was how we decided to use 1-based indexing in Watir. The lesson i learned is that we are much better off if we follow the Ruby conventions in Watir, explaining them when they may not be intuitive to new users, rather than trying to put together a separate set of conventions that are possibly more intuitive. The suggestion that this method end in a question mark, therefore a good one, since this is the Ruby convention for this kind of thing. But the Ruby way would be to do ie.text.contains? rather than ie.contains_text. And in fact, to do ie.text.contain? since the Ruby convention is to not use the final s (another convention we haven't yet followed very closely with Watir, but would be good to move towards). That suggests ie.text.contain? The biggest qualm i have with this is that implementing this means adding a method to the string class. I don't object to this in principle, but will this confuse users? Looking at the String API, i see that it already provides the method string.include? which does exactly what we want with string arguments. But users would have to use ie.string.match() if they wanted to use regular expressions. A little awkward, but then that is the awkwardness of Ruby and i think the principle that we should follow is not to avoid this. Another reason for my attention to this issue is that we also have TextField#verify_contains which really should have the same method name as IE#contains_text -- it does the same thing. This is another Watir inconsistency that needs to be addressed -- it would be best to move things correctly. Therefore, my proposal: Slowly, deprecate IE#contains_text(), starting with removing it from the intro user documentation, instead encouraging users to use IE#text.include?() instead. (And also introducing IE#text.match() when regular expressions are used.) In the mean time, we update the rdoc for IE#contains_text() to be more accurate, as suggested by the OP. Both the rdoc for IE#contains_text and TextField#verify_contains would be suggest that these more direct forms be used instead. Bret _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jeff.darklight at gmail.com Fri Nov 11 11:08:04 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Fri, 11 Nov 2005 08:08:04 -0800 Subject: [Wtr-general] IE.contains_text and assert In-Reply-To: <71D28C8451BFD5119B2B00508BE26E640B63F2AA@pasmail3.office.tmcs> References: <71D28C8451BFD5119B2B00508BE26E640B63F2AA@pasmail3.office.tmcs> Message-ID: yup, that all sounds good ... and the existing include? is just as good as contain? ... there are times in ruby where they will provide aliases just so names that make sense do the same thing. class String alias :contain? :include? end I don't see aliasing other methods as overly evil, you aren't changing existing functionality. Anyways, there's my $0.02 ... complete with free grain of salt. j. On 11/11/05, Sean Gallagher wrote: > > +1 > > I prefer that Watir conform as closely as possible to Ruby standards. > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord > Sent: Thursday, November 10, 2005 9:37 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] IE.contains_text and assert > > At 02:48 PM 11/10/2005, Jeff Wood wrote: > >Actually, I would say changing the existing function to actually return > >true or false would be appropriate. Add the ? to the end of the function > >name, and then let people use ie.text.index etc to get the index of > occurance. > > > >j. > > Hmm. That was how it originally was coded, but it was changed to the > current behavior (without updating the rdoc) based on an earlier request > on > this list. Changing it back will break scripts. > > Originally, we made several attempts to shield Watir users from Ruby, and > in the end, this only created more confusion -- the best of example of > this > was how we decided to use 1-based indexing in Watir. The lesson i learned > is that we are much better off if we follow the Ruby conventions in Watir, > explaining them when they may not be intuitive to new users, rather than > trying to put together a separate set of conventions that are possibly > more > intuitive. > > The suggestion that this method end in a question mark, therefore a good > one, since this is the Ruby convention for this kind of thing. > > But the Ruby way would be to do ie.text.contains? rather than > ie.contains_text. And in fact, to do ie.text.contain? since the Ruby > convention is to not use the final s (another convention we haven't yet > followed very closely with Watir, but would be good to move towards). > > That suggests ie.text.contain? The biggest qualm i have with this is that > implementing this means adding a method to the string class. I don't > object > to this in principle, but will this confuse users? Looking at the String > API, i see that it already provides the method string.include? which does > exactly what we want with string arguments. But users would have to use > ie.string.match() if they wanted to use regular expressions. > > A little awkward, but then that is the awkwardness of Ruby and i think the > principle that we should follow is not to avoid this. > > Another reason for my attention to this issue is that we also have > TextField#verify_contains which really should have the same method name as > IE#contains_text -- it does the same thing. This is another Watir > inconsistency that needs to be addressed -- it would be best to move > things > correctly. > > Therefore, my proposal: > > Slowly, deprecate IE#contains_text(), starting with removing it from the > intro user documentation, instead encouraging users to use > IE#text.include?() instead. (And also introducing IE#text.match() when > regular expressions are used.) In the mean time, we update the rdoc for > IE#contains_text() to be more accurate, as suggested by the OP. > > Both the rdoc for IE#contains_text and TextField#verify_contains would be > suggest that these more direct forms be used instead. > > 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 > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051111/36019e5e/attachment.html From bret at pettichord.com Fri Nov 11 11:38:50 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 11 Nov 2005 10:38:50 -0600 Subject: [Wtr-general] IE.contains_text and assert In-Reply-To: References: <71D28C8451BFD5119B2B00508BE26E640B63F2AA@pasmail3.office.tmcs> <71D28C8451BFD5119B2B00508BE26E640B63F2AA@pasmail3.office.tmcs> Message-ID: <5.1.0.14.2.20051111103542.03cc9538@pop.gmail.com> At 10:08 AM 11/11/2005, Jeff Wood wrote: >I don't see aliasing other methods as overly evil, you aren't changing >existing functionality. I prefer to avoid using these for examples, unless you let people know you are doing this. For example, we create assert_false (which does the same as "assert !") for our unit tests. This works fine, but has confused people who look at our unit tests as examples and don't realize that we are using a slightly tweaked set of assertions. _____________________ Bret Pettichord www.pettichord.com From sy1234 at gmail.com Fri Nov 11 17:12:17 2005 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 11 Nov 2005 16:12:17 -0600 Subject: [Wtr-general] New Watir Wiki, was Re: FAQ Update In-Reply-To: <5.1.0.14.2.20051108004740.03e0cf48@pop.gmail.com> References: <5.1.0.14.2.20051028010239.03a76340@pop.gmail.com> <5.1.0.14.2.20051105203413.03da8e88@pop.gmail.com> <5.1.0.14.2.20051108004740.03e0cf48@pop.gmail.com> Message-ID: <1e55af990511111412w5ec0cf7v67ee5fe1ff3cb07@mail.gmail.com> On 11/8/05, Bret Pettichord wrote: > My only concern is that if we have usernames to access, it would be nice if > we could recycle the rubyforge usernames, just because that would make it > easier for our contributors. But i'm not sure if that is really possible. Unless someone performs some serious voodoo to make a bridge between the two systems, people would themselves need to make usernames that are the same as they exist with rubyforge, on an honour-system (and post a note in their rubyforge profile). I haven't looked into the possibility of having email validation.. I don't know how that would work. I know there are some emailing functions with mediawiki but I've never used them. From cdahl at klick.com Fri Nov 11 17:14:44 2005 From: cdahl at klick.com (Cynthia Dahl) Date: Fri, 11 Nov 2005 17:14:44 -0500 Subject: [Wtr-general] column_values Message-ID: Hello, I'm having a problem with table.column_values. I have a table with 3 columns, but when I try to extract the values with a statement like table.column_values(1), I get the following error: WIN32OLERuntimeError: Unknown property or method `3' HRESULT error code:0x80020006 Unknown name. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2461:in `[]' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2461:in `row' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2411:in `[]' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2471:in `column_values' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2471:in `collect' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2471:in `each' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2471:in `collect' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2471:in `column_values' C:/Tests/eATMR/SpecialAccess.rb:78:in `test_NoAccess' On the other hand, table.row_values is working just fine. Thanks! Cynthia -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051111/440c019e/attachment.html From vishalworld at sqatester.com Sun Nov 13 02:10:08 2005 From: vishalworld at sqatester.com (Vishal Chavan) Date: Sat, 12 Nov 2005 23:10:08 -0800 (PST) Subject: [Wtr-general] Can I get away from a warning for overwriting a variable value in a Loop? Message-ID: <20051112231009.59D6443B@dm22.mta.everyone.net> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051112/1d3d7ad8/attachment.html From vishalworld at sqatester.com Sun Nov 13 06:14:28 2005 From: vishalworld at sqatester.com (Vishal Chavan) Date: Sun, 13 Nov 2005 03:14:28 -0800 (PST) Subject: [Wtr-general] Big trouble working with Nested While & If loops Message-ID: <20051113031428.59D65F8C@dm22.mta.everyone.net> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051113/9a332ea1/attachment.html From dave at burt.id.au Sun Nov 13 06:49:30 2005 From: dave at burt.id.au (Dave Burt) Date: Sun, 13 Nov 2005 22:49:30 +1100 Subject: [Wtr-general] Can I get away from a warning for overwriting a variable value in a Loop? References: <20051112231009.59D6443B@dm22.mta.everyone.net> Message-ID: <012e01c5e848$4f027e60$6602a8c0@telperion> Vishal Chavan wrote: > Hi All, > > I wanted to seek your advice for getting off following warning : "warning: > already initialized constant Array_Index" > > I have loop where I change the value of a variable. I get this warning, can > get off from this? Here's the loop I have > > count = 1 > Array_Index = 1 > Actual_array = [20] In Ruby, local variables begin with lower-case letters. If you use upper-case, you have created a constant. You answer is to use "array_index" instead of "Array_Index", etc. Cheers, Dave From Jan.Montano at thomson.com Sun Nov 13 22:26:59 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Mon, 14 Nov 2005 11:26:59 +0800 Subject: [Wtr-general] traversing through tr's and td's Message-ID: How do I traverse through a series of tr's and td's? And consequently finding the content (inner text) of this tag: 107-0052 ? Many instances of that class exists, and it's not unique. From dave at burt.id.au Mon Nov 14 00:01:46 2005 From: dave at burt.id.au (Dave Burt) Date: Mon, 14 Nov 2005 16:01:46 +1100 Subject: [Wtr-general] Big trouble working with Nested While & If loops In-Reply-To: <20051113031428.59D65F8C@dm22.mta.everyone.net> References: <20051113031428.59D65F8C@dm22.mta.everyone.net> Message-ID: <3ad74bc80511132101v5cf7d8ecucd746b0e19674ece@mail.gmail.com> Hi, Vishal wrote: > > > Hi, > > I am getting a wierd error, whenever I have a nested loop, I have checked > the length of array data its 1. The error read as below: > > irb(main):208:0> while rec_ctr < data.length > irb(main):209:1> > Display all 375 possibilities? (y or n) > == cwws > === d > =~ data > ARGF def When you're in IRB with the Readline extension, pressing the Tab key will trigger auto-completion. If you paste code with tabs into an IRB session in a command window, the same. One tab at the start of a line will ask before listing "all 375 possibilities" (Object and Kernel methods); two tabs will list those methods. Try starting irb with the --noreadline parameter: % irb --noreadline Cheers, Dave From vishalworld at sqatester.com Mon Nov 14 00:45:21 2005 From: vishalworld at sqatester.com (Vishal Chavan) Date: Sun, 13 Nov 2005 21:45:21 -0800 (PST) Subject: [Wtr-general] traversing through tr's and td's Message-ID: <20051113214521.59D6D2EE@dm21.mta.everyone.net> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051113/96b83ab6/attachment.html From vishalworld at sqatester.com Mon Nov 14 01:03:42 2005 From: vishalworld at sqatester.com (Vishal Chavan) Date: Sun, 13 Nov 2005 22:03:42 -0800 (PST) Subject: [Wtr-general] Big trouble working with Nested While & If loops Message-ID: <20051113220342.59D6D356@dm21.mta.everyone.net> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051113/98821c24/attachment.html From alex at verk.info Mon Nov 14 00:20:51 2005 From: alex at verk.info (Alexey Verkhovsky) Date: Sun, 13 Nov 2005 23:20:51 -0600 Subject: [Wtr-general] traversing through tr's and td's In-Reply-To: <20051113214521.59D6D2EE@dm21.mta.everyone.net> References: <20051113214521.59D6D2EE@dm21.mta.everyone.net> Message-ID: <43781EB3.1080900@verk.info> Vishal Chavan wrote: > > Hi Jan, > > I have traversed the table using its index. Please have a look at the > code below: > > count = 1 > array_index = 1 > actual_array = [20] > while count < 11 > actual_array[array_index]=ie2.table(:index, "4")[count][2].text > actual_array[array_index+1]=ie2.table(:index, "4")[count][4].text > array_index +=2 > count +=1 > end > Or (not tested): ie2.table(:index, 4).row_values.inject([]) { |all_cells, row| all_cells += row } Does the same thing. This is not some sort of black magic. In my humble opinion (to some extent backed by the experience), one should learn to write Ruby code as the one-liner above if one wants to successfully create and maintain a non-trivial Watir test suite. It's not that hard to learn - all you need is a few days of reading the documentation for the basic classes (Array, Hash, String, Fixnum, Regexp) and playing with irb. Do it, and the time you spend pays back for itself in one month, tops. Don't do it, and a few weeks down the road you will walk away from your test automation, with a firm opinion that test automation is too difficult and expensive to be worth the trouble. This is a very common fault for people who want to get some form of test automation going but have no prior experience with it. Alex P.S. By the way, identifying a DOM object by index (as in ie2.table(:index, 4)) is something you should try to avoid - you will spend man-years updating all the indexes whenever the program changes, and eventually it will make your test automation effort a negative value exercise. Use a name or an id. From amit.garde at gmail.com Mon Nov 14 02:39:39 2005 From: amit.garde at gmail.com (Amit Garde) Date: Mon, 14 Nov 2005 13:09:39 +0530 Subject: [Wtr-general] traversing through tr's and td's In-Reply-To: <43781EB3.1080900@verk.info> References: <20051113214521.59D6D2EE@dm21.mta.everyone.net> <43781EB3.1080900@verk.info> Message-ID: <7661e6730511132339m3e3e931cpbf758c86a92645fc@mail.gmail.com> On 11/14/05, Alexey Verkhovsky wrote: P.S. By the way, identifying a DOM object by index (as in > ie2.table(:index, 4)) is something you should try to avoid - you will > spend man-years updating all the indexes whenever the program changes, > and eventually it will make your test automation effort a negative value > exercise. Use a name or an id. > Or an XPath expression... Amit -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051114/19f560f1/attachment.html From alex at verk.info Mon Nov 14 02:32:20 2005 From: alex at verk.info (Alexey Verkhovsky) Date: Mon, 14 Nov 2005 01:32:20 -0600 Subject: [Wtr-general] traversing through tr's and td's In-Reply-To: <7661e6730511132339m3e3e931cpbf758c86a92645fc@mail.gmail.com> References: <20051113214521.59D6D2EE@dm21.mta.everyone.net> <43781EB3.1080900@verk.info> <7661e6730511132339m3e3e931cpbf758c86a92645fc@mail.gmail.com> Message-ID: <43783D84.3010502@verk.info> Amit Garde wrote: > Or an XPath expression... Now it's time for me to pledge ignorance. Is there something in the Watir API that can do XPath queries? Alex From me at paulwistrand.com Mon Nov 14 05:44:03 2005 From: me at paulwistrand.com (Paul Wistrand) Date: Mon, 14 Nov 2005 23:44:03 +1300 Subject: [Wtr-general] Watir VS.NET custom tool for NUnit Message-ID: <000a01c5e908$5e5276c0$0200a8c0@WOOKIE> Hi All, I've put together a Visual Studio custom tool to tie your Watir tests into NUnit. Check it out here http://www.paulwistrand.com/archives/22-Watir-VS.NET-Custom-Tool.html. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051114/30c19703/attachment.html From chaya_b_s at yahoo.co.in Mon Nov 14 05:47:24 2005 From: chaya_b_s at yahoo.co.in (chaya shetty) Date: Mon, 14 Nov 2005 10:47:24 +0000 (GMT) Subject: [Wtr-general] How do I connect to an Oracle Database?? Message-ID: <20051114104725.55425.qmail@web8303.mail.in.yahoo.com> Hi, I want to write a test case which includes verification of variable value in Database. How do I connect to an 'Oracle' Database from Watir? Do I need to install anything for this? I am using 1.4.1 version of watir and 1.8.2 version of Ruby. Thanks Chaya --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051114/b0f46fb7/attachment.html From jeff.darklight at gmail.com Mon Nov 14 12:47:45 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 14 Nov 2005 09:47:45 -0800 Subject: [Wtr-general] How do I connect to an Oracle Database?? In-Reply-To: <20051114104725.55425.qmail@web8303.mail.in.yahoo.com> References: <20051114104725.55425.qmail@web8303.mail.in.yahoo.com> Message-ID: You need to install the OCI8 library & a copy of the oracle "instant client". j. On 11/14/05, chaya shetty wrote: > > Hi, > I want to write a test case which includes verification of variable value > in Database. How do I connect to an 'Oracle' Database from Watir? > Do I need to install anything for this? > I am using 1.4.1 version of watir and 1.8.2 version of Ruby. > Thanks > Chaya > > ------------------------------ > Enjoy this Diwali with Y! India Click here > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051114/6eb886cf/attachment.html From roy_sin at yahoo.com Mon Nov 14 12:55:09 2005 From: roy_sin at yahoo.com (Roy Sin) Date: Mon, 14 Nov 2005 09:55:09 -0800 (PST) Subject: [Wtr-general] How to set a checkbox next to a link... Message-ID: <20051114175510.15402.qmail@web52905.mail.yahoo.com> Hi Wtr list I'm currently getting the html for the link as an example below: TA Notification then parse the string to get the id which i add to another number assign that to a string myStr and then pass into $ie.frame('cpmain').frame('admin').checkbox(:name, "nottype[]", myStr).set Is there a more elegant way of just looking for the text "TA notification" and set the checkbox to its left?? thanks __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com From chaya_b_s at yahoo.co.in Mon Nov 14 23:49:55 2005 From: chaya_b_s at yahoo.co.in (chaya shetty) Date: Tue, 15 Nov 2005 04:49:55 +0000 (GMT) Subject: [Wtr-general] How do I connect to an Oracle Database?? In-Reply-To: Message-ID: <20051115044955.8234.qmail@web8310.mail.in.yahoo.com> Hi, The OCI8 library & oracle "instant client" has already been installed. What is the syntax to connect to the Database?? Thanks Chaya Jeff Wood wrote: You need to install the OCI8 library & a copy of the oracle "instant client". j. On 11/14/05, chaya shetty wrote: Hi, I want to write a test case which includes verification of variable value in Database. How do I connect to an 'Oracle' Database from Watir? Do I need to install anything for this? I am using 1.4.1 version of watir and 1.8.2 version of Ruby. Thanks Chaya --------------------------------- Enjoy this Diwali with Y! India Click here _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051115/b3c38f85/attachment.html From jeff.darklight at gmail.com Tue Nov 15 00:26:08 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 14 Nov 2005 21:26:08 -0800 Subject: [Wtr-general] How do I connect to an Oracle Database?? In-Reply-To: <20051115044955.8234.qmail@web8310.mail.in.yahoo.com> References: <20051115044955.8234.qmail@web8310.mail.in.yahoo.com> Message-ID: I would recommend using the help files on the OCI8 website. They can be much more help than I can here... There are many things specific to an installation. Generally ... look at the information at : http://www.jiubao.org/ruby-oci8/api.en.html Hope that helps you get where you are trying to go. j. On 11/14/05, chaya shetty wrote: > > > Hi, > The OCI8 library & oracle "instant client" has already been installed. > What is the syntax to connect to the Database?? > Thanks > Chaya > *Jeff Wood * wrote: > > You need to install the OCI8 library & a copy of the oracle "instant > client". > > j. > > On 11/14/05, chaya shetty wrote: > > > > Hi, > > I want to write a test case which includes verification of variable > > value in Database. How do I connect to an 'Oracle' Database from Watir? > > Do I need to install anything for this? > > I am using 1.4.1 version of watir and 1.8.2 version of Ruby. > > Thanks > > Chaya > > ------------------------------ > > Enjoy this Diwali with Y! India Click here > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > -- > "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" > > Jeff Wood _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > ------------------------------ > Enjoy this Diwali with Y! India Click here > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051114/446ea713/attachment.html From chaya_b_s at yahoo.co.in Tue Nov 15 00:30:32 2005 From: chaya_b_s at yahoo.co.in (chaya shetty) Date: Tue, 15 Nov 2005 05:30:32 +0000 (GMT) Subject: [Wtr-general] How do I connect to an Oracle Database?? In-Reply-To: Message-ID: <20051115053032.21019.qmail@web8310.mail.in.yahoo.com> Hi, I already have "standard Oracle client" installed on to my machine. Is this enough for connecting to the database from Watir ?? Thanks Chaya Jeff Wood wrote: You need to install the OCI8 library & a copy of the oracle "instant client". j. On 11/14/05, chaya shetty wrote: Hi, I want to write a test case which includes verification of variable value in Database. How do I connect to an 'Oracle' Database from Watir? Do I need to install anything for this? I am using 1.4.1 version of watir and 1.8.2 version of Ruby. Thanks Chaya --------------------------------- Enjoy this Diwali with Y! India Click here _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051115/ddce7ff6/attachment.html From vishalworld at sqatester.com Tue Nov 15 00:55:48 2005 From: vishalworld at sqatester.com (Vishal Chavan) Date: Mon, 14 Nov 2005 21:55:48 -0800 (PST) Subject: [Wtr-general] How do I connect to an Oracle Database?? Message-ID: <20051114215548.59D9ADFB@dm20.mta.everyone.net> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051114/e996357d/attachment.html From chaya_b_s at yahoo.co.in Tue Nov 15 02:12:23 2005 From: chaya_b_s at yahoo.co.in (chaya shetty) Date: Tue, 15 Nov 2005 07:12:23 +0000 (GMT) Subject: [Wtr-general] How do I connect to an Oracle Database?? In-Reply-To: Message-ID: <20051115071223.39061.qmail@web8301.mail.in.yahoo.com> Hi , Thanks for the help. I installed ruby-oci8-mswin. It worked fine. Now I am able to access the database using ruby. Thanks Chaya Jeff Wood wrote: I would recommend using the help files on the OCI8 website. They can be much more help than I can here... There are many things specific to an installation. Generally ... look at the information at : http://www.jiubao.org/ruby-oci8/api.en.html Hope that helps you get where you are trying to go. j. On 11/14/05, chaya shetty wrote: Hi, The OCI8 library & oracle "instant client" has already been installed. What is the syntax to connect to the Database?? Thanks Chaya Jeff Wood wrote: You need to install the OCI8 library & a copy of the oracle "instant client". j. On 11/14/05, chaya shetty < chaya_b_s at yahoo.co.in> wrote: Hi, I want to write a test case which includes verification of variable value in Database. How do I connect to an 'Oracle' Database from Watir? Do I need to install anything for this? I am using 1.4.1 version of watir and 1.8.2 version of Ruby. Thanks Chaya --------------------------------- Enjoy this Diwali with Y! India Click here _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Enjoy this Diwali with Y! India Click here _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051115/03104b8e/attachment.html From shaorobics at gmail.com Tue Nov 15 14:00:11 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Tue, 15 Nov 2005 14:00:11 -0500 Subject: [Wtr-general] Span troubles Message-ID: <593b9ae80511151100q3146179ctccd6bc4c99d48c56@mail.gmail.com> I have a span that is not disabled, as follows: Certain user actions cause the text within this span to show up in red, otherwise it is hidden to the user. simply doing an ie.contains_text(span.text) does not work because I still get non nil result whether the span is shown in red or not. Is there anyway around this so that I can test whether the text in the span is on the page or not? Shao -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051115/b2468059/attachment.html From Jan.Montano at thomson.com Tue Nov 15 21:55:14 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Wed, 16 Nov 2005 10:55:14 +0800 Subject: [Wtr-general] traversing through tr's and td's Message-ID: Thanks a lot for all those who replied. It's working now. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Alexey Verkhovsky Sent: Monday, November 14, 2005 3:32 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] traversing through tr's and td's Amit Garde wrote: > Or an XPath expression... Now it's time for me to pledge ignorance. Is there something in the Watir API that can do XPath queries? Alex _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Tue Nov 15 13:08:29 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 15 Nov 2005 12:08:29 -0600 Subject: [Wtr-general] New Watir Wiki In-Reply-To: <1e55af990511111412w5ec0cf7v67ee5fe1ff3cb07@mail.gmail.com> References: <5.1.0.14.2.20051108004740.03e0cf48@pop.gmail.com> <5.1.0.14.2.20051028010239.03a76340@pop.gmail.com> <5.1.0.14.2.20051105203413.03da8e88@pop.gmail.com> <5.1.0.14.2.20051108004740.03e0cf48@pop.gmail.com> Message-ID: <5.1.0.14.2.20051115120622.03c366b8@pop.gmail.com> Sy, Please go ahead with your plan to move the Watir wiki to mediaweb. Thank you very much for offering to make this contribution to the project. Bret _____________________ Bret Pettichord www.pettichord.com From sy1234 at gmail.com Tue Nov 15 23:56:07 2005 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 15 Nov 2005 22:56:07 -0600 Subject: [Wtr-general] New Watir Wiki In-Reply-To: <5.1.0.14.2.20051115120622.03c366b8@pop.gmail.com> References: <5.1.0.14.2.20051028010239.03a76340@pop.gmail.com> <5.1.0.14.2.20051105203413.03da8e88@pop.gmail.com> <5.1.0.14.2.20051108004740.03e0cf48@pop.gmail.com> <1e55af990511111412w5ec0cf7v67ee5fe1ff3cb07@mail.gmail.com> <5.1.0.14.2.20051115120622.03c366b8@pop.gmail.com> Message-ID: <1e55af990511152056m133d3f6ap969778a3b697aecd@mail.gmail.com> On 11/15/05, Bret Pettichord wrote: > Sy, > > Please go ahead with your plan to move the Watir wiki to mediaweb. Thank > you very much for offering to make this contribution to the project. I've replied off-list. Assuming sourceforge is good about it, the setup should be very easy. It won't take me very long to migrate the existing content. It should be usable a week from setup. From smanish at gs-lab.com Wed Nov 16 01:53:38 2005 From: smanish at gs-lab.com (smanish) Date: Wed, 16 Nov 2005 12:23:38 +0530 Subject: [Wtr-general] Can watir be used to drive gmail.... Message-ID: <437AD772.8020501@gs-lab.com> I tried and after logging in... I was simply lost.... Any clues?? Has any one used watir successfully to drive gmail? Thanks and Regards, Manish From smanish at gs-lab.com Wed Nov 16 02:19:12 2005 From: smanish at gs-lab.com (smanish) Date: Wed, 16 Nov 2005 12:49:12 +0530 Subject: [Wtr-general] watir exception... Message-ID: <437ADD70.9050005@gs-lab.com> Hi, I have following simple script....but at the end of executiong.. I get exception as bellow W, [16-Nov-2005 12:40:52#7832] WARN -- : frame error in waitdocument OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in `method_missing' c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in `wait' c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `upto' c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `wait' c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2014:in `click' yahoomail.rb:10 c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists': Unable to locate object, using text and Sign out (Watir::Exception::UnknownObjectException) from c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2009:in `click' from yahoomail.rb:13 >Exit code: 1 ------------------------------------- require 'watir' # the watir controller # open the IE browser $ie = Watir::IE.new $ie.set_fast_speed() test_site="http://mail.yahoo.com/" $ie.goto(test_site) $ie.text_field(:name, "login").set("abc") $ie.text_field(:id, "passwd").set("xyz") $ie.button(:value, "Sign In").click $ie.show_all_objects $ie.link(:text, "Sign out").click $ie.close Any ideas?? Thanks, Manish From Jamuna.Nithyanandam at honeywell.com Wed Nov 16 02:44:14 2005 From: Jamuna.Nithyanandam at honeywell.com (Jamuna, Nithyanandam (IE10)) Date: Wed, 16 Nov 2005 13:14:14 +0530 Subject: [Wtr-general] watir exception... Message-ID: <9F4FA7B367FAAD4E9D78594B289244FA03DF2560@IE10EV801.global.ds.honeywell.com> Hi Manish, Try accessing the link using the index. To view all the links try $ie.show_links Hope this code helps you, require 'watir' # the watir controller # open the IE browser $ie = Watir::IE.new $ie.set_fast_speed() test_site="http://mail.yahoo.com/" $ie.goto(test_site) $ie.text_field(:name, "login").set("abc") $ie.text_field(:id, "passwd").set("xyz") $ie.button(:value, "Sign In").click $ie.show_links $ie.link(:index, 5).click $ie.close Regards, Jamuna Nithyanandam -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish Sent: Wednesday, November 16, 2005 12:49 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] watir exception... Hi, I have following simple script....but at the end of executiong.. I get exception as bellow W, [16-Nov-2005 12:40:52#7832] WARN -- : frame error in waitdocument OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in `method_missing' c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in `wait' c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `upto' c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `wait' c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2014:in `click' yahoomail.rb:10 c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists': Unable to locate object, using text and Sign out (Watir::Exception::UnknownObjectException) from c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2009:in `click' from yahoomail.rb:13 >Exit code: 1 ------------------------------------- require 'watir' # the watir controller # open the IE browser $ie = Watir::IE.new $ie.set_fast_speed() test_site="http://mail.yahoo.com/" $ie.goto(test_site) $ie.text_field(:name, "login").set("abc") $ie.text_field(:id, "passwd").set("xyz") $ie.button(:value, "Sign In").click $ie.show_all_objects $ie.link(:text, "Sign out").click $ie.close Any ideas?? Thanks, Manish _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From zeljko.filipin at gmail.com Wed Nov 16 04:04:06 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 16 Nov 2005 10:04:06 +0100 Subject: [Wtr-general] Can watir be used to drive gmail.... In-Reply-To: <437AD772.8020501@gs-lab.com> Message-ID: <000e01c5ea8c$b43f8570$c6e7fea9@officezg.wa> I just tried it too, and it really does not work. Solution: log in, go to http://mail.google.com/mail/h/ and you will be switched to basic HTML and watir will work. Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish Sent: Wednesday, November 16, 2005 7:54 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Can watir be used to drive gmail.... I tried and after logging in... I was simply lost.... Any clues?? Has any one used watir successfully to drive gmail? Thanks and Regards, Manish _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From smanish at gs-lab.com Wed Nov 16 04:31:43 2005 From: smanish at gs-lab.com (smanish) Date: Wed, 16 Nov 2005 15:01:43 +0530 Subject: [Wtr-general] Can watir be used to drive gmail.... In-Reply-To: <000e01c5ea8c$b43f8570$c6e7fea9@officezg.wa> References: <000e01c5ea8c$b43f8570$c6e7fea9@officezg.wa> Message-ID: <437AFC7F.1070402@gs-lab.com> Hey thanks for the solution. It works. But why it does not work with default gmail interface? Regards, Manish On 11/16/2005 02:34 PM, Zeljko Filipin wrote: >I just tried it too, and it really does not work. >Solution: log in, go to http://mail.google.com/mail/h/ and you will be >switched to basic HTML and watir will work. > >Zeljko > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish >Sent: Wednesday, November 16, 2005 7:54 AM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Can watir be used to drive gmail.... > >I tried and after logging in... >I was simply lost.... > >Any clues?? >Has any one used watir successfully to drive gmail? > >Thanks and Regards, >Manish > > > >_______________________________________________ >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 satti at qantom.com Wed Nov 16 04:51:58 2005 From: satti at qantom.com (Sathya Shankar) Date: Wed, 16 Nov 2005 15:21:58 +0530 Subject: [Wtr-general] watir exception... In-Reply-To: <437ADD70.9050005@gs-lab.com> References: <437ADD70.9050005@gs-lab.com> Message-ID: <437B013E.1060500@qantom.com> Hi [Sign Out, Here the "," seems to be causing the problem. So in your script you can either use the "," in your script or the regular expressions Then the script would look like ie=IE.attach(:title, /.*Yahoo.*/) ie.link(:text, /.*Sign Out.*/).click ie.close() The above script worked for me. smanish wrote: >Hi, >I have following simple script....but at the end of executiong.. >I get exception as bellow > >W, [16-Nov-2005 12:40:52#7832] WARN -- : frame error in waitdocument > OLE error code:80070005 in > Access is denied. > HRESULT error code:0x80020009 > Exception occurred. >c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in >`method_missing' >c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in `wait' >c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `upto' >c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `wait' >c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2014:in `click' >yahoomail.rb:10 >c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in >`assert_exists': Unable to locate object, using text and Sign out >(Watir::Exception::UnknownObjectException) > from c:/program >files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2009:in `click' > from yahoomail.rb:13 > > >>Exit code: 1 >> >> > >------------------------------------- >require 'watir' # the watir controller ># open the IE browser >$ie = Watir::IE.new >$ie.set_fast_speed() >test_site="http://mail.yahoo.com/" >$ie.goto(test_site) >$ie.text_field(:name, "login").set("abc") >$ie.text_field(:id, "passwd").set("xyz") >$ie.button(:value, "Sign In").click >$ie.show_all_objects >$ie.link(:text, "Sign out").click >$ie.close > >Any ideas?? >Thanks, >Manish > >_______________________________________________ >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 zeljko.filipin at gmail.com Wed Nov 16 04:50:28 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 16 Nov 2005 10:50:28 +0100 Subject: [Wtr-general] Can watir be used to drive gmail.... In-Reply-To: <437AFC7F.1070402@gs-lab.com> Message-ID: <001101c5ea93$2eae8ad0$c6e7fea9@officezg.wa> HTML source will tell you why it does not work. :) It seems that gmail uses a lot of ajax (or something like that). Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish Sent: Wednesday, November 16, 2005 10:32 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Can watir be used to drive gmail.... Hey thanks for the solution. It works. But why it does not work with default gmail interface? Regards, Manish On 11/16/2005 02:34 PM, Zeljko Filipin wrote: >I just tried it too, and it really does not work. >Solution: log in, go to http://mail.google.com/mail/h/ and you will be >switched to basic HTML and watir will work. > >Zeljko > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish >Sent: Wednesday, November 16, 2005 7:54 AM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Can watir be used to drive gmail.... > >I tried and after logging in... >I was simply lost.... > >Any clues?? >Has any one used watir successfully to drive gmail? > >Thanks and Regards, >Manish > > > >_______________________________________________ >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 Malcolm.Beaton at conchango.com Wed Nov 16 05:44:15 2005 From: Malcolm.Beaton at conchango.com (Beaton, Malcolm) Date: Wed, 16 Nov 2005 10:44:15 -0000 Subject: [Wtr-general] How to capture current page in a variable? Message-ID: This is probably a really simple question (but I have only been using ruby/WATiR for 2 days) I am trying to test site navigation to each site portal using an array and an iterative select and go command. (see below) PortalArray.each do | x | puts 'Step 2.'runNumber' : Select ' x ' for the Portal list' $ie.select_list( :id, "gatewaycountry").select(x) puts ' Action: selected ' runNumber ' for the Portal list.' puts 'Step 2,' x '.1: click the "Go" button' $ie.button(:id, "go").click puts ' Action: clicked the Go button.' assert?? runNumber = runNumber + 1 end Now the question I have is I need to assert that the browser actually went there (or at least tried to) I thought I could do this by capturing the current page address in a variable and using another array to match it against? The other thing is the HTML knows what portal it is at using this method (below) Is there a way I can test for that instead? (my HTML is not so good to be honest) Any help would be appreciated Mal Malcolm Beaton Technical Consultant Conchango 'Innovative Change in Business' D +44 (0) 1784 222127 S +44 (0) 1784 222222 M +44 (0) 777 071 3121 malcolm.beaton at conchango.com http://www.conchango.com No.2 New Media Age - Top 10 Technology Agencies 2004 No.5 New Media Age - Top 20 Interactive Agencies 2004 No.3 Marketing - Top 100 New Media Agencies 2005 Winner - Best Travel Website - New Media Age 2005 Winner - Best Retail Website - British Interactive Media Association (BIMA) 2004 Winner - Information Management Business Intelligence Project of the Year 2003 Winner - Microsoft European Business Intelligence Solutions Award 2003 More awards > -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 16 November 2005 09:50 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Can watir be used to drive gmail.... HTML source will tell you why it does not work. :) It seems that gmail uses a lot of ajax (or something like that). Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish Sent: Wednesday, November 16, 2005 10:32 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Can watir be used to drive gmail.... Hey thanks for the solution. It works. But why it does not work with default gmail interface? Regards, Manish On 11/16/2005 02:34 PM, Zeljko Filipin wrote: >I just tried it too, and it really does not work. >Solution: log in, go to http://mail.google.com/mail/h/ and you will be >switched to basic HTML and watir will work. > >Zeljko > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish >Sent: Wednesday, November 16, 2005 7:54 AM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Can watir be used to drive gmail.... > >I tried and after logging in... >I was simply lost.... > >Any clues?? >Has any one used watir successfully to drive gmail? > >Thanks and Regards, >Manish > > > >_______________________________________________ >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 _____________________________________________________________________ This e-mail has been scanned for viruses by MessageLabs. The information contained in this message is confidential and is intended for the addressee only. If you have received this message in error, please notify Conchango plc as soon as possible. The unauthorised use, disclosure, copying or alteration of this message is prohibited and may be unlawful. The internet cannot guarantee the integrity of this message and therefore Conchango plc will not be liable for the message if modified. Reg. Heritage House, Church Road, Egham, Surrey, TW20 9QD T 44 (0) 1784 222 222 F 44 (0) 1784 222 200 E talktous at conchango.com No. 2598884 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/171d6b84/attachment.html From manishs at reconnex.net Wed Nov 16 05:49:33 2005 From: manishs at reconnex.net (Manish Sapariya) Date: Wed, 16 Nov 2005 16:19:33 +0530 Subject: [Wtr-general] watir exception... In-Reply-To: <437B013E.1060500@qantom.com> References: <437ADD70.9050005@gs-lab.com> <437B013E.1060500@qantom.com> Message-ID: <437B0EBD.4080705@reconnex.net> Nope, I still get the same error. Note that script runs fine.....only at the end it throws this error. Regards, Manish On 11/16/2005 03:21 PM, Sathya Shankar wrote: >Hi > >[Sign Out, > >Here the "," seems to be causing the problem. So in your script you can either use the "," in your script or the regular expressions >Then the script would look like >ie=IE.attach(:title, /.*Yahoo.*/) >ie.link(:text, /.*Sign Out.*/).click >ie.close() >The above script worked for me. > > > >smanish wrote: > > > >>Hi, >>I have following simple script....but at the end of executiong.. >>I get exception as bellow >> >>W, [16-Nov-2005 12:40:52#7832] WARN -- : frame error in waitdocument >> OLE error code:80070005 in >> Access is denied. >> HRESULT error code:0x80020009 >> Exception occurred. >>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in >>`method_missing' >>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in `wait' >>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `upto' >>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `wait' >>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2014:in `click' >>yahoomail.rb:10 >>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in >>`assert_exists': Unable to locate object, using text and Sign out >>(Watir::Exception::UnknownObjectException) >> from c:/program >>files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2009:in `click' >> from yahoomail.rb:13 >> >> >> >> >>>Exit code: 1 >>> >>> >>> >>> >>------------------------------------- >>require 'watir' # the watir controller >># open the IE browser >>$ie = Watir::IE.new >>$ie.set_fast_speed() >>test_site="http://mail.yahoo.com/" >>$ie.goto(test_site) >>$ie.text_field(:name, "login").set("abc") >>$ie.text_field(:id, "passwd").set("xyz") >>$ie.button(:value, "Sign In").click >>$ie.show_all_objects >>$ie.link(:text, "Sign out").click >>$ie.close >> >>Any ideas?? >>Thanks, >>Manish >> >>_______________________________________________ >>Wtr-general mailing list >>Wtr-general at rubyforge.org >>http://rubyforge.org/mailman/listinfo/wtr-general >> >> >> >> > > > > From zeljko.filipin at gmail.com Wed Nov 16 05:54:41 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 16 Nov 2005 11:54:41 +0100 Subject: [Wtr-general] How to capture current page in a variable? In-Reply-To: Message-ID: <003401c5ea9c$26c63990$c6e7fea9@officezg.wa> I do not understand what do you need. To capture url use ie.url, for text ie.text, for title ie.title, for html ie.html... Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Beaton, Malcolm Sent: Wednesday, November 16, 2005 11:44 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] How to capture current page in a variable? This is probably a really simple question (but I have only been using ruby/WATiR for 2 days) I am trying to test site navigation to each site portal using an array and an iterative select and go command. (see below) PortalArray.each do | x | puts 'Step 2.'runNumber' : Select ' x ' for the Portal list' $ie.select_list( :id, "gatewaycountry").select(x) puts ' Action: selected ' runNumber ' for the Portal list.' puts 'Step 2,' x '.1: click the "Go" button' $ie.button(:id, "go").click puts ' Action: clicked the Go button.' assert?? runNumber = runNumber + 1 end Now the question I have is I need to assert that the browser actually went there (or at least tried to) I thought I could do this by capturing the current page address in a variable and using another array to match it against? The other thing is the HTML knows what portal it is at using this method (below) Is there a way I can test for that instead? (my HTML is not so good to be honest) Any help would be appreciated Mal Malcolm Beaton Technical Consultant Conchango 'Innovative Change in Business' D +44 (0) 1784 222127 S +44 (0) 1784 222222 M +44 (0) 777 071 3121 malcolm.beaton at conchango.com http://www.conchango.com No.2 New Media Age - Top 10 Technology Agencies 2004 No.5 New Media Age - Top 20 Interactive Agencies 2004 No.3 Marketing - Top 100 New Media Agencies 2005 Winner - Best Travel Website - New Media Age 2005 Winner - Best Retail Website - British Interactive Media Association (BIMA) 2004 Winner - Information Management Business Intelligence Project of the Year 2003 Winner - Microsoft European Business Intelligence Solutions Award 2003 More awards > -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: 16 November 2005 09:50 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Can watir be used to drive gmail.... HTML source will tell you why it does not work. :) It seems that gmail uses a lot of ajax (or something like that). Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish Sent: Wednesday, November 16, 2005 10:32 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Can watir be used to drive gmail.... Hey thanks for the solution. It works. But why it does not work with default gmail interface? Regards, Manish On 11/16/2005 02:34 PM, Zeljko Filipin wrote: >I just tried it too, and it really does not work. >Solution: log in, go to http://mail.google.com/mail/h/ and you will be >switched to basic HTML and watir will work. > >Zeljko > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish >Sent: Wednesday, November 16, 2005 7:54 AM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Can watir be used to drive gmail.... > >I tried and after logging in... >I was simply lost.... > >Any clues?? >Has any one used watir successfully to drive gmail? > >Thanks and Regards, >Manish > > > >_______________________________________________ >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 _____________________________________________________________________ This e-mail has been scanned for viruses by MessageLabs. The information contained in this message is confidential and is intended for the addressee only. If you have received this message in error, please notify Conchango plc as soon as possible. The unauthorised use, disclosure, copying or alteration of this message is prohibited and may be unlawful. The internet cannot guarantee the integrity of this message and therefore Conchango plc will not be liable for the message if modified. Reg. Heritage House, Church Road, Egham, Surrey, TW20 9QD T 44 (0) 1784 222 222 F 44 (0) 1784 222 200 E talktous at conchango.com No. 2598884 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/7ec729f8/attachment.html From zeljko.filipin at gmail.com Wed Nov 16 05:58:46 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 16 Nov 2005 11:58:46 +0100 Subject: [Wtr-general] Can watir be used to drive gmail.... In-Reply-To: <437AFC7F.1070402@gs-lab.com> Message-ID: <003901c5ea9c$b92da020$c6e7fea9@officezg.wa> http://googleblog.blogspot.com/2005/10/guess-what-just-turned-34.html More about gmail. Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish Sent: Wednesday, November 16, 2005 10:32 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Can watir be used to drive gmail.... Hey thanks for the solution. It works. But why it does not work with default gmail interface? Regards, Manish On 11/16/2005 02:34 PM, Zeljko Filipin wrote: >I just tried it too, and it really does not work. >Solution: log in, go to http://mail.google.com/mail/h/ and you will be >switched to basic HTML and watir will work. > >Zeljko > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish >Sent: Wednesday, November 16, 2005 7:54 AM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Can watir be used to drive gmail.... > >I tried and after logging in... >I was simply lost.... > >Any clues?? >Has any one used watir successfully to drive gmail? > >Thanks and Regards, >Manish > > > >_______________________________________________ >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 techpra at yahoo.co.in Wed Nov 16 06:17:23 2005 From: techpra at yahoo.co.in (pj jha) Date: Wed, 16 Nov 2005 11:17:23 +0000 (GMT) Subject: [Wtr-general] Problem in WATiR Message-ID: <20051116111723.3908.qmail@web8309.mail.in.yahoo.com> hi, i am little bit confused, my confusion is as follow, Suppose i want write the code for any control like textbox, drop down box etc in watir. I want to pass the field name associated with that control and the value which i have to entered(in case of textbox) or select(in case of dropdown box). please send any sample code for above requirement. thanks and regards, --Prashant --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/a4d82d3f/attachment.html From techpra at yahoo.co.in Wed Nov 16 06:19:43 2005 From: techpra at yahoo.co.in (pj jha) Date: Wed, 16 Nov 2005 11:19:43 +0000 (GMT) Subject: [Wtr-general] Problem in WATiR Message-ID: <20051116111943.29499.qmail@web8305.mail.in.yahoo.com> hi, i am little bit confused, my confusion is as follow, Suppose i want write the code for any control like textbox, drop down box etc in watir. I want to pass the field name associated with that control and the value which i have to entered(in case of textbox) or select(in case of dropdown box). please send any sample code for above requirement. thanks and regards, --Prashant --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/125e9f02/attachment.html From zeljko.filipin at gmail.com Wed Nov 16 06:58:01 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 16 Nov 2005 12:58:01 +0100 Subject: [Wtr-general] Problem in WATiR In-Reply-To: <20051116111723.3908.qmail@web8309.mail.in.yahoo.com> Message-ID: <005a01c5eaa4$fff48c00$c6e7fea9@officezg.wa> I do not understand what do you want to do. You can enter 'watir rules' in textbox like this ie.textField(:id, 'textField_id').set('watir rules') and select 'watir rules' ie.selectBox(:id, 'selectBox_id').select('watir rules') More information on http://wtr.rubyforge.org/watir_user_guide.html (and even more on http://wtr.rubyforge.org/) Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of pj jha Sent: Wednesday, November 16, 2005 12:17 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Problem in WATiR hi, i am little bit confused, my confusion is as follow, Suppose i want write the code for any control like textbox, drop down box etc in watir. I want to pass the field name associated with that control and the value which i have to entered(in case of textbox) or select(in case of dropdown box). please send any sample code for above requirement. thanks and regards, --Prashant _____ Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/622aabc5/attachment.html From satti at qantom.com Wed Nov 16 06:40:05 2005 From: satti at qantom.com (Sathya Shankar) Date: Wed, 16 Nov 2005 17:10:05 +0530 Subject: [Wtr-general] watir exception... In-Reply-To: <437B0EBD.4080705@reconnex.net> References: <437ADD70.9050005@gs-lab.com> <437B013E.1060500@qantom.com> <437B0EBD.4080705@reconnex.net> Message-ID: <437B1A95.3020406@qantom.com> Its not an error message its a warning message and you can suppress that warning by using this code... I think this is mainly because of the fact that the different frames are loaded from different domains.(not sure about it) ie=IE.attach(:title, /.*Yahoo.*/) begin ie.link(:text, /.*Sign Out.*/).click rescue end ie.close() Let me know any issues. Manish Sapariya wrote: >Nope, >I still get the same error. >Note that script runs fine.....only at the end it throws this error. >Regards, >Manish > > >On 11/16/2005 03:21 PM, Sathya Shankar wrote: > > > >>Hi >> >>[Sign Out, >> >>Here the "," seems to be causing the problem. So in your script you can either use the "," in your script or the regular expressions >>Then the script would look like >>ie=IE.attach(:title, /.*Yahoo.*/) >>ie.link(:text, /.*Sign Out.*/).click >>ie.close() >>The above script worked for me. >> >> >> >>smanish wrote: >> >> >> >> >> >>>Hi, >>>I have following simple script....but at the end of executiong.. >>>I get exception as bellow >>> >>>W, [16-Nov-2005 12:40:52#7832] WARN -- : frame error in waitdocument >>> OLE error code:80070005 in >>> Access is denied. >>> HRESULT error code:0x80020009 >>> Exception occurred. >>>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in >>>`method_missing' >>>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1405:in `wait' >>>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `upto' >>>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1404:in `wait' >>>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2014:in `click' >>>yahoomail.rb:10 >>>c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in >>>`assert_exists': Unable to locate object, using text and Sign out >>>(Watir::Exception::UnknownObjectException) >>> from c:/program >>>files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2009:in `click' >>> from yahoomail.rb:13 >>> >>> >>> >>> >>> >>> >>>>Exit code: 1 >>>> >>>> >>>> >>>> >>>> >>>> >>>------------------------------------- >>>require 'watir' # the watir controller >>># open the IE browser >>>$ie = Watir::IE.new >>>$ie.set_fast_speed() >>>test_site="http://mail.yahoo.com/" >>>$ie.goto(test_site) >>>$ie.text_field(:name, "login").set("abc") >>>$ie.text_field(:id, "passwd").set("xyz") >>>$ie.button(:value, "Sign In").click >>>$ie.show_all_objects >>>$ie.link(:text, "Sign out").click >>>$ie.close >>> >>>Any ideas?? >>>Thanks, >>>Manish >>> >>>_______________________________________________ >>>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 > > -- Sathya Shankar M G Software Testing Engineer Qantom Software http://www.qantom.com Ph : 26799269 Xtn. 123 sip : satti at sip411.com From satti at qantom.com Wed Nov 16 07:23:28 2005 From: satti at qantom.com (Sathya Shankar) Date: Wed, 16 Nov 2005 17:53:28 +0530 Subject: [Wtr-general] Problem in WATiR In-Reply-To: <20051116111943.29499.qmail@web8305.mail.in.yahoo.com> References: <20051116111943.29499.qmail@web8305.mail.in.yahoo.com> Message-ID: <437B24C0.3030800@qantom.com> Go through the user guide for watir and u can find it in .... http://wtr.rubyforge.org/watir_user_guide.html pj jha wrote: > hi, > > i am little bit confused, my confusion is as follow, > > Suppose i want write the code for any control like textbox, drop down > box etc in watir. I want to pass the field name associated with that > control and the value which i have to entered(in case of textbox) > or select(in case of dropdown box). > > please send any sample code for above requirement. > > thanks and regards, > --Prashant > > ------------------------------------------------------------------------ > Enjoy this Diwali with Y! India Click here > > >------------------------------------------------------------------------ > >_______________________________________________ >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 Malcolm.Beaton at conchango.com Wed Nov 16 08:27:57 2005 From: Malcolm.Beaton at conchango.com (Beaton, Malcolm) Date: Wed, 16 Nov 2005 13:27:57 -0000 Subject: [Wtr-general] How to capture current page in a variable? Message-ID: Hi Zeljko Basically I want my browser to 1 - pick a site from an array 2 - enter it in the drop down 3 - press go (Thus loading the portal for that country) 4 - verify the correct site loaded I can do all that except 4. So I thought if I can grab the URL from IE I can compare that to another array of expected outcomes. The Other option was to assert that the relevant part of the page source after it loads looks like this And not this But I am unsure how to do either of these. So I am trying to find out if there is an easy way like assert(ie.current_url('the_URL_I_Am_expecting) (This is of course made up) OR Assert(:ID, "Gatewaycountry", :Value, "#").contains(Australia site) (Again made up) Does this help? Malcolm Beaton Technical Consultant Conchango 'Innovative Change in Business' D +44 (0) 1784 222127 S +44 (0) 1784 222222 M +44 (0) 777 071 3121 malcolm.beaton at conchango.com http://www.conchango.com No.2 New Media Age - Top 10 Technology Agencies 2004 No.5 New Media Age - Top 20 Interactive Agencies 2004 No.3 Marketing - Top 100 New Media Agencies 2005 Winner - Best Travel Website - New Media Age 2005 Winner - Best Retail Website - British Interactive Media Association (BIMA) 2004 Winner - Information Management Business Intelligence Project of the Year 2003 Winner - Microsoft European Business Intelligence Solutions Award 2003 More awards > _____________________________________________________________________ This e-mail has been scanned for viruses by MessageLabs. The information contained in this message is confidential and is intended for the addressee only. If you have received this message in error, please notify Conchango plc as soon as possible. The unauthorised use, disclosure, copying or alteration of this message is prohibited and may be unlawful. The internet cannot guarantee the integrity of this message and therefore Conchango plc will not be liable for the message if modified. Reg. Heritage House, Church Road, Egham, Surrey, TW20 9QD T 44 (0) 1784 222 222 F 44 (0) 1784 222 200 E talktous at conchango.com No. 2598884 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/b6736231/attachment.html From Jan.Montano at thomson.com Wed Nov 16 08:27:50 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Wed, 16 Nov 2005 21:27:50 +0800 Subject: [Wtr-general] Problem in WATiR Message-ID: Is something like this you're after? def MethodWrapper.insert_text(text, fieldname, description) $ie.text_field(:name, fieldname ).value = text puts ' ACTION: entered ' + text + ' in the ' + description + ' field' #puts '\t- successful.' end #MethodWrapper.insert_text('2005/04',"txtBilDetRepTo",'End Date') -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of pj jha Sent: Wednesday, November 16, 2005 7:20 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Problem in WATiR hi, i am little bit confused, my confusion is as follow, Suppose i want write the code for any control like textbox, drop down box etc in watir. I want to pass the field name associated with that control and the value which i have to entered(in case of textbox) or select(in case of dropdown box). please send any sample code for above requirement. thanks and regards, --Prashant _____ Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/e74ac56b/attachment.html From zeljko.filipin at gmail.com Wed Nov 16 08:44:15 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 16 Nov 2005 14:44:15 +0100 Subject: [Wtr-general] How to capture current page in a variable? In-Reply-To: Message-ID: <007601c5eab3$d727c300$c6e7fea9@officezg.wa> You can do assert(ie.url == 'the_URL_I_Am_expecting') More information abuot select lists at http://wtr.rubyforge.org/rdoc/ (http://wtr.rubyforge.org/rdoc/classes/Watir/SelectList.html) Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Beaton, Malcolm Sent: Wednesday, November 16, 2005 2:28 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How to capture current page in a variable? Hi Zeljko Basically I want my browser to 1 - pick a site from an array 2 - enter it in the drop down 3 - press go (Thus loading the portal for that country) 4 - verify the correct site loaded I can do all that except 4. So I thought if I can grab the URL from IE I can compare that to another array of expected outcomes. The Other option was to assert that the relevant part of the page source after it loads looks like this And not this But I am unsure how to do either of these. So I am trying to find out if there is an easy way like assert(ie.current_url('the_URL_I_Am_expecting) (This is of course made up) OR Assert(:ID, "Gatewaycountry", :Value, "#").contains(Australia site) (Again made up) Does this help? Malcolm Beaton Technical Consultant Conchango 'Innovative Change in Business' D +44 (0) 1784 222127 S +44 (0) 1784 222222 M +44 (0) 777 071 3121 malcolm.beaton at conchango.com http://www.conchango.com No.2 New Media Age - Top 10 Technology Agencies 2004 No.5 New Media Age - Top 20 Interactive Agencies 2004 No.3 Marketing - Top 100 New Media Agencies 2005 Winner - Best Travel Website - New Media Age 2005 Winner - Best Retail Website - British Interactive Media Association (BIMA) 2004 Winner - Information Management Business Intelligence Project of the Year 2003 Winner - Microsoft European Business Intelligence Solutions Award 2003 More awards > _____________________________________________________________________ This e-mail has been scanned for viruses by MessageLabs. The information contained in this message is confidential and is intended for the addressee only. If you have received this message in error, please notify Conchango plc as soon as possible. The unauthorised use, disclosure, copying or alteration of this message is prohibited and may be unlawful. The internet cannot guarantee the integrity of this message and therefore Conchango plc will not be liable for the message if modified. Reg. Heritage House, Church Road, Egham, Surrey, TW20 9QD T 44 (0) 1784 222 222 F 44 (0) 1784 222 200 E talktous at conchango.com No. 2598884 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/10824b41/attachment.html From Malcolm.Beaton at conchango.com Wed Nov 16 09:01:03 2005 From: Malcolm.Beaton at conchango.com (Beaton, Malcolm) Date: Wed, 16 Nov 2005 14:01:03 -0000 Subject: [Wtr-general] How to capture current page in a variable? Message-ID: Thanks!! Mal Malcolm Beaton Technical Consultant Conchango _____________________________________________________________________ This e-mail has been scanned for viruses by MessageLabs. The information contained in this message is confidential and is intended for the addressee only. If you have received this message in error, please notify Conchango plc as soon as possible. The unauthorised use, disclosure, copying or alteration of this message is prohibited and may be unlawful. The internet cannot guarantee the integrity of this message and therefore Conchango plc will not be liable for the message if modified. Reg. Heritage House, Church Road, Egham, Surrey, TW20 9QD T 44 (0) 1784 222 222 F 44 (0) 1784 222 200 E talktous at conchango.com No. 2598884 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/4a9beb8d/attachment.html From techpra at yahoo.co.in Wed Nov 16 09:17:49 2005 From: techpra at yahoo.co.in (pj jha) Date: Wed, 16 Nov 2005 14:17:49 +0000 (GMT) Subject: [Wtr-general] Problem in WATiR Message-ID: <20051116141749.87848.qmail@web8301.mail.in.yahoo.com> Hi, Problem is not as you understand. I am going to explain in detail. Actually I am writing test script in ruby and I am using WATiR for same. It?s an automatic testing script. When I start the execution of script it entered value and test the web pages. I am giving one example for that. Suppose I have to test login page, so for login page I have to entered user id and password in textbox and click the submit button. It will happen automatically. So at first I write one library for login page then another fellow will call that library for testing of login page. The page structure is as User Id: Password: So tester want to entered user id and password in the above textboxes, and tester does not know anything of textbox like id, name etc. but tester knows the name of label (i.e. User Id and Password), so he will pass the name of label and value which he/she wants to entered in that textbox. So now I am not getting how I can write the code for this situation. Please send me any sample if you get the time. Thanks and regards, -Prashant --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/6725999d/attachment.html From vishalworld at sqatester.com Wed Nov 16 10:02:20 2005 From: vishalworld at sqatester.com (Vishal Chavan) Date: Wed, 16 Nov 2005 07:02:20 -0800 (PST) Subject: [Wtr-general] Problem in WATiR Message-ID: <20051116070220.96D45D73@dm22.mta.everyone.net> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/f08fca66/attachment.html From paul.rogers at shaw.ca Wed Nov 16 10:58:01 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 16 Nov 2005 08:58:01 -0700 Subject: [Wtr-general] Span troubles Message-ID: <2ca7c30bd8.30bd82ca7c@shaw.ca> take a look at css test in the unit tests directory. That does something simlar to what you need. I think you need to do something slightly different: if /none/i.match( ie.span(:id , 'xxx').getOleObject.style.cssText ) puts "its hidden" else puts "displayed!" end Content-Type: multipart/alternative; boundary="----=_Part_22865_26673201.1132081211626" ------=_Part_22865_26673201.1132081211626 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I have a span that is not disabled, as follows: Certain user actions cause the text within this span to show up in red, otherwise it is hidden to the user. simply doing an ie.contains_text(span.text) does not work because I still get non nil result whether the span is shown in red or not. Is there anyway around this so that I can test whether the text in the spa= n is on the page or not? Shao ------=_Part_22865_26673201.1132081211626 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
I have a span that is not disabled, as follows:
 
<span id=3D"ChangeProfileControl_FirstnameRequiredValidator&qu= ot; controltovalidate=3D"ChangeProfileControl_first_name" errorme= ssage=3D"Please enter your first name." display=3D"Dynamic&q= uot; evaluationfunction=3D"RequiredFieldValidatorEvaluateIsValid"= initialvalue=3D"" style=3D"color:Red;display:none;">= ;Please enter your first name.</span>
 
 
Certain user actions cause the text within this span to show up in red= ,
otherwise it is hidden to the user.
 
simply doing an ie.contains_text(span.text) does not work because
I still get non nil result whether the span is shown in red or not.
 
Is there anyway around this so that I can test whether the text in the= span
is on the page or not?
 
Shao
 
------=_Part_22865_26673201.1132081211626-- -------------- next part -------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jeff.darklight at gmail.com Wed Nov 16 11:06:54 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 16 Nov 2005 08:06:54 -0800 Subject: [Wtr-general] Can watir be used to drive gmail.... In-Reply-To: <003901c5ea9c$b92da020$c6e7fea9@officezg.wa> References: <437AFC7F.1070402@gs-lab.com> <003901c5ea9c$b92da020$c6e7fea9@officezg.wa> Message-ID: It works, you just have to learn how to get around ... alot of ajax stuff gets initialized when a mouse over or other javascript event happens. j. On 11/16/05, Zeljko Filipin wrote: > > http://googleblog.blogspot.com/2005/10/guess-what-just-turned-34.html > > More about gmail. > > Zeljko > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish > Sent: Wednesday, November 16, 2005 10:32 AM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] Can watir be used to drive gmail.... > > Hey thanks for the solution. > It works. But why it does not work with default gmail interface? > > Regards, > Manish > > > On 11/16/2005 02:34 PM, Zeljko Filipin wrote: > > >I just tried it too, and it really does not work. > >Solution: log in, go to http://mail.google.com/mail/h/ and you will be > >switched to basic HTML and watir will work. > > > >Zeljko > > > >-----Original Message----- > >From: wtr-general-bounces at rubyforge.org > >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish > >Sent: Wednesday, November 16, 2005 7:54 AM > >To: wtr-general at rubyforge.org > >Subject: [Wtr-general] Can watir be used to drive gmail.... > > > >I tried and after logging in... > >I was simply lost.... > > > >Any clues?? > >Has any one used watir successfully to drive gmail? > > > >Thanks and Regards, > >Manish > > > > > > > >_______________________________________________ > >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 > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051116/31674317/attachment.html From mooola00 at hotmail.com Wed Nov 16 13:02:10 2005 From: mooola00 at hotmail.com (Eugene Kula) Date: Wed, 16 Nov 2005 11:02:10 -0700 Subject: [Wtr-general] Best practices posting back to parent window from child window Message-ID: What is the best way to assert something on a parent window that is posted from a child window? When I run my assert the script fails because the parent window isn't finishedl posting. Is there a way to tell when IE is done posting? Many thanks! From mooola00 at hotmail.com Wed Nov 16 13:18:38 2005 From: mooola00 at hotmail.com (Eugene Kula) Date: Wed, 16 Nov 2005 11:18:38 -0700 Subject: [Wtr-general] Best practices posting back to parent window fromchild window In-Reply-To: Message-ID: Is it as simple as doing an $ie.wait before my assert after reattaching to the parentwindow? >From: "Eugene Kula" >Reply-To: wtr-general at rubyforge.org >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Best practices posting back to parent window >fromchild window >Date: Wed, 16 Nov 2005 11:02:10 -0700 > >What is the best way to assert something on a parent window that is posted >from a child window? When I run my assert the script fails because the >parent window isn't finishedl posting. Is there a way to tell when IE is >done posting? Many thanks! > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general From iain.rose at gmail.com Wed Nov 16 14:54:24 2005 From: iain.rose at gmail.com (Iain Rose) Date: Wed, 16 Nov 2005 11:54:24 -0800 Subject: [Wtr-general] Accessing Frames that show --Access Denied- In-Reply-To: <5.1.0.14.2.20051005104639.031cd798@127.0.0.1> References: <000601c5c69c$f934ebc0$0200a8c0@Study4700> <5.1.0.14.2.20051005104639.031cd798@127.0.0.1> Message-ID: Are there any other options if neither of these workarounds are available? I can't ask the developers to make the change you suggested and opening the frames in seperate browsers doesn't work. The test script I'm using is: require 'watir' require 'test/unit' include Watir class TC_Smoke_Test < Test::Unit::TestCase def setup #define constants test_url = ' http://sedm3103.ent.agt.ab.ca:20003/desktopone/dashboard/initialAgent.do' #launch browser @ie = IE.new() @ie.goto(test_url) end def teardown #close browser @ie.close() end def test_show_frames puts @ie.show_frames() end end The error message reads: Loaded suite smoke_test Started there are 9 frames frame index: 1 --Access Denied-- frame index: 2 --Access Denied-- frame index: 3 --Access Denied-- frame index: 4 --Access Denied-- frame index: 5 --Access Denied-- frame index: 6 --Access Denied-- frame index: 7 --Access Denied-- frame index: 8 --Access Denied-- frame index: 9 --Access Denied-- 0..8 . Finished in 9.531 seconds. 1 tests, 0 assertions, 0 failures, 0 errors W, [16-Nov-2005 11:51:00#1360] WARN -- : frame error in waitdocument OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1405:in `method_missing' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1405:in `wait' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1404:in `upto' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1404:in `wait' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1254:in `goto' smoke_test.rb:15:in `setup' c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:69: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_mediator' 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 On 05/10/05, Bret Pettichord wrote: > > At 10:29 AM 10/1/2005, Peter wrote: > >I am using WATIR to test a web application and have hit some problems. I > >have reproduced the issue with an external website. My questions are: > > > >1. Can I safely ignore the frame error in waitdocument (it was been the > >topic of previous threads) [I get this error on both my internal website > >that I am testing as well as this external website]. > > Yes. An error message was removed from waitdocument in Watir 1.4.1. If you > still see an error message, then it is something else from what we > discussed. > > >2. How do I access frames (show_objects, click link etc) that return > >--Access Denied . > > > >v I am able to see the HTML on the screen (by right button view source) > > > >v ie.show_frames shows one of the frames as --Access Denied . > > > >v The second frame does not seem to appear in a show_all_objects > > > >v Attempting to access the second frame via index results in an error > >`method_missing': document (WIN32OLERuntimeError) > > > >v I have verified that the same commands work for Frame 1 (which does > >not report access denied) > > One workaround is to get the URL for the access-denied frame (which you > should be able to get). And then open an IE browser that directly hosts > that URL. This workaround may or may not be acceptable depending on your > application. > > The only other workaround is to have your developers set up the pages > hosted by separate subdomains to reference a common domain. This approach > wouldn't apply to the specific example in your script > ( > http://computer.howstuffworks.com/framed.htm?parent=web-page.htm&url=http://www.aquarium.ucsd.edu > ), > but it is applicable to many of the common situations that run into the > access-denied problem. For more details, see > http://www.mozilla.org/projects/security/components/same-origin.html > > Bret > > > _____________________ > 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/20051116/ab0be4c0/attachment.html From Jan.Montano at thomson.com Wed Nov 16 20:54:25 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Thu, 17 Nov 2005 09:54:25 +0800 Subject: [Wtr-general] japanese characters Message-ID: I know this is not a watir related question, but hope I could also find answers here. Lately, My freeride doesn't accept japanese unicode characters anymore. it marks as ????. but i've set may language to japanese, and notepad accepts japanese characters. Is there something I have to set with freeride? Thanks. From Jan.Montano at thomson.com Wed Nov 16 21:03:21 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Thu, 17 Nov 2005 10:03:21 +0800 Subject: [Wtr-general] japanese characters Message-ID: I've got it to work now. Thanks. Windows gave me a hard time in setting those language settings. When I activate a window, it's english, when i activate another one, its japanese. -----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: Thursday, November 17, 2005 9:54 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] japanese characters I know this is not a watir related question, but hope I could also find answers here. Lately, My freeride doesn't accept japanese unicode characters anymore. it marks as ????. but i've set may language to japanese, and notepad accepts japanese characters. Is there something I have to set with freeride? Thanks. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From ASahu at thoughtworks.com Thu Nov 17 00:58:51 2005 From: ASahu at thoughtworks.com (Anand Jagadishprasad Sahu) Date: Thu, 17 Nov 2005 11:28:51 +0530 Subject: [Wtr-general] Anand Jagadishprasad Sahu is out of the office. Message-ID: I will be out of the office starting 11/17/2005 and will not return until 11/21/2005. I will respond to your message when I return on 21-Nov-2005. In case of any urgency, please send an email to mnai at thoughtworks.com or dsachdev at thoughtworks.com. From Mark_Cain at rl.gov Wed Nov 16 15:49:46 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Wed, 16 Nov 2005 12:49:46 -0800 Subject: [Wtr-general] Best practices posting back to parent windowfromchild window Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D46F@EX5V.rl.gov> You might try $ie.status() --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Eugene Kula Sent: Wednesday, November 16, 2005 10:19 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Best practices posting back to parent windowfromchild window Is it as simple as doing an $ie.wait before my assert after reattaching to the parentwindow? >From: "Eugene Kula" >Reply-To: wtr-general at rubyforge.org >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Best practices posting back to parent window >fromchild window >Date: Wed, 16 Nov 2005 11:02:10 -0700 > >What is the best way to assert something on a parent window that is posted >from a child window? When I run my assert the script fails because the >parent window isn't finishedl posting. Is there a way to tell when IE is >done posting? Many thanks! > > >_______________________________________________ >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 amit.garde at gmail.com Thu Nov 17 06:34:44 2005 From: amit.garde at gmail.com (Amit Garde) Date: Thu, 17 Nov 2005 17:04:44 +0530 Subject: [Wtr-general] traversing through tr's and td's In-Reply-To: <43783D84.3010502@verk.info> References: <20051113214521.59D6D2EE@dm21.mta.everyone.net> <43781EB3.1080900@verk.info> <7661e6730511132339m3e3e931cpbf758c86a92645fc@mail.gmail.com> <43783D84.3010502@verk.info> Message-ID: <7661e6730511170334lcff91a5j29ab3a80a8bafa27@mail.gmail.com> On 11/14/05, Alexey Verkhovsky wrote: > > Amit Garde wrote: > > Or an XPath expression... > Now it's time for me to pledge ignorance. Is there something in the > Watir API that can do XPath queries? > There is code checked in (which should be in the next stable release) that lets you identify elements using an XPath expression as a selector; this allows constructs like the following to be used: ie.element(:xpath, xpath-expression).method Searching on XPath in the list archive should throw up several references and examples of how this can be used in practice. Feel free to ask if you hit any problems... Amit -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051117/fade15a1/attachment.html From ASahu at thoughtworks.com Thu Nov 17 06:59:39 2005 From: ASahu at thoughtworks.com (Anand Jagadishprasad Sahu) Date: Thu, 17 Nov 2005 17:29:39 +0530 Subject: [Wtr-general] Anand Jagadishprasad Sahu is out of the office. Message-ID: I will be out of the office starting 11/17/2005 and will not return until 11/21/2005. I will respond to your message when I return on 21-Nov-2005. In case of any urgency, please send an email to mnaig at thoughtworks.com or dsachdev at thoughtworks.com. From alex at verk.info Thu Nov 17 09:13:42 2005 From: alex at verk.info (Alexey Verkhovsky) Date: Thu, 17 Nov 2005 08:13:42 -0600 Subject: [Wtr-general] traversing through tr's and td's In-Reply-To: <7661e6730511170334lcff91a5j29ab3a80a8bafa27@mail.gmail.com> References: <20051113214521.59D6D2EE@dm21.mta.everyone.net> <43781EB3.1080900@verk.info> <7661e6730511132339m3e3e931cpbf758c86a92645fc@mail.gmail.com> <43783D84.3010502@verk.info> <7661e6730511170334lcff91a5j29ab3a80a8bafa27@mail.gmail.com> Message-ID: <437C9016.20401@verk.info> Amit Garde wrote: > There is code checked in (which should be in the next stable release) > that lets you identify elements using an XPath expression as a > selector; this allows constructs like the following to be used: That's MARVELOUS! From Ben.Torres at rhi.com Thu Nov 17 13:00:23 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Thu, 17 Nov 2005 10:00:23 -0800 Subject: [Wtr-general] Accessing frames or anchors Message-ID: <1641BB0AA7287848817A63C3EE9677D509330F6B@hqp-ex-mb05.na.msds.rhi.com> I was wondering if anyone can help me with the following: I have a new browser window that pops-up after clicking on a link, and it appears to have frames within the browser: In the "main" section, there is a form that I am trying to submit, but for some reason when I try to submit the form by doing this I get an error saying "Unable to locate a frame with name main" I viewed source of the "main" section and found this tag: . Is this how I access that area? Thanks in advance, ben From Ben.Torres at rhi.com Thu Nov 17 13:36:50 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Thu, 17 Nov 2005 10:36:50 -0800 Subject: [Wtr-general] Accessing Frames that show --Access Denied- Message-ID: <1641BB0AA7287848817A63C3EE9677D509330F99@hqp-ex-mb05.na.msds.rhi.com> --- snip --- > One workaround is to get the URL for the access-denied frame (which you > should be able to get). And then open an IE browser that directly hosts > that URL. --- snip --- Trying the workaround stated above. I'm able to manually open up the frame that shows "--Access Denied---" in a new browser window. The only thing is that the URL is dynamic (URL has ids unique to the links I clicked from). How do I automate grabbing the URL from this page? Manually, I just right-click on the frame and view properties and grab the address. Thanks, Ben From Mark_Cain at rl.gov Thu Nov 17 13:39:23 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Thu, 17 Nov 2005 10:39:23 -0800 Subject: [Wtr-general] showModalDialogs in 1.4 Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D471@EX5V.rl.gov> I have searched the threads concerning IE windows launched as showModalDialog, or showModeless. Has there been any progress on handling windows launched as showModalDialog? I have been able to get AUTOIT to work somewhat but it is not consistent and frequently does not find the window until I manually close and re-launch it. Any thoughts? Thanks, ____________________ 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/20051117/07cff1e6/attachment.html From Ben.Torres at rhi.com Thu Nov 17 13:39:44 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Thu, 17 Nov 2005 10:39:44 -0800 Subject: [Wtr-general] Accessing Frames that show --Access Denied- Message-ID: <1641BB0AA7287848817A63C3EE9677D509330F9D@hqp-ex-mb05.na.msds.rhi.com> --- snip --- > One workaround is to get the URL for the access-denied frame (which > you should be able to get). And then open an IE browser that directly > hosts that URL. --- snip --- Trying the workaround stated above. I'm able to manually open up the frame that shows "--Access Denied---" in a new browser window. The only thing is that the URL is dynamic. How do I automate grabbing the URL from this page? Manually, I just right-click on the frame and view properties and grab the address. Is there a way I can have Watir open up a new browser window when I click on the button that opens the framed page? Thanks, Ben From christopher.mcmahon at gmail.com Thu Nov 17 14:01:35 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 17 Nov 2005 13:01:35 -0600 Subject: [Wtr-general] Accessing frames or anchors In-Reply-To: <1641BB0AA7287848817A63C3EE9677D509330F6B@hqp-ex-mb05.na.msds.rhi.com> References: <1641BB0AA7287848817A63C3EE9677D509330F6B@hqp-ex-mb05.na.msds.rhi.com> Message-ID: <72799cd70511171101k662228adrccd80eb184317831@mail.gmail.com> > I viewed source of the "main" section and found this tag: name="mainContent">. Is this how I access that area? What happens when you try? =) In the case of nested frames, I remember finding that using irb and ie.show_frames was generally more helpful than using "view source". With irb, you always know which frame is inside which other frame. -Chris From Ben.Torres at rhi.com Thu Nov 17 14:39:58 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Thu, 17 Nov 2005 11:39:58 -0800 Subject: [Wtr-general] Open new browser after clicking button Message-ID: <1641BB0AA7287848817A63C3EE9677D509331008@hqp-ex-mb05.na.msds.rhi.com> Right now, when I click a button, the page shows on the same browser page. Can Watir have the page open on a new browser page instead? Thanks in advance, ben -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051117/5e3cc016/attachment.html From mooola00 at hotmail.com Thu Nov 17 15:17:18 2005 From: mooola00 at hotmail.com (Eugene Kula) Date: Thu, 17 Nov 2005 13:17:18 -0700 Subject: [Wtr-general] Javascript tree problems Message-ID: I'm having difficulties getting to nodes in my javascript tree. One of the problems is that I can't use the span text to select a node because there may be nodes within the tree with the same text (most likely nested). And the image icons (e.g. folder.gif) aren't unique either. So what I'd like to do is be able to drilldown into the tree and click a span at a given level (e.g. expand billing node to display expenses and time entry node and click on time entry). L.gif is the plus sign. Following is what the (shortened) HTML looks like:
Home
Documents
Billing
Expenses
Time Entry
Groups
From zeljko.filipin at gmail.com Thu Nov 17 15:23:02 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 17 Nov 2005 21:23:02 +0100 Subject: [Wtr-general] Open new browser after clicking button In-Reply-To: <1641BB0AA7287848817A63C3EE9677D509331008@hqp-ex-mb05.na.msds.rhi.com> Message-ID: <000f01c5ebb4$b6d63760$c6e7fea9@officezg.wa> It looks to me that your application does what it is supposed to do. Open new page in the same browser. Watir has nothing with the fact what happens after he clicks button. Could you give me more detail (html...)? Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Torres, Ben (HQP) Sent: Thursday, November 17, 2005 8:40 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Open new browser after clicking button Right now, when I click a button, the page shows on the same browser page. Can Watir have the page open on a new browser page instead? Thanks in advance, ben -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051117/b507ca7a/attachment.html From Mark_Cain at rl.gov Thu Nov 17 15:37:10 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Thu, 17 Nov 2005 12:37:10 -0800 Subject: [Wtr-general] Open new browser after clicking button Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D472@EX5V.rl.gov> One of the things you can do is an IE setting. In IE: 1. Select the menu item Tools >> Internet Options. 2. Select the Advanced tab. 3. Under the heading 'Browser', uncheck the option 'Reuse windows for launching shortcuts' 4. Click Apply The other option is have your developers force a new window using JavaScript something like: Hope this helps, --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Torres, Ben (HQP) Sent: Thursday, November 17, 2005 11:40 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Open new browser after clicking button Right now, when I click a button, the page shows on the same browser page. Can Watir have the page open on a new browser page instead? Thanks in advance, ben -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051117/221a21aa/attachment.html From bret at pettichord.com Thu Nov 17 22:46:23 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 17 Nov 2005 21:46:23 -0600 Subject: [Wtr-general] xpath, was: traversing through tr's and td's In-Reply-To: <7661e6730511170334lcff91a5j29ab3a80a8bafa27@mail.gmail.com > References: <43783D84.3010502@verk.info> <20051113214521.59D6D2EE@dm21.mta.everyone.net> <43781EB3.1080900@verk.info> <7661e6730511132339m3e3e931cpbf758c86a92645fc@mail.gmail.com> <43783D84.3010502@verk.info> Message-ID: <5.1.0.14.2.20051117214505.03cc4570@pop.gmail.com> At 05:34 AM 11/17/2005, Amit Garde wrote: >Searching on XPath in the list archive should throw up several references >and examples of how this can be used in practice. Feel free to ask if you >hit any problems... Also see doc/Support for XPATH in Watir.doc _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Nov 17 22:53:29 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 17 Nov 2005 21:53:29 -0600 Subject: [Wtr-general] Span troubles In-Reply-To: <2ca7c30bd8.30bd82ca7c@shaw.ca> Message-ID: <5.1.0.14.2.20051117215253.03ca0030@pop.gmail.com> At 09:58 AM 11/16/2005, Paul Rogers wrote: > if /none/i.match( ie.span(:id , 'xxx').getOleObject.style.cssText ) > puts "its hidden" >else > puts "displayed!" >end It's ole_object, not getOleObject. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Nov 17 23:33:33 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 17 Nov 2005 22:33:33 -0600 Subject: [Wtr-general] Open new browser after clicking button In-Reply-To: <1641BB0AA7287848817A63C3EE9677D509331008@hqp-ex-mb05.na.ms ds.rhi.com> Message-ID: <5.1.0.14.2.20051117222829.03dd70a0@pop.gmail.com> At 01:39 PM 11/17/2005, Torres, Ben (HQP) wrote: >Right now, when I click a button, the page shows on the same browser >page. Can Watir have the page open on a new browser page instead? url = ie.image(:name, 'foo').src Watir::IE.start(url) Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Nov 17 23:34:41 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 17 Nov 2005 22:34:41 -0600 Subject: [Wtr-general] Best practices posting back to parent window fromchild window In-Reply-To: References: Message-ID: <5.1.0.14.2.20051117223430.03d2ddf0@pop.gmail.com> At 12:18 PM 11/16/2005, Eugene Kula wrote: >Is it as simple as doing an $ie.wait before my assert after reattaching to >the parentwindow? could be. try it and let us know. _____________________ Bret Pettichord www.pettichord.com From carl.l.shaulis at convergys.com Thu Nov 17 09:25:39 2005 From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com) Date: Thu, 17 Nov 2005 08:25:39 -0600 Subject: [Wtr-general] Importing a .cvs file Message-ID: Good morning: Our application permits a user to import a site file. I am able to attach to the pop up utility, but I am not able to find the text_area. When we do a ie.show_all_objects we are returned this file name=file id= value= alt= src= The ruby code looks like this: ie2 = IE.attach(:title, "Upload Site Data") assert(ie2.contains_text('Import the site data file by navigating to it using the Browse dialog. When finished, click Import.')) ie2.show_all_objects sleep 5 ie2.text_field(:name, "file").set( "c:\Functional_Test_site_data.csv") Here is a screen shot of the pop up. I can sent the html if needed. (Embedded image moved to file: pic29641.jpg) Here is the error message: 1) Error: test1(SCP_Account_Mgmt_2): NoMethodError: undefined method `text_file' for # C:/SBC10/sbc/test/Functional/scp_Account_Mgmn_2.rb:119:in `test1' How do I get Ruby to import this file? Thanks in advance for your assistance! Carl -- "NOTICE: The information contained in this electronic mail transmission is intended by Convergys Corporation for the use of the named individual or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone (collect), so that the sender's address records can be corrected." -------------- next part -------------- A non-text attachment was scrubbed... Name: pic29641.jpg Type: image/jpeg Size: 30806 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20051117/b40c08c4/attachment.jpg From manishs at reconnex.net Fri Nov 18 00:30:19 2005 From: manishs at reconnex.net (Manish Sapariya) Date: Fri, 18 Nov 2005 11:00:19 +0530 Subject: [Wtr-general] Can watir be used to drive gmail.... In-Reply-To: References: <437AFC7F.1070402@gs-lab.com> <003901c5ea9c$b92da020$c6e7fea9@officezg.wa> Message-ID: <437D66EB.20109@reconnex.net> Could you please more info on this. How does exactly mouse over event will be generated. I dont see any of the links seen in "view source file". When I do show_all_objects it hardly gives me any object info. What are other javascript event? Thanks for all help. Manish On 11/16/2005 09:36 PM, Jeff Wood wrote: > It works, you just have to learn how to get around ... alot of ajax > stuff gets initialized when a mouse over or other javascript event > happens. > > j. > > On 11/16/05, *Zeljko Filipin* > wrote: > > http://googleblog.blogspot.com/2005/10/guess-what-just-turned-34.html > > More about gmail. > > Zeljko > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org > ] On Behalf Of smanish > Sent: Wednesday, November 16, 2005 10:32 AM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] Can watir be used to drive gmail.... > > Hey thanks for the solution. > It works. But why it does not work with default gmail interface? > > Regards, > Manish > > > On 11/16/2005 02:34 PM, Zeljko Filipin wrote: > > >I just tried it too, and it really does not work. > >Solution: log in, go to http://mail.google.com/mail/h/ and you > will be > >switched to basic HTML and watir will work. > > > >Zeljko > > > >-----Original Message----- > >From: wtr-general-bounces at rubyforge.org > > >[mailto:wtr-general-bounces at rubyforge.org > ] On Behalf Of smanish > >Sent: Wednesday, November 16, 2005 7:54 AM > >To: wtr-general at rubyforge.org > >Subject: [Wtr-general] Can watir be used to drive gmail.... > > > >I tried and after logging in... > >I was simply lost.... > > > >Any clues?? > >Has any one used watir successfully to drive gmail? > > > >Thanks and Regards, > >Manish > > > > > > > >_______________________________________________ > >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 > > > > > -- > "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" > > Jeff Wood > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > From bret at pettichord.com Fri Nov 18 01:25:24 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 18 Nov 2005 00:25:24 -0600 Subject: [Wtr-general] showModalDialogs in 1.4 In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D471@EX5V.rl.gov> Message-ID: <5.1.0.14.2.20051118002410.024aa9b8@pop.gmail.com> At 12:39 PM 11/17/2005, Cain, Mark wrote: >I have searched the threads concerning IE windows launched as >showModalDialog, or showModeless. Has there been any progress on handling >windows launched as showModalDialog? I have been able to get AUTOIT to >work somewhat but it is not consistent and frequently does not find the >window until I manually close and re-launch it. Any thoughts? I've got working support for showModalDialog that actually gives you full access to the DOM. I'm hoping to find time over the next week to commit this. Bret _____________________ Bret Pettichord www.pettichord.com From jeff.darklight at gmail.com Fri Nov 18 01:44:25 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Thu, 17 Nov 2005 22:44:25 -0800 Subject: [Wtr-general] Can watir be used to drive gmail.... In-Reply-To: <437D66EB.20109@reconnex.net> References: <437AFC7F.1070402@gs-lab.com> <003901c5ea9c$b92da020$c6e7fea9@officezg.wa> <437D66EB.20109@reconnex.net> Message-ID: Manish, Really, this is a situation where the specifics of the implementation used by the app you are trying to test is the more important thing to know. Different applications that use ajax style dynamic messaging with the server side do it uniquely. You really need to study up on your application. I don't want to start giving you information and lead you in a direction that isn't necessarily in-line with what you actually need to know. I hope you understand. j. On 11/17/05, Manish Sapariya wrote: > > Could you please more info on this. > How does exactly mouse over event will be generated. > I dont see any of the links seen in "view source file". > When I do show_all_objects it hardly gives me any object info. > What are other javascript event? > > Thanks for all help. > Manish > > > On 11/16/2005 09:36 PM, Jeff Wood wrote: > > > It works, you just have to learn how to get around ... alot of ajax > > stuff gets initialized when a mouse over or other javascript event > > happens. > > > > j. > > > > On 11/16/05, *Zeljko Filipin* > > wrote: > > > > http://googleblog.blogspot.com/2005/10/guess-what-just-turned-34.html > > > > More about gmail. > > > > Zeljko > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > > > [mailto:wtr-general-bounces at rubyforge.org > > ] On Behalf Of smanish > > Sent: Wednesday, November 16, 2005 10:32 AM > > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] Can watir be used to drive gmail.... > > > > Hey thanks for the solution. > > It works. But why it does not work with default gmail interface? > > > > Regards, > > Manish > > > > > > On 11/16/2005 02:34 PM, Zeljko Filipin wrote: > > > > >I just tried it too, and it really does not work. > > >Solution: log in, go to http://mail.google.com/mail/h/ and you > > will be > > >switched to basic HTML and watir will work. > > > > > >Zeljko > > > > > >-----Original Message----- > > >From: wtr-general-bounces at rubyforge.org > > > > >[mailto:wtr-general-bounces at rubyforge.org > > ] On Behalf Of smanish > > >Sent: Wednesday, November 16, 2005 7:54 AM > > >To: wtr-general at rubyforge.org > > >Subject: [Wtr-general] Can watir be used to drive gmail.... > > > > > >I tried and after logging in... > > >I was simply lost.... > > > > > >Any clues?? > > >Has any one used watir successfully to drive gmail? > > > > > >Thanks and Regards, > > >Manish > > > > > > > > > > > >_______________________________________________ > > >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 > > > > > > > > > > -- > > "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" > > > > 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 > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051117/1476493e/attachment.html From jeff.darklight at gmail.com Fri Nov 18 01:54:19 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Thu, 17 Nov 2005 22:54:19 -0800 Subject: [Wtr-general] Importing a .cvs file In-Reply-To: References: Message-ID: Take a look at your objects, uploads aren't considered text fields. try using a file_field ie.file_field( :name, "file" ).set "c:\\Functional_Test_site_data.csv" On 11/17/05, carl.l.shaulis at convergys.com wrote: > > > > > > Good morning: > > Our application permits a user to import a site file. I am able to attach > to the pop up utility, but I am not able to find the text_area. When we do > a ie.show_all_objects we are returned this > > file name=file id= value= > alt= src= > > The ruby code looks like this: > > ie2 = IE.attach(:title, "Upload Site Data") > > assert(ie2.contains_text('Import the site data file by > navigating to it using the Browse dialog. When finished, click Import.')) > > ie2.show_all_objects > > sleep 5 > ie2.text_field(:name, "file").set( > "c:\Functional_Test_site_data.csv") > > Here is a screen shot of the pop up. I can sent the html if needed. > > (Embedded image moved to file: pic29641.jpg) > > > Here is the error message: > > 1) Error: > test1(SCP_Account_Mgmt_2): > NoMethodError: undefined method `text_file' for # > C:/SBC10/sbc/test/Functional/scp_Account_Mgmn_2.rb:119:in `test1' > > How do I get Ruby to import this file? > > Thanks in advance for your assistance! > > Carl > > -- > "NOTICE: The information contained in this electronic mail transmission is > intended by Convergys Corporation for the use of the named individual or > entity to which it is directed and may contain information that is > privileged or otherwise confidential. If you have received this electronic > mail transmission in error, please delete it from your system without > copying or forwarding it, and notify the sender of the error by reply > email > or by telephone (collect), so that the sender's address records can be > corrected." > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051117/49704804/attachment.html From carl.l.shaulis at convergys.com Fri Nov 18 07:23:25 2005 From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com) Date: Fri, 18 Nov 2005 06:23:25 -0600 Subject: [Wtr-general] Importing a .cvs file In-Reply-To: Message-ID: Thank you very much for your assistance! Works like a charm! Carl From amithashettyb at yahoo.co.in Fri Nov 18 08:07:15 2005 From: amithashettyb at yahoo.co.in (Amitha Shetty) Date: Fri, 18 Nov 2005 13:07:15 +0000 (GMT) Subject: [Wtr-general] How to retrieve the text in an Alert Window using WET? Message-ID: <20051118130715.44833.qmail@web8512.mail.in.yahoo.com> Hi, I am using WET to handle alert windows.I am able to dismiss the alert window by clicking on the ' OK' button using def_ok() $ie.Button("value:=Submit").click_without_blocking() $ie.Dialog("title:=Microsoft Internet Explorer").Button("text:=OK").click end But I want to retrieve the text in the alert window and verify if the right alert message is displayed. For Eg:An alert window saying 'Do You really want to do this".How do I get the text? How can I use Label(*args) method to do this? Thanks, Amitha --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051118/c1c2702f/attachment.html From raghu at qantom.com Fri Nov 18 08:39:21 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Fri, 18 Nov 2005 19:09:21 +0530 Subject: [Wtr-general] How to retrieve the text in an Alert Window using WET? In-Reply-To: <20051118130715.44833.qmail@web8512.mail.in.yahoo.com> References: <20051118130715.44833.qmail@web8512.mail.in.yahoo.com> Message-ID: <437DD989.3020809@qantom.com> Hi Amitha, Assuming that you are using the latest version of WET (0.5.3), you will have wet-winobjects installed on your machine. Using wet-winobjects, you will be able to do what you asked. For example, in your case, you can do : dlg = $ie.Dialog("title:=Microsoft Internet Explorer") lbl = dlg.win_label("index:=1") # Pl. Try index of 2, 3 - one of them works puts lbl.display_text will printout out Do You really want to .... (The text that is displayed on the dialog) The dlg.win_label above retrieves a handle to the first 'Static' element in the dialog window. The display_text method of the win_label class gets the actual text being displayed by the label. Hope this helps. The wet-winobjects is a ruby gem including rdocs. The rdocs describes all the wet-winboject class API. Cheers Raghu Amitha Shetty wrote: > Hi, > I am using WET to handle alert windows.I am able to dismiss the > alert window by clicking on the ' OK' button using > def_ok() > $ie.Button("value:=Submit").click_without_blocking() > $ie.Dialog("title:=Microsoft Internet Explorer").Button("text:=OK").click > end > But I want to retrieve the text in the alert window and verify if the > right alert message is displayed. > For Eg:An alert window saying 'Do You really want to do this".How do I > get the text? How can I use Label(*args) method to do this? > > Thanks, > Amitha > > ------------------------------------------------------------------------ > Enjoy this Diwali with Y! India Click here > > >------------------------------------------------------------------------ > >_______________________________________________ >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 roy_sin at yahoo.com Fri Nov 18 14:58:02 2005 From: roy_sin at yahoo.com (Roy Sin) Date: Fri, 18 Nov 2005 11:58:02 -0800 (PST) Subject: [Wtr-general] Clicking a link in a sidebar menu which is in a table within a frame Message-ID: <20051118195802.95676.qmail@web52902.mail.yahoo.com> Hi WtrList I have four links in a side bar menu within a table as shown below. How do I click on the "Service Types" which is the third link? thanks.
Service Status
Maintenance
Schedules
Service Types
Service Log
__________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com From Ben.Torres at rhi.com Fri Nov 18 14:58:36 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Fri, 18 Nov 2005 11:58:36 -0800 Subject: [Wtr-general] How do I get value from onclick Message-ID: <1641BB0AA7287848817A63C3EE9677D5093314C7@hqp-ex-mb05.na.msds.rhi.com> Is there anyway I can get the url specified in onclick? (http://fo-vap-rhe-us...) Here's a snip from the source code: What I would want to do is take this url and open it in a new browser window. Thanks in advance, ben From abhi.testing at gmail.com Sat Nov 19 02:21:48 2005 From: abhi.testing at gmail.com (Abhijit Basu) Date: Fri, 18 Nov 2005 23:21:48 -0800 Subject: [Wtr-general] Hi... Need help with windowlogon screen Message-ID: <96f40df50511182321m338e5cbcgbf87f6038fe17647@mail.gmail.com> Hi All, I am a recent convert to Watir and am loving every part of it. Since I am a newbie to both Watir and Ruby any help would be appreciated. Currently I am having problem tackling the window logon prompt (ntlm challenge). i am not sure how to enter the username and password in that. The unit tests bundled with Watir does have a test for it but I have not been able to decrypt the code. Thanks in advance, Abhijit -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051118/a3a5ee97/attachment.html From bret at pettichord.com Sat Nov 19 02:25:11 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 19 Nov 2005 01:25:11 -0600 Subject: [Wtr-general] Can watir be used to drive gmail.... In-Reply-To: <437D66EB.20109@reconnex.net> References: <437AFC7F.1070402@gs-lab.com> <003901c5ea9c$b92da020$c6e7fea9@officezg.wa> Message-ID: <5.1.0.14.2.20051119012404.03f71fd0@pop.gmail.com> At 11:30 PM 11/17/2005, Manish Sapariya wrote: >When I do show_all_objects it hardly gives me any object info. It's all frames within frames. A bit awkward to navigate, but Watir can do it... You also need to make sure you take care of synchronization yourself. Watir does not automatically do ajax synchronization. Bret _____________________ Bret Pettichord www.pettichord.com From jeff.darklight at gmail.com Sat Nov 19 08:06:52 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Sat, 19 Nov 2005 05:06:52 -0800 Subject: [Wtr-general] How do I get value from onclick In-Reply-To: <1641BB0AA7287848817A63C3EE9677D5093314C7@hqp-ex-mb05.na.msds.rhi.com> References: <1641BB0AA7287848817A63C3EE9677D5093314C7@hqp-ex-mb05.na.msds.rhi.com> Message-ID: You can always find the input and then parse out the information for yourself. ie.input( :name, "add" ).html.scan( /main.location='(.*)';top.side/ ) should return just that portion of things you are interested in. Remember that if your html is on multiple lines be sure to add a /m suffix to the regex for #scan. j. On 11/18/05, Torres, Ben (HQP) wrote: > > Is there anyway I can get the url specified in onclick? > (http://fo-vap-rhe-us...) > > Here's a snip from the source code: > > style="font-family:Helvetica;font-size:xx-small" > onclick="top.main.location='http://fo-vap-rhe-us/moveCandidate.jsp?profi > leId=10023852&foUserId=CYENBOR&lob=AT';top.side.document.actionForm.add. > disabled=true;"> > > What I would want to do is take this url and open it in a new browser > window. > > Thanks in advance, > ben > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051119/a10dd3f9/attachment.html From jeff.darklight at gmail.com Sat Nov 19 08:11:02 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Sat, 19 Nov 2005 05:11:02 -0800 Subject: [Wtr-general] Clicking a link in a sidebar menu which is in a table within a frame In-Reply-To: <20051118195802.95676.qmail@web52902.mail.yahoo.com> References: <20051118195802.95676.qmail@web52902.mail.yahoo.com> Message-ID: once you have the correct table cell just call #fire_event( "onClick" ) or just call #click it should invoke the onClick code. j. On 11/18/05, Roy Sin wrote: > > Hi WtrList > I have four links in a side bar menu within a table as > shown below. How do I click on the "Service Types" which is > the third link? thanks. > > > > > > > > > >
onMouseOver="movein('servstatus', 'admin_nav')" > onMouseOut="moveout('servstatus', 'admin_text')" > id="servstatus">Service Status
onMouseOver="movein('maintsched', 'admin_nav')" > onMouseOut="moveout('maintsched', 'admin_text')" > id="maintsched">Maintenance
Schedules
onMouseOver="movein('servtypes', 'admin_nav')" > onMouseOut="moveout('servtypes', 'admin_text')" > id="servtypes">Service Types
onMouseOver="movein('servlog', 'admin_nav')" > onMouseOut="moveout('servlog', 'admin_text')" > id="servlog">Service Log
> > > > > > > __________________________________ > Yahoo! Mail - PC Magazine Editors' Choice 2005 > http://mail.yahoo.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051119/86739933/attachment.html From jeff.darklight at gmail.com Sat Nov 19 08:13:44 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Sat, 19 Nov 2005 05:13:44 -0800 Subject: [Wtr-general] How to retrieve the text in an Alert Window using WET? In-Reply-To: <437DD989.3020809@qantom.com> References: <20051118130715.44833.qmail@web8512.mail.in.yahoo.com> <437DD989.3020809@qantom.com> Message-ID: When will we see a gem installable version of WET ? j. On 11/18/05, Raghu Venkataramana wrote: > > Hi Amitha, > > Assuming that you are using the latest version of WET (0.5.3), you will > have wet-winobjects > installed on your machine. Using wet-winobjects, you will be able to do > what you asked. For example, > in your case, you can do : > > dlg = $ie.Dialog("title:=Microsoft Internet Explorer") > lbl = dlg.win_label("index:=1") # Pl. Try index of 2, 3 - one of them > works > puts lbl.display_text > > will printout out > Do You really want to .... (The text that is displayed on the dialog) > > The dlg.win_label above retrieves a handle to the first 'Static' element > in the dialog window. > The display_text method of the win_label class gets the actual text > being displayed by the > label. > > Hope this helps. > > The wet-winobjects is a ruby gem including rdocs. The rdocs describes > all the wet-winboject > class API. > > Cheers > Raghu > > > Amitha Shetty wrote: > > > Hi, > > I am using WET to handle alert windows.I am able to dismiss the > > alert window by clicking on the ' OK' button using > > def_ok() > > $ie.Button("value:=Submit").click_without_blocking() > > $ie.Dialog("title:=Microsoft Internet > Explorer").Button("text:=OK").click > > end > > But I want to retrieve the text in the alert window and verify if the > > right alert message is displayed. > > For Eg:An alert window saying 'Do You really want to do this".How do I > > get the text? How can I use Label(*args) method to do this? > > > > Thanks, > > Amitha > > > > ------------------------------------------------------------------------ > > Enjoy this Diwali with Y! India Click here > > > > > >------------------------------------------------------------------------ > > > >_______________________________________________ > >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 > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051119/f6ef0d09/attachment.html From raghu at qantom.com Sat Nov 19 11:42:22 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Sat, 19 Nov 2005 22:12:22 +0530 Subject: [Wtr-general] How to retrieve the text in an Alert Window using WET? In-Reply-To: References: <20051118130715.44833.qmail@web8512.mail.in.yahoo.com> <437DD989.3020809@qantom.com> Message-ID: <437F55EE.7010304@qantom.com> The latest version for download is a gem. Raghu Jeff Wood wrote: > When will we see a gem installable version of WET ? > > j. > > On 11/18/05, *Raghu Venkataramana* > wrote: > > Hi Amitha, > > Assuming that you are using the latest version of WET (0.5.3), you > will > have wet-winobjects > installed on your machine. Using wet-winobjects, you will be able > to do > what you asked. For example, > in your case, you can do : > > dlg = $ie.Dialog("title:=Microsoft Internet Explorer") > lbl = dlg.win_label("index:=1") # Pl. Try index of 2, 3 - one of > them works > puts lbl.display_text > > will printout out > Do You really want to .... (The text that is displayed on the dialog) > > The dlg.win_label above retrieves a handle to the first 'Static' > element > in the dialog window. > The display_text method of the win_label class gets the actual text > being displayed by the > label. > > Hope this helps. > > The wet-winobjects is a ruby gem including rdocs. The rdocs describes > all the wet-winboject > class API. > > Cheers > Raghu > > > Amitha Shetty wrote: > > > Hi, > > I am using WET to handle alert windows.I am able to dismiss the > > alert window by clicking on the ' OK' button using > > def_ok() > > $ie.Button("value:=Submit").click_without_blocking() > > $ie.Dialog("title:=Microsoft Internet > Explorer").Button("text:=OK").click > > end > > But I want to retrieve the text in the alert window and verify > if the > > right alert message is displayed. > > For Eg:An alert window saying 'Do You really want to do > this".How do I > > get the text? How can I use Label(*args) method to do this? > > > > Thanks, > > Amitha > > > > > ------------------------------------------------------------------------ > > > Enjoy this Diwali with Y! India Click here > > > > > >------------------------------------------------------------------------ > > > > >_______________________________________________ > >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 > > > > > -- > "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" > > Jeff Wood > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > From bret at pettichord.com Sat Nov 19 17:00:09 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 19 Nov 2005 16:00:09 -0600 Subject: [Wtr-general] Javascript tree problems In-Reply-To: Message-ID: <5.1.0.14.2.20051119155817.03e546c8@pop.gmail.com> Using HEAD, this might do what you want. ie.span(:text, 'Billing').click ie.span(:text, 'Time Entry').click Bret At 02:17 PM 11/17/2005, Eugene Kula wrote: >I'm having difficulties getting to nodes in my javascript tree. One of the >problems is that I can't use the span text to select a node because there >may be nodes within the tree with the same text (most likely nested). And >the image icons (e.g. folder.gif) aren't unique either. So what I'd like to >do is be able to drilldown into the tree and click a span at a given level >(e.g. expand billing node to display expenses and time entry node and click >on time entry). L.gif is the plus sign. Following is what the (shortened) >HTML looks like: >
> > > unselectable="on">Home
>
>
>
> > > unselectable="on">Documents >
>
> _WTV_IMAGE="10"> > > unselectable="on">Billing >
> >
>
> align=absMiddle >_WTV_IMAGE="8"> > _WTV_ICON="8"> > unselectable="on">Expenses >
>
> align=absMiddle> > _WTV_ICON="9"> > unselectable="on">Time Entry >
>
> >
> _WTV_IMAGE="11"> > > unselectable="on">Groups >
>
> > >_______________________________________________ >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 Sat Nov 19 20:37:33 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Sat, 19 Nov 2005 17:37:33 -0800 Subject: [Wtr-general] How to retrieve the text in an Alert Window using WET? In-Reply-To: <437F55EE.7010304@qantom.com> References: <20051118130715.44833.qmail@web8512.mail.in.yahoo.com> <437DD989.3020809@qantom.com> <437F55EE.7010304@qantom.com> Message-ID: ... not to sound dense, but, what might the gem name be ??? j. On 11/19/05, Raghu Venkataramana wrote: > The latest version for download is a gem. > > Raghu > > Jeff Wood wrote: > > > When will we see a gem installable version of WET ? > > > > j. > > > > On 11/18/05, *Raghu Venkataramana* > > wrote: > > > > Hi Amitha, > > > > Assuming that you are using the latest version of WET (0.5.3), you > > will > > have wet-winobjects > > installed on your machine. Using wet-winobjects, you will be able > > to do > > what you asked. For example, > > in your case, you can do : > > > > dlg = $ie.Dialog("title:=Microsoft Internet Explorer") > > lbl = dlg.win_label("index:=1") # Pl. Try index of 2, 3 - one of > > them works > > puts lbl.display_text > > > > will printout out > > Do You really want to .... (The text that is displayed on the dialog) > > > > The dlg.win_label above retrieves a handle to the first 'Static' > > element > > in the dialog window. > > The display_text method of the win_label class gets the actual text > > being displayed by the > > label. > > > > Hope this helps. > > > > The wet-winobjects is a ruby gem including rdocs. The rdocs describes > > all the wet-winboject > > class API. > > > > Cheers > > Raghu > > > > > > Amitha Shetty wrote: > > > > > Hi, > > > I am using WET to handle alert windows.I am able to dismiss the > > > alert window by clicking on the ' OK' button using > > > def_ok() > > > $ie.Button("value:=Submit").click_without_blocking() > > > $ie.Dialog("title:=Microsoft Internet > > Explorer").Button("text:=OK").click > > > end > > > But I want to retrieve the text in the alert window and verify > > if the > > > right alert message is displayed. > > > For Eg:An alert window saying 'Do You really want to do > > this".How do I > > > get the text? How can I use Label(*args) method to do this? > > > > > > Thanks, > > > Amitha > > > > > > > > ------------------------------------------------------------------------ > > > > > Enjoy this Diwali with Y! India Click here > > > > > > > > >------------------------------------------------------------------------ > > > > > > > >_______________________________________________ > > >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 > > > > > > > > > > -- > > "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" > > > > 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 > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood From raghu at qantom.com Sat Nov 19 22:10:45 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Sun, 20 Nov 2005 08:40:45 +0530 Subject: [Wtr-general] How to retrieve the text in an Alert Window using WET? In-Reply-To: References: <20051118130715.44833.qmail@web8512.mail.in.yahoo.com> <437DD989.3020809@qantom.com> <437F55EE.7010304@qantom.com> Message-ID: <437FE935.8080301@qantom.com> It is wet-web Raghu Jeff Wood wrote: >... not to sound dense, but, what might the gem name be ??? > >j. > >On 11/19/05, Raghu Venkataramana wrote: > > >>The latest version for download is a gem. >> >>Raghu >> >>Jeff Wood wrote: >> >> >> >>>When will we see a gem installable version of WET ? >>> >>>j. >>> >>>On 11/18/05, *Raghu Venkataramana* >>> wrote: >>> >>> Hi Amitha, >>> >>> Assuming that you are using the latest version of WET (0.5.3), you >>> will >>> have wet-winobjects >>> installed on your machine. Using wet-winobjects, you will be able >>> to do >>> what you asked. For example, >>> in your case, you can do : >>> >>> dlg = $ie.Dialog("title:=Microsoft Internet Explorer") >>> lbl = dlg.win_label("index:=1") # Pl. Try index of 2, 3 - one of >>> them works >>> puts lbl.display_text >>> >>> will printout out >>> Do You really want to .... (The text that is displayed on the dialog) >>> >>> The dlg.win_label above retrieves a handle to the first 'Static' >>> element >>> in the dialog window. >>> The display_text method of the win_label class gets the actual text >>> being displayed by the >>> label. >>> >>> Hope this helps. >>> >>> The wet-winobjects is a ruby gem including rdocs. The rdocs describes >>> all the wet-winboject >>> class API. >>> >>> Cheers >>> Raghu >>> >>> >>> Amitha Shetty wrote: >>> >>> > Hi, >>> > I am using WET to handle alert windows.I am able to dismiss the >>> > alert window by clicking on the ' OK' button using >>> > def_ok() >>> > $ie.Button("value:=Submit").click_without_blocking() >>> > $ie.Dialog("title:=Microsoft Internet >>> Explorer").Button("text:=OK").click >>> > end >>> > But I want to retrieve the text in the alert window and verify >>> if the >>> > right alert message is displayed. >>> > For Eg:An alert window saying 'Do You really want to do >>> this".How do I >>> > get the text? How can I use Label(*args) method to do this? >>> > >>> > Thanks, >>> > Amitha >>> > >>> > >>> ------------------------------------------------------------------------ >>> >>> > Enjoy this Diwali with Y! India Click here >>> > >>> > >>> >------------------------------------------------------------------------ >>> >>> > >>> >_______________________________________________ >>> >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 >>> >>> >>> >>> >>>-- >>>"Remember. Understand. Believe. Yield! -> http://ruby-lang.org" >>> >>>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 >> >> >> > > >-- >"Remember. Understand. Believe. Yield! -> http://ruby-lang.org" > >Jeff Wood > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > From bret at pettichord.com Sun Nov 20 03:48:17 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sun, 20 Nov 2005 02:48:17 -0600 Subject: [Wtr-general] Clicking a link in a sidebar menu which is in a table within a frame In-Reply-To: <20051118195802.95676.qmail@web52902.mail.yahoo.com> Message-ID: <5.1.0.14.2.20051120024627.03dc3cc8@pop.gmail.com> ie.table(:index, ?).cell(:id, 'servtypes').click At 01:58 PM 11/18/2005, Roy Sin wrote: >Hi WtrList >I have four links in a side bar menu within a table as >shown below. How do I click on the "Service Types" which is >the third link? thanks. > > > > > > > > > >
onMouseOver="movein('servstatus', 'admin_nav')" >onMouseOut="moveout('servstatus', 'admin_text')" >id="servstatus">Service Status
onMouseOver="movein('maintsched', 'admin_nav')" >onMouseOut="moveout('maintsched', 'admin_text')" >id="maintsched">Maintenance
Schedules
onMouseOver="movein('servtypes', 'admin_nav')" >onMouseOut="moveout('servtypes', 'admin_text')" >id="servtypes">Service Types
onMouseOver="movein('servlog', 'admin_nav')" >onMouseOut="moveout('servlog', 'admin_text')" >id="servlog">Service Log
> > > > > > >__________________________________ >Yahoo! Mail - PC Magazine Editors' Choice 2005 >http://mail.yahoo.com >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sun Nov 20 18:45:13 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sun, 20 Nov 2005 17:45:13 -0600 Subject: [Wtr-general] support request Message-ID: <5.1.0.14.2.20051120174407.03cba9a8@pop.gmail.com> Here is a support request form a month ago: Richard Green, beforeText and afterText http://rubyforge.org/tracker/?atid=488&group_id=104&func=browse Is this still outstanding? Bret _____________________ Bret Pettichord www.pettichord.com From amithashettyb at yahoo.co.in Mon Nov 21 01:35:35 2005 From: amithashettyb at yahoo.co.in (Amitha Shetty) Date: Mon, 21 Nov 2005 06:35:35 +0000 (GMT) Subject: [Wtr-general] How to retrieve the text in an Alert Window using WET? In-Reply-To: <437DD989.3020809@qantom.com> Message-ID: <20051121063536.63643.qmail@web8501.mail.in.yahoo.com> Hi Raghu, Thanks for the help. But Watir hangs when I use win_label and display_text methods. I am using 0.5.3(latest) version of WET and that has winobjects. The following is my code: require 'WET' include WET ie = nil ie = Browser("url:=LOGIN_URL") sleep 2 ie.Button("value:=Submit").click #Gives Alert window... dilg = ie.Dialog("title:=Microsoft Internet Explorer") lbl = dilg.win_label("index:=1") puts lbl.display_text It clicks on the button and alert window appears. But it hangs after that. I tried include Wet::Winobjects. I tried with indexes 1,2,3,4.But even that didn't help Please help. Thanks, Amitha Raghu Venkataramana wrote: Hi Amitha, Assuming that you are using the latest version of WET (0.5.3), you will have wet-winobjects installed on your machine. Using wet-winobjects, you will be able to do what you asked. For example, in your case, you can do : dlg = $ie.Dialog("title:=Microsoft Internet Explorer") lbl = dlg.win_label("index:=1") # Pl. Try index of 2, 3 - one of them works puts lbl.display_text will printout out Do You really want to .... (The text that is displayed on the dialog) The dlg.win_label above retrieves a handle to the first 'Static' element in the dialog window. The display_text method of the win_label class gets the actual text being displayed by the label. Hope this helps. The wet-winobjects is a ruby gem including rdocs. The rdocs describes all the wet-winboject class API. Cheers Raghu Amitha Shetty wrote: > Hi, > I am using WET to handle alert windows.I am able to dismiss the > alert window by clicking on the ' OK' button using > def_ok() > $ie.Button("value:=Submit").click_without_blocking() > $ie.Dialog("title:=Microsoft Internet Explorer").Button("text:=OK").click > end > But I want to retrieve the text in the alert window and verify if the > right alert message is displayed. > For Eg:An alert window saying 'Do You really want to do this".How do I > get the text? How can I use Label(*args) method to do this? > > Thanks, > Amitha > > ------------------------------------------------------------------------ > Enjoy this Diwali with Y! India Click here > > >------------------------------------------------------------------------ > >_______________________________________________ >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 --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051121/e3f6fafb/attachment.html From raghu at qantom.com Mon Nov 21 02:10:32 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Mon, 21 Nov 2005 12:40:32 +0530 Subject: [Wtr-general] How to retrieve the text in an Alert Window using WET? In-Reply-To: <20051121063536.63643.qmail@web8501.mail.in.yahoo.com> References: <20051121063536.63643.qmail@web8501.mail.in.yahoo.com> Message-ID: <438172E8.9000200@qantom.com> Hi Amitha, This time you seemed to have used ie.Button("value:=Submit").click instead of ie.Button("value:=Submit").click_without_blocking() Thanks Raghu Amitha Shetty wrote: > Hi Raghu, > Thanks for the help. > But Watir hangs when I use win_label and display_text methods. > I am using 0.5.3(latest) version of WET and that has winobjects. > > The following is my code: > > require 'WET' > include WET > > ie = nil > ie = Browser("url:=LOGIN_URL <=LOGIN_URL>") > sleep 2 > ie.Button("value:=Submit").click #Gives Alert window... > dilg = ie.Dialog("title:=Microsoft Internet Explorer") > lbl = dilg.win_label("index:=1") > puts lbl.display_text > It clicks on the button and alert window appears. But it hangs after that. > I tried include Wet::Winobjects. > I tried with indexes 1,2,3,4.But even that didn't help > > > Please help. > > Thanks, > Amitha > */Raghu Venkataramana /* wrote: > > Hi Amitha, > > Assuming that you are using the latest version of WET (0.5.3), you > will > have wet-winobjects > installed on your machine. Using wet-winobjects, you will be able > to do > what you asked. For example, > in your case, you can do : > > dlg = $ie.Dialog("title:=Microsoft Internet Explorer") > lbl = dlg.win_label("index:=1") # Pl. Try index of 2, 3 - one of > them works > puts lbl.display_text > > will printout out > Do You really want to .... (The text that is displayed on the dialog) > > The dlg.win_label above retrieves a handle to the first 'Static' > element > in the dialog window. > The display_text method of the win_label class gets the actual text > being displayed by the > label. > > Hope this helps. > > The wet-winobjects is a ruby gem including rdocs. The rdocs describes > all t! he wet-winboject > class API. > > Cheers > Raghu > > > Amitha Shetty wrote: > > > Hi, > > I am using WET to handle alert windows.I am able to dismiss the > > alert window by clicking on the ' OK' button using > > def_ok() > > $ie.Button("value:=Submit").click_without_blocking() > > $ie.Dialog("title:=Microsoft Internet > Explorer").Button("text:=OK").click > > end > > But I want to retrieve the text in the alert window and verify > if the > > right alert message is displayed. > > For Eg:An alert window saying 'Do You really want to do > this".How do I > > get the text? How can I use Label(*args) method to do this? > > > > Thanks, > > Amitha > > > > > ------------------------------------------------------------------------ > > Enjoy this Diwali with Y! India Click here > > > > > >------------------------------------------------------------------------ > > > >_______________________________________________ > >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 > > > ------------------------------------------------------------------------ > Enjoy this Diwali with Y! India Click here > > >------------------------------------------------------------------------ > >_______________________________________________ >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 amithashettyb at yahoo.co.in Mon Nov 21 02:24:05 2005 From: amithashettyb at yahoo.co.in (Amitha Shetty) Date: Mon, 21 Nov 2005 07:24:05 +0000 (GMT) Subject: [Wtr-general] How to retrieve the text in an Alert Window using WET? In-Reply-To: <438172E8.9000200@qantom.com> Message-ID: <20051121072405.46286.qmail@web8503.mail.in.yahoo.com> Hi, I tried with click_without_blocking(). It is throwing the following exception: undefined method `win_label' for # (NoMethodError) I tried with different index..(1 to 6).But it threw the same exception. Thanks, Amitha Raghu Venkataramana wrote: Hi Amitha, This time you seemed to have used ie.Button("value:=Submit").click instead of ie.Button("value:=Submit").click_without_blocking() Thanks Raghu Amitha Shetty wrote: > Hi Raghu, > Thanks for the help. > But Watir hangs when I use win_label and display_text methods. > I am using 0.5.3(latest) version of WET and that has winobjects. > > The following is my code: > > require 'WET' > include WET > > ie = nil > ie = Browser("url:=LOGIN_URL <=LOGIN_URL>") > sleep 2 > ie.Button("value:=Submit").click #Gives Alert window... > dilg = ie.Dialog("title:=Microsoft Internet Explorer") > lbl = dilg.win_label("index:=1") > puts lbl.display_text > It clicks on the button and alert window appears. But it hangs after that. > I tried include Wet::Winobjects. > I tried with indexes 1,2,3,4.But even that didn't help > > > Please help. > > Thanks, > Amitha > */Raghu Venkataramana /* wrote: > > Hi Amitha, > > Assuming that you are using the latest version of WET (0.5.3), you > will > have wet-winobjects > installed on your machine. Using wet-winobjects, you will be able > to do > what you asked. For example, > in your case, you can do : > > dlg = $ie.Dialog("title:=Microsoft Internet Explorer") > lbl = dlg.win_label("index:=1") # Pl. Try index of 2, 3 - one of > them works > puts lbl.display_text > > will printout out > Do You really want to .... (The text that is displayed on the dialog) > > The dlg.win_label above retrieves a handle to the first 'Static' > element > in the dialog window. > The display_text method of the win_label class gets the actual text > being displayed by the > label. > > Hope this helps. > > The wet-winobjects is a ruby gem including rdocs. The rdocs describes > all t! he wet-winboject > class API. > > Cheers > Raghu > > > Amitha Shetty wrote: > > > Hi, > > I am using WET to handle alert windows.I am able to dismiss the > > alert window by clicking on the ' OK' button using > > def_ok() > > $ie.Button("value:=Submit").click_without_blocking() > > $ie.Dialog("title:=Microsoft Internet > Explorer").Button("text:=OK").click > > end > > But I want to retrieve the text in the alert window and verify > if the > > right alert message is displayed. > > For Eg:An alert window saying 'Do You really want to do > this".How do I > > get the text? How can I use Label(*args) method to do this? > > > > Thanks, > > Amitha > > > > > ------------------------------------------------------------------------ > > Enjoy this Diwali with Y! India Click here > > > > > >------------------------------------------------------------------------ > > > >_______________________________________________ > >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 > > > ------------------------------------------------------------------------ > Enjoy this Diwali with Y! India Click here > > >------------------------------------------------------------------------ > >_______________________________________________ >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 --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051121/a0955eca/attachment.html From raghu at qantom.com Mon Nov 21 03:00:44 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Mon, 21 Nov 2005 13:30:44 +0530 Subject: [Wtr-general] How to retrieve the text in an Alert Window using WET? In-Reply-To: <20051121072405.46286.qmail@web8503.mail.in.yahoo.com> References: <20051121072405.46286.qmail@web8503.mail.in.yahoo.com> Message-ID: <43817EAC.8030904@qantom.com> OK. Now I see!!. I basically misguided you. win_label() is a method in the underlying win-objects library which can be used to control win32 UI (call it ruby based AutoIT but with limited options as of now.). This method has been wrapped in the ModalDialog class as Label(). So the correct syntax would be. dilg.Label("index:=1") Sorry for the confusion. Let me know if this works for you. Thanks Raghu Amitha Shetty wrote: > Hi, > I tried with click_without_blocking(). > It is throwing the following exception: > undefined method `win_label' for # > (NoMethodError) > I tried with different index..(1 to 6).But it threw the same exception. > > Thanks, > Amitha > > */Raghu Venkataramana /* wrote: > > Hi Amitha, > > This time you seemed to have used > ie.Button("value:=Submit").click > instead of > ie.Button("value:=Submit").click_without_blocking() > > Thanks > Raghu > > > Amitha Shetty wrote: > > > Hi Raghu, > > Thanks for the help. > > But Watir hangs when I use win_label and display_text methods. > > I am using 0.5.3(latest) version of WET and that has winobjects. > > > > The following is my code: > > > > require 'WET' > > include WET > > > > ie = nil > > ie = Browser("url:=LOGIN_URL <=LOGIN_URL>") > > sleep 2 > > ie.Button("value:=Submit").click #Gives Alert window... > > dilg = ie.Dialog("title:=Microsoft Internet Explorer") > > lbl = dilg.win_label("index:=1") > > puts lbl.display_text > > It clicks on the button and alert window appears. But it hangs > after that. > > I tried include Wet::Winobjects. > > I tried with indexes 1,2,3,4.But even that didn't help > > > > > > Please help. > > > > Thanks, > > Amitha > > */Raghu Venkataramana /* wrote: > > > > Hi Amitha, > > > > Assuming that you are using the latest version of WET (0.5.3), you > > will > > have wet-winobjects > > installed on your machine. Using wet-winobjects, you will be able > > to do > > what you asked. For example, > > in your case, you can do : > > > > dlg = $ie.Dialog("title:=Microsoft Internet Explorer") > > lbl = dlg.win_label("index:=1") # Pl. Try index of 2, 3 - one of > > them works > > puts lbl.display_text > > > > will printout out > > Do You really want to .... (The text that is displayed on the > dialog) > > > > The dlg.win_label above retrieves a handle to the first 'Static' > > element > > in the dialog window. > > The display_text method of the win_label class gets the actual text > > being displayed by the > > label. > > > > Hope this helps. > > > > The wet-winobjects is a ruby gem including rdocs. The rdocs > describes > > all t! he wet-winboject > > class API. > > > > Cheers > > Raghu > > > > > > Amitha Shetty wrote: > > > > > Hi, > > > I am using WET to handle alert windows.I am able to dismiss the > > > alert window by clicking on the ' OK' button using > > > def_ok() > > > $ie.Button("value:=Submit").click_without_blocking() > > > $ie.Dialog("title:=Microsoft Internet > > Explorer").Button("text:=OK").click > > > end > > > But I want to retrieve the text in the alert window and verify > > if the > > > right alert message is displayed. > > > For Eg:An alert window saying 'Do You really want to do > > this".How do I > > > get the text? How can I use Label(*args) method to do this? > > > > > > Thanks, > > > Amitha > > > > > > > > > ------------------------------------------------------------------------ > > > Enjoy this Diwali with Y! India Click here > > > > > > > > > >------------------------------------------------------------------------ > > > > > >_______________________________________________ > > >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 > > > > > > > ------------------------------------------------------------------------ > > Enjoy this Diwali with Y! India Click here > > > > > >------------------------------------------------------------------------ > > > >_______________________________________________ > >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 > > > ------------------------------------------------------------------------ > Enjoy this Diwali with Y! India Click here > > >------------------------------------------------------------------------ > >_______________________________________________ >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 amithashettyb at yahoo.co.in Mon Nov 21 03:16:38 2005 From: amithashettyb at yahoo.co.in (Amitha Shetty) Date: Mon, 21 Nov 2005 08:16:38 +0000 (GMT) Subject: [Wtr-general] How to retrieve the text in an Alert Window using WET? In-Reply-To: <43817EAC.8030904@qantom.com> Message-ID: <20051121081638.2777.qmail@web8501.mail.in.yahoo.com> Hi Raghu, Thanks a lot." dilg.Label("index:=1")" works fine. I have one more query... Can we use exists?function for popup i.e Is there a method to confirm if popup has appeared.. Thanks, Amitha Raghu Venkataramana wrote: OK. Now I see!!. I basically misguided you. win_label() is a method in the underlying win-objects library which can be used to control win32 UI (call it ruby based AutoIT but with limited options as of now.). This method has been wrapped in the ModalDialog class as Label(). So the correct syntax would be. dilg.Label("index:=1") Sorry for the confusion. Let me know if this works for you. Thanks Raghu Amitha Shetty wrote: > Hi, > I tried with click_without_blocking(). > It is throwing the following exception: > undefined method `win_label' for # > (NoMethodError) > I tried with different index..(1 to 6).But it threw the same exception. > > Thanks, > Amitha > > */Raghu Venkataramana /* wrote: > > Hi Amitha, > > This time you seemed to have used > ie.Button("value:=Submit").click > instead of > ie.Button("value:=Submit").click_without_blocking() > > Thanks > Raghu > > > Amitha Shetty wrote: > > > Hi Raghu, > > Thanks for the help. > > But Watir hangs when I use win_label and display_text methods. > > I am using 0.5.3(latest) version of WET and that has winobjects. > > > > The following is my code: > > > > require 'WET' > > include WET > > > > ie = nil > > ie = Browser("url:=LOGIN_URL <=LOGIN_URL>") > > sleep 2 > > ie.Button("value:=Submit").click #Gives Alert window... > > dilg = ie.Dialog("title:=Microsoft Internet Explorer") > > lbl = dilg.win_label("index:=1") > > puts lbl.display_text > > It clicks on the button and alert window appears. But it hangs > after that. > > I tried include Wet::Winobjects. > > I tried with indexes 1,2,3,4.But even that didn't help > > > > > > Please help. > > > > Thanks, > > Amitha > > */Raghu Venkataramana /* wrote: > > > > Hi Amitha, > > > > Assuming that you are using the latest version of WET (0.5.3), you > > will > > have wet-winobjects > > installed on your machine. Using wet-winobjects, you will be able > > to do > > what you asked. For example, > > in your case, you can do : > > > > dlg = $ie.Dialog("title:=Microsoft Internet Explorer") > > lbl = dlg.win_label("index:=1") # Pl. Try index of 2, 3 - one of > > them works > > puts lbl.display_text > > > > will printout out > > Do You really want to .... (The text that is displayed on the > dialog) > > > > The dlg.win_label above retrieves a handle to the first 'Static' > > element > > in the dialog window. > > The display_text method of the win_label class gets the actual text > > being displayed by the > > label. > > > > Hope this helps. > > > > The wet-winobjects is a ruby gem including rdocs. The rdocs > describes > > all t! he wet-winboject > > class API. > > > > Cheers > > Raghu > > > > > > Amitha Shetty wrote: > > > > > Hi, > > > I am using WET to handle alert windows.I am able to dismiss the > > > alert window by clicking on the ' OK' button using > > > def_ok() > > > $ie.Button("value:=Submit").click_without_blocking() > > > $ie.Dialog("title:=Microsoft Internet > > Explorer").Button("text:=OK").click > > > end > > > But I want to retrieve the text in the alert window and verify > > if the > > > right alert message is displayed. > > > For Eg:An alert window saying 'Do You really want to do > > this".How do I > > > get the text? How can I use Label(*args) method to do this? > > > > > > Thanks, > > > Amitha > > > > > > > > > ------------------------------------------------------------------------ > > > Enjoy this Diwali with Y! India Click here > > > > > > > > > >------------------------------------------------------------------------ > > > > > >_______________________________________________ > > >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 > > > > > > > ------------------------------------------------------------------------ > > Enjoy this Diwali with Y! India Click here > > > > > >------------------------------------------------------------------------ > > > >_______________________________________________ > >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 > > > ------------------------------------------------------------------------ > Enjoy this Diwali with Y! India Click here > > >------------------------------------------------------------------------ > >_______________________________________________ >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 --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051121/ce3bc0a9/attachment.html From jim_che_tih at yahoo.com Mon Nov 21 04:19:00 2005 From: jim_che_tih at yahoo.com (jim che) Date: Mon, 21 Nov 2005 01:19:00 -0800 (PST) Subject: [Wtr-general] How to get some certain informations of page Message-ID: <20051121091901.91122.qmail@web33309.mail.mud.yahoo.com> Hi all I want to get some ceratin informations of page.For example ,in the page there are some data like "XXX,XXXX,XXXX,XXXX,".I want to get such format data and store to a var, how should I do it? Thank you for any help jim --------------------------------- Yahoo! FareChase - Search multiple travel sites in one click. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051121/1ddbaaae/attachment.html From zeljko.filipin at gmail.com Mon Nov 21 04:53:46 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Mon, 21 Nov 2005 10:53:46 +0100 Subject: [Wtr-general] How to get some certain informations of page In-Reply-To: <20051121091901.91122.qmail@web33309.mail.mud.yahoo.com> Message-ID: <001d01c5ee81$7815be90$c6e7fea9@officezg.wa> You need regular expressions (http://www.regular-expressions.info/ruby.html). If "X" means letter this will do it: irb(main):003:0> ie.text =~ /(\w){3},(\w){4},(\w){4},(\d|\w){4},/ => 507 irb(main):004:0> my_var = Regexp.last_match(0) => "XXX,XXXX,XXXX,XXXX," Now you have "XXX,XXXX,XXXX,XXXX," in variable my_var. "\w" will match any letter, "(\w){3}" will match three letters if "X" is: - number: replace \w with \d - number or letter: replace \w with \d|\w - anything: replace \w with . (dot) Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of jim che Sent: Monday, November 21, 2005 10:19 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] How to get some certain informations of page Hi all I want to get some ceratin informations of page.For example ,in the page there are some data like "XXX,XXXX,XXXX,XXXX,".I want to get such format data and store to a var, how should I do it? Thank you for any help jim _____ Yahoo! FareChase - Search multiple travel sites in one click. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051121/3d7770fb/attachment.html From roy_sin at yahoo.com Mon Nov 21 13:11:24 2005 From: roy_sin at yahoo.com (Roy Sin) Date: Mon, 21 Nov 2005 10:11:24 -0800 (PST) Subject: [Wtr-general] Clicking a link in a sidebar menu which is in a table within a frame In-Reply-To: <5.1.0.14.2.20051120024627.03dc3cc8@pop.gmail.com> Message-ID: <20051121181124.10924.qmail@web52906.mail.yahoo.com> Hi Bret, I tried your suggestion and I'm getting a NoMethodError:undefined method 'cell' for # I tried index 1 to 10 for the table, but i get the same method error. I noticed that the main table for the side bar has no index, is there another attribute that I can use to identify that table ? thanks --- Bret Pettichord wrote: > ie.table(:index, ?).cell(:id, 'servtypes').click > > At 01:58 PM 11/18/2005, Roy Sin wrote: > >Hi WtrList > >I have four links in a side bar menu within a table as > >shown below. How do I click on the "Service Types" which > is > >the third link? thanks. > > > > > > > > cellspacing=2> > > > > > > > > > > > >
>onMouseOver="movein('servstatus', 'admin_nav')" > >onMouseOut="moveout('servstatus', 'admin_text')" > >id="servstatus">Service Status
>onMouseOver="movein('maintsched', 'admin_nav')" > >onMouseOut="moveout('maintsched', 'admin_text')" > >id="maintsched">Maintenance
Schedules
>onMouseOver="movein('servtypes', 'admin_nav')" > >onMouseOut="moveout('servtypes', 'admin_text')" > >id="servtypes">Service Types
>onMouseOver="movein('servlog', 'admin_nav')" > >onMouseOut="moveout('servlog', 'admin_text')" > >id="servlog">Service Log
> > > > > > > > > > > > > >__________________________________ > >Yahoo! Mail - PC Magazine Editors' Choice 2005 > >http://mail.yahoo.com > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com From raghu at qantom.com Mon Nov 21 22:37:14 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Tue, 22 Nov 2005 09:07:14 +0530 Subject: [Wtr-general] How to retrieve the text in an Alert Window using WET? In-Reply-To: <20051121081638.2777.qmail@web8501.mail.in.yahoo.com> References: <20051121081638.2777.qmail@web8501.mail.in.yahoo.com> Message-ID: <4382926A.2080500@qantom.com> Hi Amitha, There is no method to directly do that. However you can put the dilg = ie.Dialog("title:=Microsoft Internet Explorer") statement inside a Begin-Rescue block and catch timeout exception. In the current implementation, the code tries for 10 seconds to find the popup and gives up after that ( by raising a Timeout error). Thanks Raghu Amitha Shetty wrote: > Hi Raghu, > Thanks a lot." dilg.Label("index:=1")" works fine. > I have one more query... > Can we use exists?function for popup i.e Is there a method to > confirm if popup has appeared.. > > Thanks, > Amitha > > */Raghu Venkataramana /* wrote: > > OK. Now I see!!. I basically misguided you. > > win_label() is a method in the underlying win-objects library which > can be used to control win32 UI (call it ruby based AutoIT but with > limited options as of now.). This method has been wrapped in the > ModalDialog class as Label(). So the correct syntax would be. > > dilg.Label("index:=1") > > Sorry for the confusion. Let me know if this works for you. > > Thanks > Raghu > > Amitha Shetty wrote: > > > Hi, > > I tried wi! th click_without_blocking(). > > It is throwing the following exception: > > undefined method `win_label' for # > > (NoMethodError) > > I tried with different index..(1 to 6).But it threw the same > exception. > > > > Thanks, > > Amitha > > > > */Raghu Venkataramana /* wrote: > > > > Hi Amitha, > > > > This time you seemed to have used > > ie.Button("value:=Submit").click > > instead of > > ie.Button("value:=Submit").click_without_blocking() > > > > Thanks > > Raghu > > > > > > Amitha Shetty wrote: > > > > > Hi Raghu, > > > Thanks for the help. > > > But Watir hangs when I use win_label and display_text methods. > > > I am using 0.5.3(latest) version of WET and that has winobjects. > > > > > > The following is my code: > > > > > > require 'WET' > > > include WET > > > > &! gt; > ie = nil > > > ie = Browser("url:=LOGIN_URL <=LOGIN_URL>") > > > sleep 2 > > > ie.Button("value:=Submit").click #Gives Alert window... > > > dilg = ie.Dialog("title:=Microsoft Internet Explorer") > > > lbl = dilg.win_label("index:=1") > > > puts lbl.display_text > > > It clicks on the button and alert window appears. But it hangs > > after that. > > > I tried include Wet::Winobjects. > > > I tried with indexes 1,2,3,4.But even that didn't help > > > > > > > > > Please help. > > > > > > Thanks, > > > Amitha > > > */Raghu Venkataramana /* wrote: > > > > > > Hi Amitha, > > > > > > Assuming that you are using the latest version of WET (0.5.3), you > > > will > > > have wet-winobjects > > > installed on your machine. Using wet-winobjects, you will be able > > > to do > > > what you asked. For example, > > > in your case, you can do : > > > > > > dlg = $ie.Dialog("title:=Microsoft Internet Explorer") > > > lbl = dlg.win_label("index:=1") # Pl. Try index of 2, 3 - one of > > > them works > > > puts lbl.display_text > > > > > > will printout out > > > Do You really want to .... (The text that is displayed on the > > dialog) > > > > > > The dlg.win_label above retrieves a handle to the first 'Static' > > > element > > > in the dialog window. > > > The display_text method of the win_label class gets the actual > text > > > being displayed by the > > > label. > > > > > > Hope this helps. > > > > > > The wet-winobjects is a ruby gem including rdocs. The rdocs > > describes > > > all t! he wet-winboject > > > class API. > > > > > > Cheers > > > Raghu > > > > > > > > > Ami! tha Shetty wrote: > > > > > > > Hi, > > > > I am using WET to handle alert windows.I am able to dismiss the > > > > alert window by clicking on the ' OK' button using > > > > def_ok() > > > > $ie.Button("value:=Submit").click_without_blocking() > > > > $ie.Dialog("title:=Microsoft Internet > > > Explorer").Button("text:=OK").click > > > > end > > > > But I want to retrieve the text in the alert window and verify > > > if the > > > > right alert message is displayed. > > > > For Eg:An alert window saying 'Do You really want to do > > > this".How do I > > > > get the text? How can I use Label(*args) method to do this? > > > > > > > > Thanks, > > > > Amitha > > > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > Enjoy this Di! wali with Y! India Click here > > > > > > > > > > > > > > >------------------------------------------------------------------------ > > > > > > > >_______________________________________________ > > > >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 > > > > > > > > > > > > ------------------------------------------------------------------------ > > > Enj! oy this Diwali with Y! India Click here > > > > > > > > > >------------------------------------------------------------------------ > > > > > >_______________________________________________ > > >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 > > > > > > > ------------------------------------------------------------------------ > > Enjoy this Diwali with Y! India Click here > > > > > >------------------------------------------------------------------------ > > > >_______________________________________________ > >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 > > > ------------------------------------------------------------------------ > Enjoy this Diwali with Y! India Click here > > >------------------------------------------------------------------------ > >_______________________________________________ >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 amithashettyb at yahoo.co.in Tue Nov 22 00:21:08 2005 From: amithashettyb at yahoo.co.in (Amitha Shetty) Date: Tue, 22 Nov 2005 05:21:08 +0000 (GMT) Subject: [Wtr-general] How to retrieve the text in an Alert Window using WET? In-Reply-To: <4382926A.2080500@qantom.com> Message-ID: <20051122052108.66989.qmail@web8512.mail.in.yahoo.com> Hi, I tried Begin-Rescue but Rescue block is not catching Timeout exception. Its coming out of the test throwing that exception. My code: $ie.Button("value:=Submit").click_without_blocking() begin alert_win = $ie.Dialog("title:=Microsoft Internet Explorer") alert_label = alert_win.Label("index:=2") alert_text = alert_label.display_text alert_win.Button("text:=OK").click rescue puts"No alert window found" ensure puts"ok" end Its printing whatever is in ensure block.But its not entering rescue block.. Also I tried to reduce timeout to 5 seconds using $ie.timeout = 5 But it throws the following exception: undefined method `timeout=' for # (NoMethodError) Thanks Amitha Raghu Venkataramana wrote: Hi Amitha, There is no method to directly do that. However you can put the dilg = ie.Dialog("title:=Microsoft Internet Explorer") statement inside a Begin-Rescue block and catch timeout exception. In the current implementation, the code tries for 10 seconds to find the popup and gives up after that ( by raising a Timeout error). Thanks Raghu Amitha Shetty wrote: > Hi Raghu, > Thanks a lot." dilg.Label("index:=1")" works fine. > I have one more query... > Can we use exists?function for popup i.e Is there a method to > confirm if popup has appeared.. > > Thanks, > Amitha > > */Raghu Venkataramana /* wrote: > > OK. Now I see!!. I basically misguided you. > > win_label() is a method in the underlying win-objects library which > can be used to control win32 UI (call it ruby based AutoIT but with > limited options as of now.). This method has been wrapped in the > ModalDialog class as Label(). So the correct syntax would be. > > dilg.Label("index:=1") > > Sorry for the confusion. Let me know if this works for you. > > Thanks > Raghu > > Amitha Shetty wrote: > > > Hi, > > I tried wi! th click_without_blocking(). > > It is throwing the following exception: > > undefined method `win_label' for # > > (NoMethodError) > > I tried with different index..(1 to 6).But it threw the same > exception. > > > > Thanks, > > Amitha > > > > */Raghu Venkataramana /* wrote: > > > > Hi Amitha, > > > > This time you seemed to have used > > ie.Button("value:=Submit").click > > instead of > > ie.Button("value:=Submit").click_without_blocking() > > > > Thanks > > Raghu > > > > > > Amitha Shetty wrote: > > > > > Hi Raghu, > > > Thanks for the help. > > > But Watir hangs when I use win_label and display_text methods. > > > I am using 0.5.3(latest) version of WET and that has winobjects. > > > > > > The following is my code: > > > > > > require 'WET' > > > include WET > > > > &! gt; > ie = nil > > > ie = Browser("url:=LOGIN_URL <=LOGIN_URL>") > > > sleep 2 > > > ie.Button("value:=Submit").click #Gives Alert window... > > > dilg = ie.Dialog("title:=Microsoft Internet Explorer") > > > lbl = dilg.win_label("index:=1") > > > puts lbl.display_text > > > It clicks on the button and alert window appears. But it hangs > > after that. > > > I tried include Wet::Winobjects. > > > I tried with indexes 1,2,3,4.But even that didn't help > > > > > > > > > Please help. > > > > > > Thanks, > > > Amitha > > > */Raghu Venkataramana /* wrote: > > > > > > Hi Amitha, > > > > > > Assuming that you are using the latest version of WET (0.5.3), you > > > will > > > have wet-winobjects > > > installed on your machine. Using wet-winobjects, you will be able > > > to do > > > what you asked. For example, > > > in your case, you can do : > > > > > > dlg = $ie.Dialog("title:=Microsoft Internet Explorer") > > > lbl = dlg.win_label("index:=1") # Pl. Try index of 2, 3 - one of > > > them works > > > puts lbl.display_text > > > > > > will printout out > > > Do You really want to .... (The text that is displayed on the > > dialog) > > > > > > The dlg.win_label above retrieves a handle to the first 'Static' > > > element > > > in the dialog window. > > > The display_text method of the win_label class gets the actual > text > > > being displayed by the > > > label. > > > > > > Hope this helps. > > > > > > The wet-winobjects is a ruby gem including rdocs. The rdocs > > describes > > > all t! he wet-winboject > > > class API. > > > > > > Cheers > > > Raghu > > > > > > > > > Ami! tha Shetty wrote: > > > > > > > Hi, > > > > I am using WET to handle alert windows.I am able to dismiss the > > > > alert window by clicking on the ' OK' button using > > > > def_ok() > > > > $ie.Button("value:=Submit").click_without_blocking() > > > > $ie.Dialog("title:=Microsoft Internet > > > Explorer").Button("text:=OK").click > > > > end > > > > But I want to retrieve the text in the alert window and verify > > > if the > > > > right alert message is displayed. > > > > For Eg:An alert window saying 'Do You really want to do > > > this".How do I > > > > get the text? How can I use Label(*args) method to do this? > > > > > > > > Thanks, > > > > Amitha > > > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > Enjoy this Di! wali with Y! India Click here > > > > > > > > > > > > > > >------------------------------------------------------------------------ > > > > > > > >_______________________________________________ > > > >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 > > > > > > > > > > > > ------------------------------------------------------------------------ > > > Enj! oy this Diwali with Y! India Click here > > > > > > > > > >------------------------------------------------------------------------ > > > > > >_______________________________________________ > > >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 > > > > > > > ------------------------------------------------------------------------ > > Enjoy this Diwali with Y! India Click here > > > > > >------------------------------------------------------------------------ > > > >_______________________________________________ > >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 > > > ------------------------------------------------------------------------ > Enjoy this Diwali with Y! India Click here > > >------------------------------------------------------------------------ > >_______________________________________________ >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 --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051122/3866a4d7/attachment.html From raghu at qantom.com Tue Nov 22 00:48:05 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Tue, 22 Nov 2005 11:18:05 +0530 Subject: [Wtr-general] How to retrieve the text in an Alert Window using WET? In-Reply-To: <20051122052108.66989.qmail@web8512.mail.in.yahoo.com> References: <20051122052108.66989.qmail@web8512.mail.in.yahoo.com> Message-ID: <4382B115.5030803@qantom.com> Hi Amitha, We ran into a similar issue a while back. For some reason (I dont know if it is a ruby issue), rescue doesn't trap 'Timeout' errors. You have explicitly catch a Timeout error as: begin ..... ... rescue Timeout::Error puts "No alert window found" end Raghu Amitha Shetty wrote: > Hi, > I tried Begin-Rescue but Rescue block is not catching Timeout exception. > Its coming out of the test throwing that exception. > > My code: > $ie.Button("value:=Submit").click_without_blocking() > begin > alert_win = $ie.Dialog("title:=Microsoft Internet Explorer") > alert_label = alert_win.Label("index:=2") > alert_text = alert_label.display_text > alert_win.Button("text:=OK").click > rescue > puts"No alert window found" > ensure > puts"ok" > end > > Its printing whatever is in ensure block.But its not entering rescue > block.. > > Also I tried to reduce timeout to 5 seconds using > $ie.timeout = 5 > But it throws the following exception: > undefined method `timeout=' for # > (NoMethodError) > > > Thanks > Amitha > > */Raghu Venkataramana /* wrote: > > Hi Amitha, > > There is no method to directly do that. However you can > put the dilg = ie.Dialog("title:=Microsoft Internet Explorer") > statement inside a Begin-Rescue block and catch timeout > exception. In the current implementation, the code tries > for 10 seconds to find the popup and gives up after that ( > by raising a Timeout error). > > Thanks > Raghu > > > > Amitha Shetty wrote: > > > Hi Raghu, > > Thanks a lot." dilg.Label("index:=1")" works fine. > > I have one more query... > > Can we use exists?function for popup i.e Is there a method to > > confirm if popup has appeared.. > > > > Thanks, > > Amitha > > > > */Raghu Venkataramana /* wrote: > > > > OK. Now I see!!. I basically misguided you. > > > > win_label() is a method in the underlying win-objects library which > > can be used to control win32 UI (call it ruby based AutoIT but with > > limited options as of now.). This method has been wrapped in the > > ModalDialog class as Label(). So the correct syntax would be. > > > > dilg.Label("index:=1") > > > > Sorry for the confusion. Let me know if this works for you. > > > > Thanks > > Raghu > > > > Amitha Shetty wrote: > > > > > Hi, > > > I tried wi! th click_without_blocking(). > > > It is throwing the following exception: > > > undefined method `win_label' for # > > > (NoMethodError) > > > I tried with different index..(1 to 6).But it threw the same > > exception. > > > > > > Thanks, > > > Amitha > > > > > > */Raghu Venkataramana /* wrote: > > > > > > Hi Amitha, > > > > > > This time you seemed to have used > > > ie.Button("value:=Submit").click > > > instead of > > > ie.Button("value:=Submit").click_without_blocking() > > > > > > Thanks > > > Raghu > > > > > > > > > Amitha Shetty wrote: > > > > > > > Hi Raghu, > > > > Thanks for the help. > > > > But Watir hangs when I use win_label and display_text methods. > > > > I am using 0.5.3(latest) version of WET and that has winobjects. > > > > > > > > The following is my code: > > > > > > > > require 'WET' > > > > include WET > > > > > > &! gt; > ie = nil > > > > ie = Browser("url:=LOGIN_URL <=LOGIN_URL>") > > > > sleep 2 > > > > ie.Button("value:=Submit").click #Gives Alert window... > > > > dilg = ie.Dialog("title:=Microsoft Internet Explorer") > > > > lbl = dilg.win_label("index:=1") > > > > puts lbl.display_text > > > > It clicks on the button and alert window appears. But it hangs > > > after that. > > > > I tried include Wet::Winobjects. > > > > I tried with indexes 1,2,3,4.But even that didn't help > > > > > > > > > > > > Please help. > > > > > > > > Thanks, > > > > Amitha > > > > */Raghu Venkataramana /* wrote: > > > > > > > > Hi Amitha, > > > > > > > > Assuming that you are using the latest version of WET > (0.5.3), you > > > > will > > > > have wet-winobjects > > > > installed on your machine. Using wet-winobjects, you will be > able > > > > to do > > > > what you asked. For example, > > > > in your case, you can do : > > > > > &! gt; > > dlg = $ie.Dialog("title:=Microsoft Internet Explorer") > > > > lbl = dlg.win_label("index:=1") # Pl. Try index of 2, 3 - one of > > > > them works > > > > puts lbl.display_text > > > > > > > > will printout out > > > > Do You really want to .... (The text that is displayed on the > > > dialog) > > > > > > > > The dlg.win_label above retrieves a handle to the first 'Static' > > > > element > > > > in the dialog window. > > > > The display_text method of the win_label class gets the actual > > text > > > > being displayed by the > > > > label. > > > > > > > > Hope this helps. > > > > > > > > The wet-winobjects is a ruby gem including rdocs. The rdocs > > > describes > > > > all t! he wet-winboject > > > > class API. > > > > > > > > Cheers > > ! > > Raghu > > > > > > > > > > > > Ami! tha Shetty wrote: > > > > > > > > > Hi, > > > > > I am using WET to handle alert windows.I am able to > dismiss the > > > > > alert window by clicking on the ' OK' button using > > > > > def_ok() > > > > > $ie.Button("value:=Submit").click_without_blocking() > > > > > $ie.Dialog("title:=Microsoft Internet > > > > Explorer").Button("text:=OK").click > > > > > end > > > > > But I want to retrieve the text in the alert window and verify > > > > if the > > > > > right alert message is displayed. > > > > > For Eg:An alert window saying 'Do You really want to do > > > > this".How do I > > > > > get the text? How can I use Label(*args) method to do this? > > > > > > > > > > Thanks, > > > > > Amitha > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > > Enjoy this Di! wali with Y! India Click here > > > > > > > > > > > > > > > > > > > > >------------------------------------------------------------------------ > > > > > > > > > >_______________________________________________ > > > > >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 > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > Enj! oy this Diwali with Y! India Click here > > > > > > > > > > > > > > >------------------------------------------------------------------------ > > > > > > > >_______________________________________________ > > > >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 > > > > > > > > > > > > ------------------------------------------------------------------------ > > > Enjoy this Diwali with Y! India Click here > > > > > > > > > >------------------------------------------------------------------------ > > > > > >_______________________________________________ > > >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 > > > > > > > ------------------------------------------------------------------------ > > Enjoy this Diwali with Y! India Click here > > > > > >------------------------------------------------------------------------ > > > >_______________________________________________ > >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 > > > > > ------------------------------------------------------------------------ > Enjoy this Diwali with Y! India Click here > > >------------------------------------------------------------------------ > >_______________________________________________ >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 jim_che_tih at yahoo.com Tue Nov 22 01:20:43 2005 From: jim_che_tih at yahoo.com (jim che) Date: Mon, 21 Nov 2005 22:20:43 -0800 (PST) Subject: [Wtr-general] How to download the html file in ruby Message-ID: <20051122062043.30664.qmail@web33307.mail.mud.yahoo.com> Hi all I want to save a certain html to a directory but I don't know how to do it. Otherwise how to write some data into a file? Thank you for any help jim --------------------------------- Yahoo! FareChase - Search multiple travel sites in one click. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051121/03f371d0/attachment.html From chaya_b_s at yahoo.co.in Tue Nov 22 03:13:38 2005 From: chaya_b_s at yahoo.co.in (chaya shetty) Date: Tue, 22 Nov 2005 08:13:38 +0000 (GMT) Subject: [Wtr-general] Is there a way to input data into a "Readonly" text field ? Message-ID: <20051122081338.67013.qmail@web8303.mail.in.yahoo.com> Hi, Is there a way to input data into a "Readonly" text field in watir? Thanks Chaya --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051122/45388bc5/attachment.html From zeljko.filipin at gmail.com Tue Nov 22 04:18:57 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 22 Nov 2005 10:18:57 +0100 Subject: [Wtr-general] How to download the html file in ruby In-Reply-To: <20051122062043.30664.qmail@web33307.mail.mud.yahoo.com> Message-ID: <001e01c5ef45$c545e040$c6e7fea9@officezg.wa> Save html to file: irb require 'watir' File.open('file.htm', 'w+b') do |file| ie = Watir::IE.start('http://wtr.rubyforge.org/') file.puts(ie.html) end # File automatically closed here Write text to file: File.open('file.txt', 'w+b') do |file| file.puts 'Wrote some text.' end # File automatically closed here (from http://en.wikipedia.org/wiki/Ruby_programming_language) Zeljko ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of jim che Sent: Tuesday, November 22, 2005 7:21 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] How to download the html file in ruby Hi all I want to save a certain html to a directory but I don't know how to do it. Otherwise how to write some data into a file? Thank you for any help jim ________________________________ Yahoo! FareChase - Search multiple travel sites in one click. From sy1234 at gmail.com Tue Nov 22 10:23:12 2005 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 22 Nov 2005 09:23:12 -0600 Subject: [Wtr-general] Fwd: [Wtr-core] Mozilla support In-Reply-To: <1e55af990511220722s26fa65dl6684cd340ac3b30f@mail.gmail.com> References: <20051118113452.17439.qmail@web34815.mail.mud.yahoo.com> <004601c5ef12$aca484c0$6600a8c0@NewDell> <1e55af990511220722s26fa65dl6684cd340ac3b30f@mail.gmail.com> Message-ID: <1e55af990511220723j1360e3a5y3cf6c5f66bf4e056@mail.gmail.com> (sending to the mailing list) On 11/21/05, Paul Rogers wrote: > Ive also tried jssh, not recently though. This may be an easy way to get > moz support into watir. The author of the tool was helpful when I had > questions. I'm quivering in anticipation! Although I just cracked my vmware issues, so I'll be able to use Windows without booting into a dual boot setup, but I'd rather avoid that. I'd rather avoid Windows entirely. It seems like a lot of overhead just for using watir. ;) From jeff.darklight at gmail.com Tue Nov 22 13:54:48 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Tue, 22 Nov 2005 10:54:48 -0800 Subject: [Wtr-general] Fwd: [Wtr-core] Mozilla support In-Reply-To: <1e55af990511220723j1360e3a5y3cf6c5f66bf4e056@mail.gmail.com> References: <20051118113452.17439.qmail@web34815.mail.mud.yahoo.com> <004601c5ef12$aca484c0$6600a8c0@NewDell> <1e55af990511220722s26fa65dl6684cd340ac3b30f@mail.gmail.com> <1e55af990511220723j1360e3a5y3cf6c5f66bf4e056@mail.gmail.com> Message-ID: I tried using jssh ... it was really buggy when I messed with it... If it works, I guess go for it. j. On 11/22/05, Sy Ali wrote: > > (sending to the mailing list) > > On 11/21/05, Paul Rogers wrote: > > Ive also tried jssh, not recently though. This may be an easy way to get > > moz support into watir. The author of the tool was helpful when I had > > questions. > > I'm quivering in anticipation! > > Although I just cracked my vmware issues, so I'll be able to use > Windows without booting into a dual boot setup, but I'd rather avoid > that. I'd rather avoid Windows entirely. It seems like a lot of > overhead just for using watir. ;) > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051122/50a623d5/attachment.html From Ben.Torres at rhi.com Tue Nov 22 14:13:44 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Tue, 22 Nov 2005 11:13:44 -0800 Subject: [Wtr-general] Wtr-general Digest, Vol 24, Issue 29 Message-ID: <1641BB0AA7287848817A63C3EE9677D509331D22@hqp-ex-mb05.na.msds.rhi.com> Thanks Jeff! This mailing list rocks! I was able to grab the url, but now '&' shows up in the url. How do I remove 'amp;' and just leave '&' in the string? Getting this: http://fo-est-rhd-us/moveCandidate.jsp?profileId=1002266633&foUserId =CBOD031&lob=ATR Source has this: http://fo-est-rhd-us/moveCandidate.jsp?profileId=1002266633&foUserId=CBO D031&lob=ATR -ben ------------------------------ Message: 8 Date: Sat, 19 Nov 2005 05:06:52 -0800 From: Jeff Wood Subject: Re: [Wtr-general] How do I get value from onclick To: wtr-general at rubyforge.org Message-ID: Content-Type: text/plain; charset="iso-8859-1" You can always find the input and then parse out the information for yourself. ie.input( :name, "add" ).html.scan( /main.location='(.*)';top.side/ ) should return just that portion of things you are interested in. Remember that if your html is on multiple lines be sure to add a /m suffix to the regex for #scan. j. On 11/18/05, Torres, Ben (HQP) wrote: > > Is there anyway I can get the url specified in onclick? > (http://fo-vap-rhe-us...) > > Here's a snip from the source code: > > style="font-family:Helvetica;font-size:xx-small" > onclick="top.main.location='http://fo-vap-rhe-us/moveCandidate.jsp?pro > fi > leId=10023852&foUserId=CYENBOR&lob=AT';top.side.document.actionForm.add. > disabled=true;"> > > What I would want to do is take this url and open it in a new browser > window. > > Thanks in advance, > ben > From Ben.Torres at rhi.com Tue Nov 22 17:18:38 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Tue, 22 Nov 2005 14:18:38 -0800 Subject: [Wtr-general] How do I get value from onclick Message-ID: <1641BB0AA7287848817A63C3EE9677D509331E0E@hqp-ex-mb05.na.msds.rhi.com> Thanks Jeff! This mailing list rocks! I was able to grab the url, but now '&' shows up in the url. How do I remove 'amp;' and just leave '&' in the string? Getting this: http://fo-est-rhd-us/moveCandidate.jsp?profileId=1002266633&foUserId =CBOD031&lob=ATR Source has this: http://fo-est-rhd-us/moveCandidate.jsp?profileId=1002266633&foUserId=CBO D031&lob=ATR -ben ------------------------------ Message: 8 Date: Sat, 19 Nov 2005 05:06:52 -0800 From: Jeff Wood Subject: Re: [Wtr-general] How do I get value from onclick To: wtr-general at rubyforge.org Message-ID: Content-Type: text/plain; charset="iso-8859-1" You can always find the input and then parse out the information for yourself. ie.input( :name, "add" ).html.scan( /main.location='(.*)';top.side/ ) should return just that portion of things you are interested in. Remember that if your html is on multiple lines be sure to add a /m suffix to the regex for #scan. j. On 11/18/05, Torres, Ben (HQP) wrote: > > Is there anyway I can get the url specified in onclick? > (http://fo-vap-rhe-us...) > > Here's a snip from the source code: > > style="font-family:Helvetica;font-size:xx-small" > onclick="top.main.location='http://fo-vap-rhe-us/moveCandidate.jsp?pro > fi > leId=10023852&foUserId=CYENBOR&lob=AT';top.side.document.actionForm.add. > disabled=true;"> > > What I would want to do is take this url and open it in a new browser > window. > > Thanks in advance, > ben > From Ben.Torres at rhi.com Tue Nov 22 17:20:04 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Tue, 22 Nov 2005 14:20:04 -0800 Subject: [Wtr-general] Ruby book Message-ID: <1641BB0AA7287848817A63C3EE9677D509331E0F@hqp-ex-mb05.na.msds.rhi.com> Hi, I'm new to Ruby and want to get a book on Ruby that is complete and is easy to follow. Does anyone have any suggestions? From jeff.darklight at gmail.com Tue Nov 22 17:27:12 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Tue, 22 Nov 2005 14:27:12 -0800 Subject: [Wtr-general] Ruby book In-Reply-To: <1641BB0AA7287848817A63C3EE9677D509331E0F@hqp-ex-mb05.na.msds.rhi.com> References: <1641BB0AA7287848817A63C3EE9677D509331E0F@hqp-ex-mb05.na.msds.rhi.com> Message-ID: Programming Ruby 2nd Edition ( the pickaxe book ) The Ruby Way Ruby in a Nutshell ( written by Matz himself ) is a good "starter" book. Also, Chris Pine ( pine.fm I think ) has a good starters tutorial. ... all good materials. j. On 11/22/05, Torres, Ben (HQP) wrote: > > Hi, > > I'm new to Ruby and want to get a book on Ruby that is complete and is > easy to follow. Does anyone have any suggestions? > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051122/ecb95980/attachment.html From PGarigue at EXTEND.COM Tue Nov 22 17:33:46 2005 From: PGarigue at EXTEND.COM (Pierre Garigue) Date: Tue, 22 Nov 2005 17:33:46 -0500 Subject: [Wtr-general] Ruby book Message-ID: I suggest the Programming Ruby by Dave Thomas. It's what I use. A lot of the other book are good but they cover older versions. I would also suggest some supplemetary reading, such as "the poignant guide to ruby" http://poignantguide.net/ruby/ if you like very stange humor. I do. also look at http://www.loudthinking.com/arc/000199.html Cheers Pierre -----Original Message----- From: Torres, Ben (HQP) [mailto:Ben.Torres at rhi.com] Sent: Tuesday, November 22, 2005 5:20 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Ruby book Hi, I'm new to Ruby and want to get a book on Ruby that is complete and is easy to follow. Does anyone have any suggestions? _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From christopher.mcmahon at gmail.com Tue Nov 22 19:53:30 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 22 Nov 2005 18:53:30 -0600 Subject: [Wtr-general] Wtr-general Digest, Vol 24, Issue 29 In-Reply-To: <1641BB0AA7287848817A63C3EE9677D509331D22@hqp-ex-mb05.na.msds.rhi.com> References: <1641BB0AA7287848817A63C3EE9677D509331D22@hqp-ex-mb05.na.msds.rhi.com> Message-ID: <72799cd70511221653p432f9314y9c8d76964a6e2bd0@mail.gmail.com> On 11/22/05, Torres, Ben (HQP) wrote: > Thanks Jeff! This mailing list rocks! > > I was able to grab the url, but now '&' shows up in the url. How do > I remove 'amp;' and just leave '&' in the string? The right way is to use an HTML parser. The quick'n'dirty way is string.gsub("&",""&") I know, I just used the quick'n'dirty way (for now)... =) -Chris From spammer.sbt at gmail.com Tue Nov 22 21:22:10 2005 From: spammer.sbt at gmail.com (Steve Tang) Date: Tue, 22 Nov 2005 18:22:10 -0800 Subject: [Wtr-general] Stress testing using watir/ruby? References: <1641BB0AA7287848817A63C3EE9677D509331E0F@hqp-ex-mb05.na.msds.rhi.com> Message-ID: <005f01c5efd4$b55ca4e0$6bb0a042@corp.lyris.com> Hi everyone I was wondering if anyone has any tips or suggestion about using Ruby/Watir to stress test a web application. I'm trying to run pretty basic load test on one of our servers, it's really simple, just a simple access to a single webpage and then that's it. I'm using the code ie = Watir::IE.new() ie.goto(page) ie.close() I'm wondering what is the best way to create thousands (more than 25K) of these processes and have them all storm the server at once. I've tried the approach of creating a shell script that just calls the ruby script multiple times I found out that though it works, it's does not generate enough traffic for my needs. Is there a more efficient way to be doing this? Thanks for your help Steve Tang -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051122/10ce1668/attachment.html From jfry at lyris.com Tue Nov 22 21:22:53 2005 From: jfry at lyris.com (Jeff Fry) Date: Tue, 22 Nov 2005 18:22:53 -0800 Subject: [Wtr-general] Hiring a Ruby/Watir coder Message-ID: <4383D27D.6000603@lyris.com> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051122/6b6fd6a8/attachment.html From paul.rogers at shaw.ca Tue Nov 22 22:17:12 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 22 Nov 2005 20:17:12 -0700 Subject: [Wtr-general] Removing cookies Message-ID: <008901c5efdc$65ca5690$6600a8c0@NewDell> Here is the code to get rid of cookies. Sorry it took so long, had to get permission, and then I kept forgetting It was writtern on Win XP - the paths maybe different for win 2000 It may be possible to add a reg exp or string to limit the domain that cookies are deleted Thanks to Jason Scammell and Neteller for this. # file revision: "$Revision: #0 $" # Author:: Jason Scammell jason.scammell at neteller.com # Purpose: To delete all cookies on the PC # Date: Oct 24, 2005 class Dir require 'find' include Find def Dir.visit(dir = '.', files_first = false, &block) if files_first paths = [] Find.find(dir) { |path| paths << path } paths.reverse_each {|path| yield path} else Find.find(dir, &block) end end # simulates unix rm -rf command def Dir.rm_rf(dir) Dir.visit(dir, true) do |path| if FileTest.directory?(path) begin Dir.unlink(path) rescue # Security Exception for Content.IE end else puts "removing #{ path }" begin File.unlink(path) rescue => e #Security exception index.dat etc. puts "Exception " + e end end end end end class CookieKiller def self.kill() dir =CookieKiller.cookie_dir() Dir.rm_rf( dir) end def self.cookie_dir() return ENV['HOMEDRIVE'] + '\\' + ENV['HOMEPATH'] + "\\Cookies" end end # file revision: "$Revision: #0 $" # Author:: Jason Scammell jason.scammell at neteller.com # Purpose: To test the CookieKiller class # Date: Oct 24, 2005 require '../neteller.rb' require 'test/unit' class CookieKillerTest < Test::Unit::TestCase def test_cookie_killer_dir() cookie_count = get_file_count() puts cookie_count -3 # files .,..,index.dat are never deleted. CookieKiller.kill() delete_count= get_file_count() puts delete_count assert (get_file_count() ==3) end def get_file_count() dir = CookieKiller.cookie_dir() d = Dir.new(dir) count=0 d.each do |x| count = count +1 end return count end end From bret at pettichord.com Tue Nov 22 22:15:25 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 22 Nov 2005 21:15:25 -0600 Subject: [Wtr-general] Please use a real subject, was Re: Wtr-general Digest, Vol 24, Issue 29 In-Reply-To: <72799cd70511221653p432f9314y9c8d76964a6e2bd0@mail.gmail.co m> References: <1641BB0AA7287848817A63C3EE9677D509331D22@hqp-ex-mb05.na.msds.rhi.com> <1641BB0AA7287848817A63C3EE9677D509331D22@hqp-ex-mb05.na.msds.rhi.com> Message-ID: <5.1.0.14.2.20051122211326.02b462f0@pop.gmail.com> Please don't allow Digest Titles to serve as headers for posts to this list. They make threads impossible to follow. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Nov 22 22:40:24 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 22 Nov 2005 21:40:24 -0600 Subject: [Wtr-general] Contrib libraries, was Re: Removing cookies In-Reply-To: <008901c5efdc$65ca5690$6600a8c0@NewDell> Message-ID: <5.1.0.14.2.20051122213358.02f42318@pop.gmail.com> This is similar to the code in watir/cookiemanager.rb However, i should note that this code has no tests for it and was only put there as a convenience to users (just like the code below). I suspect that it also has platform limitations. I don't know enough to recommend one implementation over the other. I've been thinking about putting code like this in watir/contrib/* instead. The idea is that any code could be put here with no warrenty from us. There are a couple files in watir/* that should probably go there. Plus we could include more stuff from people on the list. Another idea would be to farm a page on RubyGarden.org with examples. Thoughts? Bret At 09:17 PM 11/22/2005, Paul Rogers wrote: >Here is the code to get rid of cookies. Sorry it took so long, had to >get permission, and then I kept forgetting > >It was writtern on Win XP - the paths maybe different for win 2000 > >It may be possible to add a reg exp or string to limit the domain that >cookies are deleted > >Thanks to Jason Scammell and Neteller for this. > ># file revision: "$Revision: #0 $" ># Author:: Jason Scammell jason.scammell at neteller.com ># Purpose: To delete all cookies on the PC ># Date: Oct 24, 2005 >class Dir > require 'find' > include Find > def Dir.visit(dir = '.', files_first = false, &block) > if files_first > paths = [] > Find.find(dir) { |path| paths << path } > paths.reverse_each {|path| yield path} > else > Find.find(dir, &block) > end > end > # simulates unix rm -rf command > def Dir.rm_rf(dir) > > Dir.visit(dir, true) do |path| > if FileTest.directory?(path) > begin > Dir.unlink(path) > rescue # Security Exception for Content.IE > end > else > puts "removing #{ path }" > begin > File.unlink(path) > rescue => e #Security exception index.dat etc. > puts "Exception " + e > end > end > end > end >end > >class CookieKiller > def self.kill() > dir =CookieKiller.cookie_dir() > Dir.rm_rf( dir) > end > def self.cookie_dir() > return ENV['HOMEDRIVE'] + '\\' + ENV['HOMEPATH'] + "\\Cookies" > end > >end > > > ># file revision: "$Revision: #0 $" ># Author:: Jason Scammell jason.scammell at neteller.com ># Purpose: To test the CookieKiller class ># Date: Oct 24, 2005 > >require '../neteller.rb' >require 'test/unit' >class CookieKillerTest < Test::Unit::TestCase > > def test_cookie_killer_dir() > > cookie_count = get_file_count() > puts cookie_count -3 # files .,..,index.dat are never deleted. > CookieKiller.kill() > delete_count= get_file_count() > puts delete_count > assert (get_file_count() ==3) > > end > > def get_file_count() > dir = CookieKiller.cookie_dir() > d = Dir.new(dir) > count=0 > d.each do |x| > count = count +1 > end > return count > end > >end > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From jkohl at telusplanet.net Tue Nov 22 22:43:57 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Tue, 22 Nov 2005 20:43:57 -0700 Subject: [Wtr-general] Contrib libraries, was Re: Removing cookies In-Reply-To: <5.1.0.14.2.20051122213358.02f42318@pop.gmail.com> Message-ID: <002201c5efe0$2253d7c0$6500a8c0@tintin> > Another idea would be to farm a page on RubyGarden.org with examples. I like this idea. -Jonathan From chaya_b_s at yahoo.co.in Tue Nov 22 23:33:46 2005 From: chaya_b_s at yahoo.co.in (chaya shetty) Date: Wed, 23 Nov 2005 04:33:46 +0000 (GMT) Subject: [Wtr-general] Is there a way to input data into a "Readonly" text field in watir? Message-ID: <20051123043346.63719.qmail@web8319.mail.in.yahoo.com> Hi, I want to write a test case in which I am required to test a date field. This date field is a "readonly text field". The input to this readonly text field is by means of a calendar( the user is supposed to select a date from the calendar which will be displayed in the text field). I want to input data into the "Readonly text field" without selecting the date from the calendar. Is this possible in watir? Is there a way to input data into the "Readonly text field" in watir? --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051123/a209f76e/attachment.html From paul.rogers at shaw.ca Wed Nov 23 00:06:53 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 22 Nov 2005 22:06:53 -0700 Subject: [Wtr-general] Is there a way to input data into a "Readonly" text field in watir? Message-ID: <1b36f71b836f.1b836f1b36f7@shaw.ca> you should be able to use the value= method using the textfields.html from the watir_bonus\unittests\html dir ie.text_field(:name , 'readOnly').value='test' seems to work Paul Content-Type: multipart/alternative; boundary="0-1983776644-1132720426=:63063" Content-Transfer-Encoding: 8bit --0-1983776644-1132720426=:63063 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi, I want to write a test case in which I am required to test a date field. This date field is a "readonly text field". The input to this readonly text field is by means of a calendar( the user is supposed to select a date from the calendar which will be displayed in the text field). I want to input data into the "Readonly text field" without selecting the date from the calendar. Is this possible in watir? Is there a way to input data into the "Readonly text field" in watir? --------------------------------- Enjoy this Diwali with Y! India Click here --0-1983776644-1132720426=:63063 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
Hi,
I want to write a test case in which I am required to test a date field. This date field is a "readonly text field".
 
 The input to this readonly text field is by means of a calendar( the user is supposed to select a date from the calendar which will be displayed in the text field).
 
I want to input data into the "Readonly text field" without selecting the date from the calendar. Is this possible in watir?
Is there a way to input data into the "Readonly text field" in watir?


Enjoy this Diwali with Y! India Click here --0-1983776644-1132720426=:63063-- -------------- next part -------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From smanish at gs-lab.com Wed Nov 23 03:38:03 2005 From: smanish at gs-lab.com (smanish) Date: Wed, 23 Nov 2005 14:08:03 +0530 Subject: [Wtr-general] selecting multiple items in multiple select list throws exception Message-ID: <43842A6B.5010309@gs-lab.com> Hi, The doc for Watir::SelectList says that array item can be passed to select method. But seems not true and watir throws exception. -------------------------- select( item ) This method selects an item, or items in a select box, by text. Raises NoValueFoundException if the specified value is not found. * item - the thing to select, string, reg exp or an array of string and reg exps -------------------------- But I get following exception when I execute $ie.frame("mainFrame").select_list(:name ,"selectedTypes").select( ["SSH", "HTTPS"] ) ------------------------- c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2945:in `select_item_in_select_list': undefined method `matches' for ["SSH", "HTTPS"]:Array (NoMethodError) from c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2944:in `each' from c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2944:in `select_item_in_select_list' from c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2925:in `select' from ConfigurationCaptureFilter.rb:16 --------------------------- Is this known issues? Please let me know if you need more info. Thanks and Regards, Manish From Mark_Cain at rl.gov Wed Nov 23 10:15:04 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Wed, 23 Nov 2005 07:15:04 -0800 Subject: [Wtr-general] selecting multiple items in multiple select listthrows exception Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D47C@EX5V.rl.gov> Here is an example I use to select all items from a select list. #load all items into varaible dbList = $ie.select_list( :name, 'DivBranch').getAllContents #walk the list selecting each item as you go. for dbl in dbList $ie.selectBox( :name, 'DivBranch').select("#{dbl}") End Hope this helps, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of smanish Sent: Wednesday, November 23, 2005 12:38 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] selecting multiple items in multiple select listthrows exception Hi, The doc for Watir::SelectList says that array item can be passed to select method. But seems not true and watir throws exception. -------------------------- select( item ) This method selects an item, or items in a select box, by text. Raises NoValueFoundException if the specified value is not found. * item - the thing to select, string, reg exp or an array of string and reg exps -------------------------- But I get following exception when I execute $ie.frame("mainFrame").select_list(:name ,"selectedTypes").select( ["SSH", "HTTPS"] ) ------------------------- c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2945:in `select_item_in_select_list': undefined method `matches' for ["SSH", "HTTPS"]:Array (NoMethodError) from c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2944:in `each' from c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2944:in `select_item_in_select_list' from c:/program files/ruby/lib/ruby/site_ruby/1.8/watir.rb:2925:in `select' from ConfigurationCaptureFilter.rb:16 --------------------------- Is this known issues? Please let me know if you need more info. Thanks and Regards, Manish _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Wed Nov 23 11:23:04 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 23 Nov 2005 10:23:04 -0600 Subject: [Wtr-general] selecting multiple items in multiple select list throws exception In-Reply-To: <43842A6B.5010309@gs-lab.com> Message-ID: <5.1.0.14.2.20051123102117.0379d828@pop.gmail.com> At 02:38 AM 11/23/2005, smanish wrote: >The doc for Watir::SelectList says that array item can be passed to >select method. >But seems not true and watir throws exception. Thanks for the report. I've corrected the rdoc. An earlier version of Watir::SelectList had code for supporting arrays, but it was buggy and removed. _____________________ Bret Pettichord www.pettichord.com From jeff.darklight at gmail.com Wed Nov 23 11:30:08 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 23 Nov 2005 08:30:08 -0800 Subject: [Wtr-general] Stress testing using watir/ruby? In-Reply-To: <005f01c5efd4$b55ca4e0$6bb0a042@corp.lyris.com> References: <1641BB0AA7287848817A63C3EE9677D509331E0F@hqp-ex-mb05.na.msds.rhi.com> <005f01c5efd4$b55ca4e0$6bb0a042@corp.lyris.com> Message-ID: There are MUCH more efficient ways of doing this... I'm pretty sure the WATiR FAQ has text regarding the fact that it's not intended for stress testing... Anyways, there was a recently released package to the ruby community called : RWB It's not yet released as a gem so installation is slightly more involved. But sample code would look like: require 'rwb' urls = RWB::Builder.new() urls.add_url(1, "http://www.example.com") tests = RWB::Runner.new(urls, 50, 5) tests.run tests.report_header tests.report_overall([0.5, 0.9, 0.99, 0.999]) ... this would run the same URL 50 times with 5 concurrent requests. Output would look something like: completed 5 runs completed 10 runs completed 15 runs completed 20 runs completed 25 runs completed 30 runs completed 35 runs completed 40 runs completed 45 runs completed 50 runs Concurrency Level: 5 Total Requests: 50 Total time for testing: 0.23 secs Requests per second: 217.391304347826 Mean time per request: 21 msecs Standard deviation: 6 Overall results: Shortest time: 10 msecs 50.0%ile time: 20 msecs 90.0%ile time: 30 msecs 99.0%ile time: 40 msecs 99.9%ile time: 40 msecs Longest time: 40 msecs I think that's much more along the lines of what you are after. j. On 11/22/05, Steve Tang wrote: > > Hi everyone I was wondering if anyone has any tips or suggestion about > using Ruby/Watir to stress test a web application. > > I'm trying to run pretty basic load test on one of our servers, it's > really simple, just a simple access to a single webpage and then that's it. > I'm using the code > > ie = Watir::IE.new() > ie.goto(page) > ie.close() > > I'm wondering what is the best way to create thousands (more than 25K) of > these processes and have them all storm the server at once. I've tried the > approach of creating a shell script that just calls the ruby script multiple > times I found out that though it works, it's does not generate enough > traffic for my needs. > > Is there a more efficient way to be doing this? > > Thanks for your help > > Steve Tang > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051123/ec949e6d/attachment.html From christopher.mcmahon at gmail.com Wed Nov 23 11:46:22 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 23 Nov 2005 10:46:22 -0600 Subject: [Wtr-general] Stress testing using watir/ruby? In-Reply-To: <005f01c5efd4$b55ca4e0$6bb0a042@corp.lyris.com> References: <1641BB0AA7287848817A63C3EE9677D509331E0F@hqp-ex-mb05.na.msds.rhi.com> <005f01c5efd4$b55ca4e0$6bb0a042@corp.lyris.com> Message-ID: <72799cd70511230846t6d802bfei31415f875f27777d@mail.gmail.com> > I'm wondering what is the best way to create thousands (more than 25K) of > these processes and have them all storm the server at once. Check the mail list archives-- a reasonably powerful client will support around 50-70 browsers at the same time. You'd need about 5000 different computers running your script. Check out tools like grinder, httpunit, OpenSTA, WWW::Mechanize and friends, Canoo, etc. These tools are all useragents with measurement features, rather than browser-drivers. -Chris From jeff.darklight at gmail.com Wed Nov 23 13:35:19 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 23 Nov 2005 10:35:19 -0800 Subject: [Wtr-general] Stress testing using watir/ruby? In-Reply-To: <72799cd70511230846t6d802bfei31415f875f27777d@mail.gmail.com> References: <1641BB0AA7287848817A63C3EE9677D509331E0F@hqp-ex-mb05.na.msds.rhi.com> <005f01c5efd4$b55ca4e0$6bb0a042@corp.lyris.com> <72799cd70511230846t6d802bfei31415f875f27777d@mail.gmail.com> Message-ID: RWB can do 00s or more simultaneous on a box... which would scale to a heavy load much easier. j. On 11/23/05, Chris McMahon wrote: > > > I'm wondering what is the best way to create thousands (more than 25K) > of > > these processes and have them all storm the server at once. > > Check the mail list archives-- a reasonably powerful client will > support around 50-70 browsers at the same time. You'd need about 5000 > different computers running your script. > > Check out tools like grinder, httpunit, OpenSTA, WWW::Mechanize and > friends, Canoo, etc. These tools are all useragents with measurement > features, rather than browser-drivers. > -Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051123/f308d03a/attachment.html From jose.papo at gmail.com Wed Nov 23 14:01:24 2005 From: jose.papo at gmail.com (Jose Papo) Date: Wed, 23 Nov 2005 16:01:24 -0300 Subject: [Wtr-general] HTML Results Reports for Watir Message-ID: <9adc16180511231101y34929f1ftf327f864b1d6e272@mail.gmail.com> Hi, Maybe this is something usual but I didn't find how to generate a nice HTML report (like the ones found in JUnit or NUnit) with the test results done by WATIR. This would be an interesting thing to do with a continuous integration tool. Someone have experience eith this kind of environment. So after all test cases run the CI Tool would pick the HTML report and publish in its web site. And if someone wants to he could browse to HTML reports from past days, like CruiseControl does. Jose from Brazil. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051123/98dfb160/attachment.html From jose.papo at gmail.com Wed Nov 23 14:27:27 2005 From: jose.papo at gmail.com (Jose Papo) Date: Wed, 23 Nov 2005 16:27:27 -0300 Subject: [Wtr-general] HTML Results Reports for Watir In-Reply-To: <9adc16180511231101y34929f1ftf327f864b1d6e272@mail.gmail.com> References: <9adc16180511231101y34929f1ftf327f864b1d6e272@mail.gmail.com> Message-ID: <9adc16180511231127v565e4c6dqa1fc79504f748d2@mail.gmail.com> Sorry folks!!! I discovered how to do it with test-report!!! In the googleSuite_test.rb example of Watir do: 1 - include: require 'test/unit/ui/reporter' 2 - on the last line: Test::Unit::UI::Reporter.run(TC_google_suite, 'exemplo') It will generate HTML output to 'exemplo' folder. I had a problem with the class reporter.rb from test-reporter on my Windows. After some errors I tried to include the line require 'stringio' . It worked! But I still will like to receive feedback about CI tool integration :-) !!! Thanks! Jose Papo from Brazil On 11/23/05, Jose Papo wrote: > > Hi, > > > Maybe this is something usual but I didn't find how to generate a nice > HTML report (like the ones found in JUnit or NUnit) with the test results > done by WATIR. This would be an interesting thing to do with a continuous > integration tool. Someone have experience eith this kind of environment. So > after all test cases run the CI Tool would pick the HTML report and publish > in its web site. And if someone wants to he could browse to HTML reports > from past days, like CruiseControl does. > > > Jose from Brazil. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051123/d05f1106/attachment.html From Ben.Torres at rhi.com Wed Nov 23 17:36:41 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Wed, 23 Nov 2005 14:36:41 -0800 Subject: [Wtr-general] How do I get value from onclick Message-ID: <1641BB0AA7287848817A63C3EE9677D5094CB254@hqp-ex-mb05.na.msds.rhi.com> Doing this: add_url = ie.frame('side').button(:name, "add" ).html.scan( /main.location='(.*)';top.side/ ) add_url2 = add_url.gsub("&","&") Got me this error: c:/watir/criscripts/test.rb:9: private method `gsub' called for # (NoMethodError) Does scan return an array? If so, how do I convert to string? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of wtr-general-request at rubyforge.org Sent: Tuesday, November 22, 2005 9:00 PM To: wtr-general at rubyforge.org Subject: Wtr-general Digest, Vol 24, Issue 35 Send Wtr-general mailing list submissions to wtr-general at rubyforge.org To subscribe or unsubscribe via the World Wide Web, visit http://rubyforge.org/mailman/listinfo/wtr-general or, via email, send a message with subject or body 'help' to wtr-general-request at rubyforge.org You can reach the person managing the list at wtr-general-owner at rubyforge.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Wtr-general digest..." Today's Topics: 1. Re: Wtr-general Digest, Vol 24, Issue 29 (Chris McMahon) 2. Stress testing using watir/ruby? (Steve Tang) 3. Hiring a Ruby/Watir coder (Jeff Fry) 4. Removing cookies (Paul Rogers) 5. Please use a real subject, was Re: Wtr-general Digest, Vol 24, Issue 29 (Bret Pettichord) 6. Contrib libraries, was Re: Removing cookies (Bret Pettichord) 7. Re: Contrib libraries, was Re: Removing cookies (Jonathan Kohl) 8. Is there a way to input data into a "Readonly" text field in watir? (chaya shetty) 9. Re: Is there a way to input data into a "Readonly" text field in watir? (Paul Rogers) ---------------------------------------------------------------------- Message: 1 Date: Tue, 22 Nov 2005 18:53:30 -0600 From: Chris McMahon Subject: Re: [Wtr-general] Wtr-general Digest, Vol 24, Issue 29 To: wtr-general at rubyforge.org Message-ID: <72799cd70511221653p432f9314y9c8d76964a6e2bd0 at mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 On 11/22/05, Torres, Ben (HQP) wrote: > Thanks Jeff! This mailing list rocks! > > I was able to grab the url, but now '&' shows up in the url. How > do I remove 'amp;' and just leave '&' in the string? The right way is to use an HTML parser. The quick'n'dirty way is string.gsub("&",""&") I know, I just used the quick'n'dirty way (for now)... =) -Chris ------------------------------ Message: 2 Date: Tue, 22 Nov 2005 18:22:10 -0800 From: "Steve Tang" Subject: [Wtr-general] Stress testing using watir/ruby? To: Message-ID: <005f01c5efd4$b55ca4e0$6bb0a042 at corp.lyris.com> Content-Type: text/plain; charset="iso-8859-1" Hi everyone I was wondering if anyone has any tips or suggestion about using Ruby/Watir to stress test a web application. I'm trying to run pretty basic load test on one of our servers, it's really simple, just a simple access to a single webpage and then that's it. I'm using the code ie = Watir::IE.new() ie.goto(page) ie.close() I'm wondering what is the best way to create thousands (more than 25K) of these processes and have them all storm the server at once. I've tried the approach of creating a shell script that just calls the ruby script multiple times I found out that though it works, it's does not generate enough traffic for my needs. Is there a more efficient way to be doing this? Thanks for your help Steve Tang -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051122/10ce1668 /attachment-0001.htm ------------------------------ Message: 3 Date: Tue, 22 Nov 2005 18:22:53 -0800 From: Jeff Fry Subject: [Wtr-general] Hiring a Ruby/Watir coder To: wtr-general at rubyforge.org, agile-testing at yahoogroups.com Message-ID: <4383D27D.6000603 at lyris.com> Content-Type: text/plain; charset="us-ascii" An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051122/6b6fd6a8 /attachment-0001.htm ------------------------------ Message: 4 Date: Tue, 22 Nov 2005 20:17:12 -0700 From: Paul Rogers Subject: [Wtr-general] Removing cookies To: wtr-general at rubyforge.org Message-ID: <008901c5efdc$65ca5690$6600a8c0 at NewDell> Content-Type: text/plain; charset=US-ASCII Here is the code to get rid of cookies. Sorry it took so long, had to get permission, and then I kept forgetting It was writtern on Win XP - the paths maybe different for win 2000 It may be possible to add a reg exp or string to limit the domain that cookies are deleted Thanks to Jason Scammell and Neteller for this. # file revision: "$Revision: #0 $" # Author:: Jason Scammell jason.scammell at neteller.com # Purpose: To delete all cookies on the PC # Date: Oct 24, 2005 class Dir require 'find' include Find def Dir.visit(dir = '.', files_first = false, &block) if files_first paths = [] Find.find(dir) { |path| paths << path } paths.reverse_each {|path| yield path} else Find.find(dir, &block) end end # simulates unix rm -rf command def Dir.rm_rf(dir) Dir.visit(dir, true) do |path| if FileTest.directory?(path) begin Dir.unlink(path) rescue # Security Exception for Content.IE end else puts "removing #{ path }" begin File.unlink(path) rescue => e #Security exception index.dat etc. puts "Exception " + e end end end end end class CookieKiller def self.kill() dir =CookieKiller.cookie_dir() Dir.rm_rf( dir) end def self.cookie_dir() return ENV['HOMEDRIVE'] + '\\' + ENV['HOMEPATH'] + "\\Cookies" end end # file revision: "$Revision: #0 $" # Author:: Jason Scammell jason.scammell at neteller.com # Purpose: To test the CookieKiller class # Date: Oct 24, 2005 require '../neteller.rb' require 'test/unit' class CookieKillerTest < Test::Unit::TestCase def test_cookie_killer_dir() cookie_count = get_file_count() puts cookie_count -3 # files .,..,index.dat are never deleted. CookieKiller.kill() delete_count= get_file_count() puts delete_count assert (get_file_count() ==3) end def get_file_count() dir = CookieKiller.cookie_dir() d = Dir.new(dir) count=0 d.each do |x| count = count +1 end return count end end ------------------------------ Message: 5 Date: Tue, 22 Nov 2005 21:15:25 -0600 From: Bret Pettichord Subject: [Wtr-general] Please use a real subject, was Re: Wtr-general Digest, Vol 24, Issue 29 To: wtr-general at rubyforge.org Message-ID: <5.1.0.14.2.20051122211326.02b462f0 at pop.gmail.com> Content-Type: text/plain; charset="us-ascii"; format=flowed Please don't allow Digest Titles to serve as headers for posts to this list. They make threads impossible to follow. _____________________ Bret Pettichord www.pettichord.com ------------------------------ Message: 6 Date: Tue, 22 Nov 2005 21:40:24 -0600 From: Bret Pettichord Subject: [Wtr-general] Contrib libraries, was Re: Removing cookies To: wtr-general at rubyforge.org Message-ID: <5.1.0.14.2.20051122213358.02f42318 at pop.gmail.com> Content-Type: text/plain; charset="us-ascii"; format=flowed This is similar to the code in watir/cookiemanager.rb However, i should note that this code has no tests for it and was only put there as a convenience to users (just like the code below). I suspect that it also has platform limitations. I don't know enough to recommend one implementation over the other. I've been thinking about putting code like this in watir/contrib/* instead. The idea is that any code could be put here with no warrenty from us. There are a couple files in watir/* that should probably go there. Plus we could include more stuff from people on the list. Another idea would be to farm a page on RubyGarden.org with examples. Thoughts? Bret At 09:17 PM 11/22/2005, Paul Rogers wrote: >Here is the code to get rid of cookies. Sorry it took so long, had to >get permission, and then I kept forgetting > >It was writtern on Win XP - the paths maybe different for win 2000 > >It may be possible to add a reg exp or string to limit the domain that >cookies are deleted > >Thanks to Jason Scammell and Neteller for this. > ># file revision: "$Revision: #0 $" ># Author:: Jason Scammell jason.scammell at neteller.com # Purpose: To >delete all cookies on the PC # Date: Oct 24, 2005 class Dir > require 'find' > include Find > def Dir.visit(dir = '.', files_first = false, &block) > if files_first > paths = [] > Find.find(dir) { |path| paths << path } > paths.reverse_each {|path| yield path} > else > Find.find(dir, &block) > end > end > # simulates unix rm -rf command > def Dir.rm_rf(dir) > > Dir.visit(dir, true) do |path| > if FileTest.directory?(path) > begin > Dir.unlink(path) > rescue # Security Exception for Content.IE > end > else > puts "removing #{ path }" > begin > File.unlink(path) > rescue => e #Security exception index.dat etc. > puts "Exception " + e > end > end > end > end >end > >class CookieKiller > def self.kill() > dir =CookieKiller.cookie_dir() > Dir.rm_rf( dir) > end > def self.cookie_dir() > return ENV['HOMEDRIVE'] + '\\' + ENV['HOMEPATH'] + "\\Cookies" > end > >end > > > ># file revision: "$Revision: #0 $" ># Author:: Jason Scammell jason.scammell at neteller.com # Purpose: To >test the CookieKiller class # Date: Oct 24, 2005 > >require '../neteller.rb' >require 'test/unit' >class CookieKillerTest < Test::Unit::TestCase > > def test_cookie_killer_dir() > > cookie_count = get_file_count() > puts cookie_count -3 # files .,..,index.dat are never deleted. > CookieKiller.kill() > delete_count= get_file_count() > puts delete_count > assert (get_file_count() ==3) > > end > > def get_file_count() > dir = CookieKiller.cookie_dir() > d = Dir.new(dir) > count=0 > d.each do |x| > count = count +1 > end > return count > end > >end > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com ------------------------------ Message: 7 Date: Tue, 22 Nov 2005 20:43:57 -0700 From: "Jonathan Kohl" Subject: Re: [Wtr-general] Contrib libraries, was Re: Removing cookies To: Message-ID: <002201c5efe0$2253d7c0$6500a8c0 at tintin> Content-Type: text/plain; charset="us-ascii" > Another idea would be to farm a page on RubyGarden.org with examples. I like this idea. -Jonathan ------------------------------ Message: 8 Date: Wed, 23 Nov 2005 04:33:46 +0000 (GMT) From: chaya shetty Subject: [Wtr-general] Is there a way to input data into a "Readonly" text field in watir? To: wtr Message-ID: <20051123043346.63719.qmail at web8319.mail.in.yahoo.com> Content-Type: text/plain; charset="iso-8859-1" Hi, I want to write a test case in which I am required to test a date field. This date field is a "readonly text field". The input to this readonly text field is by means of a calendar( the user is supposed to select a date from the calendar which will be displayed in the text field). I want to input data into the "Readonly text field" without selecting the date from the calendar. Is this possible in watir? Is there a way to input data into the "Readonly text field" in watir? --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051123/a209f76e /attachment-0001.htm ------------------------------ Message: 9 Date: Tue, 22 Nov 2005 22:06:53 -0700 From: Paul Rogers Subject: Re: [Wtr-general] Is there a way to input data into a "Readonly" text field in watir? To: wtr-general at rubyforge.org Message-ID: <1b36f71b836f.1b836f1b36f7 at shaw.ca> Content-Type: text/plain; charset="us-ascii" you should be able to use the value= method using the textfields.html from the watir_bonus\unittests\html dir ie.text_field(:name , 'readOnly').value='test' seems to work Paul Content-Type: multipart/alternative; boundary="0-1983776644-1132720426=:63063" Content-Transfer-Encoding: 8bit --0-1983776644-1132720426=:63063 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi, I want to write a test case in which I am required to test a date field. This date field is a "readonly text field". The input to this readonly text field is by means of a calendar( the user is supposed to select a date from the calendar which will be displayed in the text field). I want to input data into the "Readonly text field" without selecting the date from the calendar. Is this possible in watir? Is there a way to input data into the "Readonly text field" in watir? --------------------------------- Enjoy this Diwali with Y! India Click here --0-1983776644-1132720426=:63063 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
Hi,
I want to write a test case in which I am required to test a date field. This date field is a "readonly text field".
 
 The input to this readonly text field is by means of a calendar( the user is supposed to select a date from the calendar which will be displayed in the text field).
 
I want to input data into the "Readonly text field" without selecting the date from the calendar. Is this possible in watir?
Is there a way to input data into the "Readonly text field" in watir?


Enjoy this Diwali with Y! India Click here --0-1983776644-1132720426=:63063-- -------------- next part -------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ------------------------------ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general End of Wtr-general Digest, Vol 24, Issue 35 ******************************************* From jim_che_tih at yahoo.com Wed Nov 23 20:26:02 2005 From: jim_che_tih at yahoo.com (jim che) Date: Wed, 23 Nov 2005 17:26:02 -0800 (PST) Subject: [Wtr-general] How to check the error when opening the html pages Message-ID: <20051124012602.85678.qmail@web33304.mail.mud.yahoo.com> Hi all I want to know how to check the errors when opening the html pages.For example I open the page "wwwww.111.com" it must be error and the ruby will stop. The most things I want to do is that I want to catch that error and back the IE in order to let the ruby continue to execute but not stop. Thank you for any help jim --------------------------------- Yahoo! Music Unlimited - Access over 1 million songs. Try it free. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051123/d45ee178/attachment.html From satti at qantom.com Wed Nov 23 23:52:06 2005 From: satti at qantom.com (Sathya Shankar) Date: Thu, 24 Nov 2005 10:22:06 +0530 Subject: [Wtr-general] HTML Results Reports for Watir In-Reply-To: <9adc16180511231101y34929f1ftf327f864b1d6e272@mail.gmail.com> References: <9adc16180511231101y34929f1ftf327f864b1d6e272@mail.gmail.com> Message-ID: <438546F6.5070301@qantom.com> WET has the HTML reporter framework.....And the results are neatly formated in HTML format. Sathya Jose Papo wrote: > Hi, > > > Maybe this is something usual but I didn't find how to generate a > nice HTML report (like the ones found in JUnit or NUnit) with the test > results done by WATIR. This would be an interesting thing to do with a > continuous integration tool. Someone have experience eith this kind of > environment. So after all test cases run the CI Tool would pick the > HTML report and publish in its web site. And if someone wants to he > could browse to HTML reports from past days, like CruiseControl does. > > > Jose from Brazil. > >------------------------------------------------------------------------ > >_______________________________________________ >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 jeff.darklight at gmail.com Wed Nov 23 23:45:10 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 23 Nov 2005 20:45:10 -0800 Subject: [Wtr-general] How do I get value from onclick In-Reply-To: <1641BB0AA7287848817A63C3EE9677D5094CB254@hqp-ex-mb05.na.msds.rhi.com> References: <1641BB0AA7287848817A63C3EE9677D5094CB254@hqp-ex-mb05.na.msds.rhi.com> Message-ID: The sample is a bit off... try # same as before. add_url = ie.frame( 'side' ).button( :name, "add" ).html.scan( /main.location='(.*)';top.side/ ) # here's where you're getting confused. scan returns an array of all matches. ( in this case it's one thing, but scan doesn't care )... So, either # so either flatten the array into a single string add_url.to_s! # or # or create a new array after cleaning each of the scan results. add_url2 = add_url.map { |curr| curr.gsub "&", "&" } # at that point add_url2 will still be an array. but, each element of the array has now had the & sets removed. # still need to either access by ordinal add_url2[0] # or flatten the array into a single string. add_url2.to_s! hope that helps.. j. -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051123/54b7e053/attachment.html From zeljko.filipin at gmail.com Thu Nov 24 03:56:27 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 24 Nov 2005 09:56:27 +0100 Subject: [Wtr-general] How to check the error when opening the html pages In-Reply-To: <20051124012602.85678.qmail@web33304.mail.mud.yahoo.com> Message-ID: <002d01c5f0d4$f68b1450$c6e7fea9@officezg.wa> Try this require 'watir' begin ie = Watir::IE.start('http://wwwww.111.com/') rescue => e puts "error: #{e}" end Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of jim che Sent: Thursday, November 24, 2005 2:26 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] How to check the error when opening the html pages Hi all I want to know how to check the errors when opening the html pages.For example I open the page "wwwww.111.com" it must be error and the ruby will stop. The most things I want to do is that I want to catch that error and back the IE in order to let the ruby continue to execute but not stop. Thank you for any help jim _____ Yahoo! Music Unlimited - Access over 1 million songs. Try it free. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051124/70ed595d/attachment.html From buggins at byte-force.com Thu Nov 24 04:13:33 2005 From: buggins at byte-force.com (Yury Krasavin) Date: Thu, 24 Nov 2005 12:13:33 +0300 Subject: [Wtr-general] HTML Results Reports for Watir In-Reply-To: Message-ID: <000401c5f0d7$5845c710$5864bbd5@byteforce.yar.ru> Hi, Jose! Here is the sample of a NUnit wrapper for Watir tests: http://www.hanselman.com/blog/IntegratingRubyAndWatirWithNUnit.aspx I use it in a slightly modified form for differrent Ruby tests, not only Watir. But the main idea is that it will be a usual NUnit fixture, included in a CruiseControl report as other NUnit fixtures. Yury. > -----Original Message----- > Date: Wed, 23 Nov 2005 16:27:27 -0300 > From: Jose Papo > Subject: Re: [Wtr-general] HTML Results Reports for Watir > To: wtr-general at rubyforge.org > Message-ID: > <9adc16180511231127v565e4c6dqa1fc79504f748d2 at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Sorry folks!!! I discovered how to do it with test-report!!! > > In the googleSuite_test.rb example of Watir do: > > 1 - include: require 'test/unit/ui/reporter' > 2 - on the last line: > Test::Unit::UI::Reporter.run(TC_google_suite, > 'exemplo') > > It will generate HTML output to 'exemplo' folder. I had a > problem with the class reporter.rb from test-reporter on my > Windows. After some errors I tried to include the line > require 'stringio' . It worked! > > > But I still will like to receive feedback about CI tool > integration :-) !!! > > > Thanks! > > Jose Papo from Brazil From amithashettyb at yahoo.co.in Thu Nov 24 04:27:09 2005 From: amithashettyb at yahoo.co.in (Amitha Shetty) Date: Thu, 24 Nov 2005 09:27:09 +0000 (GMT) Subject: [Wtr-general] Watir hangs after logging into an Application that has applet in the first screen after logging in... Message-ID: <20051124092709.79897.qmail@web8506.mail.in.yahoo.com> Hi, I am trying to login into an application which has an applet in the login page(i.e first screen after logging in).Watir and the application hangs after logging in. Is this due to the applet? I am not trying to do anything in the first screen(which has applet). I just want to login and access another screen in the application and this screen does not have applet. How do I handle this? Thanks, Amitha --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051124/aa28eda9/attachment.html From vishalworld at sqatester.com Thu Nov 24 06:16:33 2005 From: vishalworld at sqatester.com (Vishal Chavan) Date: Thu, 24 Nov 2005 03:16:33 -0800 (PST) Subject: [Wtr-general] Support of Watir for Mozilla/Opera/Netscape Message-ID: <20051124031633.BAD9BB7B@dm20.mta.everyone.net> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051124/ca36a1ee/attachment.html From jose.papo at gmail.com Thu Nov 24 06:51:15 2005 From: jose.papo at gmail.com (Jose Papo) Date: Thu, 24 Nov 2005 08:51:15 -0300 Subject: [Wtr-general] HTML Results Reports for Watir In-Reply-To: <000401c5f0d7$5845c710$5864bbd5@byteforce.yar.ru> References: <000401c5f0d7$5845c710$5864bbd5@byteforce.yar.ru> Message-ID: <9adc16180511240351w4a75ded5h5c6a7f11b7ec9cd0@mail.gmail.com> Thank you Yuri! The problem with this is the need to run .NET Framework and install another tool for it to work. Do you or someone else know how to do it only with Watir and an open source CI Tool ? Thanks! On 11/24/05, Yury Krasavin wrote: > > Hi, Jose! > > Here is the sample of a NUnit wrapper for Watir tests: > http://www.hanselman.com/blog/IntegratingRubyAndWatirWithNUnit.aspx > > I use it in a slightly modified form for differrent Ruby tests, not only > Watir. But the main idea is that it will be a usual NUnit fixture, > included > in a CruiseControl report as other NUnit fixtures. > > Yury. > > > -----Original Message----- > > Date: Wed, 23 Nov 2005 16:27:27 -0300 > > From: Jose Papo > > Subject: Re: [Wtr-general] HTML Results Reports for Watir > > To: wtr-general at rubyforge.org > > Message-ID: > > <9adc16180511231127v565e4c6dqa1fc79504f748d2 at mail.gmail.com> > > Content-Type: text/plain; charset="iso-8859-1" > > > > Sorry folks!!! I discovered how to do it with test-report!!! > > > > In the googleSuite_test.rb example of Watir do: > > > > 1 - include: require 'test/unit/ui/reporter' > > 2 - on the last line: > > Test::Unit::UI::Reporter.run(TC_google_suite, > > 'exemplo') > > > > It will generate HTML output to 'exemplo' folder. I had a > > problem with the class reporter.rb from test-reporter on my > > Windows. After some errors I tried to include the line > > require 'stringio' . It worked! > > > > > > But I still will like to receive feedback about CI tool > > integration :-) !!! > > > > > > Thanks! > > > > Jose Papo from Brazil > > _______________________________________________ > 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/20051124/bbf0eac9/attachment.html From chaya_b_s at yahoo.co.in Thu Nov 24 07:12:01 2005 From: chaya_b_s at yahoo.co.in (chaya shetty) Date: Thu, 24 Nov 2005 12:12:01 +0000 (GMT) Subject: [Wtr-general] How to check maxlength validation for a textfield using watir? Message-ID: <20051124121201.28609.qmail@web8311.mail.in.yahoo.com> Hi, I want to write a test case to check maxlength validation for a text field. When I try to input a string which exceeds maxlength into a text field using watir, the text field accepts the value and also saves it. But when I try to manually enter a string that exceeds maxlength it truncates the excess characters. How do I handle this?? --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051124/28698cf1/attachment.html From hrishij at synechron.com Thu Nov 24 07:35:23 2005 From: hrishij at synechron.com (Hrishikesh Jamadagni) Date: Thu, 24 Nov 2005 18:05:23 +0530 Subject: [Wtr-general] How to check maxlength validation for a textfieldusing watir? In-Reply-To: <20051124121201.28609.qmail@web8311.mail.in.yahoo.com> Message-ID: <001001c5f0f3$8b4fa920$74021f0a@fusionpune.local> Hi Let me know if this is the correct medium to ask doubts, I have a problem , I want to click a button a jpg image , ie.button(:name, "pc_banner1").click the given syntax is giving errors, cannot find the value or name of the button in view scource/html code how do I click the button? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of chaya shetty Sent: Thursday, November 24, 2005 5:42 PM To: wtr Subject: [Wtr-general] How to check maxlength validation for a textfieldusing watir? Hi, I want to write a test case to check maxlength validation for a text field. When I try to input a string which exceeds maxlength into a text field using watir, the text field accepts the value and also saves it. But when I try to manually enter a string that exceeds maxlength it truncates the excess characters. How do I handle this?? _____ Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051124/0fba6324/attachment.html From chaya_b_s at yahoo.co.in Thu Nov 24 07:42:44 2005 From: chaya_b_s at yahoo.co.in (chaya shetty) Date: Thu, 24 Nov 2005 12:42:44 +0000 (GMT) Subject: [Wtr-general] How to check maxlength validation for a textfieldusing watir? In-Reply-To: <001001c5f0f3$8b4fa920$74021f0a@fusionpune.local> Message-ID: <20051124124245.38298.qmail@web8322.mail.in.yahoo.com> Hi, If HTML has image source say src = /IMAGE_SRC.jpg/ try ie.image(:src,/IMAGE_SRC.jpg/).click Hrishikesh Jamadagni wrote: Hi Let me know if this is the correct medium to ask doubts, I have a problem , I want to click a button a jpg image , ie.button(:name, "pc_banner1").click the given syntax is giving errors, cannot find the value or name of the button in view scource/html code how do I click the button? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of chaya shetty Sent: Thursday, November 24, 2005 5:42 PM To: wtr Subject: [Wtr-general] How to check maxlength validation for a textfieldusing watir? Hi, I want to write a test case to check maxlength validation for a text field. When I try to input a string which exceeds maxlength into a text field using watir, the text field accepts the value and also saves it. But when I try to manually enter a string that exceeds maxlength it truncates the excess characters. How do I handle this?? --------------------------------- Enjoy this Diwali with Y! India Click here _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051124/5e16e2e3/attachment.html From hrishij at synechron.com Thu Nov 24 08:15:42 2005 From: hrishij at synechron.com (Hrishikesh Jamadagni) Date: Thu, 24 Nov 2005 18:45:42 +0530 Subject: [Wtr-general] How to check maxlength validation for atextfieldusing watir? In-Reply-To: <20051124124245.38298.qmail@web8322.mail.in.yahoo.com> Message-ID: <000001c5f0f9$2cfeb4a0$74021f0a@fusionpune.local> Thx chayaa it worked :-) regards hrishij -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of chaya shetty Sent: Thursday, November 24, 2005 6:13 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How to check maxlength validation for atextfieldusing watir? Hi, If HTML has image source say src = /IMAGE_SRC.jpg/ try ie.image(:src,/IMAGE_SRC.jpg/).click Hrishikesh Jamadagni wrote: Hi Let me know if this is the correct medium to ask doubts, I have a problem , I want to click a button a jpg image , ie.button(:name, "pc_banner1").click the given syntax is giving errors, cannot find the value or name of the button in view scource/html code how do I click the button? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of chaya shetty Sent: Thursday, November 24, 2005 5:42 PM To: wtr Subject: [Wtr-general] How to check maxlength validation for a textfieldusing watir? Hi, I want to write a test case to check maxlength validation for a text field. When I try to input a string which exceeds maxlength into a text field using watir, the text field accepts the value and also saves it. But when I try to manually enter a string that exceeds maxlength it truncates the excess characters. How do I handle this?? _____ Enjoy this Diwali with Y! India Click here _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _____ Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051124/29889aec/attachment.html From raghu at qantom.com Thu Nov 24 08:57:23 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Thu, 24 Nov 2005 19:27:23 +0530 Subject: [Wtr-general] Support of Watir for Mozilla/Opera/Netscape In-Reply-To: <20051124031633.BAD9BB7B@dm20.mta.everyone.net> References: <20051124031633.BAD9BB7B@dm20.mta.everyone.net> Message-ID: <4385C6C3.9080209@qantom.com> Vishal Chavan wrote: > Hi, > > I had seen a post pertaining to my query some time back. The > resolution was moving to WET. I have no clue what WET is? > WET is an add-on to watir. It is available at wet.qantom.org > Here is the scenario: I took initiative to automate some test cases of > my application using Watir. I demonstrated the same to my superiors > who asked me abt. its compatability with Opera/Netscape & Mozilla. I > had budgeted sometime from them for the reply. > > My question is: can I configure the scripts as to reuse the script to > run on target browser (viz. Opera/Netscape/Mozilla). > > If there is a planned support for this browsers? > As of now, there is no support for the above browsers. However some folks are working on adding support for Mozilla and we hope that one day Watir will have support for more browsers. > Please advice the same so that I can use Watir for automating > applications in my company. > > Thanks, > > Vishal > > > > ------------------------------------------------------------------------ > Join SQAtester.com Community ---> > http://www.sqatester.com/testersarea/joinus.htm > >------------------------------------------------------------------------ > >_______________________________________________ >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 exortech at gmail.com Thu Nov 24 11:21:57 2005 From: exortech at gmail.com (Owen Rogers) Date: Thu, 24 Nov 2005 08:21:57 -0800 Subject: [Wtr-general] HTML Results Reports for Watir In-Reply-To: <9adc16180511240351w4a75ded5h5c6a7f11b7ec9cd0@mail.gmail.com> References: <000401c5f0d7$5845c710$5864bbd5@byteforce.yar.ru> <9adc16180511240351w4a75ded5h5c6a7f11b7ec9cd0@mail.gmail.com> Message-ID: On 24/11/05, Jose Papo wrote: > The problem with this is the need to run .NET Framework and install > another tool for it to work. Do you or someone else know how to do it only > with Watir and an open source CI Tool ? you might want to try out damagecontrol: http://hieraki.lavalamp.ca/read/book/3 it's a ruby-based open source CI tool. i don't know if it supports watir directly, but i imagine that it would be pretty straightforward to add it. cheers, owen. -- Owen Rogers | http://dotnetjunkies.com/weblog/exortech | CruiseControl.NET - http://ccnet.thoughtworks.com From chaya_b_s at yahoo.co.in Thu Nov 24 23:38:24 2005 From: chaya_b_s at yahoo.co.in (chaya shetty) Date: Fri, 25 Nov 2005 04:38:24 +0000 (GMT) Subject: [Wtr-general] How to check maxlength validation for a textfield using watir? Message-ID: <20051125043824.56022.qmail@web8327.mail.in.yahoo.com> Hi, I want to write a test case to check maxlength validation for a text field. When I try to input a string which exceeds maxlength into a text field using watir, the text field accepts the value and also saves it. But when I try to manually enter a string that exceeds maxlength it truncates the excess characters. How do I handle this?? --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051125/a66c410c/attachment.html From paul.rogers at shaw.ca Fri Nov 25 00:10:12 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 24 Nov 2005 22:10:12 -0700 Subject: [Wtr-general] How to check maxlength validation for a textfield using watir? Message-ID: <54490c548047.54804754490c@shaw.ca> are you using text_field(..).set('a string') or text_field(..).value='a string' set should honour the max length value of the text field ( as specified in the html) .value= will put the whole string in Paul Content-Type: multipart/alternative; boundary="0-1924482286-1132893504=:77538" Content-Transfer-Encoding: 8bit --0-1924482286-1132893504=:77538 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi, I want to write a test case to check maxlength validation for a text field. When I try to input a string which exceeds maxlength into a text field using watir, the text field accepts the value and also saves it. But when I try to manually enter a string that exceeds maxlength it truncates the excess characters. How do I handle this?? --------------------------------- Enjoy this Diwali with Y! India Click here --0-1924482286-1132893504=:77538 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
Hi,
     I want to write a test case to check maxlength validation for a text field.
When I try to input a string which exceeds maxlength  into a text field using watir, the text field accepts the value and also saves it. 
But  when I try to manually enter a string that exceeds maxlength it truncates the excess characters.
How do I handle this??


Enjoy this Diwali with Y! India Click here --0-1924482286-1132893504=:77538-- -------------- next part -------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From AmitD at Synechron.com Fri Nov 25 03:04:50 2005 From: AmitD at Synechron.com (Amit Dighe) Date: Fri, 25 Nov 2005 13:34:50 +0530 Subject: [Wtr-general] Article on Watir in 'Better Software' magazine. Message-ID: <200511250303642.SM04628@SYNPUNE0031> Hi, There was an article on Watir in 'Better Software' magazine. I'm interested in going through the document. Can anyone mail me that document? Cheers, Amit Dighe -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051125/eefc9b01/attachment.html From chaya_b_s at yahoo.co.in Fri Nov 25 04:13:40 2005 From: chaya_b_s at yahoo.co.in (chaya shetty) Date: Fri, 25 Nov 2005 09:13:40 +0000 (GMT) Subject: [Wtr-general] How to check maxlength validation for a textfield using watir? In-Reply-To: <54490c548047.54804754490c@shaw.ca> Message-ID: <20051125091341.64314.qmail@web8313.mail.in.yahoo.com> Hi, I am using ie.text_field(..).set('a string'). But still the textfield accepts a string that exceeds the max length. When I retrieve the contents of the text field it gives the entire string (i.e all the characters including the ones that exceed the max length) How do I deal with this? Thanks Chaya Paul Rogers wrote: are you using text_field(..).set('a string') or text_field(..).value='a string' set should honour the max length value of the text field ( as specified in the html) .value= will put the whole string in Paul Content-Type: multipart/alternative; boundary="0-1924482286-1132893504=:77538" Content-Transfer-Encoding: 8bit --0-1924482286-1132893504=:77538 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi, I want to write a test case to check maxlength validation for a text field. When I try to input a string which exceeds maxlength into a text field using watir, the text field accepts the value and also saves it. But when I try to manually enter a string that exceeds maxlength it truncates the excess characters. How do I handle this?? --------------------------------- Enjoy this Diwali with Y! India Click here --0-1924482286-1132893504=:77538 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi, I want to write a test case to check maxlength validation for a text field. When I try to input a string which exceeds maxlength into a text field using watir, the text field accepts the value and also saves it. But when I try to manually enter a string that exceeds maxlength it truncates the excess characters. How do I handle this?? --------------------------------- Enjoy this Diwali with Y! India Click here --0-1924482286-1132893504=:77538-- _______________________________________________ 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 --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051125/fa71af67/attachment.html From Malcolm.Beaton at conchango.com Fri Nov 25 04:41:53 2005 From: Malcolm.Beaton at conchango.com (Beaton, Malcolm) Date: Fri, 25 Nov 2005 09:41:53 -0000 Subject: [Wtr-general] How to call a script from a running script Message-ID: Hi Everyone OK so this is probably a little rudimentary but in order to keep my scripts separately for separate pages (Which will make maintaining them much easier) Is there a way to create a control file that basically says Go and Run /myDir/Script1.rb When it ends Go and run /myDir/Script2.rb When it ends Go And Run /myDir/Script3.rb And is there a way I can log the results of each separately to files Log 1 Log 2 Log 3 Any help would be appreciated (I am more a tester than a programmer so all this is a steep learning curve) Malcolm Beaton _____________________________________________________________________ This e-mail has been scanned for viruses by MessageLabs. The information contained in this message is confidential and is intended for the addressee only. If you have received this message in error, please notify Conchango plc as soon as possible. The unauthorised use, disclosure, copying or alteration of this message is prohibited and may be unlawful. The internet cannot guarantee the integrity of this message and therefore Conchango plc will not be liable for the message if modified. Reg. Heritage House, Church Road, Egham, Surrey, TW20 9QD T 44 (0) 1784 222 222 F 44 (0) 1784 222 200 E talktous at conchango.com No. 2598884 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051125/1b0202e8/attachment.html From buggins at byte-force.com Fri Nov 25 04:51:49 2005 From: buggins at byte-force.com (Yury Krasavin) Date: Fri, 25 Nov 2005 12:51:49 +0300 Subject: [Wtr-general] HTML Results Reports for Watir In-Reply-To: Message-ID: <000801c5f1a5$db653cb0$5864bbd5@byteforce.yar.ru> > The problem with this is the need to run .NET > Framework and install another tool for it to work. Do you or > someone else know how to do it only with Watir and an open > source CI Tool ? Oh, yes, if I knew a simplier way (the one without intermediate xUnit framework) I would like to use it too. Since I use CruiseControl.NET to build ASP.NET applications, I stopped at that obvious solution for a while. And thank you too! I did not know about that Test::Unit::UI::Reporter. It can produce an XML report either, which CruiseControl can merge whith its build log file. So when I have a little time for it, I should write an xsl-stylesheet for CC to make reports right for Ruby tests! Whatever CI tool you will select, I hope that XML should work in majority of cases. Yury. From polleu at xpiece.com Fri Nov 25 06:52:32 2005 From: polleu at xpiece.com (polleu at xpiece.com) Date: Fri, 25 Nov 2005 12:52:32 +0100 (CET) Subject: [Wtr-general] if else syntax question Message-ID: <20051125115232.8A6D2815940@mail.tamergotchya.de> Hi all, Im trying to run if (i == 4) then $branch_column2[count] = table[i][2].text_field(:index, 1).name.to_s count += 1 $branch_column2[count] = table[i][2].text_field(:index, 1).name.to_s elsif (i == 9) then $branch_column2[count] = table[i][2].select_list(:index, 1).name.to_s else $branch_column2[count] = table[i][2].text_field(:index, 1).name.to_s end but I always get an error message, regardless on how I organise the if - else loop. Would anyone know? From polleu at xpiece.com Fri Nov 25 07:04:00 2005 From: polleu at xpiece.com (polleu at xpiece.com) Date: Fri, 25 Nov 2005 13:04:00 +0100 (CET) Subject: [Wtr-general] if else syntax question Message-ID: <20051125120400.6A644815941@mail.tamergotchya.de> Hi all, Im trying to run if (i == 4) then $branch_column2[count] = table[i][2].text_field(:index, 1).name.to_s count += 1 $branch_column2[count] = table[i][2].text_field(:index, 1).name.to_s elsif (i == 9) then $branch_column2[count] = table[i][2].select_list(:index, 1).name.to_s else $branch_column2[count] = table[i][2].text_field(:index, 1).name.to_s end but I always get an error message, regardless on how I organise the if - else loop. Would anyone know? From vishalworld at sqatester.com Fri Nov 25 07:29:24 2005 From: vishalworld at sqatester.com (Vishal Chavan) Date: Fri, 25 Nov 2005 04:29:24 -0800 (PST) Subject: [Wtr-general] if else syntax question Message-ID: <20051125042924.BAD90E06@dm20.mta.everyone.net> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051125/59b5ebdd/attachment.html From manishs at reconnex.net Fri Nov 25 08:08:37 2005 From: manishs at reconnex.net (Manish Sapariya) Date: Fri, 25 Nov 2005 18:38:37 +0530 Subject: [Wtr-general] HTML Results Reports for Watir In-Reply-To: References: <000401c5f0d7$5845c710$5864bbd5@byteforce.yar.ru> <9adc16180511240351w4a75ded5h5c6a7f11b7ec9cd0@mail.gmail.com> Message-ID: <43870CD5.5010602@reconnex.net> I tried installing and running damagecontrol, but it crashes. I am no Ruby expert and could not figure out whats exactly wrong? Anywasy, Is project alive? The project does n't have active mailing list. No messages since April. Has anybody working installation, I wanted to try out to see how I can automate our build process. From the documents it looks very promising. Thanks and Regards, Manish On 11/24/2005 09:51 PM, Owen Rogers wrote: >On 24/11/05, Jose Papo wrote: > > >> The problem with this is the need to run .NET Framework and install >>another tool for it to work. Do you or someone else know how to do it only >>with Watir and an open source CI Tool ? >> >> > >you might want to try out damagecontrol: http://hieraki.lavalamp.ca/read/book/3 >it's a ruby-based open source CI tool. i don't know if it supports >watir directly, but i imagine that it would be pretty straightforward >to add it. >cheers, >owen. >-- >Owen Rogers | http://dotnetjunkies.com/weblog/exortech | >CruiseControl.NET - http://ccnet.thoughtworks.com > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > From smanish at gs-lab.com Fri Nov 25 08:09:01 2005 From: smanish at gs-lab.com (smanish) Date: Fri, 25 Nov 2005 18:39:01 +0530 Subject: [Wtr-general] HTML Results Reports for Watir In-Reply-To: References: <000401c5f0d7$5845c710$5864bbd5@byteforce.yar.ru> <9adc16180511240351w4a75ded5h5c6a7f11b7ec9cd0@mail.gmail.com> Message-ID: <43870CED.9080609@gs-lab.com> I tried installing and running damagecontrol, but it crashes. I am no Ruby expert and could not figure out whats exactly wrong? Anywasy, Is project alive? The project does n't have active mailing list. No messages since April. Has anybody working installation, I wanted to try out to see how I can automate our build process. From the documents it looks very promising. Thanks and Regards, Manish On 11/24/2005 09:51 PM, Owen Rogers wrote: >On 24/11/05, Jose Papo wrote: > > >> The problem with this is the need to run .NET Framework and install >>another tool for it to work. Do you or someone else know how to do it only >>with Watir and an open source CI Tool ? >> >> > >you might want to try out damagecontrol: http://hieraki.lavalamp.ca/read/book/3 >it's a ruby-based open source CI tool. i don't know if it supports >watir directly, but i imagine that it would be pretty straightforward >to add it. >cheers, >owen. >-- >Owen Rogers | http://dotnetjunkies.com/weblog/exortech | >CruiseControl.NET - http://ccnet.thoughtworks.com > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > From hrishij at synechron.com Fri Nov 25 08:25:32 2005 From: hrishij at synechron.com (Hrishikesh Jamadagni) Date: Fri, 25 Nov 2005 18:55:32 +0530 Subject: [Wtr-general] if else syntax question In-Reply-To: <20051125042924.BAD90E06@dm20.mta.everyone.net> Message-ID: <000001c5f1c3$b744bfe0$74021f0a@fusionpune.local> Hi want to click a link in a popup, If I catch the popup in cache and open it , it show a .css file How do I click a link contained in css file?? hrishij -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Vishal Chavan Sent: Friday, November 25, 2005 5:59 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] if else syntax question Hi Polleu, Not sure if I got your query right, I guess u r trying to execute the loop thru irb. If thats the case use following statement to start IRB: irb --noreadline I found that your loop is properly defined. To test I have assigned some value to i. Here is the code: i=9 if (i == 4) then puts "4" elsif (i == 9) then puts "9" else puts "other" end U might also rethink to use case instead of if... Hope this helps, Vishal --- polleu at xpiece.com wrote: From: polleu at xpiece.com Date: Fri, 25 Nov 2005 13:04:00 +0100 (CET) To: wtr-general at rubyforge.org Subject: [Wtr-general] if else syntax question Hi all, Im trying to run if (i == 4) then $branch_column2[count] = table[i][2].text_field(:index, 1).name.to_s count += 1 $branch_column2[count] = table[i][2].text_field(:index, 1).name.to_s elsif (i == 9) then $branch_column2[count] = table[i][2].select_list(:index, 1).name.to_s else $branch_column2[count] = table[i][2].text_field(:index, 1).name.to_s end but I always get an error message, regardless on how I organise the if - else loop. Would anyone know? _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _____ Join SQAtester.com Community ---> http://www.sqatester.com/testersarea/joinus.htm -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051125/b3f2b573/attachment.html From jeff.darklight at gmail.com Fri Nov 25 13:17:26 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Fri, 25 Nov 2005 10:17:26 -0800 Subject: [Wtr-general] How to call a script from a running script In-Reply-To: References: Message-ID: Assuming that each of these scripts are executable... how about: --SCRIPT-- #!/usr/bin/env ruby run_dir = "/mydir" pages = [ "/Script1.rb", "/Script2.rb", "/Script3.rb" ] pages.each do |curr_page| `#{ run_dir }#{ curr_page } >#{ curr_page }.log` end #run complete --SCRIPT-- Should provide you with what you are after.. There are lots of options for ways to make this command-line driven... Look @ Usage or GetOptLong or any of the other CLI arg handling packages. j. On 11/25/05, Beaton, Malcolm wrote: > > Hi Everyone > > > > OK so this is probably a little rudimentary but in order to keep my > scripts separately for separate pages (Which will make maintaining them much > easier) Is there a way to create a control file that basically says > > > > Go and Run /myDir/Script1.rb > > When it ends > > Go and run /myDir/Script2.rb > > When it ends > > Go And Run /myDir/Script3.rb > > > > And is there a way I can log the results of each separately to files > > Log 1 > > Log 2 > > Log 3 > > > > Any help would be appreciated (I am more a tester than a programmer so all > this is a steep learning curve) > > > > *Malcolm Beaton* > > > > > _____________________________________________________________________ > This e-mail has been scanned for viruses by MessageLabs. The information > contained in this message is confidential and is intended for the addressee > only. If you have received this message in error, please notify Conchango > plc as soon as possible. The unauthorised use, disclosure, copying or > alteration of this message is prohibited and may be unlawful. The internet > cannot guarantee the integrity of this message and therefore Conchango plc > will not be liable for the message if modified. > > Reg. Heritage House, Church Road, Egham, Surrey, TW20 9QD T 44 (0) 1784 > 222 222 F 44 (0) 1784 222 200 E talktous at conchango.com No. 2598884 > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051125/db62c06f/attachment.html From jeff.darklight at gmail.com Fri Nov 25 13:20:41 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Fri, 25 Nov 2005 10:20:41 -0800 Subject: [Wtr-general] How to call a script from a running script In-Reply-To: References: Message-ID: ... heh, course I used *nix style command paths ... so, lets try that again in a windows way --SCRIPT-- #!/usr/bin/env ruby run_dir = "C:\\mydir" pages = [ "\\Script1.rb", "\\Script2.rb", "\\Script3.rb" ] pages.each do |curr_page| `#{ run_dir }#{ curr_page } >#{ curr_page }.log` end #run complete --SCRIPT-- j. -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051125/5440ebe3/attachment.html From bret at pettichord.com Fri Nov 25 14:01:39 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 25 Nov 2005 13:01:39 -0600 Subject: [Wtr-general] Watir hangs after logging into an Application that has applet in the first screen after logging in... In-Reply-To: <20051124092709.79897.qmail@web8506.mail.in.yahoo.com> Message-ID: <5.1.0.14.2.20051125123150.037c7f58@pop.gmail.com> At 03:27 AM 11/24/2005, Amitha Shetty wrote: > I am trying to login into an application which has an applet in the > login page(i.e first screen after logging in).Watir and the application > hangs after logging in. >Is this due to the applet? Could be. >I am not trying to do anything in the first screen(which has applet). >I just want to login and access another screen in the application and >this screen does not have applet. >How do I handle this? I suspect that the Watir::IE#wait method is failing to return, thus causing your hang. This method is called implicitly by other Watir methods to ensure window synchronization. I'd recommend stubbing out this method when the applet appears, and then resetting it back to its default state afterwards. Bret _____________________ Bret Pettichord www.pettichord.com From jeff.darklight at gmail.com Fri Nov 25 16:01:05 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Fri, 25 Nov 2005 13:01:05 -0800 Subject: [Wtr-general] How to check the error when opening the html pages In-Reply-To: <20051124012602.85678.qmail@web33304.mail.mud.yahoo.com> References: <20051124012602.85678.qmail@web33304.mail.mud.yahoo.com> Message-ID: This is very much dependant on what you consider an "error"... Do you mean an error from the HTTP side of things ??? a browser failure ??? a com failure ??? what ? j. On 11/23/05, jim che wrote: > > Hi all > I want to know how to check the errors when opening the html > pages.For example I open the page "wwwww.111.com" it must be error and the > ruby will stop. > The most things I want to do is that I want to catch that error and back > the IE in order to let the ruby continue to execute but not stop. > Thank you for any help > jim > > ------------------------------ > Yahoo! Music Unlimited - Access over 1 million songs. Try it free. > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051125/b7bbb704/attachment.html From roy_sin at yahoo.com Fri Nov 25 17:44:50 2005 From: roy_sin at yahoo.com (Roy Sin) Date: Fri, 25 Nov 2005 14:44:50 -0800 (PST) Subject: [Wtr-general] why WinClicker works in irb but not in the rb script? Message-ID: <20051125224450.614.qmail@web52915.mail.yahoo.com> Hi list I launched my web application with an instance of IE through irb. Browse to where I needed to delete an asset, the javascript confirmation popup shows up on the screen, I then enter w = WinClicker.new handle = w.getWindowHandle("Microsoft Internet Explorer") w.makeWindowActive(handle) w.clickWindowsButton_hwnd(handle,"OK") line by line in irb and it closes the popup. But when I have the it in my script as ... $ie.frame("cpmain").image(:src, /del.gif/).click w = WinClicker.new handle = w.getWindowHandle("Microsoft Internet Explorer") w.makeWindowActive(handle) w.clickWindowsButton_hwnd(handle,"OK") somehow it doesn't work. Any idea or suggestion! thanks __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com From bret at pettichord.com Fri Nov 25 18:27:11 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 25 Nov 2005 17:27:11 -0600 Subject: [Wtr-general] How to check maxlength validation for a textfield using watir? In-Reply-To: <20051124121201.28609.qmail@web8311.mail.in.yahoo.com> Message-ID: <5.1.0.14.2.20051125172641.037b88c8@pop.gmail.com> At 06:12 AM 11/24/2005, chaya shetty wrote: > I want to write a test case to check maxlength validation for a text > field. use ie.text_field(:name, 'foo').maxLength _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Fri Nov 25 18:34:45 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 25 Nov 2005 17:34:45 -0600 Subject: [Wtr-general] Clicking a link in a sidebar menu which is in a table within a frame In-Reply-To: <20051121181124.10924.qmail@web52906.mail.yahoo.com> References: <5.1.0.14.2.20051120024627.03dc3cc8@pop.gmail.com> Message-ID: <5.1.0.14.2.20051125173039.037bc368@pop.gmail.com> I guess we didn't add the cell method to tables until after 1.4.2. You might want to take a look at the code in HEAD. Using 1.4.2, i think this should work: ie.table(:index, ?).row(:index, 3).cell(:index, 1).click Index is what you have to have to use when objects don't have any usable attributes. Bret At 12:11 PM 11/21/2005, Roy Sin wrote: >Hi Bret, > >I tried your suggestion and I'm getting a > >NoMethodError:undefined method 'cell' for ># > >I tried index 1 to 10 for the table, but i get the same >method error. I noticed that the main table for the side >bar has no index, is there another attribute that I can use >to identify that table ? > > >thanks > >--- Bret Pettichord wrote: > > > ie.table(:index, ?).cell(:id, 'servtypes').click > > > > At 01:58 PM 11/18/2005, Roy Sin wrote: > > >Hi WtrList > > >I have four links in a side bar menu within a table as > > >shown below. How do I click on the "Service Types" which > > is > > >the third link? thanks. > > > > > > > > > > > > > cellspacing=2> > > > > > > > > > > > > > > > > > >
> >onMouseOver="movein('servstatus', 'admin_nav')" > > >onMouseOut="moveout('servstatus', 'admin_text')" > > >id="servstatus">Service Status
> >onMouseOver="movein('maintsched', 'admin_nav')" > > >onMouseOut="moveout('maintsched', 'admin_text')" > > >id="maintsched">Maintenance
Schedules
> >onMouseOver="movein('servtypes', 'admin_nav')" > > >onMouseOut="moveout('servtypes', 'admin_text')" > > >id="servtypes">Service Types
> >onMouseOver="movein('servlog', 'admin_nav')" > > >onMouseOut="moveout('servlog', 'admin_text')" > > >id="servlog">Service Log
> > > > > > > > > > > > > > > > > > > > >__________________________________ > > >Yahoo! Mail - PC Magazine Editors' Choice 2005 > > >http://mail.yahoo.com > > >_______________________________________________ > > >Wtr-general mailing list > > >Wtr-general at rubyforge.org > > >http://rubyforge.org/mailman/listinfo/wtr-general > > > > _____________________ > > Bret Pettichord > > www.pettichord.com > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > >__________________________________ >Yahoo! Mail - PC Magazine Editors' Choice 2005 >http://mail.yahoo.com >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From roy_sin at yahoo.com Fri Nov 25 19:19:39 2005 From: roy_sin at yahoo.com (Roy Sin) Date: Fri, 25 Nov 2005 16:19:39 -0800 (PST) Subject: [Wtr-general] Clicking a link in a sidebar menu which is in a table within a frame In-Reply-To: <5.1.0.14.2.20051125173039.037bc368@pop.gmail.com> Message-ID: <20051126001939.11200.qmail@web52910.mail.yahoo.com> Hi Bret, Thanks for the reply. I got it to work now with table=$ie.frame('cpmain').table(:index, 2) table[3][1].click I have to use index 2 because the side nav menu was in a table within a bigger table. Works great. thanks Roy. --- Bret Pettichord wrote: > I guess we didn't add the cell method to tables until > after 1.4.2. You > might want to take a look at the code in HEAD. > > Using 1.4.2, i think this should work: > ie.table(:index, ?).row(:index, 3).cell(:index, > 1).click > > Index is what you have to have to use when objects don't > have any usable > attributes. > > Bret > > At 12:11 PM 11/21/2005, Roy Sin wrote: > >Hi Bret, > > > >I tried your suggestion and I'm getting a > > > >NoMethodError:undefined method 'cell' for > ># > > > >I tried index 1 to 10 for the table, but i get the same > >method error. I noticed that the main table for the side > >bar has no index, is there another attribute that I can > use > >to identify that table ? > > > > > >thanks > > > >--- Bret Pettichord wrote: > > > > > ie.table(:index, ?).cell(:id, 'servtypes').click > > > > > > At 01:58 PM 11/18/2005, Roy Sin wrote: > > > >Hi WtrList > > > >I have four links in a side bar menu within a table > as > > > >shown below. How do I click on the "Service Types" > which > > > is > > > >the third link? thanks. > > > > > > > > > > > > > > > > > > cellspacing=2> > > > > > > > > > > > > > > > > > > > > > > > >
> > >onMouseOver="movein('servstatus', 'admin_nav')" > > > >onMouseOut="moveout('servstatus', 'admin_text')" > > > >id="servstatus">Service Status
> > >onMouseOver="movein('maintsched', 'admin_nav')" > > > >onMouseOut="moveout('maintsched', 'admin_text')" > > > >id="maintsched">Maintenance
Schedules
> > >onMouseOver="movein('servtypes', 'admin_nav')" > > > >onMouseOut="moveout('servtypes', 'admin_text')" > > > >id="servtypes">Service Types
> > >onMouseOver="movein('servlog', 'admin_nav')" > > > >onMouseOut="moveout('servlog', 'admin_text')" > > > >id="servlog">Service Log
> > > > > > > > > > > > > > > > > > > > > > > > > > > >__________________________________ > > > >Yahoo! Mail - PC Magazine Editors' Choice 2005 > > > >http://mail.yahoo.com > > > >_______________________________________________ > > > >Wtr-general mailing list > > > >Wtr-general at rubyforge.org > > > >http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > _____________________ > > > Bret Pettichord > > > www.pettichord.com > > > > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > > >__________________________________ > >Yahoo! Mail - PC Magazine Editors' Choice 2005 > >http://mail.yahoo.com > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/ From sy1234 at gmail.com Sun Nov 27 00:15:47 2005 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 27 Nov 2005 00:15:47 -0500 Subject: [Wtr-general] [ANN] The new Watir wiki: http://watir.net Message-ID: <1e55af990511262115m4b9bf7fdv7d1f26f6fb0c932e@mail.gmail.com> For the next week or so, I'll be migrating the existing wiki into a MediaWiki installation at watir.net During that time, I ask that editing be reined in until the new wiki is ready. Editing at the new site during this volatile time is welcome, but don't be offended if it gets shuffled around. =) ---- ---- I've been doing my Watir scriptly mostly through dumb luck and the jurry-rigging of example code. How many others are following this same pattern? I tend to get an idea in my head.. play around with it based on the limited set of commands that I know, get frustrated and go looking for examples, bend other peoples code to my use, break things horribly.. try (and fail) to understand the various error messages, often getting frustrated at having to test and re-test. Some of the things that I'm doing to help myself: * Keep good notes and examples handy, so I can remember commands. * Keep all sorts of notes and code resources handy, so that I know where to turn when I want to steal some good code. * Try to pay attention to "good coding practices", even though many don't make sense right now. Write things dwn. * Try to remember what error messages are trying to convey, to make debugging time less stressful. * Learn to use irb, which I very strongly despise. It feels embarassingly amateurish to me. * Find and use an editor which can tell me what line number things break on, and hopefully why. * Get more comfortable with help resources.. technical docs and such. Write examples whenever I can, since technical docs are utterly worthless for communicating to regular folk.. they have no examples and are vague at best. I've been trying and trying to get more Ruby and Watir experience, and to that end I've been more directly tackling the above ideas. One of the ways I'll be doing that, and hopefully helping out a lot of other struggling watir-ists is through the new Watir wiki: http://watir.net My goals for the watir wiki: In a week or two: * Absorb the existing wiki's content. * Absorb the original wiki's content. Next: * A revised tutorial -- I wrote bunches of notes while learning Watir, and those will find a home in an easily-digested tutorial. * A user-contributed snippets database. * A user-contributed resource page. Absorb my own notes from http://jrandomhacker.info/Watir etc. Longer-term goals: * Absorb and annotate the Watir test cases. Everyone keeps referring to these as the examples to do all the various Watir functions. That's great, except the only feedback I've heard on them is that they're completely inaccessible to new people because they're not carved up into well-commented bites. * Coding style -- absorbed into the easily-digested tutorials will be coding style notes that describe why one choice was made over another. For example, why "rescue" is and isn't a good idea in various circumstances. (I still don't fully understand this one) http://watir.net From sy1234 at gmail.com Sun Nov 27 02:13:34 2005 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 27 Nov 2005 02:13:34 -0500 Subject: [Wtr-general] [ANN] The new Watir wiki: http://watir.net In-Reply-To: <1e55af990511262115m4b9bf7fdv7d1f26f6fb0c932e@mail.gmail.com> References: <1e55af990511262115m4b9bf7fdv7d1f26f6fb0c932e@mail.gmail.com> Message-ID: <1e55af990511262313n5ce9a5denc2251501fea5c8bc@mail.gmail.com> Well that wasn't much of a challenge. The entire wiki [1] has now been ported over. I'll move on to the original wiki [2] next. [1] http://wtr.rubyforge.org/wiki/wiki.pl [2] http://www.clabs.org/wtr/index.cgi?page=/WaTiR From paul.rogers at shaw.ca Sun Nov 27 22:38:43 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sun, 27 Nov 2005 20:38:43 -0700 Subject: [Wtr-general] [ANN] The new Watir wiki: http://watir.net Message-ID: <82c7c882d20e.82d20e82c7c8@shaw.ca> let me know when you are happy with it and i'll try and figure out how to pioint watir.com at it The main page has a black block with blue and some other colored text that is very difficult to read Paul ----- Original Message ----- From: Sy Ali Date: Sunday, November 27, 2005 0:13 am Subject: Re: [Wtr-general] [ANN] The new Watir wiki: http://watir.net > Well that wasn't much of a challenge. The entire wiki [1] has now > been ported over. I'll move on to the original wiki [2] next. > > [1] http://wtr.rubyforge.org/wiki/wiki.pl > [2] http://www.clabs.org/wtr/index.cgi?page=/WaTiR > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From jkohl at telusplanet.net Sun Nov 27 23:57:28 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Sun, 27 Nov 2005 21:57:28 -0700 Subject: [Wtr-general] [ANN] The new Watir wiki: http://watir.net In-Reply-To: <82c7c882d20e.82d20e82c7c8@shaw.ca> Message-ID: <000101c5f3d8$3b76e3e0$6500a8c0@tintin> > The main page has a black block with blue and some other > colored text that is very difficult to read That's this tag: td bgcolor="#eee" It is showing up nicely in FireFox, but in IE it is dark which obscures the text. -Jonathan From hrishij at synechron.com Mon Nov 28 00:27:35 2005 From: hrishij at synechron.com (Hrishikesh Jamadagni) Date: Mon, 28 Nov 2005 10:57:35 +0530 Subject: [Wtr-general] Data parameterization Message-ID: <000201c5f3dc$71c185f0$74021f0a@fusionpune.local> Hi Can we parameterize data using watir ? want information on the file formats from which watir can access data , Can we obtain a set of data from a excel sheet and fill forms using watir? Regards hrishi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051128/3583326a/attachment.html From bret at pettichord.com Mon Nov 28 00:26:48 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sun, 27 Nov 2005 23:26:48 -0600 Subject: [Wtr-general] [ANN] The new Watir wiki: http://watir.net In-Reply-To: <82c7c882d20e.82d20e82c7c8@shaw.ca> Message-ID: <5.1.0.14.2.20051127232505.037e69f8@pop.gmail.com> At 09:38 PM 11/27/2005, Paul Rogers wrote: >let me know when you are happy with it and i'll try and figure out how to >pioint watir.com at it Currently watir.com points to wtr.rubyforge.com, not the wiki. Which do you think is a better first stop for people who are new to watir? Do we want the Welcome page to the wiki look more like wtr.rubyforge.com? Bret _____________________ Bret Pettichord www.pettichord.com From jeff.darklight at gmail.com Mon Nov 28 00:31:49 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Sun, 27 Nov 2005 21:31:49 -0800 Subject: [Wtr-general] Data parameterization In-Reply-To: <000201c5f3dc$71c185f0$74021f0a@fusionpune.local> References: <000201c5f3dc$71c185f0$74021f0a@fusionpune.local> Message-ID: WATiR is simply a library for Ruby ( the programming language ). You have the full expressive power of the Ruby programming language at your disposal. Database connectivity, Win32OLE direct COM automation, text files, whatever you want ... it's all there either as part of the core distribution or as a readily available third-party add-on. Since you mention Excel specifically, yes there are a number of projects to provide access to excel spreadsheet data. j. On 11/27/05, Hrishikesh Jamadagni wrote: > > Hi > > > > Can we parameterize data using watir ? want information on the file > formats from which watir can access data , > > > > Can we obtain a set of data from a excel sheet and fill forms using watir? > > > > Regards > > hrishi > > > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051127/3f2e9210/attachment.html From jeff.darklight at gmail.com Mon Nov 28 00:32:16 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Sun, 27 Nov 2005 21:32:16 -0800 Subject: [Wtr-general] Data parameterization In-Reply-To: References: <000201c5f3dc$71c185f0$74021f0a@fusionpune.local> Message-ID: I believe the WET extensions for WATiR have Excel support integrated. j. On 11/27/05, Jeff Wood wrote: > > WATiR is simply a library for Ruby ( the programming language ). You have > the full expressive power of the Ruby programming language at your disposal. > > Database connectivity, Win32OLE direct COM automation, text files, > whatever you want ... it's all there either as part of the core distribution > or as a readily available third-party add-on. > > Since you mention Excel specifically, yes there are a number of projects > to provide access to excel spreadsheet data. > > j. > > On 11/27/05, Hrishikesh Jamadagni wrote: > > > Hi > > > > > > > > Can we parameterize data using watir ? want information on the file > > formats from which watir can access data , > > > > > > > > Can we obtain a set of data from a excel sheet and fill forms using > > watir? > > > > > > > > Regards > > > > hrishi > > > > > > > > > > > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > -- > "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" > > Jeff Wood -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051127/8e38f83c/attachment.html From satti at qantom.com Mon Nov 28 00:37:01 2005 From: satti at qantom.com (Sathya Shankar) Date: Mon, 28 Nov 2005 11:07:01 +0530 Subject: [Wtr-general] Data parameterization In-Reply-To: <000201c5f3dc$71c185f0$74021f0a@fusionpune.local> References: <000201c5f3dc$71c185f0$74021f0a@fusionpune.local> Message-ID: <438A977D.7050506@qantom.com> watir can obtain data from excel sheet as well as the xml format.... Itz good to take the datas from the excel for the parameterization. The current version of WET supports the parameterization and excel. If you want to use the xml to access the data, then use REXML. This can be found in http://www.germane-software.com/software/rexml/docs/tutorial.html Sathya Shankar Hrishikesh Jamadagni wrote: > Hi > > > > Can we parameterize data using watir ? want information on the file > formats from which watir can access data , > > > > Can we obtain a set of data from a excel sheet and fill forms using watir? > > > > Regards > > hrishi > > > > > > > >------------------------------------------------------------------------ > >_______________________________________________ >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 sy1234 at gmail.com Mon Nov 28 01:03:57 2005 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 28 Nov 2005 01:03:57 -0500 Subject: [Wtr-general] [ANN] The new Watir wiki: http://watir.net In-Reply-To: <000101c5f3d8$3b76e3e0$6500a8c0@tintin> References: <82c7c882d20e.82d20e82c7c8@shaw.ca> <000101c5f3d8$3b76e3e0$6500a8c0@tintin> Message-ID: <1e55af990511272203jb106582uedcd98960c71342e@mail.gmail.com> On 11/27/05, Jonathan Kohl wrote: > > > The main page has a black block with blue and some other > > colored text that is very difficult to read > That's this tag: > td bgcolor="#eee" > It is showing up nicely in FireFox, but in IE it is dark which obscures the > text. I was going for a light grey, like the watir.com intro. I changed it to #eeeeee, but I don't know if that'll make a difference. "lightgrey" wasn't light enough for me.. From sy1234 at gmail.com Mon Nov 28 01:07:30 2005 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 28 Nov 2005 01:07:30 -0500 Subject: [Wtr-general] [ANN] The new Watir wiki: http://watir.net In-Reply-To: <5.1.0.14.2.20051127232505.037e69f8@pop.gmail.com> References: <82c7c882d20e.82d20e82c7c8@shaw.ca> <5.1.0.14.2.20051127232505.037e69f8@pop.gmail.com> Message-ID: <1e55af990511272207o79b11a8l68b02938b757ff1d@mail.gmail.com> On 11/28/05, Bret Pettichord wrote: > At 09:38 PM 11/27/2005, Paul Rogers wrote: > >let me know when you are happy with it and i'll try and figure out how to > >pioint watir.com at it > > Currently watir.com points to wtr.rubyforge.com, not the wiki. > > Which do you think is a better first stop for people who are new to watir? > > Do we want the Welcome page to the wiki look more like wtr.rubyforge.com? The wiki could be set up as http://wiki.watir.com if you wanted. Because watir.com has been picked up, there isn't a pressing reason to keep watir.net distinct. I like the idea of migrating the static website docs into the wiki and protecting them against public editing, but that's because I see a wiki as a CMS that obsoletes old fashioned websites. There's no problem with mirrorring what's in the website into the wiki.. making it look like the main website etc. Btw, I edited the watir logo for transparency and snuck it into the wiki. =) From Malcolm.Beaton at conchango.com Mon Nov 28 04:26:38 2005 From: Malcolm.Beaton at conchango.com (Beaton, Malcolm) Date: Mon, 28 Nov 2005 09:26:38 -0000 Subject: [Wtr-general] How to call a script from a running script Message-ID: Thanks Jeff Works a treat Mal _____________________________________________________________________ This e-mail has been scanned for viruses by MessageLabs. The information contained in this message is confidential and is intended for the addressee only. If you have received this message in error, please notify Conchango plc as soon as possible. The unauthorised use, disclosure, copying or alteration of this message is prohibited and may be unlawful. The internet cannot guarantee the integrity of this message and therefore Conchango plc will not be liable for the message if modified. Reg. Heritage House, Church Road, Egham, Surrey, TW20 9QD T 44 (0) 1784 222 222 F 44 (0) 1784 222 200 E talktous at conchango.com No. 2598884 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051128/bb27d0d5/attachment.html From angrez at gmail.com Mon Nov 28 06:47:45 2005 From: angrez at gmail.com (Angrez Singh) Date: Mon, 28 Nov 2005 17:17:45 +0530 Subject: [Wtr-general] How to enter text in textarea with style="display:none" Message-ID: Hi, While using watir to compose a mail(Yahoo mail), I came across a text area with style set to display:none: According to CSS tutorials at w3schools: http://www.w3schools.com/css/pr_class_display.asp The value none means that element will not be displayed. But the element is visible in the browser and when I try to enter text in to it following exception comes: d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3849:in `method_missing': focus (WIN32OLERuntimeError) OLE error code:800A083E in htmlfile Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus. HRESULT error code:0x80020009 Exception occurred. from d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3849:in `set' Now how to enter value in such a textarea? Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051128/bc295559/attachment.html From satti at qantom.com Mon Nov 28 07:26:06 2005 From: satti at qantom.com (Sathya Shankar) Date: Mon, 28 Nov 2005 17:56:06 +0530 Subject: [Wtr-general] How to enter text in textarea with style="display:none" In-Reply-To: References: Message-ID: <438AF75E.7000902@qantom.com> If style="display:none" is set in the html it means that it'll not be shown in the browser. then a) either you have found a bug in IE or b) You have one more text area with the same name & id which is visible. so just scroll down and then check if there is another textarea with the same name and id which is visible. Sathya Shankar Angrez Singh wrote: > Hi, > > While using watir to compose a mail(Yahoo mail), I came across a text > area with style set to display:none: > > > > According to CSS tutorials at w3schools: > > http://www.w3schools.com/css/pr_class_display.asp > > The value none means that element will not be displayed. But the > element is visible in the browser and when I try to enter text in to > it following exception comes: > >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3849:in `method_missing': focus >(WIN32OLERuntimeError) > > OLE error code:800A083E in htmlfile > > Can't move focus to the control because it is invisible, not enabled, > >or of a type that does not accept the focus. > > HRESULT error code:0x80020009 > > Exception occurred. from >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3849:in `set' > >Now how to enter value in such a textarea? > > >Regards, >Angrez > > > > > > >------------------------------------------------------------------------ > >_______________________________________________ >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 zeljko.filipin at gmail.com Mon Nov 28 07:51:46 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Mon, 28 Nov 2005 13:51:46 +0100 Subject: [Wtr-general] How to enter text in textareawith style="display:none" In-Reply-To: <438AF75E.7000902@qantom.com> Message-ID: <002301c5f41a$7e246a90$c6e7fea9@officezg.wa> I use Firefox (http://www.mozilla.org/products/firefox/) with Web Developer extension (https://addons.mozilla.org/extensions/moreinfo.php?id=60). Open page, select text/items of your choice, right click your mouse and select View Selection Source from menu. Only source of selected text/items will be shown. Quick and easy. :) Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sathya Shankar Sent: Monday, November 28, 2005 1:26 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How to enter text in textareawith style="display:none" If style="display:none" is set in the html it means that it'll not be shown in the browser. then a) either you have found a bug in IE or b) You have one more text area with the same name & id which is visible. so just scroll down and then check if there is another textarea with the same name and id which is visible. Sathya Shankar Angrez Singh wrote: > Hi, > > While using watir to compose a mail(Yahoo mail), I came across a text > area with style set to display:none: > > > > According to CSS tutorials at w3schools: > > http://www.w3schools.com/css/pr_class_display.asp > > The value none means that element will not be displayed. But the > element is visible in the browser and when I try to enter text in to > it following exception comes: > >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3849:in `method_missing': focus >(WIN32OLERuntimeError) > > OLE error code:800A083E in htmlfile > > Can't move focus to the control because it is invisible, not enabled, > >or of a type that does not accept the focus. > > HRESULT error code:0x80020009 > > Exception occurred. from >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3849:in `set' > >Now how to enter value in such a textarea? > > >Regards, >Angrez > > > > > > >------------------------------------------------------------------------ > >_______________________________________________ >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 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From angrez at gmail.com Mon Nov 28 08:05:07 2005 From: angrez at gmail.com (Angrez Singh) Date: Mon, 28 Nov 2005 18:35:07 +0530 Subject: [Wtr-general] How to enter text in textarea with style="display:none" In-Reply-To: <438AF75E.7000902@qantom.com> References: <438AF75E.7000902@qantom.com> Message-ID: > > a) either you have found a bug in IE or may be or may be not because I am seeing that element on Firefox too. b) You have one more text area with the same name & id which is visible. > so just scroll down and then check if there is another textarea with the > same name and id which is visible. there is no element on the page with the same id and name regards, angrez Sathya Shankar > > Angrez Singh wrote: > > > Hi, > > > > While using watir to compose a mail(Yahoo mail), I came across a text > > area with style set to display:none: > > > > > > > > According to CSS tutorials at w3schools: > > > > http://www.w3schools.com/css/pr_class_display.asp > > > > The value none means that element will not be displayed. But the > > element is visible in the browser and when I try to enter text in to > > it following exception comes: > > > >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3849:in `method_missing': focus > >(WIN32OLERuntimeError) > > > > OLE error code:800A083E in htmlfile > > > > Can't move focus to the control because it is invisible, not > enabled, > > > >or of a type that does not accept the focus. > > > > HRESULT error code:0x80020009 > > > > Exception occurred. from > >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3849:in `set' > > > >Now how to enter value in such a textarea? > > > > > >Regards, > >Angrez > > > > > > > > > > > > > >------------------------------------------------------------------------ > > > >_______________________________________________ > >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 > > > _______________________________________________ > 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/20051128/cf07f2e8/attachment.html From satti at qantom.com Mon Nov 28 08:16:14 2005 From: satti at qantom.com (Sathya Shankar) Date: Mon, 28 Nov 2005 18:46:14 +0530 Subject: [Wtr-general] How to enter text in textarea with style="display:none" In-Reply-To: References: <438AF75E.7000902@qantom.com> Message-ID: <438B031E.50101@qantom.com> Can you send me complete source file... Sathya Shankar Angrez Singh wrote: > a) either you have found a bug in IE or > > > may be or may be not because I am seeing that element on Firefox too. > > b) You have one more text area with the same name & id which is > visible. > so just scroll down and then check if there is another textarea > with the > same name and id which is visible. > > > there is no element on the page with the same id and name > > regards, > angrez > > Sathya Shankar > > Angrez Singh wrote: > > > Hi, > > > > While using watir to compose a mail(Yahoo mail), I came across a > text > > area with style set to display:none: > > > > > > > > According to CSS tutorials at w3schools: > > > > http://www.w3schools.com/css/pr_class_display.asp > > > > The value none means that element will not be displayed. But the > > element is visible in the browser and when I try to enter text > in to > > it following exception comes: > > > >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3849:in `method_missing': > focus > >(WIN32OLERuntimeError) > > > > OLE error code:800A083E in htmlfile > > > > Can't move focus to the control because it is invisible, > not enabled, > > > >or of a type that does not accept the focus. > > > > HRESULT error code:0x80020009 > > > > Exception occurred. from > >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3849:in `set' > > > >Now how to enter value in such a textarea? > > > > > >Regards, > >Angrez > -- Sathya Shankar M G Software Testing Engineer Qantom Software http://www.qantom.com Ph : 26799269 Xtn. 123 sip : satti at sip411.com From satti at qantom.com Mon Nov 28 08:34:26 2005 From: satti at qantom.com (Sathya Shankar) Date: Mon, 28 Nov 2005 19:04:26 +0530 Subject: [Wtr-general] How to enter text in textarea with style="display:none" In-Reply-To: <438B031E.50101@qantom.com> References: <438AF75E.7000902@qantom.com> <438B031E.50101@qantom.com> Message-ID: <438B0762.6070703@qantom.com> I mean the HTML view source.... Sathya Shankar wrote: > Can you send me complete source file... > > Sathya Shankar > Angrez Singh wrote: > >> a) either you have found a bug in IE or >> >> >> may be or may be not because I am seeing that element on Firefox too. >> >> b) You have one more text area with the same name & id which is >> visible. >> so just scroll down and then check if there is another textarea >> with the >> same name and id which is visible. >> >> >> there is no element on the page with the same id and name >> >> regards, >> angrez >> >> Sathya Shankar >> >> Angrez Singh wrote: >> >> > Hi, >> > >> > While using watir to compose a mail(Yahoo mail), I came across a >> text >> > area with style set to display:none: >> > >> > >> > >> > According to CSS tutorials at w3schools: >> > >> > http://www.w3schools.com/css/pr_class_display.asp >> > >> > The value none means that element will not be displayed. But the >> > element is visible in the browser and when I try to enter text >> in to >> > it following exception comes: >> > >> >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3849:in `method_missing': >> focus >> >(WIN32OLERuntimeError) >> > >> > OLE error code:800A083E in htmlfile >> > >> > Can't move focus to the control because it is invisible, >> not enabled, >> > >> >or of a type that does not accept the focus. >> > >> > HRESULT error code:0x80020009 >> > >> > Exception occurred. from >> >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3849:in `set' >> > >> >Now how to enter value in such a textarea? >> > >> > >> >Regards, >> >Angrez >> > > -- Sathya Shankar M G Software Testing Engineer Qantom Software http://www.qantom.com Ph : 26799269 Xtn. 123 sip : satti at sip411.com From jeff.darklight at gmail.com Mon Nov 28 12:55:12 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 28 Nov 2005 09:55:12 -0800 Subject: [Wtr-general] How to enter text in textarea with style="display:none" In-Reply-To: <438B0762.6070703@qantom.com> References: <438AF75E.7000902@qantom.com> <438B031E.50101@qantom.com> <438B0762.6070703@qantom.com> Message-ID: Try using .value= instead of .set ... .set emulates a user, where .value pushs the value straight through COM. j. On 11/28/05, Sathya Shankar wrote: > > I mean the HTML view source.... > > Sathya Shankar wrote: > > > Can you send me complete source file... > > > > Sathya Shankar > > Angrez Singh wrote: > > > >> a) either you have found a bug in IE or > >> > >> > >> may be or may be not because I am seeing that element on Firefox too. > >> > >> b) You have one more text area with the same name & id which is > >> visible. > >> so just scroll down and then check if there is another textarea > >> with the > >> same name and id which is visible. > >> > >> > >> there is no element on the page with the same id and name > >> > >> regards, > >> angrez > >> > >> Sathya Shankar > >> > >> Angrez Singh wrote: > >> > >> > Hi, > >> > > >> > While using watir to compose a mail(Yahoo mail), I came across a > >> text > >> > area with style set to display:none: > >> > > >> > > >> > > >> > According to CSS tutorials at w3schools: > >> > > >> > http://www.w3schools.com/css/pr_class_display.asp > >> > > >> > The value none means that element will not be displayed. But the > >> > element is visible in the browser and when I try to enter text > >> in to > >> > it following exception comes: > >> > > >> >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3849:in `method_missing': > >> focus > >> >(WIN32OLERuntimeError) > >> > > >> > OLE error code:800A083E in htmlfile > >> > > >> > Can't move focus to the control because it is invisible, > >> not enabled, > >> > > >> >or of a type that does not accept the focus. > >> > > >> > HRESULT error code:0x80020009 > >> > > >> > Exception occurred. from > >> >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3849:in `set' > >> > > >> >Now how to enter value in such a textarea? > >> > > >> > > >> >Regards, > >> >Angrez > >> > > > > > > > -- > Sathya Shankar M G > Software Testing Engineer > Qantom Software > http://www.qantom.com > Ph : 26799269 Xtn. 123 > sip : satti at sip411.com > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051128/31ec4b69/attachment.html From jeff.darklight at gmail.com Mon Nov 28 13:02:02 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 28 Nov 2005 10:02:02 -0800 Subject: [Wtr-general] [ANN] The new Watir wiki: http://watir.net In-Reply-To: <1e55af990511272207o79b11a8l68b02938b757ff1d@mail.gmail.com> References: <82c7c882d20e.82d20e82c7c8@shaw.ca> <5.1.0.14.2.20051127232505.037e69f8@pop.gmail.com> <1e55af990511272207o79b11a8l68b02938b757ff1d@mail.gmail.com> Message-ID: I think the WIKI should be the ENTIRE site ... minus, of course, the issue trackers & download managers which should stay @ rubyforge ... ( until there is a good plugin to replace them in the wiki ). Good job folks... Other than wishing that we are/were using a Ruby Wiki solution ... It looks good. j. On 11/27/05, Sy Ali wrote: > > On 11/28/05, Bret Pettichord wrote: > > At 09:38 PM 11/27/2005, Paul Rogers wrote: > > >let me know when you are happy with it and i'll try and figure out how > to > > >pioint watir.com at it > > > > Currently watir.com points to wtr.rubyforge.com, not the wiki. > > > > Which do you think is a better first stop for people who are new to > watir? > > > > Do we want the Welcome page to the wiki look more like wtr.rubyforge.com > ? > > The wiki could be set up as http://wiki.watir.com if you wanted. > Because watir.com has been picked up, there isn't a pressing reason to > keep watir.net distinct. > > I like the idea of migrating the static website docs into the wiki and > protecting them against public editing, but that's because I see a > wiki as a CMS that obsoletes old fashioned websites. There's no > problem with mirrorring what's in the website into the wiki.. making > it look like the main website etc. > > Btw, I edited the watir logo for transparency and snuck it into the > wiki. =) > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051128/3ecc2b8d/attachment.html From Mark_Cain at rl.gov Mon Nov 28 13:59:51 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Mon, 28 Nov 2005 10:59:51 -0800 Subject: [Wtr-general] Support of Watir for Mozilla/Opera/Netscape Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D47E@EX5V.rl.gov> Appears that the WET site is down or not working. --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Raghu Venkataramana Sent: Thursday, November 24, 2005 5:57 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Support of Watir for Mozilla/Opera/Netscape Vishal Chavan wrote: > Hi, > > I had seen a post pertaining to my query some time back. The > resolution was moving to WET. I have no clue what WET is? > WET is an add-on to watir. It is available at wet.qantom.org > Here is the scenario: I took initiative to automate some test cases of > my application using Watir. I demonstrated the same to my superiors > who asked me abt. its compatability with Opera/Netscape & Mozilla. I > had budgeted sometime from them for the reply. > > My question is: can I configure the scripts as to reuse the script to > run on target browser (viz. Opera/Netscape/Mozilla). > > If there is a planned support for this browsers? > As of now, there is no support for the above browsers. However some folks are working on adding support for Mozilla and we hope that one day Watir will have support for more browsers. > Please advice the same so that I can use Watir for automating > applications in my company. > > Thanks, > > Vishal > > > > ------------------------------------------------------------------------ > Join SQAtester.com Community ---> > http://www.sqatester.com/testersarea/joinus.htm > >----------------------------------------------------------------------- - > >_______________________________________________ >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 jkohl at telusplanet.net Mon Nov 28 15:05:58 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Mon, 28 Nov 2005 12:05:58 -0800 Subject: [Wtr-general] [ANN] The new Watir wiki: http://watir.net In-Reply-To: <1e55af990511272203jb106582uedcd98960c71342e@mail.gmail.com> References: <82c7c882d20e.82d20e82c7c8@shaw.ca> <000101c5f3d8$3b76e3e0$6500a8c0@tintin> <1e55af990511272203jb106582uedcd98960c71342e@mail.gmail.com> Message-ID: <1133208358.438b63269e952@webmail.telus.net> > I was going for a light grey, like the watir.com intro. I changed it > to #eeeeee, but I don't know if that'll make a difference. > "lightgrey" wasn't light enough for me.. I've had good luck with #DFDFDF and #EFEFEF with IE (I think those are the ones off the top of my head.) -Jonathan From christopher.mcmahon at gmail.com Mon Nov 28 17:04:41 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 28 Nov 2005 16:04:41 -0600 Subject: [Wtr-general] OT: silly format question: get Ruby to ignore line ends for long lines? Message-ID: <72799cd70511281404g7259f523je0aa85d4a8e843e2@mail.gmail.com> Hi all... Is there a way to get Ruby to ignore line ends in a long text string for readabiliy purposes, for instance a long SQL query? " select * from LIB.ACCOUNTs accounts, LIB.SSNS ssns, LIB.PLANS plans where accounts.FOO_KEY = ssns.BAR_KEY and plan.BAZ_KEY = ssns.BAR_KEY and ssns.DEPCD = '' and ... ETC ETC ETC " Thanks for your patience... -Chris From Sean.Gallagher at ticketmaster.com Mon Nov 28 17:47:51 2005 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Mon, 28 Nov 2005 14:47:51 -0800 Subject: [Wtr-general] OT: silly format question: get Ruby to ignore l ine ends for long lines? Message-ID: <71D28C8451BFD5119B2B00508BE26E640B63F2E6@pasmail3.office.tmcs> What about using a "here document"? irb(main):013:0> foo=< "select *\nfrom foo\nwhere someval='bar'\n" irb(main):018:0> print(foo) select * from foo where someval='bar' => nil irb(main):019:0> -sean -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: Monday, November 28, 2005 2:05 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] OT: silly format question: get Ruby to ignore line ends for long lines? Hi all... Is there a way to get Ruby to ignore line ends in a long text string for readabiliy purposes, for instance a long SQL query? " select * from LIB.ACCOUNTs accounts, LIB.SSNS ssns, LIB.PLANS plans where accounts.FOO_KEY = ssns.BAR_KEY and plan.BAZ_KEY = ssns.BAR_KEY and ssns.DEPCD = '' and ... ETC ETC ETC " Thanks for your patience... -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jeff.darklight at gmail.com Mon Nov 28 18:40:46 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 28 Nov 2005 15:40:46 -0800 Subject: [Wtr-general] IFrame support Message-ID: Hmm, seems IFRAMES are woefully undersupported... I've got a page with an IFrame embedded. I seem only to be able to get to this frame by :index :id, /contentFrame/ returns "NoMethodError": undefined method 'invoke' for nil:NilClass :src doesn't appear to be a supported :how either ... Can anybody point me to some light? j. -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051128/e4ac2023/attachment.html From jeff.darklight at gmail.com Mon Nov 28 18:48:17 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 28 Nov 2005 15:48:17 -0800 Subject: [Wtr-general] OT: silly format question: get Ruby to ignore l ine ends for long lines? In-Reply-To: <71D28C8451BFD5119B2B00508BE26E640B63F2E6@pasmail3.office.tmcs> References: <71D28C8451BFD5119B2B00508BE26E640B63F2E6@pasmail3.office.tmcs> Message-ID: So, I believe people need a bit more information. Do you have a string that has extra \n's that you want to get rid of ? Or, are you trying to put a sql statement in source code with extra \n's so that it is more readable to you ??? Here's examples of both: # first fill a string with data including \n chars. sql = < wrote: > > What about using a "here document"? > > irb(main):013:0> foo=< irb(main):014:0" select * > irb(main):015:0" from foo > irb(main):016:0" where someval='bar' > irb(main):017:0" HERE > => "select *\nfrom foo\nwhere someval='bar'\n" > irb(main):018:0> print(foo) > select * > from foo > where someval='bar' > => nil > irb(main):019:0> > > > -sean Hope that helps. j. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051128/3e7d31f7/attachment.html From christopher.mcmahon at gmail.com Mon Nov 28 19:23:14 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 28 Nov 2005 18:23:14 -0600 Subject: [Wtr-general] OT: silly format question: get Ruby to ignore l ine ends for long lines? In-Reply-To: References: <71D28C8451BFD5119B2B00508BE26E640B63F2E6@pasmail3.office.tmcs> Message-ID: <72799cd70511281623t1ddc6cabr1eddb6c86a876ac8@mail.gmail.com> > Or, are you trying to put a sql statement in source code with extra \n's so > that it is more readable to you ??? That'd be the one. I think you guys got me where I need to be, thanks! -Chris From hrishij at synechron.com Mon Nov 28 05:13:46 2005 From: hrishij at synechron.com (Hrishikesh Jamadagni) Date: Mon, 28 Nov 2005 15:43:46 +0530 Subject: [Wtr-general] [ANN] The new Watir wiki: http://watir.net In-Reply-To: <1e55af990511272203jb106582uedcd98960c71342e@mail.gmail.com> Message-ID: <000001c5f404$6c7e4bf0$74021f0a@fusionpune.local> Hi Stuck in two places while automating application: 1)The date picker link , the link to click a date cannot be automated -screen-1, (The date picker is a separate pop-up java script file , when user clicks on a date, the date gets entered in the text field) 2)Buttons on the peril information window cannot be clicked / automated - screen-2 , (The buttons are html buttons on the .aspx peril information window ) screen shots for reference are attached. Pl let me know if there is fix for it. Regards hrishi -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sy Ali Sent: Monday, November 28, 2005 11:34 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] [ANN] The new Watir wiki: http://watir.net On 11/27/05, Jonathan Kohl wrote: > > > The main page has a black block with blue and some other > > colored text that is very difficult to read > That's this tag: > td bgcolor="#eee" > It is showing up nicely in FireFox, but in IE it is dark which obscures the > text. I was going for a light grey, like the watir.com intro. I changed it to #eeeeee, but I don't know if that'll make a difference. "lightgrey" wasn't light enough for me.. _______________________________________________ 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/20051128/f427432e/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: screen1.jpg Type: application/octet-stream Size: 17473 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20051128/f427432e/attachment.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: screen2.jpg Type: application/octet-stream Size: 21764 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20051128/f427432e/attachment-0001.obj From Jan.Montano at thomson.com Mon Nov 28 21:30:47 2005 From: Jan.Montano at thomson.com (Jan.Montano at thomson.com) Date: Tue, 29 Nov 2005 10:30:47 +0800 Subject: [Wtr-general] Td's and tr's within table with no name Message-ID: How could I navigate thru a series of tr's and td's within tables with no name? I want to retrieve specific values on the page. Please see attached files for a screenshot of the page and source code. <> <> -------------- next part -------------- A non-text attachment was scrubbed... Name: exchange rate.bmp Type: image/bmp Size: 252774 bytes Desc: exchange rate.bmp Url : http://rubyforge.org/pipermail/wtr-general/attachments/20051129/4eb56688/attachment.bmp -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ForeignExchange[1].txt Url: http://rubyforge.org/pipermail/wtr-general/attachments/20051129/4eb56688/attachment.txt From bret at pettichord.com Mon Nov 28 23:04:34 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 28 Nov 2005 22:04:34 -0600 Subject: [Wtr-general] IFrame support In-Reply-To: Message-ID: <5.1.0.14.2.20051128214458.031cfcd8@pop.gmail.com> We only have unit tests for accessing iframes by name and by index. The DOM accesses to frames is different in several ways from other page elements and therefore Watir has lots of special purpose code to make the Watir interface to frames look similar to that of other objects. Someone needs to sign up for generalizing the frame support to also work for iframes. Bret At 05:40 PM 11/28/2005, Jeff Wood wrote: >Hmm, seems IFRAMES are woefully undersupported... > >I've got a page with an IFrame embedded. > > >I seem only to be able to get to this frame by :index > >:id, /contentFrame/ returns "NoMethodError": undefined method 'invoke' for >nil:NilClass > >:src doesn't appear to be a supported :how either ... > >Can anybody point me to some light? > >j. > > >-- >"Remember. Understand. Believe. Yield! -> >http://ruby-lang.org" > >Jeff Wood >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From satti at qantom.com Mon Nov 28 23:37:13 2005 From: satti at qantom.com (Sathya Shankar) Date: Tue, 29 Nov 2005 10:07:13 +0530 Subject: [Wtr-general] Support of Watir for Mozilla/Opera/Netscape In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D47E@EX5V.rl.gov> References: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D47E@EX5V.rl.gov> Message-ID: <438BDAF9.6050507@qantom.com> Its up now may be an intermitant problem.... Cain, Mark wrote: >Appears that the WET site is down or not working. > >--Mark >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Raghu >Venkataramana >Sent: Thursday, November 24, 2005 5:57 AM >To: wtr-general at rubyforge.org >Subject: Re: [Wtr-general] Support of Watir for Mozilla/Opera/Netscape > >Vishal Chavan wrote: > > > >>Hi, >> >>I had seen a post pertaining to my query some time back. The >>resolution was moving to WET. I have no clue what WET is? >> >> >> >WET is an add-on to watir. It is available at wet.qantom.org > > > >>Here is the scenario: I took initiative to automate some test cases of >> >> > > > >>my application using Watir. I demonstrated the same to my superiors >>who asked me abt. its compatability with Opera/Netscape & Mozilla. I >>had budgeted sometime from them for the reply. >> >>My question is: can I configure the scripts as to reuse the script to >>run on target browser (viz. Opera/Netscape/Mozilla). >> >>If there is a planned support for this browsers? >> >> >> >As of now, there is no support for the above browsers. However some >folks are working on adding support for Mozilla and we hope >that one day Watir will have support for more browsers. > > > >>Please advice the same so that I can use Watir for automating >>applications in my company. >> >>Thanks, >> >>Vishal >> >> >> >> >> >> >------------------------------------------------------------------------ > > >>Join SQAtester.com Community ---> >>http://www.sqatester.com/testersarea/joinus.htm >> >>----------------------------------------------------------------------- >> >> >- > > >>_______________________________________________ >>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 Tue Nov 29 00:08:14 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Tue, 29 Nov 2005 10:38:14 +0530 Subject: [Wtr-general] Date Picker and peril information window can't be accessed [was Re: [ANN] The new Watir wiki: http://watir.net] In-Reply-To: <000001c5f404$6c7e4bf0$74021f0a@fusionpune.local> References: <000001c5f404$6c7e4bf0$74021f0a@fusionpune.local> Message-ID: <438BE23E.1090209@qantom.com> Changed the subject. It's got a better chance of getting answered. Raghu Hrishikesh Jamadagni wrote: > Hi > > Stuck in two places while automating application: > > 1)The date picker link , the link to click a date cannot be automated > ?screen-1, > > (The date picker is a separate pop-up java script file , when user > clicks on a date, the date gets entered in the text field) > > 2)Buttons on the peril information window cannot be clicked / automated ? > > screen-2 , > > (The buttons are html buttons on the .aspx peril information window ) > > screen shots for reference are attached. > > Pl let me know if there is fix for it. > > Regards > > hrishi > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sy Ali > Sent: Monday, November 28, 2005 11:34 AM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] [ANN] The new Watir wiki: http://watir.net > > On 11/27/05, Jonathan Kohl wrote: > >> > >> > The main page has a black block with blue and some other > >> > colored text that is very difficult to read > >> That's this tag: > >> td bgcolor="#eee" > >> It is showing up nicely in FireFox, but in IE it is dark which > obscures the > >> text. > > I was going for a light grey, like the watir.com intro. I changed it > > to #eeeeee, but I don't know if that'll make a difference. > > "lightgrey" wasn't light enough for me.. > > _______________________________________________ > > 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 > > -- Qantom Software http://www.qantom.com Ph : 91-80-26799269 Xtn. 125 sip : raghu at sip411.com -- From Jamuna.Nithyanandam at honeywell.com Tue Nov 29 00:29:26 2005 From: Jamuna.Nithyanandam at honeywell.com (Jamuna, Nithyanandam (IE10)) Date: Tue, 29 Nov 2005 10:59:26 +0530 Subject: [Wtr-general] How to enter text intextareawith style="display:none" Message-ID: <9F4FA7B367FAAD4E9D78594B289244FA04AD174C@IE10EV801.global.ds.honeywell.com> Great ! It is very useful -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: Monday, November 28, 2005 6:22 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How to enter text intextareawith style="display:none" I use Firefox (http://www.mozilla.org/products/firefox/) with Web Developer extension (https://addons.mozilla.org/extensions/moreinfo.php?id=60). Open page, select text/items of your choice, right click your mouse and select View Selection Source from menu. Only source of selected text/items will be shown. Quick and easy. :) Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sathya Shankar Sent: Monday, November 28, 2005 1:26 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How to enter text in textareawith style="display:none" If style="display:none" is set in the html it means that it'll not be shown in the browser. then a) either you have found a bug in IE or b) You have one more text area with the same name & id which is visible. so just scroll down and then check if there is another textarea with the same name and id which is visible. Sathya Shankar Angrez Singh wrote: > Hi, > > While using watir to compose a mail(Yahoo mail), I came across a text > area with style set to display:none: > > > > According to CSS tutorials at w3schools: > > http://www.w3schools.com/css/pr_class_display.asp > > The value none means that element will not be displayed. But the > element is visible in the browser and when I try to enter text in to > it following exception comes: > >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3849:in `method_missing': focus >(WIN32OLERuntimeError) > > OLE error code:800A083E in htmlfile > > Can't move focus to the control because it is invisible, not > enabled, > >or of a type that does not accept the focus. > > HRESULT error code:0x80020009 > > Exception occurred. from >d:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3849:in `set' > >Now how to enter value in such a textarea? > > >Regards, >Angrez > > > > > > >----------------------------------------------------------------------- >- > >_______________________________________________ >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 _______________________________________________ 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 jeff.darklight at gmail.com Tue Nov 29 00:33:22 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 28 Nov 2005 21:33:22 -0800 Subject: [Wtr-general] Patch for HEAD - Updated Frame#locate Message-ID: Ok, here's my submission for a patch to HEAD for the Frame#locate function. It solves the bug with not being able to find iframes by anything other than :index With this patch both frames and iframes are all now findable based on :index, :src, :name, or :id Let me know what you think. I haven't updated the testcases yet, but I did test it out manually ( good 'ol irb ). j. -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051128/f6dd9044/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: watir.rb.patch Type: application/octet-stream Size: 3952 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20051128/f6dd9044/attachment.obj From jeff.darklight at gmail.com Tue Nov 29 00:44:15 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 28 Nov 2005 21:44:15 -0800 Subject: [Wtr-general] [ANN] The new Watir wiki: http://watir.net In-Reply-To: <000001c5f404$6c7e4bf0$74021f0a@fusionpune.local> References: <1e55af990511272203jb106582uedcd98960c71342e@mail.gmail.com> <000001c5f404$6c7e4bf0$74021f0a@fusionpune.local> Message-ID: It can be automated, you just have to be a little more fun in how you do it. Based on your comments, both of the popping up windows are in fact just additional IE windows... You should be able to instantiate additional IE objects attaching them to these other windows... Should provide you with what you need. j. On 11/28/05, Hrishikesh Jamadagni wrote: > > > > Hi > > > > Stuck in two places while automating application: > > > > 1)The date picker link , the link to click a date cannot be automated > ?screen-1, > > > > (The date picker is a separate pop-up java script file , when user clicks > on a date, the date gets entered in the text field) > > > > 2)Buttons on the peril information window cannot be clicked / automated ? > > screen-2 , > > > > (The buttons are html buttons on the .aspx peril information window ) > > > > screen shots for reference are attached. > > > > Pl let me know if there is fix for it. > > > > Regards > > hrishi > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org] On Behalf Of Sy Ali > Sent: Monday, November 28, 2005 11:34 AM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] [ANN] The new Watir wiki: http://watir.net > > > > On 11/27/05, Jonathan Kohl wrote: > > > > > > > The main page has a black block with blue and some other > > > > colored text that is very difficult to read > > > That's this tag: > > > td bgcolor="#eee" > > > It is showing up nicely in FireFox, but in IE it is dark which obscures > the > > > text. > > > > I was going for a light grey, like the watir.com intro. I changed it > > to #eeeeee, but I don't know if that'll make a difference. > > "lightgrey" wasn't light enough for me.. > > > > _______________________________________________ > > 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 > > > > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051128/8ec93b9a/attachment.html From angrez at gmail.com Tue Nov 29 00:50:37 2005 From: angrez at gmail.com (Angrez Singh) Date: Tue, 29 Nov 2005 11:20:37 +0530 Subject: [Wtr-general] How to enter text in textarea with style="display:none" In-Reply-To: References: <438AF75E.7000902@qantom.com> <438B031E.50101@qantom.com> <438B0762.6070703@qantom.com> Message-ID: > > Try using .value= instead of .set ... .set emulates a user, where .value > pushs the value straight through COM. > j. > I tried using value= , but it doesn't work as well but now i don't get the exception -angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051129/54039c16/attachment.html From jeff.darklight at gmail.com Tue Nov 29 00:56:15 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 28 Nov 2005 21:56:15 -0800 Subject: [Wtr-general] How to enter text in textarea with style="display:none" In-Reply-To: References: <438AF75E.7000902@qantom.com> <438B031E.50101@qantom.com> <438B0762.6070703@qantom.com> Message-ID: Don't know ... without being in front of it, it gets hard to debug sometimes ... Is this page publically available for review? Wish I could be more help. j. On 11/28/05, Angrez Singh wrote: > > Try using .value= instead of .set ... .set emulates a user, where .value > > pushs the value straight through COM. > > > > j. > > > > I tried using value= , but it doesn't work as well but now i don't get > the exception > > -angrez > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051128/5abe93e5/attachment.html From jeff.darklight at gmail.com Tue Nov 29 00:57:50 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 28 Nov 2005 21:57:50 -0800 Subject: [Wtr-general] Patch for HEAD - Updated Frame#locate In-Reply-To: References: Message-ID: Sorry, put a hold on that ... seems like I found a few new issues ... j. On 11/28/05, Jeff Wood wrote: > > Ok, here's my submission for a patch to HEAD for the Frame#locate > function. > > It solves the bug with not being able to find iframes by anything other > than :index > > With this patch both frames and iframes are all now findable based on > > :index, :src, :name, or :id > > Let me know what you think. > > I haven't updated the testcases yet, but I did test it out manually ( good > 'ol irb ). > > j. > > -- > "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" > > Jeff Wood > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051128/b731f4ab/attachment.html From jeff.darklight at gmail.com Tue Nov 29 01:13:41 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 28 Nov 2005 22:13:41 -0800 Subject: [Wtr-general] Patch for HEAD - Updated Frame#locate In-Reply-To: References: Message-ID: Ok, sorry for the confusion ... I had two small little errors ... all better. and all working. Please review & comment. j. On 11/28/05, Jeff Wood wrote: > > Sorry, put a hold on that ... seems like I found a few new issues ... > > j. > > On 11/28/05, Jeff Wood wrote: > > > > Ok, here's my submission for a patch to HEAD for the Frame#locate > > function. > > > > It solves the bug with not being able to find iframes by anything other > > than :index > > > > With this patch both frames and iframes are all now findable based on > > > > :index, :src, :name, or :id > > > > Let me know what you think. > > > > I haven't updated the testcases yet, but I did test it out manually ( > > good 'ol irb ). > > > > j. > > > > -- > > "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" > > > > Jeff Wood > > > > > > -- > "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" > > Jeff Wood > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051128/278bf34d/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: watir.rb.patch Type: application/octet-stream Size: 3850 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20051128/278bf34d/attachment.obj From jeff.darklight at gmail.com Tue Nov 29 01:37:49 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 28 Nov 2005 22:37:49 -0800 Subject: [Wtr-general] ... ok, hopefully final version ... patch : watir.rb & frame_test.rb ... Frame#locate mods for full Frame & IFrame support. Message-ID: Ok, attached is my patch against HEAD that supports :name, :index, :id, & :src how attributes for both FRAME and IFRAME tags ... Also included are patches for frame_test.rb to test this additional functionality. The only use case I didn't build and/or test ( but I don't see it anywhere else either ) ... is what if a user pushes a regex for an index... If we need to cover it, I can, but I figured this is/was a good start. Review & Comments appreciated. j. -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051128/1a665657/attachment.html From jeff.darklight at gmail.com Tue Nov 29 01:38:13 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 28 Nov 2005 22:38:13 -0800 Subject: [Wtr-general] ... ok, hopefully final version ... patch : watir.rb & frame_test.rb ... Frame#locate mods for full Frame & IFrame support. In-Reply-To: References: Message-ID: On 11/28/05, Jeff Wood wrote: > > Ok, attached is my patch against HEAD that supports :name, :index, :id, & > :src how attributes for both FRAME and IFRAME tags ... > > Also included are patches for frame_test.rb to test this additional > functionality. > > The only use case I didn't build and/or test ( but I don't see it anywhere > else either ) ... is what if a user pushes a regex for an index... > > If we need to cover it, I can, but I figured this is/was a good start. > > Review & Comments appreciated. > > j. > > -- > "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" > > Jeff Wood -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051128/ecdb36d8/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: watir.patch Type: application/octet-stream Size: 7394 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20051128/ecdb36d8/attachment.obj From angrez at gmail.com Tue Nov 29 05:10:58 2005 From: angrez at gmail.com (Angrez Singh) Date: Tue, 29 Nov 2005 15:40:58 +0530 Subject: [Wtr-general] Td's and tr's within table with no name In-Reply-To: References: Message-ID: wait till next release of watir where you will find a new attribute called :xpath for accessing any element (except FRAME) using an XPath expression or you can download the tar ball from the cvs HEAD and start using this extension. -regards, angrez On 11/29/05, Jan.Montano at thomson.com wrote: > > How could I navigate thru a series of tr's and td's within tables with no > name? I want to retrieve specific values on the page. > Please see attached files for a screenshot of the page and source code. > > > > <> <> > > > _______________________________________________ > 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/20051129/86ba0b2b/attachment.html From eduardorochabr at gmail.com Tue Nov 29 07:27:37 2005 From: eduardorochabr at gmail.com (Eduardo Rocha) Date: Tue, 29 Nov 2005 10:27:37 -0200 Subject: [Wtr-general] Check database Message-ID: Hi all, I am having a hard time finding how to setup some database libraries to make some assertions on my code after driving the UI. Since I am primarly looking for general DB access, I have tried ruby-dbi with little success by now. Maybe I will try ruby-mysql, but I really want something not tied to one database. What people would suggest? From buggins at byte-force.com Tue Nov 29 07:45:00 2005 From: buggins at byte-force.com (Yury Krasavin) Date: Tue, 29 Nov 2005 15:45:00 +0300 Subject: [Wtr-general] XML Results Reports for Watir (for CruiseControl) Message-ID: <001301c5f4e2$b66adc90$5864bbd5@byteforce.yar.ru> Finaly, I have posted an example of my Ruby/Watir test integration with CruiseControl.NET here: http://blogs.byte-force.com/buggins/archive/2005/11/29/704.aspx Any comments and advices will be appreciated. Yury. From jose.papo at gmail.com Tue Nov 29 07:52:25 2005 From: jose.papo at gmail.com (Jose Papo) Date: Tue, 29 Nov 2005 09:52:25 -0300 Subject: [Wtr-general] XML Results Reports for Watir (for CruiseControl) In-Reply-To: <001301c5f4e2$b66adc90$5864bbd5@byteforce.yar.ru> References: <001301c5f4e2$b66adc90$5864bbd5@byteforce.yar.ru> Message-ID: <9adc16180511290452s3d739b32r509594df5d28df48@mail.gmail.com> Excellent article! Exactly what I looked for! Just a question: Even with the test case failure CC .NET still declared the build successful? Why? thank you! Jos? Papo On 11/29/05, Yury Krasavin wrote: > > Finaly, I have posted an example of my Ruby/Watir test integration with > CruiseControl.NET here: > http://blogs.byte-force.com/buggins/archive/2005/11/29/704.aspx > > Any comments and advices will be appreciated. > > Yury. > > _______________________________________________ > 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/20051129/63f2072a/attachment.html From jirmac2003 at yahoo.com Tue Nov 29 07:53:07 2005 From: jirmac2003 at yahoo.com (Jirka Machotka) Date: Tue, 29 Nov 2005 04:53:07 -0800 (PST) Subject: [Wtr-general] How to read data from a web page? Message-ID: <20051129125307.64701.qmail@web34001.mail.mud.yahoo.com> Hello, I'm playing around with WATIR and here is my problem: #test::unit includes require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' require 'watir' ie = Watir::IE.new ie = Watir::IE.start("http://mail.yahoo.com") test = ie.contains_text("You have") if !test ie.text_field(:name, "login").set("jirmac2003") ie.text_field(:name, "passwd").set("*********") ie.button(:value, "Sign In").click end a = ie.contains_text("You have") if !a puts "Test failed!" else puts "Test passed." end This program tries to log into my yahoo mail account, which works fine. But what can I do to read the number of my new emails? The relevant part of the html looks as follows:

Welcome, Jiri!

You have 0 unread messages:
Is there any command in WATIR that would allow me to read this info directly? Or do I need to use other libraries (e.g. DOM) to parse the content? If the latter, would it be possible to get an example how WATIR and DOM (or anything similar) are integrated? Thanks, Jirka --------------------------------- Yahoo! Music Unlimited - Access over 1 million songs. Try it free. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051129/74625dc6/attachment.html From jirmac2003 at yahoo.com Tue Nov 29 07:57:33 2005 From: jirmac2003 at yahoo.com (Jirka Machotka) Date: Tue, 29 Nov 2005 04:57:33 -0800 (PST) Subject: [Wtr-general] Remembering the read page Message-ID: <20051129125733.29864.qmail@web34010.mail.mud.yahoo.com> Hello, this is the second issue I have observed: when I run my test repeatedly, it seems that WATIR remembers the contents of the page. E.g. I login to my mail account - for the first time I need to enter my login ID/password, but for the second time I can get in with no login/pswd whatsoever. And this behaves like this [b]unless I log out[/b] (manually, or click on the log out button). It's fine by me, but it does behave differently than the browser. What am I missing here? Thanks, Jirka --------------------------------- Yahoo! Music Unlimited - Access over 1 million songs. Try it free. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051129/b7ad75f3/attachment.html From zeljko.filipin at gmail.com Tue Nov 29 08:23:46 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 29 Nov 2005 14:23:46 +0100 Subject: [Wtr-general] How to read data from a web page? In-Reply-To: <20051129125307.64701.qmail@web34001.mail.mud.yahoo.com> Message-ID: <002101c5f4e8$22021900$c6e7fea9@officezg.wa> Try this: irb(main):015:0> messages = /You have (\d)+ unread messages/.match(ie.text) => # irb(main):016:0> messages[0] => "You have 0 unread messages" (\d)+ means one or more digits. If you need only number of unread messages: irb(main):008:0> number = /(\d)+/.match(messages[0]) => # irb(main):009:0> number[0] => "10" Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jirka Machotka Sent: Tuesday, November 29, 2005 1:53 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] How to read data from a web page? Hello, I'm playing around with WATIR and here is my problem: #test::unit includes require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' require 'watir' ie = Watir::IE.new ie = Watir::IE.start("http://mail.yahoo.com") test = ie.contains_text("You have") if !test ie.text_field(:name, "login").set("jirmac2003") ie.text_field(:name, "passwd").set("*********") ie.button(:value, "Sign In").click end a = ie.contains_text("You have") if !a puts "Test failed!" else puts "Test passed." end This program tries to log into my yahoo mail account, which works fine. But what can I do to read the number of my new emails? The relevant part of the html looks as follows:

Welcome, Jiri!

You have 0 unread messages:
Is there any command in WATIR that would allow me to read this info directly? Or do I need to use other libraries (e.g. DOM) to parse the content? If the latter, would it be possible to get an example how WATIR and DOM (or anything similar) are integrated? Thanks, Jirka _____ Yahoo! Music Unlimited - Access over 1 million songs. Try it free. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051129/35c68460/attachment.html From buggins at byte-force.com Tue Nov 29 08:45:57 2005 From: buggins at byte-force.com (Yury Krasavin) Date: Tue, 29 Nov 2005 16:45:57 +0300 Subject: [Wtr-general] XML Results Reports for Watir (for CruiseControl) In-Reply-To: Message-ID: <001401c5f4eb$39ff4610$5864bbd5@byteforce.yar.ru> > Just a question: Even with the test case failure CC > .NET still declared the build successful? Why? It is not a bug of CC.Net. I made one of the tests to fail, and then run the sample CC.Net project just to take that XML and merge it. There was no real build task, so no failure was regestered. If there was a test script in a NAnt/Ant build task, it would finish with a nonzero exit code. So the task would be marked failed. I should look for a better pickture for a future. Best wishes, Yury. From christopher.mcmahon at gmail.com Tue Nov 29 09:55:25 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 29 Nov 2005 08:55:25 -0600 Subject: [Wtr-general] Check database In-Reply-To: References: Message-ID: <72799cd70511290655m16bea16xf4fddeabc4c0e2fc@mail.gmail.com> > I am having a hard time finding how to setup some database libraries > to make some assertions on my code after driving the UI. Since I am > primarly looking for general DB access, I have tried ruby-dbi with > little success by now. Maybe I will try ruby-mysql, but I really want > something not tied to one database. A quick Google shows that MySQL has an ODBC interface. I've been having good success with the odbc library included in the current Ruby Windows installation: http://www.ch-werner.de/rubyodbc/odbc.html. I assume it's available in the *NIX distro as well. In some ways, it's nicer than Perl's DBI. It might lack some features, but so far it's done everything I've needed, and with just a little practice, it's really pretty intuitive as well. -Chris From christopher.mcmahon at gmail.com Tue Nov 29 10:00:37 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 29 Nov 2005 09:00:37 -0600 Subject: [Wtr-general] XML Results Reports for Watir (for CruiseControl) In-Reply-To: <001301c5f4e2$b66adc90$5864bbd5@byteforce.yar.ru> References: <001301c5f4e2$b66adc90$5864bbd5@byteforce.yar.ru> Message-ID: <72799cd70511290700l53f865b8p8bac1caef1964108@mail.gmail.com> On 11/29/05, Yury Krasavin wrote: > Finaly, I have posted an example of my Ruby/Watir test integration with > CruiseControl.NET here: > http://blogs.byte-force.com/buggins/archive/2005/11/29/704.aspx Thanks Yury for the example (and thanks Mr. Verkhovsky for Reporter). I'll be using your example very soon. -Chris From jirmac2003 at yahoo.com Tue Nov 29 10:04:29 2005 From: jirmac2003 at yahoo.com (Jirka Machotka) Date: Tue, 29 Nov 2005 07:04:29 -0800 (PST) Subject: [Wtr-general] How to read data from a web page? In-Reply-To: <002101c5f4e8$22021900$c6e7fea9@officezg.wa> Message-ID: <20051129150430.35285.qmail@web34014.mail.mud.yahoo.com> Works fine. Thank you, Jirka Zeljko Filipin wrote: Try this: irb(main):015:0> messages = /You have (\d)+ unread messages/.match(ie.text) => # irb(main):016:0> messages[0] => "You have 0 unread messages" (\d)+ means one or more digits. If you need only number of unread messages: irb(main):008:0> number = /(\d)+/.match(messages[0]) => # irb(main):009:0> number[0] => "10" Zeljko --------------------------------- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jirka Machotka Sent: Tuesday, November 29, 2005 1:53 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] How to read data from a web page? Hello, I'm playing around with WATIR and here is my problem: #test::unit includes require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' require 'watir' ie = Watir::IE.new ie = Watir::IE.start("http://mail.yahoo.com") test = ie.contains_text("You have") if !test ie.text_field(:name, "login").set("jirmac2003") ie.text_field(:name, "passwd").set("*********") ie.button(:value, "Sign In").click end a = ie.contains_text("You have") if !a puts "Test failed!" else puts "Test passed." end This program tries to log into my yahoo mail account, which works fine. But what can I do to read the number of my new emails? The relevant part of the html looks as follows:

Welcome, Jiri!

You have 0 unread messages:
Is there any command in WATIR that would allow me to read this info directly? Or do I need to use other libraries (e.g. DOM) to parse the content? If the latter, would it be possible to get an example how WATIR and DOM (or anything similar) are integrated? Thanks, Jirka --------------------------------- Yahoo! Music Unlimited - Access over 1 million songs. Try it free. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Yahoo! Music Unlimited - Access over 1 million songs. Try it free. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051129/aca70a2f/attachment.html From eduardorochabr at gmail.com Tue Nov 29 10:50:38 2005 From: eduardorochabr at gmail.com (Eduardo Rocha) Date: Tue, 29 Nov 2005 13:50:38 -0200 Subject: [Wtr-general] Check database In-Reply-To: <72799cd70511290655m16bea16xf4fddeabc4c0e2fc@mail.gmail.com> References: <72799cd70511290655m16bea16xf4fddeabc4c0e2fc@mail.gmail.com> Message-ID: Thanks Chris, using ODBC satisfies my needs, and I can use ruby-dbi on top of ruby-odbc, so it's very nice. 2005/11/29, Chris McMahon : > > I am having a hard time finding how to setup some database libraries > > to make some assertions on my code after driving the UI. Since I am > > primarly looking for general DB access, I have tried ruby-dbi with > > little success by now. Maybe I will try ruby-mysql, but I really want > > something not tied to one database. > > A quick Google shows that MySQL has an ODBC interface. I've been > having good success with the odbc library included in the current Ruby > Windows installation: http://www.ch-werner.de/rubyodbc/odbc.html. I > assume it's available in the *NIX distro as well. > > In some ways, it's nicer than Perl's DBI. It might lack some > features, but so far it's done everything I've needed, and with just a > little practice, it's really pretty intuitive as well. > -Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From jeff.darklight at gmail.com Tue Nov 29 10:51:22 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Tue, 29 Nov 2005 07:51:22 -0800 Subject: [Wtr-general] Check database In-Reply-To: <72799cd70511290655m16bea16xf4fddeabc4c0e2fc@mail.gmail.com> References: <72799cd70511290655m16bea16xf4fddeabc4c0e2fc@mail.gmail.com> Message-ID: Also, the sqlite &| sqlite3 modules are quite easy to install for windows. Also, I've used Og ( part of the Nitro project ) since it has a pure-ruby driver for Mysql and Mysql for windows ... also works well. And, there is ALSO postgres-pr ( another pure ruby database interface library ) for interacting with PostgreSQL databases. j. On 11/29/05, Chris McMahon wrote: > > > I am having a hard time finding how to setup some database libraries > > to make some assertions on my code after driving the UI. Since I am > > primarly looking for general DB access, I have tried ruby-dbi with > > little success by now. Maybe I will try ruby-mysql, but I really want > > something not tied to one database. > > A quick Google shows that MySQL has an ODBC interface. I've been > having good success with the odbc library included in the current Ruby > Windows installation: http://www.ch-werner.de/rubyodbc/odbc.html. I > assume it's available in the *NIX distro as well. > > In some ways, it's nicer than Perl's DBI. It might lack some > features, but so far it's done everything I've needed, and with just a > little practice, it's really pretty intuitive as well. > -Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051129/87b6a75f/attachment.html From jeff.darklight at gmail.com Tue Nov 29 10:58:59 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Tue, 29 Nov 2005 07:58:59 -0800 Subject: [Wtr-general] Remembering the read page In-Reply-To: <20051129125733.29864.qmail@web34010.mail.mud.yahoo.com> References: <20051129125733.29864.qmail@web34010.mail.mud.yahoo.com> Message-ID: WATiR doesn't clear out your cookies. There is contributed code to help with that ... blasting the right cookies should cause a login each time. Or, you could simply add a step to the beginning of your test to log you out if you are already logged in .... Either or. j. On 11/29/05, Jirka Machotka wrote: > > Hello, > > this is the second issue I have observed: > when I run my test repeatedly, it seems that WATIR remembers the contents > of the page. E.g. I login to my mail account - for the first time I need > to enter my login ID/password, but for the second time I can get in with no > login/pswd whatsoever. And this behaves like this [b]unless I log out[/b] > (manually, or click on the log out button). > > It's fine by me, but it does behave differently than the browser. What am > I missing here? > > Thanks, Jirka > > ------------------------------ > Yahoo! Music Unlimited - Access over 1 million songs. Try it free. > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051129/fb879f12/attachment.html From jeff.darklight at gmail.com Tue Nov 29 14:49:11 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Tue, 29 Nov 2005 11:49:11 -0800 Subject: [Wtr-general] ... ok, hopefully final version ... patch : watir.rb & frame_test.rb ... Frame#locate mods for full Frame & IFrame support. In-Reply-To: References: Message-ID: so, everybody too busy to provide some feedback ? j. On 11/28/05, Jeff Wood wrote: > > > > On 11/28/05, Jeff Wood wrote: > > > > Ok, attached is my patch against HEAD that supports :name, :index, :id, > > & :src how attributes for both FRAME and IFRAME tags ... > > > > Also included are patches for frame_test.rb to test this additional > > functionality. > > > > The only use case I didn't build and/or test ( but I don't see it > > anywhere else either ) ... is what if a user pushes a regex for an index... > > > > If we need to cover it, I can, but I figured this is/was a good start. > > > > Review & Comments appreciated. > > > > j. > > > > -- > > "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" > > > > Jeff Wood > > > > > -- > "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" > > Jeff Wood > > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051129/395acfa0/attachment.html From sy1234 at gmail.com Tue Nov 29 15:02:05 2005 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 29 Nov 2005 15:02:05 -0500 Subject: [Wtr-general] [ANN] The new Watir wiki: http://watir.net In-Reply-To: <1133208358.438b63269e952@webmail.telus.net> References: <82c7c882d20e.82d20e82c7c8@shaw.ca> <000101c5f3d8$3b76e3e0$6500a8c0@tintin> <1e55af990511272203jb106582uedcd98960c71342e@mail.gmail.com> <1133208358.438b63269e952@webmail.telus.net> Message-ID: <1e55af990511291202q78115773if5ac4434a4024d45@mail.gmail.com> On 11/28/05, jkohl at telusplanet.net wrote: > > > I was going for a light grey, like the watir.com intro. I changed it > > to #eeeeee, but I don't know if that'll make a difference. > > "lightgrey" wasn't light enough for me.. > I've had good luck with #DFDFDF and #EFEFEF with IE (I think those are the ones > off the top of my head.) I'll give one of those a try, thanks. On 11/28/05, Jeff Wood wrote: > I think the WIKI should be the ENTIRE site ... minus, of course, the issue > trackers & download managers which should stay @ rubyforge ... ( until there > is a good plugin to replace them in the wiki ). > > Good job folks... Other than wishing that we are/were using a Ruby Wiki > solution ... It looks good. I totally agree with converting the entire site into the wiki, although that's sometimes harder than it sounds if there is funky functionality or cool display. I think the website looks very good as it stands. I'd also love to have a ruby solution, but nothing compares. I've jabbed Austin about ruwiki a couple of times, but there's no way that's going anywhere for a very long time. From chaya_b_s at yahoo.co.in Wed Nov 30 05:05:09 2005 From: chaya_b_s at yahoo.co.in (chaya shetty) Date: Wed, 30 Nov 2005 10:05:09 +0000 (GMT) Subject: [Wtr-general] Is there a way to input data into a "Readonly" text field in watir? In-Reply-To: <20051130094948.94857.qmail@web8514.mail.in.yahoo.com> Message-ID: <20051130100509.81783.qmail@web8311.mail.in.yahoo.com> Hi, I was able to input data into the readonly field using ie.text_field(:name , 'date'').value = random_date "random_date" is a method which I have used to input random date into the field. But when I submit the data and try to view it in the "View" screen, this date field is blank. However if I give input data as ie.text_field(:name , 'date'').value = "12/11/2005" ( i.e. directly giving a string instead of taking it from "random_date" method) and then submit , this date will be saved and can be viewed in the "View" screen. I also tried date = random_date ie.text_field(:name , 'date'').value = date.to_s But still this date was not saved in the "View screen". Is it because I am getting the input dates from a method that it is not being saved? How do I handle this? Paul Rogers wrote: Date: Tue, 22 Nov 2005 22:06:53 -0700 From: Paul Rogers To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Is there a way to input data into a "Readonly" text field in watir? you should be able to use the value= method using the textfields.html from the watir_bonus\unittests\html dir ie.text_field(:name , 'readOnly').value='test' seems to work Paul Content-Type: multipart/alternative; boundary="0-1983776644-1132720426=:63063" Content-Transfer-Encoding: 8bit --0-1983776644-1132720426=:63063 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi, I want to write a test case in which I am required to test a date field. This date field is a "readonly text field". The input to this readonly text field is by means of a calendar( the user is supposed to select a date from the calendar which will be displayed in the text field). I want to input data into the "Readonly text field" without selecting the date from the calendar. Is this possible in watir? Is there a way to input data into the "Readonly text field" in watir? --------------------------------- Enjoy this Diwali with Y! India Click here --0-1983776644-1132720426=:63063 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi, I want to write a test case in which I am required to test a date field. This date field is a "readonly text field". The input to this readonly text field is by means of a calendar( the user is supposed to select a date from the calendar which will be displayed in the text field). I want to input data into the "Readonly text field" without selecting the date from the calendar. Is this possible in watir? Is there a way to input data into the "Readonly text field" in watir? --------------------------------- Enjoy this Diwali with Y! India Click here --0-1983776644-1132720426=:63063-- _______________________________________________ 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 --------------------------------- Enjoy this Diwali with Y! India Click here_______________________________________________ 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 --------------------------------- Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051130/54e4fa28/attachment.html From jeff.darklight at gmail.com Wed Nov 30 09:34:51 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 30 Nov 2005 06:34:51 -0800 Subject: [Wtr-general] Is there a way to input data into a "Readonly" text field in watir? In-Reply-To: <20051130100509.81783.qmail@web8311.mail.in.yahoo.com> References: <20051130094948.94857.qmail@web8514.mail.in.yahoo.com> <20051130100509.81783.qmail@web8311.mail.in.yahoo.com> Message-ID: I'm really at a loss... so, you are pushing data into the field, and it *IS* going in ... then you submit the data ... then it doesn't show up ... It sounds to me like some piece of validation in your save logic is throwing the data away ... which has nothing to do with WATiR ... that's a problem with the app. j. On 11/30/05, chaya shetty wrote: > > > Hi, > I was able to input data into the readonly field using > ie.text_field(:name , 'date'').value = random_date > "random_date" is a method which I have used to input random date into the > field. But when I submit the data and try to view it in the "View" screen, > this date field is blank. > > However if I give input data as > ie.text_field(:name , 'date'').value = "12/11/2005" ( i.e. directly giving > a string instead of taking it from "random_date" method) and then submit , > this date will be saved and can be viewed in the "View" screen. > > I also tried > date = random_date > ie.text_field(:name , 'date'').value = date.to_s > But still this date was not saved in the "View screen". > > Is it because I am getting the input dates from a method that it is not > being saved? > How do I handle this? > > > *Paul Rogers * wrote: > > Date: Tue, 22 Nov 2005 22:06:53 -0700 > From: Paul Rogers > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] Is there a way to input data into a "Readonly" > text field in watir? > > you should be able to use the value= method > > using the textfields.html from the watir_bonus\unittests\html dir > > ie.text_field(:name , 'readOnly').value='test' > > seems to work > > > Paul > Content-Type: multipart/alternative; > boundary="0-1983776644-1132720426=:63063" > Content-Transfer-Encoding: 8bit > > > --0-1983776644-1132720426=:63063 > Content-Type: text/plain; charset=iso-8859-1 > Content-Transfer-Encoding: 8bit > > Hi, > I want to write a test case in which I am required to test a date field. > This date field is a "readonly text field". > > The input to this readonly text field is by means of a calendar( the user > is supposed to select a date from the calendar which will be displayed in > the text field). > > I want to input data into the "Readonly text field" without selecting the > date from the calendar. Is this possible in watir? > Is there a way to input data into the "Readonly text field" in watir? > > > --------------------------------- > Enjoy this Diwali with Y! India Click here > --0-1983776644-1132720426=:63063 > Content-Type: text/html; charset=iso-8859-1 > Content-Transfer-Encoding: 8bit > > Hi, > I want to write a test case in which I am required to test a date field. > This date field is a "readonly text field". > > The input to t! his readonly text field is by means of a calendar( the > user is supposed to select a date from the calendar which will be displayed > in the text field). > > I want to input data into the "Readonly text field" without selecting the > date from the calendar. Is this possible in watir? > Is there a way to input data into the "Readonly text field" in watir? > > ------------------------------ > > Enjoy this Diwali with Y! India Click here > --0-1983776644-1132720426=:63063-- > _______________________________________________ > 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 > > > ------------------------------ > Enjoy this Diwali with Y! India Click here > _______________________________________________ > 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 > > > ------------------------------ > Enjoy this Diwali with Y! India Click here > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051130/2a2fd325/attachment.html From Mark_Cain at rl.gov Wed Nov 30 10:57:53 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Wed, 30 Nov 2005 07:57:53 -0800 Subject: [Wtr-general] Is there a way to input data into a "Readonly"text field in watir? Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D48C@EX5V.rl.gov> If this works ie.text_field(:name , 'date'').value = "12/11/2005" And this doesn't ie.text_field(:name , 'date'').value = date.to_s then it is probably your apps validation of the date format that is the problem. Ruby by default formats dates like this: 2005-11-30T07:33:01-0800 and this has also given me fits at times. Try doing something like this to your randon_date function (provided that your random_date function is a datetime object) date = random_date.strftime("%m/%d/%Y) Hope this helps, --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of chaya shetty Sent: Wednesday, November 30, 2005 2:05 AM To: wtr Subject: Re: [Wtr-general] Is there a way to input data into a "Readonly"text field in watir? Hi, I was able to input data into the readonly field using ie.text_field(:name , 'date'').value = random_date "random_date" is a method which I have used to input random date into the field. But when I submit the data and try to view it in the "View" screen, this date field is blank. However if I give input data as ie.text_field(:name , 'date'').value = "12/11/2005" ( i.e. directly giving a string instead of taking it from "random_date" method) and then submit , this date will be saved and can be viewed in the "View" screen. I also tried date = random_date ie.text_field(:name , 'date'').value = date.to_s But still this date was not saved in the "View screen". Is it because I am getting the input dates from a method that it is not being saved? How do I handle this? Paul Rogers wrote: Date: Tue, 22 Nov 2005 22:06:53 -0700 From: Paul Rogers To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Is there a way to input data into a "Readonly" text field in watir? you should be able to use the value= method using the textfields.html from the watir_bonus\unittests\html dir ie.text_field(:name , 'readOnly').value='test' seems to work Paul Content-Type: multipart/alternative; boundary="0-1983776644-1132720426=:63063" Content-Transfer-Encoding: 8bit --0-1983776644-1132720426=:63063 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi, I want to write a test case in which I am required to test a date field. This date field is a "readonly text field". The input to this readonly text field is by means of a calendar( the user is supposed to select a date from the calendar which will be displayed in the text field). I want to input data into the "Readonly text field" without selecting the date from the calendar. Is this possible in watir? Is there a way to input data into the "Readonly text field" in watir? --------------------------------- Enjoy this Diwali with Y! India Click here --0-1983776644-1132720426=:63063 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi, I want to write a test case in which I am required to test a date field. This date field is a "readonly text field". The input to t! his readonly text field is by means of a calendar( the user is supposed to select a date from the calendar which will be displayed in the text field). I want to input data into the "Readonly text field" without selecting the date from the calendar. Is this possible in watir? Is there a way to input data into the "Readonly text field" in watir? ________________________________ Enjoy this Diwali with Y! India Click here --0-1983776644-1132720426=:63063-- _______________________________________________ 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 ________________________________ Enjoy this Diwali with Y! India Click here _______________________________________________ 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 ________________________________ Enjoy this Diwali with Y! India Click here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051130/f8cba694/attachment.html From christopher.mcmahon at gmail.com Wed Nov 30 16:11:00 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 30 Nov 2005 15:11:00 -0600 Subject: [Wtr-general] OT: spectacularly neato online Ruby tutorial Message-ID: <72799cd70511301311g1b95e1abh5d58d8d37233da29@mail.gmail.com> Haven't tried it much yet, but this is too cool not to share: http://tryruby.hobix.com/ whytheluckystiff is one heckuvaguy. -Chris From jeff.darklight at gmail.com Wed Nov 30 16:15:39 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 30 Nov 2005 13:15:39 -0800 Subject: [Wtr-general] OT: spectacularly neato online Ruby tutorial In-Reply-To: <72799cd70511301311g1b95e1abh5d58d8d37233da29@mail.gmail.com> References: <72799cd70511301311g1b95e1abh5d58d8d37233da29@mail.gmail.com> Message-ID: ... simply ... wow. j. On 11/30/05, Chris McMahon wrote: > > Haven't tried it much yet, but this is too cool not to share: > > http://tryruby.hobix.com/ > > whytheluckystiff is one heckuvaguy. > -Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051130/e4e59cb0/attachment.html From christopher.mcmahon at gmail.com Wed Nov 30 16:36:23 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 30 Nov 2005 15:36:23 -0600 Subject: [Wtr-general] OT: help constructing interesting hash? Message-ID: <72799cd70511301336g8b6e2d8m7cb63e70d986cef4@mail.gmail.com> Hi all.... Again, apologies for the OT, stop me if it's not amusing... Suppose I have an array of arrays like [[A, B, C][1,2,3]] I can easily make a hash (using each.with_index) where one value is the lookup value for the other value: 1=>A 2=>B 3=>C Now suppose I have a AoA like [[A, B, C,][1,2,2]] Is there a readable way to construct a hash like 1=>A 2=>[B, C] ? Thanks, -Chris From jeff.darklight at gmail.com Wed Nov 30 17:11:54 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 30 Nov 2005 14:11:54 -0800 Subject: [Wtr-general] OT: help constructing interesting hash? In-Reply-To: <72799cd70511301336g8b6e2d8m7cb63e70d986cef4@mail.gmail.com> References: <72799cd70511301336g8b6e2d8m7cb63e70d986cef4@mail.gmail.com> Message-ID: assuming that you ALWAYS have only two arrays ... def makeHash( pArray ) output = {} pArray[1].each_with_index do |curr_key,curr_index| output[ curr_key ] ||= [] output[ curr_key ] << pArray[0][ curr_index ] end output end puts makeHash( [ [ "a", "b", "c" ], [ 1, 2, 3 ] ] ).inspect puts makeHash( [ [ "a", "b", "c" ], [ 1, 2, 2 ] ] ).inspect ... at least that's how I'd do it... and I'd always have the elements be arrays, I'd rather be consistent. j. On 11/30/05, Chris McMahon wrote: > > Hi all.... > > Again, apologies for the OT, stop me if it's not amusing... > > Suppose I have an array of arrays like > > [[A, B, C][1,2,3]] > > I can easily make a hash (using each.with_index) where one value is > the lookup value for the other value: > > 1=>A > 2=>B > 3=>C > > Now suppose I have a AoA like > > [[A, B, C,][1,2,2]] > > Is there a readable way to construct a hash like > > 1=>A > 2=>[B, C] > > ? > > Thanks, > -Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051130/f88ce4eb/attachment.html From jeff.darklight at gmail.com Wed Nov 30 17:27:20 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 30 Nov 2005 14:27:20 -0800 Subject: [Wtr-general] OT: help constructing interesting hash? In-Reply-To: References: <72799cd70511301336g8b6e2d8m7cb63e70d986cef4@mail.gmail.com> Message-ID: If you want the other, you would simply change the last line of the makeHash function from : output to... require 'rubygems' require 'nano/hash' output.traverse { |key,value| [ key, value.length == 1 ? value[0] : value ] } ... done. ... and yes, if it says can't find nano/hash ... do: gem install facets ...from the command line ...documentation is @ http://facets.rubyforge.org j. On 11/30/05, Jeff Wood wrote: > > assuming that you ALWAYS have only two arrays ... > > def makeHash( pArray ) > output = {} > > pArray[1].each_with_index do |curr_key,curr_index| > output[ curr_key ] ||= [] > output[ curr_key ] << pArray[0][ curr_index ] > end > > output > end > > puts makeHash( [ [ "a", "b", "c" ], [ 1, 2, 3 ] ] ).inspect > puts makeHash( [ [ "a", "b", "c" ], [ 1, 2, 2 ] ] ).inspect > > ... at least that's how I'd do it... and I'd always have the elements be > arrays, I'd rather be consistent. > > j. > > On 11/30/05, Chris McMahon wrote: > > > > Hi all.... > > > > Again, apologies for the OT, stop me if it's not amusing... > > > > Suppose I have an array of arrays like > > > > [[A, B, C][1,2,3]] > > > > I can easily make a hash (using each.with_index) where one value is > > the lookup value for the other value: > > > > 1=>A > > 2=>B > > 3=>C > > > > Now suppose I have a AoA like > > > > [[A, B, C,][1,2,2]] > > > > Is there a readable way to construct a hash like > > > > 1=>A > > 2=>[B, C] > > > > ? > > > > Thanks, > > -Chris > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > -- > "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" > > Jeff Wood -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051130/dbb68966/attachment.html From nightphotos at gmail.com Wed Nov 30 17:29:18 2005 From: nightphotos at gmail.com (Wayne Vucenic) Date: Wed, 30 Nov 2005 14:29:18 -0800 Subject: [Wtr-general] OT: help constructing interesting hash? In-Reply-To: <72799cd70511301336g8b6e2d8m7cb63e70d986cef4@mail.gmail.com> References: <72799cd70511301336g8b6e2d8m7cb63e70d986cef4@mail.gmail.com> Message-ID: Hi Chris, > [[A, B, C][1,2,3]] > > I can easily make a hash (using each.with_index) where one value is > the lookup value for the other value: I'd consider zip for this: a = [['a', 'b', 'c'], [1,2,3]] h = Hash.new a[1].zip(a[0]) {|key, value| h[key] = value} p h # {1=>"a", 2=>"b", 3=>"c"} > Now suppose I have a AoA like > > [[A, B, C,][1,2,2]] > > Is there a readable way... I don't know that it's particularly readable, but: a = [['a', 'b', 'c'], [1,2,2]] h = Hash.new a[1].zip(a[0]) do |key, value| case h[key] when NilClass h[key] = value when Array h[key] << value else h[key] = [h[key], value] end end p h # {1=>"a", 2=>["b", "c"]} If you allow 1=>["a"] it gets a lot easier: a = [['a', 'b', 'c'], [1,2,2]] h = Hash.new {|hash, key| hash[key] = []} a[1].zip(a[0]) {|key, value| h[key] << value} p h # {1=>["a"], 2=>["b", "c"]} Wayne On 11/30/05, Chris McMahon wrote: > Hi all.... > > Again, apologies for the OT, stop me if it's not amusing... > > Suppose I have an array of arrays like > > [[A, B, C][1,2,3]] > > I can easily make a hash (using each.with_index) where one value is > the lookup value for the other value: > > 1=>A > 2=>B > 3=>C > > Now suppose I have a AoA like > > [[A, B, C,][1,2,2]] > > Is there a readable way to construct a hash like > > 1=>A > 2=>[B, C] > > ? > > Thanks, > -Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From roy_sin at yahoo.com Wed Nov 30 17:42:19 2005 From: roy_sin at yahoo.com (Roy Sin) Date: Wed, 30 Nov 2005 14:42:19 -0800 (PST) Subject: [Wtr-general] OT: spectacularly neato online Ruby tutorial In-Reply-To: <72799cd70511301311g1b95e1abh5d58d8d37233da29@mail.gmail.com> Message-ID: <20051130224219.7692.qmail@web52907.mail.yahoo.com> Thanks for sharing... this is cool stuff. --- Chris McMahon wrote: > Haven't tried it much yet, but this is too cool not to > share: > > http://tryruby.hobix.com/ > > whytheluckystiff is one heckuvaguy. > -Chris > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com