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. 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' 20) Error: test_span_iterator(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' 21) Error: test_span_properties(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' 22) Error: test_spans(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' 23) Error: test_ExistingWindow(TC_ExistingWindow): 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/attachToEx istingWindow_test.rb:11:in `goto_page' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/unittests/../unittests/attachToEx istingWindow_test.rb:15:in `test_ExistingWindow' 24) Error: test_JS_Events(TC_Fields): 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/textfields _test.rb:11:in `setup' 25) Error: test_TextField_to_s(TC_Fields): 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/textfields _test.rb:11:in `setup' 26) Error: test_enter(TC_Fields): 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/textfields _test.rb:11:in `setup' 27) Error: test_label_properties(TC_Fields): 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/textfields _test.rb:11:in `setup' 28) Error: test_labels_iterator(TC_Fields): 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/textfields _test.rb:11:in `setup' 29) Error: test_password(TC_Fields): 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/textfields _test.rb:11:in `setup' 30) Error: test_tabbing(TC_Fields): 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/textfields _test.rb:11:in `setup' 31) Error: test_text_field_Append(TC_Fields): 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/textfields _test.rb:11:in `setup' 32) Failure: test_no_status_bar_exception(TC_JSEvents) [C:/ruby/lib/ruby/gems/1.8/gems/watir- 1.4.1/unittests/../unittests/js_events_test.rb:48]: Exception raised: Class: Message: <"Unable to locate a window with title of Pass Page"> ---Backtrace--- C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/unittests/../watir.rb:1208:in `attach _browser_window' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/unittests/../watir.rb:1111:in `attach _init' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/unittests/../watir.rb:1104:in `attach ' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/unittests/../unittests/js_events_test .rb:48:in `test_no_status_bar_exception' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/unittests/../unittests/js_events_test .rb:48:in `test_no_status_bar_exception' --------------- 33) Error: test_alert_button(TC_JavaScript_Test): WIN32OLERuntimeError: navigate OLE error code:800704C7 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/jscript_te st.rb:29:in `goto_javascript_page' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/unittests/../unittests/jscript_te st.rb:33:in `check_dialog' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/unittests/../unittests/jscript_te st.rb:42:in `test_alert_button' 34) Error: test_alert_button2(TC_JavaScript_Test): WIN32OLERuntimeError: navigate OLE error code:800704C7 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/jscript_te st.rb:29:in `goto_javascript_page' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/unittests/../unittests/jscript_te st.rb:33:in `check_dialog' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/unittests/../unittests/jscript_te st.rb:45:in `test_alert_button2' 35) Error: test_confirm_button_Cancel(TC_JavaScript_Test): WIN32OLERuntimeError: navigate OLE error code:800704C7 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/jscript_te st.rb:29:in `goto_javascript_page' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/unittests/../unittests/jscript_te st.rb:33:in `check_dialog' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/unittests/../unittests/jscript_te st.rb:51:in `test_confirm_button_Cancel' 36) Error: test_confirm_button_ok(TC_JavaScript_Test): WIN32OLERuntimeError: navigate OLE error code:800704C7 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/jscript_te st.rb:29:in `goto_javascript_page' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/unittests/../unittests/jscript_te st.rb:33:in `check_dialog' C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/unittests/../unittests/jscript_te st.rb:48:in `test_confirm_button_ok' 37) Failure: test_confirm(TC_PopUps) [C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/unittests/.. /unittests/popups_test.rb:36]: is not true. 182 tests, 783 assertions, 3 failures, 34 errors C:\ruby\lib\ruby\gems\1.8\gems\watir-1.4.1\unittests> --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6423&messageID=18233#18233 From forum-watir-users at openqa.org Tue Feb 6 16:21:20 2007 From: forum-watir-users at openqa.org (Nathan) Date: Tue, 06 Feb 2007 15:21:20 CST Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? Message-ID: <63836878.1170796910575.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Just wondering, because I can't find anything that really makes sense, and don't want to use full blown out rails if possible, but I need to connect to MS SQL Server 2005 - does anybody have any thought, ideas, or solutions? Thanks, Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6445&messageID=18245#18245 From christopher.mcmahon at gmail.com Tue Feb 6 16:31:17 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 6 Feb 2007 13:31:17 -0800 Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? In-Reply-To: <63836878.1170796910575.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <63836878.1170796910575.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70702061331i11f543c3m8d2268bffbc809f4@mail.gmail.com> On 2/6/07, Nathan wrote: > Just wondering, because I can't find anything that really makes sense, and don't want to use full blown out rails if possible, but I need to connect to MS SQL Server 2005 - does anybody have any thought, ideas, or solutions? I like Ruby's ODBC library (included in core Ruby) a lot: http://www.ch-werner.de/rubyodbc/odbc.html There is also a Ruby DBI, but from here it looks a little sketchy: http://ruby-dbi.rubyforge.org/ Some people suggest you should use native drivers whenever possible, but I'm a big fan of ODBC. -Chris From forum-watir-users at openqa.org Tue Feb 6 16:48:46 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Tue, 06 Feb 2007 15:48:46 CST Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? In-Reply-To: <63836878.1170796910575.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <56393987.1170798556974.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Google spit this out http://wiki.rubyonrails.com/rails/pages/HowtoConnectToMicrosoftSQLServer never tried it, but it might help :) --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6445&messageID=18254#18254 From carl.l.shaulis at convergys.com Tue Feb 6 16:48:08 2007 From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com) Date: Tue, 6 Feb 2007 15:48:08 -0600 Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? In-Reply-To: <63836878.1170796910575.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: I am not sure what your are attempting to test regarding MS SQL, but there is a great article in the February Edition of Better Software called "The Power of Three: A Trio of Techniques for Testing Databases" by Chris McMahon. Check it out! Carl From forum-watir-users at openqa.org Tue Feb 6 16:56:03 2007 From: forum-watir-users at openqa.org (Nathan) Date: Tue, 06 Feb 2007 15:56:03 CST Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? In-Reply-To: <56393987.1170798556974.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <36372346.1170798993805.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Right, I've already tried Google with several variations and nothing there is what I'm looking for - I want to connect to MS SQL WITHOUT rails, and this solution as well as every other solution I've come across has been for rails, which requires a rails server to be running. I just want plain ruby - it looks like maybe I can create an ODBC connection on windows, then connect to that via DBI somehow, but I can't figure out the connection string. Does anybody know about this? Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6445&messageID=18257#18257 From forum-watir-users at openqa.org Tue Feb 6 17:07:28 2007 From: forum-watir-users at openqa.org (Nathan) Date: Tue, 06 Feb 2007 16:07:28 CST Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? In-Reply-To: <72799cd70702061331i11f543c3m8d2268bffbc809f4@mail.gmail.com> Message-ID: <31841647.1170799678298.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Is Ruby ODBC installed with Ruby 1.8.5? I haven't been able to figure this out as there don't seem to be any docs for it :( Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6445&messageID=18259#18259 From christopher.mcmahon at gmail.com Tue Feb 6 17:30:31 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 6 Feb 2007 14:30:31 -0800 Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? In-Reply-To: <36372346.1170798993805.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <56393987.1170798556974.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <36372346.1170798993805.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70702061430k43b545e8hdc4c0182d2721f8f@mail.gmail.com> On 2/6/07, Nathan wrote: > Right, I've already tried Google with several variations and nothing there is what I'm looking for - I want to connect to MS SQL WITHOUT rails, and this solution as well as every other solution I've come across has been for rails, which requires a rails server to be running. I just want plain ruby - it looks like maybe I can create an ODBC connection on windows, then connect to that via DBI somehow, but I can't figure out the connection string. Does anybody know about this? > It's pretty easy. Go to to Control Panel/Administrative Tools/Data Sources (ODBC) and set up a System DSN for your database and call it "mydb" In ruby, then it's merely a matter of require 'odbc' conn = ODBC::connect('mydb','user','password') or conn = ODBC::connect('mydb') if you're using Windows Authentication. From christopher.mcmahon at gmail.com Tue Feb 6 17:42:11 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 6 Feb 2007 14:42:11 -0800 Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? In-Reply-To: <31841647.1170799678298.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <72799cd70702061331i11f543c3m8d2268bffbc809f4@mail.gmail.com> <31841647.1170799678298.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70702061442k32ca2141yef44621690fc154e@mail.gmail.com> On 2/6/07, Nathan wrote: > Is Ruby ODBC installed with Ruby 1.8.5? I haven't been able to figure this out as there don't seem to be any docs for it :( C:>irb irb(main):001:0> require 'odbc' => true irb(main):002:0> the best docs I've found are on that link I showed you, http://www.ch-werner.de/rubyodbc/odbc.html . Spend 30 minutes or so looking it over, you'll probably figure it out. Ask questions for the bits you don't understand. -C From esjewett at gmail.com Tue Feb 6 17:42:42 2007 From: esjewett at gmail.com (Ethan Jewett) Date: Tue, 6 Feb 2007 16:42:42 -0600 Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? In-Reply-To: <36372346.1170798993805.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <56393987.1170798556974.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <36372346.1170798993805.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <68f4a0e80702061442r1fa6cbect55e3c11979e408b5@mail.gmail.com> As mentioned in a thread going on at the same time as this one, ActiveRecord is not Rails. It can be run alone and can be installed as a gem ("gem install activerecord"). I suppose it could be considered a rail, or maybe a tie . . . In any case, it does have an SQLServer adapter. See http://api.rubyonrails.com/classes/ActiveRecord/ConnectionAdapters/SQLServerAdapter.html for available methods and some compatibility caveats. If you are dead-set against running ActiveRecord, it might still be useful to check out how the adapter connects using WIN32OLE and DBI. Ethan On 2/6/07, Nathan wrote: > Right, I've already tried Google with several variations and nothing there is what I'm looking for - I want to connect to MS SQL WITHOUT rails, and this solution as well as every other solution I've come across has been for rails, which requires a rails server to be running. I just want plain ruby - it looks like maybe I can create an ODBC connection on windows, then connect to that via DBI somehow, but I can't figure out the connection string. Does anybody know about this? > > Nathan > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6445&messageID=18257#18257 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Tue Feb 6 17:53:27 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 06 Feb 2007 15:53:27 -0700 Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? In-Reply-To: <68f4a0e80702061442r1fa6cbect55e3c11979e408b5@mail.gmail.com> References: <56393987.1170798556974.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <36372346.1170798993805.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <68f4a0e80702061442r1fa6cbect55e3c11979e408b5@mail.gmail.com> Message-ID: This connects to MSSQL server ( 2000 I think ) using OLE Be warned, ole ( or rubys bindings to it ) leaks like a sieve require 'dbi' DB = "Provider=SQLOLEDB.1;Password=secret;Persist Security Info=True;User ID=admin;Initial Catalog=my_database;Data Source=the_server" sql = " select distinct * from sometable" DBI.connect("DBI:ADO:#{DB}") do | dbh | dbh.select_all( sql ) do |row| puts row[0] # the first field puts row[1] # the second field end end You may need to install the ADO driver separately, but odbc would work in the same way as above, just the lines with DBI:ADO:.... and DB='..' would be different ----- Original Message ----- From: Ethan Jewett Date: Tuesday, February 6, 2007 3:42 pm Subject: Re: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? > As mentioned in a thread going on at the same time as this one, > ActiveRecord is not Rails. It can be run alone and can be installed > as a gem ("gem install activerecord"). I suppose it could be > considered a rail, or maybe a tie . . . > > In any case, it does have an SQLServer adapter. See > http://api.rubyonrails.com/classes/ActiveRecord/ConnectionAdapters/SQLServerAdapter.html > for available methods and some compatibility caveats. > > If you are dead-set against running ActiveRecord, it might still be > useful to check out how the adapter connects using WIN32OLE and DBI. > > Ethan > > On 2/6/07, Nathan wrote: > > Right, I've already tried Google with several variations and > nothing there is what I'm looking for - I want to connect to MS > SQL WITHOUT rails, and this solution as well as every other > solution I've come across has been for rails, which requires a > rails server to be running. I just want plain ruby - it looks > like maybe I can create an ODBC connection on windows, then > connect to that via DBI somehow, but I can't figure out the > connection string. Does anybody know about this? > > > > Nathan > > ----------------------------------------------------------------- > ---- > > Posted via Jive Forums > > > http://forums.openqa.org/thread.jspa?threadID=6445&messageID=18257#18257> _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From christopher.mcmahon at gmail.com Tue Feb 6 18:03:30 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 6 Feb 2007 15:03:30 -0800 Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? In-Reply-To: References: <56393987.1170798556974.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <36372346.1170798993805.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <68f4a0e80702061442r1fa6cbect55e3c11979e408b5@mail.gmail.com> Message-ID: <72799cd70702061503y68a18888i3d6bc569bb77bf44@mail.gmail.com> > You may need to install the ADO driver separately, but odbc would work in the same way as above, just > the lines with > DBI:ADO:.... > and > DB='..' > would be different Unless I'm mistaken, that's not true. There is a DBI::ODBC, and there is also 'odbc'. Two separate libraries. I find little old 'odbc' has less overhead than DBI. -Chris From carl.l.shaulis at convergys.com Wed Feb 7 00:11:31 2007 From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com) Date: Tue, 6 Feb 2007 23:11:31 -0600 Subject: [Wtr-general] File location installing 1.4.1 Gem Message-ID: Good evening: I have been experimenting with installing and uninstalling watir gems. The objective is to find the steps that permit an efficient installation of a watir gem and have all of the unit tests pass without any troubleshooting. I have been executing these unit test suites: all_tests.rb, core_tests.rb, and all_tests_concurrent.rb. Ruby is installed at c:\apps. I then place the watir 1.4.1 gem in c:\apps\ruby. Using a command prompt I navigate to c:\apps\ruby then type gem install watir 1.4.1. I do not know much about how gems are generated or installed, but my observation is that when installing the watir 1.4.1 gem the html files are placed in c:/Program Files/Watir/unittests/html/. None of the test suites pass after the installation. The failure is that JavascriptClick.htm can not be found. I found that if I make a change to setup.rb and add an extra path variable: $htmlRoot = "file://#{$myDir}/html/" $javascriptHtml = "c:/Program Files/Watir/unittests/html/" And edit jscript_test.rb to use the new variable: @@javascript_page = $javascriptHtml + 'JavascriptClick.htm' With these changes both all_tests.rb and core_tests.rb pass without error. Based on some earlier posts to the forum it appears that ruby has some trouble when spaces are in folder names. My first question is why does installing the gem place the html files used by the unit tests in the path c:/Program Files...? How do we change this behavior? Here is where I get more confused. The unit tests all_tests_concurrent.rb fails. The errors seem to occur on the checkbox_test.rb and buttons_test.rb. If I execute button_tests.rb and checkbox_test,rb in isolation those tests works perfectly. Has anyone resolved the issues regarding all_tests_concurrent.rb? The errors are below. Any feedback about how I am installing the watir gem and ways to fix all_tests_concurrent.rb would be most appreciated. Thanks in advance for your thoughts. Carl ************************************************* all_tests_concurrent.rb TC_CheckBox TC_CheckBox TC_Buttons Loaded suite super suite Started EFFEEEFEEEFEEF.. Finished in 4.417 seconds. 1) Error: test_Button_Enabled(TC_Buttons): Watir::Exception::UnknownObjectException: Unable to locate object, using caption and Click Me C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../watir.rb:1928:in `assert_exists' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../watir.rb:2062:in `enabled?' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../unittests/buttons_test.rb:115:in `test_Button_Enabled' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:24:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `initialize' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `new' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `each' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `run' 2) Failure: test_CheckBox_Exists(TC_CheckBox) [C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../unittests/checkbox_test.rb:50:in `test_CheckBox_Exists' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:24:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `initialize' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `new' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `each' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `run']: is not true. 3) Failure: test_Button_Exists(TC_Buttons) [C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../unittests/buttons_test.rb:102:in `test_Button_Exists' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:24:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `initialize' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `new' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `each' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `run']: is not true. 4) Error: test_checkbox_Enabled(TC_CheckBox): Watir::Exception::UnknownObjectException: Unable to locate object, using name and box1 C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../watir.rb:1928:in `assert_exists' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../watir.rb:2062:in `enabled?' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../unittests/checkbox_test.rb:62:in `test_checkbox_Enabled' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:24:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `initialize' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `new' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `each' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `run' 5) Error: test_Button_click_only(TC_Buttons): Watir::Exception::UnknownObjectException: Unable to locate object, using caption and Click Me C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../watir.rb:1928:in `assert_exists' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../watir.rb:2009:in `click' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../unittests/buttons_test.rb:87:in `test_Button_click_only' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:24:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `initialize' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `new' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `each' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `run' 6) Error: test_checkbox_clear(TC_CheckBox): Watir::Exception::UnknownObjectException: Unable to locate object, using name and box1 C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../watir.rb:1928:in `assert_exists' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../watir.rb:3199:in `clear' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../unittests/checkbox_test.rb:82:in `test_checkbox_clear' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:24:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `initialize' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `new' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `each' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `run' 7) Failure: test_button_click(TC_Buttons) [C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../unittests/buttons_test.rb:95:in `test_button_click' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:24:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `initialize' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `new' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `each' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `run']: ObjectDisabledException was supposed to be thrown. exception expected but was Class: Message: <"Unable to locate object, using caption and Disabled Button"> ---Backtrace--- C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../watir.rb:1928:in `assert_exists' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../watir.rb:2009:in `click' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../unittests/buttons_test.rb:95:in `test_button_click' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../unittests/buttons_test.rb:95:in `assert_raise' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../unittests/buttons_test.rb:95:in `test_button_click' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:24:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `initialize' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `new' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `each' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `run' --------------- 8) Error: test_checkbox_getState(TC_CheckBox): Watir::Exception::UnknownObjectException: Unable to locate object, using name and box4 C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../watir.rb:1928:in `assert_exists' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../watir.rb:3123:in `getState' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../unittests/checkbox_test.rb:102:in `test_checkbox_getState' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:24:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `initialize' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `new' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `each' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `run' 9) Error: test_button_using_default(TC_Buttons): Watir::Exception::UnknownObjectException: Unable to locate object, using value and Click Me C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../watir.rb:1928:in `assert_exists' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../watir.rb:2009:in `click' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../unittests/buttons_test.rb:82:in `test_button_using_default' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:24:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `initialize' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `new' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `each' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `run' 10) Error: test_checkbox_isSet(TC_CheckBox): Watir::Exception::UnknownObjectException: Unable to locate object, using name and box1 C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../watir.rb:1928:in `assert_exists' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../watir.rb:3123:in `isSet?' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../unittests/checkbox_test.rb:72:in `test_checkbox_isSet' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:24:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `initialize' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `new' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `each' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `run' 11) Failure: test_checkbox_iterator(TC_CheckBox) [C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../unittests/checkbox_test.rb:134:in `test_checkbox_iterator' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:24:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `initialize' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `new' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `each' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `run']: <11> expected but was <0>. 12) Error: test_frame(TC_Buttons): Watir::Exception::UnknownFrameException: Unable to locate a frame with name buttonFrame C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../watir.rb:1728:in `initialize' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../watir.rb:222:in `new' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../watir.rb:222:in `frame' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../unittests/buttons_test.rb:126:in `test_frame' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:24:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `initialize' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `new' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `each' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `run' 13) Error: test_checkbox_properties(TC_CheckBox): Watir::Exception::UnknownObjectException: Unable to locate object, using index and 1 C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../watir.rb:1928:in `assert_exists' (eval):2:in `name' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../unittests/checkbox_test.rb:21:in `test_checkbox_properties' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:24:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `initialize' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `new' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `each' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `run' 14) Failure: test_properties(TC_Buttons) [C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/../unittests/buttons_test.rb:57:in `test_properties' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:24:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `initialize' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `new' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:23:in `run' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `each' C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 /unittests/all_tests_concurrent.rb:22:in `run']: <"b1"> expected but was <"foo">. 16 tests, 38 assertions, 5 failures, 9 errors Carl L. Shaulis Convergys - Senior Analyst 512-634-0607 -- "NOTICE: The information contained in this electronic mail transmission is intended by Convergys Corporation for the use of the named individual or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone (collect), so that the sender's address records can be corrected." From angrez at gmail.com Wed Feb 7 01:15:25 2007 From: angrez at gmail.com (Angrez Singh) Date: Wed, 7 Feb 2007 11:45:25 +0530 Subject: [Wtr-general] how to populate hidden text area? In-Reply-To: <02bf01c74957$31ea0070$8a2415ac@ds.corp.yahoo.com> 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> <02bf01c74957$31ea0070$8a2415ac@ds.corp.yahoo.com> Message-ID: Hi Suman, > I could reach the textarea successfully but am still getting the same > error - Ok The error you are getting is related to frames ... could you just check it once again? > 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 > Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070207/e2e499fd/attachment.html From angrez at gmail.com Wed Feb 7 01:25:11 2007 From: angrez at gmail.com (Angrez Singh) Date: Wed, 7 Feb 2007 11:55:11 +0530 Subject: [Wtr-general] while not exists does not work in Firewatir? In-Reply-To: <37c405480702060658w7d8caaa8n34da059b20e5a07@mail.gmail.com> References: <49838681.1170660923766.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <37c405480702060658w7d8caaa8n34da059b20e5a07@mail.gmail.com> Message-ID: Hi Steven, I checked it again. :text attribute is supported by link element. You can access link element using :text. Please refer to the unit tests for more details. If it still doesn't work out, you can post the HTML and FireWatir code here. Regards, Angrez On 2/6/07, Paul Carvalho wrote: > > 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 > > > > > _______________________________________________ > 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/20070207/431040d4/attachment.html From forum-watir-users at openqa.org Wed Feb 7 09:35:31 2007 From: forum-watir-users at openqa.org (HarryC) Date: Wed, 07 Feb 2007 08:35:31 CST Subject: [Wtr-general] WIN32OLERuntimeError Message-ID: <35099678.1170858962014.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I need some help here. When I try to do a simple IE.new I keep getting this error message. I am using ruby 1.8.5 with Watir 1.4.1 C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1176:in `initialize': failed to create WIN32OLE object from `InternetExplorer.Application' (WIN32OLERuntimeError) HRESULT error code:0x80070003 The system cannot find the path specified. from C:/ruby/lib/ruby/ge ms/1.8/gems/watir-1.4.1/./watir.rb:1176:in `new' from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1176:in `crea te_browser_window' from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1086:in `init ialize' from C:/Documents and Settings/hchou/Desktop/test.rb:8:in `new' from C:/Documents and Settings/hchou/Desktop/test.rb:8 Press any key to continue . . . --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6466&messageID=18298#18298 From forum-watir-users at openqa.org Wed Feb 7 09:45:55 2007 From: forum-watir-users at openqa.org (HarryC) Date: Wed, 07 Feb 2007 08:45:55 CST Subject: [Wtr-general] WIN32OLERuntimeError In-Reply-To: <35099678.1170858962014.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <48832465.1170859585305.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I found out that if I open a browser window first, the problem will not happen. However it happens when there is no existing browser window. Strange. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6466&messageID=18303#18303 From forum-watir-users at openqa.org Wed Feb 7 09:50:09 2007 From: forum-watir-users at openqa.org (Nathan) Date: Wed, 07 Feb 2007 08:50:09 CST Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? In-Reply-To: <72799cd70702061503y68a18888i3d6bc569bb77bf44@mail.gmail.com> Message-ID: <56137011.1170859839126.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thank you so much. I didn't think of just require "odbc". Now I need to get my db into MSSQL and try it out. I'm not testing the database, but rather using it to store results of tests. It was just a requirement from one of our lead developers who wanted some performance tests for our website with Watir. We already have a MySQL version going, but I didn't see an obvious MSSQL adapter anywhere in Ruby, and not in the docs that are installed with Ruby on Windows. ODBC I know about from developing in Java with JDBC, but whenever they wanted to switch over to Microsoft databases we needed to use ODBC to connect (using Administrative Tools > Data Sources). Hopefully this will answer my question, and hopefully there will not be a lot to change. As far as Active Record goes, I'm not against it as long as I don't need to be running any extra servers (like WeBrick). I'm running my scripts on minimalistic WinXP VM images, and they can't handle a lot, nor should they need to, PLUS our website is very media heavy, which slows things down anyway. So I need a solution that behaves similarly to the MySQL gem. The obvious, an ODBC gem, doesn't seem to exist, but now I know that ODBC is part of Ruby (for Windows at least). Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6445&messageID=18304#18304 From areed at relocationcentral.com Wed Feb 7 10:01:28 2007 From: areed at relocationcentral.com (Adam Reed) Date: Wed, 7 Feb 2007 09:01:28 -0600 Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? References: <63836878.1170796910575.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <36B5DBA88E027F47812ED877C6A978D8034FBA@rc-mail.relocationcentral.com> Nathan, This tutorial helped me when I was trying to connect to our mysql and mssql dbs. http://www.kitebird.com/articles/ruby-dbi.html#TOC_7 Thanks, Adam -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Nathan Sent: Tuesday, February 06, 2007 3:21 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? Just wondering, because I can't find anything that really makes sense, and don't want to use full blown out rails if possible, but I need to connect to MS SQL Server 2005 - does anybody have any thought, ideas, or solutions? Thanks, Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6445&messageID=18245#18245 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From areed at relocationcentral.com Wed Feb 7 10:15:20 2007 From: areed at relocationcentral.com (Adam Reed) Date: Wed, 7 Feb 2007 09:15:20 -0600 Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? References: <63836878.1170796910575.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <36B5DBA88E027F47812ED877C6A978D8034FBA@rc-mail.relocationcentral.com> Message-ID: <36B5DBA88E027F47812ED877C6A978D8034FBB@rc-mail.relocationcentral.com> Well, that was the wrong tutorial, it looks like I didn't bookmark the MS SQL one after all, but if you're looking for MySQL that's a good one :D -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Adam Reed Sent: Wednesday, February 07, 2007 9:01 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? Nathan, This tutorial helped me when I was trying to connect to our mysql and mssql dbs. http://www.kitebird.com/articles/ruby-dbi.html#TOC_7 Thanks, Adam -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Nathan Sent: Tuesday, February 06, 2007 3:21 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? Just wondering, because I can't find anything that really makes sense, and don't want to use full blown out rails if possible, but I need to connect to MS SQL Server 2005 - does anybody have any thought, ideas, or solutions? Thanks, Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6445&messageID=18245#18245 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Wed Feb 7 10:25:44 2007 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 07 Feb 2007 09:25:44 -0600 Subject: [Wtr-general] WIN32OLERuntimeError In-Reply-To: <48832465.1170859585305.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <48832465.1170859585305.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45C9EF78.4040806@pettichord.com> HarryC wrote: > I found out that if I open a browser window first, the problem will not happen. However it happens when there is no existing browser window. > > Strange. It is strange. What OS are you using? Do you have admin rights? Bret From christopher.mcmahon at gmail.com Wed Feb 7 10:47:15 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 7 Feb 2007 07:47:15 -0800 Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? In-Reply-To: <56137011.1170859839126.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <72799cd70702061503y68a18888i3d6bc569bb77bf44@mail.gmail.com> <56137011.1170859839126.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70702070747g66ca0aecg630a06bdd7d6dc57@mail.gmail.com> > ODBC I know about from developing in Java with JDBC, but whenever they wanted to switch over to Microsoft databases we needed to use ODBC to connect (using Administrative Tools > Data Sources). Hopefully this will answer my question, and hopefully there will not be a lot to change. The cool thing about ODBC is that it is a standard. In Windows/MSSQL, you use Administrative Tools > Data Sources to make it possible to use the standard commands. For Windows/Oracle, or whatever, there are ODBC drivers available. On other platforms like Linux/PostgreSQL or Linux/MySQL, there are other ways to implement ODBC. Using a native database driver is more efficient, and using the DBI library is more powerful (I think) but ODBC in my experience is by far the simplest and most portable way to talk to databases. From forum-watir-users at openqa.org Wed Feb 7 11:15:49 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Wed, 07 Feb 2007 10:15:49 CST Subject: [Wtr-general] WIN32OLERuntimeError In-Reply-To: <35099678.1170858962014.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <51342965.1170864979966.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Post your code, I'm willing to bet that you are doing something out of order. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6466&messageID=18316#18316 From bret at pettichord.com Wed Feb 7 12:07:07 2007 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 07 Feb 2007 11:07:07 -0600 Subject: [Wtr-general] File location installing 1.4.1 Gem In-Reply-To: References: Message-ID: <45CA073B.1070103@pettichord.com> carl.l.shaulis at convergys.com wrote: > Ruby is installed at c:\apps. I then place the watir 1.4.1 gem in > c:\apps\ruby. Using a command prompt I navigate to c:\apps\ruby then type > gem install watir 1.4.1. > It doesn't matter what your current directory is when you type the command. What matters is what version of ruby the gem command is using -- that is the one that is used and will be updated with the contents of the new gem. > I do not know much about how gems are generated or installed, but my > observation is that when installing the watir 1.4.1 gem the html files are > placed in c:/Program Files/Watir/unittests/html/. > That is where the one-click installer puts them. Gems should be installed in C:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1 From forum-watir-users at openqa.org Wed Feb 7 11:52:29 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Wed, 07 Feb 2007 10:52:29 CST Subject: [Wtr-general] A Different WIN32OLERuntimeError (Ruby) Message-ID: <42050327.1170868306806.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Ok everyone, if you can find a solution to this annoyance I will be extremely happy. Here is the scenario, when I initially installed Ruby/Watir on my machine it worked great. At some point some configuration was changed/software was installed/etc and now I am encountering this error: Configuration: WinXP Pro, Ruby v1.8.5, Watir 1.4.1 [u]Scenario 1[/u]: Assumption(s): no `iexplore.exe` processes are running If I try to instantiate an InternetExplorer object via Ruby, I get the following error: [b]irb(main):002:0> myIE = WIN32OLE.new( "InternetExplorer.Application" ) WIN32OLERuntimeError: failed to create WIN32OLE object from `InternetExplorer.Application' HRESULT error code:0x80070003 The system cannot find the path specified. from (irb):2:in `initialize' from (irb):2:in `new' from (irb):2[/b] [u]Scenario 2[/u]: Assumption(s): at least one `iexplore.exe` process is running Now I am able to execute the exact same command and it works perfectly. I realize this may be slightly out of the realm of Watir expertise, as it seems to be a general Ruby / WIN32OLE error; however, I encounter this error when running Watir's IE object initialization methods. A few resolutions I have tried already: 1) completely uninstall Ruby & Watir > reinstall 2) tried several different `win32ole.c` files 3) smash keyboard with closed fists and banging mouse against desk None of them seemed to make any difference. Even after a clean install the same error exists. I can get around this by making sure an `iexplore.exe` instance is running before kicking off any of my scripts from my local machine; however, that is undesireable and I am curious regarding the nature of the error. Another note that may be of use is the fact that this error does not happen on any of my coworker's machines. I have configured Ruby/Watir on several other QA staff machines to kick of automation, and it works fine there – regardless of whether an instance of `iexplore.exe` is running or not. I would love a solution that didn't involve reinstalling Windows in any shape. If anyone can shed some light on this mysterious occurance I would really appreciate it. Thanks, Nathan Christie --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6470&messageID=18321#18321 From forum-watir-users at openqa.org Wed Feb 7 12:14:40 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Wed, 07 Feb 2007 11:14:40 CST Subject: [Wtr-general] WIN32OLERuntimeError In-Reply-To: <35099678.1170858962014.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <37722979.1170868510291.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I didn't fully read this thread, this is exactly what is happening to me, I traced the to the Ruby level in my post, "A Different WIN32OLERuntimeError", even though it is exactly the same problem this gentleman is having =| I want to think this may somehow be related to a .NET Framework [automatic?] update that took place at some point. I fear the only solution is a reinstall of Windows. Let's dig deeper! --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6466&messageID=18322#18322 From forum-watir-users at openqa.org Wed Feb 7 12:16:30 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Wed, 07 Feb 2007 11:16:30 CST Subject: [Wtr-general] A Different WIN32OLERuntimeError (Ruby) In-Reply-To: <42050327.1170868306806.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45175343.1170868620830.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> This is the same error as "WIN32OLERuntimeError", but this info is what Watir would send to Ruby. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6470&messageID=18323#18323 From tester.paul at gmail.com Wed Feb 7 13:24:20 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Wed, 7 Feb 2007 13:24:20 -0500 Subject: [Wtr-general] A Different WIN32OLERuntimeError (Ruby) In-Reply-To: <42050327.1170868306806.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <42050327.1170868306806.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <37c405480702071024p73fe0500n99092228f6be2961@mail.gmail.com> Why don't you just use the Watir command to do this? Am I missing something? > myIE = IE.new Nathan Christie wrote: > > [b]irb(main):002:0> myIE = WIN32OLE.new( "InternetExplorer.Application" ) > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070207/9ed05d55/attachment.html From forum-watir-users at openqa.org Wed Feb 7 13:59:09 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Wed, 07 Feb 2007 12:59:09 CST Subject: [Wtr-general] A Different WIN32OLERuntimeError (Ruby) In-Reply-To: <37c405480702071024p73fe0500n99092228f6be2961@mail.gmail.com> Message-ID: <62423413.1170874779176.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> When I use this Watir command you have suggested, it unwraps it and sends essentially the WIN32OLE command to create a new IE instance, so in turn: [ myIE = IE.new() ] == [ myIE = WIN32OLE::new( "InternetExplorer.Application" ) ] So this Watir command: `IE.new()` does this: IE.new() —› IE object constructor: `initialize()` —› `initialize()` calls `create_browser_window()` —› `create_browser_window()` executes this command: `@ie = WIN32OLE.new('InternetExplorer.Application')` Having used Ruby's WIN32OLE library for some years to automate MS apps, I wanted to see what the error would be like if I used that code. The error you get back from Watir is different and IMO not as informative as the one you get from Ruby when executing the initialization code that throws the error. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6470&messageID=18329#18329 From forum-watir-users at openqa.org Wed Feb 7 14:11:14 2007 From: forum-watir-users at openqa.org (Lauren) Date: Wed, 07 Feb 2007 13:11:14 CST Subject: [Wtr-general] Identifying "Last" object using Index: -1 ??? Message-ID: <40834210.1170875515792.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hello Everyone, I am having trouble identifying an object in my web app. After trying several different attempts with ie.button.... I wanted to revert to: ie.button(:index, x).click the problem is that there can be any number of buttons before my button is reached. The button I want to identify is the last button on the page so I thought that I would try the brilliant idea of: ie.button(:index, -1).click However, this is not working either. My button is nested in a table. Any thoughts on how I can access/identify this object using 'index' or something else. Thanks for your help! --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6471&messageID=18330#18330 From bret at pettichord.com Wed Feb 7 14:01:14 2007 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 07 Feb 2007 13:01:14 -0600 Subject: [Wtr-general] A Different WIN32OLERuntimeError (Ruby) In-Reply-To: <42050327.1170868306806.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <42050327.1170868306806.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45CA21FA.9000909@pettichord.com> One workaround would be to use ruby to start an iexplore process first. class IEProcess def self.start startup_info = [68].pack('lx64') process_info = [0, 0, 0, 0].pack('llll') # TODO: make this portable startup_command = 'C:\Program Files\Internet Explorer\IEXPLORE.EXE' result = Win32API.new('kernel32.dll', 'CreateProcess', 'pplllllppp', 'l'). call( nil, startup_command, 0, 0, 1, 0, 0, '.', startup_info, process_info) # TODO print the error code, or better yet a text message raise "Failed to start IEXPLORE." if result == 0 process_id = process_info.unpack('llll')[2] puts "Process ID: #{process_id}" self.new process_id end end From forum-watir-users at openqa.org Wed Feb 7 14:41:54 2007 From: forum-watir-users at openqa.org (Ravi) Date: Wed, 07 Feb 2007 13:41:54 CST Subject: [Wtr-general] Identifying "Last" object using Index: -1 ??? In-Reply-To: <40834210.1170875515792.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <47668881.1170877344878.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Try: ie.button(:index,ie.buttons.length).click -Ravi --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6471&messageID=18331#18331 From tester.paul at gmail.com Wed Feb 7 14:48:22 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Wed, 7 Feb 2007 14:48:22 -0500 Subject: [Wtr-general] A Different WIN32OLERuntimeError (Ruby) In-Reply-To: <62423413.1170874779176.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <37c405480702071024p73fe0500n99092228f6be2961@mail.gmail.com> <62423413.1170874779176.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <37c405480702071148k1057cb9fib84a594945fccd78@mail.gmail.com> Ah. Thanks for the info. I haven't noticed that problem/error before on my system that's running Ruby 184-20 and Watir 1.4.1, so I never really looked closely at what the underlying calls are. As far as I'm concerned, if it works don't look any further. ;-) Good luck. Paul C. On 07/02/07, Nathan Christie wrote: > > When I use this Watir command you have suggested, it unwraps it and sends > essentially the WIN32OLE command to create a new IE instance, so in turn: > > [ myIE = IE.new() ] == [ myIE = WIN32OLE::new( " > InternetExplorer.Application" ) ] > > So this Watir command: `IE.new()` does this: > IE.new() —› IE object constructor: `initialize()` > —› `initialize()` calls `create_browser_window()` —› > `create_browser_window()` executes this command: `@ie = WIN32OLE.new(' > InternetExplorer.Application')` > > Having used Ruby's WIN32OLE library for some years to automate MS apps, I > wanted to see what the error would be like if I used that code. The error > you get back from Watir is different and IMO not as informative as the one > you get from Ruby when executing the initialization code that throws the > error. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070207/a3c59630/attachment.html From charley.baker at gmail.com Wed Feb 7 15:02:17 2007 From: charley.baker at gmail.com (Charley Baker) Date: Wed, 7 Feb 2007 13:02:17 -0700 Subject: [Wtr-general] Identifying "Last" object using Index: -1 ??? In-Reply-To: <40834210.1170875515792.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <40834210.1170875515792.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Does it have an id, name, or some text? Anything that's identifiable? You can certainly find it's index by poking through the dom using ie's dom explorer: http://www.microsoft.com/downloads/details.aspx?FamilyID=E59C3964-672D-4511-BB3E-2D5E1DB91038&displaylang=en -Charley On 2/7/07, Lauren wrote: > > Hello Everyone, > > I am having trouble identifying an object in my web app. After trying > several different attempts with ie.button.... I wanted to revert to: > ie.button(:index, x).click the problem is that there can be any number of > buttons before my button is reached. The button I want to identify is the > last button on the page so I thought that I would try the brilliant idea of: > ie.button(:index, -1).click However, this is not working either. > > My button is nested in a table. Any thoughts on how I can access/identify > this object using 'index' or something else. > > Thanks for your help! > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6471&messageID=18330#18330 > _______________________________________________ > 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/20070207/6354b800/attachment-0001.html From forum-watir-users at openqa.org Wed Feb 7 15:20:42 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Wed, 07 Feb 2007 14:20:42 CST Subject: [Wtr-general] Identifying "Last" object using Index: -1 ??? In-Reply-To: <47668881.1170877344878.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <54299373.1170879672541.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Another option is to locate it within the table. ie.table(:what, ever).button(:index,number) --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6471&messageID=18335#18335 From forum-watir-users at openqa.org Wed Feb 7 15:54:23 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Wed, 07 Feb 2007 14:54:23 CST Subject: [Wtr-general] A Different WIN32OLERuntimeError (Ruby) In-Reply-To: <45CA21FA.9000909@pettichord.com> Message-ID: <47357795.1170881693496.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> That's awesome stuff Bret. I will most likely utilize some form of this workaround to remove the annoyance of having to ensure iexplore.exe is started. Just curious, where is the documentation that [i]you[/i] use for these Win32API functions? Also, if you have some time, could you add a comment for each line with some explanation. Mostly just curious about: [u]startup_info = [68].pack('lx64') process_info = [0, 0, 0, 0].pack('llll')[/u] But I would like to be able to understand the logic, as that code has many new elements I'm not familiar with. Thanks so much! Nathan Christie --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6470&messageID=18337#18337 From forum-watir-users at openqa.org Wed Feb 7 16:00:44 2007 From: forum-watir-users at openqa.org (alan) Date: Wed, 07 Feb 2007 15:00:44 CST Subject: [Wtr-general] renaming sheets in Excel Message-ID: <62105599.1170882100824.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, After searching the forum I have found how to open an Excel spread sheet and write to it, and how to create a new sheet in the exiting file using : excelchart = excel.Sheets.Add() How would I give this sheet a name instead of the default Sheet X name? Preferably I would name the sheet with the current day's date, which I think I have figured out how to get date in the script (I use another script that uses the current date as a user name when creating an account in a web tool I test). Thanks --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6472&messageID=18338#18338 From forum-watir-users at openqa.org Wed Feb 7 16:35:32 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Wed, 07 Feb 2007 15:35:32 CST Subject: [Wtr-general] renaming sheets in Excel In-Reply-To: <62105599.1170882100824.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <34257271.1170884162396.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> One way to do it, once you identify your instance of Excel, say, as "myExcel", you can modify them as such: (note that the numbers correspond to the workbook number, determined by the order it was created / opened and the actual worksheet tab at the bottom, respectively, which Excel considers a collection, one-based) myExcel = WIN32OLE::new( "Excel.Application" ) myExcel.Workbooks.Open( myFilePath + myInputFileName ) myExcel.Workbooks( 1 ).Worksheets( 1 ).name = "Custom Sheet Name" Deleting them like this if you want: @@ExcelOutput.Workbooks( 1 ).Worksheets( 3 ).delete() There is no WIN32API method for simultanesouly creating and naming a new worksheet. Hope this helps, Nathan Christie --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6472&messageID=18339#18339 From forum-watir-users at openqa.org Wed Feb 7 16:43:20 2007 From: forum-watir-users at openqa.org (Nathan) Date: Wed, 07 Feb 2007 15:43:20 CST Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? In-Reply-To: <72799cd70702070747g66ca0aecg630a06bdd7d6dc57@mail.gmail.com> Message-ID: <51287851.1170884630732.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> So I have a connection now! And that was my goal, but it doesn't act the same way as the MySQL gem. For example, I don't see a query method/object anywhere. I guess I'm just going to need to do a little searching. What a pain. Any other quick start tips would be great. Thanks, Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6445&messageID=18340#18340 From forum-watir-users at openqa.org Wed Feb 7 16:46:22 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Wed, 07 Feb 2007 15:46:22 CST Subject: [Wtr-general] renaming sheets in Excel In-Reply-To: <34257271.1170884162396.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <39387316.1170884812566.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Heres a link i found useful when i was going using Excel http://wiki.rubygarden.org/Ruby/page/show/ScriptingExcel --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6472&messageID=18341#18341 From tester.paul at gmail.com Wed Feb 7 16:48:14 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Wed, 7 Feb 2007 16:48:14 -0500 Subject: [Wtr-general] renaming sheets in Excel In-Reply-To: <62105599.1170882100824.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <62105599.1170882100824.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <37c405480702071348x5157af55j8fb790d994fb2154@mail.gmail.com> Hi Alan, I'm interested in the answer to your question but I don't know what it is. I suggest reading through this message in the archive: http://rubyforge.org/pipermail/wtr-general/2006-September/007592.html Let us know what you find out. Cheers. Paul C. On 07/02/07, alan wrote: > > Hi, > After searching the forum I have found how to open an Excel spread sheet > and write to it, and how to create a new sheet in the exiting file using : > excelchart = excel.Sheets.Add() > > How would I give this sheet a name instead of the default Sheet X name? > Preferably I would name the sheet with the current day's date, which I > think I have figured out how to get date in the script (I use another script > that uses the current date as a user name when creating an account in a web > tool I test). > > Thanks > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070207/e9b4baa2/attachment.html From forum-watir-users at openqa.org Wed Feb 7 16:49:10 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Wed, 07 Feb 2007 15:49:10 CST Subject: [Wtr-general] renaming sheets in Excel In-Reply-To: <39387316.1170884812566.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <55502260.1170884980257.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Yes! This was one of the first resources for scripting Excel via Ruby and has served me well. I highly second this recommendation for anyone doing anything of the sort. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6472&messageID=18342#18342 From christopher.mcmahon at gmail.com Wed Feb 7 16:51:40 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 7 Feb 2007 13:51:40 -0800 Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? In-Reply-To: <51287851.1170884630732.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <72799cd70702070747g66ca0aecg630a06bdd7d6dc57@mail.gmail.com> <51287851.1170884630732.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70702071351g2fe72aa6k9a71af705554f29d@mail.gmail.com> On 2/7/07, Nathan wrote: > So I have a connection now! And that was my goal, but it doesn't act the same way as the MySQL gem. For example, I don't see a query method/object anywhere. I guess I'm just going to need to do a little searching. What a pain. data = connection.run("SELECT name, giblets FROM members M, balance B WHERE M.active = 'N' AND M.id = B.member_id") records = data.fetch_all Read the docs: http://www.ch-werner.de/rubyodbc/odbc.html Seriously. :) -C From forum-watir-users at openqa.org Wed Feb 7 16:57:40 2007 From: forum-watir-users at openqa.org (Nathan) Date: Wed, 07 Feb 2007 15:57:40 CST Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? In-Reply-To: <51287851.1170884630732.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <52154397.1170885490273.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> So here's what I've done - first created an ODBC data source connection in my Adminstrative Tools. Now I'm in irb, and I connected like conn = ODBC.connect("qastats","uname","pass") Then I did h = conn.prepare("SELECT * FROM table_name") And now h doesn't seem to have anything in it, but my table does contain info. This is MS SQL, any idea what's wrong? Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6445&messageID=18343#18343 From Mark_Cain at RL.gov Wed Feb 7 17:13:45 2007 From: Mark_Cain at RL.gov (Cain, Mark) Date: Wed, 7 Feb 2007 14:13:45 -0800 Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? In-Reply-To: <72799cd70702071351g2fe72aa6k9a71af705554f29d@mail.gmail.com> References: <72799cd70702070747g66ca0aecg630a06bdd7d6dc57@mail.gmail.com><51287851.1170884630732.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <72799cd70702071351g2fe72aa6k9a71af705554f29d@mail.gmail.com> Message-ID: <4440693B7CFF2440ABC2E0BE480DABA10A36EA@EX01-2.rl.gov> For those of us that have been following this thread... Please share the code that you got to work. I (and I am sure others do as well) collect code piece/scripts and tuck them away for possible use at a later time. Many of the solutions I have today have been gathered piecemeal over months of hearing how others solved similar issues. It is one of the great strengths of this forum! Thanks in advance, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: Wednesday, February 07, 2007 1:52 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? On 2/7/07, Nathan wrote: > So I have a connection now! And that was my goal, but it doesn't act the same way as the MySQL gem. For example, I don't see a query method/object anywhere. I guess I'm just going to need to do a little searching. What a pain. data = connection.run("SELECT name, giblets FROM members M, balance B WHERE M.active = 'N' AND M.id = B.member_id") records = data.fetch_all Read the docs: http://www.ch-werner.de/rubyodbc/odbc.html Seriously. :) -C _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From christopher.mcmahon at gmail.com Wed Feb 7 17:24:07 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 7 Feb 2007 14:24:07 -0800 Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? In-Reply-To: <4440693B7CFF2440ABC2E0BE480DABA10A36EA@EX01-2.rl.gov> References: <72799cd70702070747g66ca0aecg630a06bdd7d6dc57@mail.gmail.com> <51287851.1170884630732.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <72799cd70702071351g2fe72aa6k9a71af705554f29d@mail.gmail.com> <4440693B7CFF2440ABC2E0BE480DABA10A36EA@EX01-2.rl.gov> Message-ID: <72799cd70702071424x77d6f8f9kf7036dd1d94335d3@mail.gmail.com> > Please share the code that you got to work. I (and I am sure others do > as well) collect code piece/scripts and tuck them away for possible use > at a later time. As Carl mentioned, I have an article in the current Better Software magazine about mucking around in databases using Ruby ODBC. Back issues are US $15.00, subscriptions are $75.00. Or if you're really persuasive, I could send a PDF. But if you're interested, I'd prefer that you do business with the Better Software people, because they do good work. http://www.stickyminds.com/BetterSoftware/magazine.asp From christopher.mcmahon at gmail.com Wed Feb 7 17:26:15 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 7 Feb 2007 14:26:15 -0800 Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? In-Reply-To: <52154397.1170885490273.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <51287851.1170884630732.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <52154397.1170885490273.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70702071426l5f802d4bk8be06251c86e3762@mail.gmail.com> On 2/7/07, Nathan wrote: > So here's what I've done - first created an ODBC data source connection in my Adminstrative Tools. Now I'm in irb, and I connected like conn = ODBC.connect("qastats","uname","pass") > > Then I did h = conn.prepare("SELECT * FROM table_name") > > And now h doesn't seem to have anything in it, but my table does contain info. > > This is MS SQL, any idea what's wrong? h = conn.run("SELECT * FROM table_name") rows = h.fetch_all rows.each do |row| puts row end From forum-watir-users at openqa.org Wed Feb 7 18:26:23 2007 From: forum-watir-users at openqa.org (Lauren) Date: Wed, 07 Feb 2007 17:26:23 CST Subject: [Wtr-general] Identifying "Last" object using Index: -1 ??? In-Reply-To: <54299373.1170879672541.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <40761445.1170890906401.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thank you so much for all who have responded to my post. However, I still haven't been able to identify my object. I have downloaded the Developer Toolbar for ie (love it!) and can see the various attributes. My button is nested deep within a table. I can identify the table using both ":class" and ":index", but when I add .button(:what, ever).click I get the follow error: undefined method `button' for # (NoMethodError) I have tried different versions such as: ie.table(:class, 'primaryLarge').button(:name, "SCbutton").click ie.table(:index, 10). button(:name, "SCbutton").click Any more thoughts to help me out? I have been stuck here trying to identify this object for a really long time now! :/ Thanks again to all who posted! --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6471&messageID=18349#18349 From bret at pettichord.com Wed Feb 7 19:11:22 2007 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 07 Feb 2007 18:11:22 -0600 Subject: [Wtr-general] A Different WIN32OLERuntimeError (Ruby) In-Reply-To: <47357795.1170881693496.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <47357795.1170881693496.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45CA6AAA.1020703@pettichord.com> Nathan Christie wrote: > Also, if you have some time, could you add a comment for each line with some explanation. Mostly just curious about: > [u]startup_info = [68].pack('lx64') > process_info = [0, 0, 0, 0].pack('llll')[/u] > But I would like to be able to understand the logic, as that code has many new elements I'm not familiar with. > If i only i could. The problem is that i myself snarfed the code from Alexey Verkhovsky, so he's the one to ask. Or you could check out the pickaxe book... Bret From bret at pettichord.com Wed Feb 7 19:12:41 2007 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 07 Feb 2007 18:12:41 -0600 Subject: [Wtr-general] WIN32OLERuntimeError In-Reply-To: <37722979.1170868510291.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <37722979.1170868510291.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45CA6AF9.8070904@pettichord.com> Nathan Christie wrote: > I want to think this may somehow be related to a .NET Framework [automatic?] update that took place at some point. I fear the only solution is a reinstall of Windows. > I suspect that the change could be related to MS security update of some kind. Bret From christopher.mcmahon at gmail.com Wed Feb 7 19:17:36 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 7 Feb 2007 16:17:36 -0800 Subject: [Wtr-general] A Different WIN32OLERuntimeError (Ruby) In-Reply-To: <45CA6AAA.1020703@pettichord.com> References: <47357795.1170881693496.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <45CA6AAA.1020703@pettichord.com> Message-ID: <72799cd70702071617s8329a40x1e4d75ab2beb41c5@mail.gmail.com> > If i only i could. The problem is that i myself snarfed the code from > Alexey Verkhovsky, so he's the one to ask. > > Or you could check out the pickaxe book... I don't think it's in the Pickaxe. That's some deep Win32 API magic. -C From forum-watir-users at openqa.org Wed Feb 7 19:17:05 2007 From: forum-watir-users at openqa.org (alan) Date: Wed, 07 Feb 2007 18:17:05 CST Subject: [Wtr-general] renaming sheets in Excel In-Reply-To: <39387316.1170884812566.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <46751702.1170893855587.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> The rubygarden page is what got me started on the whole excel thing :) --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6472&messageID=18351#18351 From bret at pettichord.com Wed Feb 7 19:18:05 2007 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 07 Feb 2007 18:18:05 -0600 Subject: [Wtr-general] File location installing 1.4.1 Gem In-Reply-To: References: Message-ID: <45CA6C3D.3030306@pettichord.com> carl.l.shaulis at convergys.com wrote: > Here is where I get more confused. The unit tests all_tests_concurrent.rb > fails. The errors seem to occur on the checkbox_test.rb and > buttons_test.rb. If I execute button_tests.rb and checkbox_test,rb in > isolation those tests works perfectly. Has anyone resolved the issues > regarding all_tests_concurrent.rb? The errors are below. > These comments are included in all_tests_concurrent.rb: # This is an UNFINISHED attempt to run the unit tests currently. # The work on the harness is complete. # The problem remaining is that the tests are not thread-safe. # It's an open question whether getting this to work would actually save any execution time. From forum-watir-users at openqa.org Wed Feb 7 19:34:57 2007 From: forum-watir-users at openqa.org (alan) Date: Wed, 07 Feb 2007 18:34:57 CST Subject: [Wtr-general] renaming sheets in Excel In-Reply-To: <62105599.1170882100824.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <49684524.1170894927590.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Well they just changed the requirement on what they want me to output to Excel, so I'm shelving this for awhile, but I'll still watch the replies. i couldn't get nchristie's example to work but that could be more me than anything. But it looks promising so thank you. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6472&messageID=18353#18353 From forum-watir-users at openqa.org Wed Feb 7 19:54:59 2007 From: forum-watir-users at openqa.org (HarryC) Date: Wed, 07 Feb 2007 18:54:59 CST Subject: [Wtr-general] WIN32OLERuntimeError In-Reply-To: <51342965.1170864979966.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <58712734.1170896129292.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> This is my code. However, this strange error happens even for the simplest scenario. ------------------------------------ require 'rubygems' require 'watir' require 'test/unit' include Watir class TC_NTMS_LOGIN < Test::Unit::TestCase def setup() @ie = Watir::IE.start("localhost/NTMS/index.aspx") if (@ie.contains_text(/Welcome! You are currently signed in as/)) @ie.link(:id, 'ctl00_MainContent_lbtnLogOut').click end end def teardown() @ie.close end def test_thud1_login() @ie.text_field(:id, 'ctl00_MainContent_txtUserName').set('thud1') @ie.text_field(:id, 'ctl00_MainContent_txtPassword').set('PASSWORD') @ie.button(:id, 'ctl00_MainContent_btnLogin').click assert(@ie.contains_text('Report Page')) end def test_thud2_login() @ie.text_field(:id, 'ctl00_MainContent_txtUserName').set('thud2') @ie.text_field(:id, 'ctl00_MainContent_txtPassword').set('PASSWORD') @ie.button(:id, 'ctl00_MainContent_btnLogin').click assert(@ie.title =~ /NTMS - Welcome/, 'thud2 should be redirected to Welcome page') end def test_thud1_login_and_logout() @ie.text_field(:id, 'ctl00_MainContent_txtUserName').set('thud1') @ie.text_field(:id, 'ctl00_MainContent_txtPassword').set('PASSWORD') @ie.button(:id, 'ctl00_MainContent_btnLogin').click @ie.link(:id, 'ctl00_hplHome').click assert(@ie.contains_text(/Welcome! You are currently signed in as thud1/), 'should contains welcome info') @ie.link(:id, 'ctl00_MainContent_lbtnLogOut').click assert(!@ie.contains_text(/Welcome! You are currently signed in as thud1/), 'should not contains welcome info') end def test_links() @ie.link(:id, 'ctl00_hplHome').click assert(@ie.title =~ /NTMS - Welcome to/, 'title should be NTMS - Welcome ...') @ie.link(:url, 'http://localhost/NTMS/register/forgot.aspx').click assert(@ie.title =~ /Request Account Information/, 'title should be NTMS - Request Account Information ...') @ie.link(:id, 'ctl00_hplHome').click @ie.link(:url, 'http://localhost/NTMS/register/index.aspx').click assert(@ie.title =~ /Register/, 'title should be NTMS - Register ...') end def test_quick_search() @ie.text_field(:id, 'ctl00_MainContent_txtTickNumber').set('4') @ie.select_list(:id, 'ctl00_MainContent_ddlStatesQuick').select('DE') @ie.button(:id, 'ctl00_MainContent_btnQuickSearch').click assert(@ie.title =~ /Search/, 'title should be NTMS - Search ...') end end --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6466&messageID=18357#18357 From forum-watir-users at openqa.org Wed Feb 7 19:59:34 2007 From: forum-watir-users at openqa.org (HarryC) Date: Wed, 07 Feb 2007 18:59:34 CST Subject: [Wtr-general] WIN32OLERuntimeError In-Reply-To: <45CA6AF9.8070904@pettichord.com> Message-ID: <46252705.1170896404861.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Yes, I update my Windows quite often. I do a lot of .NET works, so my machine is full of .NET framework stuff. I have full admin right. Anyway, if anyone has the same problem, just manually open a browser window first (or have a batch file open the browser). --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6466&messageID=18358#18358 From forum-watir-users at openqa.org Wed Feb 7 20:01:50 2007 From: forum-watir-users at openqa.org (barry) Date: Wed, 07 Feb 2007 19:01:50 CST Subject: [Wtr-general] jscript_test.rb doesn't work in my machine. Message-ID: <57690136.1170896540710.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Jscript_test.rb doesn't work in my machine. Watir is not able to click on the OK button to dismiss the first javascript alert/popup. Any clue? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6473&messageID=18359#18359 From watir at magnobeam.com Wed Feb 7 20:04:53 2007 From: watir at magnobeam.com (Chris Harris) Date: Wed, 7 Feb 2007 17:04:53 -0800 Subject: [Wtr-general] concurrent tests with cookie / session handling? Message-ID: <021201c74b1d$24fc5580$7700000a@infopop> I am a newbie to this, so bear with me here... I have a test that I need to run concurrently with each browser using a different cookie from the test site. Is this possible with Watir? If so, any tips on how to handle the cookie aspect of things? Thanks Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070207/eb4cffd2/attachment.html From forum-watir-users at openqa.org Wed Feb 7 20:41:26 2007 From: forum-watir-users at openqa.org (Bernard Kenik) Date: Wed, 07 Feb 2007 19:41:26 CST Subject: [Wtr-general] A Different WIN32OLERuntimeError (Ruby) In-Reply-To: <72799cd70702071617s8329a40x1e4d75ab2beb41c5@mail.gmail.com> Message-ID: <35495544.1170899179445.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I know that I am a newcomer to this thread...so please excuse the buttin. I do not seem to have any problem starting Internet Explorer using ruby. >> require 'win32ole' => true >> ie = WIN32OLE.new("InternetExplorer.Application") => #(WIN32OLE:0x312facc) >> ie.visbible = TRUE => true an empty IE window shows up when I click on the Windows Internet tab at the bottom of my screen. This occurs wether or not there is another instance of IE running. I am using ruby 1.8.5 (2006--12-25 patchlevel 12) [i386-mswin32] --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6470&messageID=18360#18360 From carl.l.shaulis at convergys.com Thu Feb 8 00:01:20 2007 From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com) Date: Wed, 7 Feb 2007 23:01:20 -0600 Subject: [Wtr-general] Identifying "Last" object using Index: -1 ??? In-Reply-To: <40761445.1170890906401.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Howdy, I am not sure this will help. Here is an example of how we have been able to locate data in table cells. Create a file called MSNTest.rb with this code: # CLS February 7,2007 Example for finding table data #includes: require 'watir' # the watir controller require "rexml/document" require "date" require '/apps/ruby/lib/ruby/1.8/test/unit' require '/apps/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner' require 'watir/testUnitAddons' require 'watir/WindowHelper' require '/Apps/watir_bonus/examples/Stuff.rb' include REXML include Watir include Stuff puts "## Begin Test - MSN Table Test" class MSN_Test < Test::Unit::TestCase include Watir def setup @ie = IE.new @ie.goto("http://www.msn.com") end def test1 assert(@ie.link(:text, "Sports").exists?) # @ie.show_all_objects @ie.show_tables Table.new(@ie.table(:index, 1)).printPretty end end # # # END - MSN test In the same directory create a file called Stuff.rb with this code: # This module uses REXML to parse the XML. # REXML is available at http://www.germane-software.com/software/rexml/ require "rexml/document" require "date" include REXML # There is no need for the test to require or include REXML. module Stuff # The Table class provides convenience methods for accessing data in # WATIR tables class Table #The constructor for Table takes a WATIR table and # assigns it to the instance variable @table def initialize(table) @table = table end #Takes a string and two integers. Returns the contents of # the table cell at the index of the second integer for the # row where the string is in the cell at the index of the # first integer. # Example: myTable.assoc("findMe",2,4) finds the row of # the table where the text "findMe" is in the second column, # and returns the contents of the 4th column def assoc(text,rowFinder,targetCell) @table.each { |row| if row[rowFinder].to_s.include? text return row[targetCell].to_s end } return nil end def printPretty() rows = 0 @table.each { |row| rows += 1 puts "row " + rows.to_s + ":" print "\t" cells = 0 row.each { |cell| cells += 1 print "cell " + cells.to_s + ": [" + cell.to_s + "]\t" } print "\n" } puts "-----------------------------------------------------------------------------------------" end end end Execute the MSNTest..rb script to see the results of the content of the table on the MSN home page. This site happens to only have one table, but if there were multiple tables just use the index value of the table your target data resides (Table.new(@ie.table(:index, ??)).printPretty). Good luck, Carl http://forums.openqa.org/thread.jspa?threadID=6471&messageID=18349#18349 From forum-watir-users at openqa.org Thu Feb 8 03:40:49 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Thu, 08 Feb 2007 02:40:49 CST Subject: [Wtr-general] url for link In-Reply-To: <45BFE025.2050506@pettichord.com> Message-ID: <52381917.1170924079702.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> HI , Thank You it worked for that link. But I am having the links of the same kind with same contract_id=227. add a term add a term add a term So for this kind of links what should be done? I am having nearly 15 links of the same text with same type of ajax urls. Please help me for such kinds. Thanks in Advance, Harish --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6325&messageID=18373#18373 From forum-watir-users at openqa.org Thu Feb 8 03:51:45 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Thu, 08 Feb 2007 02:51:45 CST Subject: [Wtr-general] Watir with Ajax In-Reply-To: <042b01c746e0$a0d4fcc0$6400a8c0@laptop> Message-ID: <32582911.1170924735846.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi all, Thanks a lot, It worked for me, I just gave "sleep(2)" so that watir wait for some time and i am able to work with that. Thanks a lot, Harish --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6378&messageID=18374#18374 From zeljko.filipin at gmail.com Thu Feb 8 06:18:31 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Thu, 8 Feb 2007 12:18:31 +0100 Subject: [Wtr-general] how ie.div(:name => 'foo', :index => 2).click works? Message-ID: How this works? ie.div(:name => 'foo', :index => 2).click I tried to find in Watir source how it is done, but I could not find it. Could somebody please point me to the right method? It would make sense to me if the argument was a hash. ie.div({:name => 'foo', :index => 2}).click I would like to use that concept in my tests. I have several other ideas now, but this just looks good. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070208/f5dcdb5f/attachment.html From zeljko.filipin at gmail.com Thu Feb 8 07:22:40 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Thu, 8 Feb 2007 13:22:40 +0100 Subject: [Wtr-general] url for link In-Reply-To: <52381917.1170924079702.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <45BFE025.2050506@pettichord.com> <52381917.1170924079702.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: ie.link(:html, /133/).click or ie.link(:html, /ajax_add_term\/133/).click -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070208/0b457559/attachment.html From forum-watir-users at openqa.org Thu Feb 8 08:26:05 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Thu, 08 Feb 2007 07:26:05 CST Subject: [Wtr-general] url for link In-Reply-To: Message-ID: <38384401.1170941195130.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, I tried the two types but its giving error. data_entry.eb.rb:16: syntax error, unexpected tINTEGER, expecting ')' ie.link(:html,/ajax_add_term/131/).click So any other ideas, i tried all the combinations. but its getting error. Please help me. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6325&messageID=18387#18387 From forum-watir-users at openqa.org Thu Feb 8 08:52:05 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Thu, 08 Feb 2007 07:52:05 CST Subject: [Wtr-general] url for link In-Reply-To: <38384401.1170941195130.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <42759152.1170942755978.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> you missed typed it, type it exactly ie.link(:html, /ajax_add_term\/133/).click I think the \ / is allowing the forward slash to be used as a string and not as a special regex character. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6325&messageID=18390#18390 From zeljko.filipin at gmail.com Thu Feb 8 09:08:08 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Thu, 8 Feb 2007 15:08:08 +0100 Subject: [Wtr-general] url for link In-Reply-To: <38384401.1170941195130.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <38384401.1170941195130.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: This does not work? ie.link(:html, /133/).click -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070208/566c444c/attachment.html From zeljko.filipin at gmail.com Thu Feb 8 09:08:57 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Thu, 8 Feb 2007 15:08:57 +0100 Subject: [Wtr-general] url for link In-Reply-To: <42759152.1170942755978.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <38384401.1170941195130.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <42759152.1170942755978.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: On 2/8/07, John Lolis wrote: > > you missed typed it, type it exactly > ie.link(:html, /ajax_add_term\/133/).click > I think the \ / is allowing the forward slash to be used as a string and > not as a special regex character. > Exactly. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070208/c47a6c51/attachment.html From forum-watir-users at openqa.org Thu Feb 8 10:32:59 2007 From: forum-watir-users at openqa.org (Nathan) Date: Thu, 08 Feb 2007 09:32:59 CST Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? In-Reply-To: <72799cd70702071426l5f802d4bk8be06251c86e3762@mail.gmail.com> Message-ID: <58302251.1170948809593.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thanks, but that doesn't seem to work - the fetch_all method is not one of my choices, when I follow your first steps. I've successfully crashed ruby a couple of times already - so here's the ultimate problem. I desire to use my database to store actual files. These files are just text, but dbms's don't really care, as long as you have the correct data type for the column. I've successfully accomplished storing and retrieving these files from a MySQL database, but now when I try to do this with ODBC in Ruby for MS SQL Server 2005, I crash Ruby due to garbage collection problems. What the crap am I doing wrong? I've already given the code. Some of my files are 35 kb or more. So MS SQL doesn't seem to stand up against MySQL. What was the other thing that was mentioned? DBI, DBD? Anyway, this is really crappy, but expected that the proprietary system is unstable!!! %Linux eats Windows for BREAKFAST% --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6445&messageID=18397#18397 From forum-watir-users at openqa.org Thu Feb 8 10:54:01 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Thu, 08 Feb 2007 09:54:01 CST Subject: [Wtr-general] how ie.div(:name => 'foo', :index => 2).click works? In-Reply-To: Message-ID: <50412276.1170950071669.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Zeljko, I'm not sure if this is what you are looking for, but here is the source for `click()` method in Watir: # This method clicks the active element. # raises: UnknownObjectException if the object is not found # ObjectDisabledException if the object is currently disabled def click assert_exists assert_enabled highLight(:set) @o.click() @ieController.wait() highLight(:clear) end I believe the `@o.click()` just uses win32ole to fire a `click` event on the object calling the method. So, `ie.div(:name => 'foo', :index => 2)`, once recognized/identified/stored in memory (as `@o`) then responds to a `click` event. Hope this helps, Nathan Christie --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6479&messageID=18400#18400 From forum-watir-users at openqa.org Thu Feb 8 10:58:26 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Thu, 08 Feb 2007 09:58:26 CST Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? In-Reply-To: <58302251.1170948809593.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <41683221.1170950336439.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> heres my question to you. You want SQL to store your results, but you are having some issues with using MSSQL. This tells me in the future you will continue to have issues. Why not think around the problem? Export into a format that can be imported into MSSQL (there are a ton of formats and it works great). Doing this would allow you to focus on your test, export into a simple format then blast it into MSSQL or any other DB. You are no longer tied to the problem. The developer is now allowed to 'stick' those results where ever he wants ;) --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6445&messageID=18402#18402 From forum-watir-users at openqa.org Thu Feb 8 10:59:59 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Thu, 08 Feb 2007 09:59:59 CST Subject: [Wtr-general] A Different WIN32OLERuntimeError (Ruby) In-Reply-To: <35495544.1170899179445.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <41448956.1170950429057.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> bbiker, Butting in is encouraged! So, basically, this command USED to work correctly for me in the past. Then something happened to my machine's configuration or something along those lines that made this stop working as it previously had. Now the only way this command works is if an instance of IE is running previously to execution. Welcome! --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6470&messageID=18403#18403 From forum-watir-users at openqa.org Thu Feb 8 11:01:12 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Thu, 08 Feb 2007 10:01:12 CST Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? In-Reply-To: <41683221.1170950336439.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <52908838.1170950502563.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> to add to that, you could do something like writing out to a text file thats just a bunch of insert statements... FUN! hrm, so many ideas now. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6445&messageID=18404#18404 From forum-watir-users at openqa.org Thu Feb 8 11:11:30 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Thu, 08 Feb 2007 10:11:30 CST Subject: [Wtr-general] renaming sheets in Excel In-Reply-To: <49684524.1170894927590.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <56774490.1170951120617.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Shok, I'm sorry my example wouldn't work for you directly; I copied / pasted it out of some of my code, which does work, so I'm unsure why. Even though you are shelving it for a while, here is some more complete code of how my Excel test automation output works: (This automation actually doesn't perform any tests, but is generates test data through the UI). This reads data from an Input spreadsheet and creates a new Output spreadsheet. The Output section may be useful for you someday. Let me know if you have any questions: class ProprietaryApp @@ExcelInput = nil # Excel input spreadsheet @@ExcelObjectData = nil # how to map/ID web page objects @@ExcelAutoData = nil # test claims generation parameters @@ExcelOutput = nil # Excel output spreadsheet @@ExcelConfigData = nil # general auomation configuration settings @@ThisFilePath = File.expand_path( File.dirname( __FILE__ ) ) + "/" @@InputFileName = "InputData.xls" @@OutputFileName = "OutputData.xls" attr_accessor :ie attr_accessor :url attr_accessor :currentInputLine def initialize( url = nil ) if @@ExcelInput == nil IntelliSet.initInput() end if @@ExcelOutput == nil IntelliSet.initOutput() end @currentInputLine = 5 init_browser( url ) end def ProprietaryApp.initInput() @@ExcelInput = WIN32OLE::new( "Excel.Application" ) @@ExcelInput.visible = true @@ExcelInput.Workbooks.Open( @@ThisFilePath + @@InputFileName ) @@ExcelAutoData = @@ExcelInput.Workbooks( 1 ).Worksheets( 1 ) @@ExcelObjectData = @@ExcelInput.Workbooks( 1 ).Worksheets( 2 ) @@ExcelConfigData = @@ExcelInput.Workbooks( 1 ).Worksheets( 3 ) end def ProprietaryApp.initOutput() @@ExcelOutput = WIN32OLE::new( "Excel.Application" ) @@ExcelOutput.visible = true @@ExcelOutput.Workbooks.Add() @@ExcelOutput.Workbooks( 1 ).Worksheets( 1 ).name = "ProprietaryApp Output" @@ExcelOutput.Workbooks( 1 ).Worksheets( 3 ).delete() @@ExcelOutput.Workbooks( 1 ).Worksheets( 2 ).delete() @@ExcelOutput.Application.DisplayAlerts = false @@ExcelOutput.Range( "A1" ).value = "ProprietaryApp Automation Results" @@ExcelOutput.Range( "A1" ).Font.Name = "Arial Black" @@ExcelOutput.Range( "F2" ).value = "Claimed Equipment" @@ExcelOutput.Range( "A3:N3" ).Interior.ColorIndex = 1 @@ExcelOutput.Range( "A3:N3" ).Font.ColorIndex = 2 @@ExcelOutput.Range( "A3:N3" ).Font.Bold = true @@ExcelOutput.Range( "A3:N3" ).value = [ "Profile","Client","SecretCol1","SecretCol2","SecretCol3","Make","Model","SecretCol4","SecretCol5","SecretCol6","MOP","Deductible Amount","Additional Fees","Execution Time" ] # A B C D E F G H I J K L M N $emptyRow = 4 end --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6472&messageID=18406#18406 From zeljko.filipin at gmail.com Thu Feb 8 11:13:50 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Thu, 8 Feb 2007 17:13:50 +0100 Subject: [Wtr-general] how ie.div(:name => 'foo', :index => 2).click works? In-Reply-To: <50412276.1170950071669.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <50412276.1170950071669.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Hi Nathan, Thanks, but now I see I was not clear enough. I did not want how click method works (but, once more, thanks for your time). I wanted to know how are this method arguments handled: (:name => 'foo', :index => 2) It would make sense to me if it is a hash ({:name => 'foo', :index => 2}) If I send ({:name => 'foo', :index => 2}) to a method called div I could use it like this div({:name => 'foo', :index => 2}) def div(properties) puts properties[:name] puts properties[:index] end I tried and tried, but could not use these arguments (:name => 'foo', :index => 2) when I send it to a method. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070208/ad81ce65/attachment.html From christopher.mcmahon at gmail.com Thu Feb 8 11:20:00 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 8 Feb 2007 08:20:00 -0800 Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? In-Reply-To: <58302251.1170948809593.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <72799cd70702071426l5f802d4bk8be06251c86e3762@mail.gmail.com> <58302251.1170948809593.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70702080820q4fdd54f8k716ed314a73d8fce@mail.gmail.com> On 2/8/07, Nathan wrote: > Thanks, but that doesn't seem to work - the fetch_all method is not one of my choices, when I follow your first steps. I've successfully crashed ruby a couple of times already - so here's the ultimate problem. I desire to use my database to store actual files. That is an entirely different kettle of fish. I know that some db's allow it, but I am pretty sure that the storage of actual files is no part of the SQL standard. What happens if you do the code below? And what is the error message that you're getting? If you document your problem exactly, this would be an excellent question for the comp.lang.ruby list. h = conn.run("SELECT * FROM table_name") rows.each do |row| puts row end From forum-watir-users at openqa.org Thu Feb 8 11:32:24 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Thu, 08 Feb 2007 10:32:24 CST Subject: [Wtr-general] How do I connect to MS SQL 2005 using Ruby? In-Reply-To: <63836878.1170796910575.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <59357876.1170952374437.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I know it's been beat to death, but after setting up your named ODBC item correctly, here is some n00b DBI code I wrote for easy query/outputting: # Nathan Christie require 'dbi' db = DBI.connect( 'DBI:ODBC:MS_SQL_QA2' ) q = db.prepare( 'select top 100 * from inventory' ) q.execute() a = Array.new() while q.fetchable? do a << q.fetch() end q.column_names.each do |i| print( i + "\t" ) end print( "\n\n" ) i = 0 while i < a.length()-1 do j = 0 while j < a[ i ].length() do print( a[ i ][ j ].to_s() + "\t" ) j += 1 end print( "\n" ) i += 1 end q.finish() I never really did fully get Ruby's looping stuff :| Hope this helps, Nathan Christie --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6445&messageID=18410#18410 From charley.baker at gmail.com Thu Feb 8 11:43:20 2007 From: charley.baker at gmail.com (Charley Baker) Date: Thu, 8 Feb 2007 09:43:20 -0700 Subject: [Wtr-general] A Different WIN32OLERuntimeError (Ruby) In-Reply-To: <41448956.1170950429057.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <35495544.1170899179445.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <41448956.1170950429057.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Nathan, You can find documentation about Windows api calls on the msdn site, here's a link to CreateProcess, called in Bret's code: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/createprocess.asp If you take a look at that call you'll see that there are a bunch of parameters to the method, the first one is a structure: STARTUPINFO. This line sets up that structure: startup_info = [68].pack('lx64') startup_info in this case is a packed array(packed as a binary sequence to send to the windows dll method) with 68, converted a long - the l in the argument to pack, which if you follow the link to the startupinfo struct in the windows api doc indicates the size of the structure. x64 then says add 64 Null bytes. 64, plus an assumed 4 bytes(32bits) for the long in this case. process_info = [0, 0, 0, 0].pack('llll') Same thing here, set up a process_info structure needed by the call to CreateProcess, pack 4 longs, all zero as a binary sequence. There's some info in the Pickaxe book, ruby api documentation on Array#pack for the arguments to pack. Then it's a matter of taking a look at the Windows C api and calling it through ruby. Anyhow that's the ugliness behind some of the basic win32 magic. -Charley On 2/8/07, Nathan Christie wrote: > > bbiker, > > Butting in is encouraged! So, basically, this command USED to work > correctly for me in the past. Then something happened to my machine's > configuration or something along those lines that made this stop working as > it previously had. > > Now the only way this command works is if an instance of IE is running > previously to execution. > > Welcome! > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6470&messageID=18403#18403 > _______________________________________________ > 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/20070208/6b05b8af/attachment.html From forum-watir-users at openqa.org Thu Feb 8 12:05:38 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Thu, 08 Feb 2007 11:05:38 CST Subject: [Wtr-general] how ie.div(:name => 'foo', :index => 2).click works? In-Reply-To: Message-ID: <41054589.1170954368264.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Zeljko, Possibly this could help, I believe the `getObject( how, what, types, value=nil )` method could provide some more infromation to you with regards to this matter: =begin method= # This is the main method for finding objects on a web page. # # This method is used internally by Watir and should not be used externally. It cannot be marked as private because of the way mixins and inheritance work in watir # # * how - symbol - the way we look for the object. Supported values are # - :name # - :id # - :index # - :value etc # * what - string that we are looking for, ex. the name, or id tag attribute or index of the object we are looking for. # * types - what object types we will look at. Only used when index is specified as the how. # * value - used for objects that have one name, but many values. ex. radio lists and checkboxes def getObject(how, what, types, value=nil) container = getContainerContents # XXX actually this returns a collection object (not a container) how = :value if how == :caption log "getting object - how is #{how} what is #{what} types = #{types} value = #{value}" o = nil if how == :index index = what.to_i log" getting object #{types.to_s} at index( #{index}" objectIndex = 1 container.each do | thisObject | begin this_type = thisObject.invoke("type") rescue this_type = nil end if types.include?(this_type) if objectIndex == index o = thisObject break end objectIndex += 1 end end return o else container.each do |object| next unless o == nil begin case how when :id attribute = object.invoke("id") when :name attribute = object.invoke("name") when :value attribute = object.value when :alt attribute = object.alt when :src attribute = object.src when :beforeText attribute = object.getAdjacentText("afterEnd").strip when :afterText attribute = object.getAdjacentText("beforeBegin").strip else next end if what.matches(attribute) && types.include?(object.invoke("type")) if value log "checking value supplied #{value} ( #{value.class}) actual #{object.value} ( #{object.value.class})" if object.value.to_s == value.to_s o = object end else # no value o = object end end rescue => e log 'IE#getObject error ' + e.to_s end end end return o end =end method= It is unclear to me why for this: "({:name => 'foo', :index => 2})" as your parameters list that you placed these parameters inside a block " { } ". Maybe more will chime in to get your question answered :) Nathan Christie --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6479&messageID=18413#18413 From charley.baker at gmail.com Thu Feb 8 12:10:11 2007 From: charley.baker at gmail.com (Charley Baker) Date: Thu, 8 Feb 2007 10:10:11 -0700 Subject: [Wtr-general] how ie.div(:name => 'foo', :index => 2).click works? In-Reply-To: References: <50412276.1170950071669.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Zeljko, The arguments are a hash. Ruby implicitly creates a hash when they're sent in. I'm not sure how it's not working for you. Try a simple example: require 'test/unit' class HashArgs < Test::Unit::TestCase def test_args implicit_hash(:foo => 'bar', :other_foo => 'other_bar') end def implicit_hash(args) assert_equal('bar', args[:foo]) #this should pass assert_equal('bar', args[:other_foo]) #should fail end end Let me know what you get. -Charley On 2/8/07, ?eljko Filipin wrote: > > Hi Nathan, > > Thanks, but now I see I was not clear enough. I did not want how click > method works (but, once more, thanks for your time). I wanted to know how > are this method arguments handled: > > (:name => 'foo', :index => 2) > > It would make sense to me if it is a hash > > ({:name => 'foo', :index => 2}) > > If I send ({:name => 'foo', :index => 2}) to a method called div I could > use it like this > > div({:name => 'foo', :index => 2}) > > def div(properties) > puts properties[:name] > puts properties[:index] > end > > I tried and tried, but could not use these arguments (:name => 'foo', > :index => 2) when I send it to a method. > -- > Zeljko Filipin > zeljkofilipin.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070208/de4e6af5/attachment-0001.html From bret at pettichord.com Wed Feb 7 23:47:56 2007 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 07 Feb 2007 22:47:56 -0600 Subject: [Wtr-general] Identifying "Last" object using Index: -1 ??? In-Reply-To: <40761445.1170890906401.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <40761445.1170890906401.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45CAAB7C.6030208@pettichord.com> Lauren wrote: > undefined method `button' for # (NoMethodError) > This sounds like a bug in 1.4 that is fixed in 1.5. What version are you using? Bret From forum-watir-users at openqa.org Thu Feb 8 13:34:51 2007 From: forum-watir-users at openqa.org (lianagi) Date: Thu, 08 Feb 2007 12:34:51 CST Subject: [Wtr-general] How to take input from text file? Message-ID: <62383291.1170959721104.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Please help me make a script that is going to make a background check of all the persons in the list (filename:wanted.txt location c:\names) one by one. If the person doesn't have a record, it will enter the next name. If there's a record found, it will take 10 minutes before you can enter a name again to be searched. example: ie.text_field(:name, "searchname").set("Edgar") then what? sorry I'm just a beginner. Thanks to those who will help! =) --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6488&messageID=18424#18424 From forum-watir-users at openqa.org Thu Feb 8 13:51:37 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Thu, 08 Feb 2007 12:51:37 CST Subject: [Wtr-general] How to take input from text file? In-Reply-To: <62383291.1170959721104.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <56563588.1170960727060.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Maybe something like this: ie = IE.start( "http://serverName/BackgroundChecker.ext" ) myFile = File.new( "C:\\names\wanted.txt", "r" ) lineArray = IO.readlines( myFile.path ) lineArray.each{ |line| ie.text_field( :name, "searchname" ).set( line ) ie.button( :name, "searchbutton" ).click() # whatever you button is named unless ie.contains_text( "0 records found" ) # if it DOES find a record, pause sleep 600 end } myFile.close() The things you would have to adjust of course would be the name of your search button/image, the text/page/condition that deems no records were found. Please respond with more details/questions :) Hope this helps, Nathan Christie --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6488&messageID=18425#18425 From forum-watir-users at openqa.org Thu Feb 8 13:55:54 2007 From: forum-watir-users at openqa.org (Lauren) Date: Thu, 08 Feb 2007 12:55:54 CST Subject: [Wtr-general] Identifying "Last" object using Index: -1 ??? In-Reply-To: Message-ID: <38615545.1170961026253.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Wow Carl, What an awesome reply. I got code!! :) No doubt I'm still doing something wrong...I'm getting the following error when I run the code on my box though: >ruby MSNTest.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- /apps/ruby/lib/ruby/1.8/test/unit (LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from MSNTest.rb:6 Do you know what this is about? Any ideas what I am missing. Thanks again. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6471&messageID=18427#18427 From bret at pettichord.com Thu Feb 8 14:00:30 2007 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 08 Feb 2007 13:00:30 -0600 Subject: [Wtr-general] how ie.div(:name => 'foo', :index => 2).click works? In-Reply-To: References: Message-ID: <45CB734E.10300@pettichord.com> Like Charley said, the first form below is automatically understood by ruby to imply the second. It is a feature of Ruby and there is nothing special in the Watir library to make this happen. Bret > ie.div(:name => 'foo', :index => 2).click > > ie.div({:name => 'foo', :index => 2}).click > From charley.baker at gmail.com Thu Feb 8 14:13:53 2007 From: charley.baker at gmail.com (Charley Baker) Date: Thu, 8 Feb 2007 12:13:53 -0700 Subject: [Wtr-general] How to take input from text file? In-Reply-To: <62383291.1170959721104.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <62383291.1170959721104.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: well, I'm not sure i fully understand what you're looking for but you have some pseudocode: open list go through names move to next record if person has no name otherwise see if record is found if record is found then wait a long time #this seems odd, but not knowing your business domain, who knows otherwise enter another name and check if the record exists again Your basic logic is there more or less. Then translate that into code. Nathan has the basic code for what you described below. If you have specific questions, that'd be more helpful. -Charley On 2/8/07, lianagi wrote: > > Please help me make a script that is going to make a background check of > all the persons in the list (filename:wanted.txt location c:\names) one by > one. > > If the person doesn't have a record, it will enter the next name. > > If there's a record found, it will take 10 minutes before you can enter a > name again to be searched. > > example: > ie.text_field(:name, "searchname").set("Edgar") > > then what? > > sorry I'm just a beginner. > Thanks to those who will help! =) > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6488&messageID=18424#18424 > _______________________________________________ > 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/20070208/42d2e449/attachment.html From charley.baker at gmail.com Thu Feb 8 14:17:15 2007 From: charley.baker at gmail.com (Charley Baker) Date: Thu, 8 Feb 2007 12:17:15 -0700 Subject: [Wtr-general] Identifying "Last" object using Index: -1 ??? In-Reply-To: <38615545.1170961026253.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <38615545.1170961026253.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Add a require for test unit at the top of the file: require 'test/unit' -c On 2/8/07, Lauren wrote: > > Wow Carl, > > What an awesome reply. I got code!! :) > > No doubt I'm still doing something wrong...I'm getting the following error > when I run the code on my box though: > > >ruby MSNTest.rb > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require': no such file to load -- > /apps/ruby/lib/ruby/1.8/test/unit (LoadError) > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' > from MSNTest.rb:6 > > Do you know what this is about? Any ideas what I am missing. > Thanks again. > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6471&messageID=18427#18427 > _______________________________________________ > 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/20070208/425d7865/attachment.html From christopher.mcmahon at gmail.com Thu Feb 8 14:17:15 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 8 Feb 2007 11:17:15 -0800 Subject: [Wtr-general] How to take input from text file? In-Reply-To: <56563588.1170960727060.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <62383291.1170959721104.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <56563588.1170960727060.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70702081117j69e95ab3v35ebca5d1c7c0d69@mail.gmail.com> I'll pick one nit here: > lineArray = IO.readlines( myFile.path ) > lineArray.each{ |line| For a very large myFile, you could have a problem holding lineArray in memory. A better choice might be myFile.path.each_line do |line| end From richard.conroy at gmail.com Thu Feb 8 14:20:34 2007 From: richard.conroy at gmail.com (Richard Conroy) Date: Thu, 8 Feb 2007 19:20:34 +0000 Subject: [Wtr-general] How to take input from text file? In-Reply-To: <56563588.1170960727060.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <62383291.1170959721104.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <56563588.1170960727060.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <511fa3a20702081120x577800d7k19094b34302ed839@mail.gmail.com> You are better off initially just putting the names into a names.rb file. Perhaps just declare a big array of names in another file and call it from your code. I know *why* you want to load from an external file, but in my experience its best to keep this stuff simple for testing. Once you are comfortable with that, investigate YAML. Which is a simple text format that Ruby supports internally. The text format can be used to describe objects. From forum-watir-users at openqa.org Thu Feb 8 14:20:39 2007 From: forum-watir-users at openqa.org (Lauren) Date: Thu, 08 Feb 2007 13:20:39 CST Subject: [Wtr-general] Identifying "Last" object using Index: -1 ??? In-Reply-To: <45CAAB7C.6030208@pettichord.com> Message-ID: <55239282.1170962469165.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Bret, Thanks for your reply! Hmmmm....I am running Watir 1.4.1 - I wonder if that's the problem! I'll upgrade to 1.5 to see if that makes the difference. I know I've identified all of the possible attributes using the toolbar and viewing the source. I just couldn't figure out why it wouldn't read the .button(:name, ???).click section. I'll post if it works with the upgrade. Thanks again, I missed your post originally until I checked my email. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6471&messageID=18429#18429 From charley.baker at gmail.com Thu Feb 8 14:31:18 2007 From: charley.baker at gmail.com (Charley Baker) Date: Thu, 8 Feb 2007 12:31:18 -0700 Subject: [Wtr-general] how ie.div(:name => 'foo', :index => 2).click works? In-Reply-To: <45CB734E.10300@pettichord.com> References: <45CB734E.10300@pettichord.com> Message-ID: Thought i remembered it from the Pickaxe book, guess I did. :) If you check out the bottom of the page on this link: http://www.rubycentral.com/book/tut_methods.html you'll find a reference to it - Collecting hash arguments. Passing curly braces to a method can get confused with blocks, so this is a convenient alternate in Ruby. -c On 2/8/07, Bret Pettichord wrote: > > Like Charley said, the first form below is automatically understood by > ruby to imply the second. It is a feature of Ruby and there is nothing > special in the Watir library to make this happen. > > Bret > > > ie.div(:name => 'foo', :index => 2).click > > > > ie.div({:name => 'foo', :index => 2}).click > > > > _______________________________________________ > 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/20070208/bbdfd0a7/attachment-0001.html From forum-watir-users at openqa.org Thu Feb 8 14:50:12 2007 From: forum-watir-users at openqa.org (Andrew) Date: Thu, 08 Feb 2007 13:50:12 CST Subject: [Wtr-general] Problem with Logon popup window Message-ID: <41058517.1170964274127.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, I need to click OK button in the Logon Popup with the following details: Window [004e0a92] Title [Connect to qaone.v51test.com] ClassName [#32770] Thread ID [00000fcc] Process ID [00000da0] Size [width=326, height=282] The problem is that Watir script is not executed, until this popup is on. For example, when I click on a link in the web page, this logon window pops up and the next line in the Watir code will be executed only after this window closes Does anybody know how to walk around this situation? Thank you. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6489&messageID=18433#18433 From charley.baker at gmail.com Thu Feb 8 14:58:13 2007 From: charley.baker at gmail.com (Charley Baker) Date: Thu, 8 Feb 2007 12:58:13 -0700 Subject: [Wtr-general] How to take input from text file? In-Reply-To: <72799cd70702081117j69e95ab3v35ebca5d1c7c0d69@mail.gmail.com> References: <62383291.1170959721104.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <56563588.1170960727060.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <72799cd70702081117j69e95ab3v35ebca5d1c7c0d69@mail.gmail.com> Message-ID: Agreed, nice nit. :) You can pick at the file line by line or if using YAML as Richard mentioned, as a document by document separated in yml by dashes. -c On 2/8/07, Chris McMahon wrote: > > I'll pick one nit here: > > > lineArray = IO.readlines( myFile.path ) > > lineArray.each{ |line| > > For a very large myFile, you could have a problem holding lineArray in > memory. A better choice might be > > myFile.path.each_line do |line| > > end > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070208/06c52ea2/attachment.html From forum-watir-users at openqa.org Thu Feb 8 15:28:45 2007 From: forum-watir-users at openqa.org (Lauren) Date: Thu, 08 Feb 2007 14:28:45 CST Subject: [Wtr-general] Errors installing Watir 1.5.0.934.exe (1-click installer) Message-ID: <44695355.1170966666736.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I wanted to install watir 1.5. There are two versions of 1.5 with one-click installers. Both are giving me errors on several of the files and then completing the install with a "install successful" message. I previously had watir 1.4.1 installed but used the uninstall.exe prior to installing 1.5. The last one I installed was watir-1[1].5.0.934.exe Here are the files that I got error messages on: Error opening file for writing: C:\ruby\lib\ruby\site_ruby\1.8\watir.rb C:\ruby\lib\ruby\site_ruby\1.8\AutoItX.chm C:\ruby\lib\ruby\site_ruby\1.8\AutoItX3.chm C:\ruby\lib\ruby\site_ruby\1.8\watir\WindowHelper.rb C:\ruby\lib\ruby\site_ruby\1.8\watir\camel_case.rb C:\ruby\lib\ruby\site_ruby\1.8\watir\clickJSDialog.rb C:\ruby\lib\ruby\site_ruby\1.8\watir\cookiemanager.rb C:\ruby\lib\ruby\site_ruby\1.8\watir\exceptions.rb C:\ruby\lib\ruby\site_ruby\1.8\watir\screen_capture.rb C:\ruby\lib\ruby\site_ruby\1.8\watir\setFileDialog.rb C:\ruby\lib\ruby\site_ruby\1.8\watir\testUnitAddons.rb C:\ruby\lib\ruby\site_ruby\1.8\watir\watir_simple.rb C:\ruby\lib\ruby\site_ruby\1.8\watir\winClicker.rb All files are currently present in the directories listed above except for these two: C:\ruby\lib\ruby\site_ruby\1.8\AutoItX.chm C:\ruby\lib\ruby\site_ruby\1.8\AutoItX3.chm If I go into the watir directory I find these files: AutoItX3.dll AutoItX.chm Does anyone know what's going on? If the files are present, can I assume my install is workable? What about these "AutoItX.chm, and AutoItX3.chm" files want can be done here to correct my install? Thanks again. I can't seem to get very far! :\ --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6490&messageID=18438#18438 From carl.l.shaulis at convergys.com Thu Feb 8 15:33:16 2007 From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com) Date: Thu, 8 Feb 2007 14:33:16 -0600 Subject: [Wtr-general] Identifying "Last" object using Index: -1 ??? In-Reply-To: <55239282.1170962469165.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Lauren, I use watir 1.4.1 but reviewing 1.5.1. I had a situation today where .button(:name, ???).click did not work against our application. I changed it to ie.button(:caption , ???).click and it worked. Worth a try I guess. Good luck! Carl http://forums.openqa.org/thread.jspa?threadID=6471&messageID=18429#18429 From forum-watir-users at openqa.org Thu Feb 8 15:36:19 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Thu, 08 Feb 2007 14:36:19 CST Subject: [Wtr-general] How to take input from text file? In-Reply-To: Message-ID: <39969688.1170967009647.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I concur with these gentlemen's comments on this nit. I feel it is always less desireable to place file lines inside an array with regards to memory and performance. I'd say about the only advantage of using an array is the functionality that is comes with an array/container as opposed to pulling one line at a time. For this example there is really no need nor advantage gained from using an array. Perhaps the OP will take all of this stuff and post the golden version [s]he uses. Good stuff all! I knew I was setting myself up copying and pasting cobweb-infested code into the forums =] -Nathan Christie --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6488&messageID=18439#18439 From forum-watir-users at openqa.org Thu Feb 8 15:41:58 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Thu, 08 Feb 2007 14:41:58 CST Subject: [Wtr-general] jscript_test.rb doesn't work in my machine. In-Reply-To: <57690136.1170896540710.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <51402736.1170967348907.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Post more details, such as: Ruby version, Watir version, some of your [suspect] code, as well as the error output you get after execution. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6473&messageID=18440#18440 From forum-watir-users at openqa.org Thu Feb 8 16:10:18 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Thu, 08 Feb 2007 15:10:18 CST Subject: [Wtr-general] Errors installing Watir 1.5.0.934.exe (1-click installer) In-Reply-To: <44695355.1170966666736.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <32709481.1170969048585.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Honestly, I would: uninstall Ruby > remove physical Ruby directory > reinstall Ruby > from command prompt: `gem install watir` This is almost guaranteed to work, although I'm willing to be you could get away with just a `gem install watir` from the command prompt without uninstalling Ruby. For some reason the gem install/update just works more reliably for me. Good luck, Nathan Christie --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6490&messageID=18442#18442 From carl.l.shaulis at convergys.com Thu Feb 8 16:12:36 2007 From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com) Date: Thu, 8 Feb 2007 15:12:36 -0600 Subject: [Wtr-general] Errors installing Watir 1.5.0.934.exe (1-click installer) In-Reply-To: <44695355.1170966666736.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Lauren, I have concluded this week that working with the gems is the best way to install watir. There are a few unit tests that are not perfect in my environment, but gems are easier to manage. I recommend uninstalling and grab the lastest gem. Then execute gem install watir-1[1].5.xxxxx.gem. Hang in there! Carl From paul.rogers at shaw.ca Thu Feb 8 16:48:27 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 08 Feb 2007 14:48:27 -0700 Subject: [Wtr-general] WIN32OLERuntimeError References: <37722979.1170868510291.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <45CA6AF9.8070904@pettichord.com> Message-ID: <07d901c74bca$ddab3350$6400a8c0@laptop> I havent managed to catch up all on the threads in this message, but I was thinking exactly what Bret was Im also wondering if the com server has changed somehow, it internetExplorer7.application or something Im sure I used to know how to find out this stuff but it evades me today ----- Original Message ----- From: "Bret Pettichord" To: Sent: Wednesday, February 07, 2007 5:12 PM Subject: Re: [Wtr-general] WIN32OLERuntimeError > Nathan Christie wrote: >> I want to think this may somehow be related to a .NET Framework >> [automatic?] update that took place at some point. I fear the only >> solution is a reinstall of Windows. >> > I suspect that the change could be related to MS security update of some > kind. > > Bret > _______________________________________________ > 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 8 18:48:11 2007 From: forum-watir-users at openqa.org (Andrew) Date: Thu, 08 Feb 2007 17:48:11 CST Subject: [Wtr-general] Send email from Watir script Message-ID: <38928535.1170978605865.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, Is it possible to send an email with test results from Watir script? Thank you --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6493&messageID=18447#18447 From forum-watir-users at openqa.org Thu Feb 8 23:28:28 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Thu, 08 Feb 2007 22:28:28 CST Subject: [Wtr-general] WIN32OLERuntimeError In-Reply-To: <07d901c74bca$ddab3350$6400a8c0@laptop> Message-ID: <44027716.1170995339015.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I too got the same problem. Getting WIN32OLERuntimeError . Yesterday i executed my scripts well but today morning when i come over here i got the problem, I have installed dotnet frame work and Windows Vista upgrade advisor, so is that any problem?? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6466&messageID=18454#18454 From forum-watir-users at openqa.org Fri Feb 9 00:08:48 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Thu, 08 Feb 2007 23:08:48 CST Subject: [Wtr-general] WIN32OLERuntimeError In-Reply-To: <44027716.1170995339015.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <37211960.1170997758799.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Now I uninstalled the dot net frame work and Windows Vista upgrade advisor.But still i am getting the same problem, and even if i open the browser manually and i execute the script the problem is happening. Getting the error and its automatically opening the bulk of browsers. So is there any other solution?? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6466&messageID=18455#18455 From forum-watir-users at openqa.org Fri Feb 9 01:19:36 2007 From: forum-watir-users at openqa.org (barry) Date: Fri, 09 Feb 2007 00:19:36 CST Subject: [Wtr-general] jscript_test.rb doesn't work in my machine. In-Reply-To: <57690136.1170896540710.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <56114311.1171002006070.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I think I found out why. I have IE 7.0 on my machine. It looks like the title of dialog box changes to "Windows Internet Exploer". This may have caused the script to break. I ran this test in another machine with IE 6.0. It works just fine. I have Ruby 1.8.5 and Watir 1.4.1. When I ran all_tests.rb in the unit test, it got stuck in \unitests\html\images1.html. It complains "Cannot find file 'that /unittest/html/images/triangel.jpg'. It looks like this file is not there after Watir installation?? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6473&messageID=18458#18458 From WKruse at multichoice.co.za Fri Feb 9 01:29:10 2007 From: WKruse at multichoice.co.za (Walter Kruse) Date: Fri, 9 Feb 2007 08:29:10 +0200 Subject: [Wtr-general] Send email from Watir script In-Reply-To: <38928535.1170978605865.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <38928535.1170978605865.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: You'll need an SMTP server, try Free SMTP server from http://www.softstack.com/freesmtp.html require 'net/smtp' myMessage = < References: <38928535.1170978605865.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <27915010702082356v320a9d45n613fb7bafc7e2dde@mail.gmail.com> Hi, You don't need a free smtp server if you are having one in your network, it's the same as you are using for your email client like Outlook. If you are sending mail to same network you don't need to login in your mail server, you can directly send mail to anyone using the same mail server Net::SMTP.start('smtp_server_name', 25) do |smtp| For sending mails to other mail address then you need to login to the mail server and then send the mails This code works in my case: Net::SMTP.start('smtp_server_name', 25,"example.com","username","password",:login) do |smtp| smtp.open_message_stream(from at example.com', ['to at example.com]) do |f| f.puts 'From: from at example.com' f.puts 'To: to at example.com' f.puts 'Subject: test message' f.puts f.puts 'This is a test message.' end end you can refer this documentation for more details http://www.ruby-doc.org/stdlib/libdoc/net/smtp/rdoc/index.html Regards, Prema On 2/9/07, Walter Kruse wrote: > > You'll need an SMTP server, try Free SMTP server from > http://www.softstack.com/freesmtp.html > > require 'net/smtp' > > myMessage = < From: sender at domain.co.za > To: recipient at domain.co.za > Subject: My mail > Message body here > END_OF_MESSAGE > > Net::SMTP.start('localhost') do |smtp| > smtp.send_message myMessage, 'sender at domain.co.za', > 'recipient at domain.co.za' > end > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrew > Sent: 09 February 2007 01:48 AM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Send email from Watir script > > Hi, > > Is it possible to send an email with test results from Watir script? > > Thank you > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6493&messageID=18447#18447 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > ************************************************************************************************************************** > 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. > > ************************************************************************************************************************** > _______________________________________________ > 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/20070209/e7efb5d9/attachment.html From zeljko.filipin at gmail.com Fri Feb 9 04:20:24 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Fri, 9 Feb 2007 10:20:24 +0100 Subject: [Wtr-general] how ie.div(:name => 'foo', :index => 2).click works? In-Reply-To: References: <45CB734E.10300@pettichord.com> Message-ID: Charley and Bret, Thank you. If I took a better look at Pickaxe I would save some of your time. I was trying this (and of course it did not work). If I posted this in my original post, maybe my mistake would be clearer to you. div(:name => 'foo', :index => 2) def div(first, second) hash = {first, second} puts hash[:name] puts hash[:index] end And all I really had to do is div(:name => 'foo', :index => 2) def div(properties) puts properties[:name] puts properties[:index] end Nathan, Thank you for your time and for your will to help. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070209/457996c1/attachment.html From forum-watir-users at openqa.org Fri Feb 9 04:28:46 2007 From: forum-watir-users at openqa.org (Maisonnette) Date: Fri, 09 Feb 2007 03:28:46 CST Subject: [Wtr-general] href javascript Message-ID: <48097742.1171013374904.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hello, I got a problem, i don't find how to click on a hypertext link [b] Symbole input type="text" name="critere.symbol.symbole" maxlength="10" size="10" value="" readonly="readonly"> a href="Javascript:selection(null, 'critere.symbol.symbole','distinct symb,\'(\' || symb || \')\',libelle,symb as CLE','symb,libelle','','tb_assymb','symb,libelle','symb','CLE',1,true);" class="lienblanc"> >> [/b] This link is on a javascript fonction, and the text of this hypertext link is ">>". There is many other hypertext with this link, so i can't use the :text method to click on it... how can i click on it ? If anyone got the answer :-) i will be happy ! --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6498&messageID=18463#18463 From forum-watir-users at openqa.org Fri Feb 9 05:08:04 2007 From: forum-watir-users at openqa.org (Maisonnette) Date: Fri, 09 Feb 2007 04:08:04 CST Subject: [Wtr-general] href javascript In-Reply-To: <48097742.1171013374904.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <62355384.1171015714202.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> i got more information. When i type ie.show_links on irb i got this : [b] irb(main):006:0> ie.show_links index name id href text/src 1 http://forums.int.sncf.fr/ / http://localhost:7001/Jsp/images/ent_forum_off.gif 2 http://annuaire.int.sncf.fr/ / http://localhost:7001/Jsp/images/ent_annuaire_off.gif 3 http://recherche.int.sncf.fr/ / http://localhost:7001/Jsp/images/ent_recherche_off.gif 4 http://aide.int.sncf.fr/ / http://localhost:7001/Jsp/images/ent_aide_off.gif 5 http://localhost:7001/index.do Accueil 6 http://localhost:7001/gestion/consultationAS.do Cst_AS 7 http://localhost:7001/gestion/creationEvenement.do ?cancelType=3Evt_AS 8 http://localhost:7001/gestion/modificationAS.do Modif_AS 9 http://localhost:7001/gestion/suppressionAS.do Destruct_AS 10 http://localhost:7001/gestion/creationPG.do Incp_PG 11 http://localhost:7001/gestion/suppressionPG.do Supr_PG 12 http://localhost:7001/gestion/restitutionEvnmt.do Cst_EVT 13 http://localhost:7001/gestion/suiviMajFAS.do Clst.MAJ 14 javascript:nop();selectEquipementInList('critere.l ocDepart.label',%20'critere.locDepart.value',%20'false',%20'false');>> [u]15 javascript:selection(null,%20'critere.symbol.symbo le','distinct%20symb,\'(\'%20||%20symb%20||%20\')\',libelle,symb%20as%20CLE','sy mb,libelle','','tb_assymb','symb,libelle','symb','CLE',1,true);>>[/u] 16 javascript:selectionSymbole('critere.symbol.constr ucteur','critere.symbol.constructeurLib',1,%20true);>> 17 javascript:selectionSymbole('critere.symbol.lettre ',%20'critere.symbol.lettreLib',%202,%20false);>> => nil [/b] When i try to access to this link with it's id, like this : ie.link(:index,"15").click I got this response : [b] 1) Error: test_fasnouvsymboletrechavancee(TC_fasnouvsymboleetrechavancee): Watir::Exception::UnknownObjectException: Unable to locate object, using index and 15 C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1928:in `assert_exists' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2009:in `click' C:\Commun\Developpement\workspace\TestFonctio/tc/description/recherche/t_c_fasnouvsymboleetrechavancee.rb:51:in `test_fasnouvsymboletrechavancee'[/b] --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6498&messageID=18466#18466 From zeljko.filipin at gmail.com Fri Feb 9 05:43:32 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Fri, 9 Feb 2007 11:43:32 +0100 Subject: [Wtr-general] how ie.div(:name => 'foo', :index => 2).click works? In-Reply-To: References: <50412276.1170950071669.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: I was browsing true Watir General forum at OpenQA Forums and I wonder how to mark Charley's answer as correct. I am logged in (I can edit my posts). I thought I would see something like "mark as correct" somewhere, but I can not find it. Or is it something that forum administrator does? -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070209/868eb3d8/attachment.html From zeljko.filipin at gmail.com Fri Feb 9 08:10:20 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Fri, 9 Feb 2007 14:10:20 +0100 Subject: [Wtr-general] Errors installing Watir 1.5.0.934.exe (1-click installer) In-Reply-To: <44695355.1170966666736.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <44695355.1170966666736.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Log in as administrator. That could help. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070209/dca36fe1/attachment.html From paul.rogers at shaw.ca Fri Feb 9 08:36:27 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 09 Feb 2007 06:36:27 -0700 Subject: [Wtr-general] Send email from Watir script References: <38928535.1170978605865.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <27915010702082356v320a9d45n613fb7bafc7e2dde@mail.gmail.com> Message-ID: <084f01c74c4f$4c9d19c0$6400a8c0@laptop> there is also a gmail library for ruby which is really easy to use I think its called gmailer or ruby-gmailer ----- Original Message ----- From: Prema Arya To: wtr-general at rubyforge.org Sent: Friday, February 09, 2007 12:56 AM Subject: Re: [Wtr-general] Send email from Watir script Hi, You don't need a free smtp server if you are having one in your network, it's the same as you are using for your email client like Outlook. If you are sending mail to same network you don't need to login in your mail server, you can directly send mail to anyone using the same mail server Net::SMTP.start('smtp_server_name', 25) do |smtp| For sending mails to other mail address then you need to login to the mail server and then send the mails This code works in my case: Net:: SMTP.start('smtp_server_name', 25,"example.com","username","password",:login) do |smtp| smtp.open_message_stream( from at example.com', ['to at example.com]) do |f| f.puts 'From: from at example.com' f.puts 'To: to at example.com' f.puts 'Subject: test message' f.puts f.puts 'This is a test message.' end end you can refer this documentation for more details http://www.ruby-doc.org/stdlib/libdoc/net/smtp/rdoc/index.html Regards, Prema On 2/9/07, Walter Kruse wrote: You'll need an SMTP server, try Free SMTP server from http://www.softstack.com/freesmtp.html require 'net/smtp' myMessage = < Message-ID: <59169258.1171028718907.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi Thanks a lot, It worked. I am using it a lot. But now i got another doubt if the link is
of this kind. This is exactly not a link, its a tab link. so how to click such type of links?? and the other typw of link is
I used the ie.span(:index,10).click then it worked, but it will be the problem if the index number changes, Please help me for such type of links.. Thanks in Advance --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6325&messageID=18476#18476 From forum-watir-users at openqa.org Fri Feb 9 08:58:56 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Fri, 09 Feb 2007 07:58:56 CST Subject: [Wtr-general] how ie.div(:name => 'foo', In-Reply-To: Message-ID: <43708631.1171029566229.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> when you make a new thread you have the option of making it a 'question'. If you do that then there will be an icon next to each post to mark them as correct or mostly correct. Think its too late now though :) --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6479&messageID=18477#18477 From forum-watir-users at openqa.org Fri Feb 9 09:14:55 2007 From: forum-watir-users at openqa.org (Ravi) Date: Fri, 09 Feb 2007 08:14:55 CST Subject: [Wtr-general] href javascript In-Reply-To: <62355384.1171015714202.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <51944904.1171030525193.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I guess this one should work in recent versions of Watir: ie.link(:html,/critere.symbol.symbole/).click --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6498&messageID=18482#18482 From richard.conroy at gmail.com Fri Feb 9 09:17:06 2007 From: richard.conroy at gmail.com (Richard Conroy) Date: Fri, 9 Feb 2007 14:17:06 +0000 Subject: [Wtr-general] Send email from Watir script In-Reply-To: <084f01c74c4f$4c9d19c0$6400a8c0@laptop> References: <38928535.1170978605865.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <27915010702082356v320a9d45n613fb7bafc7e2dde@mail.gmail.com> <084f01c74c4f$4c9d19c0$6400a8c0@laptop> Message-ID: <511fa3a20702090617o7f3afcaag24189c5501468887@mail.gmail.com> On 2/9/07, Paul Rogers wrote: > > > there is also a gmail library for ruby which is really easy to use > > I think its called gmailer or ruby-gmailer In addition to the SMTP & Gmailer Ruby options, there is also a Ruby POP3 library (built-in IIRC) and possibly even an IMAP one. In practical use, we find having the test system as turnkey as possible is ideal - so no reliance on any additional 3rd party libraries is a good thing, you want the testbed system to be as easy to use as possible. So use the built in Ruby capabilities. Mail can sometimes get swallowed depending on how your mail servers are configured. Always remember to save the report first. From zeljko.filipin at gmail.com Fri Feb 9 09:40:23 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Fri, 9 Feb 2007 15:40:23 +0100 Subject: [Wtr-general] how ie.div(:name => 'foo', In-Reply-To: <43708631.1171029566229.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <43708631.1171029566229.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: On 2/9/07, John Lolis wrote: > > Think its too late now though :) It is. I tried to edit my original post, but there is no option to make it a message. Thanks for info. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070209/ff5ac270/attachment.html From forum-watir-users at openqa.org Fri Feb 9 09:54:25 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Fri, 09 Feb 2007 08:54:25 CST Subject: [Wtr-general] url for link In-Reply-To: <59169258.1171028718907.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <44121895.1171032895988.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> div(:id, "ContractDoc").click i think that should work --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6325&messageID=18488#18488 From forum-watir-users at openqa.org Fri Feb 9 10:04:02 2007 From: forum-watir-users at openqa.org (Maisonnette) Date: Fri, 09 Feb 2007 09:04:02 CST Subject: [Wtr-general] href javascript In-Reply-To: <51944904.1171030525193.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <63290151.1171033472166.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> thank you but it doesn't work ... I use watir-1.4.1 version... and it say : [b]Watir::Exception::MissingWayOfFindingObjectException: :html is an unknown way of finding a link ( critere.symbol.symbole )[/b] --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6498&messageID=18490#18490 From richard.conroy at gmail.com Fri Feb 9 10:16:00 2007 From: richard.conroy at gmail.com (Richard Conroy) Date: Fri, 9 Feb 2007 15:16:00 +0000 Subject: [Wtr-general] Everyday Scripting with Ruby (the book) In-Reply-To: <72799cd70702051619s197ea530x9dc41e5840c6bf60@mail.gmail.com> References: <511fa3a20702010730i7c7ebdd3sb663931b2a92b27@mail.gmail.com> <37c405480702051525u4fef0de9l76027f62384aed7e@mail.gmail.com> <72799cd70702051619s197ea530x9dc41e5840c6bf60@mail.gmail.com> Message-ID: <511fa3a20702090716u6583d8e0i20e41e621fc0a0a2@mail.gmail.com> Got the book. Only skimmed through at first, but Chapter 2's introduction to just basic command line stuff is important. Developers tend to forget that this kind of stuff is not guaranteed for testers. I *love* the Ruby Facts sections for Arrays, Regular Expressions and Hashes. About 50-100 examples of the form: source array/text | operation syntax | output Hell, I am bookmarking the Regular Expressions one for myself. Anyway, I am looking forward to properly reading this, and working through it with our testers. From bret at pettichord.com Fri Feb 9 10:16:17 2007 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 09 Feb 2007 09:16:17 -0600 Subject: [Wtr-general] Errors installing Watir 1.5.0.934.exe (1-click installer) In-Reply-To: <44695355.1170966666736.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <44695355.1170966666736.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45CC9041.8000204@pettichord.com> Lauren wrote: > What about these "AutoItX.chm, and AutoItX3.chm" files want can be done here to correct my install? These are help files, so i wouldn't worry about them. From forum-watir-users at openqa.org Fri Feb 9 10:24:04 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Fri, 09 Feb 2007 09:24:04 CST Subject: [Wtr-general] href javascript In-Reply-To: <63290151.1171033472166.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <54038502.1171034674812.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I looks like this is in a table, figure out which row and cell it is in then do table(:what,ever)[row][cell].click that might work. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6498&messageID=18494#18494 From bret at pettichord.com Fri Feb 9 10:25:06 2007 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 09 Feb 2007 09:25:06 -0600 Subject: [Wtr-general] href javascript In-Reply-To: <63290151.1171033472166.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <63290151.1171033472166.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45CC9252.3090401@pettichord.com> Maisonnette wrote: > I use watir-1.4.1 version... > ie.link(:name, "critere.symbol.symbole").click From zeljko.filipin at gmail.com Fri Feb 9 10:26:53 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Fri, 9 Feb 2007 16:26:53 +0100 Subject: [Wtr-general] href javascript In-Reply-To: <63290151.1171033472166.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <51944904.1171030525193.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <63290151.1171033472166.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: On 2/9/07, Maisonnette wrote: > > I use watir-1.4.1 > Install Watir 1.5.1.1145 and it will work. http://wiki.openqa.org/display/WTR/Development+Builds -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070209/370811e5/attachment.html From carl.l.shaulis at convergys.com Fri Feb 9 10:34:30 2007 From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com) Date: Fri, 9 Feb 2007 09:34:30 -0600 Subject: [Wtr-general] how ie.div(:name => 'foo', :index => 2).click works? In-Reply-To: Message-ID: I assume this is a forum entry that you entered. When I did it there was a little icon in the top left of the forum entry. I clicked on it and entered a resolution and it was moved to correct. Unfortunately I am blocked from forums here at the office or I would double check. :o( Carl "?eljko Filipin" To Sent by: wtr-general at rubyforge.org wtr-general-bounc cc es at rubyforge.org Subject Re: [Wtr-general] how ie.div(:name 02/09/2007 04:43 => 'foo', :index => 2).click AM works? Please respond to wtr-general at rubyf orge.org I was browsing true Watir General forum at OpenQA Forums and I wonder how to mark Charley's answer as correct. I am logged in (I can edit my posts). I thought I would see something like "mark as correct" somewhere, but I can not find it. Or is it something that forum administrator does? -- Zeljko Filipin zeljkofilipin.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Fri Feb 9 10:43:21 2007 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 09 Feb 2007 09:43:21 -0600 Subject: [Wtr-general] How to take input from text file? In-Reply-To: <56563588.1170960727060.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <56563588.1170960727060.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45CC9699.5070701@pettichord.com> Nathan Christie wrote: > Maybe something like this: > > ie = IE.start( "http://serverName/BackgroundChecker.ext" ) > > myFile = File.new( "C:\\names\wanted.txt", "r" ) > This line has a subtle but nasty syntax error. This is correct: myFile = File.new( "C:\\names\\wanted.txt", "r" ) Or you can use one of these forms myFile = File.new( 'C:\names\wanted.txt', 'r' ) myFile = File.new( "C:/names/wanted.txt", "r" ) As a general rule, I avoid using double-quotes unless i know that i need them. Single-quotes are "more literal", whereas there are a number of characters that have special meanings when included in double-quotes (esp \ and #). In other words, i would use this: myFile = File.new( 'C:\names\wanted.txt', 'r' ) Bret From zeljko.filipin at gmail.com Fri Feb 9 10:54:51 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Fri, 9 Feb 2007 16:54:51 +0100 Subject: [Wtr-general] how ie.div(:name => 'foo', :index => 2).click works? In-Reply-To: References: Message-ID: Carl, Thanks, but I already got my question answered. http://rubyforge.org/pipermail/wtr-general/2007-February/009351.html -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070209/84fa7a57/attachment.html From charley.baker at gmail.com Fri Feb 9 11:03:43 2007 From: charley.baker at gmail.com (Charley Baker) Date: Fri, 9 Feb 2007 09:03:43 -0700 Subject: [Wtr-general] Problem with Logon popup window In-Reply-To: <41058517.1170964274127.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <41058517.1170964274127.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: If this is a javascript popup you can take a look at the FAQ http://wiki.openqa.org/display/WTR/FAQ for handling javascript popups. Otherwise if this is an IE specific modal dialog, then using watir 1.5.1 you can access the modal_dialog through your ie object. Let us know if either of these two work. -Charley On 2/8/07, Andrew wrote: > > Hi, > > I need to click OK button in the Logon Popup with the following details: > > Window [004e0a92] > Title [Connect to qaone.v51test.com] ClassName [#32770] > Thread ID [00000fcc] Process ID [00000da0] > Size [width=326, height=282] > > The problem is that Watir script is not executed, until this popup is on. > For example, when I click on a link in the web page, this logon window > pops up and the next line in the Watir code will be executed only after this > window closes > > Does anybody know how to walk around this situation? > > Thank you. > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6489&messageID=18433#18433 > _______________________________________________ > 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/20070209/4ceb4999/attachment.html From forum-watir-users at openqa.org Fri Feb 9 11:17:20 2007 From: forum-watir-users at openqa.org (Maisonnette) Date: Fri, 09 Feb 2007 10:17:20 CST Subject: [Wtr-general] href javascript In-Reply-To: Message-ID: <44833256.1171037870672.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Ok , i have installed the 1.5.1.1145 version of watir ... But i don't understand what i can find the row and cols number (there is many table on my form ...) . Do you have a tool ? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6498&messageID=18503#18503 From forum-watir-users at openqa.org Fri Feb 9 14:54:27 2007 From: forum-watir-users at openqa.org (lianagi) Date: Fri, 09 Feb 2007 13:54:27 CST Subject: [Wtr-general] How to take input from text file? In-Reply-To: <45CC9699.5070701@pettichord.com> Message-ID: <60392667.1171050897986.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thanks for all the help. =) I can now take input from a text file. One more problem though, using the following codes: myFile = File.new( "C:\\Documents and Settings\\Jone\\Desktop\\names.txt", "r" ) lineArray = IO.readlines( myFile.path ) lineArray.each{ |line| ie.text_field( :name, "searchname" ).set( line ) ie.button(:src, /btn_weiter/).click() if ie.contains_text( "found" ) sleep 300 end } myFile.close() the problem is... After the name had been found, it will sleep for 300 secs then after that It won't go back to the input name text field (coz after clicking the search button, I will be directed to page 2) then the program stops. Because of that, I can only check the first name on my list. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6488&messageID=18513#18513 From forum-watir-users at openqa.org Fri Feb 9 16:39:07 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Fri, 09 Feb 2007 15:39:07 CST Subject: [Wtr-general] href javascript In-Reply-To: <44833256.1171037870672.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <56168584.1171057177747.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> use the IE dev toolbar and just count it out :) --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6498&messageID=18514#18514 From charley.baker at gmail.com Fri Feb 9 16:57:44 2007 From: charley.baker at gmail.com (Charley Baker) Date: Fri, 9 Feb 2007 14:57:44 -0700 Subject: [Wtr-general] How to take input from text file? In-Reply-To: <60392667.1171050897986.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <45CC9699.5070701@pettichord.com> <60392667.1171050897986.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Try inserting a statement to logout or go back to the original page. See below: On 2/9/07, lianagi wrote: > > Thanks for all the help. =) I can now take input from a text file. > > One more problem though, using the following codes: > > myFile = File.new( "C:\\Documents and Settings\\Jone\\Desktop\\names.txt", > "r" ) > > lineArray = IO.readlines( myFile.path ) > lineArray.each{ |line| > > ie.text_field( :name, "searchname" ).set( line ) > ie.button(:src, /btn_weiter/).click > if ie.contains_text( "found" ) > sleep 300 else You might want to assert something here if text isn't found: end ie.goto("the search page") # in other words go back, check another name } > > myFile.close() > > the problem is... > After the name had been found, it will sleep for 300 secs then after that > It won't go back to the input name text field (coz after clicking the search > button, I will be directed to page 2) then the program stops. Because of > that, I can only check the first name on my list. > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6488&messageID=18513#18513 > _______________________________________________ > 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/20070209/709917cf/attachment.html From forum-watir-users at openqa.org Fri Feb 9 19:16:51 2007 From: forum-watir-users at openqa.org (Lauren) Date: Fri, 09 Feb 2007 18:16:51 CST Subject: [Wtr-general] Errors installing Watir 1.5.0.934.exe (1-click installer) In-Reply-To: <45CC9041.8000204@pettichord.com> Message-ID: <58270915.1171066680310.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> UPDATE! Thanks to all for your help. I am back up and running. I listened to all of you. 1. I needed admin priveledges...and didn't have any on my system. 2. I reinstalled ruby 3. I didn't use the one click installer. Instead I installed the latest gem via the command prompt. Thanks again! --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6490&messageID=18519#18519 From forum-watir-users at openqa.org Fri Feb 9 19:24:51 2007 From: forum-watir-users at openqa.org (Lauren) Date: Fri, 09 Feb 2007 18:24:51 CST Subject: [Wtr-general] Identifying "Last" object using Index: -1 ??? In-Reply-To: Message-ID: <48881784.1171067121895.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> UPDATE! It appears that I was running into the bug in release 1.4.1. I have installed the latest gem watir 1.5.1.xxxx. It will now recognize: ie.table(:index, 10).button(:what, ever).click I don't have many identifiers to choose from for my button so to get it to work I've had to use index(s) both times: ie.table(:index, 10).button(:index, 2).click However, I think as buttons get added my indexing will break for the button. In my current button I can't get indexing to work...unless I just haven't found the right index number. Is there a better way to indentify these objects? This is taking forever! But anyway...the upgrade solved my biggest problem...now I just have to figure out what makes my button uniquely recognizable!? Thank you so much for all the help that I have received. It feels great to move forward! --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6471&messageID=18520#18520 From forum-watir-users at openqa.org Sat Feb 10 14:05:51 2007 From: forum-watir-users at openqa.org (lianagi) Date: Sat, 10 Feb 2007 13:05:51 CST Subject: [Wtr-general] How to take input from text file? In-Reply-To: Message-ID: <37875375.1171134381336.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> thanks guys! =) --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6488&messageID=18529#18529 From forum-watir-users at openqa.org Sat Feb 10 14:27:15 2007 From: forum-watir-users at openqa.org (lianagi) Date: Sat, 10 Feb 2007 13:27:15 CST Subject: [Wtr-general] How to take input from text file? In-Reply-To: <37875375.1171134381336.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <41735257.1171135665564.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> one last question, from my text file: 1st line: Reggie;12345;Philippines 2nd line Kenneth;12346;Philippines is there a way so that it will only copy and input the names instead of copying the whole line? thanks again! --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6488&messageID=18530#18530 From forum-watir-users at openqa.org Sat Feb 10 14:27:57 2007 From: forum-watir-users at openqa.org (lianagi) Date: Sat, 10 Feb 2007 13:27:57 CST Subject: [Wtr-general] How to take input from text file? In-Reply-To: <62383291.1170959721104.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <37161303.1171135707190.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> i have a follow up question --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6488&messageID=18531#18531 From dr.frog at shaw.ca Sat Feb 10 15:55:36 2007 From: dr.frog at shaw.ca (Clayton Cottingham) Date: Sat, 10 Feb 2007 12:55:36 -0800 Subject: [Wtr-general] getting commnad line arguements Message-ID: <003701c74d55$d0940930$6401a8c0@wintermarket> Hi all, Just wondering if anyone has any hints on how to get command line arguments? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070210/5c7392ed/attachment.html From bret at pettichord.com Sat Feb 10 16:52:34 2007 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 10 Feb 2007 15:52:34 -0600 Subject: [Wtr-general] jscript_test.rb doesn't work in my machine. In-Reply-To: <56114311.1171002006070.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <56114311.1171002006070.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45CE3EA2.7030005@pettichord.com> Watir 1.4.1 does not support IE7. Watir 1.5 does. From forum-watir-users at openqa.org Sat Feb 10 18:20:49 2007 From: forum-watir-users at openqa.org (steven) Date: Sat, 10 Feb 2007 17:20:49 CST Subject: [Wtr-general] while not exists does not work in Firewatir? In-Reply-To: <49838681.1170660923766.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <43089396.1171149679584.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> With Firewatir, I am not able to click the Withdraw link below (see the last few lines in this code below). $browser.link(:text, "Withdraw").click In Watir with IE, it works just fine. Any ideas? The error message is: 1) Error: test_Withdraw(TC_PayPal_suite): FireWatir::Exception::UnknownObjectException: Unable to locate object, using text and Withdraw c:/Program Files/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/./MozillaBaseElement.rb:739:in `assert_exists' c:/Program Files/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/./MozillaBaseElement.rb:897:in `click' C:/Program Files/Watir/examples/test_cases/paypal_test.rb:53:in `test_Withdraw' Steve My Account - PayPal