From chaya_b_s at yahoo.co.in Thu Dec 1 05:34:06 2005 From: chaya_b_s at yahoo.co.in (chaya shetty) Date: Thu, 1 Dec 2005 10:34:06 +0000 (GMT) Subject: [Wtr-general] Is there a way to input data into a "Readonly" text field in watir? In-Reply-To: Message-ID: <20051201103406.13576.qmail@web8302.mail.in.yahoo.com> Hi, It was not the problem of 'Watir'. The database had timeinstantid's only from 2002 to 2006. So these dates were getting saved whereas all other dates were not saved. Thanks Chaya Jeff Wood wrote: 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 < paul.rogers at shaw.ca> wrote: Date: Tue, 22 Nov 2005 22:06:53 -0700 From: Paul Rogers < paul.rogers at shaw.ca> 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 _______________________________________________ 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/20051201/be64779a/attachment.html From jeff.darklight at gmail.com Thu Dec 1 13:26:13 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Thu, 1 Dec 2005 10:26:13 -0800 Subject: [Wtr-general] Is there a way to input data into a "Readonly" text field in watir? In-Reply-To: <20051201103406.13576.qmail@web8302.mail.in.yahoo.com> References: <20051201103406.13576.qmail@web8302.mail.in.yahoo.com> Message-ID: Glad we could help. j. On 12/1/05, chaya shetty wrote: > > Hi, > It was not the problem of 'Watir'. The database had timeinstantid's only > from 2002 to 2006. So these dates were getting saved whereas all other dates > > were not saved. > > Thanks > Chaya > *Jeff Wood * wrote: > > 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 < paul.rogers at shaw.ca>* wrote: > > > > Date: Tue, 22 Nov 2005 22:06:53 -0700 > > From: Paul Rogers < paul.rogers at shaw.ca> > > 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 Diwa! li 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 wit! h 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/20051201/5ab17276/attachment.html From hrishij at synechron.com Fri Dec 2 04:22:42 2005 From: hrishij at synechron.com (Hrishikesh Jamadagni) Date: Fri, 2 Dec 2005 14:52:42 +0530 Subject: [Wtr-general] wait In-Reply-To: Message-ID: <002d01c5f721$f3c7b4a0$74021f0a@fusionpune.local> Hi Do you have the information if I can keep the program waiting before checking for validation #Check result if ie.contains_text("Please fill all valid information .") #puts: "Test passed. Page contains the text: Thank you for visiting PhoneClaim.com." worksheet.Range("z4#{line}").value = "Fail" else #puts: "Test failed! Page didn't contain text: Thank you for visiting PhoneClaim.com." #worksheet.Range("z4#{line}").value = "Step" end #worksheet.Range("z#{line}").value = "PASS" Regards hrishi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051202/05797afd/attachment.html From zeljko.filipin at gmail.com Fri Dec 2 04:33:47 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 2 Dec 2005 10:33:47 +0100 Subject: [Wtr-general] wait In-Reply-To: <002d01c5f721$f3c7b4a0$74021f0a@fusionpune.local> Message-ID: <000d01c5f723$7f9f0090$c6e7fea9@officezg.wa> # some ruby code sleep 1 # more ruby code "sleep 1" will wait for 1 second before "# more ruby code" is executed, if that is what you needed. Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Hrishikesh Jamadagni Sent: Friday, December 02, 2005 10:23 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] wait Hi Do you have the information if I can keep the program waiting before checking for validation #Check result if ie.contains_text("Please fill all valid information .") #puts: "Test passed. Page contains the text: Thank you for visiting PhoneClaim.com." worksheet.Range("z4#{line}").value = "Fail" else #puts: "Test failed! Page didn't contain text: Thank you for visiting PhoneClaim.com." #worksheet.Range("z4#{line}").value = "Step" end #worksheet.Range("z#{line}").value = "PASS" Regards hrishi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051202/177a91df/attachment.html From hrishij at synechron.com Fri Dec 2 05:10:41 2005 From: hrishij at synechron.com (Hrishikesh Jamadagni) Date: Fri, 2 Dec 2005 15:40:41 +0530 Subject: [Wtr-general] wait In-Reply-To: <000d01c5f723$7f9f0090$c6e7fea9@officezg.wa> Message-ID: <000001c5f728$a7c58760$74021f0a@fusionpune.local> Thanks dude it worked :-) Regards hrishij -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: Friday, December 02, 2005 3:04 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] wait # some ruby code sleep 1 # more ruby code "sleep 1" will wait for 1 second before "# more ruby code" is executed, if that is what you needed. Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Hrishikesh Jamadagni Sent: Friday, December 02, 2005 10:23 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] wait Hi Do you have the information if I can keep the program waiting before checking for validation #Check result if ie.contains_text("Please fill all valid information .") #puts: "Test passed. Page contains the text: Thank you for visiting PhoneClaim.com." worksheet.Range("z4#{line}").value = "Fail" else #puts: "Test failed! Page didn't contain text: Thank you for visiting PhoneClaim.com." #worksheet.Range("z4#{line}").value = "Step" end #worksheet.Range("z#{line}").value = "PASS" Regards hrishi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051202/5dc28cf1/attachment.html From zeljko.filipin at gmail.com Fri Dec 2 05:14:38 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 2 Dec 2005 11:14:38 +0100 Subject: [Wtr-general] wait In-Reply-To: <000001c5f728$a7c58760$74021f0a@fusionpune.local> Message-ID: <002601c5f729$34810e40$c6e7fea9@officezg.wa> As Jeff Wood would say: "glad I could help". :) Zeljko ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Hrishikesh Jamadagni Sent: Friday, December 02, 2005 11:11 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] wait Thanks dude it worked J Regards hrishij -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin Sent: Friday, December 02, 2005 3:04 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] wait # some ruby code sleep 1 # more ruby code "sleep 1" will wait for 1 second before "# more ruby code" is executed, if that is what you needed. Zeljko ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Hrishikesh Jamadagni Sent: Friday, December 02, 2005 10:23 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] wait Hi Do you have the information if I can keep the program waiting before checking for validation #Check result if ie.contains_text("Please fill all valid information .") #puts: "Test passed. Page contains the text: Thank you for visiting PhoneClaim.com." worksheet.Range("z4#{line}").value = "Fail" else #puts: "Test failed! Page didn't contain text: Thank you for visiting PhoneClaim.com." #worksheet.Range("z4#{line}").value = "Step" end #worksheet.Range("z#{line}").value = "PASS" Regards hrishi From hrishij at synechron.com Mon Dec 5 01:05:18 2005 From: hrishij at synechron.com (Hrishikesh Jamadagni) Date: Mon, 5 Dec 2005 11:35:18 +0530 Subject: [Wtr-general] wait In-Reply-To: <002601c5f729$34810e40$c6e7fea9@officezg.wa> Message-ID: <000401c5f961$df663ad0$74021f0a@fusionpune.local> Hi Well I am stuck with one issue I click a submit button which brings up a javascript popup with the title "Microsoft Internet Explorer" and with the text "Zip code should be 5 digit?". The popup has one button: Ok. This is what i have at the top of my script require 'win32ole' Watir script just hangs there without throwing any errors. Regards hrishi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051205/1dbc411a/attachment.html From hrishij at synechron.com Mon Dec 5 01:14:15 2005 From: hrishij at synechron.com (Hrishikesh Jamadagni) Date: Mon, 5 Dec 2005 11:44:15 +0530 Subject: [Wtr-general] Cannot include (require 'watir/dialog') in my script. Message-ID: <000001c5f963$1f4f81f0$74021f0a@fusionpune.local> Hi, When I include: require 'watir/dialog' at the beginning of my script I'm getting this error - c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__': No such file to load -- watir/dialog (LoadError). Please advice. Regards, Hrishi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051205/f0acbb97/attachment.html From jirmac2003 at yahoo.com Mon Dec 5 04:06:43 2005 From: jirmac2003 at yahoo.com (Jirka Machotka) Date: Mon, 5 Dec 2005 01:06:43 -0800 (PST) Subject: [Wtr-general] Remembering the read page In-Reply-To: Message-ID: <20051205090643.9566.qmail@web34006.mail.mud.yahoo.com> Thanks, Jeff. There's probably something more than just the cookies, because the same thing works fine on other mail servers, but the general principle is clear. Jeff Wood wrote: 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 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Yahoo! DSL Something to write home about. Just $16.99/mo. or less -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051205/211125a5/attachment.html From Mark_Cain at rl.gov Mon Dec 5 10:36:09 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Mon, 5 Dec 2005 07:36:09 -0800 Subject: [Wtr-general] wait Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D49F@EX5V.rl.gov> I have had good success with this, although other claim they have not. First I create this method: def startClicker( button , waitTime = 3) w = WinClicker.new longName = $ie.dir.gsub("/" , "\\" ) shortName = w.getShortFileName(longName) c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button } #{ waitTime} " puts "Starting #{c}" w.winsystem(c) w=nil end Then I put this line right before the button that causes the javascript popup like this: startClicker("OK" , 3) $ie.button("Submit").click: That is all there is and it works pretty much every time. Hope this helps, --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Hrishikesh Jamadagni Sent: Sunday, December 04, 2005 10:05 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] wait Hi Well I am stuck with one issue I click a submit button which brings up a javascript popup with the title "Microsoft Internet Explorer" and with the text "Zip code should be 5 digit?". The popup has one button: Ok. This is what i have at the top of my script require 'win32ole' Watir script just hangs there without throwing any errors. Regards hrishi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051205/68580dd2/attachment.html From bret at pettichord.com Mon Dec 5 11:08:26 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 05 Dec 2005 10:08:26 -0600 Subject: [Wtr-general] Cannot include (require 'watir/dialog') in my script. In-Reply-To: <000001c5f963$1f4f81f0$74021f0a@fusionpune.local> Message-ID: <5.1.0.14.2.20051205100739.03fb6008@pop.gmail.com> At 12:14 AM 12/5/2005, Hrishikesh Jamadagni wrote: >When I include: require 'watir/dialog' at the beginning of my script I m >getting this error - >c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in >`require__': No such file to load -- watir/dialog (LoadError). This library is in the development version of Watir, not 1.4.2. _____________________ Bret Pettichord www.pettichord.com From warren at meyer-pollans.net Mon Dec 5 11:42:39 2005 From: warren at meyer-pollans.net (Warren Pollans) Date: Mon, 5 Dec 2005 11:42:39 -0500 Subject: [Wtr-general] install on new laptop? Message-ID: <20051205114239.6a9d2d85@localhost.localdomain> Hello, I've taken a few months away from watir to learn and use selenium under linux. I'm ready to start using watir again - had been running watir from an old win2k-pro box. I now have a new dell laptop that will probably dual-boot XP and linux so I can use both selenium and watir. I'd like to use the latest and greatest version of watir. QUESTION: If I use the development version, can I revert to a more stable version if there is a problem? Would it just be a question of replacing some modules? Where would I get the development version? CAUTION: I know ruby, but I'm barely literate when it comes to windows. Thanks, Warren From christopher.mcmahon at gmail.com Mon Dec 5 11:51:43 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 5 Dec 2005 10:51:43 -0600 Subject: [Wtr-general] install on new laptop? In-Reply-To: <20051205114239.6a9d2d85@localhost.localdomain> References: <20051205114239.6a9d2d85@localhost.localdomain> Message-ID: <72799cd70512050851t786bd360tdbbad05ea7899f68@mail.gmail.com> > QUESTION: If I use the development version, can I revert to a more > stable version if there is a problem? FWIW, I always check out from HEAD. One of the (many) nice things about Watir is that the development versions are very rarely broken. And a re-install of any other particular version is easy, too. -Chris From jeff.darklight at gmail.com Mon Dec 5 11:54:30 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 5 Dec 2005 08:54:30 -0800 Subject: [Wtr-general] install on new laptop? In-Reply-To: <20051205114239.6a9d2d85@localhost.localdomain> References: <20051205114239.6a9d2d85@localhost.localdomain> Message-ID: I *normally* run WATiR through the Gem installed version. That said, when I am working with a script that I know will rely on the development version I simply add a line to the top of my script that puts the development version at the TOP of the include path... $:.unshift "C:\\watir_cvs\\watir" then when I do my includes, it catches the dev version first ... That way, if I haven't added that to a script, I know that I'm using the Gem installed version... Also, you can validate this behavior with: # just to make sure you are running the right stuff... puts Watir::IE.const_get( "VERSION" ) puts Watir::IE.const_get( "REVISION" ) ... that usually does it for me, you tend to get to know the version information pretty quickly this way. Hope that provides what you are/were looking for. j. On 12/5/05, Warren Pollans wrote: > > Hello, > > I've taken a few months away from watir to learn and use selenium under > linux. I'm ready to start using watir again - had been running watir > from an old win2k-pro box. I now have a new dell laptop that will > probably dual-boot XP and linux so I can use both selenium and watir. > > I'd like to use the latest and greatest version of watir. > > QUESTION: If I use the development version, can I revert to a more > stable version if there is a problem? Would it just be a question of > replacing some modules? Where would I get the development version? > CAUTION: I know ruby, but I'm barely literate when it comes to > windows. > > Thanks, > > Warren > > > _______________________________________________ > 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/20051205/da02f71e/attachment.html From jeff.darklight at gmail.com Mon Dec 5 11:57:13 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 5 Dec 2005 08:57:13 -0800 Subject: [Wtr-general] install on new laptop? In-Reply-To: References: <20051205114239.6a9d2d85@localhost.localdomain> Message-ID: btw, when I said "includes" I mean my "require" statement ... sorry, I've still got a C++ heart ... just wanted to clarify. j. On 12/5/05, Jeff Wood wrote: > > I *normally* run WATiR through the Gem installed version. > > That said, when I am working with a script that I know will rely on the > development version I simply add a line to the top of my script that puts > the development version at the TOP of the include path... > > $:.unshift "C:\\watir_cvs\\watir" > > then when I do my includes, it catches the dev version first ... > > That way, if I haven't added that to a script, I know that I'm using the > Gem installed version... > > Also, you can validate this behavior with: > > # just to make sure you are running the right stuff... > puts Watir::IE.const_get( "VERSION" ) > puts Watir::IE.const_get( "REVISION" ) > > ... that usually does it for me, you tend to get to know the version > information pretty quickly this way. > > Hope that provides what you are/were looking for. > > j. > > On 12/5/05, Warren Pollans wrote: > > > > Hello, > > > > I've taken a few months away from watir to learn and use selenium under > > linux. I'm ready to start using watir again - had been running watir > > from an old win2k-pro box. I now have a new dell laptop that will > > probably dual-boot XP and linux so I can use both selenium and watir. > > > > I'd like to use the latest and greatest version of watir. > > > > QUESTION: If I use the development version, can I revert to a more > > stable version if there is a problem? Would it just be a question of > > replacing some modules? Where would I get the development version? > > CAUTION: I know ruby, but I'm barely literate when it comes to > > windows. > > > > Thanks, > > > > Warren > > > > > > _______________________________________________ > > 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/20051205/172caa48/attachment.html From sy1234 at gmail.com Mon Dec 5 16:10:52 2005 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 5 Dec 2005 21:10:52 +0000 Subject: [Wtr-general] Contrib libraries, was Re: Removing cookies In-Reply-To: <002201c5efe0$2253d7c0$6500a8c0@tintin> References: <5.1.0.14.2.20051122213358.02f42318@pop.gmail.com> <002201c5efe0$2253d7c0$6500a8c0@tintin> Message-ID: <1e55af990512051310v6c44b486g67382ec1681a1166@mail.gmail.com> On 11/23/05, Jonathan Kohl wrote: > > > Another idea would be to farm a page on RubyGarden.org with examples. > > I like this idea. The wiki was set up to make setting up a snippets repository trivial to do ourselves. I'll have to set some time aside to begin that work.. From sy1234 at gmail.com Mon Dec 5 16:17:08 2005 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 5 Dec 2005 21:17:08 +0000 Subject: [Wtr-general] OT: spectacularly neato online Ruby tutorial In-Reply-To: <20051130224219.7692.qmail@web52907.mail.yahoo.com> References: <72799cd70511301311g1b95e1abh5d58d8d37233da29@mail.gmail.com> <20051130224219.7692.qmail@web52907.mail.yahoo.com> Message-ID: <1e55af990512051317n47d133aar8d6a2164fafdd316@mail.gmail.com> Very cool.. this idea was the first thing that popped into my head when I saw how Chris Pine was automagically generating the code snippets for his tutorial. I also saw another tutorial that has a gateway that allows random ruby code to be user-edited. I'm glad someone took some time to do this. From warren at meyer-pollans.net Mon Dec 5 19:29:54 2005 From: warren at meyer-pollans.net (Warren Pollans) Date: Mon, 5 Dec 2005 19:29:54 -0500 Subject: [Wtr-general] [OT] running watir in a VM In-Reply-To: <20051205114239.6a9d2d85@localhost.localdomain> References: <20051205114239.6a9d2d85@localhost.localdomain> Message-ID: This about installing & running watir - part 2 :-) Instead of dual-booting XP and linux, I now realize that I could run XP, and therefore watir, out of a virtual machine via VMWare under linux. This would probably be more useful for me since the only reason for me to have XP is to run watir - I'd use watir more if I didn't have to reboot to get to it. QUESTION: Is anyone using watir in a setup like this? XP installed in a VM using VMWare under fedora 3 or 4? Thanks for your patience, I'll probably get this sorted out soon On Dec 5, 2005, at 11:42 AM, Warren Pollans wrote: > Hello, > > I've taken a few months away from watir to learn and use selenium under > linux. I'm ready to start using watir again - had been running watir > from an old win2k-pro box. I now have a new dell laptop that will > probably dual-boot XP and linux so I can use both selenium and watir. > > I'd like to use the latest and greatest version of watir. > > QUESTION: If I use the development version, can I revert to a more > stable version if there is a problem? Would it just be a question of > replacing some modules? Where would I get the development version? > CAUTION: I know ruby, but I'm barely literate when it comes to > windows. > > Thanks, > > Warren > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From christopher.mcmahon at gmail.com Mon Dec 5 20:04:25 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 5 Dec 2005 19:04:25 -0600 Subject: [Wtr-general] [OT] running watir in a VM In-Reply-To: References: <20051205114239.6a9d2d85@localhost.localdomain> Message-ID: <72799cd70512051704h688f80b9v5965f8597fca83bd@mail.gmail.com> > QUESTION: Is anyone using watir in a setup like this? XP installed in > a VM using VMWare under fedora 3 or 4? No, but I'm replying anyway =) because I have nothing but good things to say about VMWare. Not long ago I had occasion to run FreeBSD under VMWare on Windows XP, doing some pretty sophisticated web stuff (Apache/Twiki) and network hacking (ntop, nessus, ettercap) and VMWare handled everything flawlessly. Very nice job on the part of the VMWare people. -Chris From dave at burt.id.au Mon Dec 5 20:30:47 2005 From: dave at burt.id.au (Dave Burt) Date: Tue, 6 Dec 2005 12:30:47 +1100 Subject: [Wtr-general] [OT] running watir in a VM References: <20051205114239.6a9d2d85@localhost.localdomain> Message-ID: <000a01c5fa04$af880f70$6602a8c0@telperion> Warren Pollans wrote in "[OT] running watir in a VM": > This about installing & running watir - part 2 :-) > > Instead of dual-booting XP and linux, I now realize that I could run > XP, and therefore watir, out of a virtual machine via VMWare under > linux. This would probably be more useful for me since the only reason > for me to have XP is to run watir - I'd use watir more if I didn't have > to reboot to get to it. > > QUESTION: Is anyone using watir in a setup like this? XP installed in > a VM using VMWare under fedora 3 or 4? You will have no problems with that setup - it'll be just like the real thing. >> I'd like to use the latest and greatest version of watir. You can grab that from the "Download tarball" link from the bottom of this page: http://rubyforge.org/cgi-bin/viewcvs.cgi/watir/?cvsroot=wtr >> QUESTION: If I use the development version, can I revert to a more >> stable version if there is a problem? Would it just be a question of >> replacing some modules? Where would I get the development version? >> CAUTION: I know ruby, but I'm barely literate when it comes to >> windows. Unzip the dev version to a separate location in your Windows directory heirarchy. Cheers, Dave From bret at pettichord.com Tue Dec 6 00:41:36 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 05 Dec 2005 23:41:36 -0600 Subject: [Wtr-general] [OT] running watir in a VM In-Reply-To: References: <20051205114239.6a9d2d85@localhost.localdomain> <20051205114239.6a9d2d85@localhost.localdomain> Message-ID: <5.1.0.14.2.20051205233956.0391f310@pop.gmail.com> At 06:29 PM 12/5/2005, Warren Pollans wrote: >the only reason >for me to have XP is to run watir - I'd use watir more if I didn't have >to reboot to get to it. Another option is to forget about VMWare and use wine. Details: http://advogato.org/person/superant/diary.html?start=76 _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Tue Dec 6 00:45:17 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 05 Dec 2005 23:45:17 -0600 Subject: [Wtr-general] Remembering the read page In-Reply-To: <20051205090643.9566.qmail@web34006.mail.mud.yahoo.com> References: Message-ID: <5.1.0.14.2.20051205234346.03fb5920@pop.gmail.com> At 03:06 AM 12/5/2005, Jirka Machotka wrote: >There's probably something more than just the cookies, because the same >thing works fine on other mail servers, but the general principle is clear. It may be that Watir is reusing the same session also. _____________________ Bret Pettichord www.pettichord.com From hrishij at synechron.com Tue Dec 6 04:21:07 2005 From: hrishij at synechron.com (Hrishikesh Jamadagni) Date: Tue, 6 Dec 2005 14:51:07 +0530 Subject: [Wtr-general] wait In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D49F@EX5V.rl.gov> Message-ID: <000201c5fa46$64db1020$74021f0a@fusionpune.local> Hi Mark , I went through the code and had following doubts, 1)What is the use of long Name ? 2) What is the use of short name? Sorry if my questions sound too basic, Thanks for the support Regards hrishij -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: Monday, December 05, 2005 9:06 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] wait I have had good success with this, although other claim they have not. First I create this method: def startClicker( button , waitTime = 3) w = WinClicker.new longName = $ie.dir.gsub("/" , "\\" ) shortName = w.getShortFileName(longName) c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button } #{ waitTime} " puts "Starting #{c}" w.winsystem(c) w=nil end Then I put this line right before the button that causes the javascript popup like this: startClicker("OK" , 3) $ie.button("Submit").click: That is all there is and it works pretty much every time. Hope this helps, --Mark _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Hrishikesh Jamadagni Sent: Sunday, December 04, 2005 10:05 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] wait Hi Well I am stuck with one issue I click a submit button which brings up a javascript popup with the title "Microsoft Internet Explorer" and with the text "Zip code should be 5 digit?". The popup has one button: Ok. This is what i have at the top of my script require 'win32ole' Watir script just hangs there without throwing any errors. Regards hrishi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051206/3ff977d2/attachment.html From Mark_Cain at rl.gov Tue Dec 6 10:42:10 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Tue, 6 Dec 2005 07:42:10 -0800 Subject: [Wtr-general] wait Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D4A9@EX5V.rl.gov> I didn't ask those questions, it worked and that is what I cared about at the time. You will have to ask whoever wrote it because I swiped it-borrowed it ;-)-right out of the Watir unittests. --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Hrishikesh Jamadagni Sent: Tuesday, December 06, 2005 1:21 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] wait Hi Mark , I went through the code and had following doubts, 1)What is the use of long Name ? 2) What is the use of short name? Sorry if my questions sound too basic, Thanks for the support Regards hrishij -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: Monday, December 05, 2005 9:06 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] wait I have had good success with this, although other claim they have not. First I create this method: def startClicker( button , waitTime = 3) w = WinClicker.new longName = $ie.dir.gsub("/" , "\\" ) shortName = w.getShortFileName(longName) c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button } #{ waitTime} " puts "Starting #{c}" w.winsystem(c) w=nil end Then I put this line right before the button that causes the javascript popup like this: startClicker("OK" , 3) $ie.button("Submit").click: That is all there is and it works pretty much every time. Hope this helps, --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Hrishikesh Jamadagni Sent: Sunday, December 04, 2005 10:05 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] wait Hi Well I am stuck with one issue I click a submit button which brings up a javascript popup with the title "Microsoft Internet Explorer" and with the text "Zip code should be 5 digit?". The popup has one button: Ok. This is what i have at the top of my script require 'win32ole' Watir script just hangs there without throwing any errors. Regards hrishi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051206/8993cda8/attachment.html From Mark_Cain at rl.gov Tue Dec 6 10:51:08 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Tue, 6 Dec 2005 07:51:08 -0800 Subject: [Wtr-general] [OT] running watir in a VM Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D4AA@EX5V.rl.gov> I have just the opposite, a website running on SUSE Linux in VMWare and testing it using WATiR. Not a single problem, although the client (desktop) version of VMWare doesn't like to persist in a idle state. In other words I cannot just turn the VM on and let it run indefinitely and not be actively hitting the website. VMWare shuts down and I have to restart it. Not a huge deal but slightly annoying. If you have the buck GSX-Ware (server version made by the same people who make VMWare) will continue to run in an idle start without turning off. In fact if your hardware will support it you can have multiple servers running on a single box simultaneously--very cool! --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Warren Pollans Sent: Monday, December 05, 2005 4:30 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] [OT] running watir in a VM This about installing & running watir - part 2 :-) Instead of dual-booting XP and linux, I now realize that I could run XP, and therefore watir, out of a virtual machine via VMWare under linux. This would probably be more useful for me since the only reason for me to have XP is to run watir - I'd use watir more if I didn't have to reboot to get to it. QUESTION: Is anyone using watir in a setup like this? XP installed in a VM using VMWare under fedora 3 or 4? Thanks for your patience, I'll probably get this sorted out soon On Dec 5, 2005, at 11:42 AM, Warren Pollans wrote: > Hello, > > I've taken a few months away from watir to learn and use selenium under > linux. I'm ready to start using watir again - had been running watir > from an old win2k-pro box. I now have a new dell laptop that will > probably dual-boot XP and linux so I can use both selenium and watir. > > I'd like to use the latest and greatest version of watir. > > QUESTION: If I use the development version, can I revert to a more > stable version if there is a problem? Would it just be a question of > replacing some modules? Where would I get the development version? > CAUTION: I know ruby, but I'm barely literate when it comes to > windows. > > Thanks, > > Warren > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From sgordonphd at gmail.com Tue Dec 6 13:44:27 2005 From: sgordonphd at gmail.com (Steven Gordon) Date: Tue, 6 Dec 2005 11:44:27 -0700 Subject: [Wtr-general] Extension to test_logger1 example Message-ID: <709b71310512061044x52f71322qedc87472926b819a@mail.gmail.com> Hi! I am taking my first steps in learning Watir and Ruby on my own. I started by extending the test_logger1 example that came with the Watir download. The readme.txt file suggested sharing any "improvements" with this mailing list. I think my extension is an improvement in that it is has some additional test (including failures), is more modular, and illustrates a few more Ruby language features, but I would appreciate any feedback. I am attaching my version - hopefully this mailing list accepts attachments. Thanks, Steven Gordon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051206/b2919d01/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: My_test_logger2.rb Type: application/octet-stream Size: 4376 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20051206/b2919d01/attachment.obj From paul.rogers at shaw.ca Tue Dec 6 23:14:53 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 06 Dec 2005 21:14:53 -0700 Subject: [Wtr-general] wait Message-ID: <851e8a855840.855840851e8a@shaw.ca> the long and short names are the windows paths long name is something like c:\program files\apache group\apache the short name is the windows 8.3 version of it, probaly something like c:\program~p2\Apache~1\ Its done this way to avoid problems with the spaces in the long file names Paul Content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C5FA7B.9F246A94" ------_=_NextPart_001_01C5FA7B.9F246A94 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable I didn't ask those questions, it worked and that is what I cared about at the time. You will have to ask whoever wrote it because I swiped it-borrowed it ;-)-right out of the Watir unittests.=20 =20 --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Hrishikesh Jamadagni Sent: Tuesday, December 06, 2005 1:21 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] wait =20 Hi Mark , =20 I went through the code and had following doubts, =20 1)What is the use of long Name ?=20 =20 2) What is the use of short name? =20 Sorry if my questions sound too basic, =20 Thanks for the support=20 =20 Regards hrishij =20 =20 =20 =20 =20 -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: Monday, December 05, 2005 9:06 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] wait =20 I have had good success with this, although other claim they have not. =20 First I create this method: =20 def startClicker( button , waitTime =3D 3) w =3D WinClicker.new longName =3D $ie.dir.gsub("/" , "\\" ) shortName =3D w.getShortFileName(longName) c =3D "start rubyw #{shortName }\\watir\\clickJSDialog.rb = #{button } #{ waitTime} " puts "Starting #{c}" w.winsystem(c) w=3Dnil end =20 Then I put this line right before the button that causes the javascript popup like this: =20 startClicker("OK" , 3) $ie.button("Submit").click: =20 That is all there is and it works pretty much every time. Hope this helps, =20 --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Hrishikesh Jamadagni Sent: Sunday, December 04, 2005 10:05 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] wait =20 =20 =20 Hi=20 =20 Well I am stuck with one issue =20 I click a submit button which brings up a javascript popup with the title "Microsoft Internet Explorer" and with the text "Zip code should be 5 digit?". The popup has one button: Ok. =20 This is what i have at the top of my script require 'win32ole' =20 Watir script just hangs there without throwing any errors. =20 Regards hrishi ------_=_NextPart_001_01C5FA7B.9F246A94 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable

