From WKruse at multichoice.co.za Thu Feb 1 00:30:08 2007 From: WKruse at multichoice.co.za (Walter Kruse) Date: Thu, 1 Feb 2007 07:30:08 +0200 Subject: [Wtr-general] new browser in background Message-ID: Hi guys I run my scripts from a batch file with the -b option so that the browsers aren't visible. One of our actions causes a new browser window to open, but this is visible despite the -b. Is there any way to prevent the new window from being visible ? Walter Kruse Senior Test Analyst www.OBS-Consulting.com 082 660 7288 http://www.ou-ryperd.net ************************************************************************************************************************** Everything in this e-mail and attachments relating to the official business of MultiChoice Africa is proprietary to the company. Any view or opinion expressed in this message may be the view of the individual and should not automatically be ascribed to the company. If you are not the intended recipient, you may not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify the sender immediately by email, facsimile or telephone and destroy the original message. ************************************************************************************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070201/98a55199/attachment.html From forum-watir-users at openqa.org Thu Feb 1 00:58:36 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Wed, 31 Jan 2007 23:58:36 CST Subject: [Wtr-general] url for link In-Reply-To: <61420021.1170257544335.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <28580995.1170309546166.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, I got this working by using the index number. ie.link(:index,15).click. Thanks a lot, Harish --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6325&messageID=17989#17989 From forum-watir-users at openqa.org Thu Feb 1 01:17:37 2007 From: forum-watir-users at openqa.org (vijay) Date: Thu, 01 Feb 2007 00:17:37 CST Subject: [Wtr-general] Unable to access a modal dialog box to select a In-Reply-To: <25607262.1170270617755.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <28045945.1170310687953.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hello people, Thanks for your answers. But I am sorry to say that my issue still remains unsolved. $ie.modal_dialog.html does not return the '.html' of the dialog nor does 'Spysmith' reqcognize the controls in the dialog. The script just does not do anything after executing the statement prior to the statement that gives pops out the dialog ($ie.select_list(:id,'LBLocationTypeID').select 'Show Full'). After selecting 'Show Full' from the 'List Box', the script neither closes nor throws an error message. Is this a modal dialog box? (I am not able to click anything else, not even the IE developer toolbar, when it comes) How to select a particular value from it and click the 'OK' button on it? Just for your information, I would like to tell you that this web application was developed using 'ASP.NET' (I could say this as the 'URL' of the website has the word 'aspx' in it). Thanks, in Advance, Vijay --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6357&messageID=17990#17990 From forum-watir-users at openqa.org Thu Feb 1 01:19:59 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Thu, 01 Feb 2007 00:19:59 CST Subject: [Wtr-general] Watir with Ajax Message-ID: <27518068.1170310838855.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi all, we are having a lot of Ajax stuffs in our application. I need help for Ajax stuffs to be automated with watir. This is how my application looks. I have a search criteria with a link called "search a term". If i click on that link an Ajax select will be opened.I need to select a term using watir but its not happening with watir. This is my code.:: ie.select_list( :name , "criteria[1][type_id]").select("xyz") Its giving me the error c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1939:in `assert_exists': Unable to locate object, using name and criteria[1][type_id](Watir::Exception::UnknownObjectException) Also this "select" is shown in the html view source as this is ajax, it is loaded after the page is loaded. so is there any way to automate this with watir. I hope i am missing some thing. Please help me regarding this. Thanks in Advance, Harish --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6378&messageID=17991#17991 From carl.l.shaulis at convergys.com Thu Feb 1 08:02:01 2007 From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com) Date: Thu, 1 Feb 2007 07:02:01 -0600 Subject: [Wtr-general] hi, not able to use assert In-Reply-To: <28025764.1170303016792.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Hi Maloy, A snippet of code was provided yesterday. Did you see this code? Does this code not work? Do you have questions about the code? Are you executing this via IRB or someting like Eclipse? Have you executed any of the unit tests? Do the assertions work for the unit tests? Thanks, Carl From forum-watir-users at openqa.org Thu Feb 1 08:55:28 2007 From: forum-watir-users at openqa.org (Bret Pettichord) Date: Thu, 01 Feb 2007 07:55:28 CST Subject: [Wtr-general] hi, not able to use assert In-Reply-To: <28025764.1170303016792.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <36935598.1170338158275.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Usually people use assertions inside test cases. There are plenty of examples in the watir "examples" directory in the "bonus file" that show you how to do this. It is also possible to use assertions outside test cases. In that case you also need this line of code: require 'test/unit/assertions' I'm sorry to hear that this did not work for you. I can't think of any other advice. My apologies. Bret --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6352&messageID=18011#18011 From forum-watir-users at openqa.org Thu Feb 1 09:16:03 2007 From: forum-watir-users at openqa.org (Bret Pettichord) Date: Thu, 01 Feb 2007 08:16:03 CST Subject: [Wtr-general] Unable to access a modal dialog box to select a In-Reply-To: <28045945.1170310687953.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <34898570.1170339394339.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> It sounds like it is not a web modal dialog, which is what our advice is for, but rather a windows modal dialog. If so, i suggest using AutoIt. Bret --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6357&messageID=18014#18014 From zeljko.filipin at gmail.com Thu Feb 1 10:30:01 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Thu, 1 Feb 2007 16:30:01 +0100 Subject: [Wtr-general] Watir with Ajax In-Reply-To: <27518068.1170310838855.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <27518068.1170310838855.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Can you post your html or send a link to your application? -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070201/350a5c5b/attachment-0001.html From richard.conroy at gmail.com Thu Feb 1 10:30:09 2007 From: richard.conroy at gmail.com (Richard Conroy) Date: Thu, 1 Feb 2007 15:30:09 +0000 Subject: [Wtr-general] Everyday Scripting with Ruby (the book) Message-ID: <511fa3a20702010730i7c7ebdd3sb663931b2a92b27@mail.gmail.com> I am curious what everyone thinks of this (new) book. It starts off well, with the first example tutorial being how to test if an uninstaller worked. No hello world, silly arithmetic examples etc. Well it is ordered, I will know myself soon. From christopher.mcmahon at gmail.com Thu Feb 1 10:55:25 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 1 Feb 2007 07:55:25 -0800 Subject: [Wtr-general] Everyday Scripting with Ruby (the book) In-Reply-To: <511fa3a20702010730i7c7ebdd3sb663931b2a92b27@mail.gmail.com> References: <511fa3a20702010730i7c7ebdd3sb663931b2a92b27@mail.gmail.com> Message-ID: <72799cd70702010755i782f0466u3699799a86103832@mail.gmail.com> On 2/1/07, Richard Conroy wrote: > I am curious what everyone thinks of this (new) book. > > It starts off well, with the first example tutorial being > how to test if an uninstaller worked. No hello world, > silly arithmetic examples etc. > > Well it is ordered, I will know myself soon. I've ordered one also. I was a reviewer for the early drafts of the book, which were very good, I'm looking forward to seeing how the final version came out! From phlip2005 at gmail.com Thu Feb 1 11:04:17 2007 From: phlip2005 at gmail.com (Phlip) Date: Thu, 1 Feb 2007 08:04:17 -0800 Subject: [Wtr-general] Everyday Scripting with Ruby (the book) In-Reply-To: <511fa3a20702010730i7c7ebdd3sb663931b2a92b27@mail.gmail.com> References: <511fa3a20702010730i7c7ebdd3sb663931b2a92b27@mail.gmail.com> Message-ID: <860c114f0702010804n683ef953v10012c95f227565d@mail.gmail.com> Richard Conroy wrote: > I am curious what everyone thinks of this (new) book. > > It starts off well, with the first example tutorial being > how to test if an uninstaller worked. I'm hooked. Brian's no slacker, and he started with the T-word! -- Phlip http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!! From paul.rogers at shaw.ca Thu Feb 1 11:09:13 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 01 Feb 2007 09:09:13 -0700 Subject: [Wtr-general] Everyday Scripting with Ruby (the book) References: <511fa3a20702010730i7c7ebdd3sb663931b2a92b27@mail.gmail.com> Message-ID: <036801c7461b$50c5f380$6400a8c0@laptop> I didnt enjoy the early drafts too much, but with Brian Marrick as the author, you know its going to be full of useful stuff. I was checking the prag programmers site daily for it to come out. ----- Original Message ----- From: "Richard Conroy" To: Sent: Thursday, February 01, 2007 8:30 AM Subject: [Wtr-general] Everyday Scripting with Ruby (the book) >I am curious what everyone thinks of this (new) book. > > It starts off well, with the first example tutorial being > how to test if an uninstaller worked. No hello world, > silly arithmetic examples etc. > > Well it is ordered, I will know myself soon. > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From forum-watir-users at openqa.org Thu Feb 1 14:56:59 2007 From: forum-watir-users at openqa.org (Nathan) Date: Thu, 01 Feb 2007 13:56:59 CST Subject: [Wtr-general] Is there a way to over ride Watir's checking if IE is busy? Message-ID: <40199751.1170359849972.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I am trying to test a website that has streaming content, and it seems that because this content is streaming, IE never returns that it is no longer busy. Is there some way around this? I am unable to do anything on the site in these cases. Thanks, Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6392&messageID=18036#18036 From paul.rogers at shaw.ca Thu Feb 1 15:15:08 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 01 Feb 2007 13:15:08 -0700 Subject: [Wtr-general] Is there a way to over ride Watir's checking if IE isbusy? References: <40199751.1170359849972.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <037c01c7463d$ab7290f0$6400a8c0@laptop> I had the same problem once too. Take a look at the wait method it has these lines while @ie.busy and until @ie.readyState == READYSTATE_COMPLETE do you might be able to remove or the other Paul ----- Original Message ----- From: "Nathan" To: Sent: Thursday, February 01, 2007 12:56 PM Subject: [Wtr-general] Is there a way to over ride Watir's checking if IE isbusy? >I am trying to test a website that has streaming content, and it seems that >because this content is streaming, IE never returns that it is no longer >busy. Is there some way around this? I am unable to do anything on the >site in these cases. > > Thanks, > > Nathan > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6392&messageID=18036#18036 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From forum-watir-users at openqa.org Thu Feb 1 15:18:27 2007 From: forum-watir-users at openqa.org (Nathan) Date: Thu, 01 Feb 2007 14:18:27 CST Subject: [Wtr-general] Is there a way to over ride Watir's checking if IE is busy? In-Reply-To: <40199751.1170359849972.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <36405146.1170361137789.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> To add a little bit of information, when I use irb to test my script's actions, I don't get timeouts, but when I am running the script, which activates a javascript menu, then clicks on a link in that menu, and I am on a page that is streaming video, I continually get timeouts, even when the video stops playing. Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6392&messageID=18037#18037 From zeljko.filipin at gmail.com Thu Feb 1 15:38:00 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Thu, 1 Feb 2007 21:38:00 +0100 Subject: [Wtr-general] url for link In-Reply-To: <45BFE025.2050506@pettichord.com> References: <46358778.1170133940589.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <45BFE025.2050506@pettichord.com> Message-ID: On 1/31/07, Bret Pettichord wrote: > > ie.link(:html, /contract_id=227/).click > Once more, this is so cool. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070201/9c152b27/attachment.html From areed at relocationcentral.com Thu Feb 1 15:26:55 2007 From: areed at relocationcentral.com (Adam Reed) Date: Thu, 1 Feb 2007 14:26:55 -0600 Subject: [Wtr-general] Is there a way to over ride Watir's checking if IE isbusy? References: <40199751.1170359849972.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <36B5DBA88E027F47812ED877C6A978D8034FAC@rc-mail.relocationcentral.com> So basically the test never starts because IE is never finished loading the items on the page? I've witnessed this also with slow-loading images on our staging servers. IE hangs out (no pun intended) until the final image shows and then tests away. It may be a low-tech resolution, but if I'm not testing the images, for instance, I go into IE setting and disable images from showing before I run my tests. You could also easily do this with streaming/multimedia content in Tools -> Internet Options -> Advanced. So, as long as you're not testing the functionality of the streaming content that should allow the test to run. If you are, it may be the one component that you have to test manually. That's my non-watir-specific .02. Thanks, Adam -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Nathan Sent: Thursday, February 01, 2007 1:57 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Is there a way to over ride Watir's checking if IE isbusy? I am trying to test a website that has streaming content, and it seems that because this content is streaming, IE never returns that it is no longer busy. Is there some way around this? I am unable to do anything on the site in these cases. Thanks, Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6392&messageID=18036#18036 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From zeljko.filipin at gmail.com Thu Feb 1 15:58:25 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Thu, 1 Feb 2007 21:58:25 +0100 Subject: [Wtr-general] url for link In-Reply-To: <46358778.1170133940589.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <46358778.1170133940589.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: On 1/30/07, Naga Harish Kanegolla wrote: > > add a term > Can regular expressions be used with xpath? This does not work. ie.link(:xpath, "//a[@onclick='#{/227/}']/").click Watir::Exception::UnknownObjectException: Unable to locate object, using xpath and //a[@onclick='(?-mix:227)']/ -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070201/384ef8cf/attachment.html From forum-watir-users at openqa.org Thu Feb 1 16:27:36 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Thu, 01 Feb 2007 15:27:36 CST Subject: [Wtr-general] Is there a way to over ride Watir's checking if IE is busy? In-Reply-To: <40199751.1170359849972.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <49316356.1170365286511.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Yes, i think this should work. I have never tried this and I can assure you that it will break way more things then it could ever fix :) module Watir class IE def wait puts 'hello' end end end --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6392&messageID=18044#18044 From forum-watir-users at openqa.org Thu Feb 1 22:07:25 2007 From: forum-watir-users at openqa.org (Maloy kanti debnath) Date: Thu, 01 Feb 2007 21:07:25 CST Subject: [Wtr-general] hi, not able to use assert In-Reply-To: Message-ID: <44631335.1170385675923.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> hi, thanks for your reply. I have used your code but after using it also i got an error " c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__': No such file to load -- /apps/ruby/lib/ruby/1.8/test/unit (LoadError)". When I modified your code as the following require 'watir' include Watir require 'watir/assertions.rb' @ie = IE.new @ie.goto("http://www.google.com") assert(@ie.link(:text, "Make Google Your Homepage!").exists?) @ie.link(:text, "Make Google Your Homepage!").click and executed it, the following error occured: undefined method `assert' for # (NoMethodError) I am using the editor which is given by ruby SCiTE.No i have not executed any of the unit tests thank you, maloy --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6352&messageID=18051#18051 From Jason.He at resilience.com Thu Feb 1 23:38:25 2007 From: Jason.He at resilience.com (Jason He) Date: Thu, 1 Feb 2007 20:38:25 -0800 Subject: [Wtr-general] How to handle the popup security alert In-Reply-To: Message-ID: The following code shows a case using clearSecurityAlertBox(). ------------------------------------------------------------------- require 'watir' # the watir controller include Watir require 'watir/winClicker' $ie = Watir::IE.new $ie.goto('https://10.101.4.69:4443') # create a new instance of WinClicker and use it wc = WinClicker.new wc.clearSecurityAlertBox() # other scripts # ------------------------------------------------------------------- The result is that, IE status bar shows ?Opening page https://10.101.4.69:4443 ?, and a ?Security Alert? pops up. However, it will stop at this point, and not go further. Is there anything I missed? Regards, Jason ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Charley Baker Sent: 2007?1?27? 1:52 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How to handle the popup security alert What error are you seeing? I wasn't saying to use IE 7 to bypass the problem, just mentioning the differences. If you could post a snippet of code and the error you're getting, that would be helpful. -Charley On 1/25/07, Jason He wrote: I have tried several times and found that error returned when using clearSecurityAlertBox & push_security_alert_yes. I searched the archived mailing list, not found an example showing how to make it happen. The Watir doesn't provider such examples too. Yes, we can use IE 7 to bypass this problem, but how to solve it when use Windows 2000 to do the test? (As we known Windows 2000 doesn't support IE 7) Regards, Jason ________________________________ From: wtr-general-bounces at rubyforge.org [mailto: wtr-general-bounces at rubyforge.org ] On Behalf Of Charley Baker Sent: 2007? 1?26 ? 13:17 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How to handle the popup security alert You can use either/or. I'm working with AutoIt internally on our own version based off of WindowHelper which uses AutoIt. The only trick is adding support for IE 7, which instead of using popups, opens a new tab. -Charley On 1/24/07, Jason He < Jason.He at resilience.com > wrote: Hi, I'm using https to do the test, and I want to push the security alert automatically when it popups, which of the following function is available? clearSecurityAlertBox (WinClicker) push_security_alert_yes (WindowHelper) Besides, is it necessary to judge whether that security alert popup? Regards, Jason _______________________________________________ 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/20070201/ecf3557d/attachment.html From Jason.He at resilience.com Fri Feb 2 00:20:55 2007 From: Jason.He at resilience.com (Jason He) Date: Thu, 1 Feb 2007 21:20:55 -0800 Subject: [Wtr-general] How to handle the popup security alert In-Reply-To: Message-ID: The following code shows a case using push_security_alert_yes() ------------------------------------------------------------------- require 'watir' # the watir controller include Watir require 'watir/WindowHelper' $ie = Watir::IE.new $ie.goto('https://10.101.4.69:4443') helper = WindowHelper.new helper.push_security_alert_yes() # other scripts # ------------------------------------------------------------------- The result is the same as that of using clearSecurityAlertBox() method. ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jason He Sent: 2007?2?2? 12:38 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How to handle the popup security alert The following code shows a case using clearSecurityAlertBox(). ------------------------------------------------------------------- require 'watir' # the watir controller include Watir require 'watir/winClicker' $ie = Watir::IE.new $ie.goto('https://10.101.4.69:4443') # create a new instance of WinClicker and use it wc = WinClicker.new wc.clearSecurityAlertBox() # other scripts # ------------------------------------------------------------------- The result is that, IE status bar shows ?Opening page https://10.101.4.69:4443 ?, and a ?Security Alert? pops up. However, it will stop at this point, and not go further. Is there anything I missed? Regards, Jason ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Charley Baker Sent: 2007?1?27? 1:52 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How to handle the popup security alert What error are you seeing? I wasn't saying to use IE 7 to bypass the problem, just mentioning the differences. If you could post a snippet of code and the error you're getting, that would be helpful. -Charley On 1/25/07, Jason He wrote: I have tried several times and found that error returned when using clearSecurityAlertBox & push_security_alert_yes. I searched the archived mailing list, not found an example showing how to make it happen. The Watir doesn't provider such examples too. Yes, we can use IE 7 to bypass this problem, but how to solve it when use Windows 2000 to do the test? (As we known Windows 2000 doesn't support IE 7) Regards, Jason ________________________________ From: wtr-general-bounces at rubyforge.org [mailto: wtr-general-bounces at rubyforge.org ] On Behalf Of Charley Baker Sent: 2007? 1?26 ? 13:17 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How to handle the popup security alert You can use either/or. I'm working with AutoIt internally on our own version based off of WindowHelper which uses AutoIt. The only trick is adding support for IE 7, which instead of using popups, opens a new tab. -Charley On 1/24/07, Jason He < Jason.He at resilience.com > wrote: Hi, I'm using https to do the test, and I want to push the security alert automatically when it popups, which of the following function is available? clearSecurityAlertBox (WinClicker) push_security_alert_yes (WindowHelper) Besides, is it necessary to judge whether that security alert popup? Regards, Jason _______________________________________________ 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/20070201/4ae337f0/attachment-0001.html From WKruse at multichoice.co.za Fri Feb 2 00:23:22 2007 From: WKruse at multichoice.co.za (Walter Kruse) Date: Fri, 2 Feb 2007 07:23:22 +0200 Subject: [Wtr-general] Everyday Scripting with Ruby (the book) In-Reply-To: <72799cd70702010755i782f0466u3699799a86103832@mail.gmail.com> References: <511fa3a20702010730i7c7ebdd3sb663931b2a92b27@mail.gmail.com> <72799cd70702010755i782f0466u3699799a86103832@mail.gmail.com> Message-ID: > I've ordered one also. I was a reviewer for the early drafts of the > book, which were very good, I'm looking forward to seeing how the > final version came out! Ditto. ************************************************************************************************************************** Everything in this e-mail and attachments relating to the official business of MultiChoice Africa is proprietary to the company. Any view or opinion expressed in this message may be the view of the individual and should not automatically be ascribed to the company. If you are not the intended recipient, you may not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify the sender immediately by email, facsimile or telephone and destroy the original message. ************************************************************************************************************************** From forum-watir-users at openqa.org Fri Feb 2 00:28:15 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Thu, 01 Feb 2007 23:28:15 CST Subject: [Wtr-general] Watir with Ajax In-Reply-To: Message-ID: <31646958.1170394125562.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I can't send a link to my application as it is in my local host. I am sorry for this. The "select" option will be generating after i click on the link. Its ajax stuff. So that select can't be shown in the html. It is generating after the whole page is loaded. So wat should be done for such type of application?? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6378&messageID=18056#18056 From prema.arya at gmail.com Fri Feb 2 01:52:49 2007 From: prema.arya at gmail.com (Prema Arya) Date: Fri, 2 Feb 2007 12:22:49 +0530 Subject: [Wtr-general] Watir with Ajax In-Reply-To: <31646958.1170394125562.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <31646958.1170394125562.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <27915010702012252h517b970esddcd8906ba01058e@mail.gmail.com> You can wait in a loop till the select box is loaded or use some kind of indicators like in gamil the top right corner of window reads "Loading..." when the mails are being loaded. In your case you can wait for the control itself #while the control exists is false sleep while(!ie.select_list( :name , "criteria[1][type_id]").exists?) sleep(2) end #the select box is loaded now go ahead with other operations. If some text is displayed on the page as result of ajax call, you can also check for that while(!isMessageDisplayed("text displayed on page")) end #The Ajax control is loaded end Hope this helps. Prema On 2/2/07, Naga Harish Kanegolla wrote: > I can't send a link to my application as it is in my local host. I am > sorry for this. > > The "select" option will be generating after i click on the link. Its > ajax stuff. So that select can't be shown in the html. It is generating > after the whole page is loaded. So wat should be done for such type of > application?? > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6378&messageID=18056#18056 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- Prema Arya -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070202/b58fc260/attachment.html From prema.arya at gmail.com Fri Feb 2 02:31:40 2007 From: prema.arya at gmail.com (Prema Arya) Date: Fri, 2 Feb 2007 13:01:40 +0530 Subject: [Wtr-general] url for link In-Reply-To: References: <46358778.1170133940589.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <27915010702012331r65fe0a0em2a80f6106e5755ef@mail.gmail.com> Hi, You can't use regular expression in xpath with XPATH 1.0, you can use it in XPATH 2.0 and rexml supports only xpath 1.0. You can use string operations like substring, string before, string after though. http://www.w3.org/TR/xpath#section-String-Functions. Prema On 2/2/07, ?eljko Filipin wrote: > On 1/30/07, Naga Harish Kanegolla wrote: > > > > add a term > > > > Can regular expressions be used with xpath? This does not work. > > ie.link(:xpath, "//a[@onclick='#{/227/}']/").click > Watir::Exception::UnknownObjectException: Unable to locate object, using > xpath and //a[@onclick='(?-mix:227)']/ > -- > Zeljko Filipin > zeljkofilipin.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- Prema Arya -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070202/f82b9155/attachment.html From zeljko.filipin at gmail.com Fri Feb 2 05:18:25 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Fri, 2 Feb 2007 11:18:25 +0100 Subject: [Wtr-general] url for link In-Reply-To: <27915010702012331r65fe0a0em2a80f6106e5755ef@mail.gmail.com> References: <46358778.1170133940589.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <27915010702012331r65fe0a0em2a80f6106e5755ef@mail.gmail.com> Message-ID: On 2/2/07, Prema Arya wrote: > > You can't use regular expression in xpath with XPATH 1.0, you can use it > in XPATH 2.0 and rexml supports only xpath 1.0. > > You can use string operations like substring, string before, string after > though. http://www.w3.org/TR/xpath#section-String-Functions. > Thanks Prema, I will take a look (I do not really need it, I was just curious). -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070202/b5ae9288/attachment.html From BAttebery at archstonesmith.com Fri Feb 2 09:27:25 2007 From: BAttebery at archstonesmith.com (Attebery, Bill) Date: Fri, 2 Feb 2007 07:27:25 -0700 Subject: [Wtr-general] Everyday Scripting with Ruby (the book) References: <511fa3a20702010730i7c7ebdd3sb663931b2a92b27@mail.gmail.com><72799cd70702010755i782f0466u3699799a86103832@mail.gmail.com> Message-ID: <058F595709851C4E968070ED914CEA75CBA673@engexc11.archstonesmith.com> > I've ordered one also. I was a reviewer for the early drafts of the > book, which were very good, I'm looking forward to seeing how the > final version came out! I was very excited for the release of this book (back when it was going to be called Scripting for Testers or something along those lines), and waited almost a year for it, however after flipping through it at the bookstore I'm not sure just how useful it is for anyone with intermediate (or so) Ruby skills. The test and watir coverage seemed pretty light overall, mostly covered basic Ruby stuff like working with Strings, Arrays, RegExp etc. and programming 101 - decision structures, variables etc. Maybe good for a beginner, but didn't turn out to be what I expected. No slight to Brian with whom some of you are probably well acquainted, just didn't seem to meet my needs/expectations. From forum-watir-users at openqa.org Fri Feb 2 09:45:17 2007 From: forum-watir-users at openqa.org (vijay) Date: Fri, 02 Feb 2007 08:45:17 CST Subject: [Wtr-general] Unable to access a modal dialog box to select a In-Reply-To: <34898570.1170339394339.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <43950565.1170427547136.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Bret, I think It is a modal_dialog box because Watir is able to close the box through the command 'ie.modal_dialog.close'. Also, the command, "puts ie.modal_dialog.html" outputs the '.html' of the dialog as the following: Select I am sorry to say that I do not know how to use this '.html' to select a particular value from the dialog box and click the 'Ok' button to confirm the selection. Please help me to do this. Thank you for your time, Vijay. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6357&messageID=18074#18074 From forum-watir-users at openqa.org Fri Feb 2 10:22:54 2007 From: forum-watir-users at openqa.org (Nathan) Date: Fri, 02 Feb 2007 09:22:54 CST Subject: [Wtr-general] Is there a way to over ride Watir's checking if IE is busy? In-Reply-To: <49316356.1170365286511.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <48186118.1170429804064.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thanks for all of the tips. I finally figured out that my test was actually taking a long time after firing an event "onmouseover" for my menus on pages with streaming content. I don't know why that was happening, but a put timeout blocks around each of my operations, hovering over the menu, and clicking on a menu item, and now my test works just fine. No my problem wasn't that the test never started, it was just that on some pages, specifically those with streaming content, I never regained control after hovering over the menus. There is seemingly a problem in the wait method in Watir 1.4.1 that causes this, though our website may be a special case. Anyway I resolved my problem, again, by placing timeout blocks around each of my operations. Thank you. Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6392&messageID=18075#18075 From forum-watir-users at openqa.org Fri Feb 2 10:27:03 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Fri, 02 Feb 2007 09:27:03 CST Subject: [Wtr-general] Unable to access a modal dialog box to select a In-Reply-To: <43950565.1170427547136.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <35153132.1170430053062.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> My best guess is that your modal dialog is using frames. The HTML that its returning is not the right frame. Thats my best guess and how i would approach the problem. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6357&messageID=18076#18076 From paul.rogers at shaw.ca Fri Feb 2 10:41:38 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 02 Feb 2007 08:41:38 -0700 Subject: [Wtr-general] Watir with Ajax References: <31646958.1170394125562.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <27915010702012252h517b970esddcd8906ba01058e@mail.gmail.com> Message-ID: <042b01c746e0$a0d4fcc0$6400a8c0@laptop> IE7 introduced some new properties to show when ajax requests were completed. I can take a look and see how useful those wuld be. would something like the following make more sense? # button click causes ajax request ie.button(:name , 'ff').click # wait for ajax request to finish ie.wait_for_ajax_requet_to_finish ie.select_list(..).exist? # returns true hopefully or should the existing wait methods be extended to encompass ajax functionality? Paul ----- Original Message ----- From: Prema Arya To: wtr-general at rubyforge.org Sent: Thursday, February 01, 2007 11:52 PM Subject: Re: [Wtr-general] Watir with Ajax You can wait in a loop till the select box is loaded or use some kind of indicators like in gamil the top right corner of window reads "Loading..." when the mails are being loaded. In your case you can wait for the control itself #while the control exists is false sleep while(!ie.select_list( :name , "criteria[1][type_id]").exists?) sleep(2) end #the select box is loaded now go ahead with other operations. If some text is displayed on the page as result of ajax call, you can also check for that while(!isMessageDisplayed("text displayed on page")) end #The Ajax control is loaded end Hope this helps. Prema On 2/2/07, Naga Harish Kanegolla wrote: I can't send a link to my application as it is in my local host. I am sorry for this. The "select" option will be generating after i click on the link. Its ajax stuff. So that select can't be shown in the html. It is generating after the whole page is loaded. So wat should be done for such type of application?? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6378&messageID=18056#18056 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- Prema Arya ------------------------------------------------------------------------------ _______________________________________________ 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/20070202/ee5f35ca/attachment.html From forum-watir-users at openqa.org Fri Feb 2 11:33:13 2007 From: forum-watir-users at openqa.org (david goodine) Date: Fri, 02 Feb 2007 10:33:13 CST Subject: [Wtr-general] saving screenshots with snagit In-Reply-To: <170aadc80701301452n123f2e48jbde397c1ae94f832@mail.gmail.com> Message-ID: <51433075.1170434023184.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thanks for help! -Dave --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6361&messageID=18083#18083 From paul.rogers at shaw.ca Fri Feb 2 12:31:07 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 02 Feb 2007 10:31:07 -0700 Subject: [Wtr-general] Watir with Ajax References: <31646958.1170394125562.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <27915010702012252h517b970esddcd8906ba01058e@mail.gmail.com> <042b01c746e0$a0d4fcc0$6400a8c0@laptop> Message-ID: <045101c746ef$ec262780$6400a8c0@laptop> looks like this cant be done easily. the new properties are on a per request object basis, and not any easily acccessibl global object. so the best way is to use the loop below. I think there is a method in watir to do it directly, but I cant remember what it is Paul ----- Original Message ----- From: Paul Rogers To: wtr-general at rubyforge.org Sent: Friday, February 02, 2007 8:41 AM Subject: Re: [Wtr-general] Watir with Ajax IE7 introduced some new properties to show when ajax requests were completed. I can take a look and see how useful those wuld be. would something like the following make more sense? # button click causes ajax request ie.button(:name , 'ff').click # wait for ajax request to finish ie.wait_for_ajax_requet_to_finish ie.select_list(..).exist? # returns true hopefully or should the existing wait methods be extended to encompass ajax functionality? Paul ----- Original Message ----- From: Prema Arya To: wtr-general at rubyforge.org Sent: Thursday, February 01, 2007 11:52 PM Subject: Re: [Wtr-general] Watir with Ajax You can wait in a loop till the select box is loaded or use some kind of indicators like in gamil the top right corner of window reads "Loading..." when the mails are being loaded. In your case you can wait for the control itself #while the control exists is false sleep while(!ie.select_list( :name , "criteria[1][type_id]").exists?) sleep(2) end #the select box is loaded now go ahead with other operations. If some text is displayed on the page as result of ajax call, you can also check for that while(!isMessageDisplayed("text displayed on page")) end #The Ajax control is loaded end Hope this helps. Prema On 2/2/07, Naga Harish Kanegolla wrote: I can't send a link to my application as it is in my local host. I am sorry for this. The "select" option will be generating after i click on the link. Its ajax stuff. So that select can't be shown in the html. It is generating after the whole page is loaded. So wat should be done for such type of application?? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6378&messageID=18056#18056 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -- Prema Arya ---------------------------------------------------------------------------- _______________________________________________ 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/20070202/c1f104df/attachment-0001.html From snarfblat at yahoo.com Fri Feb 2 18:05:01 2007 From: snarfblat at yahoo.com (RobG) Date: Fri, 02 Feb 2007 15:05:01 -0800 Subject: [Wtr-general] Installation Problem Message-ID: <45C3C39D.8090003@yahoo.com> I hope this is an acceptable topic for this list... I just installed Ruby 1.8.5 on my system, and then, with much effort, managed to get the watir-1.4.1.exe installed (it has a major install bug that I was able to circumvent). So after all that, I open a command prompt into the installation location, and run all_tests.rb as instructed, and I get the errors below: C:\Program Files\Watir\unittests>all_tests.rb C:/Program Files/Watir/unittests/../unittests/setup.rb:4:in `require': no such f ile to load -- watir (LoadError) from C:/Program Files/Watir/unittests/../unittests/setup.rb:4 from C:/Program Files/Watir/unittests/all_tests.rb:4:in 'require' from C:/Program Files/Watir/unittests/all_tests.rb:4 It looks like it might be a simple pathing issue, but I'm not sure. I do have the path setup so that I can run regular ruby, but I haven't tried to add anything for watir yet; I thought I would ask here first. I don't remember having this problem about eight months ago when I first tried Watir, but that was on another computer. Any help would be appreciated. Thanks! Rob From esjewett at gmail.com Fri Feb 2 18:28:43 2007 From: esjewett at gmail.com (Ethan Jewett) Date: Fri, 2 Feb 2007 17:28:43 -0600 Subject: [Wtr-general] Installation Problem In-Reply-To: <45C3C39D.8090003@yahoo.com> References: <45C3C39D.8090003@yahoo.com> Message-ID: <68f4a0e80702021528m1685e723v1652409ae10055ff@mail.gmail.com> It's been a while since I tried an executable installer so I'm not sure about your specific problem. It looks like you've got a space in your path, which can cause problems in some scripts. As with all things Ruby, it tends to be easier to go the "Ruby Way" and use the gem installer. Figuring out the Ruby Way is the hard part : ) If you open your command prompt and type: gem install watir That should install Watir 1.4.1 as a Ruby gem, which will probably take care of the issue. You'll then be able to find the Watir install and unit tests under ruby/lib/ruby/gems/1.8/gems/watir . . . where the first "ruby" is your root ruby install directory. If that command (gem) is not a recognized command, then you do indeed have a path issue, and you might want to try reinstalling ruby under the C:\ directory, or following a howto on adding a directory to your PATH like http://www.computerhope.com/issues/ch000549.htm. Just add your ruby/ directory to the path and you should be all set. Ethan On 2/2/07, RobG wrote: > > I hope this is an acceptable topic for this list... > > I just installed Ruby 1.8.5 on my system, and then, with much effort, > managed to get the watir-1.4.1.exe installed (it has a major install bug > that I was able to circumvent). > > So after all that, I open a command prompt into the installation > location, and run all_tests.rb as instructed, and I get the errors below: > > > C:\Program Files\Watir\unittests>all_tests.rb > C:/Program Files/Watir/unittests/../unittests/setup.rb:4:in `require': > no such f > ile to load -- watir (LoadError) > from C:/Program Files/Watir/unittests/../unittests/setup.rb:4 > from C:/Program Files/Watir/unittests/all_tests.rb:4:in 'require' > from C:/Program Files/Watir/unittests/all_tests.rb:4 > > > > It looks like it might be a simple pathing issue, but I'm not sure. I > do have the path setup so that I can run regular ruby, but I haven't > tried to add anything for watir yet; I thought I would ask here first. > > I don't remember having this problem about eight months ago when I first > tried Watir, but that was on another computer. > > Any help would be appreciated. Thanks! > > Rob > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From rand.thacker at gmail.com Fri Feb 2 18:41:26 2007 From: rand.thacker at gmail.com (Rand Thacker) Date: Fri, 2 Feb 2007 17:41:26 -0600 Subject: [Wtr-general] Installation Problem In-Reply-To: <68f4a0e80702021528m1685e723v1652409ae10055ff@mail.gmail.com> References: <45C3C39D.8090003@yahoo.com> <68f4a0e80702021528m1685e723v1652409ae10055ff@mail.gmail.com> Message-ID: <33dc42ea0702021541s7aec9edvf177717152811058@mail.gmail.com> Oh, yeah. I forgot all about the "space in path" thing. And for even more help, try this URL: http://www.openqa.org/watir/ sometimes, I forget and go to the old site: http://wtr.rubyforge.org/ On 2/2/07, Ethan Jewett wrote: > > It's been a while since I tried an executable installer so I'm not > sure about your specific problem. It looks like you've got a space in > your path, which can cause problems in some scripts. As with all > things Ruby, it tends to be easier to go the "Ruby Way" and use the > gem installer. Figuring out the Ruby Way is the hard part : ) > > If you open your command prompt and type: > gem install watir > > That should install Watir 1.4.1 as a Ruby gem, which will probably > take care of the issue. You'll then be able to find the Watir install > and unit tests under ruby/lib/ruby/gems/1.8/gems/watir . . . where > the first "ruby" is your root ruby install directory. > > If that command (gem) is not a recognized command, then you do indeed > have a path issue, and you might want to try reinstalling ruby under > the C:\ directory, or following a howto on adding a directory to your > PATH like http://www.computerhope.com/issues/ch000549.htm. Just add > your ruby/ directory to the path and you should be all set. > > Ethan > > On 2/2/07, RobG wrote: > > > > I hope this is an acceptable topic for this list... > > > > I just installed Ruby 1.8.5 on my system, and then, with much effort, > > managed to get the watir-1.4.1.exe installed (it has a major install bug > > that I was able to circumvent). > > > > So after all that, I open a command prompt into the installation > > location, and run all_tests.rb as instructed, and I get the errors > below: > > > > > > C:\Program Files\Watir\unittests>all_tests.rb > > C:/Program Files/Watir/unittests/../unittests/setup.rb:4:in `require': > > no such f > > ile to load -- watir (LoadError) > > from C:/Program Files/Watir/unittests/../unittests/setup.rb:4 > > from C:/Program Files/Watir/unittests/all_tests.rb:4:in > 'require' > > from C:/Program Files/Watir/unittests/all_tests.rb:4 > > > > > > > > It looks like it might be a simple pathing issue, but I'm not sure. I > > do have the path setup so that I can run regular ruby, but I haven't > > tried to add anything for watir yet; I thought I would ask here first. > > > > I don't remember having this problem about eight months ago when I first > > tried Watir, but that was on another computer. > > > > Any help would be appreciated. Thanks! > > > > Rob > > > > _______________________________________________ > > 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 > -- "I am the most humble person in the world!" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070202/2957ca4f/attachment.html From christopher.mcmahon at gmail.com Fri Feb 2 18:53:31 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 2 Feb 2007 15:53:31 -0800 Subject: [Wtr-general] Everyday Scripting with Ruby (the book) In-Reply-To: <058F595709851C4E968070ED914CEA75CBA673@engexc11.archstonesmith.com> References: <511fa3a20702010730i7c7ebdd3sb663931b2a92b27@mail.gmail.com> <72799cd70702010755i782f0466u3699799a86103832@mail.gmail.com> <058F595709851C4E968070ED914CEA75CBA673@engexc11.archstonesmith.com> Message-ID: <72799cd70702021553o50ba6697i208453a8aee756ec@mail.gmail.com> The test and watir coverage seemed > pretty light overall, mostly covered basic Ruby stuff like working with > Strings, Arrays, RegExp etc. and programming 101 - decision structures, > variables etc. Maybe good for a beginner, but didn't turn out to be > what I expected. No slight to Brian with whom some of you are probably > well acquainted, just didn't seem to meet my needs/expectations. I just got my copy, and I've been surfing the first 50 pages or so. For one thing, there are subtle programming hints, even in the most mundane exercises, that are very nice bits of design to learn. As an example, for one part of the very first exercise we want to ignore certain filenames in the script. Rather than a conditional statement, Brian has the scripter construct a method "boring?" that checks for boring strings. Blocks are also introduced before conditionals. Very slick. Even if you know this stuff, there are surprising little bits that will still probably take you by surprise, unless you are very, very good at Ruby. The book's philosophy re: testing per se is on page 4: "Automating test execution is not the most efficient way to learn" and "Automating test execution may not be the most effective thing for you to do". But the 'test/unit' library is introduced in the second part, so testing is definitely a big part of the book. -Chris From forum-watir-users at openqa.org Sat Feb 3 00:42:22 2007 From: forum-watir-users at openqa.org (vijay) Date: Fri, 02 Feb 2007 23:42:22 CST Subject: [Wtr-general] Unable to access a modal dialog box to select a In-Reply-To: <35153132.1170430053062.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <57801115.1170481372301.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hello people, I tried a few commands in an attempt to get more details about the objects in the modal dialog box. 1. Output of the command, puts ie.modal_dialog.frame(:index,1).html
2. output of the command, puts ie.modal_dialog.frame(:index,1).show_all_objects text/css id= hidden name=__VIEWSTATE id= value=dDwtNjU0MzcyMTk1Ozs+2C7FwmeFdeDCpDsFGmQL7wdu1oU= alt= src= 3. Output of the command, puts ie.modal_dialog.frame(:index,1).text Blank 4. Output of the command, puts ie.modal_dialog.frame(:index,1),form(:id,'Form1').html
5. Output of the commands, puts ie.modal_dialog.frame(:index,1).form(:id,'Form1').show_all_objects and puts ie.modal_dialog.frame(:index,1).form(:index,1).show_all_objects -----------Objects in page ------------- hidden name=__VIEWSTATE id= value=dDwtNjU0MzcyMTk1Ozs+2C7FwmeFdeDCpDsFGmQL7wdu1oU= alt= src= 6. Output of the command, puts ie.modal_dialog.frame(:index,1).form(:index,2).html c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145/./watir.rb:2297:in `assert_exists': Unable to locate object, using index and 2 (Watir::Exception::UnknownObjectException) 7. Output of the command, puts ie.modal_dialog.frame(:index,1).form(:index,2).show_all_objects -----------Objects in page ------------- c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145/./watir.rb:1013:in `show_all_objects': undefined method `all' for nil:NilClass (NoMethodError) 8. Output of the command, puts ie.modal_dialog.frame(:index,1).text Blank I am not able to proceed anything beyond this. I do not know how to get the properties of the list of displayed values (from which I need to select a value) and the 'Ok' button. Also the command 'flash' is not 'flashing' the modal dialog box and the frame and the form within it. Please help me to make Watir to select a value from this dialog box and click the 'Ok' button.. Thanks for your time, Vijay. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6357&messageID=18107#18107 From esjewett at gmail.com Sat Feb 3 09:50:32 2007 From: esjewett at gmail.com (Ethan Jewett) Date: Sat, 3 Feb 2007 08:50:32 -0600 Subject: [Wtr-general] Unable to access a modal dialog box to select a In-Reply-To: <57801115.1170481372301.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <35153132.1170430053062.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <57801115.1170481372301.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <68f4a0e80702030650p528c2ad9yba87e523b5eaee28@mail.gmail.com> Vijay, It looks like you've got the wrong frame. frame(:index,1).html just contains a hidden input, so it probably isn't the frame that is displayed. Maybe try frame(:index,2). If you methodically go through all frames and subframes in the modal, you'll find the one you want eventually. There is useful advice about displaying and manipulating frames under the "Frames" section of the user guide: http://www.openqa.org/watir/watir_user_guide.html Ethan On 2/2/07, vijay wrote: > Hello people, > > I tried a few commands in an attempt to get more details about the objects in the modal dialog box. > > 1. Output of the command, > > puts ie.modal_dialog.frame(:index,1).html > > rel=stylesheet>
type=hidden value=dDwtNjU0MzcyMTk1Ozs+2C7FwmeFdeDCpDsFGmQL7wdu1oU= name=__VIEWSTATE>
> > 2. output of the command, > > puts ie.modal_dialog.frame(:index,1).show_all_objects > > text/css id= > hidden name=__VIEWSTATE id= > value=dDwtNjU0MzcyMTk1Ozs+2C7FwmeFdeDCpDsFGmQL7wdu1oU= alt= src= > > 3. Output of the command, > > puts ie.modal_dialog.frame(:index,1).text > > Blank > > 4. Output of the command, > > puts ie.modal_dialog.frame(:index,1),form(:id,'Form1').html > >
value=dDwtNjU0MzcyMTk1Ozs+2C7FwmeFdeDCpDsFGmQL7wdu1oU= name=__VIEWSTATE>
> > 5. Output of the commands, > > puts ie.modal_dialog.frame(:index,1).form(:id,'Form1').show_all_objects > and > puts ie.modal_dialog.frame(:index,1).form(:index,1).show_all_objects > > > -----------Objects in page ------------- > hidden name=__VIEWSTATE id= > value=dDwtNjU0MzcyMTk1Ozs+2C7FwmeFdeDCpDsFGmQL7wdu1oU= alt= src= > > 6. Output of the command, > > puts ie.modal_dialog.frame(:index,1).form(:index,2).html > > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145/./watir.rb:2297:in `assert_exists': Unable to locate object, using index and 2 (Watir::Exception::UnknownObjectException) > > 7. Output of the command, > > puts ie.modal_dialog.frame(:index,1).form(:index,2).show_all_objects > > -----------Objects in page ------------- > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145/./watir.rb:1013:in `show_all_objects': undefined method `all' for nil:NilClass (NoMethodError) > > 8. Output of the command, > > puts ie.modal_dialog.frame(:index,1).text > > Blank > > I am not able to proceed anything beyond this. I do not know how to get the properties of the list of displayed values (from which I need to select a value) and the 'Ok' button. Also the command 'flash' is not 'flashing' the modal dialog box and the frame and the form within it. > > Please help me to make Watir to select a value from this dialog box and click the 'Ok' button.. > > Thanks for your time, > Vijay. > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6357&messageID=18107#18107 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From bret at pettichord.com Sun Feb 4 00:29:26 2007 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 03 Feb 2007 23:29:26 -0600 Subject: [Wtr-general] hi, not able to use assert In-Reply-To: <44631335.1170385675923.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <44631335.1170385675923.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45C56F36.4000608@pettichord.com> Maloy kanti debnath wrote: > require 'watir/assertions.rb' > that should be require 'watir/assertions' From forum-watir-users at openqa.org Sun Feb 4 22:17:14 2007 From: forum-watir-users at openqa.org (mike) Date: Sun, 04 Feb 2007 21:17:14 CST Subject: [Wtr-general] Data Driven Testing Message-ID: <53638312.1170645507784.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Does watir provide an easy method to utilize data tables (not excel spreadsheets)? Im building a script that hopefully will iterate through a list (500K+) of numbers and execute a web search on each of them, then verify the results of the search. The logic for validation is completed, but im having trouble loading the list. Any help is much appreciated! --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6412&messageID=18131#18131 From christopher.mcmahon at gmail.com Sun Feb 4 22:33:24 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Sun, 4 Feb 2007 19:33:24 -0800 Subject: [Wtr-general] Data Driven Testing In-Reply-To: <53638312.1170645507784.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <53638312.1170645507784.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70702041933q29986704k9ad1e3fccdfcd34f@mail.gmail.com> On 2/4/07, mike wrote: > Does watir provide an easy method to utilize data tables (not excel spreadsheets)? Im building a script that hopefully will iterate through a list (500K+) of numbers and execute a web search on each of them, then verify the results of the search. The logic for validation is completed, but im having trouble loading the list. > > Any help is much appreciated! What have you tried? Where is your list kept? -C From jackeichan at gmail.com Sun Feb 4 23:04:47 2007 From: jackeichan at gmail.com (jackei) Date: Mon, 5 Feb 2007 12:04:47 +0800 Subject: [Wtr-general] Data Driven Testing In-Reply-To: <53638312.1170645507784.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <53638312.1170645507784.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <4751ea460702042004h4f91668ic5f87845da3ca6cb@mail.gmail.com> I've a easy way to do this. some codes as following: #~ First, use the parameters replace the data in your script, include the input data and expect output data; #~ 2nd, open and read a data file which is .csv format; theDataFile=File.new(dataFilePath,"r") #~ 3th, read the data from data file used by a loop e.g. while while not theDataFile.eof? do theDataFile.gets #~ the 'dataset' is a array dataSet=theDataFile.gets.split("\t") end #~ 4th, executing your script and auto input all data then auto verify the expect output data. On 2/5/07, mike wrote: > > Does watir provide an easy method to utilize data tables (not excel > spreadsheets)? Im building a script that hopefully will iterate through a > list (500K+) of numbers and execute a web search on each of them, then > verify the results of the search. The logic for validation is completed, > but im having trouble loading the list. > > Any help is much appreciated! > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6412&messageID=18131#18131 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- Please give me a reply if you recevied the mail. Thanks. Best Regards Jackei.Chan (Software Testing Consultant) jackeichan at gmail.com Chinese Blog: http://jackei.cnblogs.com/ English Blog: http://www.testingreflections.com/blog/3424 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070205/57994c83/attachment.html From bret at pettichord.com Sun Feb 4 23:19:04 2007 From: bret at pettichord.com (Bret Pettichord) Date: Sun, 04 Feb 2007 22:19:04 -0600 Subject: [Wtr-general] Inserting date from a Date picker handled thru javascript In-Reply-To: <47376506.1169628909668.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <47376506.1169628909668.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45C6B038.1010905@pettichord.com> sarita wrote: > > > > > > > >
>        > > >
you can caluse the calendar control to appear with ie.image(:id, 'ctl00_ContentPlaceHolder1_imgCalCrDate').click You'll need to show the html for the calendar itself if you need help with that. It might be easier, however, to just use ie.text_field(:id, 'ctl00_ContentPlaceHolder1_txtCreateDate').value = "1/1/2007" Bret From forum-watir-users at openqa.org Mon Feb 5 02:31:55 2007 From: forum-watir-users at openqa.org (steven) Date: Mon, 05 Feb 2007 01:31:55 CST Subject: [Wtr-general] Question About Test Suite Message-ID: <38950207.1170660745376.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I have a bunch of test cases in separate .rb files. For this example, a.rb and b.rb. I then created an rb file to run all of them, called suite_my_tests.rb In this file I have: require 'includes' require 'a' require 'b' class TS_MyTests def setup #CBrowser.openMyBrowser() end def teardown #CBrowser.closeMyBrowser() Test::Unit::UI::Reporter.run(TS_MyTests.suite, 'C:/Program Files/Watir/examples/test_cases/report',:html) end def self.suite #Test::Unit::UI::Console::TestRunner.new(suite).start suite = Test::Unit::TestSuite.new("All tests") suite << TC_a.suite suite << TC_b.suite #Test::Unit::UI::Console::TestRunner.new(suite).start FileUtils.mkdir_p 'C:/Program Files/Watir/examples/test_cases/report' #Test::Unit::UI::Reporter.run(TS_MyTests.suite, 'C:/Program Files/Watir/examples/test_cases/report',:html) return suite end end I have two questions: The only time this line seems to run:Test::Unit::UI::Reporter.run(TS_MyTests.suite, 'C:/Program Files/Watir/examples/test_cases/report',:html) is when it is between a begin and end outside of the main class in the file above - it won't run in the #teardown or in the def self.suite. Am I missing something? Also, I have the following line commented out: #Test::Unit::UI::Console::TestRunner.new(suite).start Any reason why I would need it uncommented? Thanks, Steve --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6414&messageID=18139#18139 From forum-watir-users at openqa.org Mon Feb 5 02:34:53 2007 From: forum-watir-users at openqa.org (steven) Date: Mon, 05 Feb 2007 01:34:53 CST Subject: [Wtr-general] while not exists does not work in Firewatir? Message-ID: <49838681.1170660923766.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> The following code only seems to work if $browser = ie.new, and not firefox.new (i.e. with Firewatir). Am I missing something or is this a known issue? while not ($browser.link(:text,"Withdraw").exists?) sleep 0.5 end To clarify, when I mean does not work, I mean, it never catches the link as existing, even though it is there. It just stays in the sleep command over and over. Thanks, Steve --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6415&messageID=18140#18140 From angrez at gmail.com Mon Feb 5 04:04:34 2007 From: angrez at gmail.com (Angrez Singh) Date: Mon, 5 Feb 2007 14:34:34 +0530 Subject: [Wtr-general] while not exists does not work in Firewatir? In-Reply-To: <49838681.1170660923766.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <49838681.1170660923766.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Hi Steven, I'll look into this and let you know. Regards, Angrez On 2/5/07, steven wrote: > > The following code only seems to work if $browser = ie.new, and not > firefox.new (i.e. with Firewatir). Am I missing something or is this a > known issue? > > while not ($browser.link(:text,"Withdraw").exists?) > sleep 0.5 > end > > To clarify, when I mean does not work, I mean, it never catches the link > as existing, even though it is there. It just stays in the sleep command > over and over. > > Thanks, > Steve > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6415&messageID=18140#18140 > _______________________________________________ > 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/20070205/f0f6c2ac/attachment.html From forum-watir-users at openqa.org Mon Feb 5 08:57:01 2007 From: forum-watir-users at openqa.org (gdx) Date: Mon, 05 Feb 2007 07:57:01 CST Subject: [Wtr-general] Unable to access a modal dialog box to select a In-Reply-To: <68f4a0e80702030650p528c2ad9yba87e523b5eaee28@mail.gmail.com> Message-ID: <41752050.1170683851221.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi Vijay, Sorry for my english ! Do you've test to run your application with firefox and use the add-ons 'Web developper' and 'View Source chart' to understand how your page is made ? Can you make a screenshot ? Maybe one of all people, will have THE idea :D See you soon :D --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6357&messageID=18155#18155 From forum-watir-users at openqa.org Mon Feb 5 11:28:50 2007 From: forum-watir-users at openqa.org (lianagi) Date: Mon, 05 Feb 2007 10:28:50 CST Subject: [Wtr-general] Autoit problem Message-ID: <55386588.1170692960125.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi! I can't install watir. Whenever i run the test, this problem occurs: ..F..Problem with Autoit - is it installed?. I installed it using admin account, I even tried installing watir manually instead of gem install watir, same thing happens. I even downloaded Autoit separately. still doesn't work. Pls help me. Thanks! --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6423&messageID=18167#18167 From charley.baker at gmail.com Mon Feb 5 11:32:25 2007 From: charley.baker at gmail.com (Charley Baker) Date: Mon, 5 Feb 2007 09:32:25 -0700 Subject: [Wtr-general] Question About Test Suite In-Reply-To: <38950207.1170660745376.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <38950207.1170660745376.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Take a look at the documentation for test/unit: http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit.html The method to run the test suite should be outside your test suite class. TestSuite also doesn't have setup and teardown methods, those are test case methods. No reason to call start on the TestRunner, creating a new instance and running it will start the test run. So your suite should look more like this: require 'includes' require 'a' require 'b' class TS_MyTests > > > def self.suite > suite = Test::Unit::TestSuite.new("All tests") > suite << TC_a.suite > suite << TC_b.suite > return suite > end > end FileUtils.mkdir_p 'C:/Program Files/Watir/examples/test > > _cases/report' > Test::Unit::UI::Reporter.run(TS_MyTests.suite, 'C:/Program > Files/Watir/examples/test > > > > _cases/report',:html) > > > > -Charley On 2/5/07, steven wrote: > > I have a bunch of test cases in separate .rb files. For this example, > a.rb and b.rb. > > I then created an rb file to run all of them, called suite_my_tests.rb > > In this file I have: > > require 'includes' > > require 'a' > require 'b' > > class TS_MyTests > > def setup > #CBrowser.openMyBrowser() > end > > def teardown > #CBrowser.closeMyBrowser() > Test::Unit::UI::Reporter.run(TS_MyTests.suite, 'C:/Program > Files/Watir/examples/test_cases/report',:html) > end > > def self.suite > #Test::Unit::UI::Console::TestRunner.new(suite).start > suite = Test::Unit::TestSuite.new("All tests") > suite << TC_a.suite > suite << TC_b.suite > #Test::Unit::UI::Console::TestRunner.new(suite).start > FileUtils.mkdir_p 'C:/Program > Files/Watir/examples/test_cases/report' > #Test::Unit::UI::Reporter.run(TS_MyTests.suite, > 'C:/Program Files/Watir/examples/test_cases/report',:html) > return suite > end > end > > > > > I have two questions: > > The only time this line seems to run:Test::Unit::UI::Reporter.run(TS_MyTests.suite, > 'C:/Program Files/Watir/examples/test_cases/report',:html) > > is when it is between a begin and end outside of the main class in the > file above - it won't run in the #teardown or in the def self.suite. Am I > missing something? > > Also, I have the following line commented out: > > #Test::Unit::UI::Console::TestRunner.new(suite).start > > Any reason why I would need it uncommented? > > Thanks, > Steve > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6414&messageID=18139#18139 > _______________________________________________ > 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/20070205/7ec713e6/attachment-0001.html From paul.rogers at shaw.ca Mon Feb 5 11:39:27 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 05 Feb 2007 09:39:27 -0700 Subject: [Wtr-general] Data Driven Testing In-Reply-To: <53638312.1170645507784.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <53638312.1170645507784.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: watir doesnt provide anything directly. As Chris has asked - what have you tried? Active record and mysql may be a good solution for you. Paul ----- Original Message ----- From: mike Date: Sunday, February 4, 2007 8:17 pm Subject: [Wtr-general] Data Driven Testing > Does watir provide an easy method to utilize data tables (not > excel spreadsheets)? Im building a script that hopefully will > iterate through a list (500K+) of numbers and execute a web search > on each of them, then verify the results of the search. The logic > for validation is completed, but im having trouble loading the list. > > Any help is much appreciated! > ------------------------------------------------------------------- > -- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6412&messageID=18131#18131 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From richard.conroy at gmail.com Mon Feb 5 12:00:39 2007 From: richard.conroy at gmail.com (Richard Conroy) Date: Mon, 5 Feb 2007 17:00:39 +0000 Subject: [Wtr-general] Data Driven Testing In-Reply-To: References: <53638312.1170645507784.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <511fa3a20702050900t12cfa8b9h3705d9df6d1fe832@mail.gmail.com> On 2/5/07, Paul Rogers wrote: > > watir doesnt provide anything directly. > > As Chris has asked - what have you tried? > > Active record and mysql may be a good solution for you. Simple solutions are always good. We have a system where we more or less run the same WATIR test against 70+ argument sets. So obviously we parameterised the script. We stored the script arguments in an XML file. Which as it turns out was a bad idea. XML is bit fiddly that way, and is probably a burden on our testers to administer. I would recommend storing your test arguments in YAML, which is considerably more readable and closer to the point. From paul.rogers at shaw.ca Mon Feb 5 12:09:32 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 05 Feb 2007 10:09:32 -0700 Subject: [Wtr-general] Autoit problem In-Reply-To: <55386588.1170692960125.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <55386588.1170692960125.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: try a manual install of autiit this is a guideline only, its not going to be exact: on a command line cd toi the dir where autoit.dll is then regsvr32 autoit and see if that fixes the problem ----- Original Message ----- From: lianagi Date: Monday, February 5, 2007 9:28 am Subject: [Wtr-general] Autoit problem > Hi! I can't install watir. Whenever i run the test, this problem > occurs: > ..F..Problem with Autoit - is it installed?. > > I installed it using admin account, I even tried installing watir > manually instead of gem install watir, same thing happens. I even > downloaded Autoit separately. still doesn't work. > > Pls help me. Thanks! > ------------------------------------------------------------------- > -- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6423&messageID=18167#18167 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From forum-watir-users at openqa.org Mon Feb 5 13:07:11 2007 From: forum-watir-users at openqa.org (mike) Date: Mon, 05 Feb 2007 12:07:11 CST Subject: [Wtr-general] Data Driven Testing In-Reply-To: Message-ID: <36879424.1170698873334.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I have been testing with WET for their limited data support, but its become easier to construct the tests (minus data input) without it. Using ActiveRecord seems promising, does it require the entire rails framework, or can it standalone with watir? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6412&messageID=18176#18176 From bret at pettichord.com Mon Feb 5 13:51:44 2007 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 05 Feb 2007 12:51:44 -0600 Subject: [Wtr-general] Data Driven Testing In-Reply-To: <36879424.1170698873334.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <36879424.1170698873334.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45C77CC0.9010804@pettichord.com> mike wrote: > I have been testing with WET for their limited data support, but its become easier to construct the tests (minus data input) without it. Using ActiveRecord seems promising, does it require the entire rails framework, or can it standalone with watir? It does not require the rest of rails. From forum-watir-users at openqa.org Mon Feb 5 14:25:48 2007 From: forum-watir-users at openqa.org (Nathan) Date: Mon, 05 Feb 2007 13:25:48 CST Subject: [Wtr-general] Why aren't all attributes valid for all tags? Message-ID: <38216541.1170703578633.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> In build 1145 of 1.5.1, I have found that if I do this: $ie.span(:className, "paragraphHeader") I get an error returned that :className is not a valid "how" for a span. Why aren't all possible attributes allowed for all tags? Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6425&messageID=18179#18179 From forum-watir-users at openqa.org Mon Feb 5 14:34:02 2007 From: forum-watir-users at openqa.org (Nathan) Date: Mon, 05 Feb 2007 13:34:02 CST Subject: [Wtr-general] Why aren't all attributes valid for all tags? In-Reply-To: <38216541.1170703578633.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <54475607.1170704072555.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Really this is very unusual, for when I use this attribute in an old fashioned script of mine, as in the following: def validate_topContent_rightColumn() rightColumnValid = false rightColumnValid = ( (@watirBrowser.watir.span(:className, "paragraphHeader").exists?) and (@watirBrowser.watir.span(:className, "paragraphHeader").innerText == "Select Another Buying Guide") and (@watirBrowser.watir.selectBox(:id, "ctl00_ContentPlaceHolder1_BuyingGuidesSelector_vsYear").exists?) and (@watirBrowser.watir.selectBox(:id, "ctl00_ContentPlaceHolder1_BuyingGuidesSelector_vsBodystyle").exists?) and (@watirBrowser.watir.button(:id, "ctl00_ContentPlaceHolder1_BuyingGuidesSelector_ctl00_imageButton").exists?) ) return rightColumnValid end # End: def validate_topContent_rightColumn() And then try to use it in a script that employs the TestCase class as in the following: def test_03_validate_topContent_rightColumn() assert($ie.span(:className, "paragraphHeader").exists?) assert($ie.span(:className, "paragraphHeader").innerText == "Select Another Buying Guide") assert($ie.selectBox(:id, "ctl00_ContentPlaceHolder1_BuyingGuidesSelector_vsYear").exists?) assert($ie.selectBox(:id, "ctl00_ContentPlaceHolder1_BuyingGuidesSelector_vsBodystyle").exists?) assert($ie.button(:id, "ctl00_ContentPlaceHolder1_BuyingGuidesSelector_ctl00_imageButton").exists?) end # End: def validate_topContent_rightColumn() I'd think they would be the same, but the second one produces this error I've described above. Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6425&messageID=18181#18181 From forum-watir-users at openqa.org Mon Feb 5 14:48:14 2007 From: forum-watir-users at openqa.org (Nathan) Date: Mon, 05 Feb 2007 13:48:14 CST Subject: [Wtr-general] Why aren't all attributes valid for all tags? In-Reply-To: <38216541.1170703578633.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <36650943.1170704924086.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> So I figured out a workaround - it appears that :class_name works in both cases, but for some reason :className does not work in both cases! :) Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6425&messageID=18182#18182 From bret at pettichord.com Mon Feb 5 15:14:14 2007 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 05 Feb 2007 14:14:14 -0600 Subject: [Wtr-general] probelm with Watir1.5 In-Reply-To: <40286205.1168327908706.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <40286205.1168327908706.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45C79016.1060704@pettichord.com> sarita wrote: > After installing Watir1.5 & running examples\googlesearch.rb, the following error comes: > > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1278:in `initialize': LoadLibrary: c:\ru by\lib\ruby\site_ruby\1.8\watir\IEDialog\Release\IEDialog.dll (RuntimeError) > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1278:in `new' > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1278 > from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `ge > m_original_require' > from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `re > quire' > from C:/PROGRA~1/Watir/examples/GOOGLE~1.RB:15 > > plz provide the solution. > This looks like watir was not installed correctly. Are you still having a problem with this? Bret From renard at nc.rr.com Mon Feb 5 14:18:46 2007 From: renard at nc.rr.com (Bernard Kenik) Date: Mon, 05 Feb 2007 14:18:46 -0500 Subject: [Wtr-general] newbie needs help to get past step 1. Message-ID: <45C78316.6080700@nc.rr.com> I have installed Watir via the Windows Installer for Watir 1.4.1 link. (http://rubyforge.org/frs/download.php/5677/watir-1.4.1.exe) This is my first script: watir_cboe.rb: =================================================== #!c:/ruby/bin/ruby -w # -*- coding: ISO-8859-1 -*- require 'watir' include Watir site = "http://cboe.com" ie = Watir::IE.start(site) =================================================== output of the script: ===================================================== W, [05-Feb-2007 13:31:46#3116] WARN -- : frame error in waitdocument OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. c:\ruby\lib\ruby\site_ruby\1.8/watir.rb:1405:in `method_missing' c:\ruby\lib\ruby\site_ruby\1.8/watir.rb:1405:in `wait' c:\ruby\lib\ruby\site_ruby\1.8/watir.rb:1404:in `upto' c:\ruby\lib\ruby\site_ruby\1.8/watir.rb:1404:in `wait' c:\ruby\lib\ruby\site_ruby\1.8/watir.rb:1254:in `goto' c:\ruby\lib\ruby\site_ruby\1.8/watir.rb:1095:in `start' C:\Documents and Settings\Owner\My Documents\My Projects\Ruby\watir\watir_cboe.rb:8 Program exited with code 0 ======================================================== Result of running the script. The browser opens and connects to the specified site. Once this occurs the script terminates with the above output. I can open the browser's window to the http://cboe.com webpage. Login is not a requirement to navigate to other pages on this site. Login is require only if you want to access pages specific to your account. I am using ruby 1.8.5 (2006-12-25 patchlevel 12) [i386-mswin32] and Internet Explorer 7 (version:7.0.5730.11) Basically the above script result should not occur, but then I am total newbie to Watir. I realize that I probably could workaround with a begin , rescue, end block. But I am trying to understand why the WARN message occurs and what to do to prevent the message from occurring. Than you for any assistance you may provide. From tester.paul at gmail.com Mon Feb 5 17:04:45 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Mon, 5 Feb 2007 17:04:45 -0500 Subject: [Wtr-general] Installation Problem In-Reply-To: <45C3C39D.8090003@yahoo.com> References: <45C3C39D.8090003@yahoo.com> Message-ID: <37c405480702051404tbb94f11h99c91dedb5a1d3c3@mail.gmail.com> Install Watir 1.4.1 to a folder with no spaces in it. e.g. C:\Watir It should work. On 02/02/07, RobG wrote: > > > I hope this is an acceptable topic for this list... > > I just installed Ruby 1.8.5 on my system, and then, with much effort, > managed to get the watir-1.4.1.exe installed (it has a major install bug > that I was able to circumvent). > > So after all that, I open a command prompt into the installation > location, and run all_tests.rb as instructed, and I get the errors below: > > > C:\Program Files\Watir\unittests>all_tests.rb > C:/Program Files/Watir/unittests/../unittests/setup.rb:4:in `require': > no such f > ile to load -- watir (LoadError) > from C:/Program Files/Watir/unittests/../unittests/setup.rb:4 > from C:/Program Files/Watir/unittests/all_tests.rb:4:in 'require' > from C:/Program Files/Watir/unittests/all_tests.rb:4 > > > > It looks like it might be a simple pathing issue, but I'm not sure. I > do have the path setup so that I can run regular ruby, but I haven't > tried to add anything for watir yet; I thought I would ask here first. > > I don't remember having this problem about eight months ago when I first > tried Watir, but that was on another computer. > > Any help would be appreciated. Thanks! > > Rob > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070205/8014bdac/attachment-0001.html From tester.paul at gmail.com Mon Feb 5 18:25:46 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Mon, 5 Feb 2007 18:25:46 -0500 Subject: [Wtr-general] Everyday Scripting with Ruby (the book) In-Reply-To: <511fa3a20702010730i7c7ebdd3sb663931b2a92b27@mail.gmail.com> References: <511fa3a20702010730i7c7ebdd3sb663931b2a92b27@mail.gmail.com> Message-ID: <37c405480702051525u4fef0de9l76027f62384aed7e@mail.gmail.com> On 01/02/07, Richard Conroy wrote: > > I am curious what everyone thinks of this (new) book. > > It starts off well, with the first example tutorial being > how to test if an uninstaller worked. No hello world, > silly arithmetic examples etc. > > Well it is ordered, I will know myself soon. > I reviewed a late draft of the book late last summer 2006. I think that the book is a great companion to the Programming Ruby 2nd edition that has been (and still is!) an invaluable reference for me. The thing is that I'm not a programmer by trade and my Ruby/Watir scripts were all horribly pieced together like some kind of franken-code based on example snippets and email posts that I came across. After reading Brian's book, I was able to construct well-designed Ruby scripts, refactor all of my earlier Watir scripts, and can now understand more lengthy and complex pieces of Ruby code. I also really like how Brian didn't start with the typical "hello world" example and instead jumped right into scripts that can solve real-world problems. A "test the water with both feet" kind of approach. =) I certainly learned many useful things from "Everyday Scripting with Ruby" and am looking forward to putting a hardcopy on my shelf next to my "Programming Ruby" copy. There's more in there that I need to digest but it will take time (for me) since I only script in cycles, and I test more than I script. The book covers a lot and has many different layers in it that I think would be useful to both beginners and intermediate scripters, and not just testers. Most importantly (for me) is that it is a fairly easy-to-read book. Most of the programming/scripting books that I have read or skimmed through really seem to be speaking a language I almost, but don't quite always, understand -- and that includes the "Programming Ruby" book. I found that Brian's book uses clear, simple language and builds upon terms that he has already introduced and explained earlier in the book. That made it easier for me to stick with it and work through the more complex examples. I'd recommend it. Paul C. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070205/c994c772/attachment.html From christopher.mcmahon at gmail.com Mon Feb 5 19:19:48 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 5 Feb 2007 16:19:48 -0800 Subject: [Wtr-general] Everyday Scripting with Ruby (the book) In-Reply-To: <37c405480702051525u4fef0de9l76027f62384aed7e@mail.gmail.com> References: <511fa3a20702010730i7c7ebdd3sb663931b2a92b27@mail.gmail.com> <37c405480702051525u4fef0de9l76027f62384aed7e@mail.gmail.com> Message-ID: <72799cd70702051619s197ea530x9dc41e5840c6bf60@mail.gmail.com> > After reading Brian's book, I was able to construct well-designed Ruby > scripts, refactor all of my earlier Watir scripts, and can now understand > more lengthy and complex pieces of Ruby code. I also really like how Brian > didn't start with the typical "hello world" example and instead jumped right > into scripts that can solve real-world problems. A "test the water with > both feet" kind of approach. =) I've been skimming the first hundred pages or so, especially the first 50. What I like is that even though the problems are not terribly complex, they are complex enough that a naive programmer would make all sorts of mistakes in the course of solving them. The book helps you avoid making those mistakes. What I find, reading closely, is that as you type along with the exercises and read the descriptions (which are good stories, logical and nicely laid out) you are actually learning good programming practices, without actually noticing. It just seems like the natural thing to do. Every other page or so I find myself saying "that was cool, I'll have to remember how he did that". Someone with fewer historical mistakes under their belt than me would simply learn good practices instead of having to remember not use bad ones. A long time ago I used to teach guitar lessons. I always liked teaching kids 8 or 9 years old, because they had no concept of what was hard or not. Teenagers and adults who had been exposed to records and videos would think "playing barre chords is hard" and "playing above the 4th fret is hard". The kids didn't have those prejudices: to an 8-year-old, that stuff is just how one goes about playing the guitar. It's all *equally* hard. Likewise, a beginner who did all of the exercises in this book and understood all of the explanations would find themselves at the end to be quite a good Ruby programmer. They wouldn't have known that blocks are hard, methods are hard, test/unit is hard, classes are hard, etc. etc. That's just the way you (should) program Ruby. From paul.rogers at shaw.ca Mon Feb 5 20:48:15 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 05 Feb 2007 18:48:15 -0700 Subject: [Wtr-general] newbie needs help to get past step 1. References: <45C78316.6080700@nc.rr.com> Message-ID: <058b01c74990$de91bdc0$6400a8c0@laptop> this happens because the window you are accessing has several frames. One of the frames is in a different domain, and to avoid cross frame scripting vulnerabilities, Internet Explorer has prevented you accessing it. this page has some info on that vulnerability http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/sec_dhtml.asp If you dont need to access that frame, dont worry about it ;-) ----- Original Message ----- From: "Bernard Kenik" To: Sent: Monday, February 05, 2007 12:18 PM Subject: [Wtr-general] newbie needs help to get past step 1. >I have installed Watir via the Windows Installer for Watir 1.4.1 link. > (http://rubyforge.org/frs/download.php/5677/watir-1.4.1.exe) > > This is my first script: watir_cboe.rb: > =================================================== > #!c:/ruby/bin/ruby -w > # -*- coding: ISO-8859-1 -*- > > require 'watir' > include Watir > > site = "http://cboe.com" > ie = Watir::IE.start(site) > > =================================================== > > output of the script: > ===================================================== > W, [05-Feb-2007 13:31:46#3116] WARN -- : frame error in waitdocument > OLE error code:80070005 in > Access is denied. > > HRESULT error code:0x80020009 > Exception occurred. > c:\ruby\lib\ruby\site_ruby\1.8/watir.rb:1405:in `method_missing' > c:\ruby\lib\ruby\site_ruby\1.8/watir.rb:1405:in `wait' > c:\ruby\lib\ruby\site_ruby\1.8/watir.rb:1404:in `upto' > c:\ruby\lib\ruby\site_ruby\1.8/watir.rb:1404:in `wait' > c:\ruby\lib\ruby\site_ruby\1.8/watir.rb:1254:in `goto' > c:\ruby\lib\ruby\site_ruby\1.8/watir.rb:1095:in `start' > C:\Documents and Settings\Owner\My Documents\My > Projects\Ruby\watir\watir_cboe.rb:8 > > Program exited with code 0 > ======================================================== > > Result of running the script. > The browser opens and connects to the specified site. Once this occurs > the script terminates with the above output. I can open the browser's > window to the http://cboe.com webpage. > > Login is not a requirement to navigate to other pages on this site. > Login is require only if you want to access pages specific to your > account. > > I am using > ruby 1.8.5 (2006-12-25 patchlevel 12) [i386-mswin32] > and > Internet Explorer 7 (version:7.0.5730.11) > > Basically the above script result should not occur, but then I am total > newbie to Watir. > > I realize that I probably could workaround with a begin , rescue, end > block. But I am trying to understand why the WARN message occurs and > what to do to prevent the message from occurring. > > Than you for any assistance you may provide. > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From angrez at gmail.com Tue Feb 6 00:42:30 2007 From: angrez at gmail.com (Angrez Singh) Date: Tue, 6 Feb 2007 11:12:30 +0530 Subject: [Wtr-general] while not exists does not work in Firewatir? In-Reply-To: References: <49838681.1170660923766.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Hi Steven, Could you please log this issue in the Firewatir issue tracker at http://code.google.com/p/firewatir/ Regards, Angrez On 2/5/07, Angrez Singh wrote: > > Hi Steven, > > I'll look into this and let you know. > > Regards, > Angrez > > > On 2/5/07, steven wrote: > > > > The following code only seems to work if $browser = ie.new, and not > > firefox.new (i.e. with Firewatir). Am I missing something or is this a > > known issue? > > > > while not ($browser.link(:text,"Withdraw").exists?) > > sleep 0.5 > > end > > > > To clarify, when I mean does not work, I mean, it never catches the link > > as existing, even though it is there. It just stays in the sleep command > > over and over. > > > > Thanks, > > Steve > > --------------------------------------------------------------------- > > Posted via Jive Forums > > http://forums.openqa.org/thread.jspa?threadID=6415&messageID=18140#18140 > > > > _______________________________________________ > > 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/20070206/276a6e81/attachment.html From prema.arya at gmail.com Tue Feb 6 01:16:35 2007 From: prema.arya at gmail.com (Prema Arya) Date: Tue, 6 Feb 2007 11:46:35 +0530 Subject: [Wtr-general] custom attributes In-Reply-To: <45BFCFEF.7020601@pettichord.com> References: <003a01c74362$0cd0b950$6400a8c0@laptop> <27915010701290019p7664d08mcf5ffa68ce3c95f@mail.gmail.com> <27915010701292219o52c0fc43hd30da6b8a98602e6@mail.gmail.com> <45BFCFEF.7020601@pettichord.com> Message-ID: <27915010702052216l424fb4a8lbedbc6ec8c485fcb@mail.gmail.com> Hi Bret, Following are the features that are there in FireWatir but not in Watir. Some of these can be impelemented easily but some of them really need a thought: 1. Accessing element using any attribute that is there in the rendered HTML on the browser. 2. There is method_missing function in FireWatir which catches the methods that are called for an element but are not implemented. This method will then call those methods on the element and will return the results appropriately. This can be useful in case user accesses an element using XPATH whose class is not there like MAP (which is there in Watir, but not in Firewatir) and user tries to fire or execute the method that is defined for the element but not implemented. 3. Platform Indpendence: This functionality FireWatir inherits from its implementation i.e. usage of JSSh. 4. Running on Remote machine: This functionality FireWatir also inherits from its implementation i.e. usage of JSSh. That is what I can think of as of now. Regards, Regards Prema On 1/31/07, Bret Pettichord wrote: > > Prema Arya wrote: > > Yes we can do it in FireWatir also: > > > > puts ff.text_field(:custom, "custom").value > > > > We do not support this in Watir::IE. Should we? Are there other features > that were added to FireWatir that aren't in Watir::IE? > > As we think about recombining all the different versions of Watir, we > will have to support a common API across the versions, so we will need > to have a way of reaching agreement on these kinds of issues. > > Bret > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -- Prema Arya -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070206/dbd3d267/attachment.html From forum-watir-users at openqa.org Tue Feb 6 01:40:05 2007 From: forum-watir-users at openqa.org (Maloy kanti debnath) Date: Tue, 06 Feb 2007 00:40:05 CST Subject: [Wtr-general] hi,how to use TableRow class Message-ID: <46960290.1170744035528.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> hi, Can any one tell me how to use the TableRow class .. thank you , Maloy --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6430&messageID=18209#18209 From forum-watir-users at openqa.org Tue Feb 6 03:23:07 2007 From: forum-watir-users at openqa.org (Maisonnette) Date: Tue, 06 Feb 2007 02:23:07 CST Subject: [Wtr-general] Question About Test Suite In-Reply-To: Message-ID: <55875471.1170750219421.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Yes, and your tests function must be start with 'test_' in every "test case" file ... (http://rubyforge.org/pipermail/wtr-general/2006-July/006762.html) --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6414&messageID=18212#18212 From zeljko.filipin at gmail.com Tue Feb 6 04:00:16 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Tue, 6 Feb 2007 10:00:16 +0100 Subject: [Wtr-general] hi,how to use TableRow class In-Reply-To: <46960290.1170744035528.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <46960290.1170744035528.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: What do you want to do? Here is documentation about that class, but I do not think it will be useful to you. http://wtr.rubyforge.org/rdoc/classes/Watir/TableRow.html http://wtr.rubyforge.org/rdoc/index.html -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070206/f22937e9/attachment.html From forum-watir-users at openqa.org Tue Feb 6 09:37:35 2007 From: forum-watir-users at openqa.org (Maisonnette) Date: Tue, 06 Feb 2007 08:37:35 CST Subject: [Wtr-general] hypertext is present ? Message-ID: <40860062.1170772686037.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi everyone, Do you know how to know if an hypertext link is present and return a Failures is the link is not present . Like this : [b]html :[/b] [i]Cst_AS[/i] [b]watir/ruby code :[/b] [i]assert_contain(true , ie.link(:text, 'Consultation des AS'))[/i] I don't find an assert fonction to check this ... --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6436&messageID=18221#18221 From forum-watir-users at openqa.org Tue Feb 6 09:52:27 2007 From: forum-watir-users at openqa.org (Maisonnette) Date: Tue, 06 Feb 2007 08:52:27 CST Subject: [Wtr-general] hypertext is present ? In-Reply-To: <40860062.1170772686037.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <44711254.1170773577090.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Finnaly , i fond the solution ! The solution is : [b]assert(ie.link(:text, "Cst_AS").exists?,"This link don't exist !")[/b] --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6436&messageID=18222#18222 From forum-watir-users at openqa.org Tue Feb 6 09:52:48 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Tue, 06 Feb 2007 08:52:48 CST Subject: [Wtr-general] hypertext is present ? In-Reply-To: <40860062.1170772686037.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <39884304.1170773598158.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> ie.link(:text, 'Consultation des AS').exists? is that what you are looking for? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6436&messageID=18223#18223 From forum-watir-users at openqa.org Tue Feb 6 09:57:56 2007 From: forum-watir-users at openqa.org (Maisonnette) Date: Tue, 06 Feb 2007 08:57:56 CST Subject: [Wtr-general] hypertext is present ? In-Reply-To: <39884304.1170773598158.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <53550690.1170773906718.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Yes , it's that ! --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6436&messageID=18224#18224 From tester.paul at gmail.com Tue Feb 6 09:58:34 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Tue, 6 Feb 2007 09:58:34 -0500 Subject: [Wtr-general] while not exists does not work in Firewatir? In-Reply-To: <49838681.1170660923766.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <49838681.1170660923766.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <37c405480702060658w7d8caaa8n34da059b20e5a07@mail.gmail.com> I try to avoid icky double negatives. Does the following line work for you instead? sleep 0.5 until $browser.link(:text, "Withdraw").exists? On 05/02/07, steven wrote: > > The following code only seems to work if $browser = ie.new, and not > firefox.new (i.e. with Firewatir). Am I missing something or is this a > known issue? > > while not ($browser.link(:text,"Withdraw").exists?) > sleep 0.5 > end > > To clarify, when I mean does not work, I mean, it never catches the link > as existing, even though it is there. It just stays in the sleep command > over and over. > > Thanks, > Steve > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070206/8c3d3282/attachment.html From sgoel at yahoo-inc.com Mon Feb 5 13:55:24 2007 From: sgoel at yahoo-inc.com (Suman Goel) Date: Mon, 5 Feb 2007 10:55:24 -0800 Subject: [Wtr-general] how to populate hidden text area? In-Reply-To: References: <009201c7419c$ff7bde40$8a2415ac@ds.corp.yahoo.com><06b801c74337$e0f62b00$6400a8c0@laptop><01db01c74402$d7569eb0$8a2415ac@ds.corp.yahoo.com><009101c74420$67ea5080$6400a8c0@laptop><00a701c74423$9dc9f130$6400a8c0@laptop><000601c74437$992494f0$8a2415ac@ds.corp.yahoo.com><001401c74439$057b9bc0$8a2415ac@ds.corp.yahoo.com> Message-ID: <02bf01c74957$31ea0070$8a2415ac@ds.corp.yahoo.com> Hi Angrez, I used the following code to reach the textarea which is set to hidden: ie.send_keys("{tab}") I could reach the textarea successfully but am still getting the same error - W, [05-Feb-2007 10:52:14#3200] WARN -- : runtime error in wait W, [05-Feb-2007 10:52:18#3200] WARN -- : frame error in waitdocument OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. Thanks Suman _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Angrez Singh Sent: Wednesday, January 31, 2007 6:28 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] how to populate hidden text area? Hi Suman, Can you try the following? Simulate pressing {TAB} key until you get focus on the textarea i.e. send or Press {TAB} key using code. First count the number of tabs required by doing the same in UI and send that many tab key events, to get focus on the text area. Once you get the focus you can access text area using normal watir statements like $ie.text_field(:id, 'some_id').value = 'some value' Let me know if this works. - Angrez On 1/30/07, Suman Goel wrote: Also, firefox, web developer tool's display form details feature shows me the following for the required fields: _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Suman Goel Sent: Monday, January 29, 2007 10:27 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] how to populate hidden text area? I forgot to mention in my previous email that on irb, this solution is working as displayed below. But in IE, it does not since the text field is a required field and expecting a value at the time of clicking the submit button. I need some way to overlook that required flag of the field. Thanks _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Monday, January 29, 2007 8:04 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] how to populate hidden text area? It seems to work fine for me: irb(main):017:0> puts ie.text_field(:id , /h/).value abc => nil irb(main):018:0> ie.text_field(:id , /h/).set('gg') WIN32OLERuntimeError: focus OLE error code:800A083E in htmlfile Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus. HRESULT error code:0x80020009 Exception occurred. from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145/./watir.rb:3888:in `method_missing' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145/./watir.rb:3888:in `set' from (irb):18 irb(main):019:0> ie.text_field(:id , /h/).value='fg' => "fg" irb(main):020:0> puts ie.text_field(:id , /h/).value fg => nil irb(main):021:0> Watir::IE::VERSION => "1.5.1.1145" irb(main):022:0> ----- Original Message ----- From: Paul Rogers To: wtr-general at rubyforge.org Sent: Monday, January 29, 2007 8:40 PM Subject: Re: [Wtr-general] how to populate hidden text area? can you elaborate on that? ----- Original Message ----- From: Suman Goel To: wtr-general at rubyforge.org Sent: Monday, January 29, 2007 5:08 PM Subject: Re: [Wtr-general] how to populate hidden text area? Yes. I did what you wrote below and it did not work -Suman _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Sunday, January 28, 2007 3:56 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] how to populate hidden text area? presumably you tried @ie.text_field(:name, 'J_LDESC').value='yes' and that didnt work? ----- Original Message ----- From: Suman Goel To: wtr-general at rubyforge.org Sent: Friday, January 26, 2007 3:54 PM Subject: [Wtr-general] how to populate hidden text area? This did not work for me as my webpage has J__LDESC(the textarea in question) as the required field and so, on clicking submit button, I get the error message to fill in the field. Any other suggestions? Suman try using the value method: @ie.text_field(:name, ..).value='some text' the set method fires all appropriate evens, and generally obeys what the web page is doing ( ie not letting you enter something that is hidden) but value= will get round that Paul ----- Original Message ----- From: Suman Goel To: wtr-general at rubyforge.org Sent: Thursday, January 25, 2007 10:17 PM Subject: [Wtr-general] how to populate hidden text area? My webpage has the following code: My watir test has the following code: @ie.text_field(:name, "J__LDESC").set("some text") I am getting the following error: 1) Error: test_MemSlot(TestMemSlot): WIN32OLERuntimeError: focus OLE error code:800A083E in htmlfile Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus. HRESULT error code:0x80020009 Exception occurred. C:/ruby1.8.5/ruby/lib/ruby/site_ruby/1.8/watir.rb:3399:in `method_missing' C:/ruby1.8.5/ruby/lib/ruby/site_ruby/1.8/watir.rb:3399:in `set' C:/workspace/yhj_slot/test/tc_MemSlot.rb:43:in `test_MemSlot' Could someone help me in resolving this issue? Thanks _____ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _____ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _____ _______________________________________________ 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/20070205/53cf062e/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 6366 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20070205/53cf062e/attachment-0001.jpe From sgoel at yahoo-inc.com Mon Feb 5 14:21:16 2007 From: sgoel at yahoo-inc.com (Suman Goel) Date: Mon, 5 Feb 2007 11:21:16 -0800 Subject: [Wtr-general] how to populate hidden text area? In-Reply-To: References: <009201c7419c$ff7bde40$8a2415ac@ds.corp.yahoo.com><06b801c74337$e0f62b00$6400a8c0@laptop><01db01c74402$d7569eb0$8a2415ac@ds.corp.yahoo.com><009101c74420$67ea5080$6400a8c0@laptop><00a701c74423$9dc9f130$6400a8c0@laptop><000601c74437$992494f0$8a2415ac@ds.corp.yahoo.com><001401c74439$057b9bc0$8a2415ac@ds.corp.yahoo.com> Message-ID: <02ce01c7495a$cef9cc30$8a2415ac@ds.corp.yahoo.com> For now, I am tweaking a bug in the application under test to suit my testing.. And it is working somehow :-) -Suman _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Angrez Singh Sent: Wednesday, January 31, 2007 6:28 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] how to populate hidden text area? Hi Suman, Can you try the following? Simulate pressing {TAB} key until you get focus on the textarea i.e. send or Press {TAB} key using code. First count the number of tabs required by doing the same in UI and send that many tab key events, to get focus on the text area. Once you get the focus you can access text area using normal watir statements like $ie.text_field(:id, 'some_id').value = 'some value' Let me know if this works. - Angrez On 1/30/07, Suman Goel wrote: Also, firefox, web developer tool's display form details feature shows me the following for the required fields: _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Suman Goel Sent: Monday, January 29, 2007 10:27 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] how to populate hidden text area? I forgot to mention in my previous email that on irb, this solution is working as displayed below. But in IE, it does not since the text field is a required field and expecting a value at the time of clicking the submit button. I need some way to overlook that required flag of the field. Thanks _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Monday, January 29, 2007 8:04 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] how to populate hidden text area? It seems to work fine for me: irb(main):017:0> puts ie.text_field(:id , /h/).value abc => nil irb(main):018:0> ie.text_field(:id , /h/).set('gg') WIN32OLERuntimeError: focus OLE error code:800A083E in htmlfile Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus. HRESULT error code:0x80020009 Exception occurred. from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145/./watir.rb:3888:in `method_missing' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145/./watir.rb:3888:in `set' from (irb):18 irb(main):019:0> ie.text_field(:id , /h/).value='fg' => "fg" irb(main):020:0> puts ie.text_field(:id , /h/).value fg => nil irb(main):021:0> Watir::IE::VERSION => "1.5.1.1145" irb(main):022:0> ----- Original Message ----- From: Paul Rogers To: wtr-general at rubyforge.org Sent: Monday, January 29, 2007 8:40 PM Subject: Re: [Wtr-general] how to populate hidden text area? can you elaborate on that? ----- Original Message ----- From: Suman Goel To: wtr-general at rubyforge.org Sent: Monday, January 29, 2007 5:08 PM Subject: Re: [Wtr-general] how to populate hidden text area? Yes. I did what you wrote below and it did not work -Suman _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Sunday, January 28, 2007 3:56 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] how to populate hidden text area? presumably you tried @ie.text_field(:name, 'J_LDESC').value='yes' and that didnt work? ----- Original Message ----- From: Suman Goel To: wtr-general at rubyforge.org Sent: Friday, January 26, 2007 3:54 PM Subject: [Wtr-general] how to populate hidden text area? This did not work for me as my webpage has J__LDESC(the textarea in question) as the required field and so, on clicking submit button, I get the error message to fill in the field. Any other suggestions? Suman try using the value method: @ie.text_field(:name, ..).value='some text' the set method fires all appropriate evens, and generally obeys what the web page is doing ( ie not letting you enter something that is hidden) but value= will get round that Paul ----- Original Message ----- From: Suman Goel To: wtr-general at rubyforge.org Sent: Thursday, January 25, 2007 10:17 PM Subject: [Wtr-general] how to populate hidden text area? My webpage has the following code: My watir test has the following code: @ie.text_field(:name, "J__LDESC").set("some text") I am getting the following error: 1) Error: test_MemSlot(TestMemSlot): WIN32OLERuntimeError: focus OLE error code:800A083E in htmlfile Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus. HRESULT error code:0x80020009 Exception occurred. C:/ruby1.8.5/ruby/lib/ruby/site_ruby/1.8/watir.rb:3399:in `method_missing' C:/ruby1.8.5/ruby/lib/ruby/site_ruby/1.8/watir.rb:3399:in `set' C:/workspace/yhj_slot/test/tc_MemSlot.rb:43:in `test_MemSlot' Could someone help me in resolving this issue? Thanks _____ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _____ _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _____ _______________________________________________ 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/20070205/83a1e5f9/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 6366 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20070205/83a1e5f9/attachment-0001.jpe From richard.conroy at gmail.com Tue Feb 6 12:19:20 2007 From: richard.conroy at gmail.com (Richard Conroy) Date: Tue, 6 Feb 2007 17:19:20 +0000 Subject: [Wtr-general] Data Driven Testing In-Reply-To: <36879424.1170698873334.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <36879424.1170698873334.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <511fa3a20702060919r3d94015n9602de0df68c0030@mail.gmail.com> On 2/5/07, mike wrote: > I have been testing with WET for their limited data support, but its become easier to construct the tests (minus data input) without it. Using ActiveRecord seems promising, does it require the entire rails framework, or can it standalone with watir? Standalone. Using ActiveRecord outside of Rails is one of the best things that you can learn. Its odd that more people don't realise it, or maybe its a testament to the mindshare powerhouse that it is Rails. But at the end of the day, our testers liked the fact that their test arguments were actually defined in Ruby as simple configuration.rb or configuration_email_only.rb Its often the simple stuff like the fact that the files are syntax highlighted in SCiTe that blows their skirt up. From forum-watir-users at openqa.org Tue Feb 6 12:52:44 2007 From: forum-watir-users at openqa.org (lianagi) Date: Tue, 06 Feb 2007 11:52:44 CST Subject: [Wtr-general] Autoit problem In-Reply-To: Message-ID: <51252596.1170784394281.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> thanks! now these are the other problems.... cannot find file c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/unittests/html/javascriptclick.html make sure the path or internet address is correct C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/unittests/../unittests/div_test.r b:11:in `setup' 18) Error: test_p(TC_Divs): WIN32OLERuntimeError: navigate OLE error code:800700AA in HRESULT error code:0x80020009 Exception occurred. C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/unittests/../watir.rb:1253:in `me thod_missing' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/unittests/../watir.rb:1253:in `go to' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/unittests/../unittests/div_test.r b:11:in `setup' 19) Error: test_p_iterator(TC_Divs): WIN32OLERuntimeError: navigate OLE error code:800700AA in HRESULT error code:0x80020009 Exception occurred.