I didn’t ask those questions, = it worked and that is what I cared about at the time.  You will have = to ask whoever wrote it because I swiped it—borrowed it ;-)—right = out of the Watir unittests.

 

--Mark


From: wtr-general-bounces at rubyforge.org = [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Hrishikesh = Jamadagni
Sent: Tuesday, December = 06, 2005 1:21 AM
To: wtr-general at rubyforge.org
Subject: Re: = [Wtr-general] wait

 

Hi Mark = ,

 

I went through the code and had = following doubts,

 

1)What is the use of  long = Name ?

 

2) What is the use of short = name?

 

Sorry if my questions sound too = basic,

 

Thanks for the support =

 

Regards

=

hrishij

=

 

 

 

 

 

-----Original = Message-----
From: wtr-general-bounces at rubyforge.org = [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark
Sent: Monday, December = 05, 2005 9:06 PM
To: wtr-general at rubyforge.org
Subject: Re: = [Wtr-general] wait

 

I have had good = success with this, although other claim they have not.

 

First I create = this method:

 

   = ; def startClicker( button , waitTime =3D 3)

   = ;    w =3D WinClicker.new

   = ;    longName =3D $ie.dir.gsub("/" , "\\" = )

   = ;    shortName =3D = w.getShortFileName(longName)

   = ;    c =3D "start rubyw #{shortName = }\\watir\\clickJSDialog.rb #{button } #{ waitTime} "

   = ;    puts "Starting #{c}"

   = ;    w.winsystem(c)

   = ;    w=3Dnil

   = end

 

Then I put this = line right before the button that causes the javascript popup like = this:

 

   = ;   startClicker("OK" , 3)

   = ;   $ie.button("Submit").click:

 

That is all = there is and it works pretty much every time.   Hope this = helps,

 

--Mark


From: wtr-general-bounces at rubyforge.org = [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Hrishikesh = Jamadagni
Sent: Sunday, December = 04, 2005 10:05 PM
To: wtr-general at rubyforge.org
Subject: Re: = [Wtr-general] wait

 

 

 

Hi =

 <= /font>

Well I am stuck with one issue

 <= /font>

I click a submit  button which brings up a = javascript

popup with the title "Microsoft Internet Explorer" and = with

the text "Zip code should be 5 digit?". = The

popup has one button: Ok.

 <= /font>

This is what i have at the top of my script

require 'win32ole'

 <= /font>

Watir script just hangs there without throwing = any

errors.=

 <= /font>

Regards=

hrishi<= /font>

------_=_NextPart_001_01C5FA7B.9F246A94-- -------------- next part -------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From warren at meyer-pollans.net Wed Dec 7 11:47:46 2005 From: warren at meyer-pollans.net (Warren Pollans) Date: Wed, 7 Dec 2005 11:47:46 -0500 Subject: [Wtr-general] all_tests unittests errors Message-ID: <20051207114746.12603baa@localhost.localdomain> I've just installed ruby and watir (tarball from cvs) in a vmware VM running windows 2000 and cygwin - the host is running fedora 3 $ ruby --version ruby 1.8.2 (2004-12-25) [i386-mswin32] What have I missed? The core tests all succeed, but when I run all_tests.rb, I get a series of errors like the following: 1) Error: test_Button_Enabled(TC_Buttons): WIN32OLERuntimeError: Unknown property or method `navigate' HRESULT error code:0x80010108 The object invoked has disconnected from its clients. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1215:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1215:in `goto' ./unittests/buttons_test.rb:11:in `setup' $ ruby core_tests.rb Loaded suite core_tests Started ................................................................................ ................................................................................ ............. Finished in 134.906 seconds. 173 tests, 998 assertions, 0 failures, 0 errors From jeff.darklight at gmail.com Wed Dec 7 15:34:57 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 7 Dec 2005 12:34:57 -0800 Subject: [Wtr-general] all_tests unittests errors In-Reply-To: <20051207114746.12603baa@localhost.localdomain> References: <20051207114746.12603baa@localhost.localdomain> Message-ID: those navigate issues are current ... they happen on non-VM systems. ... it's all a work-in-progress. j. On 12/7/05, Warren Pollans wrote: > > I've just installed ruby and watir (tarball from cvs) in a vmware VM > running windows 2000 and cygwin - the host is running fedora 3 > > $ ruby --version > ruby 1.8.2 (2004-12-25) [i386-mswin32] > > What have I missed? > > The core tests all succeed, but when I run all_tests.rb, I get a series > of errors like the following: > > 1) Error: > test_Button_Enabled(TC_Buttons): > WIN32OLERuntimeError: Unknown property or method `navigate' > HRESULT error code:0x80010108 > The object invoked has disconnected from its clients. > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1215:in `method_missing' > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1215:in `goto' > ./unittests/buttons_test.rb:11:in `setup' > > > $ ruby core_tests.rb > Loaded suite core_tests > Started > > ................................................................................ > > ................................................................................ > ............. > Finished in 134.906 seconds. > > 173 tests, 998 assertions, 0 failures, 0 errors > _______________________________________________ > 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/20051207/192abf2a/attachment.html From rajcic at sokrates.hr Thu Dec 8 05:39:43 2005 From: rajcic at sokrates.hr (Miroslav Rajcic) Date: Thu, 8 Dec 2005 11:39:43 +0100 Subject: [Wtr-general] Non-blocking image click Message-ID: <00a901c5fbe3$b39ff600$0ec8a8c0@helixmr> I am having a problem with clicking the image that is a link for a file download. In my code I start a separate thread to handle File Save dialog (using its own WinClicker object) and it works OK, but the problem is that the main thread blocks forever in the image click call and I never see text "After call" (see code below) It seems that image click from below is execute nicely because fiel save dialog is triggered (and handled), but as the IE page was not changed, my IE object blocks forever in the click handler. Sending Ctrl+C to the console reveals that it sleeps in waitForIE in click handler. Does anyone know how to handle this properly in non-blocking mode? (BTW, I am using Watir 1.31 because Watir 1.41 exe installer is broken and the Watir 1.4 zip installer breaks with "C:/Program Files/Watir/install.rb:16: uninitialized constant Fox") TIA, Miroslav CODE: -------------------------------------------- # click nth image with given src (src, idx) where idx starts from 1 len = ie.images.length() counter = 0 for x in 1..len do if ie.images[x].src == src counter = counter + 1 if counter == idx ie.images[x].click puts "--------- After click" end end end From schampailler at easynet.be Thu Dec 8 05:46:42 2005 From: schampailler at easynet.be (Stefan Champailler) Date: Thu, 8 Dec 2005 11:46:42 +0100 Subject: [Wtr-general] Watir and firefox Message-ID: <200512081146.42671.schampailler@easynet.be> Dear Watir, As several of us, I'd like to use Watir with firefox. So I wondered how this could be done and did some experiment. So far, I have a proof of concept for wiring Ruby, gtk_mozembed and XPCOM HTMLDOMDocument together. I'd like to know if I'm heading in the rights direction, if this is worth the effort (an XPCOM binding is a lot of work), etc. I'm ready to share my code but have no web access... stF From zeljko.filipin at gmail.com Thu Dec 8 06:06:44 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 8 Dec 2005 12:06:44 +0100 Subject: [Wtr-general] Non-blocking image click In-Reply-To: <00a901c5fbe3$b39ff600$0ec8a8c0@helixmr> Message-ID: <002d01c5fbe7$7abf9440$c6e7fea9@officezg.wa> I can not help you with your problem, but I installed 1.4.1 watir gem a few days ago. Try (in command prompt): gem install watir By the way, it is nice to know that I am not the only one from Croatia using watir. :) Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Miroslav Rajcic Sent: Thursday, December 08, 2005 11:40 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Non-blocking image click I am having a problem with clicking the image that is a link for a file download. In my code I start a separate thread to handle File Save dialog (using its own WinClicker object) and it works OK, but the problem is that the main thread blocks forever in the image click call and I never see text "After call" (see code below) It seems that image click from below is execute nicely because fiel save dialog is triggered (and handled), but as the IE page was not changed, my IE object blocks forever in the click handler. Sending Ctrl+C to the console reveals that it sleeps in waitForIE in click handler. Does anyone know how to handle this properly in non-blocking mode? (BTW, I am using Watir 1.31 because Watir 1.41 exe installer is broken and the Watir 1.4 zip installer breaks with "C:/Program Files/Watir/install.rb:16: uninitialized constant Fox") TIA, Miroslav CODE: -------------------------------------------- # click nth image with given src (src, idx) where idx starts from 1 len = ie.images.length() counter = 0 for x in 1..len do if ie.images[x].src == src counter = counter + 1 if counter == idx ie.images[x].click puts "--------- After click" end end end _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From rajcic at sokrates.hr Thu Dec 8 06:34:39 2005 From: rajcic at sokrates.hr (Miroslav Rajcic) Date: Thu, 8 Dec 2005 12:34:39 +0100 Subject: [Wtr-general] Non-blocking image click References: <002d01c5fbe7$7abf9440$c6e7fea9@officezg.wa> Message-ID: <00f101c5fbeb$604be4c0$0ec8a8c0@helixmr> Thanks, I've managed to install watir 1.4.1 using the gem tool, but unfortunately, my problem still persists. So my question is this: How do the rest of you handle problem of the file download links ? Is there any workaround way to prevent eternal blocking ? Regards, Miro PS. Watir seems cool tool for website regression testing, but I would like to see some faster methods (I am using WinClicker::getWindowHandle) to search for popup window (perhaps a method that restrict searching only to the popups that are children of a given IE object). Or perhaps such method already exists ? ----- Original Message ----- From: "Zeljko Filipin" To: Sent: Thursday, December 08, 2005 12:06 PM Subject: Re: [Wtr-general] Non-blocking image click > I can not help you with your problem, but I installed 1.4.1 watir gem a few > days ago. Try (in command prompt): > > gem install watir > > By the way, it is nice to know that I am not the only one from Croatia using > watir. :) > > Zeljko > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Miroslav Rajcic > Sent: Thursday, December 08, 2005 11:40 AM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Non-blocking image click > > I am having a problem with clicking the image that is a link for a file > download. > > In my code I start a separate thread to handle File Save dialog (using its > own WinClicker object) and it works OK, but the problem is that the main > thread blocks forever in the image click call and I never see text "After > call" > (see code below) > > It seems that image click from below is execute nicely because fiel save > dialog is triggered (and handled), > but as the IE page was not changed, my IE object blocks forever in the click > handler. > Sending Ctrl+C to the console reveals that it sleeps in waitForIE in click > handler. > > Does anyone know how to handle this properly in non-blocking mode? > > (BTW, I am using Watir 1.31 because Watir 1.41 exe installer is broken and > the Watir 1.4 zip installer breaks with "C:/Program > Files/Watir/install.rb:16: uninitialized constant Fox") > > TIA, > Miroslav > > CODE: > -------------------------------------------- > # click nth image with given src (src, idx) where idx starts from 1 > len = ie.images.length() > counter = 0 > for x in 1..len do > if ie.images[x].src == src > counter = counter + 1 > if counter == idx > ie.images[x].click > puts "--------- After click" > end > 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 amit.garde at gmail.com Thu Dec 8 08:28:34 2005 From: amit.garde at gmail.com (Amit Garde) Date: Thu, 8 Dec 2005 18:58:34 +0530 Subject: [Wtr-general] Watir and firefox In-Reply-To: <200512081146.42671.schampailler@easynet.be> References: <200512081146.42671.schampailler@easynet.be> Message-ID: <7661e6730512080528ifcddf98k3a00514a3d4a1254@mail.gmail.com> On 12/8/05, Stefan Champailler wrote: > > > > As several of us, I'd like to use Watir with firefox. So I wondered > how this could be done and did some experiment. So far, I have a > proof of concept for wiring Ruby, gtk_mozembed and XPCOM > HTMLDOMDocument together. > > I'd like to know if I'm heading in the rights direction, if this is > worth the effort (an XPCOM binding is a lot of work), etc. > > Speaking for myself (on the basis of some investigation aimed at getting Firefox supported), I think there is no one approach that can be said to be *the* correct approach. I don't believe the possible approaches have been examined sufficiently and enough experience accumulated yet for a definitive statement regarding which is best. That said, I'm working with a couple of people here in my company to get a means of supporting Firefox written (just for context, the XPath extension also came from here) and we looked at an approach using an XPCOM binding (using PyXPCOM as the model) as well as one based on JSSH and one based on Mozembed. We have decided to go with JSSH, the chief reason being that we could get a prototype based on JSSH up and running (albeit in a brittle way) pretty quickly but not with PyXPCOM while the Mozembed based approach looked as if it would require a lot of code (and in C/C++ rather than JavaScript as is the case with JSSH which involved more effort though not necessarily bad on that count alone) I agree that an XPCOM binding based approach would be a lot of work, and in addition at this point I'm not sure whether it will be able to drive all the aspects of browser functionality that is required and which JSSH seems to be able to do (this might just be my ignorance however). The JSSH based approach also has some potentially useful features such as letting a Watir script drive a FireFox instance on a remore computer. The JSSH version available seems kind of brittle and Firefox version specific so one aspect of getting the Watir-JSSH-Firefox path completed is to make that part much more robust than it is currently. We'd be interested in seeing your prototype code if you're okay with making it available. We will be releasing our FireFix driver when it's sufficiently stable for a wider audience. While I can't promise any dates for this, I'd expect this to be not too far into the future. We would also be interested in hearing from people who might have some experience and opinions on XPCOM approaches to FireFox automation (we'd initially felt that that was the way to go till we discovered JSSH) Amit -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051208/cdedecdc/attachment.html From schampailler at easynet.be Thu Dec 8 09:18:47 2005 From: schampailler at easynet.be (Stefan Champailler) Date: Thu, 8 Dec 2005 15:18:47 +0100 Subject: [Wtr-general] Watir and firefox In-Reply-To: <7661e6730512080528ifcddf98k3a00514a3d4a1254@mail.gmail.com> References: <200512081146.42671.schampailler@easynet.be> <7661e6730512080528ifcddf98k3a00514a3d4a1254@mail.gmail.com> Message-ID: <200512081518.48023.schampailler@easynet.be> > Speaking for myself (on the basis of some investigation aimed at > getting Firefox supported), I think there is no one approach that > can be said to be *the* correct approach. I don't believe the indeed, the job is pretty complex... Currently I'm stuck in front of two choices: - revive the rbXPCOM bindings, but my knowledge of both Ruby and XPCOM is not good enough to handle that alone - parse Mozilla's IDL into some C++ code Now, there's definitely one showstopper. If I control the gtk_mozembed browser, I have to be able to wait for it to complete the loading of a page. According to what I know (and don't know :)), this requires me to do an active wait for a "load complete" event. Unfortunately, one can't do such a while(messageNotArrived) do{wait} because one's inside the GTK main loop. That breaks the event model and forces us to be able to have one Ruby running the GTK browser and another one running the test scripts, outside GTK where active loops are OK. (I don't know if I make myself clear here :)). To restate in other words : a test is a sequential set of actions but when one is running GTK, the set of actions is event driven. With JSSH, I guess you're bypassing this issue because you're actually splitting the test and the GUI aspects in two concurrent programs... > ... > I > agree that an XPCOM binding based approach would be a lot of work, > and in addition at this point I'm not sure whether it will be able > to drive all the aspects of browser functionality that is required > and which JSSH seems to be able to do (this might just be my > ignorance however). What kind of aspects ? > The JSSH based approach also has some > potentially useful features such as letting a Watir script drive a > FireFox instance on a remore computer. Indeed, that's a point... > The JSSH version available > seems kind of brittle and Firefox version specific so one aspect > of ?getting the Watir-JSSH-Firefox path completed is to make that > part much more robust than it is currently. If you say so :) > > We'd be interested in seeing your prototype code if you're okay > with making it available. I'll send it to you. cheers, stF From noreply at rubyforge.org Thu Dec 8 13:06:22 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 8 Dec 2005 23:36:22 +0530 Subject: [Wtr-general] [ wtr-Bugs-2961 ] Text field to_s method fails Message-ID: <200512081806.jB8I6MIU022819@rubyforge.org> Bugs item #2961, was opened at 2005-12-08 23:36 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2961&group_id=104 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Angrez Singh (angrez) Assigned to: Nobody (None) Summary: Text field to_s method fails Initial Comment: Hi, Text field to_s method fails when this function tries to access maxLength method. This is because there is no method called maxLength but there is method called maxlength. Should I go ahead & fix it and commit the code. Regards, Angrez ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2961&group_id=104 From tomfeo at presslogic.com Thu Dec 8 20:13:14 2005 From: tomfeo at presslogic.com (Tom) Date: Thu, 8 Dec 2005 18:13:14 -0700 Subject: [Wtr-general] Accessing Table Footer In-Reply-To: <200512081518.48023.schampailler@easynet.be> Message-ID: Our developers got cute and decided to use the as the input row in a dynamic table instead of using another table. In my scripts, I used to refer to this input row using the :index and the table number, but now that it is a table footer, I'm having problems accessing it. I checked watir.rb and a search for 'foot' came up empty leading me to believe that is not supported. The row I'm trying to access contains a textfield and a couple of checkboxes. I can access the textfield using :index,1 as it is the only textfield on the page, but I'm having problems accessing the checkboxes. Of course, nothing has a static id value...yet. I'm still working on them about that. Since the table on the page is dynamic and the number of rows varies as you add items, I cannot just enter a row number for the table to access the input row. Any suggestions (other then getting dev to add static :id values) would be greatly appreciated. Thanks, Tom From Tierney at rdacorp.com Thu Dec 8 21:04:13 2005 From: Tierney at rdacorp.com (Mike Tierney) Date: Thu, 8 Dec 2005 21:04:13 -0500 Subject: [Wtr-general] another Javascript fire event question Message-ID: <7F56E1BD6DF3A34DB97A11A4494C6FB70268F1E7@corpexch.rdacorp.com> Here is another Java script question. I am trying to remove an item from a shopping cart. The remove button looks like this in Spysmith : I tried : $ie.button(:id, "CartControl_CartDataGrid__ctl3_RemoveButton1").fire_event("onclick") .. also some other permutations, no help. I am sure that I meet the criteria for 'page client validate' otherwise, but Watir cant seem to click this thing. Thanks for any help, Mike T. From jeff.darklight at gmail.com Thu Dec 8 22:27:43 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Thu, 8 Dec 2005 19:27:43 -0800 Subject: [Wtr-general] another Javascript fire event question In-Reply-To: <7F56E1BD6DF3A34DB97A11A4494C6FB70268F1E7@corpexch.rdacorp.com> References: <7F56E1BD6DF3A34DB97A11A4494C6FB70268F1E7@corpexch.rdacorp.com> Message-ID: Did you try: $ie.button( :id, "CartControl_CartDataGrid_ctl3_RemoveButton1" ).click should do it appropriately. j. On 12/8/05, Mike Tierney wrote: > > Here is another Java script question. I am trying to remove an item from > a shopping cart. The remove button looks like this in Spysmith : > onclick="if (typeof(Page_ClientValidate) == 'function') > Page_ClientValidate(); " type=image src="UIComponents/Images/remove.gif" > border=0 name=CartControl:CartDataGrid:_ctl3:RemoveButton1> > > I tried : > > $ie.button(:id, > "CartControl_CartDataGrid__ctl3_RemoveButton1").fire_event("onclick") > .. also some other permutations, no help. I am sure that I meet the > criteria for 'page client validate' otherwise, but Watir cant seem to click > this thing. Thanks for any help, Mike T. > > > > > _______________________________________________ > 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/20051208/96ee2851/attachment.html From angrez at gmail.com Fri Dec 9 00:03:47 2005 From: angrez at gmail.com (Angrez Singh) Date: Fri, 9 Dec 2005 10:33:47 +0530 Subject: [Wtr-general] Accessing Table Footer In-Reply-To: References: <200512081518.48023.schampailler@easynet.be> Message-ID: Hi Tom, I think an XPath expression will make your life easy. As you said that the id's are generated dynamically, but there should be something that binds the checkboxes together (may be the item name etc.) So you can write an XPath query to select the checkboxes on the basis of item name. So selection mechanism will look like: ie.checkbox(:xpath , " //td[contains(., (item name) )]/input/ ") This will first select a td that contains the item name and then select the input tag inside it. XPath doens't restrict you from using those tags that doesn't have a class in watir from using them in xpath expression. In your case if you want to access then your query will look like: ie.checkbox(:xpath, " //tfoot[contains(. , (item name) )]/input/ ") I don't know if I make myself clear here. If you still have doubt post your HTML here and lets see if we could provide any help. PS: This extension will be available in watir 1.5, if you want to have a preview you can download the tar ball from CVS HEAD. Regards, Angrez On 12/9/05, Tom < tomfeo at presslogic.com> wrote: > > Our developers got cute and decided to use the as the input row in > a > dynamic table instead of using another table. In my scripts, I used to > refer > to this input row using the :index and the table number, but now that it > is > a table footer, I'm having problems accessing it. I checked watir.rb and a > search for 'foot' came up empty leading me to believe that is not > supported. > > The row I'm trying to access contains a textfield and a couple of > checkboxes. I can access the textfield using :index,1 as it is the only > textfield on the page, but I'm having problems accessing the checkboxes. > > Of course, nothing has a static id value...yet. I'm still working on them > about that. Since the table on the page is dynamic and the number of rows > varies as you add items, I cannot just enter a row number for the table to > access the input row. > > Any suggestions (other then getting dev to add static :id values) would be > > greatly appreciated. > > Thanks, > > Tom > > > _______________________________________________ > 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/20051209/415512f1/attachment.html From noreply at rubyforge.org Fri Dec 9 00:30:57 2005 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 9 Dec 2005 11:00:57 +0530 Subject: [Wtr-general] [ wtr-Bugs-2978 ] label.to_s and link.to_s fails Message-ID: <200512090530.jB95Uvvk024948@rubyforge.org> Bugs item #2978, was opened at 2005-12-09 11:00 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2978&group_id=104 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Angrez Singh (angrez) Assigned to: Nobody (None) Summary: label.to_s and link.to_s fails Initial Comment: This is because the 'innerText' property in the base Element class has been renamed to 'text'. I had fixed it in my local copy. Should I go ahead & commit the code. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=487&aid=2978&group_id=104 From bret at pettichord.com Fri Dec 9 01:17:07 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 9 Dec 2005 00:17:07 -0600 Subject: [Wtr-general] another Javascript fire event question In-Reply-To: References: <7F56E1BD6DF3A34DB97A11A4494C6FB70268F1E7@corpexch.rdacorp.com> Message-ID: $ie.image( :id, "CartControl_CartDataGrid_ctl3_RemoveButton1" ).click On 12/8/05, Mike Tierney wrote: > > > > Here is another Java script question. I am trying to remove an item > > from a shopping cart. The remove button looks like this in Spysmith : > > > id=CartControl_CartDataGrid__ctl3_RemoveButton1 onclick="if > > (typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); " > > type=image src="UIComponents/Images/remove.gif" border=0 > > name=CartControl:CartDataGrid:_ctl3:RemoveButton1> > > > > I tried : > > > > $ie.button(:id, > > "CartControl_CartDataGrid__ctl3_RemoveButton1").fire_event("onclick") > > .. also some other permutations, no help. I am sure that I meet the > > criteria for 'page client validate' otherwise, but Watir cant seem to click > > this thing. Thanks for any help, Mike T. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051209/1d6cf320/attachment.html From bret at pettichord.com Fri Dec 9 01:30:56 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 9 Dec 2005 00:30:56 -0600 Subject: [Wtr-general] Accessing Table Footer In-Reply-To: References: <200512081518.48023.schampailler@easynet.be> Message-ID: > > Any suggestions (other then getting dev to add static :id values) would be > greatly appreciated. Extend Watir to handle the tfoot element. This is pretty easy using HEAD: module Watir class Tfoot < NonControlElement def self.tag; 'tfoot'; end end module Container def_creator :tfoot end end I think that's all you have to do. Then: ie.tfoot(:index, x).whatever -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051209/70c389dd/attachment.html From rajcic at sokrates.hr Fri Dec 9 02:02:46 2005 From: rajcic at sokrates.hr (Miroslav Rajcic) Date: Fri, 9 Dec 2005 08:02:46 +0100 Subject: [Wtr-general] Non-blocking image click References: <002d01c5fbe7$7abf9440$c6e7fea9@officezg.wa> <00f101c5fbeb$604be4c0$0ec8a8c0@helixmr> Message-ID: <007001c5fc8e$8efc1d50$0ec8a8c0@helixmr> I've managed to solve my problem by pathching Watir. I've copied code of click method and commented WaitForIE line and my script now works fine Perhaps someone might think of adding this into official version # This method clicks the active element. # raises: UnknownObjectException if the object is not found # ObjectDisabledException if the object is currently disabled def click_nonblocking() object_exist_check object_disabled_check highLight(:set) @o.click() #@ieController.waitForIE() highLight(:clear) end ----- Original Message ----- From: "Miroslav Rajcic" To: Sent: Thursday, December 08, 2005 12:34 PM Subject: Re: [Wtr-general] Non-blocking image click > Thanks, I've managed to install watir 1.4.1 using the gem tool, > but unfortunately, my problem still persists. > > So my question is this: > How do the rest of you handle problem of the file download links ? > Is there any workaround way to prevent eternal blocking ? > > Regards, > Miro > > PS. Watir seems cool tool for website regression testing, but I would like > to see > some faster methods (I am using WinClicker::getWindowHandle) to search for > popup window (perhaps a method that restrict searching only to the popups > that are children of a given IE object). Or perhaps such > method already exists ? > > > ----- Original Message ----- > From: "Zeljko Filipin" > To: > Sent: Thursday, December 08, 2005 12:06 PM > Subject: Re: [Wtr-general] Non-blocking image click > > > > I can not help you with your problem, but I installed 1.4.1 watir gem a > few > > days ago. Try (in command prompt): > > > > gem install watir > > > > By the way, it is nice to know that I am not the only one from Croatia > using > > watir. :) > > > > Zeljko > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Miroslav Rajcic > > Sent: Thursday, December 08, 2005 11:40 AM > > To: wtr-general at rubyforge.org > > Subject: [Wtr-general] Non-blocking image click > > > > I am having a problem with clicking the image that is a link for a file > > download. > > > > In my code I start a separate thread to handle File Save dialog (using its > > own WinClicker object) and it works OK, but the problem is that the main > > thread blocks forever in the image click call and I never see text "After > > call" > > (see code below) > > > > It seems that image click from below is execute nicely because fiel save > > dialog is triggered (and handled), > > but as the IE page was not changed, my IE object blocks forever in the > click > > handler. > > Sending Ctrl+C to the console reveals that it sleeps in waitForIE in click > > handler. > > > > Does anyone know how to handle this properly in non-blocking mode? > > > > (BTW, I am using Watir 1.31 because Watir 1.41 exe installer is broken > and > > the Watir 1.4 zip installer breaks with "C:/Program > > Files/Watir/install.rb:16: uninitialized constant Fox") > > > > TIA, > > Miroslav > > > > CODE: > > -------------------------------------------- > > # click nth image with given src (src, idx) where idx starts from 1 > > len = ie.images.length() > > counter = 0 > > for x in 1..len do > > if ie.images[x].src == src > > counter = counter + 1 > > if counter == idx > > ie.images[x].click > > puts "--------- After click" > > end > > 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 > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From hrishij at synechron.com Fri Dec 9 03:11:12 2005 From: hrishij at synechron.com (Hrishikesh Jamadagni) Date: Fri, 9 Dec 2005 13:41:12 +0530 Subject: [Wtr-general] Line no In-Reply-To: <007001c5fc8e$8efc1d50$0ec8a8c0@helixmr> Message-ID: <000001c5fc98$1ff3d830$74021f0a@fusionpune.local> Does anybody know weather watir have specific function to go to a specific line no in the program. Regards hrishi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051209/925485c7/attachment.html From jeff.darklight at gmail.com Fri Dec 9 03:32:32 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Fri, 09 Dec 2005 00:32:32 -0800 Subject: [Wtr-general] Non-blocking image click In-Reply-To: <007001c5fc8e$8efc1d50$0ec8a8c0@helixmr> References: <002d01c5fbe7$7abf9440$c6e7fea9@officezg.wa> <00f101c5fbeb$604be4c0$0ec8a8c0@helixmr> <007001c5fc8e$8efc1d50$0ec8a8c0@helixmr> Message-ID: <43994120.6050105@gmail.com> Miroslav Rajcic wrote: >I've managed to solve my problem by pathching Watir. >I've copied code of click method and commented WaitForIE line and my script >now works fine > >Perhaps someone might think of adding this into official version > > # This method clicks the active element. > # raises: UnknownObjectException if the object is not found > # ObjectDisabledException if the object is currently disabled > def click_nonblocking() > > object_exist_check > object_disabled_check > > highLight(:set) > @o.click() > #@ieController.waitForIE() > highLight(:clear) > end > > >----- Original Message ----- >From: "Miroslav Rajcic" >To: >Sent: Thursday, December 08, 2005 12:34 PM >Subject: Re: [Wtr-general] Non-blocking image click > > > > >>Thanks, I've managed to install watir 1.4.1 using the gem tool, >>but unfortunately, my problem still persists. >> >>So my question is this: >> How do the rest of you handle problem of the file download links ? >> Is there any workaround way to prevent eternal blocking ? >> >>Regards, >> Miro >> >>PS. Watir seems cool tool for website regression testing, but I would like >>to see >>some faster methods (I am using WinClicker::getWindowHandle) to search for >>popup window (perhaps a method that restrict searching only to the popups >>that are children of a given IE object). Or perhaps such >>method already exists ? >> >> >>----- Original Message ----- >>From: "Zeljko Filipin" >>To: >>Sent: Thursday, December 08, 2005 12:06 PM >>Subject: Re: [Wtr-general] Non-blocking image click >> >> >> >> >>>I can not help you with your problem, but I installed 1.4.1 watir gem a >>> >>> >>few >> >> >>>days ago. Try (in command prompt): >>> >>>gem install watir >>> >>>By the way, it is nice to know that I am not the only one from Croatia >>> >>> >>using >> >> >>>watir. :) >>> >>>Zeljko >>> >>>-----Original Message----- >>>From: wtr-general-bounces at rubyforge.org >>>[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Miroslav Rajcic >>>Sent: Thursday, December 08, 2005 11:40 AM >>>To: wtr-general at rubyforge.org >>>Subject: [Wtr-general] Non-blocking image click >>> >>>I am having a problem with clicking the image that is a link for a file >>>download. >>> >>>In my code I start a separate thread to handle File Save dialog (using >>> >>> >its > > >>>own WinClicker object) and it works OK, but the problem is that the main >>>thread blocks forever in the image click call and I never see text >>> >>> >"After > > >>>call" >>>(see code below) >>> >>>It seems that image click from below is execute nicely because fiel save >>>dialog is triggered (and handled), >>>but as the IE page was not changed, my IE object blocks forever in the >>> >>> >>click >> >> >>>handler. >>>Sending Ctrl+C to the console reveals that it sleeps in waitForIE in >>> >>> >click > > >>>handler. >>> >>>Does anyone know how to handle this properly in non-blocking mode? >>> >>>(BTW, I am using Watir 1.31 because Watir 1.41 exe installer is broken >>> >>> >>and >> >> >>>the Watir 1.4 zip installer breaks with "C:/Program >>>Files/Watir/install.rb:16: uninitialized constant Fox") >>> >>>TIA, >>> Miroslav >>> >>>CODE: >>>-------------------------------------------- >>># click nth image with given src (src, idx) where idx starts from 1 >>>len = ie.images.length() >>> counter = 0 >>> for x in 1..len do >>> if ie.images[x].src == src >>> counter = counter + 1 >>> if counter == idx >>> ie.images[x].click >>> puts "--------- After click" >>> end >>> 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 >>> >>> >>> >>_______________________________________________ >>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 > > > Actually, I'd love to see the code for click get an argument def click( shouldBlock = true ) #code end ... j. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051209/c4d81295/attachment.html From schampailler at easynet.be Fri Dec 9 06:27:36 2005 From: schampailler at easynet.be (Stefan Champailler) Date: Fri, 9 Dec 2005 12:27:36 +0100 Subject: [Wtr-general] Watir and firefox In-Reply-To: <200512081518.48023.schampailler@easynet.be> References: <200512081146.42671.schampailler@easynet.be> <7661e6730512080528ifcddf98k3a00514a3d4a1254@mail.gmail.com> <200512081518.48023.schampailler@easynet.be> Message-ID: <200512091227.36795.schampailler@easynet.be> > > Speaking for myself (on the basis of some investigation aimed at > > getting Firefox supported), I think there is no one approach > > that can be said to be *the* correct approach. I don't believe > > the > > indeed, the job is pretty complex... Currently I'm stuck in front > of two choices: > - revive the rbXPCOM bindings, but my knowledge of both Ruby and > XPCOM is not good enough to handle that alone > - parse Mozilla's IDL into some C++ code > > Now, there's definitely one showstopper. If I control the > gtk_mozembed browser, I have to be able to wait for it to complete > the loading of a page. According to what I know (and don't know > :)), this requires me to do an active wait for a "load complete" > event. > ... After further investigation, this is not an issue... GTK is flexible enough to allow me to switch from event driven to sequential execution at will. One more point for the XPCOM approach :) stF From Tierney at rdacorp.com Fri Dec 9 12:32:25 2005 From: Tierney at rdacorp.com (Mike Tierney) Date: Fri, 9 Dec 2005 12:32:25 -0500 Subject: [Wtr-general] another Javascript fire event question Message-ID: <7F56E1BD6DF3A34DB97A11A4494C6FB70268F1EC@corpexch.rdacorp.com> No luck, I get : status of final page in test data row 27 workflow good ./../watir.rb:1928:in `assert_exists': Unable to locate object, using id and CartControl_CartDataGrid_ctl3_RemoveButton1 (Watir::Exception::UnknownObjectException) from ./../watir.rb:2009:in `click' from eStoreTest3.rb:323 ________________________________ From: wtr-general-bounces at rubyforge.org on behalf of Jeff Wood Sent: Thu 12/8/2005 10:27 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] another Javascript fire event question Did you try: $ie.button( :id, "CartControl_CartDataGrid_ctl3_RemoveButton1" ).click should do it appropriately. j. On 12/8/05, Mike Tierney wrote: Here is another Java script question. I am trying to remove an item from a shopping cart. The remove button looks like this in Spysmith : I tried : $ie.button(:id, "CartControl_CartDataGrid__ctl3_RemoveButton1").fire_event("onclick") .. also some other permutations, no help. I am sure that I meet the criteria for 'page client validate' otherwise, but Watir cant seem to click this thing. Thanks for any help, Mike T. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 4637 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20051209/43f3cac3/attachment.bin From rajcic at sokrates.hr Sat Dec 10 03:59:22 2005 From: rajcic at sokrates.hr (Miroslav Rajcic) Date: Sat, 10 Dec 2005 09:59:22 +0100 Subject: [Wtr-general] Link that can not be found References: <002d01c5fbe7$7abf9440$c6e7fea9@officezg.wa><00f101c5fbeb$604be4c0$0ec8a8c0@helixmr> <007001c5fc8e$8efc1d50$0ec8a8c0@helixmr> Message-ID: <009601c5fd68$03f681c0$0ec8a8c0@helixmr> I am having the problem with the link of the following form: Sign in And it appears that the both lines below can not find the link to click: ie.link(:name, "Sign in").click ie.link(:name, "Sign in").click On execution I get error: c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1979:in `object_exist_check': Unable to locate object, using name and Sign in (Watir::Exception::UnknownObjectExc eption) Does anyone know how to solve this? Link itself is not part of any form, it is placed in a simple table, and I am using Watir 1.4.1. TIA From satti at qantom.com Sat Dec 10 04:23:51 2005 From: satti at qantom.com (Sathya Shankar) Date: Sat, 10 Dec 2005 14:53:51 +0530 Subject: [Wtr-general] Link that can not be found In-Reply-To: <009601c5fd68$03f681c0$0ec8a8c0@helixmr> References: <002d01c5fbe7$7abf9440$c6e7fea9@officezg.wa><00f101c5fbeb$604be4c0$0ec8a8c0@helixmr> <007001c5fc8e$8efc1d50$0ec8a8c0@helixmr> <009601c5fd68$03f681c0$0ec8a8c0@helixmr> Message-ID: <439A9EA7.9080400@qantom.com> Try using the regular expressions. ie.link(:name, "/.*Sign in.*/").click This might work Bye Sathya Shankar Miroslav Rajcic wrote: >I am having the problem with the link of the following form: > >Sign in > >And it appears that the both lines below can not find the link to click: >ie.link(:name, "Sign in").click >ie.link(:name, "Sign in").click > >On execution I get error: >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1979:in `object_exist_check': Unable >to >locate object, using name and Sign in >(Watir::Exception::UnknownObjectExc >eption) > >Does anyone know how to solve this? >Link itself is not part of any form, it is placed in a simple table, and I >am using Watir 1.4.1. > >TIA > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > -- In most parts of the world they drive on the left of the road. In Bangalore we drive on what?s left of the road. Sathya Shankar M G Software Engineer Qantom Software http://www.qantom.com Ph : 26799269 Xtn. 123 sip : satti at sip411.com From dave at burt.id.au Sat Dec 10 08:15:26 2005 From: dave at burt.id.au (Dave Burt) Date: Sun, 11 Dec 2005 00:15:26 +1100 Subject: [Wtr-general] Line no In-Reply-To: <000001c5fc98$1ff3d830$74021f0a@fusionpune.local> References: <007001c5fc8e$8efc1d50$0ec8a8c0@helixmr> <000001c5fc98$1ff3d830$74021f0a@fusionpune.local> Message-ID: <3ad74bc80512100515g3f3f207ere1330d09c235a241@mail.gmail.com> > Does anybody know weather watir have specific function to go to a specific > line no in the program. Yes, it doesn't. You can get an addon to add goto capability from http://raa.ruby-lang.org/project/ruby-goto/ But you don't want to. There's a better way to do what you want to do, but I don't know what it is specifically unless you say a bit more about what you are trying to accomplish. Cheers, Dave From jeff.darklight at gmail.com Sat Dec 10 08:35:07 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Sat, 10 Dec 2005 05:35:07 -0800 Subject: [Wtr-general] Link that can not be found In-Reply-To: <009601c5fd68$03f681c0$0ec8a8c0@helixmr> References: <002d01c5fbe7$7abf9440$c6e7fea9@officezg.wa><00f101c5fbeb$604be4c0$0ec8a8c0@helixmr> <007001c5fc8e$8efc1d50$0ec8a8c0@helixmr> <009601c5fd68$03f681c0$0ec8a8c0@helixmr> Message-ID: <439AD98B.3080309@gmail.com> Miroslav Rajcic wrote: >I am having the problem with the link of the following form: > >Sign in > >And it appears that the both lines below can not find the link to click: >ie.link(:name, "Sign in").click >ie.link(:name, "Sign in").click > >On execution I get error: >c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1979:in `object_exist_check': Unable >to >locate object, using name and Sign in >(Watir::Exception::UnknownObjectExc >eption) > >Does anyone know how to solve this? >Link itself is not part of any form, it is placed in a simple table, and I >am using Watir 1.4.1. > >TIA > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > The portion of data you are looking at is the "text" of the link, not the name... so, ie.link( :text, "Sign in" ).click should work. j. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051210/9adc0297/attachment.html From bret at pettichord.com Sat Dec 10 13:08:33 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 10 Dec 2005 12:08:33 -0600 Subject: [Wtr-general] Non-blocking image click In-Reply-To: <007001c5fc8e$8efc1d50$0ec8a8c0@helixmr> References: <002d01c5fbe7$7abf9440$c6e7fea9@officezg.wa> <00f101c5fbeb$604be4c0$0ec8a8c0@helixmr> <007001c5fc8e$8efc1d50$0ec8a8c0@helixmr> Message-ID: Watir 1.5 will have a click method that will not only fail to block in your scenario, but will also fail to block when raising modal dialogs (a case where your code will still block). Right now (in my uncommitted code) this is called "click_no_wait". Comments please on the best name for this method. Is "click_nonblocking" better? How about "click_dammit!"? Bret On 12/9/05, Miroslav Rajcic wrote: > > I've managed to solve my problem by pathching Watir. > I've copied code of click method and commented WaitForIE line and my > script > now works fine > > Perhaps someone might think of adding this into official version > > # This method clicks the active element. > # raises: UnknownObjectException if the object is not found > # ObjectDisabledException if the object is currently disabled > def click_nonblocking() > > object_exist_check > object_disabled_check > > highLight(:set) > @o.click() > #@ieController.waitForIE() > highLight(:clear) > end > > > ----- Original Message ----- > From: "Miroslav Rajcic" > To: > Sent: Thursday, December 08, 2005 12:34 PM > Subject: Re: [Wtr-general] Non-blocking image click > > > > Thanks, I've managed to install watir 1.4.1 using the gem tool, > > but unfortunately, my problem still persists. > > > > So my question is this: > > How do the rest of you handle problem of the file download links ? > > Is there any workaround way to prevent eternal blocking ? > > > > Regards, > > Miro > > > > PS. Watir seems cool tool for website regression testing, but I would > like > > to see > > some faster methods (I am using WinClicker::getWindowHandle) to search > for > > popup window (perhaps a method that restrict searching only to the > popups > > that are children of a given IE object). Or perhaps such > > method already exists ? > > > > > > ----- Original Message ----- > > From: "Zeljko Filipin" > > To: > > Sent: Thursday, December 08, 2005 12:06 PM > > Subject: Re: [Wtr-general] Non-blocking image click > > > > > > > I can not help you with your problem, but I installed 1.4.1 watir gem > a > > few > > > days ago. Try (in command prompt): > > > > > > gem install watir > > > > > > By the way, it is nice to know that I am not the only one from Croatia > > using > > > watir. :) > > > > > > Zeljko > > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org > > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Miroslav > Rajcic > > > Sent: Thursday, December 08, 2005 11:40 AM > > > To: wtr-general at rubyforge.org > > > Subject: [Wtr-general] Non-blocking image click > > > > > > I am having a problem with clicking the image that is a link for a > file > > > download. > > > > > > In my code I start a separate thread to handle File Save dialog (using > its > > > own WinClicker object) and it works OK, but the problem is that the > main > > > thread blocks forever in the image click call and I never see text > "After > > > call" > > > (see code below) > > > > > > It seems that image click from below is execute nicely because fiel > save > > > dialog is triggered (and handled), > > > but as the IE page was not changed, my IE object blocks forever in the > > click > > > handler. > > > Sending Ctrl+C to the console reveals that it sleeps in waitForIE in > click > > > handler. > > > > > > Does anyone know how to handle this properly in non-blocking mode? > > > > > > (BTW, I am using Watir 1.31 because Watir 1.41 exe installer is > broken > > and > > > the Watir 1.4 zip installer breaks with "C:/Program > > > Files/Watir/install.rb:16: uninitialized constant Fox") > > > > > > TIA, > > > Miroslav > > > > > > CODE: > > > -------------------------------------------- > > > # click nth image with given src (src, idx) where idx starts from 1 > > > len = ie.images.length() > > > counter = 0 > > > for x in 1..len do > > > if ie.images[x].src == src > > > counter = counter + 1 > > > if counter == idx > > > ie.images[x].click > > > puts "--------- After click" > > > end > > > 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 > > > > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051210/a0fa35ec/attachment.html From christopher.mcmahon at gmail.com Sun Dec 11 02:17:48 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Sun, 11 Dec 2005 01:17:48 -0600 Subject: [Wtr-general] Non-blocking image click In-Reply-To: References: <002d01c5fbe7$7abf9440$c6e7fea9@officezg.wa> <00f101c5fbeb$604be4c0$0ec8a8c0@helixmr> <007001c5fc8e$8efc1d50$0ec8a8c0@helixmr> Message-ID: <72799cd70512102317k45a57bb2kf21e720c6e8e94b5@mail.gmail.com> On 12/10/05, Bret Pettichord wrote: > Watir 1.5 will have a click method that will not only fail to block in your > scenario, but will also fail to block when raising modal dialogs (a case > where your code will still block). Ooooh. Aaaah Y'all may not realize how spectacular this is, but it's pretty darned neato. > Right now (in my uncommitted code) this is called "click_no_wait". Comments > please on the best name for this method. Is "click_nonblocking" better? How > about "click_dammit!"? So this is just me, but I *love* "dammit" methods. If it doesn't do what you think it should, then you're forced to RTFM. I think "click_popup_dammit" would be the best the best name. I'd use it, and not RTFM. It speaks to me. :) -Chris From rajcic at sokrates.hr Sun Dec 11 03:49:40 2005 From: rajcic at sokrates.hr (Miroslav Rajcic) Date: Sun, 11 Dec 2005 09:49:40 +0100 Subject: [Wtr-general] Link that can not be found References: <002d01c5fbe7$7abf9440$c6e7fea9@officezg.wa><00f101c5fbeb$604be4c0$0ec8a8c0@helixmr> <007001c5fc8e$8efc1d50$0ec8a8c0@helixmr><009601c5fd68$03f681c0$0ec8a8c0@helixmr> <439AD98B.3080309@gmail.com> Message-ID: <002f01c5fe2f$d34cc930$0ec8a8c0@helixmr> The portion of data you are looking at is the "text" of the link, not the name... so, ie.link( :text, "Sign in" ).click should work. j. That was it, thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051211/85a03f53/attachment.html From rajcic at sokrates.hr Sun Dec 11 03:52:55 2005 From: rajcic at sokrates.hr (Miroslav Rajcic) Date: Sun, 11 Dec 2005 09:52:55 +0100 Subject: [Wtr-general] Non-blocking image click References: <002d01c5fbe7$7abf9440$c6e7fea9@officezg.wa><00f101c5fbeb$604be4c0$0ec8a8c0@helixmr><007001c5fc8e$8efc1d50$0ec8a8c0@helixmr> Message-ID: <005401c5fe30$4752ef30$0ec8a8c0@helixmr> Perhaps the Jeff's proposal should be considered, quote: -------------------- def click( shouldBlock = true ) #code end -------------------- This way, when no parameter is given, method behaves as usual. Miro ----- Original Message ----- From: Bret Pettichord To: wtr-general at rubyforge.org Sent: Saturday, December 10, 2005 7:08 PM Subject: Re: [Wtr-general] Non-blocking image click Watir 1.5 will have a click method that will not only fail to block in your scenario, but will also fail to block when raising modal dialogs (a case where your code will still block). Right now (in my uncommitted code) this is called "click_no_wait". Comments please on the best name for this method. Is "click_nonblocking" better? How about "click_dammit!"? Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051211/436a8151/attachment.html From hrishij at synechron.com Mon Dec 12 00:28:59 2005 From: hrishij at synechron.com (Hrishikesh Jamadagni) Date: Mon, 12 Dec 2005 10:58:59 +0530 Subject: [Wtr-general] Browsers url Message-ID: <000001c5fedc$f5db0900$74021f0a@fusionpune.local> Does any body has a idea how to check browsers url using watir, Is the syntax assert_equal url(:show, ' http://www.google.co.in/ '), ie.url correct?? Regards hrishi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051212/d4a49a85/attachment.html From hrishij at synechron.com Mon Dec 12 00:42:06 2005 From: hrishij at synechron.com (Hrishikesh Jamadagni) Date: Mon, 12 Dec 2005 11:12:06 +0530 Subject: [Wtr-general] url checking In-Reply-To: <005401c5fe30$4752ef30$0ec8a8c0@helixmr> Message-ID: <000001c5fede$cab2d6c0$74021f0a@fusionpune.local> Does any body has a idea how to check browsers url using watir, Is the syntax assert_equal url(:show, ' http://www.google.co.in/ '), ie.url correct?? Regards hrishi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051212/4cd725e2/attachment.html From zeljko.filipin at gmail.com Mon Dec 12 03:21:48 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Mon, 12 Dec 2005 09:21:48 +0100 Subject: [Wtr-general] url checking In-Reply-To: <000001c5fede$cab2d6c0$74021f0a@fusionpune.local> Message-ID: <001901c5fef5$19c28bf0$c6e7fea9@officezg.wa> To get browser url: ie.url To assert: assert_equal('http://www.google.co.in/', ie.url) Hope it helps. Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Hrishikesh Jamadagni Sent: Monday, December 12, 2005 6:42 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] url checking Does any body has a idea how to check browsers url using watir, Is the syntax assert_equal url(:show, ' http://www.google.co.in/ '), ie.url correct?? Regards hrishi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051212/a3f50ac1/attachment.html From bret at pettichord.com Mon Dec 12 12:58:46 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 12 Dec 2005 11:58:46 -0600 Subject: [Wtr-general] Non-blocking image click In-Reply-To: <005401c5fe30$4752ef30$0ec8a8c0@helixmr> References: <002d01c5fbe7$7abf9440$c6e7fea9@officezg.wa> <00f101c5fbeb$604be4c0$0ec8a8c0@helixmr> <007001c5fc8e$8efc1d50$0ec8a8c0@helixmr> Message-ID: <5.1.0.14.2.20051212115533.03fb80a8@pop.gmail.com> At 02:52 AM 12/11/2005, Miroslav Rajcic wrote: >def click( shouldBlock = true ) > #code >end -1, as this increases obscurity. Who could guess what this click method is actually doing? ie.button(:name, "foo").click(true) A guiding principle of the Watir API is that the code should do pretty much what you'd expect it to do simply from reading it. Bret _____________________ Bret Pettichord www.pettichord.com From carl.l.shaulis at convergys.com Mon Dec 12 13:43:48 2005 From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com) Date: Mon, 12 Dec 2005 12:43:48 -0600 Subject: [Wtr-general] Global variables Message-ID: Good afternoon: I am looking for a means to set some global variables and pass them on to other scripts. I was attempting to set some global variables in a file similar to the "all_test.rb" or the "setup.rb". I would like all scripts called from setup.rb to use these global variables. It is not clear to me from my investigation as to how to pass variables from one script to another. Can this be done in Ruby? Alternatively I will be looking at using a properties file or xml file to set these variables. What is the most efficient way in watir to have most files use the same global variables? Any thoughts or hints 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 bagee at aventail.com Mon Dec 12 14:15:08 2005 From: bagee at aventail.com (Bill Agee) Date: Mon, 12 Dec 2005 11:15:08 -0800 Subject: [Wtr-general] Global variables Message-ID: <30561FB511309F44A56833A491C9FEC6026A1FB4@exchange2.in.aventail.com> There are probably a couple of ways to do this, but here's one suggestion (which may not be the cleanest): If you're going to use system() to run the separate scripts, it might work to just place your global vars as extra args inside the command you send to system(). Then your separate scripts could read in the global args. For example in your main script (note - I'm new to Ruby so there may be some errors in here): $foo = "some value" $bar = "another value" system("helperscript.rb #{$foo} #{$bar}") Then inside your helper script, the extra args should automatically be in ARGV[0] and ARGV[1], ready to be assigned/used/etc. (Or you could investigate the GetoptLong class for more commandline processing features.) There may be some other smooth and Rubyish way to do this that I don't know... Thanks Bill > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of > carl.l.shaulis at convergys.com > Sent: Monday, December 12, 2005 10:44 AM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Global variables > > Good afternoon: > > I am looking for a means to set some global variables and > pass them on to other scripts. I was attempting to set some > global variables in a file similar to the "all_test.rb" or > the "setup.rb". I would like all scripts called from > setup.rb to use these global variables. It is not clear to > me from my investigation as to how to pass variables from one > script to another. Can this be done in Ruby? > > Alternatively I will be looking at using a properties file or > xml file to set these variables. > > What is the most efficient way in watir to have most files > use the same global variables? > > Any thoughts or hints 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." > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-> general > From dara.lillis at kiodex.com Mon Dec 12 15:04:41 2005 From: dara.lillis at kiodex.com (Dara Lillis) Date: Mon, 12 Dec 2005 12:04:41 -0800 Subject: [Wtr-general] Global variables Message-ID: <4AE2782C2093B34784E67971035A81600B5C76BB@ehost011-2.exch011.intermedia.net> To clarify: in Ruby, a variable prefixed with a dollar sign IS a global variable. If you define a variable as, say, $foo in your "all_tests.rb" you don't need to pass it to scripts called from "all_tests.rb" - making it a global variable takes care of that. Once you have defined it as a global variable, you should be able to use $foo in other scripts without having to do any additional work. See the section "Scope of Constants and Variables" here: http://www.rubycentral.com/book/language.html -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bill Agee Sent: Monday, December 12, 2005 2:15 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Global variables There are probably a couple of ways to do this, but here's one suggestion (which may not be the cleanest): If you're going to use system() to run the separate scripts, it might work to just place your global vars as extra args inside the command you send to system(). Then your separate scripts could read in the global args. For example in your main script (note - I'm new to Ruby so there may be some errors in here): $foo = "some value" $bar = "another value" system("helperscript.rb #{$foo} #{$bar}") Then inside your helper script, the extra args should automatically be in ARGV[0] and ARGV[1], ready to be assigned/used/etc. (Or you could investigate the GetoptLong class for more commandline processing features.) There may be some other smooth and Rubyish way to do this that I don't know... Thanks Bill > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of > carl.l.shaulis at convergys.com > Sent: Monday, December 12, 2005 10:44 AM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Global variables > > Good afternoon: > > I am looking for a means to set some global variables and pass them on > to other scripts. I was attempting to set some global variables in a > file similar to the "all_test.rb" or the "setup.rb". I would like > all scripts called from setup.rb to use these global variables. It is > not clear to me from my investigation as to how to pass variables from > one script to another. Can this be done in Ruby? > > Alternatively I will be looking at using a properties file or xml file > to set these variables. > > What is the most efficient way in watir to have most files use the > same global variables? > > Any thoughts or hints 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." > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-> general > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Mon Dec 12 15:22:39 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 12 Dec 2005 14:22:39 -0600 Subject: [Wtr-general] Global variables In-Reply-To: Message-ID: <5.1.0.14.2.20051212141615.041a91e8@pop.gmail.com> At 12:43 PM 12/12/2005, carl.l.shaulis at convergys.com wrote: >What is the most efficient way in watir to have most files use the same >global variables? Define/assign all your global variables in setup.rb, like this: $foo = 'bar' At the top of each of your tests, do this: require 'setup' That's how the unittests work. The same should work for you. You might have to fiddle with your load path to make this work, depending on how you run your tests. Bret _____________________ Bret Pettichord www.pettichord.com From carl.l.shaulis at convergys.com Mon Dec 12 15:42:11 2005 From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com) Date: Mon, 12 Dec 2005 14:42:11 -0600 Subject: [Wtr-general] Global variables In-Reply-To: <4AE2782C2093B34784E67971035A81600B5C76BB@ehost011-2.exch011.intermedia.net> Message-ID: Thanks for the replies! I had tried what Dara suggested and it did not work. Well the lesson is that if you do not type the variable names correctly it will never work! Dara - Thanks for forcing me to peer review my code! :0) Also thanks for the other replies. Carl From David.J.Solis at wellsfargo.com Mon Dec 12 19:20:17 2005 From: David.J.Solis at wellsfargo.com (David.J.Solis at wellsfargo.com) Date: Mon, 12 Dec 2005 18:20:17 -0600 Subject: [Wtr-general] Assert Question Message-ID: <493148DCF171954FBBF8E8AAB261638C2E3636@msgswbmnmsp35.wellsfargo.com> When using this assert in an if statement, the second half of the condition is skipped if the first half is false. Basically, the assert returns the error and prints it, but the "else" part of the condition is not executed. Any ideas? if assert(ie.contains_text("Test verification point.")) puts("TEST PASSED. Found test string: 'Test verification point.' ") else puts("TEST FAILED.") end -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051212/1e7a1839/attachment.html From Sean.Gallagher at ticketmaster.com Mon Dec 12 20:54:48 2005 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Mon, 12 Dec 2005 17:54:48 -0800 Subject: [Wtr-general] Assert Question Message-ID: <71D28C8451BFD5119B2B00508BE26E640BCDDFCA@pasmail3.office.tmcs> > > When using this assert in an if statement, the second half of > the condition is skipped if the first half is false. > Basically, the assert returns the error and prints it, but > the "else" part of the condition is not executed. Any ideas? > > if assert(ie.contains_text("Test verification point.")) > puts("TEST PASSED. Found test string: 'Test verification point.' ") > else > puts("TEST FAILED.") > end > David, Try using a message in your assert, like so: assert(boolean, [message]) For example: assert(ie.contains_text("Test verification point."), "Some message") No if/else required. Check out Test::Unit::Assertions for more info: http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit/Asser tions.html -sean From eduardorochabr at gmail.com Mon Dec 12 21:07:07 2005 From: eduardorochabr at gmail.com (Eduardo Rocha) Date: Tue, 13 Dec 2005 00:07:07 -0200 Subject: [Wtr-general] Assert Question In-Reply-To: <71D28C8451BFD5119B2B00508BE26E640BCDDFCA@pasmail3.office.tmcs> References: <71D28C8451BFD5119B2B00508BE26E640BCDDFCA@pasmail3.office.tmcs> Message-ID: If this code belongs to a test method in a subclass of Test::Unit::TestCase, the code will never do what is suposed to. If the text is present, it evals "assert(true)", which in turn returns nil. That way, the message TEST FAILED will be shown if the test passes. If the text is absent, it evals "assert(false)", which raises an exception, and the method exists and does not print anything. Try what Sean pointed, and if you still wants to print messages to console, you could write: contains = ie.contains_text("Test verification point.") puts "TEST PASSED" if contains puts "TEST FAILED" unless contains assert(contains, "my verification failed") 2005/12/12, Sean Gallagher : > > > > When using this assert in an if statement, the second half of > > the condition is skipped if the first half is false. > > Basically, the assert returns the error and prints it, but > > the "else" part of the condition is not executed. Any ideas? > > > > if assert(ie.contains_text("Test verification point.")) > > puts("TEST PASSED. Found test string: 'Test verification point.' ") > > else > > puts("TEST FAILED.") > > end > > > > David, > Try using a message in your assert, like so: > assert(boolean, [message]) > > For example: > assert(ie.contains_text("Test verification point."), "Some message") > > No if/else required. > > Check out Test::Unit::Assertions for more info: > http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit/Asser > tions.html > > -sean > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From dave at daveliebreich.com Mon Dec 12 22:15:35 2005 From: dave at daveliebreich.com (Dave Liebreich) Date: Mon, 12 Dec 2005 19:15:35 -0800 Subject: [Wtr-general] Watir and Firefox via jssh Message-ID: <439E3CD7.2000309@daveliebreich.com> Hi all, Anyone still interested in working on this? I just successfully compiled Firefox 1.5 with the jssh extension (rather than installing the extension .xpi file). Due to an overlong stint as a PHB, I'm woefully behind in learning Ruby and Watir. But now I'm being paid to improve and increase the testing of mozilla project applications, and I'd love to work with someone to get Watir working with Firefox. Thanks -Dave Liebreich Test Architect Mozilla Corporation davel at mozilla.com dave at daveliebreich.com From raghu at qantom.com Tue Dec 13 00:36:42 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Tue, 13 Dec 2005 11:06:42 +0530 Subject: [Wtr-general] Watir and Firefox via jssh In-Reply-To: <439E3CD7.2000309@daveliebreich.com> References: <439E3CD7.2000309@daveliebreich.com> Message-ID: <439E5DEA.1020708@qantom.com> Hi Dave, We here at Qantom would love to be involved in such an effort. We are currently in the middle of some office upgrade effort which should take us a couple of weeks. This should take us till the end of the year. After this, I am planning to dedicate some resource entirely to Wet and Watir. In the meantime, if there are links, pointers, etc., that you want to share with us, that'll be great. Thanks Raghu -- Qantom Software http://www.qantom.org http://www.wet.qantom.org Ph : 91-80-26799269 Xtn. 125 sip : raghu at sip411.com -- Dave Liebreich wrote: >Hi all, > >Anyone still interested in working on this? > >I just successfully compiled Firefox 1.5 with the jssh extension (rather >than installing the extension .xpi file). > >Due to an overlong stint as a PHB, I'm woefully behind in learning Ruby >and Watir. But now I'm being paid to improve and increase the testing >of mozilla project applications, and I'd love to work with someone to >get Watir working with Firefox. > >Thanks > >-Dave Liebreich >Test Architect >Mozilla Corporation >davel at mozilla.com >dave at daveliebreich.com >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > > From beth at squalor.com Tue Dec 13 19:05:09 2005 From: beth at squalor.com (beth ferguson) Date: Tue, 13 Dec 2005 16:05:09 -0800 Subject: [Wtr-general] Concurrent Testing using Watir. In-Reply-To: References: Message-ID: <439F61B5.4050308@squalor.com> I've been trying to write a performance test which concurrently makes http posts. It seems to me that the example of concurrency included w/ Watir (i've included my bastardized version below), completes these posts sequentially rather than concurrently. Am I overlooking or misinterpreting something? Thanks as Always- Beth #------------------------------------------------------ # Vsat Response # Beth Ferguson # 12/12/05 # Vsat Response # Duplicate Multiple VSAT Response from MNS distribution #------------------------------------------------------- class VsatResponse def getFile $postList=Array.new File.open("vsatResponseHttp.txt") do |file| while line = file.gets $postList.push(line) end end return $postList end #get file def makePost(postList) for x in postList do ie = Watir::IE.start(x) puts x ie.close end end end #------------------------------------------------------ # Join Vsat Response Threads to Launch them concurrently (or close to) # Beth Ferguson # 12/12/05 # Join and Launch Multiple VSAT Response from MNS distribution # run the same test concurrently in separate browsers #------------------------------------------------------- threads = [] vSat = VsatResponse.new $responseList=vSat.getFile 1.times do threads << Thread.new {vSat.makePost($responseList)} #$responseList.shift #puts $responseList end threads.each {|x| x.join} From jeff.darklight at gmail.com Tue Dec 13 21:09:39 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Tue, 13 Dec 2005 18:09:39 -0800 Subject: [Wtr-general] Concurrent Testing using Watir. In-Reply-To: <439F61B5.4050308@squalor.com> References: <439F61B5.4050308@squalor.com> Message-ID: Either use the standard profiler with straight HTTP calls, or look into the RWB project ( ruby web benchmark ) ... I'd recommend RWB. Much better for concurrent testing ... j. On 12/13/05, beth ferguson wrote: > > I've been trying to write a performance test which concurrently makes > http posts. It seems to me that the example of concurrency included w/ > Watir (i've included my bastardized version below), completes these > posts sequentially rather than concurrently. Am I overlooking or > misinterpreting something? > > Thanks as Always- > > Beth > > #------------------------------------------------------ > # Vsat Response > # Beth Ferguson > # 12/12/05 > # Vsat Response > # Duplicate Multiple VSAT Response from MNS distribution > #------------------------------------------------------- > class VsatResponse > def getFile > $postList=Array.new > File.open("vsatResponseHttp.txt") do |file| > while line = file.gets > $postList.push(line) > end > end > return $postList > end #get file > def makePost(postList) > for x in postList do > ie = Watir::IE.start(x) > puts x > ie.close > end > end > end > > > #------------------------------------------------------ > # Join Vsat Response Threads to Launch them concurrently (or close to) > # Beth Ferguson > # 12/12/05 > # Join and Launch Multiple VSAT Response from MNS distribution > # run the same test concurrently in separate browsers > #------------------------------------------------------- > threads = [] > vSat = VsatResponse.new > $responseList=vSat.getFile > 1.times do > threads << Thread.new {vSat.makePost($responseList)} > #$responseList.shift > #puts $responseList > end > threads.each {|x| x.join} > _______________________________________________ > 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/20051213/e75a327a/attachment.html From jkohl at telusplanet.net Wed Dec 14 01:05:04 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Tue, 13 Dec 2005 23:05:04 -0700 Subject: [Wtr-general] Concurrent Testing using Watir. In-Reply-To: Message-ID: <000001c60074$546f6270$6500a8c0@tintin> Or something like the Grinder. The browser gets in the way with those sorts of testing. -Jonathan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood Sent: December 13, 2005 7:10 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Concurrent Testing using Watir. Either use the standard profiler with straight HTTP calls, or look into the RWB project ( ruby web benchmark ) ... I'd recommend RWB. Much better for concurrent testing ... j. On 12/13/05, beth ferguson wrote: I've been trying to write a performance test which concurrently makes http posts. It seems to me that the example of concurrency included w/ Watir (i've included my bastardized version below), completes these posts sequentially rather than concurrently. Am I overlooking or misinterpreting something? Thanks as Always- Beth #------------------------------------------------------ # Vsat Response # Beth Ferguson # 12/12/05 # Vsat Response # Duplicate Multiple VSAT Response from MNS distribution #------------------------------------------------------- class VsatResponse def getFile $postList=Array.new File.open("vsatResponseHttp.txt") do |file| while line = file.gets $postList.push(line) end end return $postList end #get file def makePost(postList) for x in postList do ie = Watir:: IE.start(x) puts x ie.close end end end #------------------------------------------------------ # Join Vsat Response Threads to Launch them concurrently (or close to) # Beth Ferguson # 12/12/05 # Join and Launch Multiple VSAT Response from MNS distribution # run the same test concurrently in separate browsers #------------------------------------------------------- threads = [] vSat = VsatResponse.new $responseList=vSat.getFile 1.times do threads << Thread.new {vSat.makePost($responseList)} #$responseList.shift #puts $responseList end threads.each {|x| x.join} _______________________________________________ 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/20051213/4fbd5d2b/attachment.html From bret at pettichord.com Wed Dec 14 02:02:44 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 14 Dec 2005 01:02:44 -0600 Subject: [Wtr-general] Assert Question In-Reply-To: <493148DCF171954FBBF8E8AAB261638C2E3636@msgswbmnmsp35.wellsfargo.com> References: <493148DCF171954FBBF8E8AAB261638C2E3636@msgswbmnmsp35.wellsfargo.com> Message-ID: David, You are looking at old, and incorrect documentation for Watir. Bret On 12/12/05, David.J.Solis at wellsfargo.com wrote: > > When using this assert in an if statement, the second half of the > condition is skipped if the first half is false. Basically, the assert > returns the error and prints it, but the "else" part of the condition is not > executed. Any ideas? > > if assert(ie.contains_text("Test verification point.")) > puts("TEST PASSED. Found test string: 'Test verification point.' ") > else > puts("TEST FAILED.") > end > > > > > _______________________________________________ > 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/20051214/e077da22/attachment.html From hrishij at synechron.com Wed Dec 14 02:28:39 2005 From: hrishij at synechron.com (Hrishikesh Jamadagni) Date: Wed, 14 Dec 2005 12:58:39 +0530 Subject: [Wtr-general] Assert Question In-Reply-To: Message-ID: <000001c60080$022a2c50$74021f0a@fusionpune.local> Bret, I am facing similar problem, only when the : If & else statement is combined With the rest of the code other wise it works fine. Hrishi -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Wednesday, December 14, 2005 12:33 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Assert Question David, You are looking at old, and incorrect documentation for Watir. Bret On 12/12/05, David.J.Solis at wellsfargo.com > wrote: When using this assert in an if statement, the second half of the condition is skipped if the first half is false. Basically, the assert returns the error and prints it, but the "else" part of the condition is not executed. Any ideas? if assert(ie.contains_text("Test verification point.")) puts("TEST PASSED. Found test string: 'Test verification point.' ") else puts("TEST FAILED.") end _______________________________________________ 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/20051214/5adfe2fe/attachment.html From rajcic at sokrates.hr Wed Dec 14 02:25:58 2005 From: rajcic at sokrates.hr (Miroslav Rajcic) Date: Wed, 14 Dec 2005 08:25:58 +0100 Subject: [Wtr-general] Code donation :) References: <002d01c5fbe7$7abf9440$c6e7fea9@officezg.wa><00f101c5fbeb$604be4c0$0ec8a8c0@helixmr><007001c5fc8e$8efc1d50$0ec8a8c0@helixmr> <5.1.0.14.2.20051212115533.03fb80a8@pop.gmail.com> Message-ID: <003a01c6007f$a1090f90$0ec8a8c0@helixmr> I thought to donate some code to the Watir project, in case the code is found useful. I needed method to wait for file download window to terminate (so I could chack if the local file has correct size), and the resulting code is found below. Regards, Miroslav # method to wait until window dissapears # # Parameters: # hwnd - window handle # # Returns: elapsed time in seconds # def waitUntilWindowGone(hwnd) puts "Preparing to wait until window terminates, hwnd=" + hwnd.to_s time_start = Time::now().to_i # start time (integer in seconds since epoch) # wait until window dissapears is_window = Win32API.new('user32','IsWindow','L','I') is_alive = is_window.call(hwnd) while is_alive > 0 sleep 0.1 is_alive = is_window.call(hwnd) end time_end = Time::now().to_i # end time span_sec = time_end - time_start #puts "Window terminated, elapsed time=" + span_sec.to_s return span_sec end From christopher.mcmahon at gmail.com Wed Dec 14 09:14:12 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 14 Dec 2005 08:14:12 -0600 Subject: [Wtr-general] OT: Humane interfaces Message-ID: <72799cd70512140614i5426d711p65f5f3d0c59b910d@mail.gmail.com> Hi... I ran across this the other day, Martin Fowler discussing some principles of language design, demonstrating differences with Ruby's Array object and Java's List object: http://martinfowler.com/bliki/HumaneInterface.html. The other day I needed to iterate over every link in a page. When you realize exactly how much information is available through Watir about each link, (and how easy it is to get to that information), it seems that Watir really is a Humane Interface to the IE DOM. Thanks again for your indulgence of the OT... -Chris From Mark_Cain at rl.gov Wed Dec 14 09:54:31 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Wed, 14 Dec 2005 06:54:31 -0800 Subject: [Wtr-general] Exception when trying to close IE Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D4C8@EX5V.rl.gov> Does anyone know why $ie.close() throws an exception? This use to work but now blows up. 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/20051214/c91aa5fb/attachment.html From Mark_Cain at rl.gov Wed Dec 14 09:58:56 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Wed, 14 Dec 2005 06:58:56 -0800 Subject: [Wtr-general] Concurrent Testing using Watir. Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D4C9@EX5V.rl.gov> FYI - I have tried to use this on one of the sites I test that requires authentication and it doesn't work. I have contacted Pate Eyler, the person who wrote RWB, and he is supposed to be working on a fix for this, but I have not heard from him yet on this. --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood Sent: Tuesday, December 13, 2005 6:10 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Concurrent Testing using Watir. Either use the standard profiler with straight HTTP calls, or look into the RWB project ( ruby web benchmark ) ... I'd recommend RWB. Much better for concurrent testing ... j. On 12/13/05, beth ferguson wrote: I've been trying to write a performance test which concurrently makes http posts. It seems to me that the example of concurrency included w/ Watir (i've included my bastardized version below), completes these posts sequentially rather than concurrently. Am I overlooking or misinterpreting something? Thanks as Always- Beth #------------------------------------------------------ # Vsat Response # Beth Ferguson # 12/12/05 # Vsat Response # Duplicate Multiple VSAT Response from MNS distribution #------------------------------------------------------- class VsatResponse def getFile $postList=Array.new File.open("vsatResponseHttp.txt") do |file| while line = file.gets $postList.push(line) end end return $postList end #get file def makePost(postList) for x in postList do ie = Watir:: IE.start(x) puts x ie.close end end end #------------------------------------------------------ # Join Vsat Response Threads to Launch them concurrently (or close to) # Beth Ferguson # 12/12/05 # Join and Launch Multiple VSAT Response from MNS distribution # run the same test concurrently in separate browsers #------------------------------------------------------- threads = [] vSat = VsatResponse.new $responseList=vSat.getFile 1.times do threads << Thread.new {vSat.makePost($responseList)} #$responseList.shift #puts $responseList end threads.each {|x| x.join} _______________________________________________ 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/20051214/41a6af7d/attachment.html From Ben.Torres at rhi.com Wed Dec 14 19:19:47 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Wed, 14 Dec 2005 16:19:47 -0800 Subject: [Wtr-general] Else-if statements Message-ID: <1641BB0AA7287848817A63C3EE9677D509AA68A3@hqp-ex-mb05.na.msds.rhi.com> Hi, What is the syntax I use for else-if statements? I am using the code below, but I am getting an error: If cond1 ie.links[1].click Else-if cond2 ie.links[2].click Else ie.links[3].click End Thanks in advance... From jeff.darklight at gmail.com Wed Dec 14 19:27:50 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 14 Dec 2005 16:27:50 -0800 Subject: [Wtr-general] Else-if statements In-Reply-To: <1641BB0AA7287848817A63C3EE9677D509AA68A3@hqp-ex-mb05.na.msds.rhi.com> References: <1641BB0AA7287848817A63C3EE9677D509AA68A3@hqp-ex-mb05.na.msds.rhi.com> Message-ID: Usually it's best to use a case statement if you start to have more than if/else conditions. case (do stuff) when (result1): ie.links[1].click when (result2): ie.links[2].click else: ie.links[3].click end It tends to make it easier to read & easier to extend should you ever need additional conditions... I highly recommend case ... there is a *LOT* of power inside those "when" criteria. j. On 12/14/05, Torres, Ben (HQP) wrote: > Hi, > > What is the syntax I use for else-if statements? I am using the code > below, but I am getting an error: > > If cond1 > ie.links[1].click > Else-if cond2 > ie.links[2].click > Else > ie.links[3].click > End > > > Thanks in advance... > > > _______________________________________________ > 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 bret at pettichord.com Thu Dec 15 00:49:12 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 14 Dec 2005 23:49:12 -0600 Subject: [Wtr-general] Code donation :) In-Reply-To: <003a01c6007f$a1090f90$0ec8a8c0@helixmr> References: <002d01c5fbe7$7abf9440$c6e7fea9@officezg.wa> <00f101c5fbeb$604be4c0$0ec8a8c0@helixmr> <007001c5fc8e$8efc1d50$0ec8a8c0@helixmr> <5.1.0.14.2.20051212115533.03fb80a8@pop.gmail.com> <003a01c6007f$a1090f90$0ec8a8c0@helixmr> Message-ID: Thanks for sharing your code. On 12/14/05, Miroslav Rajcic wrote: > > I thought to donate some code to the Watir project, in case the code is > found useful. > I needed method to wait for file download window to terminate (so I could > chack if the local file has correct size), and the resulting code is found > below. > > Regards, > Miroslav > > # method to wait until window dissapears > # > # Parameters: > # hwnd - window handle > # > # Returns: elapsed time in seconds > # > def waitUntilWindowGone(hwnd) > > puts "Preparing to wait until window terminates, hwnd=" + hwnd.to_s > > time_start = Time::now().to_i # start time (integer in seconds since > epoch) > > # wait until window dissapears > is_window = Win32API.new('user32','IsWindow','L','I') > is_alive = is_window.call(hwnd) > while is_alive > 0 > sleep 0.1 > is_alive = is_window.call(hwnd) > end > > time_end = Time::now().to_i # end time > span_sec = time_end - time_start > > #puts "Window terminated, elapsed time=" + span_sec.to_s > > return span_sec > end > > > > _______________________________________________ > 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/20051214/170e0a5c/attachment.html From zeljko.filipin at gmail.com Thu Dec 15 07:31:19 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 15 Dec 2005 13:31:19 +0100 Subject: [Wtr-general] Else-if statements In-Reply-To: Message-ID: <002801c60173$74de4b70$c6e7fea9@officezg.wa> If you want to use if-elsif-else: if something # do something elsif something_else # do something else elsif something_else_take_two # there can be as much of this as you need else # do something end I recommend http://whytheluckystiff.net/ruby/pickaxe/ for further reading. Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood Sent: Thursday, December 15, 2005 1:28 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Else-if statements Usually it's best to use a case statement if you start to have more than if/else conditions. case (do stuff) when (result1): ie.links[1].click when (result2): ie.links[2].click else: ie.links[3].click end It tends to make it easier to read & easier to extend should you ever need additional conditions... I highly recommend case ... there is a *LOT* of power inside those "when" criteria. j. On 12/14/05, Torres, Ben (HQP) wrote: > Hi, > > What is the syntax I use for else-if statements? I am using the code > below, but I am getting an error: > > If cond1 > ie.links[1].click > Else-if cond2 > ie.links[2].click > Else > ie.links[3].click > End > > > Thanks in advance... > > > _______________________________________________ > 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 zeljko.filipin at gmail.com Thu Dec 15 07:39:57 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Thu, 15 Dec 2005 13:39:57 +0100 Subject: [Wtr-general] Test Run Message-ID: <002901c60174$a9bba940$c6e7fea9@officezg.wa> I have just read Low-Level Web App UI Test Automation (http://msdn.microsoft.com/msdnmag/issues/05/10/TestRun/). It is about testing web applications. "...access and manipulate HTML objects in the client area of MicrosoftR Internet Explorer." I guess that most of you that develop watir have already read it (or there is nothing now or even interesting to you there), but just to make sure... More articles can be found here http://msdn.microsoft.com/msdnmag/find/default.aspx?type=Ti&phrase=Test%20Ru n&words=exact Zeljko From durk at kern.nl Thu Dec 15 09:10:15 2005 From: durk at kern.nl (Durk Strooisma) Date: Thu, 15 Dec 2005 15:10:15 +0100 (CET) Subject: [Wtr-general] [Watir] What to do with hanging $ie.goto() statements? Message-ID: <1426.132.229.58.215.1134655815.squirrel@webmail.kern.nl> Hi all, The issue: I need to test an internal website. Regarding this specific task, watir seems to be the perfect tool. It works great, but with this particular website, I'm already stuck at loading its homepage. What happens is that I'm opening the homepage of the website by calling ".goto("")", the homepage seems to be loaded, but the lines after the "goto"-statement aren't processed and the testscript seems to wait forever. Possible cause: It seems that the "goto"-method of the IE-instance is waiting forever. Probably it never gets the signal that the website is completely loaded. Although it looks like the website IS completely loaded - all content is shown and IE doesn't show any "in progress" indicators - I guess IE still waits for something to finish. As this website is entirely bloated with (obfuscated) JavaScript, I don't consider it impossible that there somewhere a bug in those scripts (like endless loops) that make IE think the website is still loading. Or maybe it's just that IE can't handle all the JavaScript mess and fails to report the corrent message. I didn't debug the JavaScript-code because most of it is (hardly) unreadable. Solution? Before I start to develop a very hackerish work-around, I'm wondering if more people encounter problems with hanging "goto"-statements in Ruby/Watir. If so, how do you handle these issues? Thanks in advance! Durk From jeff.darklight at gmail.com Thu Dec 15 11:36:33 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Thu, 15 Dec 2005 08:36:33 -0800 Subject: [Wtr-general] [Watir] What to do with hanging $ie.goto() statements? In-Reply-To: <1426.132.229.58.215.1134655815.squirrel@webmail.kern.nl> References: <1426.132.229.58.215.1134655815.squirrel@webmail.kern.nl> Message-ID: The goto method waits for IE to response "complete, idle" before continuing ... so yes, there must be *something* in the page that is making IE say "complete, working" instead . j. On 12/15/05, Durk Strooisma wrote: > Hi all, > > The issue: > > I need to test an internal website. Regarding this specific task, watir > seems to be the perfect tool. It works great, but with this particular > website, I'm already stuck at loading its homepage. What happens is that I'm > opening the homepage of the website by calling ".goto("")", > the homepage seems to be loaded, but the lines after the "goto"-statement > aren't processed and the testscript seems to wait forever. > > Possible cause: > > It seems that the "goto"-method of the IE-instance is waiting forever. > Probably it never gets the signal that the website is completely loaded. > Although it looks like the website IS completely loaded - all content is > shown and IE doesn't show any "in progress" indicators - I guess IE still > waits for something to finish. As this website is entirely bloated with > (obfuscated) JavaScript, I don't consider it impossible that there somewhere > a bug in those scripts (like endless loops) that make IE think the website > is still loading. Or maybe it's just that IE can't handle all the JavaScript > mess and fails to report the corrent message. > > I didn't debug the JavaScript-code because most of it is (hardly) unreadable. > > Solution? > > Before I start to develop a very hackerish work-around, I'm wondering if > more people encounter problems with hanging "goto"-statements in Ruby/Watir. > If so, how do you handle these issues? > > Thanks in advance! > > Durk > > > _______________________________________________ > 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 David.J.Solis at wellsfargo.com Thu Dec 15 13:18:08 2005 From: David.J.Solis at wellsfargo.com (David.J.Solis at wellsfargo.com) Date: Thu, 15 Dec 2005 12:18:08 -0600 Subject: [Wtr-general] How to manipulate attaching files Message-ID: <493148DCF171954FBBF8E8AAB261638C0574C6@msgswbmnmsp35.wellsfargo.com> I have web application that requires attaching a file very similar to attaching a file in Yahoo mail. Rather than manipulating the attach button, navigating to the file and attaching it, I thought I would use a short cut by writing directly into the text field the path to the file. However, using this approach returns an UnknownObjectException. To illustrate, I'm using the text field method ie.text_field(:name, "typeinme").set("some text") However, in my html reads like this: Does anybody have any ideas how to solve this problem? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051215/e638248d/attachment.html From ttaherinia at metaquest.com Thu Dec 15 13:48:13 2005 From: ttaherinia at metaquest.com (Tolou Taherinia) Date: Thu, 15 Dec 2005 13:48:13 -0500 Subject: [Wtr-general] Java applets and watir Message-ID: <81D3249A8615C045840303539087BED6B9E82A@mqserver2k3.metaquest2k3.local> Hi all, I was reading the WATIR user guide and it said that watir does not support java applets, however I am testing an web application which uses applets regularely. I was wondering if anyone has found a way around this issue by extending the watir code, etc. or it is really impossible to use watir with applets? Thank you in advance, Tolou -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051215/713e2057/attachment.html From David.J.Solis at wellsfargo.com Thu Dec 15 14:20:04 2005 From: David.J.Solis at wellsfargo.com (David.J.Solis at wellsfargo.com) Date: Thu, 15 Dec 2005 13:20:04 -0600 Subject: [Wtr-general] Assert Question Message-ID: <493148DCF171954FBBF8E8AAB261638C2E3651@msgswbmnmsp35.wellsfargo.com> Thanks. Are there updated docs? _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Tuesday, December 13, 2005 11:03 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Assert Question David, You are looking at old, and incorrect documentation for Watir. Bret On 12/12/05, David.J.Solis at wellsfargo.com wrote: When using this assert in an if statement, the second half of the condition is skipped if the first half is false. Basically, the assert returns the error and prints it, but the "else" part of the condition is not executed. Any ideas? if assert(ie.contains_text("Test verification point.")) puts("TEST PASSED. Found test string: 'Test verification point.' ") else puts("TEST FAILED.") end _______________________________________________ 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/20051215/e310c102/attachment.html From ttaherinia at metaquest.com Thu Dec 15 14:28:29 2005 From: ttaherinia at metaquest.com (Tolou Taherinia) Date: Thu, 15 Dec 2005 14:28:29 -0500 Subject: [Wtr-general] java script code Message-ID: <81D3249A8615C045840303539087BED6B9E831@mqserver2k3.metaquest2k3.local> hi all I was wondering if it is possible to extend watir in order to call java script function from it...and if yes could you please provide an example. Thank you in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051215/dd7130e8/attachment.html From David.J.Solis at wellsfargo.com Thu Dec 15 14:29:54 2005 From: David.J.Solis at wellsfargo.com (David.J.Solis at wellsfargo.com) Date: Thu, 15 Dec 2005 13:29:54 -0600 Subject: [Wtr-general] How to manipulate attaching files Message-ID: <493148DCF171954FBBF8E8AAB261638C2E3652@msgswbmnmsp35.wellsfargo.com> I may have posted twice. Looks like the first one did not make it through. I have web application that requires attaching a file very similar to attaching a file in Yahoo mail. Rather than manipulating the attach button, navigating to the file and attaching it, I thought I would use a short cut by writing directly into the text field the path to the file. However, using this approach returns an UnknownObjectException. To illustrate, I'm using the text field method ie.text_field(:name, "typeinme").set("some text") However, in my html reads like this: Does anybody have any ideas how to solve this problem? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051215/1e62d724/attachment.html From matthewt at nakinasystems.com Thu Dec 15 14:53:58 2005 From: matthewt at nakinasystems.com (Matthew Tobiasz) Date: Thu, 15 Dec 2005 14:53:58 -0500 Subject: [Wtr-general] "==" works, but "===" doesn't Message-ID: <2AE8509EC6CD4E4D946E22751F7C8160167BEE@nakina-ex2003.nakinasys.local> Hello, Aren't the == and === operators meant to be equivalent? If so, why does this happen: if Watir::Button === Watir::Button puts "=== True" else puts "=== False" end if Watir::Button == Watir::Button puts "== True" else puts "== False" end Which results in: === False == True Any ideas? -Matthew From eduardorochabr at gmail.com Thu Dec 15 15:09:41 2005 From: eduardorochabr at gmail.com (Eduardo Rocha) Date: Thu, 15 Dec 2005 18:09:41 -0200 Subject: [Wtr-general] "==" works, but "===" doesn't In-Reply-To: <2AE8509EC6CD4E4D946E22751F7C8160167BEE@nakina-ex2003.nakinasys.local> References: <2AE8509EC6CD4E4D946E22751F7C8160167BEE@nakina-ex2003.nakinasys.local> Message-ID: If you write: require "watir" puts Watir::Button.class you'll se that the type of "Watir::Button" is Class. So the following test: if Watir::Button === Watir::Button is can be read as "The class 'Watir::Button' is of type Watir::Button?", and the answer is no, because the type is Class. Only if you create an instance of Watir::Button and test with === you will have a positive answer for you test. 2005/12/15, Matthew Tobiasz : > Hello, > > Aren't the == and === operators meant to be equivalent? If so, why does > this happen: > > > > if Watir::Button === Watir::Button > puts "=== True" > else > puts "=== False" > end > > if Watir::Button == Watir::Button > puts "== True" > else > puts "== False" > end > > > > Which results in: > > > > === False > == True > > > > > Any ideas? > > > > -Matthew > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From Mark_Cain at rl.gov Thu Dec 15 16:41:05 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Thu, 15 Dec 2005 13:41:05 -0800 Subject: [Wtr-general] How to manipulate attaching files Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04ED1D4D5@EX5V.rl.gov> Try something like this using file_field instead of text_field: $path = "C\:\\watir_bonus\\working\\Approach.doc" $ie.frame(:index, 5).file_field(:id, "fileName").set("#{$path}") $autoit = WIN32OLE.new("AutoItX3.Control") $autoit.WinWait("Choose file", "Do you want to open or save this file?", 3) $autoit.WinActivate("Choose file") $autoit.WinWait("Choose file", "Look &in", 3) $autoit.ControlSetText("Choose file", "", "Edit1", "#{$path}") $autoit.ControlClick("Choose file", "Look &in", "&Open") $ie.frame(:index, 5).button(:name, "submitLinkManagerForm").click --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of David.J.Solis at wellsfargo.com Sent: Thursday, December 15, 2005 11:30 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] How to manipulate attaching files I may have posted twice. Looks like the first one did not make it through. I have web application that requires attaching a file very similar to attaching a file in Yahoo mail. Rather than manipulating the attach button, navigating to the file and attaching it, I thought I would use a short cut by writing directly into the text field the path to the file. However, using this approach returns an UnknownObjectException. To illustrate, I'm using the text field method ie.text_field(:name, "typeinme").set("some text") However, in my html reads like this: Does anybody have any ideas how to solve this problem? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051215/91d76e2d/attachment.html From bagee at aventail.com Thu Dec 15 19:08:55 2005 From: bagee at aventail.com (Bill Agee) Date: Thu, 15 Dec 2005 16:08:55 -0800 Subject: [Wtr-general] How to manipulate attaching files Message-ID: <30561FB511309F44A56833A491C9FEC6026A1FD7@exchange2.in.aventail.com> I think file fields are treated as a different type of object than text fields. But you should be able to set file fields using 'fileField'...here's an example from the "filefield_test.rb" WATIR unit test: $ie.fileField(:name,"file1").set($htmlRoot + "fileupload.html") Using this has worked fine for me so far, at least for for simple file uploads. Thanks Bill -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of David.J.Solis at wellsfargo.com Sent: Thursday, December 15, 2005 11:30 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] How to manipulate attaching files I may have posted twice. Looks like the first one did not make it through. I have web application that requires attaching a file very similar to attaching a file in Yahoo mail. Rather than manipulating the attach button, navigating to the file and attaching it, I thought I would use a short cut by writing directly into the text field the path to the file. However, using this approach returns an UnknownObjectException. To illustrate, I'm using the text field method ie.text_field(:name, "typeinme").set("some text") However, in my html reads like this: Does anybody have any ideas how to solve this problem? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051215/ff7d758a/attachment.html From jeff.darklight at gmail.com Thu Dec 15 19:23:34 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Thu, 15 Dec 2005 16:23:34 -0800 Subject: [Wtr-general] How to manipulate attaching files In-Reply-To: <30561FB511309F44A56833A491C9FEC6026A1FD7@exchange2.in.aventail.com> References: <30561FB511309F44A56833A491C9FEC6026A1FD7@exchange2.in.aventail.com> Message-ID: Yep, I agree with Bill... the file fields are handled differently ... and quite well ... at least for me, I give the path, and it handles the popup and the fillin & select ... quick and easy. My only additional note would be to try to stay away from camelCase names for the functions ... the normal syntax way to do things is file_field ... not fileField ... the camelCase names are slated to be removed in a future revision. j. On 12/15/05, Bill Agee wrote: > > I think file fields are treated as a different type of object than text > fields. > > But you should be able to set file fields using 'fileField'...here's an > example from the "filefield_test.rb" WATIR unit test: > > $ie.fileField(:name,"file1").set($htmlRoot + "fileupload.html") > > Using this has worked fine for me so far, at least for for simple file > uploads. > > Thanks > Bill > > > > -----Original Message----- > *From:* wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org] *On Behalf Of * > David.J.Solis at wellsfargo.com > *Sent:* Thursday, December 15, 2005 11:30 AM > *To:* wtr-general at rubyforge.org > *Subject:* [Wtr-general] How to manipulate attaching files > > I may have posted twice. Looks like the first one did not make it through. > > I have web application that requires attaching a file very similar to > attaching a file in Yahoo mail. Rather than manipulating the attach button, > navigating to the file and attaching it, I thought I would use a short cut > by writing directly into the text field the path to the file. However, using > this approach returns an UnknownObjectException. > > To illustrate, I'm using the text field method > > ie.text_field(:name, "typeinme").set("some text") > > > > However, in my html reads like this: > > > > Does anybody have any ideas how to solve this problem? > > > > > > _______________________________________________ > 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/20051215/b41f1bc7/attachment.html From roy_sin at yahoo.com Thu Dec 15 20:20:51 2005 From: roy_sin at yahoo.com (Roy Sin) Date: Thu, 15 Dec 2005 17:20:51 -0800 (PST) Subject: [Wtr-general] suggestion on how to run a few testcases in a test suite Message-ID: <20051216012051.69075.qmail@web52913.mail.yahoo.com> I have a few test cases each in its own class file as in this example: testcase1_test.rb, testcase2_test.rb, ..., The first testcase1_test.rb calls 'setup' and 'logintoPortal' which take care of creatng an instance of IE and going through the login process to my Portal under test. What would be a good way to call the other test cases after the first test case has completed? And all the test cases are in the same directory. thanks __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From bret at pettichord.com Fri Dec 16 12:48:31 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 16 Dec 2005 11:48:31 -0600 Subject: [Wtr-general] suggestion on how to run a few testcases in a test suite In-Reply-To: <20051216012051.69075.qmail@web52913.mail.yahoo.com> References: <20051216012051.69075.qmail@web52913.mail.yahoo.com> Message-ID: create a new file that looks like this: require 'testcase1_test.rb' require 'testcase2_test.rb' and so on. Or you can write a script that reads all the file names in a directly and then automatically requires them. Bret On 12/15/05, Roy Sin wrote: > > I have a few test cases each in its own class file as in > this example: testcase1_test.rb, testcase2_test.rb, ..., > The first testcase1_test.rb calls 'setup' and > 'logintoPortal' which take care of creatng an instance of > IE and going through the login process to my Portal under > test. > What would be a good way to call the other test cases after > the first test case has completed? And all the test cases > are in the same directory. > > thanks > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051216/0e721f30/attachment.html From bret at pettichord.com Fri Dec 16 12:51:22 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 16 Dec 2005 11:51:22 -0600 Subject: [Wtr-general] "==" works, but "===" doesn't In-Reply-To: <2AE8509EC6CD4E4D946E22751F7C8160167BEE@nakina-ex2003.nakinasys.local> References: <2AE8509EC6CD4E4D946E22751F7C8160167BEE@nakina-ex2003.nakinasys.local> Message-ID: On 12/15/05, Matthew Tobiasz wrote: > > Aren't the == and === operators meant to be equivalent? No. Use "==". -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051216/354ae4d5/attachment.html From bret at pettichord.com Fri Dec 16 12:54:23 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 16 Dec 2005 11:54:23 -0600 Subject: [Wtr-general] Assert Question In-Reply-To: <493148DCF171954FBBF8E8AAB261638C2E3651@msgswbmnmsp35.wellsfargo.com> References: <493148DCF171954FBBF8E8AAB261638C2E3651@msgswbmnmsp35.wellsfargo.com> Message-ID: On 12/15/05, David.J.Solis at wellsfargo.com wrote: > > Thanks. Are there updated docs? > http://wtr.rubyforge.org/watir_user_guide.html -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051216/b32a866a/attachment.html From bret at pettichord.com Fri Dec 16 12:57:41 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 16 Dec 2005 11:57:41 -0600 Subject: [Wtr-general] java script code In-Reply-To: <81D3249A8615C045840303539087BED6B9E831@mqserver2k3.metaquest2k3.local> References: <81D3249A8615C045840303539087BED6B9E831@mqserver2k3.metaquest2k3.local> Message-ID: You could attach some javascript to an event and then use watir to trigger the event. Watir ties into IE at a level basically equivalent to the level that Javascript uses to access controls. I don't know of any direct way to call Javascript from Ruby/COM. Bret On 12/15/05, Tolou Taherinia wrote: > > hi all > > I was wondering if it is possible to extend watir in order to call java > script function from it...and if yes could you please provide an example. > > Thank you in advance > > _______________________________________________ > 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/20051216/2e14e9a1/attachment.html From eduardorochabr at gmail.com Fri Dec 16 13:02:26 2005 From: eduardorochabr at gmail.com (Eduardo Rocha) Date: Fri, 16 Dec 2005 16:02:26 -0200 Subject: [Wtr-general] suggestion on how to run a few testcases in a test suite In-Reply-To: <20051216012051.69075.qmail@web52913.mail.yahoo.com> References: <20051216012051.69075.qmail@web52913.mail.yahoo.com> Message-ID: Roy, The other tests are dependent on logIntoPortal? I don't know if Watir or Test::Unit has support for dependent tests, but one could create it programatically. Anyway, I have read a blog these days that might be just what you are looking for: http://www.testing.com/cgi-bin/blog/2005/12/08#automation1 2005/12/15, Roy Sin : > I have a few test cases each in its own class file as in > this example: testcase1_test.rb, testcase2_test.rb, ..., > The first testcase1_test.rb calls 'setup' and > 'logintoPortal' which take care of creatng an instance of > IE and going through the login process to my Portal under > test. > What would be a good way to call the other test cases after > the first test case has completed? And all the test cases > are in the same directory. > > thanks > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From bret at pettichord.com Fri Dec 16 13:05:21 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 16 Dec 2005 12:05:21 -0600 Subject: [Wtr-general] [Watir] What to do with hanging $ie.goto() statements? In-Reply-To: <1426.132.229.58.215.1134655815.squirrel@webmail.kern.nl> References: <1426.132.229.58.215.1134655815.squirrel@webmail.kern.nl> Message-ID: On 12/15/05, Durk Strooisma wrote: > > Before I start to develop a very hackerish work-around, I'm wondering if > more people encounter problems with hanging "goto"-statements in > Ruby/Watir. > If so, how do you handle these issues? Try ie.ie.navigate(url) instead. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051216/af706567/attachment.html From roy_sin at yahoo.com Fri Dec 16 13:51:38 2005 From: roy_sin at yahoo.com (Roy Sin) Date: Fri, 16 Dec 2005 10:51:38 -0800 (PST) Subject: [Wtr-general] suggestion on how to run a few testcases in a test suite.. interesting observation In-Reply-To: Message-ID: <20051216185138.89409.qmail@web52901.mail.yahoo.com> I created a 'runTestSuite.rb' and added a series of require statement like require 'testcase1_test.rb' require 'testcase2_test.rb' ... it works but what i found is that when testcase1_test.rb is called the script will go through the login process (from require logintoPortal) and suddenly jump to testcase2_test.rb, follow by testcase3_test.rb, etc and finally execute testcase1_test.rb I even took setup.rb and logintoPortal out from testcase1_test.rb and call them seperately but somehow the testcase1_test.rb get executed last! --- Bret Pettichord wrote: > create a new file that looks like this: > > require 'testcase1_test.rb' > require 'testcase2_test.rb' > > and so on. Or you can write a script that reads all the > file names in a > directly and then automatically requires them. > > Bret > > On 12/15/05, Roy Sin wrote: > > > > I have a few test cases each in its own class file as > in > > this example: testcase1_test.rb, testcase2_test.rb, > ..., > > The first testcase1_test.rb calls 'setup' and > > '+' which take care of creatng an instance > of > > IE and going through the login process to my Portal > under > > test. > > What would be a good way to call the other test cases > after > > the first test case has completed? And all the test > cases > > are in the same directory. > > > > thanks > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > protection around > > http://mail.yahoo.com > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From Sean.Gallagher at ticketmaster.com Fri Dec 16 15:05:16 2005 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Fri, 16 Dec 2005 12:05:16 -0800 Subject: [Wtr-general] suggestion on how to run a few testcases in a t est suite.. interesting observation Message-ID: <71D28C8451BFD5119B2B00508BE26E640BDAB68C@pasmail3.office.tmcs> Hi Roy. Can you include the full contents of runTestSuite.rb and maybe a snippet from the top of testcase_1.rb? -sean > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Roy Sin > Sent: Friday, December 16, 2005 10:52 AM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] suggestion on how to run a few > testcases in a test suite.. interesting observation > > I created a 'runTestSuite.rb' and added a series of require > statement like > require 'testcase1_test.rb' > require 'testcase2_test.rb' > ... > it works but what i found is that when testcase1_test.rb is > called the script will go through the login process (from > require logintoPortal) and suddenly jump to > testcase2_test.rb, follow by testcase3_test.rb, etc and > finally execute testcase1_test.rb > > I even took setup.rb and logintoPortal out from > testcase1_test.rb and call them seperately but somehow the > testcase1_test.rb get executed last! > > > --- Bret Pettichord wrote: > > > create a new file that looks like this: > > > > require 'testcase1_test.rb' > > require 'testcase2_test.rb' > > > > and so on. Or you can write a script that reads all the > > file names in a > > directly and then automatically requires them. > > > > Bret > > > > On 12/15/05, Roy Sin wrote: > > > > > > I have a few test cases each in its own class file as > > in > > > this example: testcase1_test.rb, testcase2_test.rb, > > ..., > > > The first testcase1_test.rb calls 'setup' and > > > '+' which take care of creatng an instance > > of > > > IE and going through the login process to my Portal > > under > > > test. > > > What would be a good way to call the other test cases > > after > > > the first test case has completed? And all the test > > cases > > > are in the same directory. > > > > > > thanks > > > > > > > > > __________________________________________________ > > > Do You Yahoo!? > > > Tired of spam? Yahoo! Mail has the best spam > > protection around > > > http://mail.yahoo.com > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From roy_sin at yahoo.com Fri Dec 16 21:53:17 2005 From: roy_sin at yahoo.com (Roy Sin) Date: Fri, 16 Dec 2005 18:53:17 -0800 (PST) Subject: [Wtr-general] suggestion on how to run a few testcases in a t est suite.. interesting observation In-Reply-To: <71D28C8451BFD5119B2B00508BE26E640BDAB68C@pasmail3.office.tmcs> Message-ID: <20051217025317.52392.qmail@web52909.mail.yahoo.com> Sure Here is the runTestSuite.rb contents: require 'loginto_Portal' require 'lib_gmms' # Vehicle CRUD Test Cases require 'crud_vehicle_test' # Asset CRUD Test Cases require 'crud_asset_test' # Personnel CRUD Test Cases require 'crud_personnel_test' --------------- lib_gmms is just a small lib that currently contains only one def which is to handle popup. and here is the beginning of my first test case #require 'logintoCP_onProd' #require 'lib_gmms' class TC_crud_vehicle < Test::Unit::TestCase # Action 1 is the login process #--------------------------------------- def test_02_goto_vehicles puts 'Action 2: from the Home page - go to the vehicles module' puts ' ' $ie.frame("cpnav").image(:src, /nav_vehicles/).click sleep(2) end ... --- Sean Gallagher wrote: > Hi Roy. > Can you include the full contents of runTestSuite.rb and > maybe a snippet > from the top of testcase_1.rb? > > -sean > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of > Roy Sin > > Sent: Friday, December 16, 2005 10:52 AM > > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] suggestion on how to run a > few > > testcases in a test suite.. interesting observation > > > > I created a 'runTestSuite.rb' and added a series of > require > > statement like > > require 'testcase1_test.rb' > > require 'testcase2_test.rb' > > ... > > it works but what i found is that when > testcase1_test.rb is > > called the script will go through the login process > (from > > require logintoPortal) and suddenly jump to > > testcase2_test.rb, follow by testcase3_test.rb, etc and > > finally execute testcase1_test.rb > > > > I even took setup.rb and logintoPortal out from > > testcase1_test.rb and call them seperately but somehow > the > > testcase1_test.rb get executed last! > > > > > > --- Bret Pettichord wrote: > > > > > create a new file that looks like this: > > > > > > require 'testcase1_test.rb' > > > require 'testcase2_test.rb' > > > > > > and so on. Or you can write a script that reads all > the > > > file names in a > > > directly and then automatically requires them. > > > > > > Bret > > > > > > On 12/15/05, Roy Sin wrote: > > > > > > > > I have a few test cases each in its own class file > as > > > in > > > > this example: testcase1_test.rb, testcase2_test.rb, > > > ..., > > > > The first testcase1_test.rb calls 'setup' and > > > > '+' which take care of creatng an instance > > > of > > > > IE and going through the login process to my Portal > > > under > > > > test. > > > > What would be a good way to call the other test > cases > > > after > > > > the first test case has completed? And all the test > > > cases > > > > are in the same directory. > > > > > > > > thanks > > > > > > > > > > > > __________________________________________________ > > > > Do You Yahoo!? > > > > Tired of spam? Yahoo! Mail has the best spam > > > protection around > > > > http://mail.yahoo.com > > > > _______________________________________________ > > > > Wtr-general mailing list > > > > Wtr-general at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > protection around > > http://mail.yahoo.com > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From durk at kern.nl Sat Dec 17 10:43:18 2005 From: durk at kern.nl (Durk Strooisma) Date: Sat, 17 Dec 2005 16:43:18 +0100 (CET) Subject: [Wtr-general] [Watir] What to do with hanging $ie.goto() In-Reply-To: References: Message-ID: <2733.62.163.46.103.1134834198.squirrel@webmail.kern.nl> > On 12/15/05, Durk Strooisma wrote: >> >> Before I start to develop a very hackerish work-around, I'm wondering >> if more people encounter problems with hanging "goto"-statements in >> Ruby/Watir. >> If so, how do you handle these issues? > > > Try ie.ie.navigate(url) instead. Right now, I "solved" my problem by inheriting the IE class and overruling the goto method. The new goto method accepts a flag that determines if the "wait()" statement has to be processed. So with this troublesome website I don't let the goto method wait, but in stead handle the waiting myself after the execution of the new goto method. Durk From ttaherinia at metaquest.com Sat Dec 17 20:24:51 2005 From: ttaherinia at metaquest.com (Tolou Taherinia) Date: Sat, 17 Dec 2005 20:24:51 -0500 Subject: [Wtr-general] javascript popup Message-ID: <81D3249A8615C045840303539087BED6BB7BD9@mqserver2k3.metaquest2k3.local> Hi all, I have an Microsoft internet explorer alert box that comes up when clicking on a button in my web application and Im unable to click on "ok" in order to close this alert message.This is the button that invokes the javascript alert. ie.frame("TopToolbar2").link(:id,"a_History").click I have tried almost everything...and any help would be greately apprecitaed... -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051217/35228302/attachment.html From raghu at qantom.com Sat Dec 17 22:38:09 2005 From: raghu at qantom.com (Raghu Venkataramana) Date: Sun, 18 Dec 2005 09:08:09 +0530 Subject: [Wtr-general] javascript popup In-Reply-To: <81D3249A8615C045840303539087BED6BB7BD9@mqserver2k3.metaquest2k3.local> References: <81D3249A8615C045840303539087BED6BB7BD9@mqserver2k3.metaquest2k3.local> Message-ID: <43A4D9A1.6030402@qantom.com> Have you tried the WET add-on. WET has a good support for popups. Raghu Tolou Taherinia wrote: > > Hi all, > > I have an Microsoft internet explorer alert box that comes up when > clicking on a button in my web application and Im unable to click on > "ok" in order to close this alert message.This is the button that > invokes the javascript alert. > > ie.frame("TopToolbar2").link(:id,"a_History").click > > I have tried almost everything...and any help would be greately > apprecitaed... > > > > > > > > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > From ttaherinia at metaquest.com Sun Dec 18 11:12:42 2005 From: ttaherinia at metaquest.com (Tolou Taherinia) Date: Sun, 18 Dec 2005 11:12:42 -0500 Subject: [Wtr-general] javascript popup Message-ID: <81D3249A8615C045840303539087BED6BB7BDB@mqserver2k3.metaquest2k3.local> im pretty new to both WET and WATIR...however im not sure how to use WET for this purpose and what to include as the libraries at the top of my test. Do you have a solution with WATIR for handling popups? thanks a lot... -----Original Message----- From: wtr-general-bounces at rubyforge.org on behalf of Raghu Venkataramana Sent: Sat 12/17/2005 10:38 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] javascript popup Have you tried the WET add-on. WET has a good support for popups. Raghu Tolou Taherinia wrote: > > Hi all, > > I have an Microsoft internet explorer alert box that comes up when > clicking on a button in my web application and Im unable to click on > "ok" in order to close this alert message.This is the button that > invokes the javascript alert. > > ie.frame("TopToolbar2").link(:id,"a_History").click > > I have tried almost everything...and any help would be greately > apprecitaed... > > > > > > > > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 3083 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20051218/1d9c2855/attachment.bin From ttaherinia at metaquest.com Sun Dec 18 13:15:02 2005 From: ttaherinia at metaquest.com (Tolou Taherinia) Date: Sun, 18 Dec 2005 13:15:02 -0500 Subject: [Wtr-general] javascript Alert Message-ID: <81D3249A8615C045840303539087BED6BB7BDD@mqserver2k3.metaquest2k3.local> Hi, This is the code I have in order to click on a button which will invoke a javascript popup, however the ok button on the alert is never clicked and I do not get any errors. I based my code on the jscriptExtraAlert.rb code. Any help would be greately appreciated. require 'watir' require 'watir/WindowHelper' . .code for opening up page . ie.frame("TopToolbar2").link(:id,"a_History").click helper = WindowHelper.new helper.push_alert_button() -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051218/fece9786/attachment.html From hrishij at synechron.com Mon Dec 19 02:28:48 2005 From: hrishij at synechron.com (Hrishikesh Jamadagni) Date: Mon, 19 Dec 2005 12:58:48 +0530 Subject: [Wtr-general] javascript popup In-Reply-To: <81D3249A8615C045840303539087BED6BB7BDB@mqserver2k3.metaquest2k3.local> Message-ID: <000001c6046d$db5decf0$74021f0a@fusionpune.local> Using WET the pop-up's and alerts can effectively clicked, Go to the object reference/modal dialog on the WET website Regards hrishi -----Original Message----- From: Tolou Taherinia [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tolou Taherinia Sent: Sunday, December 18, 2005 9:43 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] javascript popup im pretty new to both WET and WATIR...however im not sure how to use WET for this purpose and what to include as the libraries at the top of my test. Do you have a solution with WATIR for handling popups? thanks a lot... -----Original Message----- From: wtr-general-bounces at rubyforge.org on behalf of Raghu Venkataramana Sent: Sat 12/17/2005 10:38 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] javascript popup Have you tried the WET add-on. WET has a good support for popups. Raghu Tolou Taherinia wrote: > > Hi all, > > I have an Microsoft internet explorer alert box that comes up when > clicking on a button in my web application and Im unable to click on > "ok" in order to close this alert message.This is the button that > invokes the javascript alert. > > ie.frame("TopToolbar2").link(:id,"a_History").click > > I have tried almost everything...and any help would be greately > apprecitaed... > > > > > > > > >------------------------------------------------------------------------ > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 7124 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20051219/f2f71c9f/attachment.bin From chaya_b_s at yahoo.co.in Mon Dec 19 03:05:50 2005 From: chaya_b_s at yahoo.co.in (chaya shetty) Date: Mon, 19 Dec 2005 08:05:50 +0000 (GMT) Subject: [Wtr-general] Is there a way to check the allignment and font of text in watir? Message-ID: <20051219080550.42991.qmail@web8306.mail.in.yahoo.com> Hi, I want to write a test case in which I am required to verify the allignment and font of the text. Is there a way in watir by which I can retrieve the allignment and font of the text? Thanks Chaya Send instant messages to your online friends http://in.messenger.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051219/262f1f6a/attachment.html From jeff.darklight at gmail.com Mon Dec 19 03:11:20 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 19 Dec 2005 00:11:20 -0800 Subject: [Wtr-general] Is there a way to check the allignment and font of text in watir? In-Reply-To: <20051219080550.42991.qmail@web8306.mail.in.yahoo.com> References: <20051219080550.42991.qmail@web8306.mail.in.yahoo.com> Message-ID: The only way that comes to mind, is simply to scan through the innerHTML of the element ... that gives you the ability to see font tags, class &| style attributes, etc ... Anyways, just passing it along ... The stylesheets portion of the pages are off under a very ugly almost unreachable OLE interface that i've still not grokked well enough to be able to dig through. j. On 12/19/05, chaya shetty wrote: > Hi, > I want to write a test case in which I am required to verify the > allignment and font of the text. Is there a way in watir by which I can > retrieve the allignment and font of the text? > > Thanks > Chaya > > Send instant messages to your online friends http://in.messenger.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 amithashettyb at yahoo.co.in Mon Dec 19 05:25:09 2005 From: amithashettyb at yahoo.co.in (Amitha Shetty) Date: Mon, 19 Dec 2005 10:25:09 +0000 (GMT) Subject: [Wtr-general] How to click or access Map and Area tags? Message-ID: <20051219102509.87017.qmail@web8512.mail.in.yahoo.com> Hi, The screen under test has a piechart.HTML source for this Chart has Map and Area tags. This Chart has link on one of its portions.How do I click on this link using Watir? I want to access this chart. HTML for the chart is as shown below: "$ie.link(:url,"PieChart.html?category=Critical&pieIndex=0").click" gives Unable to locate object exception. However $ie.goto("PieChart.html?category=Critical&pieIndex=0") will go to the page directed by the link on the Chart. How to click or access these Map and Area tags? Thanks, Amitha Send instant messages to your online friends http://in.messenger.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051219/351e4bbe/attachment.html From zeljko.filipin at gmail.com Mon Dec 19 10:33:59 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Mon, 19 Dec 2005 16:33:59 +0100 Subject: [Wtr-general] ruby ide Message-ID: <001701c604b1$a3147ff0$c6e7fea9@officezg.wa> I am using Arachno Ruby IDE (http://www.ruby-ide.com/ruby/ruby_ide_and_ruby_editor.php). I also tried Scite and Freeride (included in Ruby). I am just wandering what the rest of you use (Eclipse...). Zeljko From Sean.Gallagher at ticketmaster.com Mon Dec 19 10:57:21 2005 From: Sean.Gallagher at ticketmaster.com (Sean Gallagher) Date: Mon, 19 Dec 2005 07:57:21 -0800 Subject: [Wtr-general] ruby ide Message-ID: <71D28C8451BFD5119B2B00508BE26E640BDABA9D@pasmail3.office.tmcs> I use gvim + command prompt. http://www.vim.org/download.php There is also Mondrian Ruby IDE, if you prefer an IDE. http://www.mondrian-ide.com/ -sean > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Zeljko Filipin > Sent: Monday, December 19, 2005 7:34 AM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] ruby ide > > I am using Arachno Ruby IDE > (http://www.ruby-ide.com/ruby/ruby_ide_and_ruby_editor.php). > I also tried > Scite and Freeride (included in Ruby). I am just wandering > what the rest of > you use (Eclipse...). > > Zeljko > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From jkohl at telusplanet.net Mon Dec 19 11:12:22 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Mon, 19 Dec 2005 08:12:22 -0800 Subject: [Wtr-general] ruby ide In-Reply-To: <001701c604b1$a3147ff0$c6e7fea9@officezg.wa> References: <001701c604b1$a3147ff0$c6e7fea9@officezg.wa> Message-ID: <1135008742.43a6dbe64264d@webmail.telusplanet.net> Eclipse with the RDT plugin. I need my green bar! :) -Jonathan Quoting Zeljko Filipin : > I am using Arachno Ruby IDE > (http://www.ruby-ide.com/ruby/ruby_ide_and_ruby_editor.php). I also tried > Scite and Freeride (included in Ruby). I am just wandering what the rest of > you use (Eclipse...). > > Zeljko > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From angrez at gmail.com Mon Dec 19 12:17:25 2005 From: angrez at gmail.com (Angrez Singh) Date: Mon, 19 Dec 2005 22:47:25 +0530 Subject: [Wtr-general] How to click or access Map and Area tags? In-Reply-To: <20051219102509.87017.qmail@web8512.mail.in.yahoo.com> References: <20051219102509.87017.qmail@web8512.mail.in.yahoo.com> Message-ID: Hi, Your problem is how to access an element for which there is no class in WATiR. You can use XPATH extension of WATiR which will be availabe in v1.5or you can always download the tar ball from HEAD. By using XPATH extension you can get any element by using an XPATH expression. For elements having class in WATiR a new attribute (:xpath) for selecting element is added. But for elements not having class, you can use function element_by_xpath of IE class to get the underlying OLE Object. In your case it would be something like this: ie.element_by_xpath("//area[contains(@href , 'PieChart.html')]/").click() For more details refer to the "XPath suppoort in Watir.doc" under the doc section in CVS. Regards, Angrez On 12/19/05, Amitha Shetty wrote: > > Hi, > The screen under test has a piechart.HTML source for this Chart has Map > and Area tags. This Chart has link on one of its portions.How do I click > on this link using Watir? > I want to access this chart. > HTML for the chart is as shown below: >
> > COORDS="150,16,159,17,168,20,175,25,182,32,150,56,150,56" > > > COORDS="190,56,189,64,186,71,178,84,165,93,158,95,150,96,141,95,134,93,121,84,113,71,110,64,109,56,110,48,113,40,121,27,134,19,141,16,150,16,150,56,150,56" > > > > USEMAP="#chart"> > "$ie.link(:url,"PieChart.html?category=Critical&pieIndex=0").click" gives > Unable to locate object exception. > However $ie.goto("PieChart.html?category=Critical&pieIndex=0") will go to > the page directed by the link on the Chart. > How to click or access these Map and Area tags? > > Thanks, > Amitha > > > Send instant messages to your online friends http://in.messenger.yahoo.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051219/0e9b759f/attachment.html From ttaherinia at metaquest.com Mon Dec 19 12:29:31 2005 From: ttaherinia at metaquest.com (Tolou Taherinia) Date: Mon, 19 Dec 2005 12:29:31 -0500 Subject: [Wtr-general] iframe Message-ID: <81D3249A8615C045840303539087BED6BB7BDE@mqserver2k3.metaquest2k3.local> Hi all, Does anyone know how watir handles iframes and how it is possible to access iframes...could you provide an example... thank you in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051219/f3c52760/attachment.html From roy_sin at yahoo.com Mon Dec 19 13:04:16 2005 From: roy_sin at yahoo.com (Roy Sin) Date: Mon, 19 Dec 2005 10:04:16 -0800 (PST) Subject: [Wtr-general] ruby ide In-Reply-To: <001701c604b1$a3147ff0$c6e7fea9@officezg.wa> Message-ID: <20051219180416.28828.qmail@web52904.mail.yahoo.com> I used RDT plugin for Eclipse, works great. And our back-end development team uses Eclipse for Java development and front-end/UI team uses the PHP plug in to eclipse. It's eclipse all the way. --- Zeljko Filipin wrote: > I am using Arachno Ruby IDE > (http://www.ruby-ide.com/ruby/ruby_ide_and_ruby_editor.php). > I also tried > Scite and Freeride (included in Ruby). I am just > wandering what the rest of > you use (Eclipse...). > > Zeljko > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From saudaziz at gmail.com Mon Dec 19 13:12:32 2005 From: saudaziz at gmail.com (saud aziz) Date: Mon, 19 Dec 2005 10:12:32 -0800 Subject: [Wtr-general] ruby ide In-Reply-To: <20051219180416.28828.qmail@web52904.mail.yahoo.com> References: <001701c604b1$a3147ff0$c6e7fea9@officezg.wa> <20051219180416.28828.qmail@web52904.mail.yahoo.com> Message-ID: <24d0cb380512191012l10e20d3fia35ea811f0230f6c@mail.gmail.com> Is there any out there (free/opensource) that supports intellisense/codecomplete feature for Ruby? I believe Komodo does. Any others that do this? http://www.activestate.com/Products/Komodo/?utm_source=home_page&utm_medium=banner&utm_campaign=komodo3.5 On 12/19/05, Roy Sin wrote: > > I used RDT plugin for Eclipse, works great. And our > back-end development team uses Eclipse for Java development > and front-end/UI team uses the PHP plug in to eclipse. It's > eclipse all the way. > > > --- Zeljko Filipin wrote: > > > I am using Arachno Ruby IDE > > > (http://www.ruby-ide.com/ruby/ruby_ide_and_ruby_editor.php). > > I also tried > > Scite and Freeride (included in Ruby). I am just > > wandering what the rest of > > you use (Eclipse...). > > > > Zeljko > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- Saud Aziz You must be the change you wish to see in the world. -- Mahatma Ghandi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051219/d7ff09bc/attachment.html From jeff.darklight at gmail.com Mon Dec 19 13:51:28 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 19 Dec 2005 10:51:28 -0800 Subject: [Wtr-general] ruby ide In-Reply-To: <20051219180416.28828.qmail@web52904.mail.yahoo.com> References: <001701c604b1$a3147ff0$c6e7fea9@officezg.wa> <20051219180416.28828.qmail@web52904.mail.yahoo.com> Message-ID: I've used JEdit, Eclipse w/ RDT, Komodo, ArachnoRuby, FreeRIDE, Scite, Emacs w/ ruby-mode & ruby-electric-mode ... uh ... I think that's all of them ... I prefer Komodo, or ArachnoRuby, or Emacs ... I've worked with them all, they all work. It really comes down to preference, because they are all very different ways of doing things ... ArachnoRuby is my windows favorite. Under Linux, I just use Emacs ... works well for me. Anyways, hope that helps answer your questions. Ciao. j. On 12/19/05, Roy Sin wrote: > > I used RDT plugin for Eclipse, works great. And our > back-end development team uses Eclipse for Java development > and front-end/UI team uses the PHP plug in to eclipse. It's > eclipse all the way. > > > --- Zeljko Filipin wrote: > > > I am using Arachno Ruby IDE > > > (http://www.ruby-ide.com/ruby/ruby_ide_and_ruby_editor.php). > > I also tried > > Scite and Freeride (included in Ruby). I am just > > wandering what the rest of > > you use (Eclipse...). > > > > Zeljko > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- "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/20051219/c98f1196/attachment.html From roy_sin at yahoo.com Mon Dec 19 16:54:57 2005 From: roy_sin at yahoo.com (Roy Sin) Date: Mon, 19 Dec 2005 13:54:57 -0800 (PST) Subject: [Wtr-general] javascript popup In-Reply-To: <81D3249A8615C045840303539087BED6BB7BD9@mqserver2k3.metaquest2k3.local> Message-ID: <20051219215457.3815.qmail@web52903.mail.yahoo.com> Hi Tolou, I spent some time trying out different ways to close javascript popup. This is what I use and it works great. StartClicker method which is from the popups_test.rb sample #------------ def startClicker( button , waitTime = 0.5) w = WinClicker.new longName = $ie.dir.gsub("/" , "\\" ) shortName = w.getShortFileName(longName) c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button } #{ waitTime} " puts "Starting #{c}" w.winsystem(c) w=nil end #------------- you can either include this def right into your test case or put it in a seperate rb file and require it and the beginning of your test. Then just inlude this one line statement as in startClicker("OK") ie.frame("TopToolbar2").link(:id,"a_History").click just before you launch your popup. Cheers Roy --- Tolou Taherinia wrote: > > Hi all, > > I have an Microsoft internet explorer alert box that > comes up when clicking on a button in my web application > and Im unable to click on "ok" in order to close this > alert message.This is the button that invokes the > javascript alert. > > ie.frame("TopToolbar2").link(:id,"a_History").click > > I have tried almost everything...and any help would be > greately apprecitaed... > > > > > > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From amithashettyb at yahoo.co.in Tue Dec 20 01:11:38 2005 From: amithashettyb at yahoo.co.in (Amitha Shetty) Date: Tue, 20 Dec 2005 06:11:38 +0000 (GMT) Subject: [Wtr-general] How to click or access Map and Area tags? In-Reply-To: Message-ID: <20051220061138.10481.qmail@web8502.mail.in.yahoo.com> Hi, I downloaded the tar ball so that I can use XPATH extensions in my tests. The chart which I am tring to access is in a table(index=8,but the table has no rows and columns.column_count gives error) within a frame(index =3). So when I try ie.element_by_xpath("//area[contains(@href , 'PieChart.html')]/").click() it throws 'Undefined method click for nil class' exception when I try ie.frame(:index,3).element_by_xpath("//area[contains(@href , 'PieChart.html')]/").click() it throws : undefined method `element_by_xpath' for # (NoMethodError) exception I read in the doc 'Support for XPATH in watir' that xpath does not support FRAMES. I have to specify the frame and then the link...How do I do it? Thanks, Amitha Angrez Singh wrote: Hi, Your problem is how to access an element for which there is no class in WATiR. You can use XPATH extension of WATiR which will be availabe in v1.5 or you can always download the tar ball from HEAD. By using XPATH extension you can get any element by using an XPATH expression. For elements having class in WATiR a new attribute (:xpath) for selecting element is added. But for elements not having class, you can use function element_by_xpath of IE class to get the underlying OLE Object. In your case it would be something like this: ie.element_by_xpath("//area[contains(@href , 'PieChart.html')]/").click() For more details refer to the "XPath suppoort in Watir.doc" under the doc section in CVS. Regards, Angrez On 12/19/05, Amitha Shetty wrote: Hi, The screen under test has a piechart.HTML source for this Chart has Map and Area tags. This Chart has link on one of its portions.How do I click on this link using Watir? I want to access this chart. HTML for the chart is as shown below:
"$ie.link(:url,"PieChart.html?category=Critical&pieIndex=0").click" gives Unable to locate object exception. However $ie.goto("PieChart.html?category=Critical&pieIndex=0") will go to the page directed by the link on the Chart. How to click or access these Map and Area tags? Thanks, Amitha Send instant messages to your online friends http://in.messenger.yahoo.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 Send instant messages to your online friends http://in.messenger.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051220/a0878455/attachment.html From senthil.nkkl at gmail.com Tue Dec 20 03:26:37 2005 From: senthil.nkkl at gmail.com (senthil raja) Date: Tue, 20 Dec 2005 13:56:37 +0530 Subject: [Wtr-general] Wait function never returns in case of Multiple Frame pages Message-ID: Hi, In watir, when i access a page having multiple frames, using start() method, the control never returns even after the page has loaded completely. Later, i found that when the readystate attribute value becomes 3 it did not change to 4 after completion of page load. Why is this happening in pages with multiple frames? How can i assert if the page is loaded completely. At present i am using sleep function with approximate time setting. Thanks & Regards, Senthil Raja -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051220/63d58143/attachment.html From angrez at gmail.com Tue Dec 20 03:38:49 2005 From: angrez at gmail.com (Angrez Singh) Date: Tue, 20 Dec 2005 14:08:49 +0530 Subject: [Wtr-general] How to click or access Map and Area tags? In-Reply-To: <20051220061138.10481.qmail@web8502.mail.in.yahoo.com> References: <20051220061138.10481.qmail@web8502.mail.in.yahoo.com> Message-ID: Hi, So when I try > ie.element_by_xpath("//area[contains(@href , 'PieChart.html')]/").click() > it throws 'Undefined method click for nil class' exception > This means that it hasn't returned you the element. I did tried the same xpath on the HTML code snippet provided by you in the mail and it did worked. Just check your xpath expression or try some different xpath expression. Can you send the complete HTML, and watir code ? Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051220/3c2f52e9/attachment.html From zeljko.filipin at gmail.com Tue Dec 20 04:05:56 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Tue, 20 Dec 2005 10:05:56 +0100 Subject: [Wtr-general] ruby ide In-Reply-To: Message-ID: <001c01c60544$96e9d660$c6e7fea9@officezg.wa> Thank you all. Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jeff Wood Sent: Monday, December 19, 2005 7:51 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] ruby ide I've used JEdit, Eclipse w/ RDT, Komodo, ArachnoRuby, FreeRIDE, Scite, Emacs w/ ruby-mode & ruby-electric-mode ... uh ... I think that's all of them ... I prefer Komodo, or ArachnoRuby, or Emacs ... I've worked with them all, they all work. It really comes down to preference, because they are all very different ways of doing things ... ArachnoRuby is my windows favorite. Under Linux, I just use Emacs ... works well for me. Anyways, hope that helps answer your questions. Ciao. j. On 12/19/05, Roy Sin wrote: I used RDT plugin for Eclipse, works great. And our back-end development team uses Eclipse for Java development and front-end/UI team uses the PHP plug in to eclipse. It's eclipse all the way. --- Zeljko Filipin < zeljko.filipin at gmail.com> wrote: > I am using Arachno Ruby IDE > (http://www.ruby-ide.com/ruby/ruby_ide_and_ruby_editor.php ). > I also tried > Scite and Freeride (included in Ruby). I am just > wandering what the rest of > you use (Eclipse...). > > Zeljko > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- "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/20051220/8dfc082e/attachment.html From ttaherinia at metaquest.com Tue Dec 20 11:39:06 2005 From: ttaherinia at metaquest.com (Tolou Taherinia) Date: Tue, 20 Dec 2005 11:39:06 -0500 Subject: [Wtr-general] javascript popup Message-ID: <81D3249A8615C045840303539087BED6B9E974@mqserver2k3.metaquest2k3.local> Thanks Roy for the Help...I tried that and it worked but the problem is it takes a little too long in order to click on ok on the alert box...I was wondering if there is a way to reduce this waiting time. I reduced the waitTime in the startClicker function to 0.2 and it didn't change anything... Thanks -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Roy Sin Sent: Monday, December 19, 2005 4:55 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] javascript popup Hi Tolou, I spent some time trying out different ways to close javascript popup. This is what I use and it works great. StartClicker method which is from the popups_test.rb sample #------------ def startClicker( button , waitTime = 0.5) w = WinClicker.new longName = $ie.dir.gsub("/" , "\\" ) shortName = w.getShortFileName(longName) c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button } #{ waitTime} " puts "Starting #{c}" w.winsystem(c) w=nil end #------------- you can either include this def right into your test case or put it in a seperate rb file and require it and the beginning of your test. Then just inlude this one line statement as in startClicker("OK") ie.frame("TopToolbar2").link(:id,"a_History").click just before you launch your popup. Cheers Roy --- Tolou Taherinia wrote: > > Hi all, > > I have an Microsoft internet explorer alert box that comes up when > clicking on a button in my web application and Im unable to click on > "ok" in order to close this alert message.This is the button that > invokes the javascript alert. > > ie.frame("TopToolbar2").link(:id,"a_History").click > > I have tried almost everything...and any help would be greately > apprecitaed... > > > > > > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From hrishij at synechron.com Tue Dec 20 23:53:44 2005 From: hrishij at synechron.com (Hrishikesh Jamadagni) Date: Wed, 21 Dec 2005 10:23:44 +0530 Subject: [Wtr-general] watir simple Message-ID: <000001c605ea$8690cac0$74021f0a@fusionpune.local> Does anybody know how to use watir simple in the code? Do we have to include any thing at the start? Regards Hrishij -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051221/9898ca67/attachment.html From Jamuna.Nithyanandam at honeywell.com Wed Dec 21 00:09:38 2005 From: Jamuna.Nithyanandam at honeywell.com (Jamuna, Nithyanandam (IE10)) Date: Wed, 21 Dec 2005 10:39:38 +0530 Subject: [Wtr-general] watir simple Message-ID: <9F4FA7B367FAAD4E9D78594B289244FA06246B90@IE10EV801.global.ds.honeywell.com> Hi Hrishij, Hope this piece of code of helps you in using watir simple in code. require "watir" require "watir/watir_simple" include Watir include Watir::Simple simple1 = Simple simple1.new_browser_at("http://www.google.com/") simple1.enter_text_into_field_with_name("q","WATIR") simple1.click_button_with_caption("Google Search") Regards, Jamuna Nithyanandam ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Hrishikesh Jamadagni Sent: Wednesday, December 21, 2005 10:24 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] watir simple Does anybody know how to use watir simple in the code? Do we have to include any thing at the start? Regards Hrishij -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051221/2ca4e604/attachment.html From amithashettyb at yahoo.co.in Wed Dec 21 03:33:12 2005 From: amithashettyb at yahoo.co.in (Amitha Shetty) Date: Wed, 21 Dec 2005 08:33:12 +0000 (GMT) Subject: [Wtr-general] How to click or access Map and Area tags? In-Reply-To: Message-ID: <20051221083312.48709.qmail@web8504.mail.in.yahoo.com> Hi, The Chart I am trying to access is in a table within a "Frame". The code I used to access it is: ie.element_by_xpath("//area[contains(@href , "PieChart.html?category=Critical&pieIndex=0")]/").click() it throws 'Undefined method click for nil class' exception I also tried: ie.element_by_xpath("//area[contains(@href , "PieChart.html")]/").click() and I got the same exception when I try ie.frame(:index,3).element_by_xpath("//area[contains(@href , 'PieChart.html?category=Critical&pieIndex=0')]/").click() it throws : undefined method `element_by_xpath' for # (NoMethodError) exception I read in the doc 'Support for XPATH in watir' that xpath does not support FRAMES. I have to specify the frame and then the link...How do I do it? HTML for the chart is as shown below:
Angrez Singh wrote: Hi, So when I try ie.element_by_xpath("//area[contains(@href , ' PieChart.html')]/").click() it throws 'Undefined method click for nil class' exception This means that it hasn't returned you the element. I did tried the same xpath on the HTML code snippet provided by you in the mail and it did worked. Just check your xpath expression or try some different xpath expression. Can you send the complete HTML, and watir code ? Regards, Angrez _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general Send instant messages to your online friends http://in.messenger.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051221/b12962e3/attachment.html From angrez at gmail.com Wed Dec 21 07:17:21 2005 From: angrez at gmail.com (Angrez Singh) Date: Wed, 21 Dec 2005 17:47:21 +0530 Subject: [Wtr-general] How to click or access Map and Area tags? In-Reply-To: <20051221083312.48709.qmail@web8504.mail.in.yahoo.com> References: <20051221083312.48709.qmail@web8504.mail.in.yahoo.com> Message-ID: Hi, > when I try ie.frame(:index,3).element_by_xpath("//area[contains(@href , ' > PieChart.html?category=Critical&pieIndex=0')]/").click() it throws : > undefined method `element_by_xpath' for # > (NoMethodError) exception > This is because element_by_xpath method is defined in IE class. Will look into this? Bret: Does moving xpath related methods to container module solves the purpose? Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051221/33cc9b68/attachment.html From pat at cappelaere.com Wed Dec 21 07:24:27 2005 From: pat at cappelaere.com (Pat Cappelaere) Date: Wed, 21 Dec 2005 07:24:27 -0500 Subject: [Wtr-general] How to click or access Map and Area tags? In-Reply-To: <20051221083312.48709.qmail@web8504.mail.in.yahoo.com> Message-ID: I am not sure about your exact problem but I ran into something similar where I needed to click in a specific area of the screen. I had to use the AutotIt capability with Mouseclick function which allows to specific the mouse button, x, y, clicks... http://www.autoitscript.com/autoit3/docs/functions.htm If you are not running on Windows then I am not sure... Hope this helps. Pat. From: Amitha Shetty Reply-To: Date: Wed, 21 Dec 2005 08:33:12 +0000 (GMT) To: Subject: Re: [Wtr-general] How to click or access Map and Area tags? Hi, The Chart I am trying to access is in a table within a "Frame". The code I used to access it is: ie.element_by_xpath("//area[contains(@href , "PieChart.html?category=Critical&pieIndex=0")]/").click() it throws 'Undefined method click for nil class' exception I also tried: ie.element_by_xpath("//area[contains(@href , "PieChart.html")]/").click() and I got the same exception when I try ie.frame(:index,3).element_by_xpath("//area[contains(@href , 'PieChart.html?category=Critical&pieIndex=0')]/").click() it throws : undefined method `element_by_xpath' for # (NoMethodError) exception I read in the doc 'Support for XPATH in watir' that xpath does not support FRAMES. I have to specify the frame and then the link...How do I do it? HTML for the chart is as shown below:
Angrez Singh wrote: > Hi, > > > >> >> So when I try >> >> ie.element_by_xpath("//area[contains(@href , ' PieChart.html')]/").click() >> >> it throws 'Undefined method click for nil class' exception > > This means that it hasn't returned you the element. I did tried the same xpath > on the HTML code snippet provided by you in the mail and it did worked. Just > check your xpath expression or try some different xpath expression. Can you > send the complete HTML, and watir code ? > > Regards, > Angrez > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general Send instant messages to your online friends http://in.messenger.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051221/f9459d56/attachment.html From jayrod84 at gmail.com Wed Dec 21 12:35:10 2005 From: jayrod84 at gmail.com (jerrad anderson) Date: Wed, 21 Dec 2005 12:35:10 -0500 Subject: [Wtr-general] problems with R.A.D. Editor Message-ID: <574c0ed20512210935i111ce373k705bd34acb92260@mail.gmail.com> I have another app that I'm trying to test that uses this editor http://www.telerik.com/r.a.d.controls/Editor/Examples/MultipleEditors/DefaultCS.aspx I have tried for sometime to get to the input, and all has failed. There is an iframe with the id of RadEContentIframeeditor1 on the above page. I can't seem to insert any text into that field. Can anyone please help? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051221/77f240ac/attachment.html From roy_sin at yahoo.com Wed Dec 21 19:16:54 2005 From: roy_sin at yahoo.com (Roy Sin) Date: Wed, 21 Dec 2005 16:16:54 -0800 (PST) Subject: [Wtr-general] how to install Watir for the x-path support... Message-ID: <20051222001654.95455.qmail@web52906.mail.yahoo.com> I downloaded the latest Watir tarball from CVS. How do I get x-path to work on Windows. My current Watir install is in C:\Program Files\Watir. Do I just take the files I unzipped from Watir.tar.gz and put them in my current Watir directory? thanks __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From ttaherinia at metaquest.com Wed Dec 21 22:41:45 2005 From: ttaherinia at metaquest.com (Tolou Taherinia) Date: Wed, 21 Dec 2005 22:41:45 -0500 Subject: [Wtr-general] Accesssing table row Message-ID: <81D3249A8615C045840303539087BED6B9EA2D@mqserver2k3.metaquest2k3.local> Hi, Im trying to click on a specific row in a html table however WATIR is unable to find the table with the specified name and I get the following message Watir::Exception::UnknownTableException: Unable to locate a table using name and tblGrid This is how I define the function for accessing this specfic row def test_get_rowvalues_full_row assert_equal(["EditTest", "Administrator", "Gold", "E-mail","Yes"], $ie.frame("Main").frame("frmSLA").frame("ifrAgreements").table(:name, "tblGrid").row_values(1)) $ie.frame("Main").frame("frmSLA").frame("ifrAgreements").table(:name,"tb lGrid")[1][1].click end and I later on call this function by doing test_get_rowvalues_full_row ( ) any help would be greately appreciated... thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051221/fef08219/attachment.html From ttaherinia at metaquest.com Thu Dec 22 14:59:32 2005 From: ttaherinia at metaquest.com (Tolou Taherinia) Date: Thu, 22 Dec 2005 14:59:32 -0500 Subject: [Wtr-general] Clicking on a row in an HTML table Message-ID: <81D3249A8615C045840303539087BED6B9EA61@mqserver2k3.metaquest2k3.local> Hi, Im trying to click on a specific row in a html table however WATIR is unable to find the table with the specified name and I get the following message Watir::Exception::UnknownTableException: Unable to locate a table using name and tblGrid This is how I define the function for accessing this specfic row def test_get_rowvalues_full_row assert_equal(["EditTest", "Administrator", "Gold", "E-mail","Yes"], $ie.frame("Main").frame("frmSLA").frame("ifrAgreements").table(:name, "tblGrid").row_values(1)) $ie.frame("Main").frame("frmSLA").frame("ifrAgreements").table(:name,"tb lGrid")[1][1].click end and I later on call this function by doing test_get_rowvalues_full_row ( ) any help would be greately appreciated... thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051222/d5d73753/attachment.html From nijon at ca.ibm.com Sat Dec 24 19:38:48 2005 From: nijon at ca.ibm.com (Jonathan Ni) Date: Sat, 24 Dec 2005 19:38:48 -0500 Subject: [Wtr-general] Jonathan Ni is out of the office. Message-ID: I will be out of the office starting 12/24/2005 and will not return until 01/09/2006. I will respond to your message when I return. From ASahu at thoughtworks.com Sat Dec 24 23:31:48 2005 From: ASahu at thoughtworks.com (Anand Jagadishprasad Sahu) Date: Sun, 25 Dec 2005 10:01:48 +0530 Subject: [Wtr-general] Anand Jagadishprasad Sahu is out of the office. Message-ID: I will be out of the office starting 12/24/2005 and will not return until 01/03/2006. I will respond to your message when I return on 03-Jan-2006. In case of any urgency, please send an email to gsrusti at thoughtworks.com or mnaig at thoughtworks.com. Happy New Year. From angrez at gmail.com Sun Dec 25 23:56:35 2005 From: angrez at gmail.com (Angrez Singh) Date: Mon, 26 Dec 2005 10:26:35 +0530 Subject: [Wtr-general] javascript Alert In-Reply-To: <81D3249A8615C045840303539087BED6BB7BDD@mqserver2k3.metaquest2k3.local> References: <81D3249A8615C045840303539087BED6BB7BDD@mqserver2k3.metaquest2k3.local> Message-ID: Hi, You have to call the function push_alert_button before clicking the button that invokes a javascript pop up. So I think this should work: require 'watir' require 'watir/WindowHelper' . .code for opening up page . helper = WindowHelper.new helper.push_alert_button() ie.frame("TopToolbar2").link(:id,"a_History").click Regards, Angrez On 12/18/05, Tolou Taherinia wrote: > > Hi, > > This is the code I have in order to click on a button which will invoke a > javascript popup, however the ok button on the alert is never clicked and I > do not get any errors. I based my code on the jscriptExtraAlert.rb code. > Any help would be greately appreciated. > > > > require 'watir' > > require 'watir/WindowHelper' > > . > .code for opening up page > . > > ie.frame("TopToolbar2").link(:id,"a_History").click > > helper = WindowHelper.new > helper.push_alert_button() > > _______________________________________________ > 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/20051226/b1d5842d/attachment.html From chaya_b_s at yahoo.co.in Mon Dec 26 00:04:31 2005 From: chaya_b_s at yahoo.co.in (chaya shetty) Date: Mon, 26 Dec 2005 05:04:31 +0000 (GMT) Subject: [Wtr-general] Is there way to find the parent nodes and child nodes of a tree structure in watir? Message-ID: <20051226050431.55947.qmail@web8305.mail.in.yahoo.com> Hi, The application under test has got a tree structure. I want to write a test case which invovles navigating through the tree structure and verifying whether the correct screen is displayed when the corresponding link is clicked. I am able to navigate through the tree structure by using the link index.I am retrieving the innertext of the link and then verifying whether that text is present on the other frame. The code that I am using link_index = 1 while(ie.frame(:index,tree_frame_index).link(:index,link_index).exists?) link_text = ie.frame(:index,tree_frame_index).link(:index,link_index).innerText ie.frame(:index,tree_frame_index).link(:index,link_index).click if $ie.frame(:index,text_frame_index).contains_text(link_text) puts "Test passed" else puts "Test failed" end link_index = link_index + 1 end Here the text of the child nodes are same for all the parent nodes. How do I know whether the text displayed of the child node belongs to the corresponding parent node? Is there way by which we can find out the parent nodes and child nodes of a tree structure in watir? Send instant messages to your online friends http://in.messenger.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051226/20176e40/attachment.html From angrez at gmail.com Mon Dec 26 00:04:42 2005 From: angrez at gmail.com (Angrez Singh) Date: Mon, 26 Dec 2005 10:34:42 +0530 Subject: [Wtr-general] how to install Watir for the x-path support... In-Reply-To: <20051222001654.95455.qmail@web52906.mail.yahoo.com> References: <20051222001654.95455.qmail@web52906.mail.yahoo.com> Message-ID: Hi Roy, Yes, you just need to change the files in the installation directory. Also read the document "Support for XPath in Watir.doc" under the doc section in CVS. You also need to replace two files in the REXML directory found under " [ruby installation directory]/lib/ruby/1.8/rexml ". The two files are " element.rb " and " functions.rb ". These files are available on CVS under the directory " watir/watir/rexml ". Reply me if you want more help on that. Regards, Angrez On 12/22/05, Roy Sin wrote: > > I downloaded the latest Watir tarball from CVS. How do I > get x-path to work on Windows. My current Watir install is > in C:\Program Files\Watir. Do I just take the files I > unzipped from Watir.tar.gz and put them in my current Watir > directory? > > thanks > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051226/070cc830/attachment.html From pat at cappelaere.com Mon Dec 26 18:03:24 2005 From: pat at cappelaere.com (Pat Cappelaere) Date: Mon, 26 Dec 2005 18:03:24 -0500 Subject: [Wtr-general] how to install Watir for the x-path support... In-Reply-To: Message-ID: Angrez, I am having a few problems with xpath. I am trying to access an image tag buried with a div I tried: Div = @ie.div(:xpath, ?some path?) This returns ?unknown way of finding a div I also tried Div = @ie.element_by_xpath(?some path?) this returns undefined method ?element_by_xpath? fro # Reply-To: Date: Mon, 26 Dec 2005 10:34:42 +0530 To: Subject: Re: [Wtr-general] how to install Watir for the x-path support... Hi Roy, Yes, you just need to change the files in the installation directory. Also read the document "Support for XPath in Watir.doc" under the doc section in CVS. You also need to replace two files in the REXML directory found under " [ruby installation directory]/lib/ruby/1.8/rexml ". The two files are " element.rb " and " functions.rb ". These files are available on CVS under the directory " watir/watir/rexml ". Reply me if you want more help on that. Regards, Angrez On 12/22/05, Roy Sin wrote: > I downloaded the latest Watir tarball from CVS. How do I > get x-path to work on Windows. My current Watir install is > in C:\Program Files\Watir. Do I just take the files I > unzipped from Watir.tar.gz and put them in my current Watir > directory? > > thanks > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > _______________________________________________ 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/20051226/3b74b057/attachment.html From angrez at gmail.com Tue Dec 27 00:22:15 2005 From: angrez at gmail.com (Angrez Singh) Date: Tue, 27 Dec 2005 10:52:15 +0530 Subject: [Wtr-general] how to install Watir for the x-path support... In-Reply-To: References: Message-ID: Hi Pat, Just check once again if you are using latest in the CVS. I browsed through the watir.rb file in CVS and it does contain method 'element_by_xpath' for IE class. Also div can be found using :xpath. Just make sure you are using the latest version of watir.rb file i.e. v1.269 Regards, Angrez On 12/27/05, Pat Cappelaere wrote: > > Angrez, > > I am having a few problems with xpath. > I am trying to access an image tag buried with a div > I tried: > Div = @ie.div(:xpath, 'some path') > This returns "unknown way of finding a div > > I also tried > Div = @ie.element_by_xpath('some path') > this returns undefined method "element_by_xpath" fro # > Thanks. > [I am using the latest in CVS] > Pat. > > > > ------------------------------ > *From: *Angrez Singh > *Reply-To: * > *Date: *Mon, 26 Dec 2005 10:34:42 +0530 > *To: * > *Subject: *Re: [Wtr-general] how to install Watir for the x-path > support... > > Hi Roy, > > Yes, you just need to change the files in the installation directory. Also > read the document "Support for XPath in Watir.doc" under the doc section > in CVS. You also need to replace two files in the REXML directory found > under " [ruby installation directory]/lib/ruby/1.8/rexml ". The two files > are " element.rb " and " functions.rb ". These files are available on CVS > under the directory " watir/watir/rexml ". Reply me if you want more help on > that. > > Regards, > Angrez > > On 12/22/05, *Roy Sin* wrote: > > I downloaded the latest Watir tarball from CVS. How do I > get x-path to work on Windows. My current Watir install is > in C:\Program Files\Watir. Do I just take the files I > unzipped from Watir.tar.gz and put them in my current Watir > directory? > > thanks > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > ------------------------------ > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051227/f6e848f0/attachment.html From rajan_parkhi at persistent.co.in Tue Dec 27 07:28:26 2005 From: rajan_parkhi at persistent.co.in (rajan_parkhi) Date: Tue, 27 Dec 2005 17:58:26 +0530 Subject: [Wtr-general] how to install Watir for the x-path support... In-Reply-To: Message-ID: <200512271226.AGX17885@persistent.co.in> Hi Angrez, Here is the html file. Thanks, Rajan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Angrez Singh Sent: Tuesday, December 27, 2005 10:52 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] how to install Watir for the x-path support... Hi Pat, Just check once again if you are using latest in the CVS. I browsed through the watir.rb file in CVS and it does contain method 'element_by_xpath' for IE class. Also div can be found using :xpath. Just make sure you are using the latest version of watir.rb file i.e. v1.269 Regards, Angrez On 12/27/05, Pat Cappelaere wrote: Angrez, I am having a few problems with xpath. I am trying to access an image tag buried with a div I tried: Div = @ie.div(:xpath, 'some path') This returns "unknown way of finding a div I also tried Div = @ie.element_by_xpath('some path') this returns undefined method "element_by_xpath" fro # Reply-To: Date: Mon, 26 Dec 2005 10:34:42 +0530 To: Subject: Re: [Wtr-general] how to install Watir for the x-path support... Hi Roy, Yes, you just need to change the files in the installation directory. Also read the document "Support for XPath in Watir.doc" under the doc section in CVS. You also need to replace two files in the REXML directory found under " [ruby installation directory]/lib/ruby/1.8/rexml ". The two files are " element.rb " and " functions.rb ". These files are available on CVS under the directory " watir/watir/rexml ". Reply me if you want more help on that. Regards, Angrez On 12/22/05, Roy Sin wrote: I downloaded the latest Watir tarball from CVS. How do I get x-path to work on Windows. My current Watir install is in C:\Program Files\Watir. Do I just take the files I unzipped from Watir.tar.gz and put them in my current Watir directory? thanks __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _____ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051227/91895786/attachment.html -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051227/91895786/attachment-0001.html From pat at cappelaere.com Tue Dec 27 10:12:59 2005 From: pat at cappelaere.com (Pat Cappelaere) Date: Tue, 27 Dec 2005 10:12:59 -0500 Subject: [Wtr-general] how to install Watir for the x-path support... In-Reply-To: Message-ID: Angrez, You are absolutely right. Somehow, I had watir.rb in ruby/lib/ruby/site_ruby/1.8 and one in ruby/lib/ruby/gems/1.8 (installed using gem). I was doing manual tests in the gem directory but the final fitnesse tests were using the other file. It might be nice to add a method in the IE class to retrieve the version and release for that purpose. Thanks again. Pat. From: Angrez Singh Reply-To: Date: Tue, 27 Dec 2005 10:52:15 +0530 To: Subject: Re: [Wtr-general] how to install Watir for the x-path support... Hi Pat, Just check once again if you are using latest in the CVS. I browsed through the watir.rb file in CVS and it does contain method 'element_by_xpath' for IE class. Also div can be found using :xpath. Just make sure you are using the latest version of watir.rb file i.e. v1.269 Regards, Angrez On 12/27/05, Pat Cappelaere wrote: > Angrez, > > I am having a few problems with xpath. > I am trying to access an image tag buried with a div > I tried: > Div = @ie.div(:xpath, 'some path') > This returns "unknown way of finding a div > > I also tried > Div = @ie.element_by_xpath('some path') > this returns undefined method "element_by_xpath" fro # > Thanks. > [I am using the latest in CVS] > Pat. > > > > > From: Angrez Singh > Reply-To: > Date: Mon, 26 Dec 2005 10:34:42 +0530 > To: > Subject: Re: [Wtr-general] how to install Watir for the x-path support... > > Hi Roy, > > Yes, you just need to change the files in the installation directory. Also > read the document "Support for XPath in Watir.doc" under the doc section in > CVS. You also need to replace two files in the REXML directory found under " > [ruby installation directory]/lib/ruby/1.8/rexml ". The two files are " > element.rb " and " functions.rb ". These files are available on CVS under the > directory " watir/watir/rexml ". Reply me if you want more help on that. > > Regards, > Angrez > > On 12/22/05, Roy Sin wrote: >> I downloaded the latest Watir tarball from CVS. How do I >> get x-path to work on Windows. My current Watir install is >> in C:\Program Files\Watir. Do I just take the files I >> unzipped from Watir.tar.gz and put them in my current Watir >> directory? >> >> thanks >> >> __________________________________________________ >> Do You Yahoo!? >> Tired of spam? Yahoo! Mail has the best spam protection around >> http://mail.yahoo.com >> _______________________________________________ >> Wtr-general mailing list >> Wtr-general at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wtr-general >> > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051227/0814bdf3/attachment.html From ash_mita at yahoo.com Wed Dec 28 10:06:54 2005 From: ash_mita at yahoo.com (Asmita Srivastava) Date: Wed, 28 Dec 2005 07:06:54 -0800 (PST) Subject: [Wtr-general] (no subject) Message-ID: <20051228150654.25117.qmail@web51604.mail.yahoo.com> Hi, We are trying to use Watir for testing our application and there are two majar issues we are facing at present. First one is in catching the navigation exception or other system exception. Second is while accessing the the contents of iframe which changes dynamically. Please, if anyone has any idea about this then please reply. Thanks, Asmita --------------------------------- Yahoo! Shopping Find Great Deals on Holiday Gifts at Yahoo! Shopping -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051228/d398c9cc/attachment.html From ati.ozgur at gmail.com Wed Dec 28 11:14:33 2005 From: ati.ozgur at gmail.com (Atilla Ozgur) Date: Wed, 28 Dec 2005 18:14:33 +0200 Subject: [Wtr-general] (no subject) In-Reply-To: <20051228150654.25117.qmail@web51604.mail.yahoo.com> References: <20051228150654.25117.qmail@web51604.mail.yahoo.com> Message-ID: What do you mean by "catching the navigation exception or other system exception." On 12/28/05, Asmita Srivastava wrote: > Hi, > > We are trying to use Watir for testing our application and there are two > majar issues we are facing at present. > First one is in catching the navigation exception or other system exception. > Second is while accessing the the contents of iframe which changes > dynamically. > > Please, if anyone has any idea about this then please reply. > > Thanks, > Asmita > > > > > > ________________________________ > Yahoo! Shopping > Find Great Deals on Holiday Gifts at Yahoo! Shopping > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > From amlu01 at yahoo.com Wed Dec 28 11:21:00 2005 From: amlu01 at yahoo.com (amol deshpande) Date: Wed, 28 Dec 2005 08:21:00 -0800 (PST) Subject: [Wtr-general] (no subject) In-Reply-To: <20051228150654.25117.qmail@web51604.mail.yahoo.com> Message-ID: <20051228162100.28818.qmail@web36801.mail.mud.yahoo.com> Hi Asmita, you can use the begin and rescue to handel exceptions.As for getting the contents of the frame..if you know the expected value you can assert that. If you could post some example code then it will be easier to answer. Amol --- Asmita Srivastava wrote: > Hi, > > We are trying to use Watir for testing our > application and there are two majar issues we are > facing at present. > First one is in catching the navigation exception > or other system exception. > Second is while accessing the the contents of > iframe which changes dynamically. > > Please, if anyone has any idea about this then > please reply. > > Thanks, > Asmita > > > > > > > --------------------------------- > Yahoo! Shopping > Find Great Deals on Holiday Gifts at Yahoo! > Shopping > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > No Body Has ever Collided With The Sky...So Sky Is The Limit! __________________________________________ Yahoo! DSL ? Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com From pat at cappelaere.com Wed Dec 28 15:32:29 2005 From: pat at cappelaere.com (Pat Cappelaere) Date: Wed, 28 Dec 2005 15:32:29 -0500 Subject: [Wtr-general] Accessing div attributes In-Reply-To: Message-ID: I can find that div using xpath or by id but I do not seem to be able to get to the visibility attribute
Is this doable? Thanks. Pat. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051228/9aae1c64/attachment.html From jeff.darklight at gmail.com Wed Dec 28 17:04:00 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 28 Dec 2005 14:04:00 -0800 Subject: [Wtr-general] Accessing div attributes In-Reply-To: References: Message-ID: I would grab the outerHtml attribute of the div object and then use a regular expression to dig out whatever attribute you are after ... ... I believe that you can use :html as a how parameter now. ( yes/no, can anybody confirm deny ???? ) j. On 12/28/05, Pat Cappelaere wrote: > I can find that div using xpath or by id but I do not seem to be able to > get to the visibility attribute > >
id="xxx"> >
> > Is this doable? > Thanks. > Pat. > > _______________________________________________ > 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 bret at pettichord.com Wed Dec 28 17:30:42 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 28 Dec 2005 16:30:42 -0600 Subject: [Wtr-general] Accessing div attributes In-Reply-To: References: Message-ID: On 12/28/05, Jeff Wood wrote: > > ... I believe that you can use :html as a how parameter now. > > ( yes/no, can anybody confirm deny ???? ) Yes, in HEAD (aka 1.5) Any Watir attribute can be used as a "how" parameter. We have a proposal under consideration to make any HTML attribute at all work as a how parameter, even if a Watir wrapper hasn't been explicitly provided. Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051228/40deef69/attachment.html From bret at pettichord.com Wed Dec 28 17:36:39 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 28 Dec 2005 16:36:39 -0600 Subject: [Wtr-general] Accessing div attributes In-Reply-To: References: Message-ID: On 12/28/05, Pat Cappelaere wrote: > > I can find that div using xpath or by id but I do not seem to be able to > get to the visibility attribute > >
id="xxx"> >
> > Is this doable? ie.div(:id, "xxx").ole_element.style.visibility -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051228/44b47d0e/attachment.html From pat at cappelaere.com Wed Dec 28 18:27:02 2005 From: pat at cappelaere.com (Pat Cappelaere) Date: Wed, 28 Dec 2005 18:27:02 -0500 Subject: [Wtr-general] Accessing div attributes In-Reply-To: Message-ID: This would be doable but ole_element is an undefined method in watir 1.4.1 I will try against the head version. Thanks again. Pat. From: Bret Pettichord Reply-To: Date: Wed, 28 Dec 2005 16:36:39 -0600 To: Subject: Re: [Wtr-general] Accessing div attributes On 12/28/05, Pat Cappelaere wrote: > I can find that div using xpath or by id but I do not seem to be able to get > to the visibility attribute > >
id="xxx"> >
> > Is this doable? ie.div(:id, "xxx").ole_element.style.visibility _______________________________________________ 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/20051228/9ff26deb/attachment.html From bret at pettichord.com Wed Dec 28 22:34:28 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 28 Dec 2005 21:34:28 -0600 Subject: [Wtr-general] Accessing div attributes In-Reply-To: References: Message-ID: It was called ole_object in 1.4.1, and has been renamed in 1.5 to ole_element. On 12/28/05, Pat Cappelaere wrote: > > This would be doable but ole_element is an undefined method in watir 1.4.1 > I will try against the head version. > Thanks again. > Pat. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051228/85c39827/attachment.html From pat at cappelaere.com Thu Dec 29 08:37:57 2005 From: pat at cappelaere.com (Pat Cappelaere) Date: Thu, 29 Dec 2005 08:37:57 -0500 Subject: [Wtr-general] Accessing div attributes In-Reply-To: Message-ID: Brett, For this example:
...
Intuitively, I would have expected to get an element and be able to access the methods directly such as: ie.div(:id, "xxx").style.visibility And not as: ie.div(:id, "xxx").ole_element.style.visibility This would be easier on the user. Can mixins be used to allow for this? Thanks a lot. Pat. From: Bret Pettichord Reply-To: Date: Wed, 28 Dec 2005 21:34:28 -0600 To: Subject: Re: [Wtr-general] Accessing div attributes It was called ole_object in 1.4.1, and has been renamed in 1.5 to ole_element. On 12/28/05, Pat Cappelaere > wrote: > This would be doable but ole_element is an undefined method in watir 1.4.1 > I will try against the head version. > Thanks again. > Pat. > _______________________________________________ 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/20051229/89c5e174/attachment.html From bret at pettichord.com Thu Dec 29 11:30:58 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 29 Dec 2005 10:30:58 -0600 Subject: [Wtr-general] Accessing div attributes In-Reply-To: References: Message-ID: On 12/29/05, Pat Cappelaere wrote: > > For this example: >
id="xxx">...
> > Intuitively, I would have expected to get an element and be able to access > the methods directly such as: > ie.div(:id, "xxx").style.visibility > And not as: ie.div(:id, "xxx").ole_element.style.visibility I agree. Whenever you see references to the "ole_element" you are basically going beyond what Watir is directly supporting. I've just committed a style method for div (and other elements). Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051229/3ff8e955/attachment.html From pat at cappelaere.com Thu Dec 29 12:16:00 2005 From: pat at cappelaere.com (Pat Cappelaere) Date: Thu, 29 Dec 2005 12:16:00 -0500 Subject: [Wtr-general] Accessing div attributes In-Reply-To: Message-ID: Excellent work. Congratulations. Pat. From: Bret Pettichord Reply-To: Date: Thu, 29 Dec 2005 10:30:58 -0600 To: Subject: Re: [Wtr-general] Accessing div attributes On 12/29/05, Pat Cappelaere wrote: > For this example: >
id="xxx">...
> > Intuitively, I would have expected to get an element and be able to access the > methods directly such as: > ie.div(:id, "xxx").style.visibility > And not as: ie.div(:id, "xxx").ole_element.style.visibility I agree. Whenever you see references to the "ole_element" you are basically going beyond what Watir is directly supporting. I've just committed a style method for div (and other elements). Bret _______________________________________________ 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/20051229/a870b4fd/attachment.html From smanish at gs-lab.com Fri Dec 30 00:49:10 2005 From: smanish at gs-lab.com (smanish) Date: Fri, 30 Dec 2005 11:19:10 +0530 Subject: [Wtr-general] watir internals Message-ID: <43B4CA56.2030105@gs-lab.com> Hi everybody, I am using watir for quite some time to model my Web-GUI tests. However I understand very little about its internals. All I know is that, watir is glue the automation interface of IE. In order to understand it and explain it to my colleagues, I want to prepare a small write-up about "Watir Internals" or "Technology used in Watir". I was wondering is there such a documentation available already? If not, what will be the better place to start? What are the related resources? Thanks a lot for your time. Regards, Manish From navila at pragmaconsultores.com Fri Dec 30 09:47:41 2005 From: navila at pragmaconsultores.com (Nazareno Avila) Date: Fri, 30 Dec 2005 11:47:41 -0300 Subject: [Wtr-general] Using scripts in diferent computers. Message-ID: <77773BA7F357A44B8196F98085407191C06AE3@exchange.pragmanet.local> Hi, I'm new to Ruby. I'm running testing scripts on a computer and they run correctly. When I try to run the same scripts using another computer I get the following error: C:/TestAutomatico_Interbanking\watir\watir2.rb:4: uninitialized constant Watir::IE::FactoryMethods (NameError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require' from ./interbanking.rb:5 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require' from logueo.rb:4 Note: I've generated the same file structure in the new computer. Thanks in advance, Nazareno -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051230/79e74071/attachment.html From dsolis at yahoo.com Fri Dec 30 11:58:26 2005 From: dsolis at yahoo.com (David Solis) Date: Fri, 30 Dec 2005 08:58:26 -0800 (PST) Subject: [Wtr-general] Unable to run watir from IRB Message-ID: <20051230165826.48656.qmail@web52914.mail.yahoo.com> I am trying to do the scripting 101 tutorial. I installed everything as directed. The server is running, ruby and watir is installed. In fact, I am able to run the unittest demo that came with watir. However, when i try to execute watir from irb I get the following error. >irb (main):001:0> require 'watir' dError: No such file to load -- watir from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in `r ire__' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in `r ire' from (irb):1 (main):002:0> my first instinct is to think the path is not correct. Any ideas? --------------------------------- Yahoo! Shopping Find Great Deals on Holiday Gifts at Yahoo! Shopping -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20051230/5cde64d3/attachment.html From bret at pettichord.com Fri Dec 30 12:15:29 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 30 Dec 2005 11:15:29 -0600 Subject: [Wtr-general] watir internals In-Reply-To: <43B4CA56.2030105@gs-lab.com> References: <43B4CA56.2030105@gs-lab.com> Message-ID: Could you state a couple of questions that you specifically would like to see answered or concerns that you would like to see addressed? There are some slide decks in the Scripting101 package (they may not be released, but they are in the tarball). I can't tell whether they are what you are looking for or not. Bret On 12/29/05, smanish wrote: > > Hi everybody, > I am using watir for quite some time to model my Web-GUI tests. > However I understand very little about its internals. All I know > is that, watir is glue the automation interface of IE. In order > to understand it and explain it to my colleagues, I want to prepare > a small write-up about "Watir Internals" or "Technology used in > Watir". > > I was wondering is there such a documentation available already? > If not, what will be the better place to start? > What are the related resources? > > Thanks a lot for your time. > Regards, > Manish > _______________________________________________ > 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/20051230/a7abdcb8/attachment.html From Ben.Torres at rhi.com Fri Dec 30 16:54:07 2005 From: Ben.Torres at rhi.com (Torres, Ben (HQP)) Date: Fri, 30 Dec 2005 13:54:07 -0800 Subject: [Wtr-general] Keeping all global variable in a file Message-ID: <1641BB0AA7287848817A63C3EE9677D50A0678EB@hqp-ex-mb05.na.msds.rhi.com> Hi, Can I keep all my global variables in a separate file from my script files and have several script files use these variables? If so, how? Thanks in advance, Ben From satti_mg at yahoo.com Fri Dec 30 23:13:14 2005 From: satti_mg at yahoo.com (sathya shankar) Date: Fri, 30 Dec 2005 20:13:14 -0800 (PST) Subject: [Wtr-general] Keeping all global variable in a file In-Reply-To: <1641BB0AA7287848817A63C3EE9677D50A0678EB@hqp-ex-mb05.na.msds.rhi.com> Message-ID: <20051231041314.72519.qmail@web31715.mail.mud.yahoo.com> Yes, you can do that.. i think use the following scripts to take the values from the files... require 'singleton' class Configuration include Singleton @Include_paths=[] @@config_file_name="global-config.cfg" def initialize() @Include_paths=[] @props = Property.new() @@config_dir = "." @config_file=@@config_dir + @@config_file_name if File.exists?(@config_file) @props.load(File.open(@config_file)) @gobalconfig1=@props['Common.global1'] end end def global_config1() return @gobalconfig1 end end ====================global-config.cfg should look like this ================ [Common] global1 = i dont know which is the global config file Make changes to the script accordingly and then you can call this in your script by using the following scripts. cp = Configuration.instance() puts cp.global_config1() the result for this would be "i dont know which is the global config file" Let me know find any issues. Sathya Shankar Qantom Software --- "Torres, Ben (HQP)" wrote: > Hi, > > Can I keep all my global variables in a separate > file from my script > files and have several script files use these > variables? If so, how? > > Thanks in advance, > Ben > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > __________________________________ Yahoo! for Good - Make a difference this year. http://brand.yahoo.com/cybergivingweek2005/