From ajitesh.srinetra at gmail.com Tue Jan 2 00:40:01 2007 From: ajitesh.srinetra at gmail.com (Ajitesh Srinetra) Date: Tue, 2 Jan 2007 11:10:01 +0530 Subject: [Wtr-general] assertion on the color of the row of a table Message-ID: <4f6da15b0701012140y4720ad03s3a92e69af545e735@mail.gmail.com> Hi everyone In my application I want to assert on the color of the row of a particular table. Based on the certain rules the color of these rows are changing.so every time i need to assert on those . Thank you in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070102/d10c187f/attachment.html From zeljko.filipin at gmail.com Tue Jan 2 03:52:30 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Tue, 2 Jan 2007 09:52:30 +0100 Subject: [Wtr-general] assertion on the color of the row of a table In-Reply-To: <4f6da15b0701012140y4720ad03s3a92e69af545e735@mail.gmail.com> References: <4f6da15b0701012140y4720ad03s3a92e69af545e735@mail.gmail.com> Message-ID: Is colour defined in html or css? -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070102/3c33aecd/attachment.html From forum-watir-users at openqa.org Tue Jan 2 03:55:20 2007 From: forum-watir-users at openqa.org (Udo Fröhling) Date: Tue, 02 Jan 2007 02:55:20 CST Subject: [Wtr-general] the problem about test cases organization. In-Reply-To: <49253908.1167443739504.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <56224402.1167728150671.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> > But I don't konw how to set up the test-report in > Windows. > Copy them into ruby's "lib" directory directly? No, use the setup.rb and read the readme --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5943&messageID=16694#16694 From ac251404 at ohio.edu Tue Jan 2 09:59:33 2007 From: ac251404 at ohio.edu (Alex Ciarlillo) Date: Tue, 02 Jan 2007 09:59:33 -0500 Subject: [Wtr-general] *.rbw extension behaves differently than *.rb Message-ID: <459A7355.5030105@ohio.edu> For some reason when I run my program with a *.rbw extension (its a GUI app) the watir parts do not seem to execute. Watir never opens an IE window and just hangs indefinitely. When I run the same program with the *.rb extension it works just fine. Does anyone have any idea why this may be? thanks From Mark_Cain at RL.gov Tue Jan 2 11:09:29 2007 From: Mark_Cain at RL.gov (Cain, Mark) Date: Tue, 2 Jan 2007 08:09:29 -0800 Subject: [Wtr-general] How do I click the "OK" button on a java alert? In-Reply-To: <32359632.1166545613367.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <4440693B7CFF2440ABC2E0BE480DABA10A3660@EX01-2.rl.gov> I have found Autoit a little flaky. You can use what is already built into Watir. Here is a method I wrote to handle most of my popup needs.. You will need to use the newest gem if Watir (get it here http://wiki.openqa.org/display/WTR/Development+Builds) : require 'watir\contrib\enabled_popup' def startClicker( button , waitTime=9, user_input=nil) hwnd = $ie.enabled_popup(waitTime) # get a handle if one exists if (hwnd) # yes there is a popup w = WinClicker.new if ( user_input ) w.setTextValueForFileNameField(hwnd, "#{user_input}") end sleep 3 # I put this in to see the text being input it is not necessary to work w.clickWindowsButton_hwnd(hwnd, "#{button}") # "OK" or whatever the name on the button is w=nil # this is just cleanup end end $ie=Watir::IE.start("c:\test.htm") # This is whatever object that uses the click method. $ie.image(:id,'3').click_no_wait startClicker("OK", 7, "User Input") # 3rd parameter is optional. Hope this helps --Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070102/f704eaec/attachment-0001.html From Mark_Cain at RL.gov Tue Jan 2 17:05:55 2007 From: Mark_Cain at RL.gov (Cain, Mark) Date: Tue, 2 Jan 2007 14:05:55 -0800 Subject: [Wtr-general] Give a solution fo javascript popup In-Reply-To: Message-ID: <4440693B7CFF2440ABC2E0BE480DABA10A3663@EX01-2.rl.gov> I have posted this many time, it is the most reliable JS popup method I have every used. It will even work for the input box (by supplying the user_input="whatever the user would input") and file upload dialog (by supplying user_input='&Save' or '&Open'). It is better and more reliable than the one linked below. require 'watir\contrib\enabled_popup' def startClicker( button , waitTime=9, user_input=nil ) hwnd = $ie.enabled_popup(waitTime) # get a handle if one exists if (hwnd) # yes there is a popup w = WinClicker.new if ( user_input ) w.setTextValueForFileNameField( hwnd, "#{user_input}" ) end sleep 3 # I put this in to see the text being input it is not necessary to work w.clickWindowsButton_hwnd( hwnd, "#{button}" ) # "OK" or whatever the name on the button is w=nil # this is just cleanup end end $ie=Watir::IE.start("c:\test.htm") # This is whatever object that uses the click method. # You MUST use the click_no_wait method. $ie.image(:id,'3').click_no_wait startClicker("OK", 7, "User Input") # 3rd parameter is optional. --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Charley Baker Sent: Thursday, December 21, 2006 8:22 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Give a solution fo javascript popup Google is your friend, searching for watir javascript dialog, this is the first link: http://www.hanselman.com/blog/ClickingAJavaScriptDialogUsingWatir.aspx -Charley On 12/20/06, liucongying wrote: I use ruby185-21 and watir-1.5.1.1127.gem, I want a solution fo js pop the web html is the one in watir \unittests\html ---JavascriptClick.html。 So i hope someone can give me codes of watir to solve js popup,do not use aotoit! thanks --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5883&messageID=16456#16456 _______________________________________________ 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/20070102/02d5cdc5/attachment.html From forum-watir-users at openqa.org Tue Jan 2 17:05:55 2007 From: forum-watir-users at openqa.org (Dave Munns) Date: Tue, 02 Jan 2007 16:05:55 CST Subject: [Wtr-general] CRITICAL---Clicking Image Button in Application In-Reply-To: <39734818.1166624217749.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <57029231.1167775589196.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Woud you post the html for the image? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5867&messageID=16714#16714 From balakrishna.venkatappa at ionidea.com Tue Jan 2 17:01:22 2007 From: balakrishna.venkatappa at ionidea.com (Balakrishna) Date: Tue, 2 Jan 2007 17:01:22 -0500 Subject: [Wtr-general] javascript Menu Message-ID: <008701c72eb9$8d2e07a0$a78a16e0$@venkatappa@ionidea.com> Hello, Anyone handled javascript menu's using watir ??.. I'm sort of stuck at this point, I need to click on a javascipt drop down menu, but not able to click on the menu. Any ideas ? Balu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070102/c3177bb8/attachment-0001.html From Mark_Cain at RL.gov Tue Jan 2 17:17:15 2007 From: Mark_Cain at RL.gov (Cain, Mark) Date: Tue, 2 Jan 2007 14:17:15 -0800 Subject: [Wtr-general] how to minimize the command prompt In-Reply-To: <20061221075718.13465.qmail@web7808.mail.in.yahoo.com> Message-ID: <4440693B7CFF2440ABC2E0BE480DABA10A3664@EX01-2.rl.gov> Change this line from: c = "start ruby #{shortName}\\watir\\clickJSDialog.rb #{button} #{waitTime} " to: c = "start rubyw #{shortName}\\watir\\clickJSDialog.rb #{button} #{waitTime} " --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of VIKASH KUMAR Sent: Wednesday, December 20, 2006 11:57 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] how to minimize the command prompt I running test cases under Windows Environment, using ruby, watir 1.5.1.1100. I have the following code: require 'watir' # the watir controller require 'watir/winClicker.rb' require 'watir\contrib\enabled_popup' test = "C:\\aa.htm" ie=Watir::IE.start(test) def startClicker( button,ie,waitTime = 3) w = WinClicker.new longName = ie.dir.gsub("/" , "\\" ) shortName = w.getShortFileName(longName) c = "start ruby #{shortName}\\watir\\clickJSDialog.rb #{button} #{waitTime} " puts "Starting #{c}" w.winsystem(c) w=nil end startClicker("OK",ie,3) ie.button("Submit").click The above is working fine, but when the method startClicker is called, it displays a command shell/prompt of ruby.exe, showing some message. I want the command shell/prompt doesn't comes up or if it is necessary for the prompt to come up, it should open in minimized state. Please, help me out from this. Thanks in advance Vikash Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070102/aa69a04d/attachment.html From charley.baker at gmail.com Tue Jan 2 17:35:37 2007 From: charley.baker at gmail.com (Charley Baker) Date: Tue, 2 Jan 2007 15:35:37 -0700 Subject: [Wtr-general] javascript Menu In-Reply-To: <592392191723562310@unknownmsgid> References: <592392191723562310@unknownmsgid> Message-ID: I've done it in two ways. Call ie.goto on the link that the menu item points to, kind of cheating, but it works for testing one of my apps. The other option is to fire a javascript event which generally brings up a hidden div or something of the like. ie.link(..).fire_event('onClick') ie.link(..).click or ie.link(..).fire_event('onClick') If you have specific code that you can post, we can give more specific answers. -Charley On 1/2/07, Balakrishna wrote: > > Hello, > > Anyone handled javascript menu's using watir ??.. I'm sort of stuck at > this point, I need to click on a javascipt drop down menu, but not able to > click on the menu. Any ideas ? > > > > Balu > > > > _______________________________________________ > 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/20070102/4825e2fc/attachment.html From charley.baker at gmail.com Tue Jan 2 17:37:41 2007 From: charley.baker at gmail.com (Charley Baker) Date: Tue, 2 Jan 2007 15:37:41 -0700 Subject: [Wtr-general] Give a solution fo javascript popup In-Reply-To: <4440693B7CFF2440ABC2E0BE480DABA10A3663@EX01-2.rl.gov> References: <4440693B7CFF2440ABC2E0BE480DABA10A3663@EX01-2.rl.gov> Message-ID: Mark, You mind posting that to the FAQ site? Definitely an FAQ and then you or anyone can send out the url. -Charley On 1/2/07, Cain, Mark wrote: > > I have posted this many time, it is the most reliable JS popup method I > have every used. It will even work for the input box (by supplying the > user_input="whatever the user would input") and file upload dialog (by > supplying user_input='&Save' or '&Open'). It is better and more reliable > than the one linked below. > > > > require 'watir\contrib\enabled_popup' > > > > def startClicker( button , waitTime=9, user_input=nil ) > > hwnd = $ie.enabled_popup(waitTime) # get a handle if one exists > > *if* (hwnd) # yes there is a popup > > w = WinClicker.new > > *if* ( user_input ) > > w.setTextValueForFileNameField( hwnd, "#{user_input}" ) > > *end* > > sleep 3 # I put this in to see the text being input it is not > necessary to work > > w.clickWindowsButton_hwnd( hwnd, "#{button}" ) # "OK" or whatever > the name on the button is > > w=nil # this is just cleanup > > *end* > > end > > > > $ie=Watir::IE.start("c:\test.htm") > > > > # This is whatever object that uses the click method. > > # You MUST use the click_no_wait method. > > $ie.image(:id,'3').click_no_wait > > startClicker("OK", 7, "User Input") # 3rd parameter is optional. > > > > > > > > *--Mark* > > > ------------------------------ > > *From:* wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org] *On Behalf Of *Charley Baker > *Sent:* Thursday, December 21, 2006 8:22 AM > *To:* wtr-general at rubyforge.org > *Subject:* Re: [Wtr-general] Give a solution fo javascript popup > > > > Google is your friend, searching for watir javascript dialog, this is the > first link: > http://www.hanselman.com/blog/ClickingAJavaScriptDialogUsingWatir.aspx > > -Charley > > On 12/20/06, *liucongying* wrote: > > I use ruby185-21 and watir-1.5.1.1127.gem, I want a solution fo js pop the > web html is the one in watir \unittests\html --- > JavascriptClick.html。 > So i hope someone can give me codes of watir to solve js popup,do not > use aotoit! thanks > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=5883&messageID=16456#16456 > _______________________________________________ > 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/20070102/12fef6eb/attachment-0001.html From Mark_Cain at RL.gov Tue Jan 2 17:50:57 2007 From: Mark_Cain at RL.gov (Cain, Mark) Date: Tue, 2 Jan 2007 14:50:57 -0800 Subject: [Wtr-general] Give a solution fo javascript popup In-Reply-To: Message-ID: <4440693B7CFF2440ABC2E0BE480DABA10A3665@EX01-2.rl.gov> Do I have access to edit the FAQ page? I have a login. --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Charley Baker Sent: Tuesday, January 02, 2007 2:38 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Give a solution fo javascript popup Mark, You mind posting that to the FAQ site? Definitely an FAQ and then you or anyone can send out the url. -Charley On 1/2/07, Cain, Mark wrote: I have posted this many time, it is the most reliable JS popup method I have every used. It will even work for the input box (by supplying the user_input="whatever the user would input") and file upload dialog (by supplying user_input='&Save' or '&Open'). It is better and more reliable than the one linked below. require ' watir\contrib\enabled_popup' def startClicker( button , waitTime= 9, user_input=nil ) hwnd = $ie.enabled_popup(waitTime) # get a handle if one exists if (hwnd) # yes there is a popup w = WinClicker.new if ( user_input ) w.setTextValueForFileNameField( hwnd, "#{user_input}" ) end sleep 3 # I put this in to see the text being input it is not necessary to work w.clickWindowsButton_hwnd( hwnd, "#{button}" ) # "OK" or whatever the name on the button is w=nil # this is just cleanup end end $ie =Watir:: IE.start(" c:\t est.htm") # This is whatever object that uses the click method. # You MUST use the click_no_wait method. $ie .image(:id, '3' ).click_no_wait startClicker("OK ", 7 , "User Input") # 3rd parameter is optional. --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Charley Baker Sent: Thursday, December 21, 2006 8:22 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Give a solution fo javascript popup Google is your friend, searching for watir javascript dialog, this is the first link: http://www.hanselman.com/blog/ClickingAJavaScriptDialogUsingWatir.aspx -Charley On 12/20/06, liucongying wrote: I use ruby185-21 and watir-1.5.1.1127.gem, I want a solution fo js pop the web html is the one in watir \unittests\html ---JavascriptClick.html。 So i hope someone can give me codes of watir to solve js popup,do not use aotoit! thanks --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5883&messageID=16456#16456 _______________________________________________ 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/20070102/93a0c514/attachment.html From charley.baker at gmail.com Tue Jan 2 17:57:17 2007 From: charley.baker at gmail.com (Charley Baker) Date: Tue, 2 Jan 2007 15:57:17 -0700 Subject: [Wtr-general] Give a solution fo javascript popup In-Reply-To: <4440693B7CFF2440ABC2E0BE480DABA10A3665@EX01-2.rl.gov> References: <4440693B7CFF2440ABC2E0BE480DABA10A3665@EX01-2.rl.gov> Message-ID: Sure, the FAQ is on a wiki with global rights. Anyone can add to the FAQs. -c On 1/2/07, Cain, Mark wrote: > > Do I have access to edit the FAQ page? I have a login. > > > > *--Mark* > > > ------------------------------ > > *From:* wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org] *On Behalf Of *Charley Baker > *Sent:* Tuesday, January 02, 2007 2:38 PM > *To:* wtr-general at rubyforge.org > *Subject:* Re: [Wtr-general] Give a solution fo javascript popup > > > > Mark, > > You mind posting that to the FAQ site? Definitely an FAQ and then you or > anyone can send out the url. > > -Charley > > On 1/2/07, *Cain, Mark * wrote: > > I have posted this many time, it is the most reliable JS popup method I > have every used. It will even work for the input box (by supplying the > user_input="whatever the user would input") and file upload dialog (by > supplying user_input='&Save' or '&Open'). It is better and more reliable > than the one linked below. > > > > require ' watir\contrib\enabled_popup' > > > > def startClicker( button , waitTime= 9, user_input=nil ) > > hwnd = $ie.enabled_popup(waitTime) # get a handle if one exists > > *if *(hwnd) # yes there is a popup > > w = WinClicker.new > > *if* ( user_input ) > > w.setTextValueForFileNameField( hwnd, "#{user_input}" ) > > *end* > > sleep 3 # I put this in to see the text being input it is not > necessary to work > > w.clickWindowsButton_hwnd( hwnd, "#{button}" ) # "OK" or whatever > the name on the button is > > w=nil # this is just cleanup > > *end* > > end > > > > $ie =Watir:: IE.start(" c:\t est.htm") > > > > # This is whatever object that uses the click method. > > # You MUST use the click_no_wait method. > > $ie .image(:id, '3' ).click_no_wait > > startClicker("OK ", 7 , "User Input") # 3rd parameter is optional. > > > > > > > > *--Mark* > > > ------------------------------ > > *From:* wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org] *On Behalf Of *Charley Baker > *Sent:* Thursday, December 21, 2006 8:22 AM > *To:* wtr-general at rubyforge.org > *Subject:* Re: [Wtr-general] Give a solution fo javascript popup > > > > Google is your friend, searching for watir javascript dialog, this is the > first link: > http://www.hanselman.com/blog/ClickingAJavaScriptDialogUsingWatir.aspx > > -Charley > > On 12/20/06, *liucongying* wrote: > > I use ruby185-21 and watir-1.5.1.1127.gem, I want a solution fo js pop the > web html is the one in watir \unittests\html --- > JavascriptClick.html。 > So i hope someone can give me codes of watir to solve js popup,do not > use aotoit! thanks > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=5883&messageID=16456#16456 > _______________________________________________ > 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/20070102/9b031286/attachment-0001.html From forum-watir-users at openqa.org Tue Jan 2 18:05:06 2007 From: forum-watir-users at openqa.org (Nathan) Date: Tue, 02 Jan 2007 17:05:06 CST Subject: [Wtr-general] javascript Menu In-Reply-To: <592392191723562310@unknownmsgid> Message-ID: <55776653.1167779150621.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> So I will assume that you are talking about a menu that when your cursor is over it, the menu drops down or appears, and then you can click on a link, is this correct? Here is a brief code snippet from one of my scripts. I will explain it in detail. $objWatirBrowser.image(:id, "menu_SearchInventory").fireEvent("onMouseOver") # Mouse over the menu $objWatirBrowser.textField(:id, "nav_new_vsZipCode").set($objProperties.strCurrentZipCode) # Set the zip code $objWatirBrowser.link(:id, "nav_new_vsZipCode_a").click # Click on the Next image $objWatirBrowser is an instance or object of IE. You probably have something similar already. The image I am referencing on the first line is an image that represents my menu, maybe you have a div instead or something else, then change it to what you need. The fireEvent method after that causes the browser to think that there is a mouse cursor over the menu. This results in making the menu appear or drop down. On the second line I fill in a field that is located on my menu. This is pretty atypical (not normal), but you can do that if you need to. On the third line I am clicking on a link that is in my menu again. I hope that this may help you somewhat in answering your question. Basically the steps I've taken here are: 1. Mouse Over the menu to make it appear 2. Enter data into a text field on the menu 3. Click on a link on the menu Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5973&messageID=16724#16724 From forum-watir-users at openqa.org Tue Jan 2 18:10:40 2007 From: forum-watir-users at openqa.org (Nathan) Date: Tue, 02 Jan 2007 17:10:40 CST Subject: [Wtr-general] CRITICAL---Clicking Image Button in Application In-Reply-To: <39734818.1166624217749.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <57787722.1167779470604.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Wow, well I'd simply try doing the same thing as you are doing, but if you're trying to click on something that has <img ...> for its tag, then use ie.image(...) and not ie.button(...). ie.button(...) would be used if you were clicking on soomething with the tag <input type="button"...>. Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5867&messageID=16725#16725 From charley.baker at gmail.com Tue Jan 2 18:30:52 2007 From: charley.baker at gmail.com (Charley Baker) Date: Tue, 2 Jan 2007 16:30:52 -0700 Subject: [Wtr-general] javascript Menu In-Reply-To: <55776653.1167779150621.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <592392191723562310@unknownmsgid> <55776653.1167779150621.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Hey Nathan, Would you like to add this to the FAQs or the general Watir documentation? -Charley On 1/2/07, Nathan wrote: > > So I will assume that you are talking about a menu that when your cursor > is over it, the menu drops down or appears, and then you can click on a > link, is this correct? Here is a brief code snippet from one of my > scripts. I will explain it in detail. > > $objWatirBrowser.image(:id, > "menu_SearchInventory").fireEvent("onMouseOver") # Mouse over the menu > $objWatirBrowser.textField(:id, > "nav_new_vsZipCode").set($objProperties.strCurrentZipCode) # Set the zip > code > $objWatirBrowser.link(:id, "nav_new_vsZipCode_a").click # Click on the > Next image > > $objWatirBrowser is an instance or object of IE. You probably have > something similar already. The image I am referencing on the first line is > an image that represents my menu, maybe you have a div instead or something > else, then change it to what you need. The fireEvent method after that > causes the browser to think that there is a mouse cursor over the > menu. This results in making the menu appear or drop down. > > On the second line I fill in a field that is located on my menu. This is > pretty atypical (not normal), but you can do that if you need to. > > On the third line I am clicking on a link that is in my menu again. I > hope that this may help you somewhat in answering your question. Basically > the steps I've taken here are: > > 1. Mouse Over the menu to make it appear > 2. Enter data into a text field on the menu > 3. Click on a link on the menu > > Nathan > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=5973&messageID=16724#16724 > _______________________________________________ > 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/20070102/9c7c8012/attachment.html From gmaralina at beingpresent.org Tue Jan 2 18:33:36 2007 From: gmaralina at beingpresent.org (Galina Maralina) Date: Tue, 2 Jan 2007 15:33:36 -0800 Subject: [Wtr-general] Problem with Autoit? In-Reply-To: Message-ID: <016801c72ec6$6f2cae70$3700a8c0@dbrblackcompaq> It did work, thank you very much. Galina. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Charley Baker Sent: Tuesday, December 26, 2006 1:29 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Problem with Autoit? Does it still fail if you manually install AutoIt as I mentioned in my last email? -c On 12/26/06, Galina Maralina < gmaralina at beingpresent.org > wrote: No, I am running Watir under administrator and I still can not solve this problem... Any more ideas? Thank you, Galina. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto: wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Tuesday, December 26, 2006 10:40 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Problem with Autoit? Charley Baker wrote: > You might need to register the dll. Open a command prompt where > AutoItX3.dll is installed. From the gem install you'll need to go to > {ruby_install}\lib\ruby\gems\1.8\gems\watir- 1.5.1.1135\watir where > you'll find the dll and then run regsvr32 AutoIt3X.dll Watir will do this automatically IF run with administrator rights. The OP's problem is probably due to the fact that they are running Watir under a user that does not have administrator privileges. Bret _______________________________________________ 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/20070102/f4f387c9/attachment.html From forum-watir-users at openqa.org Tue Jan 2 18:39:58 2007 From: forum-watir-users at openqa.org (Dave Munns) Date: Tue, 02 Jan 2007 17:39:58 CST Subject: [Wtr-general] Referencing dynamically generated objects Message-ID: <50523791.1167781354511.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Happy New Year!

I have a question that concerns dynamically generated html tags and how to reference them. In a specific frame, a certain operation creates a new object. This object was given a name by my automation tool to make it unique and recognizable by my tool.

I can reference the object using ...image( :id,'imgTreeNodePlusMinus_8158' ) which is a product generated identifier which is a value that I cannot predict. What I want to use is the identifier that my tool generates, in this case 'A0MGdyn0.78108587205286'.

The html for the object is:

Active Element: [SPAN], Frame: [fraNavigation], Index: [150] class=DATAZONE-TREE-NODE-TEXT id=spnNodeText_8158 onmouseover=treeItemMouseOver(); style="COLOR: #7d69d6; TEXT-DECORATION: underline" onclick=navToASPPageForNode(); onmouseout=treeItemMouseOut(); udefModuleID="8" udefNodeDesc="A0MGdyn0.78108587205286 for DEV2003DC" udefModuleName="Administration " udefNodeID="158" udefASP="" udefContext="machines" udefNodeTitle="A0MGdyn0.78108587205286" udefHelp="AdminMachMngrMGDynam.htm" udefParentNodeID="7"> A0MGdyn0.78108587205286

The only unchanging identifier for this object is the value 'A0MGdyn0.78108587205286'. Is there a way to reference the object using this value?

I have tried: .image( :id, /A0MGdyn0.78108587205286/ ).click .image( :id, 'A0MGdyn0.78108587205286' ).click .image( :title, 'A0MGdyn0.78108587205286' ).click as well as .span with the above parameters. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5974&messageID=16727#16727 From forum-watir-users at openqa.org Tue Jan 2 23:43:28 2007 From: forum-watir-users at openqa.org (san) Date: Tue, 02 Jan 2007 22:43:28 CST Subject: [Wtr-general] Image Uploading Problem.... In-Reply-To: Message-ID: <42743098.1167799438164.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I'm with watir 1.4.... & May Be Thats The Reason That ie.file_field(:name, "file1").set("c:\\Program Files\\input.txt") Is Not Working For Me... Ok Let Me Try 1.5 & Hope It Will Be Fine... --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5951&messageID=16733#16733 From bret at pettichord.com Wed Jan 3 00:16:26 2007 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 02 Jan 2007 23:16:26 -0600 Subject: [Wtr-general] Referencing dynamically generated objects In-Reply-To: <50523791.1167781354511.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <50523791.1167781354511.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <459B3C2A.4080408@pettichord.com> try .span(:text, 'A0MGdyn0.78108587205286') Use Watir 1.5. From angrez at gmail.com Wed Jan 3 00:21:05 2007 From: angrez at gmail.com (Angrez Singh) Date: Wed, 3 Jan 2007 10:51:05 +0530 Subject: [Wtr-general] Image Uploading Problem.... In-Reply-To: <42743098.1167799438164.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <42743098.1167799438164.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Hi san, Try the following with watir 1.4 ie.file_field(:name, "file1").set("\"c:\\Program Files\\input.txt\"") Try appending double quotes to the name of the file. Regards, Angrez On 1/3/07, san wrote: > > I'm with watir 1.4.... & May Be Thats The Reason That ie.file_field(:name, > "file1").set("c:\\Program Files\\input.txt") Is Not Working For Me... Ok Let > Me Try 1.5 & Hope It Will Be Fine... > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=5951&messageID=16733#16733 > _______________________________________________ > 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/20070103/4b2d882a/attachment-0001.html From ajitesh.srinetra at gmail.com Wed Jan 3 00:58:13 2007 From: ajitesh.srinetra at gmail.com (Ajitesh Srinetra) Date: Wed, 3 Jan 2007 11:28:13 +0530 Subject: [Wtr-general] assertion on the color of the row of a table Message-ID: <4f6da15b0701022158n4395fbeeid08f9dcc60850740@mail.gmail.com> Hi everyone In my application I want to assert on the color of the row of a particular table. Based on the certain rules the color of these rows are changing.so every time i need to assert on those . The color is defined in html Thank you in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070103/cf54395c/attachment.html From forum-watir-users at openqa.org Wed Jan 3 02:20:37 2007 From: forum-watir-users at openqa.org (joyboy_chan) Date: Wed, 03 Jan 2007 01:20:37 CST Subject: [Wtr-general] how to know the content of a table 's colomn and row In-Reply-To: <56053031.1166775390508.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <50343549.1167808867092.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> 1. you can get a table instance by table id or table index, like table = $ie.table(:index, 3). 2. you can get the cell instance by cell = table[1][1], this is the cell located at first column, first row. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5898&messageID=16736#16736 From forum-watir-users at openqa.org Wed Jan 3 02:43:33 2007 From: forum-watir-users at openqa.org (joyboy_chan) Date: Wed, 03 Jan 2007 01:43:33 CST Subject: [Wtr-general] Issue WTR-108 - file_field.set not working In-Reply-To: <38432060.1166200175675.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <34703098.1167810262320.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I think so. Method ie.file_field(:id, '').set(file_path) does not work correctly. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5766&messageID=16739#16739 From zeljko.filipin at gmail.com Wed Jan 3 04:04:24 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Wed, 3 Jan 2007 10:04:24 +0100 Subject: [Wtr-general] assertion on the color of the row of a table In-Reply-To: <4f6da15b0701022158n4395fbeeid08f9dcc60850740@mail.gmail.com> References: <4f6da15b0701022158n4395fbeeid08f9dcc60850740@mail.gmail.com> Message-ID: I forgot to ask you to post your html. If you have html that looks like this
text
you can get the html of cell with this (watir 1.5.1.1081) irb(main):005:0> ie.table(:index, 1)[1][1].html => "\r\ntext " If you want to see if there is text "red" (without quotes) this will do it irb(main):012:0> ie.table(:index, 1)[1][1].html.match("red") => # Just to make shure, it would return nil for any other colour irb(main):014:0> ie.table(:index, 1)[1][1].html.match("black") => nil I could be more precise if you posted a html snippet. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070103/0dbe6ed6/attachment.html From angrez at gmail.com Wed Jan 3 04:26:43 2007 From: angrez at gmail.com (Angrez Singh) Date: Wed, 3 Jan 2007 14:56:43 +0530 Subject: [Wtr-general] assertion on the color of the row of a table In-Reply-To: References: <4f6da15b0701022158n4395fbeeid08f9dcc60850740@mail.gmail.com> Message-ID: Hi Ajitesh, If you have HTML like this: > > > > >
> text >
Then you can directly use the method attribute_value to get the value for bgcolor like this: ie.table(:index, 1)[1][1].attribute_value("bgcolor") Regards, Angrez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070103/5320e029/attachment.html From forum-watir-users at openqa.org Wed Jan 3 10:44:40 2007 From: forum-watir-users at openqa.org (Nathan) Date: Wed, 03 Jan 2007 09:44:40 CST Subject: [Wtr-general] javascript Menu In-Reply-To: Message-ID: <59005694.1167839110664.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hmm, thanks for the idea, but I don't have any sort of access to either of those documents. So if you do or know somebody who does, then go ahead. Sorry, and thanks again. Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5973&messageID=16750#16750 From forum-watir-users at openqa.org Wed Jan 3 10:45:58 2007 From: forum-watir-users at openqa.org (Dave Munns) Date: Wed, 03 Jan 2007 09:45:58 CST Subject: [Wtr-general] Referencing dynamically generated objects In-Reply-To: <50523791.1167781354511.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <37970512.1167839192610.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thanks Brett, that worked! Is there documentation that describes the arguments available for each object? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5974&messageID=16751#16751 From forum-watir-users at openqa.org Wed Jan 3 11:03:38 2007 From: forum-watir-users at openqa.org (Nathan) Date: Wed, 03 Jan 2007 10:03:38 CST Subject: [Wtr-general] How do I click the "OK" button on a java alert? In-Reply-To: <41922599.1166218145437.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <40581542.1167840248825.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hey, so it seems like you're getting some mixed ideas here. First thing, WATIR uses AutoIt to click on JavaScript or Modal dialogs from IE. Second AutoIt isn't flakey - it's very solid, but you need to know how to use it. I have a solution to clicking on modal dialogs, and I just run it when I think there could be a dialog. Here's my method, and I'll explain it in detail. *********************************************************** def intCloseDialog()   # Create an AutoIt object to use to click on open dialogs   objAutoit = WIN32OLE.new("AutoItX3.Control")   # Look for any open dialogs and close them   ans1 = objAutoit.ControlClick("Microsoft Internet Explorer",'', 'OK')   ans2 = objAutoit.ControlClick("Security Information",'', '&Yes')   ans3 = objAutoit.ControlClick("Security Alert",'', '&Yes')   # Release the clicker object   objAutoit = nil   return (ans1 + ans2 + ans3) end # End: def voidCloseDialog() *********************************************************** First off, you'll need to require "win32ole" for this to work. If you have required watir already then, win32ole should also already be required for you. Now on the first line I create a new WIN32OLE object that is associated with the AutoItX3.Control OLE server. On the second line I tell the objAutoit object to click on a control (dialog in this case) with the title Microsoft Internet Explorer and on the button labeled "OK". I do a similar thing on the next two lines, those are just other possible titles for my dialogs. On the fifth line I set my object to nil so that the memory is cleaned up, then I return the result of having clicked on each on the dialogs. What happens here is AutoIt looks for the dialog first and if it exists then it tries to click on the button you told it to, also if it exists then it returns 1. But if it doesn't exist, then ControlClick returns zero. I just use that number for debugging - it is in no way required for anything. I hope that this actual answer helps you out a little more. AutoIt is a very good tool - I use it in another program I've installed called AutoHotkey. It is a macro program for Windows. AutoIt has a lot of capabilities, so don't not use it! :) Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5802&messageID=16752#16752 From balakrishna.venkatappa at ionidea.com Wed Jan 3 11:25:45 2007 From: balakrishna.venkatappa at ionidea.com (Balakrishna) Date: Wed, 3 Jan 2007 11:25:45 -0500 Subject: [Wtr-general] javascript Menu In-Reply-To: <55776653.1167779150621.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <592392191723562310@unknownmsgid> <55776653.1167779150621.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <000b01c72f53$d49ae320$7dd0a960$@venkatappa@ionidea.com> Hi Nathan : Thanks for wonderful explanation. I could resolve the issue. Thanks Balu -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Nathan Sent: Tuesday, January 02, 2007 6:05 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] javascript Menu So I will assume that you are talking about a menu that when your cursor is over it, the menu drops down or appears, and then you can click on a link, is this correct? Here is a brief code snippet from one of my scripts. I will explain it in detail. $objWatirBrowser.image(:id, "menu_SearchInventory").fireEvent("onMouseOver") # Mouse over the menu $objWatirBrowser.textField(:id, "nav_new_vsZipCode").set($objProperties.strCurrentZipCode) # Set the zip code $objWatirBrowser.link(:id, "nav_new_vsZipCode_a").click # Click on the Next image $objWatirBrowser is an instance or object of IE. You probably have something similar already. The image I am referencing on the first line is an image that represents my menu, maybe you have a div instead or something else, then change it to what you need. The fireEvent method after that causes the browser to think that there is a mouse cursor over the menu. This results in making the menu appear or drop down. On the second line I fill in a field that is located on my menu. This is pretty atypical (not normal), but you can do that if you need to. On the third line I am clicking on a link that is in my menu again. I hope that this may help you somewhat in answering your question. Basically the steps I've taken here are: 1. Mouse Over the menu to make it appear 2. Enter data into a text field on the menu 3. Click on a link on the menu Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5973&messageID=16724#16724 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From balakrishna.venkatappa at ionidea.com Wed Jan 3 11:28:45 2007 From: balakrishna.venkatappa at ionidea.com (Balakrishna) Date: Wed, 3 Jan 2007 11:28:45 -0500 Subject: [Wtr-general] Attaching modal popup windows ( html) Message-ID: <001401c72f54$40441330$c0cc3990$@venkatappa@ionidea.com> Hello all, I am having a modal ( without address bar) popup window which has a form and I need to fill some data into the same. I tried attaching the window using the title, but it does seem to recognize the window. I also tried to attaching using url but not successful either. Any suggestions is appreciated. Thanks Balu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070103/c88d1062/attachment-0001.html From bret at pettichord.com Wed Jan 3 11:30:50 2007 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 03 Jan 2007 10:30:50 -0600 Subject: [Wtr-general] Referencing dynamically generated objects In-Reply-To: <37970512.1167839192610.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <37970512.1167839192610.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <459BDA3A.8050905@pettichord.com> Dave Munns wrote: > Thanks Brett, that worked! Is there documentation that describes the arguments available for each object? > I was going to say that you could look at the rdoc for Watir::Element, but for some reason this is not being generated. If anyone knows how to debug RDOC problems, i'd appreciate any advice you could give. Specifically, no doc is being generated for Watir::Element or any of its subclasses. Other classes are not getting all their methods documented. Use "rake rdoc" to generate rdoc for our source. If you are using the gem, you can get the current (incomplete) rdoc from the gem rdoc server. Bret From charley.baker at gmail.com Wed Jan 3 12:21:25 2007 From: charley.baker at gmail.com (Charley Baker) Date: Wed, 3 Jan 2007 10:21:25 -0700 Subject: [Wtr-general] Attaching modal popup windows ( html) In-Reply-To: <-5130025807875394693@unknownmsgid> References: <-5130025807875394693@unknownmsgid> Message-ID: If you're using the latest Watir 1.5 and Ruby 1.8.2, you can use ie.modal_dialog, Watir 1.4 doesn't support modals: -Charley On 1/3/07, Balakrishna wrote: > > Hello all, > > > > I am having a modal ( without address bar) popup window which has a form > and I need to fill some data into the same. I tried attaching the window > using the title, but it does seem to recognize the window. I also tried to > attaching using url but not successful either. Any suggestions is > appreciated. > > > > Thanks > > Balu > > > > _______________________________________________ > 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/20070103/91feb018/attachment.html From balakrishna.venkatappa at ionidea.com Wed Jan 3 14:32:40 2007 From: balakrishna.venkatappa at ionidea.com (Balakrishna) Date: Wed, 3 Jan 2007 14:32:40 -0500 Subject: [Wtr-general] Attaching modal popup windows ( html) In-Reply-To: References: <-5130025807875394693@unknownmsgid> Message-ID: <006801c72f6d$f16a3a40$d43eaec0$@venkatappa@ionidea.com> Hi Charlie : I tried after installing watir 1.5, I still get the following error message. irb(main):005:0> ie2=ie.modal_dialog(:title,'/LSOG 9/') Watir::Exception::TimeOutException: Timed out after 2.5 seconds. from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir/waiter.rb:5 5:in `wait_until' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:211:in ` until_with_timeout' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:2643:in `locate' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:2678:in `initialize' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:464:in ` new' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:464:in ` modal_dialog' from (irb):5 irb(main):006:0> how can I confirm that the window is a modal window ?.. It does not have address bar .. Thanks Balu From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Charley Baker Sent: Wednesday, January 03, 2007 12:21 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Attaching modal popup windows ( html) If you're using the latest Watir 1.5 and Ruby 1.8.2, you can use ie.modal_dialog, Watir 1.4 doesn't support modals: -Charley On 1/3/07, Balakrishna wrote: Hello all, I am having a modal ( without address bar) popup window which has a form and I need to fill some data into the same. I tried attaching the window using the title, but it does seem to recognize the window. I also tried to attaching using url but not successful either. Any suggestions is appreciated. Thanks Balu _______________________________________________ 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/20070103/a408b7d6/attachment.html From bret at pettichord.com Wed Jan 3 14:32:50 2007 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 03 Jan 2007 13:32:50 -0600 Subject: [Wtr-general] how to access an element whose html tag is In-Reply-To: References: <33181915.1166696721240.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <459C04E2.7070402@pettichord.com> > 2. why does watir say "undefined class 'element' for frame' when > executing the following statement: > > > ie.frame("Detail").element(:text,"Step 2. Inventors").exists? > > Does'nt the word 'element' signify some general object? > Not yet. From mail at chriss-baumann.de Wed Jan 3 15:15:47 2007 From: mail at chriss-baumann.de (Christian Baumann) Date: Wed, 03 Jan 2007 21:15:47 +0100 Subject: [Wtr-general] Attaching modal popup windows ( html) In-Reply-To: <006801c72f6d$f16a3a40$d43eaec0$@venkatappa@ionidea.com> References: <-5130025807875394693@unknownmsgid> <006801c72f6d$f16a3a40$d43eaec0$@venkatappa@ionidea.com> Message-ID: <459C0EF3.2010704@chriss-baumann.de> Hello Balakrishna, to make sure that it is a modal dialog, checkt the definition: "In user interface design, a modal window (often called modal dialog because the window is almost always used to display a dialog box) is a child window, which has to be closed before the user can return to operating the parent application." (http://en.wikipedia.org/wiki/Modal_window) Regards, Christian Balakrishna schrieb: > > Hi Charlie : > > > > I tried after installing watir 1.5, I still get the following error > message. > > > > irb(main):005:0> ie2=ie.modal_dialog(:title,'/LSOG 9/') > > Watir::Exception::TimeOutException: Timed out after 2.5 seconds. > > from > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir/waiter.rb:5 > > 5:in `wait_until' > > from > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:211:in ` > > until_with_timeout' > > from > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:2643:in > > `locate' > > from > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:2678:in > > `initialize' > > from > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:464:in ` > > new' > > from > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:464:in ` > > modal_dialog' > > from (irb):5 > > irb(main):006:0> > > > > how can I confirm that the window is a modal window ?.. It does not > have address bar .. > > > > Thanks > > Balu > > > > > > *From:* wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] *On Behalf Of *Charley Baker > *Sent:* Wednesday, January 03, 2007 12:21 PM > *To:* wtr-general at rubyforge.org > *Subject:* Re: [Wtr-general] Attaching modal popup windows ( html) > > > > If you're using the latest Watir 1.5 and Ruby 1.8.2, you can use > ie.modal_dialog, Watir 1.4 doesn't support modals: > > -Charley > > On 1/3/07, *Balakrishna * > wrote: > > Hello all, > > > > I am having a modal ( without address bar) popup window which has a > form and I need to fill some data into the same. I tried attaching the > window using the title, but it does seem to recognize the window. I > also tried to attaching using url but not successful either. Any > suggestions is appreciated. > > > > Thanks > > Balu > > > > > _______________________________________________ > 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/20070103/1c2dc5dc/attachment-0001.html From forum-watir-users at openqa.org Wed Jan 3 15:56:27 2007 From: forum-watir-users at openqa.org (Brad) Date: Wed, 03 Jan 2007 14:56:27 CST Subject: [Wtr-general] How to verify if SPAN is visible In-Reply-To: <36782797.1166657479535.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <39912371.1167858218776.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thank you all for replying to this thread and answering my question.

Angrez, I had difficulty using 'attribute_value'. Here is how I used it along with the html code.

HTML Code:


Ruby/Watir Code:
str_value=$browser.span(:id, "MainLogin_UserNameRequired").attribute_value("style")
puts str_value

Output:
#

I do have two solutions that work (see below) but I'm curious of how this might work. One other thing, for others, is the 'attribute_value' does not work for Watir version 1.4; use 1.5.

Zeljko, thanks this worked.

nchristie, thanks this worked.

I did not try the 'walk DOM tree for checking of disabled or non-visible elements'; this looks 'advanced'. :)

Brad --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5879&messageID=16765#16765 From forum-watir-users at openqa.org Wed Jan 3 16:04:52 2007 From: forum-watir-users at openqa.org (Dave Munns) Date: Wed, 03 Jan 2007 15:04:52 CST Subject: [Wtr-general] Select List in Modal Dialog Message-ID: <55156346.1167858351351.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Inside a modal dialog, I can reference a select_list and see the text OPTIONS, using ie.modal_dialog.div(:index,49).table(:index,2).select_list(:index,1).html When I try to select a choice, nothing happens. I have tried: 1) ie.modal_dialog.div(:index,49).table(:index,2).select_list(:index,1).options(:text,"OS Name").select 2) ie.modal_dialog.div(:index,49).table(:index,2).select_list(:index,1).options(:text,/OS Name/).select 3) ie.modal_dialog.div(:index,49).table(:index,2).select_list(:index,1).select("OS Name") 4) ie.modal_dialog.div(:index,49).table(:index,2).select_list(:index,1).select(/OS Name/) I know that I am referencing the correct object, because when I select with a value that is not in the list, Watir throws an UnknownObjectException. Is there another way to select an entry in a select list? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5982&messageID=16766#16766 From paul.rogers at shaw.ca Wed Jan 3 16:38:35 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 03 Jan 2007 14:38:35 -0700 Subject: [Wtr-general] How to verify if SPAN is visible In-Reply-To: <39912371.1167858218776.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <36782797.1166657479535.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <39912371.1167858218776.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: this line str_value=$browser.span(:id, "MainLogin_UserNameRequired").attribute_value("style") has given you the whole IE style object, you need to get the visibility part of it str_value=$browser.span(:id, "MainLogin_UserNameRequired").attribute_value("style").invoke("cssText") might give you what you want ( as a string, then use a regexp on it) or try str_value=$browser.span(:id, "MainLogin_UserNameRequired").attribute_value("style").invoke("VISIBILITY") may hvae to try lowercase as well I had to do something like this ages ago, and I think I used the cssText method Paul ----- Original Message ----- From: Brad Date: Wednesday, January 3, 2007 1:56 pm Subject: Re: [Wtr-general] How to verify if SPAN is visible > Thank you all for replying to this thread and answering my > question.

> Angrez, I had difficulty using 'attribute_value'. Here is how I > used it along with the html code.

> > HTML Code:
> id=MainLogin_UserNameRequired title="User Name is required." > style="VISIBILITY: hidden; COLOR: red" > controltovalidate="MainLogin_UserName" errormessage="User Name is > required." validationGroup="MainLogin" initialvalue > isvalid="true">*

> Ruby/Watir Code:
> str_value=$browser.span(:id, > "MainLogin_UserNameRequired").attribute_value("style")
puts > str_value

> > Output:
> # >

> > I do have two solutions that work (see below) but I'm curious of > how this might work. One other thing, for others, is the > 'attribute_value' does not work for Watir version 1.4; use > 1.5.

> Zeljko, thanks this worked.

> > nchristie, thanks this worked.

> > I did not try the 'walk DOM tree for checking of disabled or non- > visible elements'; this looks 'advanced'. :)

> > Brad > ------------------------------------------------------------------- > -- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=5879&messageID=16765#16765 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From charley.baker at gmail.com Wed Jan 3 16:48:25 2007 From: charley.baker at gmail.com (Charley Baker) Date: Wed, 3 Jan 2007 14:48:25 -0700 Subject: [Wtr-general] How to verify if SPAN is visible In-Reply-To: References: <36782797.1166657479535.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <01b801c7253a$e8a29b10$6400a8c0@laptop> Message-ID: Walking the tree is encapsulated inside the code, it's not advanced. Pull the code from the page: http://wiki.openqa.org/pages/viewpage.action?pageId=1119 Put it somewhere in your ruby load path, current directory works. Save the file to watir_ext.rb in your test directory, then use the following to try it out. require 'watir' require 'watir_ext' include Watir ie = IE.new ie.goto("www.someplace.com") button = ie.button(:id, 'somebutton') if button.visible? button.click else ie.close end -Charley On 12/21/06, Charley Baker wrote: > > There's a user contribution on the Wiki: > http://wiki.openqa.org/pages/viewpage.action?pageId=1119 that extends > element to walk the DOM tree and check for disabled or non-visible elements. > > > > -Charley > > On 12/21/06, Paul Rogers wrote: > > > > didnt some one post a is_visible? ( or visible?) method to the list? > > I think it walked up the dom tree looking to see if parent elements were > > visible, as the approach here wont work if the element that encloses the > > span ( if there is one ) is also hidden. > > > > Paul > > > > ----- Original Message ----- > > *From:* ?eljko Filipin > > *To:* wtr-general at rubyforge.org > > *Sent:* Thursday, December 21, 2006 2:45 AM > > *Subject:* Re: [Wtr-general] How to verify if SPAN is visible > > > > For > > > > > id="MainLogin_PasswordRequired">* > > > > you can use > > > > irb(main):015:0> ie.span(:id, "MainLogin_Password").html > > => " > style=\"VISIBILITY: visible; COLOR: red\">*" > > irb(main):016:0> ie.span(:id, "MainLogin_Password").html =~ /visible/ > > => 85 > > irb(main):017:0> ie.span(:id, "MainLogin_Password").html =~ /hidden/ > > => nil > > > > It is similar when span is hidden. > > > > Is this useful for you? Let me know if it is to cryptic, I will add more > > detail. > > -- > > Zeljko Filipin > > zeljkofilipin.com > > > > ------------------------------ > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070103/8a3040c2/attachment.html From forum-watir-users at openqa.org Wed Jan 3 17:02:55 2007 From: forum-watir-users at openqa.org (Brad) Date: Wed, 03 Jan 2007 16:02:55 CST Subject: [Wtr-general] How to verify if SPAN is visible In-Reply-To: Message-ID: <56406493.1167861813173.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thanks Paul...

Both 'invoke' statements worked.

Brad --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5879&messageID=16770#16770 From forum-watir-users at openqa.org Wed Jan 3 18:03:31 2007 From: forum-watir-users at openqa.org (Dave Munns) Date: Wed, 03 Jan 2007 17:03:31 CST Subject: [Wtr-general] Select List in Modal Dialog In-Reply-To: <55156346.1167858351351.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <48833964.1167865442362.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> It turns out that there are multiple paths to my select_list and one of them worked. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5982&messageID=16771#16771 From manishs at gs-lab.com Thu Jan 4 00:58:57 2007 From: manishs at gs-lab.com (Manish Sapariya) Date: Thu, 04 Jan 2007 11:28:57 +0530 Subject: [Wtr-general] click() in infinite loop while working with orkut Message-ID: <459C97A1.8020002@gs-lab.com> Hi, Please find attached a script to extract scrap information from orkut user. What I am seeing is that when I do click on submit button, the click call never returns. The tracing of the calls reveals that click function call is spinning because @ie.busy status never becoming false. I think the problem is in the OLE interface of ie which goes havoc when dealing with orkut. I would appreciate any pointers about how can I go step further in debugging. I have a workaround now by using timeout but this is very naive solution. I would also appreciate if I can have some patch in watir code so that I need not have timeout around every click call. (The attached script has work around code commented.) If needed I can send out my analysis using tracing. Environment: Watir 1.5 Thanks and Regards, Manish -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: OrkutScrapt.rb Url: http://rubyforge.org/pipermail/wtr-general/attachments/20070104/fca3fda9/attachment.ksh From bret at pettichord.com Thu Jan 4 02:11:54 2007 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 04 Jan 2007 01:11:54 -0600 Subject: [Wtr-general] click() in infinite loop while working with orkut In-Reply-To: <459C97A1.8020002@gs-lab.com> References: <459C97A1.8020002@gs-lab.com> Message-ID: <459CA8BA.7060000@pettichord.com> Manish Sapariya wrote: > Please find attached a script to extract scrap information from orkut > user. What I am seeing is that when I do click on submit button, the > click call never returns. The tracing of the calls reveals that click > function call is spinning because @ie.busy status never becoming false. Try calling the "click!" or "click_no_wait" methods instead. From bret at pettichord.com Thu Jan 4 02:15:02 2007 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 04 Jan 2007 01:15:02 -0600 Subject: [Wtr-general] How to verify if SPAN is visible In-Reply-To: References: <36782797.1166657479535.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <39912371.1167858218776.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <459CA976.8000307@pettichord.com> > str_value=$browser.span(:id, "MainLogin_UserNameRequired").attribute_value("style").invoke("cssText") > > I think that this might also do the same thing: str_value=$browser.span(:id, "MainLogin_UserNameRequired").style.cssText From manishs at gs-lab.com Thu Jan 4 02:44:27 2007 From: manishs at gs-lab.com (Manish Sapariya) Date: Thu, 04 Jan 2007 13:14:27 +0530 Subject: [Wtr-general] click() in infinite loop while working with orkut In-Reply-To: <459CA8BA.7060000@pettichord.com> References: <459C97A1.8020002@gs-lab.com> <459CA8BA.7060000@pettichord.com> Message-ID: <459CB05B.9060004@gs-lab.com> Thanks Bret. It worked. I would be glad if you can me point to anything that can explain the root cause of the problem and whats the solution. Thanks again. -Manish Bret Pettichord wrote: > Manish Sapariya wrote: >> Please find attached a script to extract scrap information from orkut >> user. What I am seeing is that when I do click on submit button, the >> click call never returns. The tracing of the calls reveals that click >> function call is spinning because @ie.busy status never becoming false. > Try calling the "click!" or "click_no_wait" methods instead. > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From forum-watir-users at openqa.org Thu Jan 4 03:36:16 2007 From: forum-watir-users at openqa.org (kim) Date: Thu, 04 Jan 2007 02:36:16 CST Subject: [Wtr-general] the problem about test cases organization. In-Reply-To: <56224402.1167728150671.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <28894447.1167899806356.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> > > No, use the setup.rb and read the readme I read the readme file. But there is no contents about setuping on windows in it. After I double-clicked the setup.rb, I inspect the lib folder of ruby and can't find the "reporter" files. :-( --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5943&messageID=16789#16789 From forum-watir-users at openqa.org Thu Jan 4 05:31:32 2007 From: forum-watir-users at openqa.org (Rahul Gupta) Date: Thu, 04 Jan 2007 04:31:32 CST Subject: [Wtr-general] Fire an event in tag Message-ID: <27592323.1167906722027.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Pls see the code. this is an web application. i want to fire the event inside the tag for Approval Inbox.


 
   
 
Launch Pad
--------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5992&messageID=16793#16793 From forum-watir-users at openqa.org Thu Jan 4 06:09:36 2007 From: forum-watir-users at openqa.org (Rahul Gupta) Date: Thu, 04 Jan 2007 05:09:36 CST Subject: [Wtr-general] fire events in tag Message-ID: <32785365.1167909006811.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> this is an web application The "Approval Inbox" is a label need to fire the 'onclick' event inside the tag
   
 
Launch Pad
--------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5994&messageID=16796#16796 From deveshverma at hcl.in Thu Jan 4 06:23:27 2007 From: deveshverma at hcl.in (Devesh Verma, HCL-Industry Solutions) Date: Thu, 4 Jan 2007 16:53:27 +0530 Subject: [Wtr-general] Fire an event in tag Message-ID: <2136F8BE059E084581E388FFC50316AAC21D69@GGN-HCLT-EVS01.HCLT.CORP.HCL.IN> Hey Rahul !!! Try this code ie.table(:index, 9)[3][2].image(:src, http://localhost/HRPrimeTimeWebUI/images/edit.gif").click simply click on the image of Approval Inbox !! Regards Devesh Verma -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Rahul Gupta Sent: Thursday, January 04, 2007 4:02 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Fire an event in tag Pls see the code. this is an web application. i want to fire the event inside the tag for Approval Inbox.

 
   
 
Launch Pad
--------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5992&messageID=16793#16793 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general DISCLAIMER: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. ----------------------------------------------------------------------------------------------------------------------- From ajitesh.srinetra at gmail.com Thu Jan 4 10:13:43 2007 From: ajitesh.srinetra at gmail.com (Ajitesh Srinetra) Date: Thu, 4 Jan 2007 20:43:43 +0530 Subject: [Wtr-general] assertion on the color of the row of a table Message-ID: <4f6da15b0701040713l36a1b79bnc15e839b7a9e1013@mail.gmail.com> Hi all , The html code looks like this
+919812005762 +918021000001   Outgoing PhoneNumber Here I have to assert on the color:#CC0033' not on the background color. PhoneNumber In this line PhoneNumber is one of the column of the row and the whole row is having color ahving color code '#CC0033' All other rows are having different color. I tried @ie.table(:id, 'IDNAME')[2].html.match("background-color:#33FFCC; color:#CC0033") but it's not working -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070104/78c4e48f/attachment.html From zeljko.filipin at gmail.com Thu Jan 4 10:34:35 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Thu, 4 Jan 2007 16:34:35 +0100 Subject: [Wtr-general] assertion on the color of the row of a table In-Reply-To: <4f6da15b0701040713l36a1b79bnc15e839b7a9e1013@mail.gmail.com> References: <4f6da15b0701040713l36a1b79bnc15e839b7a9e1013@mail.gmail.com> Message-ID: Try ie.table(:id, 'IDNAME' )[1][5].style.cssText == "COLOR: #cc0033; BACKGROUND-COLOR: #33ffcc" Of course, change "[1][5]" to match your cell. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070104/a92cabb1/attachment.html From forum-watir-users at openqa.org Thu Jan 4 11:01:27 2007 From: forum-watir-users at openqa.org (Brad) Date: Thu, 04 Jan 2007 10:01:27 CST Subject: [Wtr-general] How to verify if SPAN is visible In-Reply-To: Message-ID: <35413846.1167928202844.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thanks Charley for the further explanation...

This worked when adding 'watir_ext' as explained and the following:
visi_span=$browser.span(:id, "MainLogin_UserNameRequired")
if visi_span.visible?
puts "Span is visible"
else
puts "Span is _not_ visible"
end

~Brad --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5879&messageID=16812#16812 From bret at pettichord.com Thu Jan 4 11:59:33 2007 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 04 Jan 2007 10:59:33 -0600 Subject: [Wtr-general] click() in infinite loop while working with orkut In-Reply-To: <459CB05B.9060004@gs-lab.com> References: <459C97A1.8020002@gs-lab.com> <459CA8BA.7060000@pettichord.com> <459CB05B.9060004@gs-lab.com> Message-ID: <459D3275.8080600@pettichord.com> Manish Sapariya wrote: > Thanks Bret. > It worked. > > I would be glad if you can me point to anything that can explain > the root cause of the problem and whats the solution. > Thanks again. > -Manish > The root cause of the problem is that many methods, including "click" automatically wait until a browser is finished loading a page. This behavior is desirable when working with traditional web applications, but gives problems with ajaxy applications like orkut, because they are constantly loading data into the browser. With these apps, you'll have to use click! and then you'll also have to use wait_until to delay your script until the event has been processed sufficiently. Bret From charley.baker at gmail.com Thu Jan 4 12:15:24 2007 From: charley.baker at gmail.com (Charley Baker) Date: Thu, 4 Jan 2007 10:15:24 -0700 Subject: [Wtr-general] the problem about test cases organization. In-Reply-To: <28894447.1167899806356.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <56224402.1167728150671.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <28894447.1167899806356.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: In the readme file there is an installation section: == Installation Download and unpack the Test::Unit::Reporter. Change to the root user if you are on *nix. Issue the following commands: ruby setup.rb config ruby setup.rb install Run those commands at the command line. -Charley On 1/4/07, kim wrote: > > > > > No, use the setup.rb and read the readme > > I read the readme file. > But there is no contents about setuping on windows in it. > After I double-clicked the setup.rb, I inspect the lib folder of ruby and > can't find the "reporter" files. > :-( > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=5943&messageID=16789#16789 > _______________________________________________ > 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/20070104/ff5acf44/attachment.html From esjewett at gmail.com Thu Jan 4 14:07:18 2007 From: esjewett at gmail.com (Ethan Jewett) Date: Thu, 4 Jan 2007 13:07:18 -0600 Subject: [Wtr-general] Referencing dynamically generated objects In-Reply-To: <459BDA3A.8050905@pettichord.com> References: <37970512.1167839192610.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <459BDA3A.8050905@pettichord.com> Message-ID: <68f4a0e80701041107l21eb2a48g48c3bc3da397cea8@mail.gmail.com> Bret, It looks to me like the following piece of code in watir.rb (after the second method of the Watir module) is causing rdoc to stop parsing at that point. # add an error checker for http navigation errors, such as 404, 500 etc NAVIGATION_CHECKER = Proc.new do |ie| if ie.document.frames.length > 1 1.upto ie.document.frames.length do |i| begin ie.frame(:index, i).check_for_http_error rescue Watir::Exception::UnknownFrameException # frame can be already destroyed end end else ie.check_for_http_error end end When I comment this out, rdoc seems to get everything. Ethan On 1/3/07, Bret Pettichord wrote: > Dave Munns wrote: > > Thanks Brett, that worked! Is there documentation that describes the arguments available for each object? > > > I was going to say that you could look at the rdoc for Watir::Element, > but for some reason this is not being generated. > > If anyone knows how to debug RDOC problems, i'd appreciate any advice > you could give. Specifically, no doc is being generated for > Watir::Element or any of its subclasses. Other classes are not getting > all their methods documented. Use "rake rdoc" to generate rdoc for our > source. If you are using the gem, you can get the current (incomplete) > rdoc from the gem rdoc server. > > 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 Jan 4 20:20:59 2007 From: forum-watir-users at openqa.org (Brad) Date: Thu, 04 Jan 2007 19:20:59 CST Subject: [Wtr-general] What are people using for 'test executive'? Message-ID: <35346245.1167960135003.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Curious, what are users using for a 'test executive' that can drive multiple tests? Is there an open source 'test executive' written for Ruby test cases that would do the following:
* user can select individual test(s) or 'run all' in list
* can run test(s) multiple specified number of times or continuously
* test results are logged and shown in 'test executive'

If no open source, has anyone written something like this? If so, can I get a copy of this? Or can someone point me to a link that may help me in my investigation?

Thanks, Brad --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6009&messageID=16835#16835 From bret at pettichord.com Fri Jan 5 00:02:29 2007 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 04 Jan 2007 23:02:29 -0600 Subject: [Wtr-general] Referencing dynamically generated objects In-Reply-To: <68f4a0e80701041107l21eb2a48g48c3bc3da397cea8@mail.gmail.com> References: <37970512.1167839192610.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <459BDA3A.8050905@pettichord.com> <68f4a0e80701041107l21eb2a48g48c3bc3da397cea8@mail.gmail.com> Message-ID: <459DDBE5.3010803@pettichord.com> Ethan Jewett wrote: > It looks to me like the following piece of code in watir.rb (after the > second method of the Watir module) is causing rdoc to stop parsing at > that point. > > # add an error checker for http navigation errors, such as 404, 500 etc > NAVIGATION_CHECKER = Proc.new do |ie| > if ie.document.frames.length > 1 > 1.upto ie.document.frames.length do |i| > begin > ie.frame(:index, i).check_for_http_error > rescue Watir::Exception::UnknownFrameException > # frame can be already destroyed > end > end > else > ie.check_for_http_error > end > end > > When I comment this out, rdoc seems to get everything. > Thanks for the help. This code was already causing other problems and we've been threatening to remove it. We'll move it to contrib. From WKruse at multichoice.co.za Fri Jan 5 00:51:48 2007 From: WKruse at multichoice.co.za (Walter Kruse) Date: Fri, 5 Jan 2007 07:51:48 +0200 Subject: [Wtr-general] What are people using for 'test executive'? In-Reply-To: <35346245.1167960135003.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: A tool comes to mind: http://www.codesourcery.com/qmtest/ I don't know if it's appropriate for Ruby/WATiR. Let us know. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Brad Sent: 05 January 2007 03:21 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] What are people using for 'test executive'? Curious, what are users using for a 'test executive' that can drive multiple tests? Is there an open source 'test executive' written for Ruby test cases that would do the following:
* user can select individual test(s) or 'run all' in list
* can run test(s) multiple specified number of times or continuously
* test results are logged and shown in 'test executive'

If no open source, has anyone written something like this? If so, can I get a copy of this? Or can someone point me to a link that may help me in my investigation?

Thanks, Brad --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6009&messageID=16835#16835 _______________________________________________ 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. ************************************************************************************************************************** From forum-watir-users at openqa.org Fri Jan 5 09:18:12 2007 From: forum-watir-users at openqa.org (Tulbi) Date: Fri, 05 Jan 2007 08:18:12 CST Subject: [Wtr-general] how to press function keys (F5)? Message-ID: <38357209.1168006804242.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I have been looking for that for age's, but not been successful. My script needs to say to the browser, that F5 (or sometimes F8) key has been pressed. How can I make it do that? The same goes for ctrl and alt keys. Please help! Tulbi --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6019&messageID=16857#16857 From forum-watir-users at openqa.org Fri Jan 5 09:46:24 2007 From: forum-watir-users at openqa.org (Ravi) Date: Fri, 05 Jan 2007 08:46:24 CST Subject: [Wtr-general] how to press function keys (F5)? In-Reply-To: <38357209.1168006804242.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <35025361.1168008414595.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Try: ie.send_keys("{F5}") --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6019&messageID=16858#16858 From forum-watir-users at openqa.org Fri Jan 5 10:22:57 2007 From: forum-watir-users at openqa.org (Nathan) Date: Fri, 05 Jan 2007 09:22:57 CST Subject: [Wtr-general] What are people using for 'test executive'? In-Reply-To: <35346245.1167960135003.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45577854.1168010639910.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> There is sadly no test executive at this time. We use Window's Scheduled Task tool to set up tests, and we just try and keep track of the results, mostly by email when something critical happens. I'm positive also that existing commercial tools are being used by others as we are using them - We use Mercury Quality Center, since we bought it, to schedule our ruby tests as well as our Quick Test Pro tests, but even that is just an interface for Windows Scheduled Tasks tool. So I don't think there is anything. But really just set up some good logging or use Watir's built in logging, set up IIS if you want to send emails when critical failures happen or any failures for that matter, but you might be spammed, so maybe think twice about that. I can help you get the email thing going too if you want. We just implemented a threshold mechanism for when we see error pages on our site (which can happen often due to high traffic and database timeouts). Otherwise a group I'm associated with is beginning to write an open source enterprise Ruby Rails interface for launching Watir scripts remotely but we've only begun and it may take up to a year before we have anything solid. Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6009&messageID=16859#16859 From bret at pettichord.com Fri Jan 5 10:41:30 2007 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 05 Jan 2007 09:41:30 -0600 Subject: [Wtr-general] What are people using for 'test executive'? In-Reply-To: <35346245.1167960135003.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <35346245.1167960135003.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <459E71AA.9040509@pettichord.com> Brad wrote: > Curious, what are users using for a 'test executive' that can drive multiple tests? Most people use Test::Unit, which supports multiple test-runners. > Is there an open source 'test executive' written for Ruby test cases that would do the following:
> * user can select individual test(s) or 'run all' in list
> This is supported with the TK runner > * can run test(s) multiple specified number of times or continuously
> You would have to write your own harness for this. It's pretty easy. I have done it. > * test results are logged and shown in 'test executive'

> Use TK runner or the ever popular TestReporter. Bret From forum-watir-users at openqa.org Fri Jan 5 10:56:08 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Fri, 05 Jan 2007 09:56:08 CST Subject: [Wtr-general] What are people using for 'test executive'? In-Reply-To: <45577854.1168010639910.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <42926696.1168012598429.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> > Otherwise a group I'm associated with is beginning to > write an open source enterprise Ruby Rails interface > for launching Watir scripts remotely but we've only > begun and it may take up to a year before we have > anything solid. I think as Watir becomes more mature and accepted tools like this will be so very important. Personally I went the roll your own method, though if there was an open source base to build off I would have used that in a second. If i ever get some free time I'm going to attempt to write a custom harness for google.com. I think a working end to end custom harness would be a great way to get discussion going on a number of subjects. now I'm just rambling! Good luck on that project :) --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6009&messageID=16862#16862 From paul.rogers at shaw.ca Fri Jan 5 12:07:37 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 05 Jan 2007 10:07:37 -0700 Subject: [Wtr-general] What are people using for 'test executive'? References: <45577854.1168010639910.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <01c701c730ec$0049a530$6400a8c0@laptop> Ive been struggling with this type of thing too. At the upcoming awta conference Im going to demo an app that Ive wriiten for one of my clients that does most of this. Im struggling with the concept of it though - I think I would rather just write ruby code. But I can appreciate why others in the group ( project managers etc ) would want to see results in some simple format. Im thinking of writing something similar as an open source project, but Im very time constrained at the moment. What Im finding is a bigger problem, but may be addressed by something like the tool I mention, is how to deal with the vast quantities of data that we use in our tests, and the relationships between the different data items. If there is enough interest maybe we should start a new rubyforge project to deal with it, rather than use this list. Paul ----- Original Message ----- From: "Nathan" To: Sent: Friday, January 05, 2007 8:22 AM Subject: Re: [Wtr-general] What are people using for 'test executive'? > There is sadly no test executive at this time. We use Window's Scheduled > Task tool to set up tests, and we just try and keep track of the results, > mostly by email when something critical happens. I'm positive also that > existing commercial tools are being used by others as we are using them - > We use Mercury Quality Center, since we bought it, to schedule our ruby > tests as well as our Quick Test Pro tests, but even that is just an > interface for Windows Scheduled Tasks tool. > > So I don't think there is anything. But really just set up some good > logging or use Watir's built in logging, set up IIS if you want to send > emails when critical failures happen or any failures for that matter, but > you might be spammed, so maybe think twice about that. I can help you get > the email thing going too if you want. We just implemented a threshold > mechanism for when we see error pages on our site (which can happen often > due to high traffic and database timeouts). > > Otherwise a group I'm associated with is beginning to write an open source > enterprise Ruby Rails interface for launching Watir scripts remotely but > we've only begun and it may take up to a year before we have anything > solid. > > Nathan > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6009&messageID=16859#16859 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From forum-watir-users at openqa.org Fri Jan 5 20:18:08 2007 From: forum-watir-users at openqa.org (Bach Le) Date: Fri, 05 Jan 2007 19:18:08 CST Subject: [Wtr-general] Managing the Cookie Space with Watir Message-ID: <33313914.1168046329314.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I haven't had much time recently to work with watir but I have come across a problem I have not been able to figure out. Here's an example of my problem: 1. I go to a web store 2. I place an item in the shopping cart 3. I finish the script and exit 4. When i run it again, the item may already be in the shopping cart and break the assumption that I have an empty shopping cart I was wondering if anyone has come up with a solution to this problem. Ideally, IE should delete all cookies written during the session so that IE can start up new again when I run the script again otherwise the test will fail. I read this page (http://rubyforge.org/pipermail/wtr-general/2005-March/001276.html) but I dont think the cookie spaces between the opened IE instances are separate. As far as I know, they all write to the same temporary internet files so cookies are shared between instances. Can anyone shed some light on this? Thanks. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6023&messageID=16874#16874 From mail at chriss-baumann.de Sat Jan 6 09:15:55 2007 From: mail at chriss-baumann.de (Christian Baumann) Date: Sat, 06 Jan 2007 15:15:55 +0100 Subject: [Wtr-general] Managing the Cookie Space with Watir In-Reply-To: <33313914.1168046329314.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <33313914.1168046329314.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <459FAF1B.7000003@chriss-baumann.de> Hi Bach Le, as far as I know Your assumption (evry IE instance uses the same directory for temp files (I don?t the exact path in english because I use a german windows, but it should be s.th. like "c:\documents and settings\...")) is right. So why don?t You just delete the content of this directory at the beginning of every test case? Regards, Christian Bach Le schrieb: > I haven't had much time recently to work with watir but I have come across a problem I have not been able to figure out. > > Here's an example of my problem: > 1. I go to a web store > 2. I place an item in the shopping cart > 3. I finish the script and exit > 4. When i run it again, the item may already be in the shopping cart and break the assumption that I have an empty shopping cart > > I was wondering if anyone has come up with a solution to this problem. Ideally, IE should delete all cookies written during the session so that IE can start up new again when I run the script again otherwise the test will fail. > > I read this page (http://rubyforge.org/pipermail/wtr-general/2005-March/001276.html) but I dont think the cookie spaces between the opened IE instances are separate. As far as I know, they all write to the same temporary internet files so cookies are shared between instances. Can anyone shed some light on this? Thanks. > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6023&messageID=16874#16874 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > From balakrishna.venkatappa at ionidea.com Mon Jan 8 03:24:25 2007 From: balakrishna.venkatappa at ionidea.com (Balakrishna) Date: Mon, 8 Jan 2007 03:24:25 -0500 Subject: [Wtr-general] Data driven tests Message-ID: <001201c732fe$6ab1aee0$40150ca0$@venkatappa@ionidea.com> Hi all, I'm stuck with a weird problem. Basically I'm trying to do a data driven test. I am reading data from access db. The problem I'm having is I'm reading a recordset, then I would like to read each row from the recordset and perform some actions and then read the next row from recordset and perform the actions again. It's like doing the same operation without different data sets. The code I've end up till now is as follows. $dbcounter = 1 $tempcounter = 1 require 'odbc' include ODBC drv = Driver.new drv.name = 'Driver1' drv.attrs['driver'] = 'Microsoft Access Driver (*.mdb)' drv.attrs['dbq'] = 'C:\dl_alpha.mdb' dbh = Database.new.drvconnect(drv) sth = dbh.run("Select * from tbl_dl") #sth.each do |row| while row = sth.fetch do $var_TNOrder = row[0] $var_LEC = row[1] $var_TN = row[2] $tempcounter = $tempcounter + 1 printf "Entered while loop, TNORder: %s",$var_TNOrder end the problem I'm having here that I'm not able to assign the data value from recordset to my local variables. The while loop executes only after End command. Until end command is reached it does not set any variables. Please can you guide me on this. I am sure there should be a way out.. I am new to ruby. Thanks Balu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070108/92e931c9/attachment-0001.html From herr.kreutzer at googlemail.com Mon Jan 8 04:10:59 2007 From: herr.kreutzer at googlemail.com (Christian Kreutzer) Date: Mon, 8 Jan 2007 10:10:59 +0100 Subject: [Wtr-general] Syntax for relative attributes In-Reply-To: <458C0EE3.1030108@pettichord.com> References: <53714004.1166718473525.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <458C0EE3.1030108@pettichord.com> Message-ID: On 12/22/06, Bret Pettichord wrote: > So we have consistently urged people to wrap their watir expressions in > methods rather than assign them to global variables. This makes it easy > to reuse them, and ensure that a correct rebinding occurs on each reuse. > Also, as i have been using Watir more on large projects, i am finding > that there are other reasons why this is a sound way to structure Watir > libraries. im not sure if i understand this correctly. text = $ie.text <-- so, this is bad because we cant be sure if the rebinding happens just in time when we need it. would the following approach be better?: class Page def initialize ie @ie = ie end def text @ie.text end end p = Page.new ie puts p.text the watir expressions are now wrapped in methods but i cant see how the object binding could be different from using global vars. I hope someone can enlighten me on this ;) Christian From gwest at inpses.co.uk Mon Jan 8 07:04:51 2007 From: gwest at inpses.co.uk (Garry West) Date: Mon, 8 Jan 2007 12:04:51 -0000 Subject: [Wtr-general] Menu links have duplicate attributes Message-ID: I am currently having a problem clicking on a menu item. This menu item has the same attributes as another menu item, but they both do different things. I was using ie.frame("left").link(:id, "21").click (example) however because the link id's change depending on the user access rights I found it time consuming and difficult to manage. I am now using ie.frame("left").link(:title, "Edit News").click (example). This has now caused a problem because we have two links, both of them with the same title, but within different directory folders in the menu tree. Does anybody know of a solution to this problem? Garry West Trainee Test Analyst InPS Tel: 01382 564313 Visit our Web site at www.inps.co.uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of In Practice Systems Limited or any of its affiliates. If you are not the intended recipient please contact is.helpdesk at inps.co.uk P please don't print this e-mail unless you really need to. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070108/74f5b114/attachment.html From tester.paul at gmail.com Mon Jan 8 09:49:50 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Mon, 8 Jan 2007 09:49:50 -0500 Subject: [Wtr-general] Menu links have duplicate attributes In-Reply-To: References: Message-ID: <37c405480701080649m49baa4a0p3384115932f927f5@mail.gmail.com> I also have duplicate menu names in one of our apps. I just use the link's index number instead. It's not as nice or convenient as using the text, but I don't mind hard-coding a link index every now and then if it means I can get on with the test and move onto the next thing. On 08/01/07, Garry West wrote: > > I am currently having a problem clicking on a menu item. This menu item > has the same attributes as another menu item, but they both do different > things. I was using ie.frame("left").link(:id, "21").click (example) > however because the link id's change depending on the user access rights I > found it time consuming and difficult to manage. > > I am now using ie.frame("left").link(:title, "Edit News").click > (example). This has now caused a problem because we have two links, both of > them with the same title, but within different directory folders in the menu > tree. > > Does anybody know of a solution to this problem? > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070108/d0f31f08/attachment.html From michael.a.bolton at gmail.com Mon Jan 8 10:06:28 2007 From: michael.a.bolton at gmail.com (Michael Bolton) Date: Mon, 8 Jan 2007 10:06:28 -0500 Subject: [Wtr-general] Menu links have duplicate attributes In-Reply-To: Message-ID: <00ea01c73336$95b95470$6701a8c0@Koko> >I am currently having a problem clicking on a menu item. This menu item has the same attributes as another menu item, but they both do different things. I was using ie.frame("left").link(:id, "21").click (example) however because the link id's change depending on the user access rights I found it time consuming and difficult to manage. >I am now using ie.frame("left").link(:title, "Edit News").click (example). This has now caused a problem because we have two links, both of them with the same title, but within different directory folders in the menu tree. >Does anybody know of a solution to this problem? One way is to use some attribute other than [title]. Another is to try asking for testability--that is, getting the developers to change it. Sometimes that's easy--and sometimes it's desirable from points of view other than testability. ---Michael B. From forum-watir-users at openqa.org Mon Jan 8 10:09:26 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Mon, 08 Jan 2007 09:09:26 CST Subject: [Wtr-general] Menu links have duplicate attributes In-Reply-To: Message-ID: <57915232.1168268996242.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Are either of the "Edit News" links contained within another element (table?). You may be able to do something like ie.frame('whatever').table(:id,'table1').link(:title,'Edit News') and ie.frame('whatever').table(:id,'table2').link(:title,'Edit News') like the other poster said though, a hard index isn't going to be the end of the world if nothing else works. You could also approach the developer and ask for a tag that would work better for you, its always an option. Good luck. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6036&messageID=16911#16911 From christopher.mcmahon at gmail.com Mon Jan 8 11:21:21 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 8 Jan 2007 08:21:21 -0800 Subject: [Wtr-general] Data driven tests In-Reply-To: <348987449903460880@unknownmsgid> References: <348987449903460880@unknownmsgid> Message-ID: <72799cd70701080821j3fc00230ifd44c1a7354491e2@mail.gmail.com> > sth = dbh.run("Select * from tbl_dl") > all_records = sth.fetch_all all_records now contains an ArrayOfArrays, where each row is a record in the outer array, and each value in each row is an element in the inner array. Assume "tbl_dl" has records for NAME and ADDRESS. all_records now contains [[NAME1,ADDRESS1],[NAME2,ADDRESS2],[NAME3,ADDRESS3]] and that should get you where you need to go. http://www.ch-werner.de/rubyodbc/odbc.html is a good resource. -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070108/0ec07528/attachment.html From christopher.mcmahon at gmail.com Mon Jan 8 11:42:36 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 8 Jan 2007 08:42:36 -0800 Subject: [Wtr-general] Syntax for relative attributes In-Reply-To: References: <53714004.1166718473525.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <458C0EE3.1030108@pettichord.com> Message-ID: <72799cd70701080842v14a83d36if6f67df0dc838a62@mail.gmail.com> > > the watir expressions are now wrapped in methods but i cant see how > the object binding could be different from using global vars. I hope > someone can enlighten me on this > http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/117762add75f59e7/c7bb0338921b15ef?lnk=gst&q=global+variable&rnum=1#c7bb0338921b15ef -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070108/65315eae/attachment.html From balakrishna.venkatappa at ionidea.com Mon Jan 8 12:30:28 2007 From: balakrishna.venkatappa at ionidea.com (Balakrishna) Date: Mon, 8 Jan 2007 12:30:28 -0500 Subject: [Wtr-general] Data driven tests In-Reply-To: <72799cd70701080821j3fc00230ifd44c1a7354491e2@mail.gmail.com> References: <348987449903460880@unknownmsgid> <72799cd70701080821j3fc00230ifd44c1a7354491e2@mail.gmail.com> Message-ID: <00b301c7334a$b2fa8ef0$18efacd0$@venkatappa@ionidea.com> Hello Chris, Thanks for the response. I will try this solution. If you have an example of the same ,plz share it to me. Any methods to find the size of array . Also my question regarding the while loop does not execute the statements until End is reached. How do I overcome this ? Balu From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: Monday, January 08, 2007 11:21 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Data driven tests sth = dbh.run("Select * from tbl_dl") all_records = sth.fetch_all all_records now contains an ArrayOfArrays, where each row is a record in the outer array, and each value in each row is an element in the inner array. Assume "tbl_dl" has records for NAME and ADDRESS. all_records now contains [[NAME1,ADDRESS1],[NAME2,ADDRESS2],[NAME3,ADDRESS3]] and that should get you where you need to go. http://www.ch-werner.de/rubyodbc/odbc.html is a good resource. -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070108/60493683/attachment-0001.html From christopher.mcmahon at gmail.com Mon Jan 8 13:03:35 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 8 Jan 2007 10:03:35 -0800 Subject: [Wtr-general] Data driven tests In-Reply-To: <3536813212726476922@unknownmsgid> References: <348987449903460880@unknownmsgid> <72799cd70701080821j3fc00230ifd44c1a7354491e2@mail.gmail.com> <3536813212726476922@unknownmsgid> Message-ID: <72799cd70701081003x732d14d7r883c76494b883851@mail.gmail.com> On 1/8/07, Balakrishna wrote: > > Hello Chris, > > Thanks for the response. I will try this solution. If you have an example > of the same ,plz share it to me. > > Any methods to find the size of array . > irb(main):001:0> ary = [5,10,15,20] => [5, 10, 15, 20] irb(main):002:0> ary.length => 4 irb(main):003:0> Also my question regarding the while loop does not execute the statements > until End is reached. How do I overcome this ? > There are several odd things in your code. For one, I wouldn't use global variables, they'll cause you trouble eventually. For another, use "puts" instead of "printf". Your "while" loop should fetch each row, but your commented-out line "sth.each" is a lot more Ruby-like way to do it. I assume by "not execute" you mean that the results of each printf are shown only at the end? That's probably just an artifact of your output mode. Are you sure that your execution mode doesn't just flush the buffer at the end of the run? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070108/c45d4a81/attachment.html From balakrishna.venkatappa at ionidea.com Mon Jan 8 13:42:26 2007 From: balakrishna.venkatappa at ionidea.com (Balakrishna) Date: Mon, 8 Jan 2007 13:42:26 -0500 Subject: [Wtr-general] Data driven tests In-Reply-To: <72799cd70701081003x732d14d7r883c76494b883851@mail.gmail.com> References: <348987449903460880@unknownmsgid> <72799cd70701080821j3fc00230ifd44c1a7354491e2@mail.gmail.com> <3536813212726476922@unknownmsgid> <72799cd70701081003x732d14d7r883c76494b883851@mail.gmail.com> Message-ID: <00e001c73354$c0c824c0$42586e40$@venkatappa@ionidea.com> Chris , You have understood it correct. The result of each printf are shown only at the End. I'll try to explain what I'm trying to do drv = Driver.new drv.name = 'Driver1' drv.attrs['driver'] = 'Microsoft Access Driver (*.mdb)' drv.attrs['dbq'] = 'C:\dl_alpha.mdb' dbh = Database.new.drvconnect(drv) sth = dbh.run("Select * from tbl_dl") #sth.each do |row| # Start processing each row. var_TNOrder = row[0] # Assign the value to a variable which is to be used later. var_LEC = row[1] var_TN = row[2] #printf " tempcounter: %d",$tempcounter #printf "Entered while loop, TNORder: %s",$var_TNOrder ie.link(:index,37).click # navigate the application sleep(2) ie2 = Watir::IE.attach(:title,/LSOG 9/) # attach a popup window ie2.frame("mainFrame").text_field(:name,"LSRForm__ADM__PON").set(var_TNOrder ) # Set the value of the variable read from database ie2.frame("mainFrame").text_field(:name,"LSRForm__ADM__LOCQTY").set("1") ie2.frame("mainFrame").select_list(:name,"EUForm__EULOC__STATE").select("New York") ie2.frame("mainFrame").select_list(:name,"LSRForm__ADM__REQTYP").select("Dir ectory Listing Firm Order") ie2.frame("mainFrame").select_list(:name,"LSRForm__ADM__AGAUTH").select("Yes ") ie2.frame("mainFrame").select_list(:name,"null__OC").select("Order Creator Wizard") ie2.frame("mainFrame").image(:index,10).click # Goto Next Screen . But error because the var_TNORder was not set as it's not assigned. The variable will not be assigned until the end is executed. end Hope u understood the problem I'm facing. How do I get the value into the variable while still in the loop ? Thanks Balu ie.link(:index,37).click sleep(2) ie2 = Watir::IE.attach(:title,/LSOG 9/) printf "Variable value: %s, Variable value: %s\n",var_TNOrder,var_LEC ie2.frame("mainFrame").text_field(:name,"LSRForm__ADM__PON").set(var_TNOrder .to_s) ie2.frame("mainFrame").text_field(:name,"LSRForm__ADM__LOCQTY").set("1") ie2.frame("mainFrame").select_list(:name,"EUForm__EULOC__STATE").select("New York") ie2.frame("mainFrame").select_list(:name,"LSRForm__ADM__REQTYP").select("Dir ectory Listing Firm Order") ie2.frame("mainFrame").select_list(:name,"LSRForm__ADM__AGAUTH").select("Yes ") ie2.frame("mainFrame").select_list(:name,"null__OC").select("Order Creator Wizard") ie2.frame("mainFrame").image(:index,10).click From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: Monday, January 08, 2007 1:04 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Data driven tests On 1/8/07, Balakrishna wrote: Hello Chris, Thanks for the response. I will try this solution. If you have an example of the same ,plz share it to me. Any methods to find the size of array . irb(main):001:0> ary = [5,10,15,20] => [5, 10, 15, 20] irb(main):002:0> ary.length => 4 irb(main):003:0> Also my question regarding the while loop does not execute the statements until End is reached. How do I overcome this ? There are several odd things in your code. For one, I wouldn't use global variables, they'll cause you trouble eventually. For another, use "puts" instead of "printf". Your "while" loop should fetch each row, but your commented-out line " sth.each" is a lot more Ruby-like way to do it. I assume by "not execute" you mean that the results of each printf are shown only at the end? That's probably just an artifact of your output mode. Are you sure that your execution mode doesn't just flush the buffer at the end of the run? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070108/1a3b5b41/attachment.html From forum-watir-users at openqa.org Mon Jan 8 20:55:59 2007 From: forum-watir-users at openqa.org (Bach Le) Date: Mon, 08 Jan 2007 19:55:59 CST Subject: [Wtr-general] Managing the Cookie Space with Watir In-Reply-To: <33313914.1168046329314.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <37983524.1168307796905.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Since no one seems to know, I think I have found a solution and I want to share with everyone just in case someone is having this problem. In Internet Explorer 7, goto Internet Options->Privacy->Advanced. Block First and Third Party cookies, however, enable session cookies. These cookies will stay in memory as long as the IE process is open. Cookies are never written to disk. The cookie space seemed, in my tests, separate from other IE processes are are running. For example, if I logged in to yahoo mail or something with one IE window, and started up another IE instance, the 2nd instance is unaware that I am logged in with the first instance. Hope that helps other people. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6023&messageID=16927#16927 From forum-watir-users at openqa.org Mon Jan 8 22:15:03 2007 From: forum-watir-users at openqa.org (sarita) Date: Mon, 08 Jan 2007 21:15:03 CST Subject: [Wtr-general] probelm with Watir Message-ID: <63588054.1168312543086.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I installed Ruby 1.8.5-21 & Watir 1.4.1. While installing Watir 1.4.1, errors came only with following files at the beginning, then installation completed with no more errors. AutoItX.chm AutoItX3.dll WindowHelper.rb camel_case.rb clickJSDialog.rb cookiemanager.rb exceptions.rb screen_capture.rb setFileDialog.rb testUnitAddons.rb watir_simple.rb winClicker.rb when I execute unittests\all_tests.rb, the following error is coming: C:/PROGRA~1/Watir/UNITTE~1/../unittests/setup.rb:4:in `require': no such file to load -- watir (LoadError) from C:/PROGRA~1/Watir/UNITTE~1/../unittests/setup.rb:4 from C:/PROGRA~1/Watir/UNITTE~1/ALL_TE~1.RB:4:in `require' from C:/PROGRA~1/Watir/UNITTE~1/ALL_TE~1.RB:4 plz provide the solution. Sarita --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6043&messageID=16928#16928 From tester.paul at gmail.com Mon Jan 8 22:55:59 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Mon, 8 Jan 2007 22:55:59 -0500 Subject: [Wtr-general] probelm with Watir In-Reply-To: <63588054.1168312543086.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <63588054.1168312543086.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <37c405480701081955h19424b74gb96d352ffc7a2c5c@mail.gmail.com> You may have better luck if you uninstall Watir from the default ("Program Files") installation location and reinstall it to a folder that has no spaces in the name. For example "C:\Watir" This problem has been discussed several times before. You may wish to try searching the mail archives for more information regarding install problems with Watir 1.4.1. Good luck and have fun! Cheers. Paul C. On 08/01/07, sarita wrote: > > I installed Ruby 1.8.5-21 & Watir 1.4.1. While installing Watir 1.4.1, > errors came only with following files at the beginning, then installation > completed with no more errors. > > AutoItX.chm > AutoItX3.dll > WindowHelper.rb > camel_case.rb > clickJSDialog.rb > cookiemanager.rb > exceptions.rb > screen_capture.rb > setFileDialog.rb > testUnitAddons.rb > watir_simple.rb > winClicker.rb > > when I execute unittests\all_tests.rb, the following error is coming: > > C:/PROGRA~1/Watir/UNITTE~1/../unittests/setup.rb:4:in `require': no such > file to load -- watir (LoadError) > from C:/PROGRA~1/Watir/UNITTE~1/../unittests/setup.rb:4 > from C:/PROGRA~1/Watir/UNITTE~1/ALL_TE~1.RB:4:in `require' > from C:/PROGRA~1/Watir/UNITTE~1/ALL_TE~1.RB:4 > > plz provide the solution. > > Sarita > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070108/7348ab28/attachment.html From ajitesh.srinetra at gmail.com Tue Jan 9 00:56:37 2007 From: ajitesh.srinetra at gmail.com (Ajitesh Srinetra) Date: Tue, 9 Jan 2007 11:26:37 +0530 Subject: [Wtr-general] opening a link in new window Message-ID: <4f6da15b0701082156y5714615rddecfd51a98bfe70@mail.gmail.com> Hi all, I want to open a link in new winow(By right clicking the link we can say open in new window). How this can be achieved in watir. Regards Ajitesh S. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070109/ebda0bd3/attachment.html From forum-watir-users at openqa.org Tue Jan 9 01:49:19 2007 From: forum-watir-users at openqa.org (liucongying) Date: Tue, 09 Jan 2007 00:49:19 CST Subject: [Wtr-general] stange problem!!! Message-ID: <46800693.1168325389532.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> when the ie go to the site which is "http://war3.replays.net" or "http://www.sina.com", then error displayed. Like that: 1) Error: test_rn(TC_rn_suite): WIN32OLERuntimeError: document OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:2592:in `method_m issing' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:2592:in `document ' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:1212:in `check_fo r_http_error' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:219 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:217:in `upto' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:217 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:1740:in `call' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:1740:in `run_erro r_checks' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:1739:in `each' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:1739:in `run_erro r_checks' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:1728:in `wait' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:1579:in `goto' E:/Documents and Settings/congying.liu/Desktop/rn.rb:21:in `test_rn' I just want to know why, I think maybe there are some active control, and how to resolve, now I can not continue if i want to test this website! --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6044&messageID=16933#16933 From forum-watir-users at openqa.org Tue Jan 9 02:15:02 2007 From: forum-watir-users at openqa.org (sarita) Date: Tue, 09 Jan 2007 01:15:02 CST Subject: [Wtr-general] probelm with Watir In-Reply-To: <37c405480701081955h19424b74gb96d352ffc7a2c5c@mail.gmail.com> Message-ID: <44259393.1168326932884.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thanks, it worked. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6043&messageID=16934#16934 From bret at pettichord.com Tue Jan 9 02:17:51 2007 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 09 Jan 2007 01:17:51 -0600 Subject: [Wtr-general] Managing the Cookie Space with Watir In-Reply-To: <37983524.1168307796905.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <37983524.1168307796905.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45A3419F.4060101@pettichord.com> Bach Le wrote: > Since no one seems to know, I think I have found a solution and I want to share with everyone just in case someone is having this problem. > Very helpful. Thanks. From forum-watir-users at openqa.org Tue Jan 9 02:31:18 2007 From: forum-watir-users at openqa.org (sarita) Date: Tue, 09 Jan 2007 01:31:18 CST Subject: [Wtr-general] probelm with Watir1.5 Message-ID: <40286205.1168327908706.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> 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. Sarita --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6045&messageID=16936#16936 From bret at pettichord.com Tue Jan 9 03:34:58 2007 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 09 Jan 2007 02:34:58 -0600 Subject: [Wtr-general] stange problem!!! In-Reply-To: <46800693.1168325389532.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <46800693.1168325389532.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45A353B2.6050005@pettichord.com> liucongying wrote: > when the ie go to the site which is "http://war3.replays.net" or "http://www.sina.com", then error displayed. Like that: > 1) Error: > test_rn(TC_rn_suite): > WIN32OLERuntimeError: document > OLE error code:80070005 in > Access is denied. > > HRESULT error code:0x80020009 > Exception occurred. > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:2592:in `method_m > issing' > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:2592:in `document > ' > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:1212:in `check_fo > r_http_error' > This problem is fixed in trunk and in the next development release. From bret at pettichord.com Tue Jan 9 03:38:33 2007 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 09 Jan 2007 02:38:33 -0600 Subject: [Wtr-general] Syntax for relative attributes In-Reply-To: References: <53714004.1166718473525.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <458C0EE3.1030108@pettichord.com> Message-ID: <45A35489.5010505@pettichord.com> Christian Kreutzer wrote: > On 12/22/06, Bret Pettichord wrote: > > >> So we have consistently urged people to wrap their watir expressions in >> methods rather than assign them to global variables. This makes it easy >> to reuse them, and ensure that a correct rebinding occurs on each reuse. >> Also, as i have been using Watir more on large projects, i am finding >> that there are other reasons why this is a sound way to structure Watir >> libraries. >> > > im not sure if i understand this correctly. > > text = $ie.text <-- so, this is bad because we cant be sure if the > rebinding happens just in time when we need it. > > No. The advice applies to Watir objects, the things that are returned by expressions like $ie.button(:id, 'foo') -- in this a Watir::Button object. Your example ($ie.text) just returns a string, which is unproblematic. I guess you could say that $ie is a watir object, but that wasn't what i was talking about. Clear as mud, i know. Bret From zeljko.filipin at gmail.com Tue Jan 9 03:41:14 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Tue, 9 Jan 2007 09:41:14 +0100 Subject: [Wtr-general] opening a link in new window In-Reply-To: <4f6da15b0701082156y5714615rddecfd51a98bfe70@mail.gmail.com> References: <4f6da15b0701082156y5714615rddecfd51a98bfe70@mail.gmail.com> Message-ID: Please post html of that link. In the meantime, see http://wiki.openqa.org/display/WTR/FAQ# FAQ-TriggeringJavaScriptevents -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070109/a4a06686/attachment.html From forum-watir-users at openqa.org Tue Jan 9 03:57:55 2007 From: forum-watir-users at openqa.org (liucongying) Date: Tue, 09 Jan 2007 02:57:55 CST Subject: [Wtr-general] stange problem!!! In-Reply-To: <45A353B2.6050005@pettichord.com> Message-ID: <46058623.1168333105788.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> When does the next version release? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6044&messageID=16941#16941 From forum-watir-users at openqa.org Tue Jan 9 04:00:46 2007 From: forum-watir-users at openqa.org (liucongying) Date: Tue, 09 Jan 2007 03:00:46 CST Subject: [Wtr-general] how to handle the file download window ! Message-ID: <58437386.1168333276265.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I just click the button which can download files, when I click it, the window of file download pop up, how can I control the window to click save or open ,or cancle! --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6047&messageID=16942#16942 From zeljko.filipin at gmail.com Tue Jan 9 04:13:38 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Tue, 9 Jan 2007 10:13:38 +0100 Subject: [Wtr-general] stange problem!!! In-Reply-To: <46058623.1168333105788.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <45A353B2.6050005@pettichord.com> <46058623.1168333105788.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: On 1/9/07, liucongying wrote: > > When does the next version release? You can make one for yourself today. See http://wiki.openqa.org/display/WTR/FAQ#FAQ-devgem -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070109/beb49cc1/attachment-0001.html From forum-watir-users at openqa.org Tue Jan 9 05:46:06 2007 From: forum-watir-users at openqa.org (Maloy kanti debnath) Date: Tue, 09 Jan 2007 04:46:06 CST Subject: [Wtr-general] hi , few quries with WATIR Message-ID: <29322484.1168339774908.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> hi, i am only few days old to WATIR and my new project is in this tool i have two main doubt 1) how to use assert_equal and for what purpose is it used with a simple example? 2) is there any command which could be used to capture the bitmap image from the web page and compare with the orginal source? 3) Is it preferable to use Eclipse as editor for WATIR or which editor is prefered for working with WATIR ? thanks, Maloy --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6048&messageID=16944#16944 From forum-watir-users at openqa.org Tue Jan 9 06:09:25 2007 From: forum-watir-users at openqa.org (gdx) Date: Tue, 09 Jan 2007 05:09:25 CST Subject: [Wtr-general] hi , few quries with WATIR In-Reply-To: <29322484.1168339774908.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <41601276.1168340995458.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, sorry for my english :D 2) in first, you can use screen_capture to take a screenshoot. include this at the top of your script : require 'watir/screen_capture' include Watir::ScreenCapture and read the doc for more details : screen_capture("c:\\toto.jpg") after this, soft exists to compare files pixel to pixel ----------------------- 3) I think you can use Eclipe if you want ! I hope I help you --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6048&messageID=16945#16945 From dhrubojyotib at gmail.com Tue Jan 9 06:17:19 2007 From: dhrubojyotib at gmail.com (Dhrubojyoti Biswas) Date: Tue, 9 Jan 2007 16:47:19 +0530 Subject: [Wtr-general] Wtr-general Digest, Vol 38, Issue 14 In-Reply-To: References: Message-ID: I just downloaded Watir 1.5.1.1127 and I was running some of the tests that I had written using Watir 1.4. But time and again I keep getting a segmentation fault (core dump) at Watir.rb line 1212. Here's the Error Message that i get: "C:/rubyInstall/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./Watir.rb:1212: [Bug]Segmentation fault ruby 1.8.4 (2005-12-24) [i386-mswin32] This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information." Can somebody in the Core Watir Dev team look into this issue please? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070109/30b7c661/attachment.html From zeljko.filipin at gmail.com Tue Jan 9 06:37:05 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Tue, 9 Jan 2007 12:37:05 +0100 Subject: [Wtr-general] hi , few quries with WATIR In-Reply-To: <29322484.1168339774908.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <29322484.1168339774908.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: On 1/9/07, Maloy kanti debnath wrote: > > 1) how to use assert_equal and for what purpose is it used with a simple > example? >From this list ( http://www.mail-archive.com/wtr-general at rubyforge.org/msg04291.html): require 'test/unit' class Foo < Test::Unit::TestCase def test_foo array_1 = [1,2,3] array_2 = [1,2,3] assert_equal(array_1 - array_2 ,[]) end end 3) Is it preferable to use Eclipse as editor for WATIR or which editor is > prefered for working with WATIR ? > I use Arachno Ruby (http://www.ruby-ide.com/). You can use notepad (comes with windows), scite (comes with ruby), freeride (comes with ruby). Use the one you like. Eclipse should be fine, too. For more information google for ruby ide or search the same at http://www.mail-archive.com/wtr-general at rubyforge.org/ -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070109/ddce454e/attachment.html From forum-watir-users at openqa.org Tue Jan 9 07:20:38 2007 From: forum-watir-users at openqa.org (Maloy kanti debnath) Date: Tue, 09 Jan 2007 06:20:38 CST Subject: [Wtr-general] hi , few quries with WATIR In-Reply-To: <29322484.1168339774908.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <35225466.1168345268544.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> hi, thank you for your reply.. which editor you are using and what will you sugest me as a bignner maloy --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6048&messageID=16951#16951 From Mark_Cain at RL.gov Tue Jan 9 10:00:30 2007 From: Mark_Cain at RL.gov (Cain, Mark) Date: Tue, 9 Jan 2007 07:00:30 -0800 Subject: [Wtr-general] how to handle the file download window ! In-Reply-To: <58437386.1168333276265.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <4440693B7CFF2440ABC2E0BE480DABA10A3679@EX01-2.rl.gov> require 'watir' require 'watir\contrib\enabled_popup' include Watir # This method grabs the handle of the window and clicks the button # you specify by passing in the button text. # For the File Upload dialog use the user_input parameter # to supply the path to the file you want to upload. The button name # needs to include the '&' character '&Open' (or &Save for the # downloading dialog.) def startClicker( button , waitTime=9, user_input=nil) hwnd = $ie.enabled_popup(waitTime) # get a handle if one exists if (hwnd) # yes there is a popup w = WinClicker.new if ( user_input ) w.setTextValueForFileNameField(hwnd, "#{user_input}") end sleep 3 # I put this in to see the text being input it is not necessary to work w.clickWindowsButton_hwnd(hwnd, "#{button}") # "OK" or whatever the name on the button is w=nil # this is just cleanup end end $ie = IE.new() $ie.goto("C:\\fileupload.html") $ie.fileField(:name, "fileone").click_no_wait fPath = "file://C:\\mytext.txt" startClicker("&Open", 7, fPath ) # 3rd parameter is optional. Hope this helps, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of liucongying Sent: Tuesday, January 09, 2007 1:01 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] how to handle the file download window ! I just click the button which can download files, when I click it, the window of file download pop up, how can I control the window to click save or open ,or cancle! --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6047&messageID=16942#16942 _______________________________________________ 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/20070109/75b5f4b9/attachment-0001.html From forum-watir-users at openqa.org Tue Jan 9 11:09:23 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Tue, 09 Jan 2007 10:09:23 CST Subject: [Wtr-general] Syntax for relative attributes In-Reply-To: <45A35489.5010505@pettichord.com> Message-ID: <43253508.1168358994108.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I think what bret said is $my_button = $ie.button(:id, 'foo') is a bad idea. It may be better to do something like... def my_button() return( $ie.button(:id, 'foo') ) end while my_string = $ie.text could be fine, though you could still do def my_string() return( $ie.text ) end ... i think The concept being you want to, depending on your situation, write a script that uses some sort of abstraction layer. This means your 'high level' scripts will not need to be changed much at all (I'm doing this, and it works wonders), while your abstraction layer will change with the site. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6038&messageID=16960#16960 From forum-watir-users at openqa.org Tue Jan 9 11:11:29 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Tue, 09 Jan 2007 10:11:29 CST Subject: [Wtr-general] hi , few quries with WATIR In-Reply-To: <35225466.1168345268544.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <43775644.1168359119028.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> for editors I use Mondrian. Its very simple, but works great. Try out a bunch of them, find one that works for you. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6048&messageID=16961#16961 From charley.baker at gmail.com Tue Jan 9 16:25:34 2007 From: charley.baker at gmail.com (Charley Baker) Date: Tue, 9 Jan 2007 14:25:34 -0700 Subject: [Wtr-general] Wtr-general Digest, Vol 38, Issue 14 In-Reply-To: References: Message-ID: This is most likely due to the fact that you're running ruby 1.8.4 and running into issues loading our modified win32ole.so. Try running ruby 1.8.2 -Charley On 1/9/07, Dhrubojyoti Biswas wrote: > > I just downloaded Watir 1.5.1.1127 and I was running some of the tests > that I had written using Watir 1.4. > > But time and again I keep getting a segmentation fault (core dump) at > Watir.rb line 1212. > > Here's the Error Message that i get: > > "C:/rubyInstall/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./Watir.rb:1212: > [Bug]Segmentation fault ruby 1.8.4 (2005-12-24) [i386-mswin32] > > This application has requested the Runtime to terminate it in an unusual > way. > Please contact the application's support team for more information." > > Can somebody in the Core Watir Dev team look into this issue please? > > _______________________________________________ > 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/20070109/793ebdae/attachment.html From forum-watir-users at openqa.org Tue Jan 9 16:43:31 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Tue, 09 Jan 2007 15:43:31 CST Subject: [Wtr-general] Wtr-general Digest, Vol 38, Issue 14 In-Reply-To: Message-ID: <37435617.1168379041793.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I just ran into same problem myself i think. I am running 1.8.4. Going to switch to 1.8.2 tomorrow and see if that fixes it. The AutoIt dll must be correctly registered for this feature to work properly C:/Program Files/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir/windowhelper.rb:42:in `check_autoit_installed' C:/Program Files/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:3956:in `set' --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6057&messageID=16969#16969 From christopher.mcmahon at gmail.com Tue Jan 9 17:57:41 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 9 Jan 2007 14:57:41 -0800 Subject: [Wtr-general] OT: help understand return from ODBC tables() call? Message-ID: <72799cd70701091457g4b800cg9ca6698f291bc884@mail.gmail.com> Hi... Help me understand what data structure this is? Ruby ODBC almost always returns an ArrayOfArrays, but this is very very weird and I don't understand what I'm seeing. (btw, google groups access to comp.lang.ruby is down) indexes = @conn.indexes('tablename') indexes.each do |ind| puts ind[5] end =>nil PK_indexname XY_indexname2 indexes.each do |ind| puts ind[5] puts "hah" end =>nil hah PK_indexname hah XY_indexname2 hah indexes.each do |ind| puts ind[5][1] end =>foo_index.rb:122: undefined method `[]' for nil:NilClass (NoMethodError) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070109/6aa07409/attachment.html From christopher.mcmahon at gmail.com Tue Jan 9 17:58:31 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 9 Jan 2007 14:58:31 -0800 Subject: [Wtr-general] Oops should be "indexes()" Re: OT: help understand return from ODBC tables() call? Message-ID: <72799cd70701091458l6c69d973rbe2d4fed989b4822@mail.gmail.com> On 1/9/07, Chris McMahon wrote: > > > > Hi... > > Help me understand what data structure this is? Ruby ODBC almost always > returns an ArrayOfArrays, but this is very very weird and I don't understand > what I'm seeing. (btw, google groups access to comp.lang.ruby is down) > > indexes = @conn.indexes('tablename') > > indexes.each do |ind| > puts ind[5] > end > =>nil > PK_indexname > XY_indexname2 > > indexes.each do |ind| > puts ind[5] > puts "hah" > end > =>nil > hah > PK_indexname > hah > XY_indexname2 > hah > > > indexes.each do |ind| > puts ind[5][1] > end > =>foo_index.rb:122: undefined method `[]' for nil:NilClass (NoMethodError) > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070109/6e883964/attachment.html From paul.rogers at shaw.ca Tue Jan 9 18:18:09 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 09 Jan 2007 16:18:09 -0700 Subject: [Wtr-general] Oops should be "indexes()" Re: OT: help understand return from ODBC tables() call? In-Reply-To: <72799cd70701091458l6c69d973rbe2d4fed989b4822@mail.gmail.com> References: <72799cd70701091458l6c69d973rbe2d4fed989b4822@mail.gmail.com> Message-ID: I dont see an indexes method for the connection... -------------- next part -------------- On 1/9/07, Chris McMahon wrote: > > > > Hi... > > Help me understand what data structure this is? Ruby ODBC almost always > returns an ArrayOfArrays, but this is very very weird and I don't understand > what I'm seeing. (btw, google groups access to comp.lang.ruby is down) > > indexes = @conn.indexes('tablename') > > indexes.each do |ind| > puts ind[5] > end > =>nil > PK_indexname > XY_indexname2 > > indexes.each do |ind| > puts ind[5] > puts "hah" > end > =>nil > hah > PK_indexname > hah > XY_indexname2 > hah > > > indexes.each do |ind| > puts ind[5][1] > end > =>foo_index.rb:122: undefined method `[]' for nil:NilClass (NoMethodError) > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070109/874790d6/attachment.html -------------- next part -------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Tue Jan 9 18:22:57 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 09 Jan 2007 16:22:57 -0700 Subject: [Wtr-general] Oops should be "indexes()" Re: OT: help understand return from ODBC tables() call? In-Reply-To: References: <72799cd70701091458l6c69d973rbe2d4fed989b4822@mail.gmail.com> Message-ID: but I am using a really old version of dbi. I'll try an upgrade ----- Original Message ----- From: Paul Rogers Date: Tuesday, January 9, 2007 4:18 pm Subject: Re: [Wtr-general] Oops should be "indexes()" Re: OT: help understand return from ODBC tables() call? > I dont see an indexes method for the connection... > -------------- next part -------------- On 1/9/07, Chris McMahon wrote: > > > > Hi... > > Help me understand what data structure this is? Ruby ODBC almost always > returns an ArrayOfArrays, but this is very very weird and I don't understand > what I'm seeing. (btw, google groups access to comp.lang.ruby is down) > > indexes = @conn.indexes('tablename') > > indexes.each do |ind| > puts ind[5] > end > =>nil > PK_indexname > XY_indexname2 > > indexes.each do |ind| > puts ind[5] > puts "hah" > end > =>nil > hah > PK_indexname > hah > XY_indexname2 > hah > > > indexes.each do |ind| > puts ind[5][1] > end > =>foo_index.rb:122: undefined method `[]' for nil:NilClass (NoMethodError) > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070109/a048c31e/attachment.html -------------- next part -------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general -------------- next part -------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From forum-watir-users at openqa.org Tue Jan 9 19:31:29 2007 From: forum-watir-users at openqa.org (usha) Date: Tue, 09 Jan 2007 18:31:29 CST Subject: [Wtr-general] Alert box - hangs Message-ID: <46941405.1168389139719.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, I've been trying to click on the Alert box with no success. Tried both methods suggested in the thread below - no luck. http://forums.openqa.org/thread.jspa?threadID=5802&tstart=15 Script hangs till I manually click on the Alert box. The button which triggers the Alert remains yellow in color. Any help is appreciated since I cannot proceed with my tests. Thanks --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6061&messageID=16977#16977 From christopher.mcmahon at gmail.com Tue Jan 9 20:06:15 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 9 Jan 2007 17:06:15 -0800 Subject: [Wtr-general] interesting difference between Watir 1.4 and and 1.5.1127 Message-ID: <72799cd70701091706r5fb7e8c7t58b20f4cdede3d0c@mail.gmail.com> I have a long-running script that works fine in the later build but enters an infinite loop with the earlier build. There is nothing at all unusual in the code, and if I figure out what's causing the loop, I'll post it. -C -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070109/b0c232f4/attachment.html From forum-watir-users at openqa.org Tue Jan 9 21:29:23 2007 From: forum-watir-users at openqa.org (liucongying) Date: Tue, 09 Jan 2007 20:29:23 CST Subject: [Wtr-general] How do I click the "OK" button on a java alert? In-Reply-To: <40581542.1167840248825.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <34624660.1168396193194.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> ans1 = objAutoit.ControlClick("Microsoft Internet Explorer",'', 'OK') the syntax is wrong, what is the ",",' in ("Microsoft Internet Explorer",'', 'OK') ? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=5802&messageID=16979#16979 From forum-watir-users at openqa.org Tue Jan 9 21:35:17 2007 From: forum-watir-users at openqa.org (liucongying) Date: Tue, 09 Jan 2007 20:35:17 CST Subject: [Wtr-general] how to handle the file download window ! In-Reply-To: <4440693B7CFF2440ABC2E0BE480DABA10A3679@EX01-2.rl.gov> Message-ID: <48163046.1168396547505.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> This method is not available, my code is below require 'watir' # the controller include Watir $ie = IE.new test_site = 'http://war3.replays.net/bbs/htm_data/164/0701/1040238.html' $ie.maximize $ie.image(:index,35).click #click the download button so how to handle the event of "File Download", "Save as"? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6047&messageID=16980#16980 From tester.paul at gmail.com Tue Jan 9 22:17:17 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Tue, 9 Jan 2007 22:17:17 -0500 Subject: [Wtr-general] OT: help understand return from ODBC tables() call? In-Reply-To: <72799cd70701091457g4b800cg9ca6698f291bc884@mail.gmail.com> References: <72799cd70701091457g4b800cg9ca6698f291bc884@mail.gmail.com> Message-ID: <37c405480701091917s6514401fk54119fa245c23045@mail.gmail.com> Hi Chris, I'm not familiar with the table structure that you're working with but I can offer a suggestion as to how I've worked out similar problems in the past. When I can't quite guess the correct returned data structure, I use IRB at a command prompt. I find IRB to be better at trouble-shooting these kinds of things than working through an IDE. After you get the 'indexes', what do you get if you print the output? i.e. just type 'indexes' at the next line? Do you see a multi-dimensional array? Is it a string? Do you see the data you're looking for? IRB's really good about showing you all the correct brackets and quotation marks. BTW, you don't really mention what you're trying to do or looking for. The loops below seem to work as expected - except for the last one. Is there particular data that you don't see? I usually flatten Arrays Of Arrays when they annoy me. ;) Let us know what you find. Cheers. P.C. On 09/01/07, Chris McMahon wrote: > > > Hi... > > Help me understand what data structure this is? Ruby ODBC almost always > returns an ArrayOfArrays, but this is very very weird and I don't understand > what I'm seeing. (btw, google groups access to comp.lang.ruby is down) > > indexes = @conn.indexes('tablename') > > indexes.each do |ind| > puts ind[5] > end > =>nil > PK_indexname > XY_indexname2 > > indexes.each do |ind| > puts ind[5] > puts "hah" > end > =>nil > hah > PK_indexname > hah > XY_indexname2 > hah > > > indexes.each do |ind| > puts ind[5][1] > end > =>foo_index.rb:122: undefined method `[]' for nil:NilClass (NoMethodError) > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070109/8f5e8075/attachment.html From forum-watir-users at openqa.org Wed Jan 10 00:10:22 2007 From: forum-watir-users at openqa.org (sarita) Date: Tue, 09 Jan 2007 23:10:22 CST Subject: [Wtr-general] a common error Message-ID: <34588911.1168405901960.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> require keyword is used to include files: require 'toolkit/testhook' But when ruby is unable to find that file, it shows the following type of error: ******************************************************************************************** c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_re quire': no such file to load -- toolkit/testhook (LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `re quire' from C:/DOCUME~1/sarita/Desktop/lab5_1.rb:7 ********************************************************************************************* But When I comment out the line with require keyword & other related lines, it successfully executes. For example, in the following script I've commented out the lines in bold: ********************************************************************************** # Suggested solution to Lab 5, Part 1, Start The Day w/ Assertions # This line helps Ruby find the toolkit libraries $LOAD_PATH << '..' if $0 == __FILE__ require 'watir' #[b]require 'toolkit/testhook'[/b] ]require 'test/unit/assertions' include Test::Unit::Assertions # make sure we have a new user user_name = 'ruby' #[b]ensure_no_user_data(user_name)[/b] # login ie = Watir::IE.start('http://localhost:8080') ie.text_field(:name, 'name').set(user_name) ie.button(:value , 'Login').click # create a background job ie.text_field(:name, 'name').set('background') ie.button(:value , 'Create').click # start the day ie.button(:name, 'start_day').click # verify the status text assert( ie.p(:id, 'last_results').text.include?( "Job 'background' started" )) assert( ie.p(:id, 'running_job').text.include?( "Job 'background' is running." )) # verify that the job appears in the recent records table assert( ie.table(:id, 'recent_records')[2][1].text == 'background' ) assert( ie.table(:id, 'recent_records')[2][4].text == 'running' ) **************************************************************************** What's 'gem_original_require' in the error msg. How to overcome this error, plz suggest. Sarita --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6063&messageID=16982#16982 From forum-watir-users at openqa.org Wed Jan 10 02:22:43 2007 From: forum-watir-users at openqa.org (Maloy kanti debnath) Date: Wed, 10 Jan 2007 01:22:43 CST Subject: [Wtr-general] Two queries in Watir Message-ID: <47777153.1168413793093.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hello people, I have got two queries in Watir. If they get cleared through this forum, I would be thankful. The queries are: 1. How to access a control, whose '.html' is displayed as ' Active Element: [INPUT], Index: [956] '. I have tried accessing it through commands like 'ie.image', 'ie.link', 'ie.button', 'ie.label' etc. but each time Watir would say that it cannot recognize the object. Is there any other word apart from image, link, button etc., which can be used to access this control? Just for your information, I would like to tell you people that the control referred above is the "Go" button (the button that we click after entering the 'username' and 'password' of our rediffmail id) present in www.rediff.com (please open "www.rediff.com" and look for an 'Orange' color button named "Go"). 2) Where can we see the log (output) of a script? Will the command 'ie.log()' write the given text to the log? If so, where can it be viewed? Thanks in advance, Maloy. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6068&messageID=16987#16987 From deveshverma at hcl.in Wed Jan 10 03:11:46 2007 From: deveshverma at hcl.in (Devesh Verma, HCL-Industry Solutions) Date: Wed, 10 Jan 2007 13:41:46 +0530 Subject: [Wtr-general] Two queries in Watir Message-ID: <2136F8BE059E084581E388FFC50316AAD8A612@GGN-HCLT-EVS01.HCLT.CORP.HCL.IN> Hi Maloy, Try this for accessing the "Go" button.. ie.button(:src, "http://im.rediff.com/uim/news/go-btn.gif").click Regards Devesh -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Maloy kanti debnath Sent: Wednesday, January 10, 2007 12:53 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Two queries in Watir Hello people, I have got two queries in Watir. If they get cleared through this forum, I would be thankful. The queries are: 1. How to access a control, whose '.html' is displayed as ' Active Element: [INPUT], Index: [956] '. I have tried accessing it through commands like 'ie.image', 'ie.link', 'ie.button', 'ie.label' etc. but each time Watir would say that it cannot recognize the object. Is there any other word apart from image, link, button etc., which can be used to access this control? Just for your information, I would like to tell you people that the control referred above is the "Go" button (the button that we click after entering the 'username' and 'password' of our rediffmail id) present in www.rediff.com (please open "www.rediff.com" and look for an 'Orange' color button named "Go"). 2) Where can we see the log (output) of a script? Will the command 'ie.log()' write the given text to the log? If so, where can it be viewed? Thanks in advance, Maloy. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6068&messageID=16987#16987 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general DISCLAIMER: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. ----------------------------------------------------------------------------------------------------------------------- From pandeanupama at hotmail.com Wed Jan 10 05:01:03 2007 From: pandeanupama at hotmail.com (Anupama Kaple) Date: Wed, 10 Jan 2007 10:01:03 +0000 Subject: [Wtr-general] Two queries in Watir In-Reply-To: <2136F8BE059E084581E388FFC50316AAD8A612@GGN-HCLT-EVS01.HCLT.CORP.HCL.IN> Message-ID: Hi Maloy, Here are the steps to create and view the log file To create a log file you need to do the following include the following Include the logger which is present in the following path C:\Watir\watir-v1_4\examples\logging require 'example_logger1' filePrefix = "Test_log" $logger = LoggerFactory.start_xml_logger(filePrefix) $ie.set_logger($logger) Include the text that you need to log in the log file using $logger.log(?Text to be logged?) For eg $logger.log("Step 1: Goto the Site http://www.rediff.com) View the log file in the following path C:\Watir\watir-v1_4\examples\logging Hope this helps Thanks & Regards, Anupama >From: "Devesh Verma, HCL-Industry Solutions" >Reply-To: wtr-general at rubyforge.org >To: >Subject: Re: [Wtr-general] Two queries in Watir >Date: Wed, 10 Jan 2007 13:41:46 +0530 > > >Hi Maloy, > >Try this for accessing the "Go" button.. >ie.button(:src, "http://im.rediff.com/uim/news/go-btn.gif").click > >Regards >Devesh > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Maloy kanti >debnath >Sent: Wednesday, January 10, 2007 12:53 PM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Two queries in Watir > >Hello people, > >I have got two queries in Watir. If they get cleared through this >forum, I would be thankful. The queries are: > >1. How to access a control, whose '.html' is displayed as ' Active >Element: [INPUT], Index: [956] height=22 hspace=0 width=37 >src="http://im.rediff.com/uim/news/go-btn.gif" border=0>'. I have >tried accessing it through commands like 'ie.image', 'ie.link', >'ie.button', 'ie.label' etc. but each time Watir would say that it >cannot recognize the object. Is there any other word apart from image, >link, button etc., which can be used to access this control? >Just for your information, I would like to tell you people that the >control referred above is the "Go" button (the button that we click >after entering the 'username' and 'password' of our rediffmail id) >present in www.rediff.com (please open "www.rediff.com" and look for an >'Orange' color button named "Go"). > >2) Where can we see the log (output) of a script? Will the command >'ie.log()' write the given text to the log? If so, where can it be >viewed? > >Thanks in advance, >Maloy. >--------------------------------------------------------------------- >Posted via Jive Forums >http://forums.openqa.org/thread.jspa?threadID=6068&messageID=16987#16987 >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > >DISCLAIMER: >----------------------------------------------------------------------------------------------------------------------- > >The contents of this e-mail and any attachment(s) are confidential and >intended for the named recipient(s) only. >It shall not attach any liability on the originator or HCL or its >affiliates. Any views or opinions presented in >this email are solely those of the author and may not necessarily reflect >the opinions of HCL or its affiliates. >Any form of reproduction, dissemination, copying, disclosure, modification, >distribution and / or publication of >this message without the prior written consent of the author of this e-mail >is strictly prohibited. If you have >received this email in error please delete it and notify the sender >immediately. Before opening any mail and >attachments please check them for viruses and defect. > >----------------------------------------------------------------------------------------------------------------------- >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _________________________________________________________________ >From photos to predictions, The MSN Entertainment Guide to Golden Globes has it all. http://tv.msn.com/tv/globes2007/?icid=nctagline1 From pandeanupama at hotmail.com Wed Jan 10 04:49:52 2007 From: pandeanupama at hotmail.com (Anupama Kaple) Date: Wed, 10 Jan 2007 09:49:52 +0000 Subject: [Wtr-general] Two queries in Watir In-Reply-To: <2136F8BE059E084581E388FFC50316AAD8A612@GGN-HCLT-EVS01.HCLT.CORP.HCL.IN> Message-ID: Hi Maloy, Try to access the Go button using the following ie.goto('http://mail.rediff.com/cgi-bin/login.cgi') Regards, Anupama >From: "Devesh Verma, HCL-Industry Solutions" >Reply-To: wtr-general at rubyforge.org >To: >Subject: Re: [Wtr-general] Two queries in Watir >Date: Wed, 10 Jan 2007 13:41:46 +0530 > > >Hi Maloy, > >Try this for accessing the "Go" button.. >ie.button(:src, "http://im.rediff.com/uim/news/go-btn.gif").click > >Regards >Devesh > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Maloy kanti >debnath >Sent: Wednesday, January 10, 2007 12:53 PM >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Two queries in Watir > >Hello people, > >I have got two queries in Watir. If they get cleared through this >forum, I would be thankful. The queries are: > >1. How to access a control, whose '.html' is displayed as ' Active >Element: [INPUT], Index: [956] height=22 hspace=0 width=37 >src="http://im.rediff.com/uim/news/go-btn.gif" border=0>'. I have >tried accessing it through commands like 'ie.image', 'ie.link', >'ie.button', 'ie.label' etc. but each time Watir would say that it >cannot recognize the object. Is there any other word apart from image, >link, button etc., which can be used to access this control? >Just for your information, I would like to tell you people that the >control referred above is the "Go" button (the button that we click >after entering the 'username' and 'password' of our rediffmail id) >present in www.rediff.com (please open "www.rediff.com" and look for an >'Orange' color button named "Go"). > >2) Where can we see the log (output) of a script? Will the command >'ie.log()' write the given text to the log? If so, where can it be >viewed? > >Thanks in advance, >Maloy. >--------------------------------------------------------------------- >Posted via Jive Forums >http://forums.openqa.org/thread.jspa?threadID=6068&messageID=16987#16987 >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general > >DISCLAIMER: >----------------------------------------------------------------------------------------------------------------------- > >The contents of this e-mail and any attachment(s) are confidential and >intended for the named recipient(s) only. >It shall not attach any liability on the originator or HCL or its >affiliates. Any views or opinions presented in >this email are solely those of the author and may not necessarily reflect >the opinions of HCL or its affiliates. >Any form of reproduction, dissemination, copying, disclosure, modification, >distribution and / or publication of >this message without the prior written consent of the author of this e-mail >is strictly prohibited. If you have >received this email in error please delete it and notify the sender >immediately. Before opening any mail and >attachments please check them for viruses and defect. > >----------------------------------------------------------------------------------------------------------------------- >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _________________________________________________________________ Dave vs. Carl: The Insignificant Championship Series. ?Who will win? http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://davevscarl.spaces.live.com/?icid=T001MSN38C07001 From forum-watir-users at openqa.org Wed Jan 10 05:08:01 2007 From: forum-watir-users at openqa.org (Maloy kanti debnath) Date: Wed, 10 Jan 2007 04:08:01 CST Subject: [Wtr-general] Two queries in Watir In-Reply-To: <2136F8BE059E084581E388FFC50316AAD8A612@GGN-HCLT-EVS01.HCLT.CORP.HCL.IN> Message-ID: <41817000.1168423711115.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> hi, thank you very much ,using your answer we were able to work with that "Go" button. maloy --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6069&messageID=16994#16994 From forum-watir-users at openqa.org Wed Jan 10 05:57:58 2007 From: forum-watir-users at openqa.org (Maloy kanti debnath) Date: Wed, 10 Jan 2007 04:57:58 CST Subject: [Wtr-general] how to connect with Microsoft Access database Message-ID: <62715836.1168426709005.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> hi, I am not able to connect with Microsoft Access database .. please help me with this thank you. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6070&messageID=16995#16995 From dhrubojyotib at gmail.com Wed Jan 10 06:29:24 2007 From: dhrubojyotib at gmail.com (Dhrubojyoti Biswas) Date: Wed, 10 Jan 2007 16:59:24 +0530 Subject: [Wtr-general] [Wtr-general Digest] - Watir Segementation Fault, Core Dump Message-ID: On 1/9/07, Dhrubojyoti Biswas wrote: > > I just downloaded Watir 1.5.1.1127 and I was running some of the tests > that I had written using Watir 1.4. > > But time and again I keep getting a segmentation fault (core dump) at > Watir.rb line 1212. > > Here's the Error Message that i get: > > "C:/rubyInstall/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./Watir.rb:1212: > [Bug]Segmentation fault ruby 1.8.4 (2005-12-24) [i386-mswin32] > > This application has requested the Runtime to terminate it in an unusual > way. > Please contact the application's support team for more information." > > Can somebody in the Core Watir Dev team look into this issue please? > -- Dhrubo Symantec Corporation www.servergeeks.bravehost.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070110/a4752a2b/attachment.html From deveshverma at hcl.in Wed Jan 10 07:29:12 2007 From: deveshverma at hcl.in (Devesh Verma, HCL-Industry Solutions) Date: Wed, 10 Jan 2007 17:59:12 +0530 Subject: [Wtr-general] [Wtr-general Digest] - Watir Segementation Fault, Core Dump Message-ID: <2136F8BE059E084581E388FFC50316AADA39E3@GGN-HCLT-EVS01.HCLT.CORP.HCL.IN> Uninstall ruby 1.8.4 and install ruby 1.8.2. It should work !! ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Dhrubojyoti Biswas Sent: Wednesday, January 10, 2007 4:59 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] [Wtr-general Digest] - Watir Segementation Fault,Core Dump On 1/9/07, Dhrubojyoti Biswas wrote: I just downloaded Watir 1.5.1.1127 and I was running some of the tests that I had written using Watir 1.4. But time and again I keep getting a segmentation fault (core dump) at Watir.rb line 1212. Here's the Error Message that i get: "C:/rubyInstall/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./Watir.rb:1212: [Bug]Segmentation fault ruby 1.8.4 (2005-12-24) [i386-mswin32] This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information." Can somebody in the Core Watir Dev team look into this issue please? -- Dhrubo Symantec Corporation www.servergeeks.bravehost.com DISCLAIMER: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. ----------------------------------------------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070110/82be95e9/attachment.html From forum-watir-users at openqa.org Wed Jan 10 08:55:00 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Wed, 10 Jan 2007 07:55:00 CST Subject: [Wtr-general] Error with file_field in a modal window (using 1.8.2 / 1.5.1.1127 ) Message-ID: <34541050.1168437330657.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Having some problems using file_field in a modal window. Like the subject says i do have 1.8.2 installed (just installed it) and Watir 1.5.1.1127 (from the gem) and I'm getting the following error. The AutoIt dll must be correctly registered for this feature to work properly c:/program files/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir/windowhelper.rb:42:in `check_autoit_installed' c:/program files/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:3956:in `set' here is the HTML of the field itself anyone have any ideas :) --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6074&messageID=16999#16999 From angrez at gmail.com Wed Jan 10 09:21:22 2007 From: angrez at gmail.com (Angrez Singh) Date: Wed, 10 Jan 2007 19:51:22 +0530 Subject: [Wtr-general] Error with file_field in a modal window (using 1.8.2 / 1.5.1.1127 ) In-Reply-To: <34541050.1168437330657.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <34541050.1168437330657.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Hi John, You can manually install AutoIt dll using regsvr32 command. Regards, Angrez On 1/10/07, John Lolis wrote: > > Having some problems using file_field in a modal window. Like the subject > says i do have 1.8.2 installed (just installed it) and Watir 1.5.1.1127(from the gem) and I'm getting the following error. > > The AutoIt dll must be correctly registered for this feature to work > properly > c:/program files/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir/windowhelper.rb:42:in > `check_autoit_installed' > c:/program files/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1127/./watir.rb:3956:in > `set' > > here is the HTML of the field itself > > name=DriverFileUpload$DriverFileUpload> > > anyone have any ideas :) > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6074&messageID=16999#16999 > _______________________________________________ > 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/20070110/970695e4/attachment.html From Mark_Cain at RL.gov Wed Jan 10 09:28:57 2007 From: Mark_Cain at RL.gov (Cain, Mark) Date: Wed, 10 Jan 2007 06:28:57 -0800 Subject: [Wtr-general] Alert box - hangs In-Reply-To: <46941405.1168389139719.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <4440693B7CFF2440ABC2E0BE480DABA10A3681@EX01-2.rl.gov> Can you send your code and html? --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of usha Sent: Tuesday, January 09, 2007 4:31 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Alert box - hangs Hi, I've been trying to click on the Alert box with no success. Tried both methods suggested in the thread below - no luck. http://forums.openqa.org/thread.jspa?threadID=5802&tstart=15 Script hangs till I manually click on the Alert box. The button which triggers the Alert remains yellow in color. Any help is appreciated since I cannot proceed with my tests. Thanks --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6061&messageID=16977#16977 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From tester.paul at gmail.com Wed Jan 10 10:32:55 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Wed, 10 Jan 2007 10:32:55 -0500 Subject: [Wtr-general] Error with file_field in a modal window (using 1.8.2 / 1.5.1.1127 ) In-Reply-To: References: <34541050.1168437330657.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <37c405480701100732w1d7a967dqff0081930989b9a2@mail.gmail.com> And you do this how...? Perhaps you should include a link, reference or example of how to do this in your response. On 10/01/07, Angrez Singh wrote: > > Hi John, > > You can manually install AutoIt dll using regsvr32 command. > > Regards, > Angrez > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070110/c29cbf5f/attachment-0001.html From charley.baker at gmail.com Wed Jan 10 10:36:55 2007 From: charley.baker at gmail.com (Charley Baker) Date: Wed, 10 Jan 2007 08:36:55 -0700 Subject: [Wtr-general] a common error In-Reply-To: <34588911.1168405901960.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <34588911.1168405901960.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Your required files need to be in a directory that's in your load path. According to the file below you could put the toolkit directory (which I assume contains testhook.rb) in the same directory as your script, lab5_1.rb and it should work. If not, do a google search on ruby load path, you'll find many references which might help you understand this. -Charley On 1/9/07, sarita wrote: > > require keyword is used to include files: require 'toolkit/testhook' > > But when ruby is unable to find that file, it shows the following type of > error: > > > ******************************************************************************************** > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_re > quire': no such file to load -- toolkit/testhook (LoadError) > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `re > quire' > from C:/DOCUME~1/sarita/Desktop/lab5_1.rb:7 > > ********************************************************************************************* > > But When I comment out the line with require keyword & other related > lines, it successfully executes. > > For example, in the following script I've commented out the lines in bold: > > > ********************************************************************************** > # Suggested solution to Lab 5, Part 1, Start The Day w/ Assertions > > # This line helps Ruby find the toolkit libraries > $LOAD_PATH << '..' if $0 == __FILE__ > > require 'watir' > #[b]require 'toolkit/testhook'[/b] > ]require 'test/unit/assertions' > include Test::Unit::Assertions > > # make sure we have a new user > user_name = 'ruby' > #[b]ensure_no_user_data(user_name)[/b] > # login > ie = Watir::IE.start('http://localhost:8080') > ie.text_field(:name, 'name').set(user_name) > ie.button(:value , 'Login').click > > # create a background job > ie.text_field(:name, 'name').set('background') > ie.button(:value , 'Create').click > > # start the day > ie.button(:name, 'start_day').click > > # verify the status text > assert( ie.p(:id, 'last_results').text.include?( "Job 'background' > started" )) > assert( ie.p(:id, 'running_job').text.include?( "Job 'background' is > running." )) > > # verify that the job appears in the recent records table > assert( ie.table(:id, 'recent_records')[2][1].text == 'background' ) > assert( ie.table(:id, 'recent_records')[2][4].text == 'running' ) > > **************************************************************************** > What's 'gem_original_require' in the error msg. How to overcome this > error, plz suggest. > > Sarita > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6063&messageID=16982#16982 > _______________________________________________ > 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/20070110/78421784/attachment.html From forum-watir-users at openqa.org Wed Jan 10 10:38:56 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Wed, 10 Jan 2007 09:38:56 CST Subject: [Wtr-general] Error with file_field in a modal window (using In-Reply-To: Message-ID: <48851485.1168443566427.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thanks for the information! I registered AutoItX3.dll using regsvr32 and it got rid of the error message, the problem now is it doesn't fill in the field with any text. I can flash it, so i know I have the right field - I just can't put anything in there. any more ideas? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6074&messageID=17003#17003 From charley.baker at gmail.com Wed Jan 10 10:42:19 2007 From: charley.baker at gmail.com (Charley Baker) Date: Wed, 10 Jan 2007 08:42:19 -0700 Subject: [Wtr-general] how to connect with Microsoft Access database In-Reply-To: <62715836.1168426709005.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <62715836.1168426709005.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Take a look at dbi, you can use odbc to connect to Access: http://rubyforge.org/projects/ruby-dbi/ Tutorial: http://www.kitebird.com/articles/ruby-dbi.html -Charley On 1/10/07, Maloy kanti debnath wrote: > > hi, > I am not able to connect with Microsoft Access database .. please help > me with this > thank you. > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6070&messageID=16995#16995 > _______________________________________________ > 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/20070110/7e7dc54d/attachment.html From charley.baker at gmail.com Wed Jan 10 10:51:27 2007 From: charley.baker at gmail.com (Charley Baker) Date: Wed, 10 Jan 2007 08:51:27 -0700 Subject: [Wtr-general] Error with file_field in a modal window (using 1.8.2 / 1.5.1.1127 ) In-Reply-To: <37c405480701100732w1d7a967dqff0081930989b9a2@mail.gmail.com> References: <34541050.1168437330657.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <37c405480701100732w1d7a967dqff0081930989b9a2@mail.gmail.com> Message-ID: >From command line in the Watir directory where the AutoIt dll lives, run regsvr32 AutoItX3.dll -Charley On 1/10/07, Paul Carvalho wrote: > > And you do this how...? Perhaps you should include a link, reference or > example of how to do this in your response. > > > On 10/01/07, Angrez Singh < angrez at gmail.com> wrote: > > > > Hi John, > > > > You can manually install AutoIt dll using regsvr32 command. > > > > Regards, > > Angrez > > > > > > _______________________________________________ > 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/20070110/272ffbe9/attachment.html From bret at pettichord.com Wed Jan 10 11:18:21 2007 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 10 Jan 2007 10:18:21 -0600 Subject: [Wtr-general] Error with file_field in a modal window (using In-Reply-To: <48851485.1168443566427.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <48851485.1168443566427.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45A511CD.1020002@pettichord.com> John Lolis wrote: > any more ideas? > I am seeing the same behavior and looking into it. Bret From balakrishna.venkatappa at ionidea.com Wed Jan 10 11:37:14 2007 From: balakrishna.venkatappa at ionidea.com (Balakrishna) Date: Wed, 10 Jan 2007 11:37:14 -0500 Subject: [Wtr-general] Multiple Javascript Dialog boxes. In-Reply-To: <45A511CD.1020002@pettichord.com> References: <48851485.1168443566427.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <45A511CD.1020002@pettichord.com> Message-ID: <006501c734d5$97912a20$c6b37e60$@venkatappa@ionidea.com> Friends : I have multiple levels of security acceptance to my website. First it shows a digital ceritificate dialog box, then a security dialog box and the an alert message box. I need to click on all these dialog boxes before I can proceed with the application. All these occur sequentially after I open the website. The control in ruby does not pass until I click OK or YES button on the dialog boxes. Any idea as to how we can handle this ? Also it may not occur sometimes because the previous session could be still active. How can we fix this issue to click on the dialog box if it is visible? Thanks Balu From forum-watir-users at openqa.org Wed Jan 10 13:02:59 2007 From: forum-watir-users at openqa.org (Bach Le) Date: Wed, 10 Jan 2007 12:02:59 CST Subject: [Wtr-general] Speed of Firewatir vs. Watir Message-ID: <35710763.1168452214926.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hello all, I recently installed firewatir and modified one of my tests that was using watir to use FireWatir and the tests ran very fast. I read in some other posts that firewatir was supposedly slower due to using jssh to send messages to the browser. When I ran the the unit tests for firewatir, the tests completed pretty quickly, however, unit tests for IE Watir was a bit slower in that the browser was less responsive. I was wondering if there have been advancements recently with firewatir because I didn't notice the slowness everyone else was talking about. Thanks. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6078&messageID=17014#17014 From tester.paul at gmail.com Wed Jan 10 15:10:07 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Wed, 10 Jan 2007 15:10:07 -0500 Subject: [Wtr-general] OT: Need help Trapping Errors in Ruby Message-ID: <37c405480701101210x5e7b8c5q72595ca3e9984a2c@mail.gmail.com> Hi there, I've got more of a Ruby question than a Watir one, so I hope you don't mind if I post it here first. I am in the process of rewriting my first Ruby/Watir scripts from a year ago - a site-map walkthrough script to collect some simple Performance metrics. When I first wrote the script, I used the Test/Unit (Class/Test) structure because that was the only way I knew how to structure scripts at that time. (i.e. used the Watir examples as a guide.) A year later, I now know how to structure my scripts in a more regular Ruby script fashion so I updated my walkthrough script. I used a neat trick in my old script to recover from a script error (e.g. assertion failure) and continue on but I seem to be having some problems doing the same thing with the Ruby script format. I was wondering if someone can offer any advice to help me figure this out. Here's what I've got so far: ## Main script snippet: ... # open the IE browser $ie = IE.new # A) Walk the Public Pages. => Need to Trap this so the "something_went_wrong" variable works correctly page_set_to_check( walk_Public_Pages ) ---- # Here's the page_set_to_check() method: module site_walkabout_methods def page_set_to_check( page_set ) begin page_set rescue => e $something_went_wrong = 'Yes' end write_status end end ---- So, the "walk_Public_Pages" routine gets called, but if there's an assertion failure in it (e.g. because of an incorrect link name), the "rescue => e" part of page_set_to_check() doesn't run like I would expect it to. In fact, the whole script terminates at this point! Please let me know if you have any helpful suggestions to get the script to auto-recover and continue. Thanks. Paul C. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070110/8a6caa75/attachment-0001.html From forum-watir-users at openqa.org Wed Jan 10 16:20:49 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Wed, 10 Jan 2007 15:20:49 CST Subject: [Wtr-general] OT: Need help Trapping Errors in Ruby In-Reply-To: <37c405480701101210x5e7b8c5q72595ca3e9984a2c@mail.gmail.com> Message-ID: <32569023.1168464080071.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> > ## Main script snippet: > ... > # open the IE browser > $ie = IE.new > # A) Walk the Public Pages. => Need to Trap this so > the > something_went_wrong" variable works correctly > page_set_to_check( walk_Public_Pages ) > --- > > # Here's the page_set_to_check() method: > > module site_walkabout_methods > > def page_set_to_check( page_set ) > begin > page_set > rescue => e > $something_went_wrong = 'Yes' > write_status > > end I'm a touch confused by this, what is page_set? My first reaction is to say that somewhere deeper down in your code an exception is begin thrown and is silently beginning handled thus said function returns even though things didn't work. The only reason I'm guessing this is because of the way you handle this exception. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6079&messageID=17017#17017 From tester.paul at gmail.com Wed Jan 10 16:40:24 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Wed, 10 Jan 2007 16:40:24 -0500 Subject: [Wtr-general] OT: Need help Trapping Errors in Ruby In-Reply-To: <32569023.1168464080071.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <37c405480701101210x5e7b8c5q72595ca3e9984a2c@mail.gmail.com> <32569023.1168464080071.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <37c405480701101340p78e5b677r6860db0c1b77ba7e@mail.gmail.com> page_set is just a local variable used to call the method name that I want to execute. I'm basically calling a method (e.g. 'walk_Public_Pages') from within a method (page_set_to_check) that is supposed to trap the errors/exceptions. However, if there's an error in the 'walk_Public_Pages' method, it not only escapes out of the page_set_to_check() method, but also out of the whole script! I'm wondering if changing the main "module" to a "class" will have a different effect? Just a shot in the dark. I'm chasing another goose at the moment, so I'll try that shortly. P.C. On 10/01/07, John Lolis wrote: > > I'm a touch confused by this, what is page_set? > > My first reaction is to say that somewhere deeper down in your code an > exception is begin thrown and is silently beginning handled thus said > function returns even though things didn't work. > > The only reason I'm guessing this is because of the way you handle this > exception. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070110/91fee490/attachment.html From tester.paul at gmail.com Wed Jan 10 17:01:14 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Wed, 10 Jan 2007 17:01:14 -0500 Subject: [Wtr-general] What does IE.down_load_time really measure? Message-ID: <37c405480701101401q326f2e2y87a93bf76141eb8e@mail.gmail.com> I've got a script that walks through a simple web application and retrieves the page size and page download times. (By "simple web app" I mean no frames and only about a dozen pages - mostly reports and a Personal Settings page.) The script outputs these values to an output CSV file so that I can then chart them in Excel. I watched the script run and complete just now and noticed something interesting. I watched the "Home" page take a second or so to come up but when I checked the output file, it recorded that it took 0.015 seconds according to "ie.down_load_time". That didn't seem right to me, so I added a second time check to the script. Like this: # Begin code snippet: ... secondary_page_timer = Time.now ie.button(:name, /UpdateSettingsButton/).click $f.puts page_title + ',' + ie.html.length.to_s + ',' + ie.down_load_time.to_s + ',' + (Time.now - secondary_page_timer).to_s ... # End snippet Now when I rerun the script and check the output file, I see the following: > Page Load Time 1 (s) = 0.015 > Page Load Time 2 (s) = 1.075 That's a big difference! I should mention that this is Watir 1.4.1. I just happened to be using this machine right now. I haven't tried it with any 1.5.x gem yet. Any thoughts or suggestions? The Watir API Reference doesn't give any insights into how the "down_load_time" attribute works. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070110/008ec455/attachment.html From christopher.mcmahon at gmail.com Wed Jan 10 17:18:32 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 10 Jan 2007 14:18:32 -0800 Subject: [Wtr-general] What does IE.down_load_time really measure? In-Reply-To: <37c405480701101401q326f2e2y87a93bf76141eb8e@mail.gmail.com> References: <37c405480701101401q326f2e2y87a93bf76141eb8e@mail.gmail.com> Message-ID: <72799cd70701101418m2dcd23adya2596f59576be09d@mail.gmail.com> @down_load_time = Time.now - start_load_time in def wait line 1519/1476 in watir.rb in 1.5.1127. :) difference is probably render time On 1/10/07, Paul Carvalho wrote: > > I've got a script that walks through a simple web application and > retrieves the page size and page download times. (By "simple web app" I > mean no frames and only about a dozen pages - mostly reports and a Personal > Settings page.) The script outputs these values to an output CSV file so > that I can then chart them in Excel. > > I watched the script run and complete just now and noticed something > interesting. I watched the "Home" page take a second or so to come up but > when I checked the output file, it recorded that it took 0.015 seconds > according to "ie.down_load_time". > > That didn't seem right to me, so I added a second time check to the > script. Like this: > > # Begin code snippet: > ... > secondary_page_timer = Time.now > ie.button(:name, /UpdateSettingsButton/).click > > $f.puts page_title + ',' + ie.html.length.to_s + ',' + > ie.down_load_time.to_s + ',' + (Time.now - secondary_page_timer).to_s > ... > # End snippet > > Now when I rerun the script and check the output file, I see the > following: > > Page Load Time 1 (s) = 0.015 > > Page Load Time 2 (s) = 1.075 > > That's a big difference! I should mention that this is Watir 1.4.1. I > just happened to be using this machine right now. I haven't tried it with > any 1.5.x gem yet. > > Any thoughts or suggestions? The Watir API Reference doesn't give any > insights into how the "down_load_time" attribute works. > > > > _______________________________________________ > 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/20070110/8c45e729/attachment.html From tester.paul at gmail.com Wed Jan 10 17:47:17 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Wed, 10 Jan 2007 17:47:17 -0500 Subject: [Wtr-general] OT: Need help Trapping Errors in Ruby In-Reply-To: <37c405480701101340p78e5b677r6860db0c1b77ba7e@mail.gmail.com> References: <37c405480701101210x5e7b8c5q72595ca3e9984a2c@mail.gmail.com> <32569023.1168464080071.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <37c405480701101340p78e5b677r6860db0c1b77ba7e@mail.gmail.com> Message-ID: <37c405480701101447j2442a89bu7295f879fcc4d495@mail.gmail.com> Got the answer I need from the Programming Ruby 2nd Edition book and thought I would share it here. >From the "Handling Exceptions" section (p. 361), I got that I should add the "rescue" block to the end of my site-walking methods, and not the calling method (i.e. page_set_to_check()). Basically I was using the rescue block in a way that Ruby didn't pay attention to. So I made the following changes to my script: (1) delete the page_set_to_check() method (2) added the following rescue block to the end of each page set (site-walking) method: ---- module site_walkabout_methods ... def walk_Public_Pages # launch ie # goto some page # get page size and download time # click to another page. yadda, yadda. # ... rescue => e $something_went_wrong = 'Yes' puts e ensure write_status end end ---- So the methods themselves are self-correcting and I don't need to try and capture exceptions with some umbrella method. Cool. I'm happy. Moving on.. Cheers. Paul C. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070110/b762b19c/attachment.html From forum-watir-users at openqa.org Wed Jan 10 17:54:05 2007 From: forum-watir-users at openqa.org (usha) Date: Wed, 10 Jan 2007 16:54:05 CST Subject: [Wtr-general] Alert box - hangs In-Reply-To: <4440693B7CFF2440ABC2E0BE480DABA10A3681@EX01-2.rl.gov> Message-ID: <54115187.1168469754495.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> [u]html -[/u] [u]ruby sc[/u]ript : ie.button(:name,"edit").click_no_wait wc = WinClicker.new wc.clickWindowsButton("Microsoft Internet Explorer", "OK") # also tried startClicker from the link from my original post #startClicker("OK", 7, "User Input") result is as said above, edit button remains yellow. Nothing clicked on the Alert window. with WinClicker, Alert box appears active but then nothing is clicked. Exits with 0. Thanks --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6061&messageID=17024#17024 From tester.paul at gmail.com Wed Jan 10 17:56:37 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Wed, 10 Jan 2007 17:56:37 -0500 Subject: [Wtr-general] What does IE.down_load_time really measure? In-Reply-To: <72799cd70701101418m2dcd23adya2596f59576be09d@mail.gmail.com> References: <37c405480701101401q326f2e2y87a93bf76141eb8e@mail.gmail.com> <72799cd70701101418m2dcd23adya2596f59576be09d@mail.gmail.com> Message-ID: <37c405480701101456g5bff016ag8c0cfd2999ad209a@mail.gmail.com> Hmm, okay, so it looks like there are two interesting sub-measures then. >From a user's perspective, a web page's "response time" would equal down_load_time + render time. How much faith should we put in the IE.down_load_time attribute if it doesn't include the render time? I mean, I *watched* the Home page take ~ 1 second to load in the IE browser, so I really don't believe that it took 0.015 seconds to download to the user. I think I'm going to keep the extra column in my output file for now and plot both lines on the charts for comparison. Thanks for checking this, Chris. (I've tried sifting through the watir.rbfile but it's still mostly Greek to me... and I'm not Greek. ;)) Cheers. Paul. On 10/01/07, Chris McMahon wrote: > > > @down_load_time = Time.now - start_load_time > in def wait > line 1519/1476 in watir.rb in 1.5.1127. > :) > > > difference is probably render time > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070110/8769ef6c/attachment-0001.html From bret at pettichord.com Wed Jan 10 17:58:36 2007 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 10 Jan 2007 16:58:36 -0600 Subject: [Wtr-general] Error with file_field in a modal window (using In-Reply-To: <48851485.1168443566427.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <48851485.1168443566427.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45A56F9C.8010303@pettichord.com> John Lolis wrote: > I registered AutoItX3.dll using regsvr32 and it got rid of the error message, the problem now is it doesn't fill in the field with any text. I can flash it, so i know I have the right field - I just can't put anything in there. > > any more ideas? > Today I checked in fixes for both this and the other problem (autoit registration). These are NOT in today's dev gem, but will be in the next one. You can pull them from trunk if you like. A workaround for this problem for earlier versions of 1.5 is this: 1. Manually register autoit: >regsvr32 AutoItX3.dll 2. Add a call to click: ie.file_field(:id, 'DriverFileUpload_DriverFileUpload').set(filename) ie.file_field(:id, 'DriverFileUpload_DriverFileUpload').click Please let us know if either of these solutions does not fix this problem for anyone. Bret From bret at pettichord.com Wed Jan 10 18:16:25 2007 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 10 Jan 2007 17:16:25 -0600 Subject: [Wtr-general] What does IE.down_load_time really measure? In-Reply-To: <37c405480701101401q326f2e2y87a93bf76141eb8e@mail.gmail.com> References: <37c405480701101401q326f2e2y87a93bf76141eb8e@mail.gmail.com> Message-ID: <45A573C9.10404@pettichord.com> Paul Carvalho wrote: > I've got a script that walks through a simple web application and > retrieves the page size and page download times. (By "simple web app" > I mean no frames and only about a dozen pages - mostly reports and a > Personal Settings page.) The script outputs these values to an output > CSV file so that I can then chart them in Excel. > > I watched the script run and complete just now and noticed something > interesting. I watched the "Home" page take a second or so to come up > but when I checked the output file, it recorded that it took 0.015 > seconds according to "ie.down_load_time". > > That didn't seem right to me, so I added a second time check to the > script. Like this: > > # Begin code snippet: > ... > secondary_page_timer = Time.now > ie.button(:name, /UpdateSettingsButton/).click > > $f.puts page_title + ',' + ie.html.length.to_s + ',' + > ie.down_load_time.to_s + ',' + (Time.now - secondary_page_timer).to_s > ... > # End snippet > > Now when I rerun the script and check the output file, I see the > following: > > Page Load Time 1 (s) = 0.015 > > Page Load Time 2 (s) = 1.075 > > That's a big difference! I should mention that this is Watir 1.4.1. > I just happened to be using this machine right now. I haven't tried > it with any 1.5.x gem yet. > > Any thoughts or suggestions? The Watir API Reference doesn't give any > insights into how the "down_load_time" attribute works. The "down_load_time" is the amount of time that watir waits in the wait method that is automatically called after the click. It should be roughly the same as the "wait_time" defined below: ie. button(:name, /UpdateSettingsButton/).click! then = Time.now ie.wait wait_time = Time.now - then I'm confused by your example because your output does not match your code. I've updated the rdoc for down_load_time to read: # The time, in seconds, it took for the new page to load after executing the # the last command Is this clearer? Bret From balakrishna.venkatappa at ionidea.com Wed Jan 10 18:31:30 2007 From: balakrishna.venkatappa at ionidea.com (Balakrishna) Date: Wed, 10 Jan 2007 18:31:30 -0500 Subject: [Wtr-general] Multiple Javascript Dialog boxes. In-Reply-To: <006501c734d5$97912a20$c6b37e60$@venkatappa@ionidea.com> References: <48851485.1168443566427.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <45A511CD.1020002@pettichord.com> <006501c734d5$97912a20$c6b37e60$@venkatappa@ionidea.com> Message-ID: <002c01c7350f$77262a80$65727f80$@venkatappa@ionidea.com> HI all Can some throw some light on this type of problem ? Balu -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Balakrishna Sent: Wednesday, January 10, 2007 11:37 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Multiple Javascript Dialog boxes. Friends : I have multiple levels of security acceptance to my website. First it shows a digital ceritificate dialog box, then a security dialog box and the an alert message box. I need to click on all these dialog boxes before I can proceed with the application. All these occur sequentially after I open the website. The control in ruby does not pass until I click OK or YES button on the dialog boxes. Any idea as to how we can handle this ? Also it may not occur sometimes because the previous session could be still active. How can we fix this issue to click on the dialog box if it is visible? Thanks Balu _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Mark_Cain at RL.gov Wed Jan 10 18:47:09 2007 From: Mark_Cain at RL.gov (Cain, Mark) Date: Wed, 10 Jan 2007 15:47:09 -0800 Subject: [Wtr-general] Alert box - hangs In-Reply-To: <54115187.1168469754495.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <4440693B7CFF2440ABC2E0BE480DABA10A3689@EX01-2.rl.gov> What version of IE are you using? Because in IE7 Microsoft changed the tile bar name of all popups from "Microsoft Internet Explorer" to "Windows Internet Explorer" this would cause a Hang as you described. --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of usha Sent: Wednesday, January 10, 2007 2:54 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Alert box - hangs [u]html -[/u] [u]ruby sc[/u]ript : ie.button(:name,"edit").click_no_wait wc = WinClicker.new wc.clickWindowsButton("Microsoft Internet Explorer", "OK") # also tried startClicker from the link from my original post #startClicker("OK", 7, "User Input") result is as said above, edit button remains yellow. Nothing clicked on the Alert window. with WinClicker, Alert box appears active but then nothing is clicked. Exits with 0. Thanks --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6061&messageID=17024#17024 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From forum-watir-users at openqa.org Wed Jan 10 19:13:23 2007 From: forum-watir-users at openqa.org (usha) Date: Wed, 10 Jan 2007 18:13:23 CST Subject: [Wtr-general] Alert box - hangs In-Reply-To: <4440693B7CFF2440ABC2E0BE480DABA10A3689@EX01-2.rl.gov> Message-ID: <29146868.1168474437552.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I'm using IE 6 I registered AutoItX3.dll using regsvr32 Ruby 1.8, Watir 1.5 Alert box title is 'Microsoft Internet Explorer' Thanks --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6061&messageID=17030#17030 From forum-watir-users at openqa.org Wed Jan 10 23:02:40 2007 From: forum-watir-users at openqa.org (sarita) Date: Wed, 10 Jan 2007 22:02:40 CST Subject: [Wtr-general] a common error In-Reply-To: Message-ID: <58938151.1168488222911.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thanks Charly, ur solution worked, but again one more error came: c:/ruby/lib/ruby/1.8/drb/drb.rb:736:in `open': druby://localhost:9002 - # (DRb::DRbConnError) from c:/ruby/lib/ruby/1.8/drb/drb.rb:729:in `each' from c:/ruby/lib/ruby/1.8/drb/drb.rb:729:in `open' from c:/ruby/lib/ruby/1.8/drb/drb.rb:1189:in `initialize' from c:/ruby/lib/ruby/1.8/drb/drb.rb:1169:in `new' from c:/ruby/lib/ruby/1.8/drb/drb.rb:1169:in `open' from c:/ruby/lib/ruby/1.8/drb/drb.rb:1085:in `method_missing' from c:/ruby/lib/ruby/1.8/drb/drb.rb:1103:in `with_friend' from c:/ruby/lib/ruby/1.8/drb/drb.rb:1084:in `method_missing' from ./toolkit/testhook.rb:14:in `ensure_no_user_data' from C:/DOCUME~1/sarita/Desktop/lab5_1.rb:13 How to solve this again, plz suggest. Regards, Sarita --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6063&messageID=17032#17032 From christopher.mcmahon at gmail.com Wed Jan 10 23:40:24 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 10 Jan 2007 20:40:24 -0800 Subject: [Wtr-general] a common error In-Reply-To: <58938151.1168488222911.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <58938151.1168488222911.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70701102040m5f8dc0a8g6928c85ff8adbc38@mail.gmail.com> Nobody is listening on port 9002 on localhost. Why are you using drb? On 1/10/07, sarita wrote: > > Thanks Charly, ur solution worked, but again one more error came: > > c:/ruby/lib/ruby/1.8/drb/drb.rb:736:in `open': druby://localhost:9002 - > # :EBADF: Bad file descriptor - connect(2)> (DRb::DRbConnError) > from c:/ruby/lib/ruby/1.8/drb/drb.rb:729:in `each' > from c:/ruby/lib/ruby/1.8/drb/drb.rb:729:in `open' > from c:/ruby/lib/ruby/1.8/drb/drb.rb:1189:in `initialize' > from c:/ruby/lib/ruby/1.8/drb/drb.rb:1169:in `new' > from c:/ruby/lib/ruby/1.8/drb/drb.rb:1169:in `open' > from c:/ruby/lib/ruby/1.8/drb/drb.rb:1085:in `method_missing' > from c:/ruby/lib/ruby/1.8/drb/drb.rb:1103:in `with_friend' > from c:/ruby/lib/ruby/1.8/drb/drb.rb:1084:in `method_missing' > from ./toolkit/testhook.rb:14:in `ensure_no_user_data' > from C:/DOCUME~1/sarita/Desktop/lab5_1.rb:13 > > How to solve this again, plz suggest. > > Regards, > Sarita > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6063&messageID=17032#17032 > _______________________________________________ > 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/20070110/256dcd5d/attachment.html From christopher.mcmahon at gmail.com Wed Jan 10 23:52:52 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 10 Jan 2007 20:52:52 -0800 Subject: [Wtr-general] a common error In-Reply-To: <58938151.1168488222911.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <58938151.1168488222911.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70701102052g411aba7fra5c7ac0359c7958@mail.gmail.com> Also, and this goes for everybody, spell "please" and "your" and all the other words (especially the name of the person who answered your question) correctly. Make your subjects agree with your verbs, and use articles and pronouns appropriately. You are not sending this from a cell phone, there is no harm in using the actual spelling of the actual word. History (not to mention the everyday readers of this list) will thank you for this. On 1/10/07, sarita wrote: > > Thanks Charly, ur solution worked, but again one more error came: > > c:/ruby/lib/ruby/1.8/drb/drb.rb:736:in `open': druby://localhost:9002 - > # :EBADF: Bad file descriptor - connect(2)> (DRb::DRbConnError) > from c:/ruby/lib/ruby/1.8/drb/drb.rb:729:in `each' > from c:/ruby/lib/ruby/1.8/drb/drb.rb:729:in `open' > from c:/ruby/lib/ruby/1.8/drb/drb.rb:1189:in `initialize' > from c:/ruby/lib/ruby/1.8/drb/drb.rb:1169:in `new' > from c:/ruby/lib/ruby/1.8/drb/drb.rb:1169:in `open' > from c:/ruby/lib/ruby/1.8/drb/drb.rb:1085:in `method_missing' > from c:/ruby/lib/ruby/1.8/drb/drb.rb:1103:in `with_friend' > from c:/ruby/lib/ruby/1.8/drb/drb.rb:1084:in `method_missing' > from ./toolkit/testhook.rb:14:in `ensure_no_user_data' > from C:/DOCUME~1/sarita/Desktop/lab5_1.rb:13 > > How to solve this again, plz suggest. > > Regards, > Sarita > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6063&messageID=17032#17032 > _______________________________________________ > 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/20070110/07f9597f/attachment-0001.html From angrez at gmail.com Thu Jan 11 01:11:05 2007 From: angrez at gmail.com (Angrez Singh) Date: Thu, 11 Jan 2007 11:41:05 +0530 Subject: [Wtr-general] Error with file_field in a modal window (using In-Reply-To: <45A56F9C.8010303@pettichord.com> References: <48851485.1168443566427.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <45A56F9C.8010303@pettichord.com> Message-ID: Hi Bret, I would like to add something here. 1. In the file 'winClicker.rb' and method 'clickJSDialog_NewProcess()' myapp = "#{@path_to_clicker}/clickJSDialog.rb #{button}" winsystem(" start #{myapp}") Now this thing will not work if user has configured to open the files with '.rb' extension with some editor like Notepad, wordpad, gvim etc. So what I suggest is to change the myapp variable to include ruby interpreter also like this: myapp = "ruby #{@path_to_clicker}/clickJSDialog.rb #{button}" This will use ruby interpreter to open the file no matter what user has configured on his/her machine. I faced this problem during testing on my machine. Similarly, we need to append ruby interpreter in the function 'setFileRequesterFileName_newProcess' which is used to set FileName in the file_field control. Correct me if I am wrong here. Regards, Angrez On 1/11/07, Bret Pettichord wrote: > > John Lolis wrote: > > I registered AutoItX3.dll using regsvr32 and it got rid of the error > message, the problem now is it doesn't fill in the field with any text. I > can flash it, so i know I have the right field - I just can't put anything > in there. > > > > any more ideas? > > > > Today I checked in fixes for both this and the other problem (autoit > registration). These are NOT in today's dev gem, but will be in the next > one. You can pull them from trunk if you like. > > A workaround for this problem for earlier versions of 1.5 is this: > > 1. Manually register autoit: > > >regsvr32 AutoItX3.dll > > 2. Add a call to click: > > ie.file_field(:id, 'DriverFileUpload_DriverFileUpload').set(filename) > ie.file_field(:id, 'DriverFileUpload_DriverFileUpload').click > > Please let us know if either of these solutions does not fix this > problem for anyone. > > Bret > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070111/f824be0f/attachment.html From angrez at gmail.com Thu Jan 11 01:22:06 2007 From: angrez at gmail.com (Angrez Singh) Date: Thu, 11 Jan 2007 11:52:06 +0530 Subject: [Wtr-general] Speed of Firewatir vs. Watir In-Reply-To: <35710763.1168452214926.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <35710763.1168452214926.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Hi, Yeah we have been working on improving the performance of FireWatir for last few months. The performance has been improved significantly and it runs faster than IE on windows. FireWatir has been tested just on Windows with different Firefox versions like 1.5, 1.5.0.4, 1.5.0.7 , 2.0 and 2.0.0.1. I'll be releasing version 1.0 of FireWatir next week, which includes starting the FireWatir from the script itself i.e. you don't have start Firefox manually and then run the script. This will work for Windows only. Though it should work on Linux, Mac its not tested yet. Also I would like to know any issues/problems that you faced while installing FireWatir so that we can include the same in the Installation Guide. Your suggestions are always welcome. I have created a separate list for FireWatir discussion at google groups: firewatir at googlegroups.com Regards, Angrez On 1/10/07, Bach Le wrote: > > Hello all, > I recently installed firewatir and modified one of my tests that was > using watir to use FireWatir and the tests ran very fast. I read in some > other posts that firewatir was supposedly slower due to using jssh to send > messages to the browser. When I ran the the unit tests for firewatir, the > tests completed pretty quickly, however, unit tests for IE Watir was a bit > slower in that the browser was less responsive. I was wondering if there > have been advancements recently with firewatir because I didn't notice the > slowness everyone else was talking about. Thanks. > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6078&messageID=17014#17014 > _______________________________________________ > 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/20070111/8beaa117/attachment.html From christopher.mcmahon at gmail.com Thu Jan 11 01:31:39 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 10 Jan 2007 22:31:39 -0800 Subject: [Wtr-general] Speed of Firewatir vs. Watir In-Reply-To: References: <35710763.1168452214926.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70701102231i51c0fe5fx5ca83c50a8895a59@mail.gmail.com> On 1/10/07, Angrez Singh wrote: > > Hi, > > Yeah we have been working on improving the performance of FireWatir for > last few months. The performance has been improved significantly and it runs > faster than IE on windows. FireWatir has been tested just on Windows with > different Firefox versions like 1.5, 1.5.0.4, 1.5.0.7 , 2.0 and 2.0.0.1. > > I'll be releasing version 1.0 of FireWatir next week, which includes > starting the FireWatir from the script itself i.e. you don't have start > Firefox manually and then run the script. This will work for Windows only. > Wow. Thanks. Just thanks. I can't use it today, but I really appreciate the work. Someday soon, maybe. -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070110/0955402f/attachment.html From forum-watir-users at openqa.org Thu Jan 11 01:32:52 2007 From: forum-watir-users at openqa.org (sarita) Date: Thu, 11 Jan 2007 00:32:52 CST Subject: [Wtr-general] a common error In-Reply-To: <72799cd70701102040m5f8dc0a8g6928c85ff8adbc38@mail.gmail.com> Message-ID: <40648562.1168497203000.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I hadn't started the timeclock server. So, port 9002 wasn't listening. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6063&messageID=17039#17039 From vikashkumar051 at yahoo.co.in Thu Jan 11 03:54:38 2007 From: vikashkumar051 at yahoo.co.in (VIKASH KUMAR) Date: Thu, 11 Jan 2007 14:24:38 +0530 (IST) Subject: [Wtr-general] problem in accessing element of a web page Message-ID: <20070111085438.22670.qmail@web7804.mail.in.yahoo.com> I am running running a test case in windows platform. Some of the time page can't get downloaded fully, due to slow speed, then my code breaks, by giving message object not found - something like this. If I use sleep 5, or sleep 10 then it works for me, but I want to avoid using sleep in my code, what should be the better approach of doing this. Please help me out. Thanks in advance Vikash __________________________________________________________ Yahoo! India Answers: Share what you know. Learn something new http://in.answers.yahoo.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070111/7e6189ea/attachment.html From forum-watir-users at openqa.org Thu Jan 11 07:28:14 2007 From: forum-watir-users at openqa.org (Maloy kanti debnath) Date: Thu, 11 Jan 2007 06:28:14 CST Subject: [Wtr-general] working with bitmap Message-ID: <65627073.1168518524765.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> hi, Can we do some think for doing the bitmap check in WATIR . for some application where i want to check the image with the original one . maloy --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6089&messageID=17051#17051 From forum-watir-users at openqa.org Thu Jan 11 08:10:18 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Thu, 11 Jan 2007 07:10:18 CST Subject: [Wtr-general] Error with file_field in a modal window (using In-Reply-To: <45A56F9C.8010303@pettichord.com> Message-ID: <34007854.1168521048924.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thanks Bret! Everything is working perfect now. (who do i send the beer to?) --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6074&messageID=17052#17052 From zeljko.filipin at gmail.com Thu Jan 11 10:36:41 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Thu, 11 Jan 2007 16:36:41 +0100 Subject: [Wtr-general] installing watir from trunk Message-ID: I checked out Watir with TortoiseSVN and build a gem from revision 1142. But when I built the gem, it had name watir-1.5.1.1141.gem (revision number is not the same as the number in the gem name). Is that OK, or am I doing something wrong? I installed and executed tests while logged in as administrator. Ruby is ruby 1.8.5 (2006-08-25) [i386-mswin32], IE is 7. >gem build watir.gemspec Successfully built RubyGem Name: watir Version: 1.5.1.1141 File: watir-1.5.1.1141.gem Just to let you know, here are results of unit tests. core_tests.rb 1) Failure: test_exists(TC_IE_Exists) [C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1141 /unitt ests/../unittests/ie_exists_test.rb:15]: is not true. 195 tests, 1083 assertions, 1 failures, 0 errors all_tests.rb 332 tests, 289 assertions, 5 failures, 277 errors I did not post output of all_test.rb because it is to verbose, I can send it if somebody wants to take a look. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070111/da511901/attachment-0001.html From Mark_Cain at RL.gov Thu Jan 11 10:56:46 2007 From: Mark_Cain at RL.gov (Cain, Mark) Date: Thu, 11 Jan 2007 07:56:46 -0800 Subject: [Wtr-general] Alert box - hangs In-Reply-To: <29146868.1168474437552.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <4440693B7CFF2440ABC2E0BE480DABA10A368B@EX01-2.rl.gov> Can you send your code and html so I can see what you're doing? --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of usha Sent: Wednesday, January 10, 2007 4:13 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Alert box - hangs I'm using IE 6 I registered AutoItX3.dll using regsvr32 Ruby 1.8, Watir 1.5 Alert box title is 'Microsoft Internet Explorer' Thanks --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6061&messageID=17030#17030 _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Thu Jan 11 11:21:07 2007 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 11 Jan 2007 10:21:07 -0600 Subject: [Wtr-general] Error with file_field in a modal window (using In-Reply-To: References: <48851485.1168443566427.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <45A56F9C.8010303@pettichord.com> Message-ID: <45A663F3.2030809@pettichord.com> Angrez Singh wrote: > I would like to add something here. > > 1. In the file 'winClicker.rb' and method 'clickJSDialog_NewProcess()' > myapp = "#{@path_to_clicker}/clickJSDialog.rb #{button} > " > winsystem(" start #{myapp}") > > Now this thing will not work if user has configured to open the files > with '.rb' extension with some editor like Notepad, wordpad, gvim etc. > So what I suggest is to change the myapp variable to include ruby > interpreter also like this: > myapp = "ruby #{@path_to_clicker}/clickJSDialog.rb > #{button}" > > This will use ruby interpreter to open the file no matter what user > has configured on his/her machine. I faced this problem during testing > on my machine. > > Similarly, we need to append ruby interpreter in the function > 'setFileRequesterFileName_newProcess' which is used to set FileName in > the file_field control. This sounds rights to me. Better would be to use "rubyw" which does the same thing as "ruby" but without a console window. Would you like to make this change yourself or submit a patch? Bret From bret at pettichord.com Thu Jan 11 11:23:41 2007 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 11 Jan 2007 10:23:41 -0600 Subject: [Wtr-general] a common error In-Reply-To: <72799cd70701102040m5f8dc0a8g6928c85ff8adbc38@mail.gmail.com> References: <58938151.1168488222911.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <72799cd70701102040m5f8dc0a8g6928c85ff8adbc38@mail.gmail.com> Message-ID: <45A6648D.4090102@pettichord.com> > Nobody is listening on port 9002 on localhost. > Why are you using drb? Sarita is working through the scripting101 exercises and timeclock uses drb. From forum-watir-users at openqa.org Thu Jan 11 12:14:34 2007 From: forum-watir-users at openqa.org (Bach Le) Date: Thu, 11 Jan 2007 11:14:34 CST Subject: [Wtr-general] Speed of Firewatir vs. Watir In-Reply-To: Message-ID: <62210680.1168535704539.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi Angrez, I did not have any problems installing FireWatir. I followed the installation guide at http://code.google.com/p/firewatir/ and it worked like a charm. I tried to run a few scripts that I had successfully run with Watir and they seemed to break when it got to clicking buttons in forms. Other than that, it worked very well. Keep up the good work. I'd also like to help you guys out if you need it. -Bach --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6078&messageID=17058#17058 From forum-watir-users at openqa.org Thu Jan 11 12:20:36 2007 From: forum-watir-users at openqa.org (Bach Le) Date: Thu, 11 Jan 2007 11:20:36 CST Subject: [Wtr-general] working with bitmap In-Reply-To: <65627073.1168518524765.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <43053204.1168536072639.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I'm not sure if this well help you in any way but rmagick is a library for ruby that can be used to do image processing such as comparisons and such but you need both the source and target image. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6089&messageID=17059#17059 From tester.paul at gmail.com Thu Jan 11 12:54:01 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Thu, 11 Jan 2007 12:54:01 -0500 Subject: [Wtr-general] Need Regular Expression help with a URL string Message-ID: <37c405480701110954g26a06989w9f8e6fa81bdc0dab@mail.gmail.com> Okay, I give up. I've worked on this for over an hour and I need more experienced help. (Web searches and book references haven't helped either.) I have a URL in a string and I'd like to replace part of it but first I need to find the part that I care about. Here's an example of the string: web_url = 'http://foo/bar.html' Now, what I am trying to do is find the *last* forward slash (/) in that string so that I can then replace everything after it. I am having difficulty finding that last slash though. I am trying to use the str[ regexp, int ] function, but I can't seem figure it out. Can anyone help me with this regexp? Once I get it I'll figure out what's the best function for what I need to do. Thanks. Paul C. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070111/8f6fca4d/attachment.html From arkie at compli.com Thu Jan 11 13:13:34 2007 From: arkie at compli.com (Alan Ark) Date: Thu, 11 Jan 2007 12:13:34 -0600 Subject: [Wtr-general] Need Regular Expression help with a URL string In-Reply-To: <37c405480701110954g26a06989w9f8e6fa81bdc0dab@mail.gmail.com> Message-ID: <7F2DAB1053EC4D47B821DA0A7BA5E3EB015A669D@mail-21ps.atlarge.net> Hi Paul. The following should work: irb(main):001:0> web_url = 'http://foo/bar.html' => "http://foo/bar.html" irb(main):002:0> web_url=~/(.*)\// => 0 irb(main):003:0> p $1 "http://foo" nil The regex (.*)\/ Mean to match everything you can to a slash. Since the * operator is ?greedy? it will grab everything it can up to that last slash. The var $1 is a temp var created by the regex. It should contain the value captured by the parens. Thanks -Alan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Carvalho Sent: Thursday, January 11, 2007 9:54 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Need Regular Expression help with a URL string Okay, I give up. I've worked on this for over an hour and I need more experienced help. (Web searches and book references haven't helped either.) I have a URL in a string and I'd like to replace part of it but first I need to find the part that I care about. Here's an example of the string: web_url = 'HYPERLINK "http://foo/bar.html"http://foo/bar.html' Now, what I am trying to do is find the *last* forward slash (/) in that string so that I can then replace everything after it. I am having difficulty finding that last slash though. I am trying to use the str[ regexp, int ] function, but I can't seem figure it out. Can anyone help me with this regexp? Once I get it I'll figure out what's the best function for what I need to do. Thanks. Paul C. -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.410 / Virus Database: 268.16.9/622 - Release Date: 1/10/2007 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.410 / Virus Database: 268.16.9/622 - Release Date: 1/10/2007 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070111/69a11e0c/attachment.html From forum-watir-users at openqa.org Thu Jan 11 13:27:46 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Thu, 11 Jan 2007 12:27:46 CST Subject: [Wtr-general] Need Regular Expression help with a URL string In-Reply-To: <37c405480701110954g26a06989w9f8e6fa81bdc0dab@mail.gmail.com> Message-ID: <45812984.1168540100750.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Might be a little sloppy, and I'm sure there is a more effecient Regex operation to do this, but this works. myURL = 'http://foo/bar.html' destURL = 'leetPage.html' myURL.sub( /\bfoo\/.*/, 'foo/' + destURL ) Basically the Regex inside the string sub() function looks for the first instnace of `foo/` and replaces it with `foo/` + your desired web page string. Hope this helps, Nathan Christie --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6091&messageID=17062#17062 From forum-watir-users at openqa.org Thu Jan 11 13:31:58 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Thu, 11 Jan 2007 12:31:58 CST Subject: [Wtr-general] working with bitmap In-Reply-To: <65627073.1168518524765.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <41312939.1168540348923.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Can you be more specific please? Do you need to validate filesize, filename, modified date between two images? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6089&messageID=17063#17063 From tester.paul at gmail.com Thu Jan 11 13:43:47 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Thu, 11 Jan 2007 13:43:47 -0500 Subject: [Wtr-general] Need Regular Expression help with a URL string In-Reply-To: <7F2DAB1053EC4D47B821DA0A7BA5E3EB015A669D@mail-21ps.atlarge.net> References: <37c405480701110954g26a06989w9f8e6fa81bdc0dab@mail.gmail.com> <7F2DAB1053EC4D47B821DA0A7BA5E3EB015A669D@mail-21ps.atlarge.net> Message-ID: <37c405480701111043r6b3aca58xb7d040f83c668b44@mail.gmail.com> Thanks Alan! That works better than what I was trying to do. Now I can create the new URL with a line like: new_url = ie.url[/(.*)\//] + "new_page.html" Sweet! I was trying expressions like =~ /\&\// but wasn't having any luck. Cheers! Paul C. On 11/01/07, Alan Ark wrote: > > Hi Paul. > > The following should work: > > irb(main):001:0> web_url = 'http://foo/bar.html' > > => "http://foo/bar.html" > > irb(main):002:0> web_url=~/(.*)\// > > => 0 > > irb(main):003:0> p $1 > > "http://foo" > > nil > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070111/14e3f615/attachment.html From forum-watir-users at openqa.org Thu Jan 11 13:44:45 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Thu, 11 Jan 2007 12:44:45 CST Subject: [Wtr-general] OT: Need help Trapping Errors in Ruby In-Reply-To: <37c405480701101210x5e7b8c5q72595ca3e9984a2c@mail.gmail.com> Message-ID: <62158160.1168541115374.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> When you say, "...the "rescue => e" part of page_set_to_check() doesn't run like I would expect it to..", what exactly do you mean. Am I correct in assuming that the `$something_went_wrong` variable is used inside of the `write_status` method? If so, is the incorrect behavior coming from what the `write_status` method produces? To validate that your exception is correctly behing handled, put some simple action that will indicate the rescue operation is happening, like: begin page_set rescue => e puts 'inside the rescue now' $something_went_wrong = 'Yes' end write_status end Now if you see `inside the rescue` outputted with an incorrect URL, you'll know you are getting inside the rescue block, and the assignment of `$something_went_wrong` is a syntantically correct statement, so that's not the problem and it should equal `Yes`. The only thing left to check is what's inside the `write_status` function. It could be the case that this function is not behaving correctly in both states, 1) an exception was not thrown, 2) an exception was thrown. If this function relies on `$something_went_wrong` and it is not present, a(n) [silent] error may be occuring. Check out this function or post it's guts to the forums, along with your console output on execution for further assistance if this is not enough to debug your problem. Hope this helps, Nathan Christie --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6079&messageID=17065#17065 From bret at pettichord.com Thu Jan 11 14:51:09 2007 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 11 Jan 2007 13:51:09 -0600 Subject: [Wtr-general] problem in accessing element of a web page In-Reply-To: <20070111085438.22670.qmail@web7804.mail.in.yahoo.com> References: <20070111085438.22670.qmail@web7804.mail.in.yahoo.com> Message-ID: <45A6952D.7040307@pettichord.com> VIKASH KUMAR wrote: > > If I use sleep 5, or sleep 10 then it works for me, but I want to > avoid using sleep in my code, what should be the better approach of > doing this. > Have you tried "ie.wait"? From tester.paul at gmail.com Thu Jan 11 15:01:15 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Thu, 11 Jan 2007 15:01:15 -0500 Subject: [Wtr-general] OT: Need help Trapping Errors in Ruby In-Reply-To: <62158160.1168541115374.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <37c405480701101210x5e7b8c5q72595ca3e9984a2c@mail.gmail.com> <62158160.1168541115374.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <37c405480701111201u4d75848dn5509108962b7adf7@mail.gmail.com> Hi Nathan, thanks for the follow-up. I do have it working, as per my last message in this thread, but I'll offer some additional info here since you asked. The $something_went_wrong variable is a legacy variable from when I first wrote these scripts using Watir and I was trying to tell the script that a particular 'test' method did not successfully complete. It isn't really used in the write_status() method. That variable is used by a "complete_walkabout()" method that runs at the end of the script -- which cleans up the environment (e.g. closes files) and makes a decision based on the successful completion of the test (i.e. whether or not "something went wrong"). I'm in the process of refactoring the logic and how the code works, and am taking it one step at a time. (I may even end up getting rid of that variable.) Basically what the script does is this: Open IE, walk the web app's site map, capture some performance metrics and close the browser. What I *want* the script to do is recover from any page or link that it fails to connect to. The script *used* to do this in a very neat way, but that way wasn't transferable to the new Ruby script structure that I'm using. So how do you get the script to recover from an error and make it through right to the very end? (I asked myself) I put all the "walk the site map pages and capture metrics" code into individual methods and I needed to find a way to capture any exceptions raised. I'm not doing any explicit [test] assertions in these scripts, but the effect is the same. i.e. if it fails to connect to a page, the script fails on the next line and it stops cold. So I tried to wrap it in a rescue block like this: ---- begin call_page_walking_method() rescue => e #do something end #keep going ---- However, as soon as I realised that I needed to do this for *every* page set I was going to call, I put that (above) code into a method on its own. The problem is that the above rescue block *doesn't* work. Ruby didn't get what I was trying to do. If the called method failed then the script just stopped, it didn't return and get rescued like I thought it would. That's when I discovered that you can put the rescue block *within* the body of a method. So I moved it to the method that does the actual walking, and now it recovers nicely. Voila! So I learned one way how a regular Ruby method is different from the Test::Unit::TestCase class' 'test' method. The TestCase class will still proceed to a 'teardown' method if any individual test method terminates unexpectedly, but a regular Ruby method just stops where it failed. Now I know how to get my non-TestCase (Ruby/Watir) scripts to recover gracefully from exceptions. Cool. Does that help clarify things? If not, mail me off-list and we'll chat. Cheers. Paul C. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070111/bbea853e/attachment.html From forum-watir-users at openqa.org Thu Jan 11 16:36:05 2007 From: forum-watir-users at openqa.org (usha) Date: Thu, 11 Jan 2007 15:36:05 CST Subject: [Wtr-general] Alert box - hangs In-Reply-To: <4440693B7CFF2440ABC2E0BE480DABA10A368B@EX01-2.rl.gov> Message-ID: <36076250.1168551409715.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> my previous post has the html and the script I have. I am not seeing any errors. Script just hangs till I manually close the Alert. Appreciate any help. Thx --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6061&messageID=17073#17073 From forum-watir-users at openqa.org Thu Jan 11 16:56:02 2007 From: forum-watir-users at openqa.org (usha) Date: Thu, 11 Jan 2007 15:56:02 CST Subject: [Wtr-general] Alert box - hangs In-Reply-To: <46941405.1168389139719.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <34000631.1168552621714.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Aha! it worked. with this. wc = WinClicker.new wc.clickWindowsButton("Microsoft Internet Explorer", "OK") Just changed OK to Cancel - which worked and then back to OK and then it worked. Well whatever works!. Thanks to all --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6061&messageID=17075#17075 From forum-watir-users at openqa.org Thu Jan 11 17:06:29 2007 From: forum-watir-users at openqa.org (Bach Le) Date: Thu, 11 Jan 2007 16:06:29 CST Subject: [Wtr-general] working with bitmap In-Reply-To: <41312939.1168540348923.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <38654492.1168553219542.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I think he means checking if one image is the same as another image pixel-by-pixel and if that is the case, rmagick should be able to do the trick although I have not tested it out myself. Message was edited by: beefandbachle --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6089&messageID=17076#17076 From tester.paul at gmail.com Thu Jan 11 17:07:43 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Thu, 11 Jan 2007 17:07:43 -0500 Subject: [Wtr-general] What does IE.down_load_time really measure? In-Reply-To: <45A573C9.10404@pettichord.com> References: <37c405480701101401q326f2e2y87a93bf76141eb8e@mail.gmail.com> <45A573C9.10404@pettichord.com> Message-ID: <37c405480701111407p963b424vd60adef34a421930@mail.gmail.com> Okay, I didn't want to reply right away without trying a few things first. My results seem to be consistent in that my second counter is always larger than the default down_load_time value. On 10/01/07, Bret Pettichord wrote: > > The "down_load_time" is the amount of time that watir waits in the wait > method that is automatically called after the click. It should be > roughly the same as the "wait_time" defined below: > > ie. button(:name, /UpdateSettingsButton/).click! > then = Time.now > ie.wait > wait_time = Time.now - then I like this code but "click!" doesn't work in 1.4.1 so I'll try it later on one of my 1.5.x VMWare sessions. I'm confused by your example because your output does not match your code. Which part is confusing? The script actually outputs in columns of data to a CSV file. I just picked a row and listed the results here in a more email friendly fashion. If you're wondering why the results don't match, then I'm confused too! The second RT value is always larger than the IE.down_load_time value by a difference of 0.12 to 1.5 seconds. The average seems to be a difference of ~ 350 ms, which is noticeable. I've updated the rdoc for down_load_time to read: > > # The time, in seconds, it took for the new page to load after > executing the > # the last command > > Is this clearer? > I'm not sure. It sounds a bit better than the current description of: "use this to get the time for the last page download." I like the definition and code example that you gave at the top of your reply. That's the clearest I think. All the other Public methods in the Watir API reference have nice popup windows with code in it, so your description and code example above follows the pattern nicely. ...There's just the matter of trying to figure out why there's a difference in my Response Time values. I'll keep collecting both for now so that I can continue developing my scripts. Maybe inspiration will come to me as I collect more data and update the scripts further. Currently, it looks to me like RT = (ie.down_load_time) + (additional IE render time or other unspecified delay) Cheers. Paul C. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070111/87850b6c/attachment-0001.html From forum-watir-users at openqa.org Thu Jan 11 23:19:14 2007 From: forum-watir-users at openqa.org (Maloy kanti debnath) Date: Thu, 11 Jan 2007 22:19:14 CST Subject: [Wtr-general] working with bitmap In-Reply-To: <41312939.1168540348923.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <56818436.1168575584204.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> hi, i mean to check the expected image to the actual image in a web application. Same as bitmap checkpoint in Winrunner or QTP ... i need to check the image pixel-by-pixel .. thank you, maloy --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6089&messageID=17081#17081 From forum-watir-users at openqa.org Fri Jan 12 00:54:04 2007 From: forum-watir-users at openqa.org (sarita) Date: Thu, 11 Jan 2007 23:54:04 CST Subject: [Wtr-general] Any function for getting random values Message-ID: <42546743.1168581274764.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Is there any function available to get random values (char or int) so that values can be assigned from the system itself. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6096&messageID=17082#17082 From angrez at gmail.com Fri Jan 12 01:01:16 2007 From: angrez at gmail.com (Angrez Singh) Date: Fri, 12 Jan 2007 11:31:16 +0530 Subject: [Wtr-general] Error with file_field in a modal window (using In-Reply-To: <45A663F3.2030809@pettichord.com> References: <48851485.1168443566427.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <45A56F9C.8010303@pettichord.com> <45A663F3.2030809@pettichord.com> Message-ID: Hi Bret, I'll go ahead with using "rubyw" and will make the changes to code. Regards, Angrez On 1/11/07, Bret Pettichord wrote: > > Angrez Singh wrote: > > I would like to add something here. > > > > 1. In the file 'winClicker.rb' and method 'clickJSDialog_NewProcess()' > > myapp = "#{@path_to_clicker}/clickJSDialog.rb #{button} > > " > > winsystem(" start #{myapp}") > > > > Now this thing will not work if user has configured to open the files > > with '.rb' extension with some editor like Notepad, wordpad, gvim etc. > > So what I suggest is to change the myapp variable to include ruby > > interpreter also like this: > > myapp = "ruby #{@path_to_clicker}/clickJSDialog.rb > > #{button}" > > > > This will use ruby interpreter to open the file no matter what user > > has configured on his/her machine. I faced this problem during testing > > on my machine. > > > > Similarly, we need to append ruby interpreter in the function > > 'setFileRequesterFileName_newProcess' which is used to set FileName in > > the file_field control. > This sounds rights to me. Better would be to use "rubyw" which does the > same thing as "ruby" but without a console window. > > Would you like to make this change yourself or submit a patch? > > Bret > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070112/503749df/attachment.html From angrez at gmail.com Fri Jan 12 01:11:12 2007 From: angrez at gmail.com (Angrez Singh) Date: Fri, 12 Jan 2007 11:41:12 +0530 Subject: [Wtr-general] Any function for getting random values In-Reply-To: <42546743.1168581274764.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <42546743.1168581274764.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Hi Sarita, You can use rand(int) where integer specifies the range. For eg: rand(100) will generate random numbers between 0 to 100. For more info: http://www.rubycentral.com/ref/ref_m_kernel.html#rand Regards, Angerz On 1/12/07, sarita wrote: > > Is there any function available to get random values (char or int) so that > values can be assigned from the system itself. > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6096&messageID=17082#17082 > _______________________________________________ > 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/20070112/a52f610f/attachment.html From angrez at gmail.com Fri Jan 12 01:13:39 2007 From: angrez at gmail.com (Angrez Singh) Date: Fri, 12 Jan 2007 11:43:39 +0530 Subject: [Wtr-general] Speed of Firewatir vs. Watir In-Reply-To: <62210680.1168535704539.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <62210680.1168535704539.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Hi Bach, Could you please let me know the scripts or the statements that failed? Regards, Angrez On 1/11/07, Bach Le wrote: > > Hi Angrez, > I did not have any problems installing FireWatir. I followed the > installation guide at http://code.google.com/p/firewatir/ and it worked > like a charm. I tried to run a few scripts that I had successfully run with > Watir and they seemed to break when it got to clicking buttons in forms. > Other than that, it worked very well. Keep up the good work. I'd also like > to help you guys out if you need it. > > > -Bach > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6078&messageID=17058#17058 > _______________________________________________ > 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/20070112/2d298d7b/attachment.html From forum-watir-users at openqa.org Fri Jan 12 01:14:18 2007 From: forum-watir-users at openqa.org (Maloy kanti debnath) Date: Fri, 12 Jan 2007 00:14:18 CST Subject: [Wtr-general] working with bitmap In-Reply-To: <43053204.1168536072639.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <37447514.1168582488106.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> hi, I tried this code but it was not working require 'RMagick' include Magick im = Image.new('C:\Documents and Settings\Administrator\My Documents\My Pictures\SAI1.jpg') im.display exit can you please help me out . thank you maloy --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6089&messageID=17084#17084 From forum-watir-users at openqa.org Fri Jan 12 01:42:35 2007 From: forum-watir-users at openqa.org (sarita) Date: Fri, 12 Jan 2007 00:42:35 CST Subject: [Wtr-general] Any function for getting random values In-Reply-To: Message-ID: <44707628.1168584185236.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> What about char values. If i want to enter a random string, how i will generate it. As you know in most applications duplicate values'r not allowed. So data has to be different each time we run the test. But changing data, each time the test is run, is burdensome. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6096&messageID=17087#17087 From angrez at gmail.com Fri Jan 12 02:46:00 2007 From: angrez at gmail.com (Angrez Singh) Date: Fri, 12 Jan 2007 13:16:00 +0530 Subject: [Wtr-general] Any function for getting random values In-Reply-To: <44707628.1168584185236.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <44707628.1168584185236.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Hi Sarita, chars = ("a".."z").to_a + ("A".."Z").to_a random_string = "" 1.upto(5) { |i| random_string << chars[rand(chars.length - 1)] } puts random_string This will generate random string of 5 chars in length. To generate large string change 5 to whatever length you want. The generated string will contain both uppercase and lowercase alphabets. Hope this helps, - Angrez On 1/12/07, sarita wrote: > > What about char values. If i want to enter a random string, how i will > generate it. As you know in most applications duplicate values'r not > allowed. So data has to be different each time we run the test. But changing > data, each time the test is run, is burdensome. > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6096&messageID=17087#17087 > _______________________________________________ > 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/20070112/d34da019/attachment.html From forum-watir-users at openqa.org Fri Jan 12 03:50:10 2007 From: forum-watir-users at openqa.org (sarita) Date: Fri, 12 Jan 2007 02:50:10 CST Subject: [Wtr-general] Any function for getting random values In-Reply-To: Message-ID: <50314530.1168591840247.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> It worked. Can u plz explain the code a little further. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6096&messageID=17096#17096 From vikashkumar051 at yahoo.co.in Fri Jan 12 04:03:03 2007 From: vikashkumar051 at yahoo.co.in (VIKASH KUMAR) Date: Fri, 12 Jan 2007 14:33:03 +0530 (IST) Subject: [Wtr-general] problem in accessing elements of web page Message-ID: <20070112090303.58707.qmail@web7806.mail.in.yahoo.com> I am running running a test case in windows platform. Some of the time page can't get downloaded fully, due to slow speed, then my code breaks, by giving message object not found - something like this. I tried ie.wait, but it is also not working for me as there are lots of frames in the page, page can get download but the elements inside the frame used to take time for downloading. If I use sleep 5, or sleep 10 then it works for me, but I want to avoid using sleep in my code, what should be the better approach of doing this. Please help me out. Thanks in advance Vikash __________________________________________________________ Yahoo! India Answers: Share what you know. Learn something new http://in.answers.yahoo.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070112/ee0f826c/attachment-0001.html From angrez at gmail.com Fri Jan 12 06:01:03 2007 From: angrez at gmail.com (Angrez Singh) Date: Fri, 12 Jan 2007 16:31:03 +0530 Subject: [Wtr-general] Any function for getting random values In-Reply-To: <50314530.1168591840247.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <50314530.1168591840247.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Hi Sarita, Its really simple to understand. I created an array of upper and lower case alphabets. Now random number generator takes only interger. So I generate random numbers between 0 to the lenght of the array created above and then choose the character at that index in the array and push it to the final string. Hope I am clear enough. - Angrez On 1/12/07, sarita wrote: > > It worked. Can u plz explain the code a little further. > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6096&messageID=17096#17096 > _______________________________________________ > 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/20070112/f735633f/attachment.html From forum-watir-users at openqa.org Fri Jan 12 07:16:19 2007 From: forum-watir-users at openqa.org (sarita) Date: Fri, 12 Jan 2007 06:16:19 CST Subject: [Wtr-general] Iterating through all options of a List Box which is again dynamic Message-ID: <43163389.1168604209693.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I want to run a test, which'll create one sample record for each option in the List Box. Again the options in List Box is dynamic i.e, can be changed through another module. How to iterate the test till the last option in the listbox. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6098&messageID=17101#17101 From christopher.mcmahon at gmail.com Fri Jan 12 09:28:28 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 12 Jan 2007 06:28:28 -0800 Subject: [Wtr-general] Any function for getting random values In-Reply-To: References: <44707628.1168584185236.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70701120628w6f9ae9f1j40bfbede86bff6e5@mail.gmail.com> On 1/11/07, Angrez Singh wrote: > > Hi Sarita, > > chars = ("a".."z").to_a + ("A".."Z").to_a > random_string = "" > 1.upto(5) { |i| random_string << chars[rand(chars.length - 1)] } > puts random_string > Here's a slightly different take that I posted to the agile-testing mail list some time ago: def random_text( length ) output = "" length.times do output << ('A'..'Z').to_a[ rand(26) ] end output end then, where ever you need it : just call it random_text( 42 ) # for 42 chars of random text ... -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070112/0a4e6f37/attachment.html From tester.paul at gmail.com Fri Jan 12 10:00:30 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Fri, 12 Jan 2007 10:00:30 -0500 Subject: [Wtr-general] problem in accessing elements of web page In-Reply-To: <20070112090303.58707.qmail@web7806.mail.in.yahoo.com> References: <20070112090303.58707.qmail@web7806.mail.in.yahoo.com> Message-ID: <37c405480701120700s3df099c9o1c1e78efa3cac44a@mail.gmail.com> Instead of ie.wait, I wrote and use the following method call: def wait_for_frames $ie.wait if $ie.document.frames.length > 0 $ie.document.frames.length.times {|x| $ie.frame(:index, x+1 ).wait } end end I imagine others may use something similar. You should be able to modify it to suit your needs. Cheers. Paul C. On 12/01/07, VIKASH KUMAR wrote: > > I am running running a test case in windows platform. > > Some of the time page can't get downloaded fully, due to slow speed, then > my code breaks, by giving message object not found - something like this. > > I tried *ie.wait,* but it is also not working for me as there are lots of > frames in the page, page can get download but the elements inside the frame > used to take time for downloading. > > If I use sleep 5, or sleep 10 then it works for me, but I want to avoid > using sleep in my code, what should be the better approach of doing this. > > Please help me out. > > Thanks in advance > > Vikash > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070112/b915a068/attachment.html From tester.paul at gmail.com Fri Jan 12 10:10:23 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Fri, 12 Jan 2007 10:10:23 -0500 Subject: [Wtr-general] Iterating through all options of a List Box which is again dynamic In-Reply-To: <43163389.1168604209693.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <43163389.1168604209693.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <37c405480701120710r63512220lda42842a128b0c45@mail.gmail.com> You can use something similar to the following to get you started: variable = ie.select_list( :id, /ListName/).getAllContents On 12/01/07, sarita wrote: > > I want to run a test, which'll create one sample record for each option in > the List Box. Again the options in List Box is dynamic i.e, can be changed > through another module. How to iterate the test till the last option in the > listbox. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070112/ba044ee6/attachment.html From forum-watir-users at openqa.org Fri Jan 12 12:42:36 2007 From: forum-watir-users at openqa.org (Bach Le) Date: Fri, 12 Jan 2007 11:42:36 CST Subject: [Wtr-general] Speed of Firewatir vs. Watir In-Reply-To: Message-ID: <55159229.1168623808512.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi Angrez, here is the test i'm using: def test_1 $FF = Firefox.new $FF.goto("www.anntaylor.com") $FF.link(:text, 'WEEKEND CASUAL').click $FF.image(:index, '25').click $FF.form(:name, 'OrderByVariantSimple').select_list(:index, '1').select_value(/\d+/) $FF.form(:name, 'OrderByVariantSimple').select_list(:index, '2').select_value(/\d+/) $FF.form(:name, 'OrderByVariantSimple').select_list(:name, 'OMQuantity0').select_value('1') $FF.form(:name, 'OrderByVariantSimple').checkbox(:id, 'AddToBag0Id', 'on').set(set_or_clear=true) $FF.button(:src, 'http://www.anntaylor.com/Images/Global/placeitemsinbag.gif').click $FF.image(:src, 'http://www.anntaylor.com/Images/Global/BTN_CHECKOUT.gif').click $FF.image(:index, '26').click end Try running it. It works correctly in Watir but when it gets to the following two lines, it breaks in firewatir. $FF.form(:name, 'OrderByVariantSimple').checkbox(:id, 'AddToBag0Id', 'on').set(set_or_clear=true) $FF.button(:src, 'http://www.anntaylor.com/Images/Global/placeitemsinbag.gif').click It doesn't select the checkbox in the first line and can't find the image for the button in the second line. If it's an error on my part, please let me know what needs to be changed. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6078&messageID=17112#17112 From forum-watir-users at openqa.org Fri Jan 12 12:47:41 2007 From: forum-watir-users at openqa.org (Bach Le) Date: Fri, 12 Jan 2007 11:47:41 CST Subject: [Wtr-general] working with bitmap In-Reply-To: <37447514.1168582488106.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <56333076.1168624095717.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> try this im = Image.new('C:\\Documents and Settings\\Administrator\\My Documents\\My Pictures\\SAI1.jpg') --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6089&messageID=17113#17113 From forum-watir-users at openqa.org Sat Jan 13 07:31:39 2007 From: forum-watir-users at openqa.org (Bret Pettichord) Date: Sat, 13 Jan 2007 06:31:39 CST Subject: [Wtr-general] What does IE.down_load_time really measure? In-Reply-To: <37c405480701111407p963b424vd60adef34a421930@mail.gmail.com> Message-ID: <41994386.1168691529943.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> > Which part is confusing? It is not possible for this code > $f.puts page_title + ',' + ie.html.length.to_s + ',' + > ie.down_load_time.to_s + ',' + (Time.now - secondary_page_timer).to_s to produce this output > > Page Load Time 1 (s) = 0.015 > > Page Load Time 2 (s) = 1.075 So clearly, you haven't shared everything with us. >The script actually outputs > in columns of data to > a CSV file. I just picked a row and listed the > results here in a more email > friendly fashion. That explains the source of the confusion, but does not remove it. Would it be possible for you to provide code and output that are synced up with each other? Bret --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6080&messageID=17119#17119 From forum-watir-users at openqa.org Sun Jan 14 22:51:45 2007 From: forum-watir-users at openqa.org (sarita) Date: Sun, 14 Jan 2007 21:51:45 CST Subject: [Wtr-general] Iterating through all options of a List Box which is again dynamic In-Reply-To: <37c405480701120710r63512220lda42842a128b0c45@mail.gmail.com> Message-ID: <34159125.1168833135137.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> If I want to select a random option from the given list, how i'll do it --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6098&messageID=17126#17126 From forum-watir-users at openqa.org Mon Jan 15 00:16:58 2007 From: forum-watir-users at openqa.org (sarita) Date: Sun, 14 Jan 2007 23:16:58 CST Subject: [Wtr-general] Iterating through all options of a List Box which is again dynamic In-Reply-To: <34159125.1168833135137.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <43413538.1168838248080.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> ok, i got it: ie.select_list( :id, /List Name/).select(variable[rand(variable.length)]) --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6098&messageID=17127#17127 From angrez at gmail.com Mon Jan 15 00:56:40 2007 From: angrez at gmail.com (Angrez Singh) Date: Mon, 15 Jan 2007 11:26:40 +0530 Subject: [Wtr-general] Speed of Firewatir vs. Watir In-Reply-To: <55159229.1168623808512.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <55159229.1168623808512.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Hi Bach, Did you tried the latest gem that is there on the code.google.com. It has support for frames. The syntax that you are using is correct. Could you let me what errors you get or it simply doesn't work? Also try using the latest gem from code.google.com. Regards, Angrez On 1/12/07, Bach Le wrote: > > Hi Angrez, > > here is the test i'm using: > > def test_1 > $FF = Firefox.new > $FF.goto("www.anntaylor.com") > $FF.link(:text, 'WEEKEND CASUAL').click > $FF.image(:index, '25').click > $FF.form(:name, 'OrderByVariantSimple').select_list(:index, > '1').select_value(/\d+/) > $FF.form(:name, 'OrderByVariantSimple').select_list(:index, > '2').select_value(/\d+/) > $FF.form(:name, 'OrderByVariantSimple').select_list(:name, > 'OMQuantity0').select_value('1') > $FF.form(:name, 'OrderByVariantSimple').checkbox(:id, > 'AddToBag0Id', 'on').set(set_or_clear=true) > $FF.button(:src, ' > http://www.anntaylor.com/Images/Global/placeitemsinbag.gif').click > $FF.image(:src, ' > http://www.anntaylor.com/Images/Global/BTN_CHECKOUT.gif').click > $FF.image(:index, '26').click > end > > > Try running it. It works correctly in Watir but when it gets to the > following two lines, it breaks in firewatir. > > $FF.form(:name, 'OrderByVariantSimple').checkbox(:id, > 'AddToBag0Id', 'on').set(set_or_clear=true) > $FF.button(:src, ' > http://www.anntaylor.com/Images/Global/placeitemsinbag.gif').click > > It doesn't select the checkbox in the first line and can't find the image > for the button in the second line. > > If it's an error on my part, please let me know what needs to be changed. > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6078&messageID=17112#17112 > _______________________________________________ > 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/20070115/5a79a027/attachment-0001.html From forum-watir-users at openqa.org Mon Jan 15 04:45:30 2007 From: forum-watir-users at openqa.org (nsit) Date: Mon, 15 Jan 2007 03:45:30 CST Subject: [Wtr-general] Can't run script on Vista IE7 Message-ID: <40231234.1168854383366.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi all I tried Google Test Search. There two browser opened. One opened google.com, one displayed status message 'connecting...' and nothing happened after that. Next lines weren't executed. What happened? Thank you. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6107&messageID=17130#17130 From vikashkumar051 at yahoo.co.in Mon Jan 15 07:25:01 2007 From: vikashkumar051 at yahoo.co.in (VIKASH KUMAR) Date: Mon, 15 Jan 2007 17:55:01 +0530 (IST) Subject: [Wtr-general] problem in reading and storing values from row of a table Message-ID: <20070115122501.44899.qmail@web7809.mail.in.yahoo.com> I am running a test case, in which I want to store all the values of a table in variables, I am using the below code: require 'watir' ie=Watir::IE.start("C:\test.htm") class Test def test_row_collection(ie) t= ie.table(:class,'listView') value_i = 0 t.rows.each do |row| puts row puts "Our Number is " && value_i value_i += 1 end end end TestObj = Test.new TestObj.test_row_collection(ie) It displays the following output: type: id: name: value: disabled: false 0 type: id: name: value: disabled: false 1 type: id: name: value: disabled: false If I used "puts row.text" in the above definition, it displays the following output. 0 01/14/2007 Jan/2007 2007 13 Open 1 01/15/2007 Jan/2007 2007 16 Open I want to store values like this: date1 = 01/14/2007, month1= Jan/2007, Year1= 2007, value1 = 13, Status1 = Open date2 = 01/14/2007, month2= Jan/2007, Year2= 2007, value2 = 16, Status2 = Open Please help me out in doing this. Thanks in advance Vikash __________________________________________________________ Yahoo! India Answers: Share what you know. Learn something new http://in.answers.yahoo.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070115/4cb5a91a/attachment.html From forum-watir-users at openqa.org Mon Jan 15 09:58:34 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Mon, 15 Jan 2007 08:58:34 CST Subject: [Wtr-general] modal_dialog not working in 1.5.1.1136, ruby 1.8.4 Message-ID: <62203240.1168873144914.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I seem to be having some issues attaching to modal_dialogs. I tried to register my win32ole but it didn't seem to help. (the dialog popped up and said it didn't appear to be a valid dll) Heres my session in the IRB. Not after I hit 'new' I manually navigated and opened a modal dialog. Do I need to update to a new version or ruby? irb(main):001:0> require 'watir' => true irb(main):003:0> include Watir => Object irb(main):004:0> ie = IE.new() *snipped out* irb(main):005:0> ie.modal_dialog NoMethodError: IE#modal_dialog not supported with the current version of Ruby (1.8.4). See http://jira.openqa.org/browse/WTR-2 for details. undefined method `connect_unknown' for WIN32OLE:Class from C:/Program Files/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1136/./watir.rb:2703:in `initialize' from C:/Program Files/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1136/./watir.rb:450:in `modal_dialog' from (irb):5 --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6110&messageID=17136#17136 From forum-watir-users at openqa.org Mon Jan 15 10:23:21 2007 From: forum-watir-users at openqa.org (nsit) Date: Mon, 15 Jan 2007 09:23:21 CST Subject: [Wtr-general] Can't run script on Vista IE7 In-Reply-To: <40231234.1168854383366.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <61859600.1168874631746.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I works after installing watir 1.5.1.1136. But watir still opens 2 window one blank and one with website. And then I have to use attach to interact with the website. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6107&messageID=17139#17139 From zeljko.filipin at gmail.com Mon Jan 15 10:45:13 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Mon, 15 Jan 2007 16:45:13 +0100 Subject: [Wtr-general] modal_dialog not working in 1.5.1.1136, ruby 1.8.4 In-Reply-To: <62203240.1168873144914.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <62203240.1168873144914.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: On 1/15/07, John Lolis wrote: > > I seem to be having some issues attaching to modal_dialogs. I tried to > register my win32ole but it didn't seem to help. (the dialog popped up and > said it didn't appear to be a valid dll) Make sure you are logged in as administrator while registering. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070115/916bb452/attachment.html From forum-watir-users at openqa.org Mon Jan 15 11:08:45 2007 From: forum-watir-users at openqa.org (gdx) Date: Mon, 15 Jan 2007 10:08:45 CST Subject: [Wtr-general] Menu links have duplicate attributes In-Reply-To: Message-ID: <51669831.1168877355433.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, sorry for my english. Maybe you can use .csv or excel file to read the number index who match with the connected profil. If you use this 'tips', i think you'll win time the next time, index will change in your application. You'll have to modify just one file instead of all .rb file ... i hope i help you ! --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6036&messageID=17141#17141 From forum-watir-users at openqa.org Mon Jan 15 11:15:11 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Mon, 15 Jan 2007 10:15:11 CST Subject: [Wtr-general] modal_dialog not working in 1.5.1.1136, ruby 1.8.4 In-Reply-To: Message-ID: <46416148.1168877742248.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> thanks zeljko, I am logged in as an admin. I tried to register win32ole.so (which i have no idea what kind of file it is). Is there a win32ole.dll somewhere I should try? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6110&messageID=17142#17142 From tester.paul at gmail.com Mon Jan 15 11:32:30 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Mon, 15 Jan 2007 11:32:30 -0500 Subject: [Wtr-general] What does IE.down_load_time really measure? In-Reply-To: <41994386.1168691529943.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <37c405480701111407p963b424vd60adef34a421930@mail.gmail.com> <41994386.1168691529943.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <37c405480701150832q588c15d5v64bbfe6de307d6a6@mail.gmail.com> On 13/01/07, Bret Pettichord wrote: > > > Would it be possible for you to provide code and output that are synced up > with each other? > > Bret > Sure thing. Rather than include everything, here are some relevant bits: ---- Aside: filename written to from the setup method: filename1 = 'site_map_output'+ f_count +'.csv' $f = File.new(filename1, "w") $f.puts "#{header_info}" ---- def walk_Main_Menu $f.puts '"3. Main Pages:","Page Size (bytes)","Page Load Time 1 (s)","Page Load Time 2 (s)"' # set the page_name array.. # Log in, update password, and go to the Home page secondary_page_timer = Time.now $ie.button(:name, /UpdateSettingsButton/).click record_measurement( page_name[0], secondary_page_timer ) # go on to the next page... ---- def record_measurement( page_title, secondary_page_start_time ) $f.puts page_title + ',' + $ie.html.length.to_s + ',' + $ie.down_load_time.to_s + ',' + (Time.now - secondary_page_start_time).to_s end ---- => And the output file from a script run contains numbers like the following: "3. Main Pages:","Page Size (bytes)","Page Load Time (s)","2 Page Load Time (s)" "a) Home",15210,0.015,1.075 ... "k) Personal Settings",33639,0.872,1.06 ... "m) Contact Support",15106,0.373,0.514 ---- (BTW, I'm still removing the global variables as I come across them, so there are still a handful left. The script may not be the prettiest from a programming perspective, but it's a small site and the script works, so it's good enough for me for now.) I think the Home page might be cached in the browser and so the "download" time is negligible. The server response time navigating between the pages still takes about a second though. So I'm wondering if IE is making a distinction between how long it takes to get the page versus how long it takes to finish what it was doing with the last page visited. Dunno. I'll try changing up the order in which the pages are loaded and clearing the browser cache to see if it makes a difference, but the ~300 ms difference between the timers seems to be consistent. (There are other pages with a bigger time difference than that observed with the Home page!) Paul C. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070115/ffb82904/attachment.html From christopher.mcmahon at gmail.com Mon Jan 15 11:39:00 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 15 Jan 2007 08:39:00 -0800 Subject: [Wtr-general] problem in reading and storing values from row of a table In-Reply-To: <20070115122501.44899.qmail@web7809.mail.in.yahoo.com> References: <20070115122501.44899.qmail@web7809.mail.in.yahoo.com> Message-ID: <72799cd70701150839t12475c25mf7ac4c21154963ed@mail.gmail.com> Here's one way to do it: row_values = row.text.split(/\w+ /) 1.upto (row_values.length) do |number| puts "date#{number} = #{row_value[number - 1]}, month#{number}= #{row_value[number - 1]}, Year#{number}= #{row_value[number - 1]}, value#{number} = #{row_value[number - 1]}, Status#{number} = #{row_value[number - 1]} split divides a string where it encounters it's argument and returns an array of the elements of the string left over. I could have put a space " " inside the parentheses for split, but I couldn't see whether you had more than one space in that list of values. So I used a regular expression /\w+/ instead, which means "any whitespace at all, including tabs and newlines and such". Then we just count. We need to know the number of elements in the array, so we use "length". You wanted your text to start counting at one, but arrays are indexed by zero, so I have to slice the array with "number-1" for each time through the loop. BTW, this is a classic associative array, also known as a hash. A hash might be a better way to arrange this information. You could search google for "ruby array" and "ruby hash" for more information. On 1/15/07, VIKASH KUMAR wrote: > > I am running a test case, in which I want to store all the values of a > table in variables, I am using the below code: > > > require 'watir' > > ie=Watir::IE.start("C:\test.htm") > > class Test > def test_row_collection(ie) > t= ie.table(:class,'listView') > value_i = 0 > t.rows.each do |row| > puts row > puts "Our Number is " && value_i > value_i += 1 > end > end > end > > > TestObj = Test.new > TestObj.test_row_collection(ie) > > > > It displays the following output: > > type: > id: > name: > value: > disabled: false > 0 > type: > id: > name: > value: > disabled: false > 1 > type: > id: > name: > value: > disabled: false > > > > > > If I used "puts row.text" in the above definition, it displays the > following output. > > 0 > 01/14/2007 Jan/2007 2007 13 Open > 1 > 01/15/2007 Jan/2007 2007 16 Open > > > > I want to store values like this: > > date1 = 01/14/2007, month1= Jan/2007, Year1= 2007, value1 = 13, Status1 = > Open > > date2 = 01/14/2007, month2= Jan/2007, Year2= 2007, value2 = 16, Status2 = > Open > > > > Please help me out in doing this. > > Thanks in advance > > Vikash > > ------------------------------ > Here's a new way to find what you're looking for - Yahoo! Answers > > _______________________________________________ > 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/20070115/c0e7f0c5/attachment-0001.html From christopher.mcmahon at gmail.com Mon Jan 15 12:15:11 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 15 Jan 2007 09:15:11 -0800 Subject: [Wtr-general] Made a mistake Re: problem in reading and storing values from row of a table Message-ID: <72799cd70701150915u77335ce0sc7ace2b497b7fea5@mail.gmail.com> I should know by now to finish my coffee before I hit "send". 1.upto (row_values.length) do |number| puts "date#{number} = #{row_value[0]}, month#{number}= #{row_value[1]}, Year#{number}= #{row_value[2]}, value#{number} = #{row_value[3]}, Status#{number} = #{row_value[4]} -Chris On 1/15/07, Chris McMahon wrote: > > > Here's one way to do it: > > row_values = row.text.split(/\w+ /) > > 1.upto (row_values.length) do |number| > puts "date#{number} = #{row_value[number - 1]}, month#{number}= > #{row_value[number - 1]}, Year#{number}= #{row_value[number - > 1]}, value#{number} = #{row_value[number - 1]}, Status#{number} = > #{row_value[number - 1]} > > split divides a string where it encounters it's argument and returns an > array of the elements of the string left over. I could have put a space " " > inside the parentheses for split, but I couldn't see whether you had more > than one space in that list of values. So I used a regular expression /\w+/ > instead, which means "any whitespace at all, including tabs and newlines and > such". > > Then we just count. We need to know the number of elements in the array, > so we use "length". You wanted your text to start counting at one, but > arrays are indexed by zero, so I have to slice the array with "number-1" for > each time through the loop. > > BTW, this is a classic associative array, also known as a hash. A hash > might be a better way to arrange this information. You could search google > for "ruby array" and "ruby hash" for more information. > > > > On 1/15/07, VIKASH KUMAR wrote: > > > I am running a test case, in which I want to store all the values of a > > table in variables, I am using the below code: > > > > > > require 'watir' > > > > ie=Watir::IE.start("C:\test.htm") > > > > class Test > > def test_row_collection(ie) > > t= ie.table(:class,'listView') > > value_i = 0 > > t.rows.each do |row| > > puts row > > puts "Our Number is " && value_i > > value_i += 1 > > end > > end > > end > > > > > > TestObj = Test.new > > TestObj.test_row_collection(ie) > > > > > > > > It displays the following output: > > > > type: > > id: > > name: > > value: > > disabled: false > > 0 > > type: > > id: > > name: > > value: > > disabled: false > > 1 > > type: > > id: > > name: > > value: > > disabled: false > > > > > > > > > > > > If I used "puts row.text" in the above definition, it displays the > > following output. > > > > 0 > > 01/14/2007 Jan/2007 2007 13 Open > > 1 > > 01/15/2007 Jan/2007 2007 16 Open > > > > > > > > I want to store values like this: > > > > date1 = 01/14/2007, month1= Jan/2007, Year1= 2007, value1 = 13, Status1 > > = Open > > > > date2 = 01/14/2007, month2= Jan/2007, Year2= 2007, value2 = 16, Status2 > > = Open > > > > > > > > Please help me out in doing this. > > > > Thanks in advance > > > > Vikash > > > > ------------------------------ > > Here's a new way to find what you're looking for - Yahoo! Answers > > > > > > _______________________________________________ > > 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/20070115/bd593809/attachment.html From bret at pettichord.com Mon Jan 15 12:25:56 2007 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 15 Jan 2007 11:25:56 -0600 Subject: [Wtr-general] modal_dialog not working in 1.5.1.1136, ruby 1.8.4 In-Reply-To: <62203240.1168873144914.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <62203240.1168873144914.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45ABB924.5000908@pettichord.com> The modal_dialog code is not supported with Ruby 1.8.4. Or more specifically, the win32ole changes that we made to support modal dialogs only work with Ruby 1.8.2. Bret From forum-watir-users at openqa.org Mon Jan 15 13:12:18 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Mon, 15 Jan 2007 12:12:18 CST Subject: [Wtr-general] modal_dialog not working in 1.5.1.1136, ruby 1.8.4 In-Reply-To: <45ABB924.5000908@pettichord.com> Message-ID: <47960222.1168884768364.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thanks! I guess I should just read the error message more carefully next time :) --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6110&messageID=17153#17153 From tester.paul at gmail.com Mon Jan 15 15:16:35 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Mon, 15 Jan 2007 15:16:35 -0500 Subject: [Wtr-general] What does IE.down_load_time really measure? In-Reply-To: <45A573C9.10404@pettichord.com> References: <37c405480701101401q326f2e2y87a93bf76141eb8e@mail.gmail.com> <45A573C9.10404@pettichord.com> Message-ID: <37c405480701151216g37af1c95rf60ef3ba125aa538@mail.gmail.com> Hey Bret, I have another question. I'm almost finished updating another script that walks through the pages of another web app and I'm noticing that the average difference between the timers is ~ 2.0 seconds! This second app is mostly frames though. So when I issue the following command: ie.down_load_time Does it report the download time for the whole page, i.e. including all of the sub-frames, or does it only return the download wait time for the outer IE frame? Since I've written a separate method ('wait_for_frames') that waits for all of the frames to finish loading before proceeding to the next LOC, it got me wondering that perhaps your code example below doesn't include the wait time (and therefore download time) for all of the sub-frames. Do you know if this would be fixed in 1.5.x? Please let me know. Thanks. On 10/01/07, Bret Pettichord wrote: > > The "down_load_time" is the amount of time that watir waits in the wait > method that is automatically called after the click. It should be > roughly the same as the "wait_time" defined below: > > ie. button(:name, /UpdateSettingsButton/).click! > then = Time.now > ie.wait > wait_time = Time.now - then > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070115/85c31355/attachment.html From forum-watir-users at openqa.org Mon Jan 15 19:46:35 2007 From: forum-watir-users at openqa.org (Vince) Date: Mon, 15 Jan 2007 18:46:35 CST Subject: [Wtr-general] Speed of Firewatir vs. Watir In-Reply-To: Message-ID: <52780990.1168908425095.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> > 'll be releasing version 1.0 of FireWatir next week, which includes > starting the FireWatir from the script itself i.e. you don't have start > Firefox manually and then run the script. This will work for Windows only. Next week you say? This week, based on when you said it, even... I must say that the last time I went looking into FireWatir, it was not nearly at this level. I'll be looking for your release (have gotten on the google group). --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6078&messageID=17160#17160 From manjiri at verisoftindia.com Mon Jan 15 23:39:47 2007 From: manjiri at verisoftindia.com (manjiri at verisoftindia.com) Date: Tue, 16 Jan 2007 10:09:47 +0530 (IST) Subject: [Wtr-general] Change in email id for mailing list In-Reply-To: References: Message-ID: <39401.192.168.10.31.1168922387.squirrel@192.168.10.102> To whomsoever it may concern: Could you please send me these mails on manjiri_m at yahoo.com, as this current id i.e. manjiri at verisoftindia.com is no longer going to be used by me. Thanks in anticipation. Warm Regards, Manjiri Marathe > Send Wtr-general mailing list submissions to > wtr-general at rubyforge.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://rubyforge.org/mailman/listinfo/wtr-general > or, via email, send a message with subject or body 'help' to > wtr-general-request at rubyforge.org > > You can reach the person managing the list at > wtr-general-owner at rubyforge.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Wtr-general digest..." > > > Today's Topics: > > 1. Can't run script on Vista IE7 (nsit) > 2. problem in reading and storing values from row of a table > (VIKASH KUMAR) > 3. modal_dialog not working in 1.5.1.1136, ruby 1.8.4 (John Lolis) > 4. Re: Can't run script on Vista IE7 (nsit) > 5. Re: modal_dialog not working in 1.5.1.1136, ruby 1.8.4 > ( ?eljko Filipin ) > 6. Re: Menu links have duplicate attributes (gdx) > 7. Re: modal_dialog not working in 1.5.1.1136, ruby 1.8.4 > (John Lolis) > 8. Re: What does IE.down_load_time really measure? (Paul Carvalho) > 9. Re: problem in reading and storing values from row of a table > (Chris McMahon) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 15 Jan 2007 03:45:30 CST > From: nsit > Subject: [Wtr-general] Can't run script on Vista IE7 > To: wtr-general at rubyforge.org > Message-ID: > <40231234.1168854383366.JavaMail.oqa-j2ee at openqa01.managed.contegix.com> > > Content-Type: text/plain; charset=ISO-8859-1 > > Hi all > > I tried Google Test Search. There two browser opened. One opened > google.com, one displayed status message 'connecting...' and nothing > happened after that. > Next lines weren't executed. > What happened? > > Thank you. > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6107&messageID=17130#17130 > > > ------------------------------ > > Message: 2 > Date: Mon, 15 Jan 2007 17:55:01 +0530 (IST) > From: VIKASH KUMAR > Subject: [Wtr-general] problem in reading and storing values from row > of a table > To: wtr-general at rubyforge.org > Message-ID: <20070115122501.44899.qmail at web7809.mail.in.yahoo.com> > Content-Type: text/plain; charset="us-ascii" > > I am running a test case, in which I want to store all the values of a > table in variables, I am using the below code: > > require 'watir' > ie=Watir::IE.start("C:\test.htm") > class Test > def test_row_collection(ie) > t= ie.table(:class,'listView') > value_i = 0 > t.rows.each do |row| > puts row > puts "Our Number is " && value_i > value_i += 1 > end > end > end > > TestObj = Test.new > TestObj.test_row_collection(ie) > > It displays the following output: > type: > id: > name: > value: > disabled: false > 0 > type: > id: > name: > value: > disabled: false > 1 > type: > id: > name: > value: > disabled: false > > > If I used "puts row.text" in the above definition, it displays the > following output. > 0 > 01/14/2007 Jan/2007 2007 13 Open > 1 > 01/15/2007 Jan/2007 2007 16 Open > > I want to store values like this: > date1 = 01/14/2007, month1= Jan/2007, Year1= 2007, value1 = 13, Status1 = > Open > date2 = 01/14/2007, month2= Jan/2007, Year2= 2007, value2 = 16, Status2 = > Open > > Please help me out in doing this. > Thanks in advance > Vikash > > > > __________________________________________________________ > Yahoo! India Answers: Share what you know. Learn something new > http://in.answers.yahoo.com/ > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://rubyforge.org/pipermail/wtr-general/attachments/20070115/4cb5a91a/attachment-0001.html > > ------------------------------ > > Message: 3 > Date: Mon, 15 Jan 2007 08:58:34 CST > From: John Lolis > Subject: [Wtr-general] modal_dialog not working in 1.5.1.1136, ruby > 1.8.4 > To: wtr-general at rubyforge.org > Message-ID: > <62203240.1168873144914.JavaMail.oqa-j2ee at openqa01.managed.contegix.com> > > Content-Type: text/plain; charset=ISO-8859-1 > > I seem to be having some issues attaching to modal_dialogs. I tried to > register my win32ole but it didn't seem to help. (the dialog popped up and > said it didn't appear to be a valid dll) > > Heres my session in the IRB. Not after I hit 'new' I manually navigated > and opened a modal dialog. Do I need to update to a new version or ruby? > > irb(main):001:0> require 'watir' > => true > irb(main):003:0> include Watir > => Object > irb(main):004:0> ie = IE.new() > *snipped out* > irb(main):005:0> ie.modal_dialog > NoMethodError: IE#modal_dialog not supported with the current version of > Ruby (1.8.4). > See http://jira.openqa.org/browse/WTR-2 for details. > undefined method `connect_unknown' for WIN32OLE:Class > from C:/Program > Files/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1136/./watir.rb:2703:in > `initialize' > from C:/Program > Files/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1136/./watir.rb:450:in > `modal_dialog' > from (irb):5 > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6110&messageID=17136#17136 > > > ------------------------------ > > Message: 4 > Date: Mon, 15 Jan 2007 09:23:21 CST > From: nsit > Subject: Re: [Wtr-general] Can't run script on Vista IE7 > To: wtr-general at rubyforge.org > Message-ID: > <61859600.1168874631746.JavaMail.oqa-j2ee at openqa01.managed.contegix.com> > > Content-Type: text/plain; charset=ISO-8859-1 > > I works after installing watir 1.5.1.1136. > But watir still opens 2 window one blank and one with website. And then I > have to use attach to interact with the website. > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6107&messageID=17139#17139 > > > ------------------------------ > > Message: 5 > Date: Mon, 15 Jan 2007 16:45:13 +0100 > From: " ?eljko Filipin " > Subject: Re: [Wtr-general] modal_dialog not working in 1.5.1.1136, > ruby 1.8.4 > To: wtr-general at rubyforge.org > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > On 1/15/07, John Lolis wrote: >> >> I seem to be having some issues attaching to modal_dialogs. I tried to >> register my win32ole but it didn't seem to help. (the dialog popped up >> and >> said it didn't appear to be a valid dll) > > > Make sure you are logged in as administrator while registering. > -- > Zeljko Filipin > zeljkofilipin.com > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://rubyforge.org/pipermail/wtr-general/attachments/20070115/916bb452/attachment-0001.html > > ------------------------------ > > Message: 6 > Date: Mon, 15 Jan 2007 10:08:45 CST > From: gdx > Subject: Re: [Wtr-general] Menu links have duplicate attributes > To: wtr-general at rubyforge.org > Message-ID: > <51669831.1168877355433.JavaMail.oqa-j2ee at openqa01.managed.contegix.com> > > Content-Type: text/plain; charset=ISO-8859-1 > > Hi, > > sorry for my english. > > Maybe you can use .csv or excel file to read > the number index who match with the connected profil. > > If you use this 'tips', i think you'll win time the next time, index will > change in your application. You'll have to modify just one file instead of > all .rb file ... > > i hope i help you ! > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6036&messageID=17141#17141 > > > ------------------------------ > > Message: 7 > Date: Mon, 15 Jan 2007 10:15:11 CST > From: John Lolis > Subject: Re: [Wtr-general] modal_dialog not working in 1.5.1.1136, > ruby 1.8.4 > To: wtr-general at rubyforge.org > Message-ID: > <46416148.1168877742248.JavaMail.oqa-j2ee at openqa01.managed.contegix.com> > > Content-Type: text/plain; charset=ISO-8859-1 > > thanks zeljko, > > I am logged in as an admin. I tried to register win32ole.so (which i have > no idea what kind of file it is). Is there a win32ole.dll somewhere I > should try? > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6110&messageID=17142#17142 > > > ------------------------------ > > Message: 8 > Date: Mon, 15 Jan 2007 11:32:30 -0500 > From: "Paul Carvalho" > Subject: Re: [Wtr-general] What does IE.down_load_time really measure? > To: wtr-general at rubyforge.org > Message-ID: > <37c405480701150832q588c15d5v64bbfe6de307d6a6 at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > On 13/01/07, Bret Pettichord wrote: >> >> >> Would it be possible for you to provide code and output that are synced >> up >> with each other? >> >> Bret >> > > Sure thing. Rather than include everything, here are some relevant bits: > ---- > Aside: filename written to from the setup method: > filename1 = 'site_map_output'+ f_count +'.csv' > $f = File.new(filename1, "w") > $f.puts "#{header_info}" > ---- > def walk_Main_Menu > > $f.puts '"3. Main Pages:","Page Size (bytes)","Page Load Time 1 > (s)","Page > Load Time 2 (s)"' > # set the page_name array.. > > # Log in, update password, and go to the Home page > secondary_page_timer = Time.now > $ie.button(:name, /UpdateSettingsButton/).click > record_measurement( page_name[0], secondary_page_timer ) > > # go on to the next page... > ---- > def record_measurement( page_title, secondary_page_start_time ) > $f.puts page_title + ',' + $ie.html.length.to_s + ',' + > $ie.down_load_time.to_s + ',' + (Time.now - > secondary_page_start_time).to_s > end > ---- > > => And the output file from a script run contains numbers like the > following: > > "3. Main Pages:","Page Size (bytes)","Page Load Time (s)","2 Page Load > Time > (s)" > "a) Home",15210,0.015,1.075 > ... > "k) Personal Settings",33639,0.872,1.06 > ... > "m) Contact Support",15106,0.373,0.514 > > ---- > > (BTW, I'm still removing the global variables as I come across them, so > there are still a handful left. The script may not be the prettiest from > a > programming perspective, but it's a small site and the script works, so > it's > good enough for me for now.) > > I think the Home page might be cached in the browser and so the "download" > time is negligible. The server response time navigating between the pages > still takes about a second though. So I'm wondering if IE is making a > distinction between how long it takes to get the page versus how long it > takes to finish what it was doing with the last page visited. > > Dunno. I'll try changing up the order in which the pages are loaded and > clearing the browser cache to see if it makes a difference, but the ~300 > ms > difference between the timers seems to be consistent. (There are other > pages with a bigger time difference than that observed with the Home > page!) > > Paul C. > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://rubyforge.org/pipermail/wtr-general/attachments/20070115/ffb82904/attachment-0001.html > > ------------------------------ > > Message: 9 > Date: Mon, 15 Jan 2007 08:39:00 -0800 > From: "Chris McMahon" > Subject: Re: [Wtr-general] problem in reading and storing values from > row of a table > To: wtr-general at rubyforge.org > Message-ID: > <72799cd70701150839t12475c25mf7ac4c21154963ed at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Here's one way to do it: > > row_values = row.text.split(/\w+ /) > > 1.upto (row_values.length) do |number| > puts "date#{number} = #{row_value[number - 1]}, month#{number}= > #{row_value[number - 1]}, Year#{number}= #{row_value[number - > 1]}, value#{number} = #{row_value[number - 1]}, Status#{number} = > #{row_value[number - 1]} > > split divides a string where it encounters it's argument and returns an > array of the elements of the string left over. I could have put a space " > " > inside the parentheses for split, but I couldn't see whether you had more > than one space in that list of values. So I used a regular expression > /\w+/ > instead, which means "any whitespace at all, including tabs and newlines > and > such". > > Then we just count. We need to know the number of elements in the array, > so > we use "length". You wanted your text to start counting at one, but > arrays > are indexed by zero, so I have to slice the array with "number-1" for each > time through the loop. > > BTW, this is a classic associative array, also known as a hash. A hash > might be a better way to arrange this information. You could search > google > for "ruby array" and "ruby hash" for more information. > > > > On 1/15/07, VIKASH KUMAR wrote: >> >> I am running a test case, in which I want to store all the values of a >> table in variables, I am using the below code: >> >> >> require 'watir' >> >> ie=Watir::IE.start("C:\test.htm") >> >> class Test >> def test_row_collection(ie) >> t= ie.table(:class,'listView') >> value_i = 0 >> t.rows.each do |row| >> puts row >> puts "Our Number is " && value_i >> value_i += 1 >> end >> end >> end >> >> >> TestObj = Test.new >> TestObj.test_row_collection(ie) >> >> >> >> It displays the following output: >> >> type: >> id: >> name: >> value: >> disabled: false >> 0 >> type: >> id: >> name: >> value: >> disabled: false >> 1 >> type: >> id: >> name: >> value: >> disabled: false >> >> >> >> >> >> If I used "puts row.text" in the above definition, it displays the >> following output. >> >> 0 >> 01/14/2007 Jan/2007 2007 13 Open >> 1 >> 01/15/2007 Jan/2007 2007 16 Open >> >> >> >> I want to store values like this: >> >> date1 = 01/14/2007, month1= Jan/2007, Year1= 2007, value1 = 13, Status1 >> = >> Open >> >> date2 = 01/14/2007, month2= Jan/2007, Year2= 2007, value2 = 16, Status2 >> = >> Open >> >> >> >> Please help me out in doing this. >> >> Thanks in advance >> >> Vikash >> >> ------------------------------ >> Here's a new way to find what you're looking for - Yahoo! >> Answers >> >> _______________________________________________ >> 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/20070115/c0e7f0c5/attachment.html > > ------------------------------ > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > End of Wtr-general Digest, Vol 38, Issue 27 > ******************************************* > > ----------------------------------------- This email was sent using SMTP Verisoftindia.com. http://www.verisoftindia.com/ From vikashkumar051 at yahoo.co.in Tue Jan 16 02:46:36 2007 From: vikashkumar051 at yahoo.co.in (VIKASH KUMAR) Date: Tue, 16 Jan 2007 13:16:36 +0530 (IST) Subject: [Wtr-general] storing values of table cell Message-ID: <20070116074636.54203.qmail@web7815.mail.in.yahoo.com> I have a table structure like this:
 01/16/2007 Jan/2007 2007 13 Open None None  
I am using the following code: require 'watir' ie = Watir::IE.attach(:title, /New/) class Test def test_row_collection(ie) row= ie.table(:index,'1')[1] row.each do |cell| puts cell.text end end end TestObj = Test.new TestObj.test_row_collection(ie) It produce the following result: >ruby test1.rb 01/16/2007 Jan/2007 2007 13 Open None None >Exit code: 0 Is there is a way to store all the values in some variable, like day=01/16/2007, month=Jan/2007, year=2007, status=13, value=open. Thanks in advance Vikash __________________________________________________________ Yahoo! India Answers: Share what you know. Learn something new http://in.answers.yahoo.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070116/b63eb56d/attachment.html From zeljko.filipin at gmail.com Tue Jan 16 03:19:12 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Tue, 16 Jan 2007 09:19:12 +0100 Subject: [Wtr-general] Change in email id for mailing list In-Reply-To: <39401.192.168.10.31.1168922387.squirrel@192.168.10.102> References: <39401.192.168.10.31.1168922387.squirrel@192.168.10.102> Message-ID: On 1/16/07, manjiri at verisoftindia.com wrote: > > Could you please send me these mails on manjiri_m at yahoo.com, as this > current id i.e. manjiri at verisoftindia.com is no longer going to be used by > me. > Hi Manjiri, You will have to change it yourself at http://rubyforge.org/mailman/listinfo/wtr-general -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070116/3344c20f/attachment.html From forum-watir-users at openqa.org Tue Jan 16 03:34:05 2007 From: forum-watir-users at openqa.org (Maloy kanti debnath) Date: Tue, 16 Jan 2007 02:34:05 CST Subject: [Wtr-general] problem with attaching new window Message-ID: <40171684.1168936475084.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, I am only one week old to this tool and i have one major doubt . I have a task of checking whether each of the links in a web page goes to the correct page or not when clicked. The basic idean is to move the mouse cursor over a link present in the page, get the 'intended destination weblink' from the status bar, actually click the web link and check the 'url' of the resulting page to see if its matches with the 'intended destination weblink'. I have written a loop to do the same for each of the weblinks in the page. The problem that I face while implementing this idea is that some of the weblinks, when clicked, open a new webpage while some of the weblinks open in the same page. Now I need to know whether a weblink has opened a new webpage or has opened in the same page inorder to check the resultant webpage''s url. How do I do that? Thanks in advance, Maloy. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6123&messageID=17170#17170 From forum-watir-users at openqa.org Tue Jan 16 04:12:20 2007 From: forum-watir-users at openqa.org (Maloy kanti debnath) Date: Tue, 16 Jan 2007 03:12:20 CST Subject: [Wtr-general] problem with attaching new window ??? Message-ID: <56163040.1168938770151.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, I am only one week old to this tool and i have one major doubt . I have a task of checking whether each of the links in a web page goes to the correct page or not when clicked. The basic idean is to move the mouse cursor over a link present in the page, get the 'intended destination weblink' from the status bar, actually click the web link and check the 'url' of the resulting page to see if its matches with the 'intended destination weblink'. I have written a loop to do the same for each of the weblinks in the page. The problem that I face while implementing this idea is that some of the weblinks, when clicked, open a new webpage while some of the weblinks open in the same page. Now I need to know whether a weblink has opened a new webpage or has opened in the same page inorder to check the resultant webpage''s url. How do I do that? Thanks in advance, Maloy. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6125&messageID=17174#17174 From forum-watir-users at openqa.org Tue Jan 16 04:33:06 2007 From: forum-watir-users at openqa.org (gdx) Date: Tue, 16 Jan 2007 03:33:06 CST Subject: [Wtr-general] problem with attaching new window In-Reply-To: <40171684.1168936475084.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <46315037.1168940016167.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, sorry for my english. Maybe before click to the link, you can parse the string 'href' to know if this will be a popup or not. at least, we have 3 type of Links : 1) href:=http://appli:2073/contact.html 2) href:=javascript:goToMainMenu() 3) href:=javascript:window.open('http://appli:2073/help.html') 1) the page is load in the same window. 2) this is a surpise... 3) a new window is create on click event. For the 2), we have to make a fonction to get the javascript code of goToMainMenu() and parse it to know what is done in it ... I hope i help you ! Message was edited by: ogre --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6123&messageID=17176#17176 From forum-watir-users at openqa.org Tue Jan 16 04:57:59 2007 From: forum-watir-users at openqa.org (gdx) Date: Tue, 16 Jan 2007 03:57:59 CST Subject: [Wtr-general] Two queries in Watir In-Reply-To: <47777153.1168413793093.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <47060817.1168941509351.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> hi, sorry for my english 2) if you use or method who write directly in console, you can show log directly in the console where you have run your program or in your editor if you use Scite or an other... You can write in a text file like this : f = "c:\\file.log" fl = File.new(f,"a+") fl.puts("yeah !!!") the method exist too. I hope i help you --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6068&messageID=17177#17177 From luccasz at gmail.com Tue Jan 16 05:06:33 2007 From: luccasz at gmail.com (Luke) Date: Tue, 16 Jan 2007 11:06:33 +0100 Subject: [Wtr-general] get index of element Message-ID: is it possible to get index of element? eg. is there a method which does logic like this ie.link('name').getIndex() Luke -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070116/0655a987/attachment.html From forum-watir-users at openqa.org Tue Jan 16 05:39:42 2007 From: forum-watir-users at openqa.org (gdx) Date: Tue, 16 Jan 2007 04:39:42 CST Subject: [Wtr-general] get index of element In-Reply-To: Message-ID: <47712565.1168944012466.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> hi, sorry for my english i'm beggining to work with watir one weak ago, so maybe i dont know the solution But, let me show how i do this : with this : i = 0 ie1 = IE.attach(:url, 'http://appli/main.jsp') ie1.frame("moduleFrame").links.each { |l| puts (i+=1).to_s ; puts l.to_s } You have the list of Link of your page and the index, i suppose I try it, its working... maybe i've luck :-) So with this, you have just to make a array or hash map, that you want and i think you can have your method get_index() :D i hope i help you --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6126&messageID=17182#17182 From forum-watir-users at openqa.org Tue Jan 16 07:23:13 2007 From: forum-watir-users at openqa.org (sarita) Date: Tue, 16 Jan 2007 06:23:13 CST Subject: [Wtr-general] Handling verification codes (shown as img), used to prevent automation Message-ID: <41646688.1168950223113.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> In most web applications during user registration, verification codes shown as images, are asked to enter. How to handle this situation? I guess we can handle this situation by making watir wait till the verification code is entered manully by the user. But how to implement it, please suggest. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6130&messageID=17185#17185 From luccasz at gmail.com Tue Jan 16 07:24:39 2007 From: luccasz at gmail.com (Luke) Date: Tue, 16 Jan 2007 13:24:39 +0100 Subject: [Wtr-general] get index of element In-Reply-To: <47712565.1168944012466.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <47712565.1168944012466.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: I found solusion eg. for links it would be ie.show_links(), this method displayed list which contains such details like index of each link -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070116/fb1eb523/attachment.html From zeljko.filipin at gmail.com Tue Jan 16 07:57:41 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Tue, 16 Jan 2007 13:57:41 +0100 Subject: [Wtr-general] modal_dialog not working in 1.5.1.1136, ruby 1.8.4 In-Reply-To: <45ABB924.5000908@pettichord.com> References: <62203240.1168873144914.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <45ABB924.5000908@pettichord.com> Message-ID: On 1/15/07, Bret Pettichord wrote: > > The modal_dialog code is not supported with Ruby 1.8.4. Or more > specifically, the win32ole changes that we made to support modal dialogs > only work with Ruby 1.8.2. Bret, Is 1.8.2 recommended Ruby version for Watir? I really do not need the newest Ruby, but I would like to use the newest Watir. So, is there a Ruby version that you would recommend (in order for all Watir methods to work)? -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070116/2c24877a/attachment-0001.html From forum-watir-users at openqa.org Tue Jan 16 08:09:46 2007 From: forum-watir-users at openqa.org (gdx) Date: Tue, 16 Jan 2007 07:09:46 CST Subject: [Wtr-general] Handling verification codes (shown as img), used to prevent automation In-Reply-To: <41646688.1168950223113.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <43301212.1168953016052.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> hi, sorry for my english. I think '#' is not use for making the 'image code', so we can do this : i = 0 while i == 0 ReadTextField = ie.fieldYouWant.text if ReadTextField.match(/.*#$/) i == 1 end end So your script wait while y'ou ve set your code and a '#' to finish. You've just to delete the last character of your string, if you've to test him after in your code... I hope i help you. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6130&messageID=17188#17188 From zeljko.filipin at gmail.com Tue Jan 16 08:56:23 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Tue, 16 Jan 2007 14:56:23 +0100 Subject: [Wtr-general] Handling verification codes (shown as img), used to prevent automation In-Reply-To: <41646688.1168950223113.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <41646688.1168950223113.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: On 1/16/07, sarita wrote: > > In most web applications during user registration, verification codes > shown as images, are asked to enter. > And this is done exactly to prevent machines from entering verification code. :) There is still no way for a computer to recognize what code is shown in image, only humans can do it. The only thing that I can think of is to ask your developer to add verification code as custom property to image. Or add custom tag somewhere at page. Just do not forget to remove that code once it is moved to production, because you will leave open door for machines pretending to be humans. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070116/1ca3c8eb/attachment.html From zeljko.filipin at gmail.com Tue Jan 16 09:07:12 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Tue, 16 Jan 2007 15:07:12 +0100 Subject: [Wtr-general] problem with attaching new window ??? In-Reply-To: <56163040.1168938770151.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <56163040.1168938770151.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: If you click a link that looks like this text it will open new browser window. So, this code will return string "_blank" if your link will open page in new browser irb(main):009:0> ie.link(:text, "text").attribute_value("target") => "_blank" This will probably work only with watir 1.5. You can get it from http://wiki.openqa.org/display/WTR/Development+Builds If you do not understand this, post a few of your links that open and that do not open a new page and I will send you more specific code. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070116/ff972597/attachment.html From zeljko.filipin at gmail.com Tue Jan 16 09:15:41 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Tue, 16 Jan 2007 15:15:41 +0100 Subject: [Wtr-general] storing values of table cell In-Reply-To: <20070116074636.54203.qmail@web7815.mail.in.yahoo.com> References: <20070116074636.54203.qmail@web7815.mail.in.yahoo.com> Message-ID: On 1/16/07, VIKASH KUMAR wrote: > > Is there is a way to store all the values in some variable, like > day=01/16/2007, month=Jan/2007, year=2007, status=13, value=open. > Hi Vikash, You already have stored that values to variable, you have named it row. This is snippet from my irb session. irb(main):008:0> row[1].text => "01/16/2007" irb(main):009:0> row[2].text => "Jan/2007" If you would like to store those values in variables that are named day, month (..). you can do it like this irb(main):010:0> day = row[1].text => "01/16/2007" irb(main):011:0> month = row[2].text => "Jan/2007" irb(main):012:0> day => "01/16/2007" irb(main):013:0> month => "Jan/2007" Or you can use row[1].text, row[2].text... If you do not understand my answer, please do let me know, I will try to write it in a more simple manner. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070116/7e8988c1/attachment.html From forum-watir-users at openqa.org Tue Jan 16 09:31:24 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Tue, 16 Jan 2007 08:31:24 CST Subject: [Wtr-general] modal_dialog not working in 1.5.1.1136, ruby 1.8.4 In-Reply-To: Message-ID: <43020058.1168957914588.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Adding to what Zeljko said, Is there a way for Watir when its first load to check your version or ruby, if AutoIt is loaded and if things aren't as they should be spit out a warning? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6110&messageID=17196#17196 From bret at pettichord.com Tue Jan 16 11:05:47 2007 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 16 Jan 2007 10:05:47 -0600 Subject: [Wtr-general] modal_dialog not working in 1.5.1.1136, ruby 1.8.4 In-Reply-To: References: <62203240.1168873144914.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <45ABB924.5000908@pettichord.com> Message-ID: <45ACF7DB.1000304@pettichord.com> ?eljko Filipin wrote: > Is 1.8.2 recommended Ruby version for Watir? I really do not need the > newest Ruby, but I would like to use the newest Watir. So, is there a > Ruby version that you would recommend (in order for all Watir methods > to work)? I recommend using 1.8.2. However, any version of Ruby (1.8.2 or greater) should work fine as long as you are not using our modal dialog (showModalDialog, aka modal web dialog) support. Bret From bret at pettichord.com Tue Jan 16 11:13:23 2007 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 16 Jan 2007 10:13:23 -0600 Subject: [Wtr-general] modal_dialog not working in 1.5.1.1136, ruby 1.8.4 In-Reply-To: <43020058.1168957914588.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <43020058.1168957914588.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45ACF9A3.8090304@pettichord.com> John Lolis wrote: > Is there a way for Watir when its first load to check your version or ruby, if AutoIt is loaded and if things aren't as they should be spit out a warning? I'm not quite sure what you asking. 1. Is it possible to for Watir to check your ruby version and autoit and other stuff and spit out a warning? A. Yes it is technically possible. 2. Is it a good idea? A. I don't know. Different features of watir have different requirements. My view has been that each feature should spit out a warning if its requirements aren't met. We've just updated the modal_dialog and FileField#set code to do this. My view at the moment is that is a better approach, but i am certainly open to ideas on this. 3. Would you accept a change to Watir for a new method such as "Watir.validate_dependencies" that would automatically verify all of these dependencies. A. I don't see why not. Then the only question would be whether this method should be run automatically on load. If we had the method first, it would help the community decide whether it should be automatically invoked. 4. Will you write this method for us? A. Maybe some day. I would need to hear more. My concern is that it would lead people to think that Watir only worked with 1.8.2 (say) which is not true and for some might turn them away. Bret From bret at pettichord.com Tue Jan 16 23:31:17 2007 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 16 Jan 2007 22:31:17 -0600 Subject: [Wtr-general] Is there a way to make file_field.set faster? In-Reply-To: References: Message-ID: <45ADA695.4090204@pettichord.com> ?eljko Filipin wrote: > Is there a way to make file_field.set faster? > > I have noticed that this is the slowest part of my tests. It takes > about 10 seconds to set file field. I have read that it can not be set > directly because that would be security issue, but I wonder what I > could do to make it faster. I upload extremely small files (a few > bytes), but I have to do it frequently, and every time it takes about > 10 seconds just to set file field. > > Any help would be appreciated. I know this is an old thread, and you got some answers. I also know that this was broken in1.5 until recently, so you must have been referring to 1.4.1. Correct? I am curious whether the new implementation in 1.5 HEAD is ok. If it has performance problems, i would like to see reports/jira tickets. Bret From forum-watir-users at openqa.org Wed Jan 17 00:38:55 2007 From: forum-watir-users at openqa.org (sarita) Date: Tue, 16 Jan 2007 23:38:55 CST Subject: [Wtr-general] ignoring the SELECT option Message-ID: <51784524.1169012365483.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> In a combobox, first option is 'SELECT' for user convenience. Each time the test is run, a random option is selected from the combobox. For that I used the following code: variable = ie.select_list( :name,"ctl00$ContentPlaceHolder$ddlClientList").getAllContents ie.select_list(:name, "ctl00$ContentPlaceHolder1$ddlClientList").select(variable[rand(variable.length)]) Sometime SELECT option itself can be selected. Then the test fails. Want to ignore the SELECT option, please help. Regards, Sarita --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6141&messageID=17224#17224 From jared at kilmore.info Wed Jan 17 00:54:32 2007 From: jared at kilmore.info (Jared Quinert) Date: Wed, 17 Jan 2007 16:54:32 +1100 Subject: [Wtr-general] ignoring the SELECT option In-Reply-To: <51784524.1169012365483.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <51784524.1169012365483.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45ADBA18.2050903@kilmore.info> If you're happy for the first item never to be selected, then it should just be: # Pick randomly from the number of items in the list, without "SELECT". # Add 1 to ensure the first item (SELECT) is never selected. item_number_to_select=(rand(variable.length-1)) + 1 ie.select_list(:name, "ctl00$ContentPlaceHolder1$ddlClientList").select(variable[item_number_to_select]) Jared sarita wrote: > In a combobox, first option is 'SELECT' for user convenience. Each time the test is run, a random option is selected from the combobox. For that I used the following code: > variable = ie.select_list( :name,"ctl00$ContentPlaceHolder$ddlClientList").getAllContents > ie.select_list(:name, "ctl00$ContentPlaceHolder1$ddlClientList").select(variable[rand(variable.length)]) > > Sometime SELECT option itself can be selected. Then the test fails. Want to ignore the SELECT option, please help. > > Regards, > Sarita > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6141&messageID=17224#17224 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From forum-watir-users at openqa.org Wed Jan 17 02:35:44 2007 From: forum-watir-users at openqa.org (Maloy kanti debnath) Date: Wed, 17 Jan 2007 01:35:44 CST Subject: [Wtr-general] Encrypt password Message-ID: <41889939.1169019388303.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi All, I have been working on watir for the past one week .I just wanted to know how do i encrypt password in watir,please let me know asap.thanks for ur help regards maloy --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6142&messageID=17226#17226 From WKruse at multichoice.co.za Wed Jan 17 02:44:42 2007 From: WKruse at multichoice.co.za (Walter Kruse) Date: Wed, 17 Jan 2007 09:44:42 +0200 Subject: [Wtr-general] Encrypt password In-Reply-To: <41889939.1169019388303.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: It's not really encryption but rot13 will obfuscate text - only for the untrained eye. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Maloy kanti debnath Sent: 17 January 2007 09:36 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] Encrypt password Hi All, I have been working on watir for the past one week .I just wanted to know how do i encrypt password in watir,please let me know asap.thanks for ur help regards maloy --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6142&messageID=17226#17226 _______________________________________________ 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. ************************************************************************************************************************** From forum-watir-users at openqa.org Wed Jan 17 03:40:21 2007 From: forum-watir-users at openqa.org (gdx) Date: Wed, 17 Jan 2007 02:40:21 CST Subject: [Wtr-general] ignoring the SELECT option In-Reply-To: <51784524.1169012365483.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <37118386.1169023251426.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> hi, sorry for my english in a list from 0 to 10 if SELECT = 0 you've just to write this variable = ie.select_list( name,"ctl00$ContentPlaceHolder$ddlClientList").getAllContents varRand = variable[rand(variable.length )] varRand += 1 if varRand > 10 varRand = 10 end ie.select_list(:name, "ctl00$ContentPlaceHolder1$ddlClientList").select(varRand) The Rand will be not equal to 0. Disadvantage for this method : in a list from 0 to 10 you've : - 10 % to choose 1..9 - 20% to choose 10 i hope i help you --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6141&messageID=17227#17227 From forum-watir-users at openqa.org Wed Jan 17 04:35:41 2007 From: forum-watir-users at openqa.org (sarita) Date: Wed, 17 Jan 2007 03:35:41 CST Subject: [Wtr-general] ignoring the SELECT option In-Reply-To: <37118386.1169023251426.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <44985993.1169026571224.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> yes, it was of great help except some minor typing errors & also we can put variable.length in place of 10: > hi, > sorry for my english > > in a list from 0 to 10 > if SELECT = 0 you've just to write this > > variable = ie.select_list( > name,"ctl00$ContentPlaceHolder$ddlClientList").getAllC > ontents > varRand = variable[rand(variable.length )] varRand = rand(variable.length ) > varRand += 1 > if varRand > 10 > varRand = 10 > d > ie.select_list(:name, > "ctl00$ContentPlaceHolder1$ddlClientList").select(varR > and) ie.select_list(:name, "ctl00$ContentPlaceHolder1$ddlClientList").select(variable[varR and]) > > The Rand will be not equal to 0. > Disadvantage for this method : > in a list from 0 to 10 you've : > - 10 % to choose 1..9 > - 20% to choose 10 > > i hope i help you --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6141&messageID=17231#17231 From forum-watir-users at openqa.org Wed Jan 17 05:20:43 2007 From: forum-watir-users at openqa.org (sarita) Date: Wed, 17 Jan 2007 04:20:43 CST Subject: [Wtr-general] Handling verification codes (shown as img), used to prevent automation In-Reply-To: <43301212.1168953016052.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <61218566.1169029273394.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Plz mention the function for deleting that '#' character from the end of the string --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6130&messageID=17233#17233 From forum-watir-users at openqa.org Wed Jan 17 06:03:32 2007 From: forum-watir-users at openqa.org (gdx) Date: Wed, 17 Jan 2007 05:03:32 CST Subject: [Wtr-general] Handling verification codes (shown as img), used to prevent automation In-Reply-To: <61218566.1169029273394.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <59051386.1169031842760.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> hi, use the chop method : "1L4TR6B9#".chop #=> "1L4TR6B9" i hope i help you --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6130&messageID=17236#17236 From forum-watir-users at openqa.org Wed Jan 17 06:03:43 2007 From: forum-watir-users at openqa.org (sarita) Date: Wed, 17 Jan 2007 05:03:43 CST Subject: [Wtr-general] Handling verification codes (shown as img), used to prevent automation In-Reply-To: <61218566.1169029273394.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <58748563.1169031853019.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I got it: ReadTextField = ReadTextField.delete "#" --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6130&messageID=17237#17237 From zeljko.filipin at gmail.com Wed Jan 17 07:47:34 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Wed, 17 Jan 2007 13:47:34 +0100 Subject: [Wtr-general] Is there a way to make file_field.set faster? In-Reply-To: <45ADA695.4090204@pettichord.com> References: <45ADA695.4090204@pettichord.com> Message-ID: On 1/17/07, Bret Pettichord wrote: > > I also know that this was broken in 1.5 until recently, so you must have > been referring to 1.4.1. Correct? No. I was referring to development gem 1.5.1.1081, the last gem that I could make FileField#set to work. I am curious whether the new implementation in 1.5 HEAD is ok. > It works just fine with revision 1144. It takes only 2 seconds to set file field. Much better than 10 seconds when using development gem 1.5.1.1081. That 10 seconds are from my first report. I tried 1081 gem today and measured 13 seconds to set file field (tree tries). -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070117/5548ad22/attachment.html From angrez at gmail.com Wed Jan 17 08:15:18 2007 From: angrez at gmail.com (Angrez Singh) Date: Wed, 17 Jan 2007 18:45:18 +0530 Subject: [Wtr-general] FireWatir version 1.0.1 released Message-ID: Hi, We have released FireWatir version 1.0.1 For new features and future enhancements please go through release notes at http://code.google.com/p/firewatir/wiki/ReleaseNotes . Main features of this release are: 1. Main concern was speed. It has been improved significantly and now it's faster than Watir on IE. 2. You don't have to start the Firefox browser manually its started uisng a script. Currently it works only on windows. 3. Its platform independent as there is no platform specific component. It has been tested on Windows.Though not tested on Linux and Mac. 4. Tested on Firefox version 1.5, 1.5.0.4, 1.5.0.7 , 2.0 and 2.0.0.1 on Windows. 5. Can run script on a remote machine. Please get the code from http://code.google.com/p/firewatir and follow the installation guide document to use it. Any suggestions, comments and experiences (with FireWatir) are highly appreciated. Regards, Happy Testing using FireWatir!! FireWatir Team -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070117/a6e77e8d/attachment.html From forum-watir-users at openqa.org Wed Jan 17 10:03:15 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Wed, 17 Jan 2007 09:03:15 CST Subject: [Wtr-general] FireWatir version 1.0.1 released In-Reply-To: Message-ID: <59945812.1169046225773.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> great to hear! I'm going to give this a shot today. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6147&messageID=17246#17246 From Mark_Cain at RL.gov Wed Jan 17 10:29:23 2007 From: Mark_Cain at RL.gov (Cain, Mark) Date: Wed, 17 Jan 2007 07:29:23 -0800 Subject: [Wtr-general] ignoring the SELECT option In-Reply-To: <51784524.1169012365483.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <51784524.1169012365483.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <4440693B7CFF2440ABC2E0BE480DABA10A3696@EX01-2.rl.gov> Here is my $0.02. lbDocTypeID = [] lbDocTypeID = $ie.frame(:index, 4).select_list( :name, 'DocTypeID').getAllContents cnt = rand(lbDocTypeID.length) next if "#{lbDocTypeID}" == ("-- Select Doc Type --") $ie.frame(:index, 4).selectBox( :name, 'DocTypeID').select("#{lbDocTypeID[cnt]}") --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of sarita Sent: Tuesday, January 16, 2007 9:39 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] ignoring the SELECT option In a combobox, first option is 'SELECT' for user convenience. Each time the test is run, a random option is selected from the combobox. For that I used the following code: variable = ie.select_list( :name,"ctl00$ContentPlaceHolder$ddlClientList").getAllContents ie.select_list(:name, "ctl00$ContentPlaceHolder1$ddlClientList").select(variable[rand(variable .length)]) Sometime SELECT option itself can be selected. Then the test fails. Want to ignore the SELECT option, please help. Regards, Sarita --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6141&messageID=17224#17224 _______________________________________________ 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/20070117/2a89a3fd/attachment-0001.html From forum-watir-users at openqa.org Wed Jan 17 10:35:00 2007 From: forum-watir-users at openqa.org (gdx) Date: Wed, 17 Jan 2007 09:35:00 CST Subject: [Wtr-general] Two queries in Watir In-Reply-To: <47060817.1168941509351.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <38033502.1169048130125.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> hi, 1) require 'watir' # the watir controller include Watir test_site = 'http://www.rediff.com/' ie1 = IE.new ie1.goto(test_site) ie1.text_field(:name, "login").set("toto") ie1.text_field(:name, "passwd").set("tata") ie1.image(:src,'http://im.rediff.com/uim/news/SignUp-btn.gif').click --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6068&messageID=17247#17247 From christopher.mcmahon at gmail.com Wed Jan 17 11:06:31 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 17 Jan 2007 08:06:31 -0800 Subject: [Wtr-general] Encrypt password In-Reply-To: <41889939.1169019388303.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <41889939.1169019388303.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70701170806x3b652667ra1cb10018ff57325@mail.gmail.com> On 1/16/07, Maloy kanti debnath wrote: > > Hi All, > I have been working on watir for the past one week .I just > wanted to know how do i encrypt password in watir,please let me know > asap.thanks for ur help How do you want to encrypt it, and why must it be encrypted? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070117/9fd8ba3e/attachment.html From forum-watir-users at openqa.org Wed Jan 17 12:21:02 2007 From: forum-watir-users at openqa.org (Bach Le) Date: Wed, 17 Jan 2007 11:21:02 CST Subject: [Wtr-general] Speed of Firewatir vs. Watir In-Reply-To: Message-ID: <59043388.1169054499177.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi Angrez, I just installed the latest gem, 1.0.1. I ran the same test again the script errors at this line: $FF.button(:src, 'http://www.anntaylor.com/Images/Global/placeitemsinbag.gif').click I get the following error: 1) Error: test_1(TestCase): FireWatir::Exception::UnknownObjectException: Unable to locate object, using src and http://www.anntaylor.com/Images/Global/placeitemsinbag.gif C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/./MozillaBaseElement.rb:739:in `assert_exists' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/./MozillaBaseElement.rb:897:in `click' FireWatir_AnnTaylor.rb:18:in `test_1' --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6078&messageID=17256#17256 From bret at pettichord.com Wed Jan 17 22:00:00 2007 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 17 Jan 2007 21:00:00 -0600 Subject: [Wtr-general] Is there a way to make file_field.set faster? In-Reply-To: References: <45ADA695.4090204@pettichord.com> Message-ID: <45AEE2B0.6000707@pettichord.com> ?eljko Filipin wrote: > It works just fine with revision 1144. It takes only 2 seconds to set > file field. Much better than 10 seconds when using development gem > 1.5.1.1081. That 10 seconds are from my first report. I tried 1081 gem > today and measured 13 seconds to set file field (tree tries). Thanks for the report. The method was completely rewritten shortly after 1081, which broke it, but when i recently repaired it (with a one-word fix), it seems that the new code is in fact significantly better. Good to hear. Thanks to Charley for the new method. Bret From paul.rogers at shaw.ca Wed Jan 17 23:17:40 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 17 Jan 2007 21:17:40 -0700 Subject: [Wtr-general] FireWatir version 1.0.1 released References: Message-ID: <002901c73ab7$980fffc0$6400a8c0@laptop> Great job with FireWatir! I get these 2 errors, using ruby 1.8.4 (2005-12-24) on FireFox 1.5.0.9 1) Error: test_simply_attach_to_new_window_using_title(TC_NewWindow): FireWatir::Exception::NoMatchingWindowFoundException: Unable to locate window, using title and Pass Page C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests/../firewatir.rb:427:in `find_window' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests/../firewatir.rb:364:in `attach' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests/../unittests/attach_to_new_window_test.rb:16:in `test_simply_attach_to_new_window_using_title' 2) Error: test_simply_attach_to_new_window_using_url(TC_NewWindow): FireWatir::Exception::NoMatchingWindowFoundException: Unable to locate window, using url and (?-mix:pass\.html) C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests/../firewatir.rb:427:in `find_window' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests/../firewatir.rb:364:in `attach' C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests/../unittests/attach_to_new_window_test.rb:24:in `test_simply_attach_to_new_window_using_url' I may have some setting to prevent popups - I'll try and find out Paul ----- Original Message ----- From: Angrez Singh To: wtr-general at rubyforge.org ; firewatir at googlegroups.com Sent: Wednesday, January 17, 2007 6:15 AM Subject: [Wtr-general] FireWatir version 1.0.1 released Hi, We have released FireWatir version 1.0.1 For new features and future enhancements please go through release notes at http://code.google.com/p/firewatir/wiki/ReleaseNotes . Main features of this release are: 1. Main concern was speed. It has been improved significantly and now it's faster than Watir on IE. 2. You don't have to start the Firefox browser manually its started uisng a script. Currently it works only on windows. 3. Its platform independent as there is no platform specific component. It has been tested on Windows.Though not tested on Linux and Mac. 4. Tested on Firefox version 1.5, 1.5.0.4, 1.5.0.7 , 2.0 and 2.0.0.1 on Windows. 5. Can run script on a remote machine. Please get the code from http://code.google.com/p/firewatir and follow the installation guide document to use it. Any suggestions, comments and experiences (with FireWatir) are highly appreciated. Regards, Happy Testing using FireWatir!! FireWatir Team ------------------------------------------------------------------------------ _______________________________________________ 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/20070117/65f0635c/attachment.html From forum-watir-users at openqa.org Wed Jan 17 23:20:58 2007 From: forum-watir-users at openqa.org (Maloy kanti debnath) Date: Wed, 17 Jan 2007 22:20:58 CST Subject: [Wtr-general] Encrypt password In-Reply-To: <72799cd70701170806x3b652667ra1cb10018ff57325@mail.gmail.com> Message-ID: <39759187.1169094088554.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> hi, I need to encrypt it because i don't want to hardcode the password in the script so as to make it a bit secure from data theft .. this option is there in all the other tool such as Winrunner,QTP,TP .. maloy --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6142&messageID=17267#17267 From christopher.mcmahon at gmail.com Wed Jan 17 23:41:24 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 17 Jan 2007 21:41:24 -0700 Subject: [Wtr-general] Encrypt password In-Reply-To: <39759187.1169094088554.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <72799cd70701170806x3b652667ra1cb10018ff57325@mail.gmail.com> <39759187.1169094088554.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70701172041s12eec084j560c56a3af6e7afb@mail.gmail.com> On 1/17/07, Maloy kanti debnath wrote: > > hi, > I need to encrypt it because i don't want to hardcode the password in > the script so as to make it a bit secure from data theft .. this option is > there in all the other tool such as Winrunner,QTP,TP .. OK. How do those other tools do encryption and decription? I've never used them. Sorry, I'm not trying to be difficult, but in my experience, it's rare that data theft is an issue in a test environment. You could take Mr. Kruse's suggestion and rot13 it, which can be decoded easily, or you could use a Basic Authentication scheme which is "user:password" encoded in base64, and a little bit harder to decode (although wireshark/ethereal decrypts it for you on the fly), or you can use any other encryption scheme you'd like. I'll suggest that it is unlikely that any kind of password encryption will ever be built into Watir directly, but there are any number of encryption schemes available in Ruby. Google for "ruby encryption" to get an idea of what's available. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070117/dfe2272a/attachment.html From angrez at gmail.com Thu Jan 18 01:37:56 2007 From: angrez at gmail.com (Angrez Singh) Date: Thu, 18 Jan 2007 12:07:56 +0530 Subject: [Wtr-general] FireWatir version 1.0.1 released In-Reply-To: <002901c73ab7$980fffc0$6400a8c0@laptop> References: <002901c73ab7$980fffc0$6400a8c0@laptop> Message-ID: Hi Paul, These errors are because either Firefox is opening new link in a new tab. or blocking up the pop up. Run the unit test alone and allow the pop ups. I think this should resolve the error. Regards, Angrez On 1/18/07, Paul Rogers wrote: > > Great job with FireWatir! > > I get these 2 errors, using ruby 1.8.4 (2005-12-24) on FireFox 1.5.0.9 > > > 1) Error: > test_simply_attach_to_new_window_using_title(TC_NewWindow): > FireWatir::Exception::NoMatchingWindowFoundException: Unable to locate > window, using title and Pass Page > C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests/../firewatir.rb:427:in > `find_window' > C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests/../firewatir.rb:364:in > `attach' > C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests/../unittests/attach_to_new_window_test.rb:16:in > `test_simply_attach_to_new_window_using_title' > > 2) Error: > test_simply_attach_to_new_window_using_url(TC_NewWindow): > FireWatir::Exception::NoMatchingWindowFoundException: Unable to locate > window, using url and (?-mix:pass\.html) > C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests/../firewatir.rb:427:in > `find_window' > C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests/../firewatir.rb:364:in > `attach' > C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/unittests/../unittests/attach_to_new_window_test.rb:24:in > `test_simply_attach_to_new_window_using_url' > I may have some setting to prevent popups - I'll try and find out > > > Paul > > > > ----- Original Message ----- > *From:* Angrez Singh > *To:* wtr-general at rubyforge.org ; firewatir at googlegroups.com > *Sent:* Wednesday, January 17, 2007 6:15 AM > *Subject:* [Wtr-general] FireWatir version 1.0.1 released > > > > Hi, > > > > We have released FireWatir version 1.0.1 > > > > For new features and future enhancements please go through release > notes at http://code.google.com/p/firewatir/wiki/ReleaseNotes . > > > > Main features of this release are: > > > > 1. Main concern was speed. It has been improved significantly and now it's > faster than Watir on IE. > > 2. You don't have to start the Firefox browser manually its > started uisng a script. Currently it works only on windows. > > 3. Its platform independent as there is no platform specific component. It > has been tested on Windows.Though not tested on Linux and Mac. > > 4. Tested on Firefox version 1.5, 1.5.0.4, 1.5.0.7 , 2.0 and 2.0.0.1 on > Windows. > > 5. Can run script on a remote machine. > > > > Please get the code from http://code.google.com/p/firewatir and follow > the installation guide document to use it. > > > > Any suggestions, comments and experiences (with FireWatir) are highly > appreciated. > > > > Regards, > > > > Happy Testing using FireWatir!! > > FireWatir Team > > ------------------------------ > > _______________________________________________ > 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/20070118/8a3c8bb5/attachment-0001.html From angrez at gmail.com Thu Jan 18 01:53:12 2007 From: angrez at gmail.com (Angrez Singh) Date: Thu, 18 Jan 2007 12:23:12 +0530 Subject: [Wtr-general] Speed of Firewatir vs. Watir In-Reply-To: <59043388.1169054499177.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <59043388.1169054499177.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Hi Bach, FireWatir works on what's there on the browser. I tried you script here also. So on the browser image source is just "/Images/Global/placeitemsinbag.gif". Just try this. $FF.button(:src, '/Images/Global/placeitemsinbag.gif').click It should work. Regards, Angrez On 1/17/07, Bach Le wrote: > > Hi Angrez, > I just installed the latest gem, 1.0.1. I ran the same test again the > script errors at this line: > > $FF.button(:src, ' > http://www.anntaylor.com/Images/Global/placeitemsinbag.gif').click > > I get the following error: > > 1) Error: > test_1(TestCase): > FireWatir::Exception::UnknownObjectException: Unable to locate object, > using src and http://www.anntaylor.com/Images/Global/placeitemsinbag.gif > C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/./MozillaBaseElement.rb:739:in > `assert_exists' > C:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.1-mswin32/./MozillaBaseElement.rb:897:in > `click' > FireWatir_AnnTaylor.rb:18:in `test_1' > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6078&messageID=17256#17256 > _______________________________________________ > 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/20070118/d57322f3/attachment.html From forum-watir-users at openqa.org Thu Jan 18 02:24:04 2007 From: forum-watir-users at openqa.org (Maloy kanti debnath) Date: Thu, 18 Jan 2007 01:24:04 CST Subject: [Wtr-general] how to catpure image Message-ID: <53337727.1169105074299.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> hi, I have a problem saving image or getting image from a web site can any one please help me i tried a) image(:alt,'name').save(path) b) image(:alt,'name').getImage( how, what ) which is in Watir::SupportsSubElements module or if i am wrong please give me the exect syntax for doing so thank you maloy --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6155&messageID=17275#17275 From forum-watir-users at openqa.org Thu Jan 18 02:52:17 2007 From: forum-watir-users at openqa.org (gdx) Date: Thu, 18 Jan 2007 01:52:17 CST Subject: [Wtr-general] how to catpure image In-Reply-To: <53337727.1169105074299.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <35832400.1169106767218.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, the method save run corretly for me : test_site = 'http://site/' ie1 = IE.new ie1.goto(test_site) ie1.image(:src,'http://site/images/logo.gif').save("c:\\logo.gif") Here the 'save As' window is opened. I hope I help you --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6155&messageID=17276#17276 From forum-watir-users at openqa.org Thu Jan 18 03:51:13 2007 From: forum-watir-users at openqa.org (Maloy kanti debnath) Date: Thu, 18 Jan 2007 02:51:13 CST Subject: [Wtr-general] how to catpure image In-Reply-To: <35832400.1169106767218.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <62907691.1169110303674.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> hi, i tried this but this is the perticular error i got c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1136/./watir/windowhelper.rb:42:in `check_autoit_installed': The AutoIt dll must be correctly registered for this feature to work properly (Watir::Exception::WatirException) is there any extra require or include statement that i have to write thank you maloy --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6155&messageID=17280#17280 From forum-watir-users at openqa.org Thu Jan 18 04:04:36 2007 From: forum-watir-users at openqa.org (gdx) Date: Thu, 18 Jan 2007 03:04:36 CST Subject: [Wtr-general] how to catpure image In-Reply-To: <62907691.1169110303674.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <64373840.1169111106212.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, I hope the answer to your problem is here : http://forums.openqa.org/thread.jspa?messageID=16572䂼 --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6155&messageID=17283#17283 From zeljko.filipin at gmail.com Thu Jan 18 09:08:47 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Thu, 18 Jan 2007 15:08:47 +0100 Subject: [Wtr-general] how to catpure image In-Reply-To: <62907691.1169110303674.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <35832400.1169106767218.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <62907691.1169110303674.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: On 1/18/07, Maloy kanti debnath wrote: > > The AutoIt dll must be correctly registered for this feature to work > properly AutoIt is not correctly registered at your machine. It happens to me every time I install watir. Open a command line, go to folder where AutoItX3.dll is located. If you installed Ruby to C:\ruby\ and your gem name is watir-1.5.1.1141 it should be C:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.1.1141\watir\. Type this. regsvr32 AutoItX3.dll Pop up will appear with message that registration was successful. If message says that registration was not successful, you are not logged in as administrator. Log out (or switch user) and log in as administrator. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070118/85d092bf/attachment.html From Jason.He at resilience.com Thu Jan 18 04:47:54 2007 From: Jason.He at resilience.com (Jason He) Date: Thu, 18 Jan 2007 01:47:54 -0800 Subject: [Wtr-general] How to run test cases in sequence rather than at the same time? Message-ID: Dear all, I followed the test suite under directory "c:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.1.1136\unittests" to write test cases. Each case is a separate ruby file, and they are included in a list file. Now I meet a problem about how to control the test cases run in a predefined sequence, which means one by one, the later must wait after the former is finished. I tried to use the following method, but it seems does work, these cases will run almost concurrently. ------------------------------------------------------------------------ ------ TOPDIR = File.join(File.dirname(__FILE__), '..') $LOAD_PATH.unshift TOPDIR Dir.chdir TOPDIR $case_list = ["unittests/login_type1_case1_rt.rb", "unittests/logout_type1_case1_rt.rb" ] $case_list.each {|x| require x} ------------------------------------------------------------------------ ------ Could somebody give some idea to handle this situation, thanks very much Regards, Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070118/46546dc5/attachment.html From zeljko.filipin at gmail.com Thu Jan 18 10:28:25 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Thu, 18 Jan 2007 16:28:25 +0100 Subject: [Wtr-general] How to run test cases in sequence rather than at the same time? In-Reply-To: References: Message-ID: Let's simplify a bit. I will put a list of files in array. irb(main):017:0> list = ["first.rb", "second.rb", "third.rb"] => ["first.rb", "second.rb", "third.rb"] I want them printed in the order they are in array (first.rb, second.rb, third.rb) irb(main):018:0> list.each { |x| puts x } first.rb second.rb third.rb => ["first.rb", "second.rb", "third.rb"] If you want to run them in that order, just replace "puts" with "require" list.each { |x| require x } -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070118/13071cc9/attachment.html From zeljko.filipin at gmail.com Thu Jan 18 10:29:27 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Thu, 18 Jan 2007 16:29:27 +0100 Subject: [Wtr-general] How to run test cases in sequence rather than at the same time? In-Reply-To: References: Message-ID: On 1/18/07, Jason He wrote: > > I tried to use the following method, but it seems does work, these cases > will run almost concurrently. > What do you mean by "almost concurrently"? -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070118/5b071093/attachment-0001.html From forum-watir-users at openqa.org Thu Jan 18 09:06:02 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Thu, 18 Jan 2007 08:06:02 CST Subject: [Wtr-general] Watir with Ajax Message-ID: <49382820.1169129192214.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi all, I am using watir for my application. Its very interesting.. I am using lot of ajax for my application. When i click a link an ajax form opens, till here i am able to work with watir, but i can't enter value in the ajax form. Its giving me the error Unable to locate the object. But iam giving the correct object. I am having the problem only with ajax. Please help me regarding this. Thanking you, Harish --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6170&messageID=17305#17305 From forum-watir-users at openqa.org Thu Jan 18 11:03:57 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Thu, 18 Jan 2007 10:03:57 CST Subject: [Wtr-general] how to use the commands present in the 'SimpIe' class? In-Reply-To: <65601151.1169123282257.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <51740529.1169136268196.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> not sure on your exact question but would ie.link(:text,'Images').click work? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6165&messageID=17314#17314 From forum-watir-users at openqa.org Thu Jan 18 11:05:20 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Thu, 18 Jan 2007 10:05:20 CST Subject: [Wtr-general] Watir with Ajax In-Reply-To: <49382820.1169129192214.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <47285895.1169136350032.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> It may help if you include a snip of your code and html. I haven't had any problems using any 'ajax' items. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6170&messageID=17315#17315 From forum-watir-users at openqa.org Thu Jan 18 07:27:31 2007 From: forum-watir-users at openqa.org (Maloy kanti debnath) Date: Thu, 18 Jan 2007 06:27:31 CST Subject: [Wtr-general] how to use the commands present in the 'SimpIe' class? Message-ID: <65601151.1169123282257.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hello people, I do not know how to use the commands like click_link_with_url, click_link_with_text etc., which are listed under the class 'Simple' in the 'rdoc' documentation of Watir (http://wtr.rubyforge.org/rdoc/index.html). When I tried to use the command 'click_link_with_text' , Watir tells "undefined method `click_link_with_text' for # Message-ID: <61184150.1169142335151.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi Angrez, Thanks for clarifying that. Although it does work on watir, do you have any idea why it doesn't work on FireWatir? Seems to be that would be nice to have both the relative path and the absolute path for the element src. If you'd like, i'd be happy to take a look at the code and perhaps come up with a solution. Thanks for your hard work. -Bach --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6078&messageID=17320#17320 From forum-watir-users at openqa.org Thu Jan 18 14:22:23 2007 From: forum-watir-users at openqa.org (minal) Date: Thu, 18 Jan 2007 13:22:23 CST Subject: [Wtr-general] How to click on image associated with link Message-ID: <46057765.1169148236421.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, I am new to ruby/watir. Please see HTML code snippet below. I want to click on image with title "Delete survey, responses, emails" of table cell with id = 10TD37. How do I do that. Thanks Code snippet: 2544 ?08/22/2003 07/26/2006 9 (8) 8 2420 ?07/15/2003 01/10/2007 629 (627) 362

?

--------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6176&messageID=17322#17322 From Jason.He at resilience.com Thu Jan 18 20:57:38 2007 From: Jason.He at resilience.com (Jason He) Date: Thu, 18 Jan 2007 17:57:38 -0800 Subject: [Wtr-general] How to run test cases in sequence rather than at the same time? In-Reply-To: Message-ID: I mean those later test cases in the list will run immediately, without waiting the former ones to finish. And the interval between them is so shorter that it looks like those cases run at the same time Regards, Jason ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of ?eljko Filipin Sent: 2007?1?18? 23:29 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How to run test cases in sequence rather than atthe same time? On 1/18/07, Jason He wrote: I tried to use the following method, but it seems does work, these cases will run almost concurrently. What do you mean by "almost concurrently "? -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070118/726fec9c/attachment.html From carl.l.shaulis at convergys.com Thu Jan 18 16:36:14 2007 From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com) Date: Thu, 18 Jan 2007 15:36:14 -0600 Subject: [Wtr-general] How to click on image associated with link In-Reply-To: <46057765.1169148236421.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: I typically use a syntax similar to this: @ie.image(:src , /ps_header_module_solution_builder_iconUp.gif/).click Good luck, Carl Carl L. Shaulis Convergys - Senior Analyst 512-634-0607 From bret at pettichord.com Thu Jan 18 21:50:38 2007 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 18 Jan 2007 20:50:38 -0600 Subject: [Wtr-general] How to run test cases in sequence rather than at the same time? In-Reply-To: References: Message-ID: <45B031FE.1040609@pettichord.com> Jason He wrote: > > I followed the test suite under directory > ?c:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.1.1136\unittests? to write > test cases. > > Each case is a separate ruby file, and they are included in a list file. > > Now I meet a problem about how to control the test cases run in a > predefined sequence, which means one by one, the later must wait after > the former is finished. > What do your test cases look like? Are they subclasses of Test::Unit::Testcase? Or are they open scripts? Bret From bret at pettichord.com Thu Jan 18 22:02:21 2007 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 18 Jan 2007 21:02:21 -0600 Subject: [Wtr-general] how to catpure image In-Reply-To: <62907691.1169110303674.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <62907691.1169110303674.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45B034BD.3090507@pettichord.com> Maloy kanti debnath wrote: > c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1136/./watir/windowhelper.rb:42:in `check_autoit_installed': The AutoIt dll must be correctly registered for this feature to work properly (Watir::Exception::WatirException) > This problem is fixed in commit 1142 and will be included in the next development gem to be released. The other recommendations about workarounds are also valid in the mean time. Bret From Jason.He at resilience.com Thu Jan 18 22:21:17 2007 From: Jason.He at resilience.com (Jason He) Date: Thu, 18 Jan 2007 19:21:17 -0800 Subject: [Wtr-general] How to run test cases in sequence rather than at the same time? In-Reply-To: <45B031FE.1040609@pettichord.com> Message-ID: Yes, they are the subclass of Test::Unit::Testcase, each one will be a standalone script, and combined by a list script who will start the test. Regards, Jason -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 2007?1?19? 10:51 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How to run test cases in sequence rather than at the same time? Jason He wrote: > > I followed the test suite under directory > ?c:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.1.1136\unittests? to write > test cases. > > Each case is a separate ruby file, and they are included in a list file. > > Now I meet a problem about how to control the test cases run in a > predefined sequence, which means one by one, the later must wait after > the former is finished. > What do your test cases look like? Are they subclasses of Test::Unit::Testcase? Or are they open scripts? Bret _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Jason.He at resilience.com Thu Jan 18 22:21:17 2007 From: Jason.He at resilience.com (Jason He) Date: Thu, 18 Jan 2007 19:21:17 -0800 Subject: [Wtr-general] How to run test cases in sequence rather than at the same time? In-Reply-To: <45B031FE.1040609@pettichord.com> Message-ID: Yes, they are the subclass of Test::Unit::Testcase, each one will be a standalone script, and combined by a list script who will start the test. Regards, Jason -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 2007?1?19? 10:51 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How to run test cases in sequence rather than at the same time? Jason He wrote: > > I followed the test suite under directory > ?c:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.1.1136\unittests? to write > test cases. > > Each case is a separate ruby file, and they are included in a list file. > > Now I meet a problem about how to control the test cases run in a > predefined sequence, which means one by one, the later must wait after > the former is finished. > What do your test cases look like? Are they subclasses of Test::Unit::Testcase? Or are they open scripts? Bret _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Thu Jan 18 23:24:21 2007 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 18 Jan 2007 22:24:21 -0600 Subject: [Wtr-general] How to run test cases in sequence rather than at the same time? In-Reply-To: References: Message-ID: <45B047F5.808@pettichord.com> Jason He wrote: > Yes, they are the subclass of Test::Unit::Testcase, each one will be a standalone script, and combined by a list script who will start the test. > OK. Test-unit does not execute test cases when they are loaded (e.g. with require). Rather, after all the test cases are loaded, test-unit will automatically build (and then run) a suite that consists of all subclasses of Test::Unit::Testcase. It doesn't matter what order they were loaded! That's how it works. If you don't like that behaviour, you will need to look at the rdoc for test-unit and build your own test-suite instead. I know, an example would be handy, but ... maybe some one else can help. Bret From forum-watir-users at openqa.org Thu Jan 18 23:57:02 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Thu, 18 Jan 2007 22:57:02 CST Subject: [Wtr-general] Watir with Ajax In-Reply-To: <47285895.1169136350032.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <43279482.1169182652357.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> HI, I used this code :: ie.link(:text,"add to my contracts").click ie.text_field(:name, "contract_my_document[title]").set("harish") where add to my contracts is the link, in which if we click on that link i'll be getting an ajax form. In that "Title" is the text_field. the name of that title is contract_my_document[title]. SO i gave ie.text_field(:name, "contract_my_document[title]").set("harish") then its giving element "contract_my_document[title]" not found. So please help me regarding this. Thanks in Advance, Harish --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6170&messageID=17338#17338 From bret at pettichord.com Fri Jan 19 00:29:34 2007 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 18 Jan 2007 23:29:34 -0600 Subject: [Wtr-general] Watir with Ajax In-Reply-To: <43279482.1169182652357.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <43279482.1169182652357.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45B0573E.40301@pettichord.com> Naga Harish Kanegolla wrote: > ie.text_field(:name, "contract_my_document[title]").set("harish") > > where add to my contracts is the link, in which if we click on that link i'll be getting an ajax form. In that "Title" is the text_field. the name of that title is contract_my_document[title]. SO i gave ie.text_field(:name, "contract_my_document[title]").set("harish") then its giving element "contract_my_document[title]" not found. So please help me regarding this. > Can you please show us the html for the textfield? Bret From angrez at gmail.com Fri Jan 19 00:33:11 2007 From: angrez at gmail.com (Angrez Singh) Date: Fri, 19 Jan 2007 11:03:11 +0530 Subject: [Wtr-general] Speed of Firewatir vs. Watir In-Reply-To: <61184150.1169142335151.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <61184150.1169142335151.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Hi Bach, The method for finding the element initially worked for Absolute path but while implementing it for forms i got into trouble. So its like this: Whatever HTML you see in Firefox browser will be used for identifying the element. In case you want it to work both with WATiR and FireWatir you can use regular expression like this: ff.image(:src, /\/Images\/Global\/placeitemsinbag.gif/).click - Angrez On 1/18/07, Bach Le wrote: > > Hi Angrez, > Thanks for clarifying that. Although it does work on watir, do you have > any idea why it doesn't work on FireWatir? Seems to be that would be nice to > have both the relative path and the absolute path for the element src. If > you'd like, i'd be happy to take a look at the code and perhaps come up with > a solution. Thanks for your hard work. > > > -Bach > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6078&messageID=17320#17320 > _______________________________________________ > 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/20070119/ecffeb79/attachment.html From forum-watir-users at openqa.org Fri Jan 19 02:54:12 2007 From: forum-watir-users at openqa.org (Maloy kanti debnath) Date: Fri, 19 Jan 2007 01:54:12 CST Subject: [Wtr-general] how to use the commands present in the 'SimpIe' class? In-Reply-To: <51740529.1169136268196.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <36196813.1169193282082.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Today morning, when I was going through the 'built-in' scripts, like watir.rb, watir_simple.rb etc. just to have a look at the source code, I happened to note that we can modify the source code of various functions to suit our need and also how to use the functions present in the 'Simple' class. Given below is a very simple script that uses three functions of the 'Simple' class (The 'Simple' class, it seems, was developed with an intention of reducing the complexity involved in coding, by making the commands look like normal, day-to-day 'English' statements like 'Enter so and so text in so and so field', 'check whether so and so image is present on the screen' etc., rather than like commands of a 'programming language'): require 'watir' include Watir require 'watir/watir_simple' include Simple new_browser_at('www.google.com') # will open a new browser and will go to 'www.google.com' enter_text_into_field_with_name('q', 'Software Testing') # will enter the text 'Software Testing' in the 'search' text field click_button_with_name('btnG') # will click the 'Google Search' button Hope, I have not wasted anybody's time. Thanks, Maloy. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6165&messageID=17346#17346 From forum-watir-users at openqa.org Fri Jan 19 05:31:19 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Fri, 19 Jan 2007 04:31:19 CST Subject: [Wtr-general] Watir with Ajax In-Reply-To: <45B0573E.40301@pettichord.com> Message-ID: <44885494.1169202709884.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi This is the html for that text field.. Please tell me the wrong one i am doing.. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6170&messageID=17351#17351 From forum-watir-users at openqa.org Fri Jan 19 05:47:35 2007 From: forum-watir-users at openqa.org (Maloy kanti debnath) Date: Fri, 19 Jan 2007 04:47:35 CST Subject: [Wtr-general] Two queries in Watir In-Reply-To: <38033502.1169048130125.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <49848405.1169203685447.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hello Ogre, Thank you for your correct answer. If you also tell us whether there is a default 'log' in Watir and if so, how to write to it and where to view it?, I would be thankful. Thanks, Maloy. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6068&messageID=17353#17353 From zeljko.filipin at gmail.com Fri Jan 19 05:56:40 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Fri, 19 Jan 2007 11:56:40 +0100 Subject: [Wtr-general] Watir with Ajax In-Reply-To: <44885494.1169202709884.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <45B0573E.40301@pettichord.com> <44885494.1169202709884.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: On 1/19/07, Naga Harish Kanegolla wrote: > > type="text" /> > Both of this worked for me. ie.text_field(:name, "app_feedback[title]").set("harish") ie.text_field(:id, "app_feedback_title").set("harish") You said to watir that name is contract_my_document[title], but it is app_feedback[title]. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070119/3b3667b7/attachment.html From forum-watir-users at openqa.org Fri Jan 19 06:05:21 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Fri, 19 Jan 2007 05:05:21 CST Subject: [Wtr-general] Watir with Ajax In-Reply-To: Message-ID: <43408418.1169204751606.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Sorry I gave the wrong html in the forum. This is my correct one. Please check this, Thank u.. Harish --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6170&messageID=17356#17356 From forum-watir-users at openqa.org Fri Jan 19 06:30:25 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Fri, 19 Jan 2007 05:30:25 CST Subject: [Wtr-general] same text for different urls. Message-ID: <65973753.1169206255804.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi all, How to click on the links based up on the href rather than the text? Ex:: I am having the same text with different ids. i.e., we are having 30 "add a term" links..For different links having different href (url). so how could i code using selenium for this kind of hrefs. Please help me regarding this.. Thanks in Advance, Harish --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6181&messageID=17363#17363 From forum-watir-users at openqa.org Fri Jan 19 06:33:34 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Fri, 19 Jan 2007 05:33:34 CST Subject: [Wtr-general] same text fordifferent urls.. Message-ID: <52103733.1169206444399.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi all, How to click on the links based up on the href rather than the text? Ex:: I am having the same text with different ids. i.e., we are having 30 "add a term" links..For different links having different href (url). so how could i code using watir for this kind of hrefs. Please help me regarding this.. Thanks in Advance, Harish --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6183&messageID=17365#17365 From zeljko.filipin at gmail.com Fri Jan 19 07:01:48 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Fri, 19 Jan 2007 13:01:48 +0100 Subject: [Wtr-general] Watir with Ajax In-Reply-To: <43408418.1169204751606.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <43408418.1169204751606.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: On 1/19/07, Naga Harish Kanegolla wrote: > > size="30" type="text" /> > Your code ie.text_field(:name, "contract_my_document[title]").set("harish") works for me for this html. Maybe it's parent tag is hidden or something. Post some more html that surrounds it and your exact error message, and somebody might have a clue. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070119/ea41ffd2/attachment.html From zeljko.filipin at gmail.com Fri Jan 19 07:04:18 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Fri, 19 Jan 2007 13:04:18 +0100 Subject: [Wtr-general] same text for different urls. In-Reply-To: <65973753.1169206255804.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <65973753.1169206255804.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: On 1/19/07, Naga Harish Kanegolla wrote: > > so how could i code using selenium > This is watir list. There is selenium forum at http://forums.openqa.org/forum.jspa?forumID=3 -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070119/1533ea47/attachment.html From forum-watir-users at openqa.org Fri Jan 19 07:05:47 2007 From: forum-watir-users at openqa.org (Maloy kanti debnath) Date: Fri, 19 Jan 2007 06:05:47 CST Subject: [Wtr-general] hi doubts in WindowHelper class Message-ID: <58905979.1169208377456.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> hi, While i was going through the windowhelper class i found a Public Instance method called "logon" but i am not able to use it can any one help me out .. thank you, maloy --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6185&messageID=17368#17368 From forum-watir-users at openqa.org Fri Jan 19 07:17:13 2007 From: forum-watir-users at openqa.org (sarita) Date: Fri, 19 Jan 2007 06:17:13 CST Subject: [Wtr-general] Ruby equivalent of 'Continue' in C Message-ID: <45445371.1169209063580.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I want to execute a test on a table where links are to be clicked based upon its status. Only when status not 'Complete', it's to be clicked & further actions to be performed. Otherwise those steps to be skipped. So, thinking of Ruby equivalent of 'Continue' in C. Please help. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6187&messageID=17373#17373 From forum-watir-users at openqa.org Fri Jan 19 07:17:17 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Fri, 19 Jan 2007 06:17:17 CST Subject: [Wtr-general] same text for different urls. In-Reply-To: Message-ID: <46758829.1169209067447.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hey sorry, I want in watir.. sorry for the mistake.. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6181&messageID=17374#17374 From zeljko.filipin at gmail.com Fri Jan 19 07:25:19 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Fri, 19 Jan 2007 13:25:19 +0100 Subject: [Wtr-general] same text for different urls. In-Reply-To: <46758829.1169209067447.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <46758829.1169209067447.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: On 1/19/07, Naga Harish Kanegolla wrote: > > Hey sorry, I want in watir.. sorry for the mistake.. After I replied I noticed that you have already corrected yourself in another thread. :) -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070119/48864fe3/attachment.html From forum-watir-users at openqa.org Fri Jan 19 07:25:01 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Fri, 19 Jan 2007 06:25:01 CST Subject: [Wtr-general] Watir with Ajax In-Reply-To: Message-ID: <52527314.1169209531455.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> HI, But its not working for me. Basically its working for all the text_fields. But not working for this, I hope its becoz the form is rendering dynamically thru ajax call. This is the error.. Error:: c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1939:in `assert_exists': Unable to locate object, using name and contract_my_document[title] (Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3393:in `set' --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6170&messageID=17375#17375 From forum-watir-users at openqa.org Fri Jan 19 07:51:21 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Fri, 19 Jan 2007 06:51:21 CST Subject: [Wtr-general] same text for different urls. In-Reply-To: Message-ID: <38294075.1169211111571.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thats ok, Any idea regarding that?? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6181&messageID=17381#17381 From zeljko.filipin at gmail.com Fri Jan 19 08:31:31 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Fri, 19 Jan 2007 14:31:31 +0100 Subject: [Wtr-general] same text for different urls. In-Reply-To: <38294075.1169211111571.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <38294075.1169211111571.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: If you have html like this text text you can click link with href="b" with any of this ie.link(:href, /b/).click ie.link(:url, /b/).click -- Zeljko Filipin zeljkofilipin.com Testing is not only what I do for a living. It is also what I do for fun. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070119/10879a08/attachment.html From tester.paul at gmail.com Fri Jan 19 09:31:33 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Fri, 19 Jan 2007 09:31:33 -0500 Subject: [Wtr-general] Ruby equivalent of 'Continue' in C In-Reply-To: <45445371.1169209063580.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <45445371.1169209063580.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <37c405480701190631m1d0e9469k433251cf1b3e718b@mail.gmail.com> For those of us who don't know how to program in C, can you please explain what "Continue" does? It's not entirely clear to me what you are trying to do. On 19/01/07, sarita wrote: > > I want to execute a test on a table where links are to be clicked based > upon its status. Only when status not 'Complete', it's to be clicked & > further actions to be performed. Otherwise those steps to be skipped. So, > thinking of Ruby equivalent of 'Continue' in C. Please help. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070119/7330a657/attachment.html From forum-watir-users at openqa.org Fri Jan 19 09:34:30 2007 From: forum-watir-users at openqa.org (gdx) Date: Fri, 19 Jan 2007 08:34:30 CST Subject: [Wtr-general] Two queries in Watir In-Reply-To: <49848405.1169203685447.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <47169124.1169217300701.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> hello, I don't know if there is a default log (text file) in Watir. My default log is the standard output on the console :D . --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6068&messageID=17387#17387 From forum-watir-users at openqa.org Fri Jan 19 09:35:49 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Fri, 19 Jan 2007 08:35:49 CST Subject: [Wtr-general] same text for different urls. In-Reply-To: Message-ID: <46379091.1169217379457.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi thank u,its working for the general urls, but not for the ajax links, can u please help me for the ajax links. This is the code i used. ie.link(:url,"http://localhost:3000/data_entry/ajax_add_term/133?contract_id=140").click This is the generated html.. add a term Thanks in Advance, Harish --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6181&messageID=17388#17388 From tester.paul at gmail.com Fri Jan 19 09:36:21 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Fri, 19 Jan 2007 09:36:21 -0500 Subject: [Wtr-general] Watir with Ajax In-Reply-To: <52527314.1169209531455.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <52527314.1169209531455.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <37c405480701190636i27fa7e4dn2d2986b9649cdc02@mail.gmail.com> Are these links and fields within frames? Do you know if the frame has completely finished loading after the "click" and before the text_field is set? What version of Watir are you using? On 19/01/07, Naga Harish Kanegolla wrote: > > HI, > But its not working for me. Basically its working for all the > text_fields. But not working for this, I hope its becoz the form is > rendering dynamically thru ajax call. This is the error.. > Error:: > c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1939:in `assert_exists': Unable to > locate object, using name and contract_my_document[title] > (Watir::Exception::UnknownObjectException) > from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3393:in `set' > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070119/3c06d68f/attachment.html From fxn at hashref.com Fri Jan 19 10:19:16 2007 From: fxn at hashref.com (Xavier Noria) Date: Fri, 19 Jan 2007 16:19:16 +0100 Subject: [Wtr-general] Watir with Ajax In-Reply-To: <52527314.1169209531455.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <52527314.1169209531455.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: On Jan 19, 2007, at 1:25 PM, Naga Harish Kanegolla wrote: > HI, > But its not working for me. Basically its working for all the > text_fields. But not working for this, I hope its becoz the form is > rendering dynamically thru ajax call. You seem to be using Rails. Do you mean the form is created dynamically via the _response_ of an Ajax call? That is, the elements of the form where not in the original DOM? -- fxn From charley.baker at gmail.com Fri Jan 19 10:28:20 2007 From: charley.baker at gmail.com (Charley Baker) Date: Fri, 19 Jan 2007 08:28:20 -0700 Subject: [Wtr-general] Two queries in Watir In-Reply-To: <49848405.1169203685447.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <38033502.1169048130125.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <49848405.1169203685447.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Take a look at the watir examples directory. You'll find a logging directory with test_logger1.rb and example_logger1.rb. -Charley On 1/19/07, Maloy kanti debnath wrote: > > Hello Ogre, > > Thank you for your correct answer. If you also tell us whether there is a > default 'log' in Watir and if so, how to write to it and where to view it?, > I would be thankful. > > Thanks, > Maloy. > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6068&messageID=17353#17353 > _______________________________________________ > 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/20070119/93b827d6/attachment.html From charley.baker at gmail.com Fri Jan 19 10:30:16 2007 From: charley.baker at gmail.com (Charley Baker) Date: Fri, 19 Jan 2007 08:30:16 -0700 Subject: [Wtr-general] same text fordifferent urls.. In-Reply-To: <52103733.1169206444399.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <52103733.1169206444399.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Try something like this: ie.link(:url, /some regex to match/).click -Charley On 1/19/07, Naga Harish Kanegolla wrote: > > Hi all, > How to click on the links based up on the href rather than the text? > Ex:: I am having the same text with different ids. i.e., we are having > 30 "add a term" links..For different links having different href (url). so > how could i code using watir for this kind of hrefs. Please help me > regarding this.. > > Thanks in Advance, > Harish > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6183&messageID=17365#17365 > _______________________________________________ > 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/20070119/84b601d9/attachment.html From christopher.mcmahon at gmail.com Fri Jan 19 10:58:40 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 19 Jan 2007 07:58:40 -0800 Subject: [Wtr-general] how to use the commands present in the 'SimpIe' class? In-Reply-To: <36196813.1169193282082.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <51740529.1169136268196.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <36196813.1169193282082.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70701190758v3ddc9771m8f36c9b79b5247bd@mail.gmail.com> On 1/18/07, Maloy kanti debnath wrote: > Today morning, when I was going through the 'built-in' scripts, like watir.rb, watir_simple.rb etc. just to have a look at the source code, I happened to note that we can modify the source code of various functions to suit our need That's one of the reasons that Ruby is such a powerful language. You'll find that modifying the language itself is a popular acivity. From forum-watir-users at openqa.org Fri Jan 19 11:19:05 2007 From: forum-watir-users at openqa.org (Nathan) Date: Fri, 19 Jan 2007 10:19:05 CST Subject: [Wtr-general] Ruby equivalent of 'Continue' in C In-Reply-To: <45445371.1169209063580.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <49861528.1169223585819.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> The Ruby equivalent to continue is next. For example: intIndex = 0 while intIndex < 100   intIndex = intIndex + 1   if (intIndex % 2) == 1     next   end   puts "The value was odd: " + intIndex.to_s end The above code, though dumb, would only print the string every other time. Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6187&messageID=17394#17394 From zeljko.filipin at gmail.com Fri Jan 19 11:25:55 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Fri, 19 Jan 2007 17:25:55 +0100 Subject: [Wtr-general] How to click on image associated with link In-Reply-To: <46057765.1169148236421.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <46057765.1169148236421.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: This will click that cell. ie.cell(:id, "10TD37").click This will click the link that contains that image. ie.cell(:id, "10TD37").link(:href, /Adminpage/).click Finally, this will click that image in that cell. ie.cell(:id, "10TD37").image(:title, "Delete survey, responses, emails").click Choose the one that works for you. I tried it with watir 1.5.1.1145 -- Zeljko Filipin zeljkofilipin.com Testing is not only what I do for a living. It is also what I do for fun. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070119/a77112c2/attachment.html From zeljko.filipin at gmail.com Fri Jan 19 11:37:19 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Fri, 19 Jan 2007 17:37:19 +0100 Subject: [Wtr-general] How to run test cases in sequence rather than at the same time? In-Reply-To: <45B047F5.808@pettichord.com> References: <45B047F5.808@pettichord.com> Message-ID: You do not have to use test unit. Take a look at this. http://www.openqa.org/watir/example_testcase.html -- Zeljko Filipin zeljkofilipin.com Testing is not only what I do for a living. It is also what I do for fun. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070119/ccdcbc50/attachment.html From fxn at hashref.com Fri Jan 19 12:27:44 2007 From: fxn at hashref.com (Xavier Noria) Date: Fri, 19 Jan 2007 18:27:44 +0100 Subject: [Wtr-general] Ruby equivalent of 'Continue' in C In-Reply-To: <45445371.1169209063580.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <45445371.1169209063580.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <551DA4FD-A529-4D42-8FDA-E0B12F527634@hashref.com> On Jan 19, 2007, at 1:17 PM, sarita wrote: > I want to execute a test on a table where links are to be clicked > based upon its status. Only when status not 'Complete', it's to be > clicked & further actions to be performed. Otherwise those steps to > be skipped. So, thinking of Ruby equivalent of 'Continue' in C. > Please help. In Ruby it is called "next": fxn at feynman:~$ ruby -e '1.upto(5) {|n| next if n < 3 ; puts n}' 3 4 5 -- fxn From forum-watir-users at openqa.org Fri Jan 19 13:38:40 2007 From: forum-watir-users at openqa.org (minal) Date: Fri, 19 Jan 2007 12:38:40 CST Subject: [Wtr-general] How to click on image associated with link In-Reply-To: <46057765.1169148236421.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <42162120.1169231950726.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thanks to both of you for your replies. Clicking on image based on IMG tag attributes, will not work for this application, since each row in table has same image with same IMG-tag attributes. For some strange resons ie.cell(:id, "10TD37").click doesn't work on my application. But I found work around for that, in case anybody is looking solution for similar problems. my_row = ie.row( :id , "TR37") links = tabs[my_row.column_count()].document().all.tags("A") my_link="" links.each do |p| my_link=p.invoke("href") # since there is only one A-tag in each cell, we are ok end ie.goto(my_link) # this is same as clicking on image minal --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6176&messageID=17403#17403 From forum-watir-users at openqa.org Fri Jan 19 15:38:03 2007 From: forum-watir-users at openqa.org (Brad) Date: Fri, 19 Jan 2007 14:38:03 CST Subject: [Wtr-general] How to retrieve in table Message-ID: <47349658.1169239409918.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> When I use the following following command, the array shows the first element as '[]' instead of the Header values. How do I get the Header values from the table? my_array = $browser.table(:id , 'ctl00_MasterContentPlaceHolder_DomainGridView').to_a p my_array I see the following output: [[], ["Item 1", "Local25"], ["Item 2", "Local26"], ["Item 3", "Local27"], ["", ""]] Note the first element in the array is empty but I expected it to be the Header values. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6193&messageID=17408#17408 From christopher.mcmahon at gmail.com Fri Jan 19 16:07:08 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 19 Jan 2007 13:07:08 -0800 Subject: [Wtr-general] OT: anyone tried JRuby? Message-ID: <72799cd70701191307n76afa758u6f0311ecb4aba00e@mail.gmail.com> Martin Fowler says "it works a treat" http://martinfowler.com/bliki/JRubyVelocity.html I just wondered if anyone here has spiked anything with JRuby. From forum-watir-users at openqa.org Fri Jan 19 16:24:42 2007 From: forum-watir-users at openqa.org (Brad) Date: Fri, 19 Jan 2007 15:24:42 CST Subject: [Wtr-general] How to retrieve in table In-Reply-To: <47349658.1169239409918.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <48251946.1169241931303.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> In trying the following, I get the header values. my_array = $browser.table(:id , 'ctl00_MasterContentPlaceHolder_DomainGridView').row_values(1) p my_array Why doesn't '.to_a' give the first row (Header)? Thanks, Brad --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6193&messageID=17411#17411 From tester.paul at gmail.com Fri Jan 19 16:26:43 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Fri, 19 Jan 2007 16:26:43 -0500 Subject: [Wtr-general] OT - Bug in Ruby with adding strings? Message-ID: <37c405480701191326t6c67686bqf3666eaf19075cdb@mail.gmail.com> I just found what looks like a bug in Ruby. Here's a simple script that will expose this bug: ---- irb(main):001:0> x = 1 => 1 irb(main):002:0> puts 'foo' + x.to_s +'bar' SyntaxError: compile error (irb):2: syntax error puts 'foo' + x.to_s +'bar' ^ from (irb):2 ---- I finally figured out that it was the Plus sign *right next* to the "bar", *after* the "to_s" method that Ruby dislikes. If I insert a space, I get the correct output. If I take out both spaces, I get the correct output. It's only if there's a space after the "to_s" and none between the Plus sign and string-in-quotes that it blows up. That is: > puts 'foo' + x.to_s + 'bar' # this works > puts 'foo' + x.to_s +'bar' # doesn't work > puts 'foo' + x.to_s+ 'bar' # this works > puts 'foo' + x.to_s+'bar' # this works Anyone know why this might be? Is there a proper place where I might pass this information on? (I'm not on any other Ruby groups right now.) I haven't played with it anymore, so I wonder if this bug exists with other methods. I'll try to remember to be consistent with my spaces moving forward. Thought some of you might be interested. Cheers. Paul C. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070119/92c90623/attachment.html From charley.baker at gmail.com Fri Jan 19 16:30:00 2007 From: charley.baker at gmail.com (Charley Baker) Date: Fri, 19 Jan 2007 14:30:00 -0700 Subject: [Wtr-general] OT: anyone tried JRuby? In-Reply-To: <72799cd70701191307n76afa758u6f0311ecb4aba00e@mail.gmail.com> References: <72799cd70701191307n76afa758u6f0311ecb4aba00e@mail.gmail.com> Message-ID: We used JRuby internally for access to a 3rd party search library. It works great for creating and using java objects which may live on your middle tier. I haven't spiked anything externally, but let me know if you have any specific questions. -c On 1/19/07, Chris McMahon wrote: > > Martin Fowler says "it works a treat" > http://martinfowler.com/bliki/JRubyVelocity.html > > I just wondered if anyone here has spiked anything with JRuby. > _______________________________________________ > 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/20070119/40364a37/attachment.html From christopher.mcmahon at gmail.com Fri Jan 19 16:33:08 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 19 Jan 2007 13:33:08 -0800 Subject: [Wtr-general] OT - Bug in Ruby with adding strings? In-Reply-To: <37c405480701191326t6c67686bqf3666eaf19075cdb@mail.gmail.com> References: <37c405480701191326t6c67686bqf3666eaf19075cdb@mail.gmail.com> Message-ID: <72799cd70701191333k4f24f2cdt773cb00833c54663@mail.gmail.com> > Anyone know why this might be? Is there a proper place where I might pass > this information on? (I'm not on any other Ruby groups right now.) comp.lang.ruby? http://groups.google.com/group/comp.lang.ruby/topics?lnk=li They pay pretty good attention there, and you have a good example. From nicksieger at gmail.com Fri Jan 19 16:42:43 2007 From: nicksieger at gmail.com (Nick Sieger) Date: Fri, 19 Jan 2007 15:42:43 -0600 Subject: [Wtr-general] OT: anyone tried JRuby? In-Reply-To: <72799cd70701191307n76afa758u6f0311ecb4aba00e@mail.gmail.com> References: <72799cd70701191307n76afa758u6f0311ecb4aba00e@mail.gmail.com> Message-ID: On 1/19/07, Chris McMahon wrote: > > Martin Fowler says "it works a treat" > http://martinfowler.com/bliki/JRubyVelocity.html > > I just wondered if anyone here has spiked anything with JRuby. I use it quite a bit, but then again I'm one of the developers :) Of course, it's unfortunately not going to fit the bill yet for WATiR since it relies on Win32::OLE which is implemented in C on matzruby, and we don't have a replacement for JRuby yet. Other than that, feel free to try it out and send reports over to the JRuby mailing list! http://xircles.codehaus.org/projects/jruby/lists Cheers, /Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070119/e274d565/attachment.html From bret at pettichord.com Fri Jan 19 18:52:01 2007 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 19 Jan 2007 17:52:01 -0600 Subject: [Wtr-general] OT: anyone tried JRuby? In-Reply-To: References: <72799cd70701191307n76afa758u6f0311ecb4aba00e@mail.gmail.com> Message-ID: <45B159A1.3030505@pettichord.com> Nick, Thanks for the update. Could i use DRB to connect JRuby to a MatzRuby process running Watir? Bret From nicksieger at gmail.com Fri Jan 19 21:59:55 2007 From: nicksieger at gmail.com (Nick Sieger) Date: Fri, 19 Jan 2007 20:59:55 -0600 Subject: [Wtr-general] OT: anyone tried JRuby? In-Reply-To: <45B159A1.3030505@pettichord.com> References: <72799cd70701191307n76afa758u6f0311ecb4aba00e@mail.gmail.com> <45B159A1.3030505@pettichord.com> Message-ID: On 1/19/07, Bret Pettichord wrote: > > Nick, > > Thanks for the update. Could i use DRB to connect JRuby to a MatzRuby > process running Watir? I haven't used DRb on JRuby yet personally, but I've heard reports of some people using it successfully. That said, I'll caveat by saying that we have another limitation of not having a full-fledged implementation of the Ruby Marshal module. This is a high priority for us to fix though, because Rails session persistence depends on it. A quick search of our JIRA shows some issues open, some closed. http://jira.codehaus.org/secure/IssueNavigator.jspa?reset=true&&pid=11295&query=drb&summary=true&description=true&body=true /Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070119/90856a6d/attachment.html From bret at pettichord.com Sat Jan 20 15:38:15 2007 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 20 Jan 2007 14:38:15 -0600 Subject: [Wtr-general] It's All My Fault Message-ID: <45B27DB7.3000608@pettichord.com> I'm sorry that Ruby has been crashing. It's my fault. Really. Last weekend, I had some folks in from out of town (http://awta.wikispaces.com/) and I had to apologize about six times before they actually accepted that it really was my fault. I'm sorry. We recently released a new version that fixes this problem. *Everybody using Watir 1.5 should upgrade to this latest version (1.5.1.1145). * http://wiki.openqa.org/display/WTR/Development+Builds of Watir If you have been using Ruby 1.8.4 or 1.8.5 with Watir 1.5, you probably have seen intermittent errors and crashes. That is because of something I did with Watir. Specifically, I packaged Watir with a modified version of Ruby's win32ole library--C code. And I modified the version from 1.8.2, which doesn't work with later versions of Ruby. It causes them to crash. The latest version of Watir fixes this problem by only loading the modified win32ole library if you are using Ruby 1.8.2. If you've been thinking "Jeez how can everyone be so excited about Ruby when it is crashing all the time," it is because they haven't been using the code that I horked. Please update your version of Watir 1.5 right away. Sorry. Those of you still using Watir 1.4 don't need to worry. You should be fine no matter what version of Ruby you are using. From dappledore at gmail.com Sun Jan 21 09:25:42 2007 From: dappledore at gmail.com (David Appledore) Date: Sun, 21 Jan 2007 23:25:42 +0900 Subject: [Wtr-general] key codes are always zero Message-ID: Hi, I enjoyed using Watir, I have one problem. When automating tests, the text entered into text boxes does not fire key events properly in the IE DOM, the key codes are always zero. I am testing a browser plugin, that captures keystrokes when im doing debugging so I can set the plugin into certain modes from text entered. Ive tried modifying the source to generate the right codes but doesn't work. Is there a way to make it set the correct key codes? Regards David -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070121/19265843/attachment-0001.html From forum-watir-users at openqa.org Sun Jan 21 23:54:32 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Sun, 21 Jan 2007 22:54:32 CST Subject: [Wtr-general] same text fordifferent urls.. In-Reply-To: Message-ID: <51816819.1169441702788.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi thank u,its working for the general urls, but not for the ajax links, can u please help me for the ajax links. This is the code i used. ie.link(:url,"http://localhost:3000/data_entry/ajax_add_term/133?contract_id=14 0").click This is the generated html.. [add a term] is the link. Thanks in Advance, Harish --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6183&messageID=17458#17458 From forum-watir-users at openqa.org Mon Jan 22 02:28:19 2007 From: forum-watir-users at openqa.org (sarita) Date: Mon, 22 Jan 2007 01:28:19 CST Subject: [Wtr-general] Ruby equivalent of 'Continue' in C In-Reply-To: <37c405480701190631m1d0e9469k433251cf1b3e718b@mail.gmail.com> Message-ID: <52790500.1169450929488.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I've a table as below: [b]Structure No Structure Name Structural Requirements Status 475 [u]GVpv[/u] Complete 490 [u]PQpO[/u] In-complete 511 [u]ppor[/u] Not Started 517 [u]tBzv[/u] Not Started[/b] The underlined texts are links. When any Structureal reqmt status is Not Started/In-complete, links are to be clicked, further steps are performed & coming back to the same page with status changed to Complete. This is done till all structures are Complete & when all structures'r complete, user signs out. For this I'm using a while loop till the last row in the table. Inside that I've two if blocks, one for when Structure 'Complete' & one for Structure not 'Complete'. Again in the 1st if block, one more if...else block, when the row is last row, user signs out, otherwise just goes to the next iteration (for that I used Next as said by Nathan) . --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6187&messageID=17462#17462 From forum-watir-users at openqa.org Mon Jan 22 02:43:43 2007 From: forum-watir-users at openqa.org (sarita) Date: Mon, 22 Jan 2007 01:43:43 CST Subject: [Wtr-general] Ruby equivalent of 'Continue' in C In-Reply-To: <52790500.1169450929488.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <60887285.1169451853887.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I changed the code a lot to suit to different types of status combinations in the table. But most of the time it gives the following errorcode: c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2461:in `[]': unknown property or method `4' (WIN32OLERuntimeError) HRESULT error code:0x80020006 Unknown name. from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2461:in `row' from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2411:in `[]' from C:/COMPLE~1.RB:36 --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6187&messageID=17463#17463 From Jason.He at resilience.com Mon Jan 22 03:08:35 2007 From: Jason.He at resilience.com (Jason He) Date: Mon, 22 Jan 2007 00:08:35 -0800 Subject: [Wtr-general] How to run test cases in sequence rather than atthe same time? References: <45B047F5.808@pettichord.com> Message-ID: Yes, it is not required to use test unit. However, it seems that test unit encapsulate some methods could handle error, as well as include some statistics for the test result. What is the suggestion if I want to write about 200~300 standalone test cases, which will run in a sequence, should I use test unit or without it? Could you please give some advice. Thanks. Regards, Jason ________________________________ From: wtr-general-bounces at rubyforge.org ?? ?eljko Filipin Sent: 2007-1-19 (???) 8:37 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] How to run test cases in sequence rather than atthe same time? You do not have to use test unit. Take a look at this. http://www.openqa.org/watir/example_testcase.html -- Zeljko Filipin zeljkofilipin.com Testing is not only what I do for a living. It is also what I do for fun. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070122/e2bb298b/attachment.html From zeljko.filipin at gmail.com Mon Jan 22 07:06:16 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Mon, 22 Jan 2007 13:06:16 +0100 Subject: [Wtr-general] How to click on image associated with link In-Reply-To: <42162120.1169231950726.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <46057765.1169148236421.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <42162120.1169231950726.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: On 1/19/07, minal wrote: > > For some strange resons ie.cell(:id, "10TD37").click doesn't work on my > application. > I think you need to have watir 1.5 for that. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070122/52c1dd81/attachment.html From zeljko.filipin at gmail.com Mon Jan 22 10:13:41 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Mon, 22 Jan 2007 16:13:41 +0100 Subject: [Wtr-general] key codes are always zero In-Reply-To: References: Message-ID: On 1/21/07, David Appledore wrote: > > the text entered into text boxes does not fire key events properly in the > IE DOM > Take a look at FAQ, section Triggering JavaScript events http://wiki.openqa.org/display/WTR/FAQ#FAQ-TriggeringJavaScriptevents -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070122/f4e428c1/attachment.html From zeljko.filipin at gmail.com Mon Jan 22 10:43:49 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Mon, 22 Jan 2007 16:43:49 +0100 Subject: [Wtr-general] How to run test cases in sequence rather than atthe same time? In-Reply-To: References: <45B047F5.808@pettichord.com> Message-ID: On 1/22/07, Jason He wrote: > > However, it seems that test unit encapsulate some methods could handle > error > You can also handle errors in ruby without test unit. Take a look at Exceptions, Catch, and Throw section of Programming Ruby ( http://www.rubycentral.com/book/tut_exceptions.html). as well as include some statistics for the test result. > You can also make your own statistics. What is the suggestion if I want to write about 200~300 standalone test > cases, which will run in a sequence, should I use test unit or without it? > Without test unit. But, it is only what I think. If you really like test unit, Bret made a patch for it so methods are run in order you define them, but I did not try it. Take a look. http://wiki.openqa.org/display/WTR/Test-Unit+Patch -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070122/b69880aa/attachment.html From paul.rogers at shaw.ca Mon Jan 22 11:35:46 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 22 Jan 2007 09:35:46 -0700 Subject: [Wtr-general] key codes are always zero In-Reply-To: References: Message-ID: I think Ive tried to do this and never made it work... -------------- next part -------------- Hi, I enjoyed using Watir, I have one problem. When automating tests, the text entered into text boxes does not fire key events properly in the IE DOM, the key codes are always zero. I am testing a browser plugin, that captures keystrokes when im doing debugging so I can set the plugin into certain modes from text entered. Ive tried modifying the source to generate the right codes but doesn't work. Is there a way to make it set the correct key codes? Regards David -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070122/dddc5021/attachment.html -------------- next part -------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Mon Jan 22 13:26:06 2007 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 22 Jan 2007 12:26:06 -0600 Subject: [Wtr-general] key codes are always zero In-Reply-To: References: Message-ID: <45B501BE.70108@pettichord.com> Paul Rogers wrote: > I think Ive tried to do this and never made it work... > I also spent some time with this some time ago, to no avail. If any one has a solution, please let us know. Bret From bret at pettichord.com Mon Jan 22 13:28:24 2007 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 22 Jan 2007 12:28:24 -0600 Subject: [Wtr-general] How to run test cases in sequence rather than atthe same time? In-Reply-To: References: <45B047F5.808@pettichord.com> Message-ID: <45B50248.6060606@pettichord.com> Jason He wrote: > Yes, it is not required to use test unit. > However, it seems that test unit encapsulate some methods could handle > error, as well as include some statistics for the test result. > What is the suggestion if I want to write about 200~300 standalone > test cases, which will run in a sequence, should I use test unit or > without it? > Could you please give some advice. Thanks. > My advice is that you continue to use Test::Unit. By default, Test::Unit will create a Test::Suite made up of all your tests, but in a somewhat random order. If you create the Suite yourself instead, you can control the order. I suggest you look at the Rdoc for Test::Unit and create the suite yourself. Bret From forum-watir-users at openqa.org Mon Jan 22 13:34:19 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Mon, 22 Jan 2007 12:34:19 CST Subject: [Wtr-general] same text fordifferent urls.. In-Reply-To: <51816819.1169441702788.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <39025362.1169490889854.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> When you say, "...it's working for the general urls, but not for the ajax links...", what exactly to you mean by not working. Does it seem the click() method is not being called and the page is not changing, or is there a runtime object [link] identification error? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6183&messageID=17494#17494 From forum-watir-users at openqa.org Mon Jan 22 15:36:20 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Mon, 22 Jan 2007 14:36:20 CST Subject: [Wtr-general] How to retrieve in table In-Reply-To: <47349658.1169239409918.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <59677446.1169498210175.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> This COM code will work if you're having trouble getting exactly what you want from Watir: my_header = $browser.table( :id, 'ctl00_MasterContentPlaceHolder_DomainGridView' ).getOLEObject().rows( 0 ).innerText().to_a() Unfortunately, this returns escaped characters as well. You can also access individual cells this way, and sometimes I find it easier to just do it directly through the COM. my_cell = $browser.table( :id, 'theID' ).rows( x ).cells( y ).innerText() Hope this helps^^ —Nathan Christie --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6193&messageID=17502#17502 From forum-watir-users at openqa.org Mon Jan 22 15:47:43 2007 From: forum-watir-users at openqa.org (Andrew) Date: Mon, 22 Jan 2007 14:47:43 CST Subject: [Wtr-general] Cannot select in dropdown box, written in javascript Message-ID: <39594497.1169499002219.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hello, I am new to Watir and need to select an item in a dropdown box. This dropdown is a table and located in a body, written in javascript. I tried regular $ie.select_list( :name , "search_clientid").select("qaone"), but it doesn't work. Please help!
CLIENTS -all
in table In-Reply-To: <48251946.1169241931303.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <47349658.1169239409918.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <48251946.1169241931303.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Can you post table html? -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070123/fb5e23a3/attachment.html From angrez at gmail.com Tue Jan 23 08:20:27 2007 From: angrez at gmail.com (Angrez Singh) Date: Tue, 23 Jan 2007 18:50:27 +0530 Subject: [Wtr-general] How to run test cases in sequence rather than at the same time? In-Reply-To: References: <45B047F5.808@pettichord.com> Message-ID: Hi Jason, Currently Watir and FireWatir are two different projects. You need to download two separate packages in case you want your test cases to run both on IE and Firefox. As FireWatir is written using Watir code base 1.4.1, so there would be very few changes that are required to your test cases. Otherwise you just have to instantiate a new instance of Firefox and you are done. Let me know in case you face any problems while using FireWatir. Regards. Angrez On 1/23/07, ?eljko Filipin wrote: > > On 1/23/07, Jason He wrote: > > > > Do these test cases are compatible both running in IE and firefox? How > > about it to the test cases with/without using test unit? > > Should each test cases need to be changed, or just change the browser > > name at the control list. > > > > I do not understand what are you asking. > -- > 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/20070123/9cd58067/attachment.html From christopher.mcmahon at gmail.com Tue Jan 23 10:42:27 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 23 Jan 2007 07:42:27 -0800 Subject: [Wtr-general] undefined method `[]' for nil:NilClass (NoMethodError) error at the end of array??? In-Reply-To: <45B5A661.1050301@pheedo.com> References: <45B5A661.1050301@pheedo.com> Message-ID: <72799cd70701230742t1b7c4088p21ae02a36c6cbc2c@mail.gmail.com> On 1/22/07, mi wrote: > t = [["a", "b"], ["aa", "bb"]] > > 0.upto (t.length) { |x| > puts t[x][0] > } > > For some reason i'm getting the following error at the end of the loop, > any idea WHY??? 0.upto (t.length-1) { |x| puts t[x][0] } should do it, but I think you figured that out. From BAttebery at archstonesmith.com Tue Jan 23 10:55:18 2007 From: BAttebery at archstonesmith.com (Attebery, Bill) Date: Tue, 23 Jan 2007 08:55:18 -0700 Subject: [Wtr-general] Inserting date from a Date picker handled thrujavascript Message-ID: <058F595709851C4E968070ED914CEA75BF3344@engexc11.archstonesmith.com> I've had some success with these depending on the particular implementation the solution differs - I'd need more detail to try to help. When you say date picker, is it a calendar-like element. Does it open in another window, or get displayed through some ajax type method in the same window. Please show us an HTML snippet around it and maybe we can help. In my solutions, when it was a popup window I could trigger the jscript to open the window, then attach to it, once attached I could click on the objects in the calendar as links. When it was more ajax based, I didn't have to attach to the window -- so I triggered the ajax jscript, and was again able to click on the objects in the calendar as links. >>There is a read-only text box where date is inserted from a Date picker >>thru java script. How to automate this? From tester.paul at gmail.com Tue Jan 23 11:16:27 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Tue, 23 Jan 2007 11:16:27 -0500 Subject: [Wtr-general] undefined method `[]' for nil:NilClass (NoMethodError) error at the end of array??? In-Reply-To: <72799cd70701230742t1b7c4088p21ae02a36c6cbc2c@mail.gmail.com> References: <45B5A661.1050301@pheedo.com> <72799cd70701230742t1b7c4088p21ae02a36c6cbc2c@mail.gmail.com> Message-ID: <37c405480701230816k6450314au825ccde451b5294f@mail.gmail.com> This is one of those times when I'll never understand why some things in programming start counting at 1 and some things start counting at 0. I, too, have several similar loops in some of my scripts, but I opted for the more readable format of saying: t.length.times { |x| puts t[x][0] } I just can't be bothered with loops like "1.upto(t.length) {|x| puts x}" which, technically, counts from the "first item" to the "last item", but really x starts counting at 0 and goes to (length - 1). This might be convenient if you are working with arrays but not a whole lot else. Paul C. On 23/01/07, Chris McMahon wrote: > > On 1/22/07, mi wrote: > > t = [["a", "b"], ["aa", "bb"]] > > > > 0.upto (t.length) { |x| > > puts t[x][0] > > } > > > > For some reason i'm getting the following error at the end of the loop, > > any idea WHY??? > > 0.upto (t.length-1) { |x| > puts t[x][0] > } > > should do it, but I think you figured that out. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070123/ffabe26a/attachment.html From forum-watir-users at openqa.org Tue Jan 23 12:04:58 2007 From: forum-watir-users at openqa.org (Brad) Date: Tue, 23 Jan 2007 11:04:58 CST Subject: [Wtr-general] How to retrieve in table In-Reply-To: Message-ID: <38363934.1169574582904.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi,
Thanks for the reply.? Below is the HTML code for the table.? BTW, is there a way to attach files to postings?

Thanks,
Brad

~~~~~~~~~~~~~~


???????
???????????
???????
???

???????????????

?????
??????
???????
??????
???????
??????
???????
??????
???????
??????
???????
??????
???????
??????
?????
Domain NameServer Name
Dreamliner
??????????????????????????????? LocalUpTime25
???????????????????????????
Everett
??????????????????????????????? LocalUpTime25
???????????????????????????
ColoradoSprings
??????????????????????????????? LocalUpTime25
???????????????????????????
Rockville
??????????????????????????????? LocalUpTime25
???????????????????????????
  

????

???????????

--------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6193&messageID=17557#17557 From bret at pettichord.com Tue Jan 23 20:15:42 2007 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 23 Jan 2007 19:15:42 -0600 Subject: [Wtr-general] undefined method `[]' for nil:NilClass (NoMethodError) error at the end of array??? In-Reply-To: <37c405480701230816k6450314au825ccde451b5294f@mail.gmail.com> References: <45B5A661.1050301@pheedo.com> <72799cd70701230742t1b7c4088p21ae02a36c6cbc2c@mail.gmail.com> <37c405480701230816k6450314au825ccde451b5294f@mail.gmail.com> Message-ID: <45B6B33E.1090409@pettichord.com> Paul Carvalho wrote: > This is one of those times when I'll never understand why some things > in programming start counting at 1 and some things start counting at 0. This is largely because Watir is stupid in this area. We made a bad design choice with Watir 1.0. We'd now like to make Watir consistent and start with 0 everywhere (like everything else in Ruby) but this would raise compatibility issues. We welcome your thoughts in this area. > I, too, have several similar loops in some of my scripts, but I opted > for the more readable format of saying: > > t.length.times { |x| > puts t[x][0] > } Another way to say this is: t.each {|x| puts x[0]} Bret From forum-watir-users at openqa.org Tue Jan 23 22:05:20 2007 From: forum-watir-users at openqa.org (sarita) Date: Tue, 23 Jan 2007 21:05:20 CST Subject: [Wtr-general] Inserting date from a Date picker handled thru javascript In-Reply-To: Message-ID: <37932528.1169608210561.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> An image link is there. when it's clicked, the Date picker appears where date, month, year are there. When u click on a date, that date is inserted in the text box immediately & the Date picker disappears. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6231&messageID=17571#17571 From christopher.mcmahon at gmail.com Tue Jan 23 22:39:07 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 23 Jan 2007 19:39:07 -0800 Subject: [Wtr-general] OT: Announcing the Bay Area Developer-Tester/Tester-Developer Summit Message-ID: <72799cd70701231939j72b4485ax4880290e771bb68@mail.gmail.com> It will be at Google HQ in Mountain View CA. This came about because of discussions at Bret's AWTA conference not long ago. Let me quote my weblog: If you're interested, send me an email or an IM or smoke signals or something. Here is the flyer Elisabeth Hendrickson and I have been sending: What: A peer-driven gathering of developer-testers and tester-developers to share knowledge and code. When: Saturday, February 24, 8:30AM ? 5:00PM This is a small, peer-driven, non-commercial, invitation-only conference in the tradition of LAWST, AWTA, and the like. The content comes from the participants, and we expect all participants to take an active role. There is no cost to participate. We're seeking participants who are testers who code, or developers who test. Our emphasis will be on good coding practices for testing, and good testing practices for automation. That might include topics like: test code and patterns; refactoring test code; creating abstract layers; programmatically analyzing/verifying large amounts of data; achieving repeatability with random tests; OO model-based tests; creating domain specific languages; writing test fixtures or harnesses; and/or automatically generating large amounts of test data. These are just possible topics we might explore. The actual topics will depend on who comes and what experience reports/code they're willing to share. For more information on the inspiration behind this meeting, see two of my recent blog entries: http://www.testobsessed.com/2007/01/17/tester-developers-developer-testers/ http://www.testobsessed.com/2007/01/19/where-are-the-developer-testerstester-developers/ This is an open call for participation. Please feel free to forward it to other Developer-Testers and Tester-Developers who you think are interested enough to want to spend a whole Saturday discussing the topic and sharing code. Proposed Agenda: * Timeboxed group discussions: "Essential attributes of a tester-developer and developer-tester (differences and similarities)" and "What tester-developers want to learn from developers; what developer-testers want to learn from testers." * Code Examples/Experience Reports (we figure we have time for 3 of these) * End of day discussion: Raising visibility for the role of a DT/TD, building community among practitioner If you're interested in participating, please send me an email answering these questions: * Which are you: a tester who codes or a developer who tests? * How did you come to have that role? * What languages do you usually program tests in? * What do you hope to contribute to the Bay Area DT/TD summit? Do you have any code or examples that you'd like to share? (Please note that you should not share anything covered by a non-disclosure agreement.) * What do you hope to get out of the Bay Area DT/TD summit? Thanks! Your hosts: Elisabeth Hendrickson Chris McMahon From zeljko.filipin at gmail.com Wed Jan 24 02:45:40 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Wed, 24 Jan 2007 08:45:40 +0100 Subject: [Wtr-general] undefined method `[]' for nil:NilClass (NoMethodError) error at the end of array??? In-Reply-To: <45B6B33E.1090409@pettichord.com> References: <45B5A661.1050301@pheedo.com> <72799cd70701230742t1b7c4088p21ae02a36c6cbc2c@mail.gmail.com> <37c405480701230816k6450314au825ccde451b5294f@mail.gmail.com> <45B6B33E.1090409@pettichord.com> Message-ID: On 1/24/07, Bret Pettichord wrote: > > We'd now like to make Watir consistent and start with 0 everywhere (like > everything else in Ruby) but this would raise compatibility issues. We > welcome your thoughts in this area. > I vote for "start with 0 everywhere". -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070124/2e17563d/attachment.html From zeljko.filipin at gmail.com Wed Jan 24 03:01:42 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Wed, 24 Jan 2007 09:01:42 +0100 Subject: [Wtr-general] Inserting date from a Date picker handled thru javascript In-Reply-To: <37932528.1169608210561.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <37932528.1169608210561.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: On 1/24/07, sarita wrote: > > An image link is there. when it's clicked, the Date picker appears where > date, month, year are there. When u click on a date, that date is inserted > in the text box immediately & the Date picker disappears. > And, where is the problem? What can you do, and what you can not do? Bill said it really nice: "Please show us an HTML snippet around it and maybe we can help." -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070124/cfe55884/attachment.html From forum-watir-users at openqa.org Wed Jan 24 03:54:39 2007 From: forum-watir-users at openqa.org (sarita) Date: Wed, 24 Jan 2007 02:54:39 CST Subject: [Wtr-general] Inserting date from a Date picker handled thru javascript In-Reply-To: Message-ID: <47376506.1169628909668.JavaMail.oqa-j2ee@openqa01.managed.contegix.com>
      
--------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6231&messageID=17580#17580 From forum-watir-users at openqa.org Wed Jan 24 05:31:08 2007 From: forum-watir-users at openqa.org (sarita) Date: Wed, 24 Jan 2007 04:31:08 CST Subject: [Wtr-general] error with running a testsuite Message-ID: <57280105.1169634698117.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I got this error while running a test thru testsuite: Loaded suite C:/TESTSU~1.RB Started FE Finished in 15.124 seconds. 1) Failure: default_test(TC_newprojectso) [c:/ruby/lib/ruby/1.8/Test/Unit.rb:278 C:/TESTSU~1.RB:44]: No tests were specified. 2) Error: default_test(TC_newprojectso): NameError: undefined local variable or method `ie' for # C:/TESTSU~1.RB:40:in `teardown' 1 tests, 1 assertions, 1 failures, 1 errors My code was like this: require 'Test/Unit' require 'watir/WindowHelper' require 'watir' class MyTests include Watir def self.suite suite = Test::Unit::TestSuite.new suite << TC_newprojectso.suite return suite end end class TC_newprojectso < Test::Unit::TestCase def setup --- ---- end def teardown ---- --- end def newprojectso ---- ---- end end How to avoid this error --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6256&messageID=17585#17585 From forum-watir-users at openqa.org Wed Jan 24 09:13:05 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Wed, 24 Jan 2007 08:13:05 CST Subject: [Wtr-general] undefined method `[]' for In-Reply-To: <45B6B33E.1090409@pettichord.com> Message-ID: <51264778.1169648015547.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> > Another way to say this is: > > t.each {|x| puts x[0]} I'm enjoying this thread, heres another way. Sans "0"! for element in (t.index(t.first)..t.index(t.last)) puts t[element].first end --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6230&messageID=17595#17595 From tester.paul at gmail.com Wed Jan 24 10:26:23 2007 From: tester.paul at gmail.com (Paul Carvalho) Date: Wed, 24 Jan 2007 10:26:23 -0500 Subject: [Wtr-general] undefined method `[]' for nil:NilClass (NoMethodError) error at the end of array??? In-Reply-To: <45B6B33E.1090409@pettichord.com> References: <45B5A661.1050301@pheedo.com> <72799cd70701230742t1b7c4088p21ae02a36c6cbc2c@mail.gmail.com> <37c405480701230816k6450314au825ccde451b5294f@mail.gmail.com> <45B6B33E.1090409@pettichord.com> Message-ID: <37c405480701240726h2bc89d38j5c83983dc5b0a2f6@mail.gmail.com> On 23/01/07, Bret Pettichord wrote: > > This is largely because Watir is stupid in this area. We made a bad > design choice with Watir 1.0. We'd now like to make Watir consistent and > start with 0 everywhere (like everything else in Ruby) but this would > raise compatibility issues. We welcome your thoughts in this area. I think being consistent everywhere would be a good thing. If that means being consistent with Ruby and starting at 0, then so be it. Personally, I think the person who first coded programming/scripting languages to start counting at 0 should have had his/her head examined and then been committed to an insane asylum. I've learnt many programming languages over the years and even once sat and painfully read through a series of programming language manuals as long as a desk shelf back almost 20 years ago. I still recall how that language was hailed as a Fourth-Generation Language that was supposed to make programming easier because the syntax and vocabulary (commands, methods, etc) were closer to more natural language. It seemed ironic that the "easier" the language was supposed to be, the more manuals were required to teach you how to program in it. The point here is that it is "natural" for human beings to start counting at 1. I have never in my entire life ever heard anyone start counting at 0. *That* is stupid. "So, Paul, how many children do you have?" "Well, my first boy would be 0, and my second son would be 1, so I guess I have 1 child." Even the Cat in the Hat's best friends are "Thing 1" and "Thing 2". I would have like to have heard Dr. Seuss' thoughts on the topic of counting. If machines can't be made to speak *our* language, then they're not very useful. Forcing people to think and code in that way is an impediment to clear, human thought IMHO. In the absence of something good, I'll take something consistent. The "enemy you know" and all that, right? If you want to attract non-programmers to the use of the tool, then you will have to appeal to them in a friendly, non-programming way. (That would include not forcing them to rethink how to count because that's not a friendly thing to do.) I recall Gracie Hopper once saying that if you hear the phrase "that's the way it's always been done" then you know it's time to change it. Well, you asked for my thoughts. ;-) Thanks for asking. Let me just put this soapbox away for now.. ;-) Cheers. Paul C. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070124/116c57ac/attachment.html From forum-watir-users at openqa.org Wed Jan 24 11:24:14 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Wed, 24 Jan 2007 10:24:14 CST Subject: [Wtr-general] error with running a testsuite In-Reply-To: <57280105.1169634698117.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <41619567.1169655885700.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Can you post the complete code for your unit tests? I notice the `ie` not found variable; I'm assuming you have either: a) tried to create a Watir IE object like: "myIE = ie.start( "www.url.com" ) - in this case the Watir IE object must be capitalized b) created your Watir IE object correctly like "myIE = IE.start( "www.url.com" ) but make this variable only local to the "setup(()" method. If you define your ie variable in the setup method you must make it global, like $ie = IE.start( "www.url.com" ). These are just some suggestions based on what I see here. Hope this help, Nathan Christie --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6256&messageID=17598#17598 From forum-watir-users at openqa.org Wed Jan 24 11:32:43 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Wed, 24 Jan 2007 10:32:43 CST Subject: [Wtr-general] How to retrieve
in table In-Reply-To: <38363934.1169574582904.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <60685632.1169656393200.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Try this: t = ie.table( :id, "ctl00_MasterContentPlaceHolder_DomainGridView" ) t.row_values(1) Let me know if this is what you're looking for. Hope this helps, Nathan Christie --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6193&messageID=17599#17599 From forum-watir-users at openqa.org Wed Jan 24 11:39:10 2007 From: forum-watir-users at openqa.org (Brad) Date: Wed, 24 Jan 2007 10:39:10 CST Subject: [Wtr-general] How to retrieve in table In-Reply-To: <60685632.1169656393200.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <47983570.1169657023864.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi Nathan, I also came to that conclusion after writing my first question (see my first
response after first question). I don't understand why the 'header' is not shown when
I do a '.to_a'. Do you understand why it's not shown when doing '.to_a'
(see result in first question). Thanks for your response.

Brad --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6193&messageID=17601#17601 From jfitisoff at yahoo.com Wed Jan 24 12:11:39 2007 From: jfitisoff at yahoo.com (John Fitisoff) Date: Wed, 24 Jan 2007 09:11:39 -0800 (PST) Subject: [Wtr-general] error with running a testsuite In-Reply-To: <57280105.1169634698117.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <20070124171139.99518.qmail@web54106.mail.yahoo.com> Try changing the name of the test method from 'newprojectso' to 'test_01_newprojectso'. Test::Unit looks for methods that start with 'test_'. John --- sarita wrote: > I got this error while running a test thru > testsuite: > > Loaded suite C:/TESTSU~1.RB > Started > FE > Finished in 15.124 seconds. > > 1) Failure: > default_test(TC_newprojectso) > [c:/ruby/lib/ruby/1.8/Test/Unit.rb:278 > C:/TESTSU~1.RB:44]: > No tests were specified. > > 2) Error: > default_test(TC_newprojectso): > NameError: undefined local variable or method `ie' > for # > C:/TESTSU~1.RB:40:in `teardown' > > 1 tests, 1 assertions, 1 failures, 1 errors > > My code was like this: > > require 'Test/Unit' > require 'watir/WindowHelper' > require 'watir' > > class MyTests > include Watir > > def self.suite > suite = Test::Unit::TestSuite.new > suite << TC_newprojectso.suite > return suite > end > end > > class TC_newprojectso < Test::Unit::TestCase > def setup > --- > ---- > end > > def teardown > ---- > --- > end > > def newprojectso > ---- > ---- > end > end > > How to avoid this error > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6256&messageID=17585#17585 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > ____________________________________________________________________________________ Sucker-punch spam with award-winning protection. Try the free Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/features_spam.html From mdove at pheedo.com Wed Jan 24 13:11:25 2007 From: mdove at pheedo.com (mi) Date: Wed, 24 Jan 2007 10:11:25 -0800 Subject: [Wtr-general] undefined method `[]' for nil:NilClass (NoMethodError) error at the end of array??? In-Reply-To: <37c405480701240726h2bc89d38j5c83983dc5b0a2f6@mail.gmail.com> References: <45B5A661.1050301@pheedo.com> <72799cd70701230742t1b7c4088p21ae02a36c6cbc2c@mail.gmail.com> <37c405480701230816k6450314au825ccde451b5294f@mail.gmail.com> <45B6B33E.1090409@pettichord.com> <37c405480701240726h2bc89d38j5c83983dc5b0a2f6@mail.gmail.com> Message-ID: <45B7A14D.10107@pheedo.com> Whoever you are, you are FREAKING FUNNY and made an excellent point here:-) > "So, Paul, how many children do you have?" "Well, my first boy would > be 0, and my second son would be 1, so I guess I have 1 child." Even > the Cat in the Hat's best friends are "Thing 1" and "Thing 2". I > would have like to have heard Dr. Seuss' thoughts on the topic of > counting. > From forum-watir-users at openqa.org Wed Jan 24 14:38:53 2007 From: forum-watir-users at openqa.org (Andrew) Date: Wed, 24 Jan 2007 13:38:53 CST Subject: [Wtr-general] problem to get handle of popup window Message-ID: <59791166.1169667729256.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi All, I have a problem with getting handle of a popup window. I use Ruby 185-21 Watir 1.5.1.1145 Watir is installed with gem install watir on Ruby and directory looks like:C:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.1.1145 Popup window is written in JavaScript: > > > > > > > > >
CLIENTS -all
> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070125/07f5de7f/attachment-0001.html From Jason.He at resilience.com Fri Jan 26 01:15:58 2007 From: Jason.He at resilience.com (Jason He) Date: Thu, 25 Jan 2007 22:15:58 -0800 Subject: [Wtr-general] How to handle the popup security alert In-Reply-To: Message-ID: 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 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070125/538a85b5/attachment.html From forum-watir-users at openqa.org Fri Jan 26 08:00:06 2007 From: forum-watir-users at openqa.org (Nathan) Date: Fri, 26 Jan 2007 07:00:06 CST Subject: [Wtr-general] Why does Watir sometimes not open an IE window, yet continues to run tests? Message-ID: <36456126.1169816436263.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Why does Watir sometimes not open an Internet Explorer window, yet continues to run tests just fine? Is there some way that I can ensure a window is always created? This causes problems of course for screenshot taking, because our screenshots are all black when a browser window doesn't open and only the OLE server connection is established. Any ideas? Thanks, Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6286&messageID=17692#17692 From forum-watir-users at openqa.org Fri Jan 26 09:17:36 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Fri, 26 Jan 2007 08:17:36 CST Subject: [Wtr-general] Why does Watir sometimes not open an IE window, yet continues to run te In-Reply-To: <36456126.1169816436263.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <40964555.1169821086852.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I have never seen this happen. Are you using "-b (background) Run Internet Explorer invisible" when you run the program? Is IE just minimized by chance? What version of IE are running? Is this a multi desktop setup (is it off the screen?) Just some ideas :) --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6286&messageID=17694#17694 From zeljko.filipin at gmail.com Fri Jan 26 10:56:19 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Fri, 26 Jan 2007 16:56:19 +0100 Subject: [Wtr-general] Why does Watir sometimes not open an IE window, yet continues to run tests? In-Reply-To: <36456126.1169816436263.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <36456126.1169816436263.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: On 1/26/07, Nathan wrote: > > Why does Watir sometimes not open an Internet Explorer window, yet > continues to run tests just fine? The same tests sometimes run with IE visible, and sometimes IE is hidden? IE will be hidden if you run your test with -b command line option example (from WATIR User Guide, http://www.openqa.org/watir/watir_user_guide.html) myTest.rb -b -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070126/5a6f8148/attachment.html From charley.baker at gmail.com Fri Jan 26 12:52:04 2007 From: charley.baker at gmail.com (Charley Baker) Date: Fri, 26 Jan 2007 10:52:04 -0700 Subject: [Wtr-general] How to handle the popup security alert In-Reply-To: References: Message-ID: 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* 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/20070126/41e797d8/attachment-0001.html From forum-watir-users at openqa.org Fri Jan 26 12:58:19 2007 From: forum-watir-users at openqa.org (Andrew) Date: Fri, 26 Jan 2007 11:58:19 CST Subject: [Wtr-general] Cannot select in dropdown box, written in javascript In-Reply-To: <39594497.1169499002219.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <59192229.1169834329778.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thank you guys for fast reply. I found a walk around in my application , using index: value for regular $ie.link(:index, 19).click function. Thanks again and please look into my other issues. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6222&messageID=17704#17704 From forum-watir-users at openqa.org Fri Jan 26 13:28:21 2007 From: forum-watir-users at openqa.org (Andrew) Date: Fri, 26 Jan 2007 12:28:21 CST Subject: [Wtr-general] How to handle calendars - cf_webapp/calendar ? Message-ID: <56412728.1169836131473.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hello, I have few calendars options in my application. All of them are cf_webapp/calendar type calendars. Does anybody have experience with this type of calendar or know how to handle them? Thanks --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6293&messageID=17706#17706 From forum-watir-users at openqa.org Fri Jan 26 13:49:19 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Fri, 26 Jan 2007 12:49:19 CST Subject: [Wtr-general] How to retrieve in table In-Reply-To: <47983570.1169657023864.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <49035444.1169837389712.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> acserve, I think this is the reason the header rows are not displayed when using the "to_a()" Watir method. This is the source of the "to_a()" method (`Watir.rb` : Line 2432, v1.4.1 ): def to_a raise UnknownTableException , "Unable to locate a table using #{@how} and #{@what} " if @o == nil y = [] table_rows = @o.getElementsByTagName("TR") for row in table_rows x = [] for td in row.getElementsbyTagName("TD") x << td.innerText.strip end y << x end return y end I'm sure this message board won't format this aesthetically, but take a look at the statement, " table_rows = @o.getElementsByTagName("TR")". It appears that this particular method only starts grabbing cells from rows [i]only[/i], hence the "TR". I believe this could be fixed by starting this logic with a check for a "TH" row. Then the subsequent "x << td.innerText.strip" only retrieves cell text values starting from the first row. Hope this helps :) Nathan Christie --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6193&messageID=17709#17709 From forum-watir-users at openqa.org Fri Jan 26 13:52:28 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Fri, 26 Jan 2007 12:52:28 CST Subject: [Wtr-general] same text fordifferent urls.. In-Reply-To: <63217418.1169542316357.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <63088710.1169837578615.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> It looks like in your link identification you have, "...contract_id=14 0" (with a space) and in your error message it displays, "Unable to locate ... contract_id=140" (no space). Could this be it? Nathan Christie --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6183&messageID=17710#17710 From paul.rogers at shaw.ca Fri Jan 26 14:48:58 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 26 Jan 2007 12:48:58 -0700 Subject: [Wtr-general] how to populate hidden text area? References: <001001c74109$4abcb260$8a2415ac@ds.corp.yahoo.com> Message-ID: <05d801c74183$053b6bd0$6400a8c0@laptop> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070126/729aa30e/attachment.html From sgoel at yahoo-inc.com Fri Jan 26 17:54:55 2007 From: sgoel at yahoo-inc.com (Suman Goel) Date: Fri, 26 Jan 2007 14:54:55 -0800 Subject: [Wtr-general] how to populate hidden text area? Message-ID: <009201c7419c$ff7bde40$8a2415ac@ds.corp.yahoo.com> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070126/59017f98/attachment-0001.html From paul.rogers at shaw.ca Sun Jan 28 18:56:07 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sun, 28 Jan 2007 16:56:07 -0700 Subject: [Wtr-general] how to populate hidden text area? References: <009201c7419c$ff7bde40$8a2415ac@ds.corp.yahoo.com> Message-ID: <06b801c74337$e0f62b00$6400a8c0@laptop> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070128/e0e0f4df/attachment.html From paul.rogers at shaw.ca Sun Jan 28 23:58:00 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sun, 28 Jan 2007 21:58:00 -0700 Subject: [Wtr-general] custom attributes Message-ID: <003a01c74362$0cd0b950$6400a8c0@laptop> Some one asked me off list if they could access the mytag part of some html like the following With the 1.5.1-1145 gem you can do this: puts ie.text_field(:index,1).ole_object.mytag returns 'paul' this doesnt seem to work though: ie.text_field(:mytag ,/p/).flash causes a MissingWayOfFindingObjectException Hope that helps others too. Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070128/1fff5d7f/attachment.html From paul.rogers at shaw.ca Mon Jan 29 00:24:33 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sun, 28 Jan 2007 22:24:33 -0700 Subject: [Wtr-general] How to handle calendars - cf_webapp/calendar ? References: <56412728.1169836131473.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <006e01c74365$c23bdf10$6400a8c0@laptop> this page: http://travel.tripforce.com/travel/arc.cfm?nav=nc&tab=c appears to use the calendar you describe. I was able to show the calendar with ie.image(:url , /calendar.gif/).click I then looked through the source to find out how the calendar was drawn. In this case it was an iframe so I did ie.frames(:index,1).links.show ( I guessed they were links based on the cursor changing to a hand, but they could have easily been some other element) which showed 31 links so I could then do ie.frame(:index,1).link(:text, /30/).flash Hope that helps Paul ----- Original Message ----- From: "Andrew" To: Sent: Friday, January 26, 2007 11:28 AM Subject: [Wtr-general] How to handle calendars - cf_webapp/calendar ? > Hello, > > I have few calendars options in my application. All of them are > cf_webapp/calendar type calendars. Does anybody have experience with this > type of calendar or know how to handle them? > > Thanks > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6293&messageID=17706#17706 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From forum-watir-users at openqa.org Mon Jan 29 00:47:44 2007 From: forum-watir-users at openqa.org (vijay) Date: Sun, 28 Jan 2007 23:47:44 CST Subject: [Wtr-general] How to access a table present within a form? In-Reply-To: <45215716.1169735868009.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <38204569.1170049694342.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hello John Lolis, I appreciate your observation. Yes, indeed, I have been trying the statement with a 'commo' instead of a 'dot'. Now, when I replaced 'comma' with a 'dot', Watir is giving the desired output. I am very sorry for not observing the typographic error previously. Thanks, Vaidyalingam --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6277&messageID=17742#17742 From forum-watir-users at openqa.org Mon Jan 29 01:48:59 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Mon, 29 Jan 2007 00:48:59 CST Subject: [Wtr-general] same text fordifferent urls.. In-Reply-To: <63088710.1169837578615.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <61542553.1170053369547.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi Thats only a typo mistake which i gave in this forum. But in my code it looks correct. And one more thing, I couldn't get the code of that link in the html source code. I hope AJAX is not updating the html source.So how to over come this problem?? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6183&messageID=17743#17743 From prema.arya at gmail.com Mon Jan 29 03:19:06 2007 From: prema.arya at gmail.com (Prema Arya) Date: Mon, 29 Jan 2007 13:49:06 +0530 Subject: [Wtr-general] custom attributes In-Reply-To: <003a01c74362$0cd0b950$6400a8c0@laptop> References: <003a01c74362$0cd0b950$6400a8c0@laptop> Message-ID: <27915010701290019p7664d08mcf5ffa68ce3c95f@mail.gmail.com> Hi Paul, You can use xpath to address the elements having custom attributes. For example, to access the following input tag using xpath the code would look like this: inText = ie.text_field(:xpath , "//input[@mytag='paul']/") puts inText Regards, Prema On 1/29/07, Paul Rogers wrote: > > > Some one asked me off list if they could access the mytag part of some > html like the following > > > > With the 1.5.1-1145 gem you can do this: > > puts ie.text_field(:index,1).ole_object.mytag > returns 'paul' > > > this doesnt seem to work though: > > ie.text_field(:mytag ,/p/).flash > causes a MissingWayOfFindingObjectException > > Hope that helps others too. > > Paul > > > > _______________________________________________ > 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/20070129/e7d8266c/attachment.html From forum-watir-users at openqa.org Mon Jan 29 06:48:17 2007 From: forum-watir-users at openqa.org (vijay) Date: Mon, 29 Jan 2007 05:48:17 CST Subject: [Wtr-general] Getting the current system date through a Watir command Message-ID: <44273036.1170071328040.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hello people, I do not know what command to use to make Watir output the current system date and to convert it into the desired format, dd-mon-yyyy (22-Jan-2007). I want the current system date inorder to check whether a particular field present in the application has the currrent date or not. If anybody could help me, I would be thankful. Thanks, in Advance Vijay --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6307&messageID=17749#17749 From forum-watir-users at openqa.org Mon Jan 29 06:51:01 2007 From: forum-watir-users at openqa.org (vijay) Date: Mon, 29 Jan 2007 05:51:01 CST Subject: [Wtr-general] how to make Watir output the current system date through a command Message-ID: <60753743.1170071491585.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hello people, I do not know what command to use to make Watir output the current system date and to convert it into the desired format, dd-mon-yyyy (22-Jan-2007). I want the current system date inorder to check whether a particular field present in the application has the currrent date or not. If anybody could help me, I would be thankful. Thanks, in Advance Vijay --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6308&messageID=17750#17750 From forum-watir-users at openqa.org Mon Jan 29 07:10:33 2007 From: forum-watir-users at openqa.org (ankur) Date: Mon, 29 Jan 2007 06:10:33 CST Subject: [Wtr-general] How to click an image button Message-ID: <47743874.1170072689709.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi all I am automating test cases for a web application . Can someone please tell me how to click on a button which has its value as a image .The code in Html says img src="images/af/Login_button.jpg" looking for an early response...... --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6309&messageID=17751#17751 From WKruse at multichoice.co.za Mon Jan 29 07:20:01 2007 From: WKruse at multichoice.co.za (Walter Kruse) Date: Mon, 29 Jan 2007 14:20:01 +0200 Subject: [Wtr-general] how to make Watir output the current system datethrough a command In-Reply-To: <60753743.1170071491585.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <60753743.1170071491585.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Hi Vijay This is a Ruby method, not specific to Watir: Time.now.strftime("%d-%b-%Y") -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of vijay Sent: 29 January 2007 01:51 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] how to make Watir output the current system datethrough a command Hello people, I do not know what command to use to make Watir output the current system date and to convert it into the desired format, dd-mon-yyyy (22-Jan-2007). I want the current system date inorder to check whether a particular field present in the application has the currrent date or not. If anybody could help me, I would be thankful. Thanks, in Advance Vijay --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6308&messageID=17750#17750 _______________________________________________ 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. ************************************************************************************************************************** From prema.arya at gmail.com Mon Jan 29 07:30:52 2007 From: prema.arya at gmail.com (Prema Arya) Date: Mon, 29 Jan 2007 18:00:52 +0530 Subject: [Wtr-general] BUG: Using XPath In-Reply-To: References: <27915010701250120i7e725508j6f9ad12eb490e6ff@mail.gmail.com> Message-ID: <27915010701290430p3a0e62e9k3b4b3e9103891641@mail.gmail.com> Hi, Please find the attached patch fixing the xpath issue. Regards, Prema On 1/25/07, Bret Pettichord wrote: > > On 1/25/07, Prema Arya wrote: > > > > This change should be checked-in in the main branch also, Bret can you > > give me access right to check-in? or someone else also can check-in the > > change. > > > > Please submit a patch. > > > > -- Prema Arya -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070129/fdfc1b04/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: xpath_bug-fix.patch Type: application/octet-stream Size: 611 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20070129/fdfc1b04/attachment.obj From prema.arya at gmail.com Mon Jan 29 07:46:36 2007 From: prema.arya at gmail.com (Prema Arya) Date: Mon, 29 Jan 2007 18:16:36 +0530 Subject: [Wtr-general] how to make Watir output the current system datethrough a command In-Reply-To: References: <60753743.1170071491585.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <27915010701290446v37e8a076j684af5138d497f71@mail.gmail.com> You can refer this for more date-time formats: http://www.rubycentral.com/book/ref_c_time.html#Time.strftime Prema On 1/29/07, Walter Kruse wrote: > > Hi Vijay > This is a Ruby method, not specific to Watir: > > Time.now.strftime("%d-%b-%Y") > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of vijay > Sent: 29 January 2007 01:51 PM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] how to make Watir output the current system > datethrough a command > > Hello people, > > I do not know what command to use to make Watir output the current > system date and to convert it into the desired format, dd-mon-yyyy > (22-Jan-2007). I want the current system date inorder to check whether > a particular field present in the application has the currrent date or > not. If anybody could help me, I would be thankful. > > Thanks, in Advance > Vijay > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6308&messageID=17750#17750 > _______________________________________________ > 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/20070129/c306188b/attachment.html From prema.arya at gmail.com Mon Jan 29 07:55:26 2007 From: prema.arya at gmail.com (Prema Arya) Date: Mon, 29 Jan 2007 18:25:26 +0530 Subject: [Wtr-general] How to click an image button In-Reply-To: <47743874.1170072689709.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <47743874.1170072689709.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <27915010701290455q6e9a475dx39d14e4c72313e69@mail.gmail.com> Hi, This code will click the image with name like Login_button.jpg ie.image(:src, /Login_button.jpg/).click Prema On 1/29/07, ankur wrote: > > Hi all > > I am automating test cases for a web application . Can someone please tell > me how to click on a button which has its value as a image .The code in Html > says > > img src="images/af/Login_button.jpg" > > looking for an early response...... > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6309&messageID=17751#17751 > _______________________________________________ > 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/20070129/b37d9ced/attachment-0001.html From zeljko.filipin at gmail.com Mon Jan 29 07:55:31 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Mon, 29 Jan 2007 13:55:31 +0100 Subject: [Wtr-general] Getting the current system date through a Watir command In-Reply-To: <44273036.1170071328040.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <44273036.1170071328040.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: On 1/29/07, vijay wrote: > > I do not know what command to use to make Watir output the current system > date and to convert it into the desired format, dd-mon-yyyy (22-Jan-2007). Watir can not do it, but Ruby can. Time.now.strftime("%d-%b-%Y") => "29-Jan-2007" For more information, see http://dev.rubycentral.com/ref/ref_c_time.html#strftime -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070129/5a9b13a3/attachment.html From prema.arya at gmail.com Mon Jan 29 08:37:17 2007 From: prema.arya at gmail.com (Prema Arya) Date: Mon, 29 Jan 2007 19:07:17 +0530 Subject: [Wtr-general] custom attributes In-Reply-To: <27915010701290019p7664d08mcf5ffa68ce3c95f@mail.gmail.com> References: <003a01c74362$0cd0b950$6400a8c0@laptop> <27915010701290019p7664d08mcf5ffa68ce3c95f@mail.gmail.com> Message-ID: <27915010701290537t13adb3c7m85114b176a1d665e@mail.gmail.com> Paul, sorry, I misinterpreted your question, you can access the custom attribute using the function attribute_value inText = ie.text_field(:name ,"aa" ) puts inText.attribute_value("mytag") => paul Prema On 1/29/07, Prema Arya wrote: > > Hi Paul, > > You can use xpath to address the elements having custom attributes. > > For example, to access the following input tag > > > > using xpath the code would look like this: > > inText = ie.text_field(:xpath , "//input[@mytag='paul']/") > puts inText > > Regards, > Prema > > On 1/29/07, Paul Rogers wrote: > > > > > > > Some one asked me off list if they could access the mytag part of some > > html like the following > > > > > > > > With the 1.5.1-1145 gem you can do this: > > > > puts ie.text_field(:index,1).ole_object.mytag > > returns 'paul' > > > > > > this doesnt seem to work though: > > > > ie.text_field(:mytag ,/p/).flash > > causes a MissingWayOfFindingObjectException > > > > Hope that helps others too. > > > > Paul > > > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > -- > Prema Arya -- Prema Arya -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070129/653a2958/attachment.html From forum-watir-users at openqa.org Mon Jan 29 10:47:04 2007 From: forum-watir-users at openqa.org (Nathan) Date: Mon, 29 Jan 2007 09:47:04 CST Subject: [Wtr-general] Why does Watir sometimes not open an IE window, In-Reply-To: Message-ID: <49846073.1170085654089.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thank you both for your replies, but no I am not using the -b option to make IE run hidden. This occurs sometimes with both IE6 and IE7. It seems to be unclear what causes this mysterious behavior. For example I set up a windows scheduled task to run a batch file that runs one of my watir scripts, and when that task begins an IE OLE server connection is obviously made, but the IE window never appears for the duration of the test. But when I double click on the batch file without the task, the IE window usually appears. Nothing has changed execpet that instead of the Windows task scheduler running the batch file, I myself am double clicking on it to run it. Also I only have one screen, and nothing special really going on. Any other ideas? Thanks, Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6286&messageID=17757#17757 From zeljko.filipin at gmail.com Mon Jan 29 10:59:36 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Mon, 29 Jan 2007 16:59:36 +0100 Subject: [Wtr-general] custom attributes In-Reply-To: <27915010701290019p7664d08mcf5ffa68ce3c95f@mail.gmail.com> References: <003a01c74362$0cd0b950$6400a8c0@laptop> <27915010701290019p7664d08mcf5ffa68ce3c95f@mail.gmail.com> Message-ID: On 1/29/07, Prema Arya wrote: > > ie.text_field(:xpath , "//input[@mytag='paul']/") > This is so cool. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070129/9b0a1ea1/attachment.html From paul.rogers at shaw.ca Mon Jan 29 11:05:10 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 29 Jan 2007 09:05:10 -0700 Subject: [Wtr-general] custom attributes In-Reply-To: References: <003a01c74362$0cd0b950$6400a8c0@laptop> <27915010701290019p7664d08mcf5ffa68ce3c95f@mail.gmail.com> Message-ID: I really only p[osted this for information to others who want to search the archives. If its something that occurs a lot, it may be possible to add it to watir directly, but Ive never seen these things used. And does firefox support them? Allow you to access them? Paul -------------- next part -------------- On 1/29/07, Prema Arya wrote: > > ie.text_field(:xpath , "//input[@mytag='paul']/") > This is so cool. -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070129/2ccb4900/attachment.html -------------- next part -------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From forum-watir-users at openqa.org Mon Jan 29 11:30:49 2007 From: forum-watir-users at openqa.org (Nathan) Date: Mon, 29 Jan 2007 10:30:49 CST Subject: [Wtr-general] How to click an image button In-Reply-To: <47743874.1170072689709.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <38849797.1170088279057.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> If your button is actually an image, for example <img src="..."&rt;, then you should click on it using @ie.image(:src, "...").click. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6309&messageID=17763#17763 From forum-watir-users at openqa.org Mon Jan 29 12:51:19 2007 From: forum-watir-users at openqa.org (Ravi) Date: Mon, 29 Jan 2007 11:51:19 CST Subject: [Wtr-general] Why does Watir sometimes not open an IE window, In-Reply-To: <49846073.1170085654089.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <53154360.1170093109331.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> You need to make the scheduled job 'interactive'. It allows the job to interact with the desktop of the user who is logged on at the time the job runs. I typically schedule jobs through command prompt using "at /interactive ...". I guess there is an equivalent in Scheduler as well -Ravi --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6286&messageID=17765#17765 From forum-watir-users at openqa.org Mon Jan 29 13:35:08 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Mon, 29 Jan 2007 12:35:08 CST Subject: [Wtr-general] how to make Watir output the current system date through a command In-Reply-To: <60753743.1170071491585.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <41459229.1170095738147.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> This is a Ruby Date object and its functions: require 'Date' myDate = Date.today().strftime("%d/%m/%y") --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6308&messageID=17766#17766 From forum-watir-users at openqa.org Mon Jan 29 14:00:35 2007 From: forum-watir-users at openqa.org (Andrew) Date: Mon, 29 Jan 2007 13:00:35 CST Subject: [Wtr-general] How to handle calendars - cf_webapp/calendar ? In-Reply-To: <56412728.1169836131473.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <66051192.1170097361645.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi Paul, Thanks a lot. It was exactly, what i needed. Thanks again --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6293&messageID=17767#17767 From forum-watir-users at openqa.org Mon Jan 29 14:50:31 2007 From: forum-watir-users at openqa.org (Nathan) Date: Mon, 29 Jan 2007 13:50:31 CST Subject: [Wtr-general] Why does Watir sometimes not open an IE window, In-Reply-To: <53154360.1170093109331.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <55651861.1170100261584.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thanks ravishan, I am not using AT to create scheduled tasks, rather SCHTASKS (only available in Windows XP) to create my scheduled task on the fly (when I need it) from the command line, and there is not an option /INTERACTIVE for SCHTASKS. Any other suggestions? Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6286&messageID=17768#17768 From forum-watir-users at openqa.org Mon Jan 29 14:54:44 2007 From: forum-watir-users at openqa.org (Nathan) Date: Mon, 29 Jan 2007 13:54:44 CST Subject: [Wtr-general] Watir 1.4.1 and 1.5 gems can be installed together, how do I choose? Message-ID: <39556060.1170100514816.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Sorry, my summary may not be very clear, because of my limitation of summary size. My question is, what is the point of being able to install Watir 1.4.1 and 1.5 side-by-side, if I can't tell which scripts to use which version (because I have some things which are not fully compatible with 1.5 but I'd like to use 1.5 in the future and now for newer scripts. How does one accomplish this? Thanks, Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6315&messageID=17769#17769 From charley.baker at gmail.com Mon Jan 29 15:10:32 2007 From: charley.baker at gmail.com (Charley Baker) Date: Mon, 29 Jan 2007 13:10:32 -0700 Subject: [Wtr-general] Watir 1.4.1 and 1.5 gems can be installed together, how do I choose? In-Reply-To: <39556060.1170100514816.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <39556060.1170100514816.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: This should help with understanding ruby gems versioning: http://rubygems.org/read/chapter/4 http://rubygems.org/read/chapter/7 If you install the latest and 1.4.1 via gems then you can use gems versioning. The one click 1.4.1 installer installs to site_ruby not gems. -Charley On 1/29/07, Nathan wrote: > > Sorry, my summary may not be very clear, because of my limitation of > summary size. My question is, what is the point of being able to install > Watir 1.4.1 and 1.5 side-by-side, if I can't tell which scripts to use > which version (because I have some things which are not fully compatible > with 1.5 but I'd like to use 1.5 in the future and now for newer > scripts. How does one accomplish this? > > Thanks, > > Nathan > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6315&messageID=17769#17769 > _______________________________________________ > 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/20070129/9374a7dd/attachment.html From forum-watir-users at openqa.org Mon Jan 29 15:31:12 2007 From: forum-watir-users at openqa.org (Nathan) Date: Mon, 29 Jan 2007 14:31:12 CST Subject: [Wtr-general] Why does Watir sometimes not open an IE window, In-Reply-To: <55651861.1170100261584.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <53160207.1170102702442.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I just resolved my issue with this - you're right, it's not Watir at all, rather it had to do with the scheduled task. In the cases where I did not see the browser window, this was because I was logged in as a different user than the run user that the scheduled task contained. So I changed my scripts to use the current user as the run user and that fixed it! Thanks, Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6286&messageID=17772#17772 From forum-watir-users at openqa.org Mon Jan 29 15:33:01 2007 From: forum-watir-users at openqa.org (Nathan) Date: Mon, 29 Jan 2007 14:33:01 CST Subject: [Wtr-general] Watir 1.4.1 and 1.5 gems can be installed together, how do I choose? In-Reply-To: Message-ID: <53944150.1170102811461.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Thank you very much for your help! :) Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6315&messageID=17773#17773 From bret at pettichord.com Mon Jan 29 16:40:27 2007 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 29 Jan 2007 15:40:27 -0600 Subject: [Wtr-general] Watir 1.4.1 and 1.5 gems can be installed together, how do I choose? In-Reply-To: <39556060.1170100514816.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <39556060.1170100514816.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45BE69CB.9070506@pettichord.com> Nathan wrote: > (because I have some things which are not fully compatible with 1.5 but I'd like to use 1.5 in the future and now for newer scripts. > Can you provide details on the compatability problems? I would like to make Watir 1.5 compatable with Watir 1.4 and would like to see Jira tickets for any known compatability problems. Most have already been fixed. Bret From sgoel at yahoo-inc.com Mon Jan 29 19:08:59 2007 From: sgoel at yahoo-inc.com (Suman Goel) Date: Mon, 29 Jan 2007 16:08:59 -0800 Subject: [Wtr-general] how to populate hidden text area? In-Reply-To: <06b801c74337$e0f62b00$6400a8c0@laptop> References: <009201c7419c$ff7bde40$8a2415ac@ds.corp.yahoo.com> <06b801c74337$e0f62b00$6400a8c0@laptop> Message-ID: <01db01c74402$d7569eb0$8a2415ac@ds.corp.yahoo.com> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070129/e4868d1e/attachment-0001.html From paul.rogers at shaw.ca Mon Jan 29 22:40:37 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 29 Jan 2007 20:40:37 -0700 Subject: [Wtr-general] how to populate hidden text area? References: <009201c7419c$ff7bde40$8a2415ac@ds.corp.yahoo.com> <06b801c74337$e0f62b00$6400a8c0@laptop> <01db01c74402$d7569eb0$8a2415ac@ds.corp.yahoo.com> Message-ID: <009101c74420$67ea5080$6400a8c0@laptop> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070129/8b908b12/attachment.html From paul.rogers at shaw.ca Mon Jan 29 23:03:36 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 29 Jan 2007 21:03:36 -0700 Subject: [Wtr-general] how to populate hidden text area? References: <009201c7419c$ff7bde40$8a2415ac@ds.corp.yahoo.com> <06b801c74337$e0f62b00$6400a8c0@laptop> <01db01c74402$d7569eb0$8a2415ac@ds.corp.yahoo.com> <009101c74420$67ea5080$6400a8c0@laptop> Message-ID: <00a701c74423$9dc9f130$6400a8c0@laptop> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070129/1bbe99ca/attachment-0001.html From sgoel at yahoo-inc.com Mon Jan 29 23:12:42 2007 From: sgoel at yahoo-inc.com (Suman Goel) Date: Mon, 29 Jan 2007 20:12:42 -0800 Subject: [Wtr-general] how to populate hidden text area? In-Reply-To: <009101c74420$67ea5080$6400a8c0@laptop> References: <009201c7419c$ff7bde40$8a2415ac@ds.corp.yahoo.com><06b801c74337$e0f62b00$6400a8c0@laptop><01db01c74402$d7569eb0$8a2415ac@ds.corp.yahoo.com> <009101c74420$67ea5080$6400a8c0@laptop> Message-ID: <021701c74424$e3987780$8a2415ac@ds.corp.yahoo.com> Since my text area is a required field and .value sets the value in the background, when submitting the form, I get a message to fill in the details for the required field. I need to fill in the value on UI only. .value sets it in the background. I need a method like .set which sets the value in UI. _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Monday, January 29, 2007 7:41 PM To: wtr-general at rubyforge.org 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070129/6df4b00e/attachment.html From paul.rogers at shaw.ca Mon Jan 29 23:35:11 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 29 Jan 2007 21:35:11 -0700 Subject: [Wtr-general] how to populate hidden text area? References: <009201c7419c$ff7bde40$8a2415ac@ds.corp.yahoo.com> <06b801c74337$e0f62b00$6400a8c0@laptop> <01db01c74402$d7569eb0$8a2415ac@ds.corp.yahoo.com> <009101c74420$67ea5080$6400a8c0@laptop> <021701c74424$e3987780$8a2415ac@ds.corp.yahoo.com> Message-ID: <00ba01c74428$07c80c80$6400a8c0@laptop> can you post the html of the text area and of the button - there may be some javascript going on. I also dont understand that if its a required field that its also hidden? Paul ----- Original Message ----- From: Suman Goel To: wtr-general at rubyforge.org Sent: Monday, January 29, 2007 9:12 PM Subject: Re: [Wtr-general] how to populate hidden text area? Since my text area is a required field and .value sets the value in the background, when submitting the form, I get a message to fill in the details for the required field. I need to fill in the value on UI only. .value sets it in the background. I need a method like .set which sets the value in UI. ------------------------------------------------------------------------------ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Monday, January 29, 2007 7:41 PM To: wtr-general at rubyforge.org 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070129/853f3851/attachment-0001.html From sgoel at yahoo-inc.com Tue Jan 30 00:08:13 2007 From: sgoel at yahoo-inc.com (Suman Goel) Date: Mon, 29 Jan 2007 21:08:13 -0800 Subject: [Wtr-general] how to populate hidden text area? In-Reply-To: <00ba01c74428$07c80c80$6400a8c0@laptop> References: <009201c7419c$ff7bde40$8a2415ac@ds.corp.yahoo.com><06b801c74337$e0f62b00$6400a8c0@laptop><01db01c74402$d7569eb0$8a2415ac@ds.corp.yahoo.com><009101c74420$67ea5080$6400a8c0@laptop><021701c74424$e3987780$8a2415ac@ds.corp.yahoo.com> <00ba01c74428$07c80c80$6400a8c0@laptop> Message-ID: <023201c7442c$a5359330$8a2415ac@ds.corp.yahoo.com> Hi Paul, There is definitely some java script going on because I don't see anything in the html. Please have a look at the html. Suman HTML for BUTTON ("Next Step") HTML for BUTTON(I guess this is the javascript action being called) HTML for textarea _____ 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:35 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] how to populate hidden text area? can you post the html of the text area and of the button - there may be some javascript going on. I also dont understand that if its a required field that its also hidden? Paul ----- Original Message ----- From: Suman Goel To: wtr-general at rubyforge.org Sent: Monday, January 29, 2007 9:12 PM Subject: Re: [Wtr-general] how to populate hidden text area? Since my text area is a required field and .value sets the value in the background, when submitting the form, I get a message to fill in the details for the required field. I need to fill in the value on UI only. .value sets it in the background. I need a method like .set which sets the value in UI. _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Monday, January 29, 2007 7:41 PM To: wtr-general at rubyforge.org 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070129/67bad9b7/attachment-0001.html From forum-watir-users at openqa.org Tue Jan 30 00:11:50 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Mon, 29 Jan 2007 23:11:50 CST Subject: [Wtr-general] url for link Message-ID: <46358778.1170133940589.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi all, Till now I am using ie.link(:url,"http"//www.xyz/abc.html") for a link in watir.Now I have a problem for the ajax link. i.e., the url obtained in the html source is add a term So how could i use this url for the link in watir?? Please tell me the syntax in watir for using such type of ajax links. Actually i am having the same "add a term" more than 10 . so i can't use the text link.Please help me out such types. Thanks in Advance Harish --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6325&messageID=17798#17798 From paul.rogers at shaw.ca Mon Jan 29 23:01:13 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 29 Jan 2007 21:01:13 -0700 Subject: [Wtr-general] bug with text_fields.show Message-ID: <009801c74423$489ea890$6400a8c0@laptop> irb(main):012:0> ie.showAllObjects -----------Objects in page ------------- text name=aa id= value= alt= textarea name=hidden id=h value=dddd => nil irb(main):013:0> ie.text_fields.show index id name 1 2 => nil irb(main):014:0> Watir::IE::VERSION => "1.5.1.1145" This seems to be the same issue as wtr-93 ( http://jira.openqa.org/browse/WTR-93 ) but for text fields and areas Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070129/f6c0fe9f/attachment.html From prema.arya at gmail.com Tue Jan 30 01:19:56 2007 From: prema.arya at gmail.com (Prema Arya) Date: Tue, 30 Jan 2007 11:49:56 +0530 Subject: [Wtr-general] custom attributes In-Reply-To: References: <003a01c74362$0cd0b950$6400a8c0@laptop> <27915010701290019p7664d08mcf5ffa68ce3c95f@mail.gmail.com> Message-ID: <27915010701292219o52c0fc43hd30da6b8a98602e6@mail.gmail.com> Yes we can do it in FireWatir also, there are two ways you can do: require 'firewatir' include FireWatir ff = Firefox.new(5) ff.goto("file:///F:/extras/firewatir/custom.html") puts ff.text_field(:custom, "custom").value puts ff.text_field(:id, "id").attribute_value("custom") ff.close html code -------------- ouput is: ------------ Prema On 1/29/07, Paul Rogers wrote: > > I really only p[osted this for information to others who want to search > the archives. If its something that occurs a lot, it may be possible to add > it to watir directly, but Ive never seen these things used. > > And does firefox support them? Allow you to access them? > > > Paul > > > On 1/29/07, Prema Arya wrote: > > > > ie.text_field(:xpath , "//input[@mytag='paul']/") > > > > > > This is so cool. > -- > Zeljko Filipin > zeljkofilipin.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -- Prema Arya -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070130/43a597f3/attachment.html From sgoel at yahoo-inc.com Tue Jan 30 01:26:38 2007 From: sgoel at yahoo-inc.com (Suman Goel) Date: Mon, 29 Jan 2007 22:26:38 -0800 Subject: [Wtr-general] how to populate hidden text area? In-Reply-To: <00a701c74423$9dc9f130$6400a8c0@laptop> 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> Message-ID: <000601c74437$992494f0$8a2415ac@ds.corp.yahoo.com> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070129/8d9e9749/attachment-0001.html From rdoherty at yahoo-inc.com Tue Jan 30 01:17:13 2007 From: rdoherty at yahoo-inc.com (Ryan Doherty) Date: Mon, 29 Jan 2007 22:17:13 -0800 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: <45BEE2E9.8060106@yahoo-inc.com> The best way to do this is to completely seperate your markup (html) from your behaviour (js). Your link should actually point to a real URL that works in case someone has JS turned off. This way you can select the link with ie.link(:url, 'linkurl'). If you give the url a unique id or even a class that all ajax urls will use, you can use JS (most likely a JS library) to select the links and add event handlers to them (and possibly parse the url to understand what the request params are), making the AJAX call and killing the event so the browser doesn't actually request the page. That's how I would do it. -Ryan Naga Harish Kanegolla wrote: > Hi all, > Till now I am using ie.link(:url,"http"//www.xyz/abc.html") for a link in watir.Now I have a problem for the ajax link. i.e., the url obtained in the html source is > add a term > > So how could i use this url for the link in watir?? Please tell me the syntax in watir for using such type of ajax links. Actually i am having the same "add a term" more than 10 . so i can't use the text link.Please help me out such types. > > Thanks in Advance > Harish > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6325&messageID=17798#17798 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general -- Ryan Doherty Messenger WebDev Yahoo! ID: ryan.doherty From prema.arya at gmail.com Tue Jan 30 05:54:27 2007 From: prema.arya at gmail.com (Prema Arya) Date: Tue, 30 Jan 2007 16:24:27 +0530 Subject: [Wtr-general] custom attributes In-Reply-To: <27915010701292219o52c0fc43hd30da6b8a98602e6@mail.gmail.com> References: <003a01c74362$0cd0b950$6400a8c0@laptop> <27915010701290019p7664d08mcf5ffa68ce3c95f@mail.gmail.com> <27915010701292219o52c0fc43hd30da6b8a98602e6@mail.gmail.com> Message-ID: <27915010701300254k6f3f00b5oeed0063532344a71@mail.gmail.com> I thought I should elaborate the two ways, you can access an element using the custom attribute directly like this: puts ff.text_field(:custom, "custom") and Using xpath in Firefox. And to access a custom attribute value is same as it is in Watir. puts ff.text_field(:id, "id").attribute_value("custom") For the above two puts output will be Prema custom PS: missed the last output line in the previous mail. Prema On 1/30/07, Prema Arya wrote: > > Yes we can do it in FireWatir also, there are two ways you can do: > > require 'firewatir' > include FireWatir > > ff = Firefox.new(5) > > ff.goto("file:///F:/extras/firewatir/custom.html") > puts ff.text_field(:custom, "custom").value > puts ff.text_field(:id, "id").attribute_value("custom") > ff.close > html code > -------------- > > >
> > > > > ouput is: > ------------ > Prema > > On 1/29/07, Paul Rogers wrote: > > > > I really only p[osted this for information to others who want to search > > the archives. If its something that occurs a lot, it may be possible to add > > it to watir directly, but Ive never seen these things used. > > > > And does firefox support them? Allow you to access them? > > > > > > Paul > > > > > > On 1/29/07, Prema Arya < prema.arya at gmail.com > wrote: > > > > > > ie.text_field(:xpath , "//input[@mytag='paul']/") > > > > > > > > > > This is so cool. > > -- > > Zeljko Filipin > > zeljkofilipin.com > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > -- > Prema Arya -- Prema Arya -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070130/3dff0beb/attachment.html From sgoel at yahoo-inc.com Tue Jan 30 01:36:49 2007 From: sgoel at yahoo-inc.com (Suman Goel) Date: Mon, 29 Jan 2007 22:36:49 -0800 Subject: [Wtr-general] how to populate hidden text area? In-Reply-To: <000601c74437$992494f0$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> Message-ID: <001401c74439$057b9bc0$8a2415ac@ds.corp.yahoo.com> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070129/1fa01e26/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/20070129/1fa01e26/attachment-0001.jpe From Leon.Ouretski at au.ey.com Tue Jan 30 12:00:09 2007 From: Leon.Ouretski at au.ey.com (Leon.Ouretski at au.ey.com) Date: Wed, 31 Jan 2007 04:00:09 +1100 Subject: [Wtr-general] Leon Ouretski is out of the office. Message-ID: This email is to be read subject to the disclaimer below. I will be out of the office starting 31/01/2007 and will not return until 06/03/2007. I will respond to your message when I return. -------------------- NOTICE - This communication contains information which is confidential and the copyright of Ernst & Young or a third party. If you are not the intended recipient of this communication please delete and destroy all copies and telephone Ernst & Young on 1800 655 717 immediately. If you are the intended recipient of this communication you should not copy, disclose or distribute this communication without the authority of Ernst & Young. Any views expressed in this Communication are those of the individual sender, except where the sender specifically states them to be the views of Ernst & Young. Except as required at law, Ernst & Young does not represent, warrant and/or guarantee that the integrity of this communication has been maintained nor that the communication is free of errors, virus, interception or interference. Liability limited by a scheme approved under Professional Standards Legislation. -------------------- If this communication is a "commercial electronic message" (as defined in the Spam Act 2003) and you do not wish to receive communications such as this, please forward this communication to unsubscribe at au.ey.com From forum-watir-users at openqa.org Tue Jan 30 14:15:53 2007 From: forum-watir-users at openqa.org (Nathan) Date: Tue, 30 Jan 2007 13:15:53 CST Subject: [Wtr-general] Watir 1.4.1 and 1.5 gems can be installed In-Reply-To: <45BE69CB.9070506@pettichord.com> Message-ID: <59390479.1170184719081.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Well just for example, the fact that 1.4.1 does not support the css className attribute really stinks, and then if I use the work around I've found/come up with, which is to get the ole object for, say an image, then query it directly for its className (which works in 1.4.1) then I upgrade to 1.5, I get errors saying that I can't do that in the same way. Here's my 1.4.1 sub-script: @watirBrowser.watir.images.each {   |img| tempImage = img   tempOLEObj = tempImage.getOLEObject   # Find the right image to click on   if tempOLEObj.invoke("className").to_s == "btn_viewResults"     # Timeout after 45 seconds to relinquish time over to the other procs       begin         timeout(45) do           tempImage.click         end # End: timeout(45) do       rescue TimeoutError         @botLogger.log(VL.INFO, "Timed out after 45 seconds on strEnterZipCode", @logginMode)       end       break   end # End: if tempImage.class_name == "btn_viewResults" } This will NOT work on Watir 1.5 --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6315&messageID=17845#17845 From forum-watir-users at openqa.org Tue Jan 30 14:19:51 2007 From: forum-watir-users at openqa.org (Nathan) Date: Tue, 30 Jan 2007 13:19:51 CST Subject: [Wtr-general] Watir 1.4.1 and 1.5 gems can be installed In-Reply-To: <59390479.1170184719081.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <37835231.1170184821113.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Please note that I KNOW that Watir 1.5 is more inclusive of functionality made available through the OLE server for IE6 and 7, but I wish that I could just port my scripts from 1.4.1 to 1.5 and not need to worry about changing anything, but I guess that's life maybe. Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6315&messageID=17846#17846 From forum-watir-users at openqa.org Tue Jan 30 14:45:35 2007 From: forum-watir-users at openqa.org (Nathan) Date: Tue, 30 Jan 2007 13:45:35 CST Subject: [Wtr-general] Watir 1.4.1 and 1.5 gems can be installed In-Reply-To: <37835231.1170184821113.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <44831515.1170186365134.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Yeah, so when I request the OLE object via getOLEObject, I get nil returned - don't know if that's a bug or an incompatibility issue!!! That method works in 1.4.1 and doesn't in 1.5.1 --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6315&messageID=17849#17849 From bret at pettichord.com Tue Jan 30 14:56:33 2007 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Jan 2007 13:56:33 -0600 Subject: [Wtr-general] bug with text_fields.show In-Reply-To: <009801c74423$489ea890$6400a8c0@laptop> References: <009801c74423$489ea890$6400a8c0@laptop> Message-ID: <45BFA2F1.4040404@pettichord.com> Paul Rogers wrote: > This seems to be the same issue as wtr-93 ( > http://jira.openqa.org/browse/WTR-93 ) but for text fields and areas. Could you please report this issue in Jira? Bret From bret at pettichord.com Tue Jan 30 14:58:39 2007 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Jan 2007 13:58:39 -0600 Subject: [Wtr-general] Watir 1.4.1 and 1.5 gems can be installed In-Reply-To: <44831515.1170186365134.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <44831515.1170186365134.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45BFA36F.4020809@pettichord.com> Nathan wrote: > Yeah, so when I request the OLE object via getOLEObject, I get nil returned - don't know if that's a bug or an incompatibility issue!!! > > That method works in 1.4.1 and doesn't in 1.5.1 This method was renamed to ole_object in 1.5, but we could include an alias to make it easier for people to upgrade to 1.5. Please log this in Jira so we don't forget it. Bret From forum-watir-users at openqa.org Tue Jan 30 15:29:33 2007 From: forum-watir-users at openqa.org (Nathan) Date: Tue, 30 Jan 2007 14:29:33 CST Subject: [Wtr-general] Watir 1.4.1 and 1.5 gems can be installed In-Reply-To: <45BFA36F.4020809@pettichord.com> Message-ID: <45902822.1170189003784.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> When I use for example footerDiv = ie.div(:id, "FooterContainer") on our website, all of which is valid, then do oleObj = footerDiv.ole_object, I also get nil. So something must have happened!? I am using Watir 1.5.1.1145. Also how should I report something in JIRA? I don't see a standard template, and I have no idea who to assign it to, etc. thanks, Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6315&messageID=17857#17857 From bret at pettichord.com Tue Jan 30 15:29:32 2007 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Jan 2007 14:29:32 -0600 Subject: [Wtr-general] Watir 1.4.1 and 1.5 gems can be installed In-Reply-To: <44831515.1170186365134.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <44831515.1170186365134.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45BFAAAC.4030408@pettichord.com> Nathan wrote: > Yeah, so when I request the OLE object via getOLEObject, I get nil returned - don't know if that's a bug or an incompatibility issue!!! > This is my second answer. Forget what i said about an alias (it's already there) The workaround in 1.5 right now is to call locate before calling getOLEObject (aka ole_object). Thus: t = ie.text_field(:id, 'foo') t.locate puts t.ole_object This probably counts as a bug. I'd be happy to see it in Jira. Bret From forum-watir-users at openqa.org Tue Jan 30 16:16:59 2007 From: forum-watir-users at openqa.org (Nathan) Date: Tue, 30 Jan 2007 15:16:59 CST Subject: [Wtr-general] Watir Test Case Writing Message-ID: <64606817.1170191849447.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> He he, so I've written several libraries, spiders, and bots using Watir as my interface to the web through Internet Explorer now, and I never took the time to really get down and dirty with the basic testing stuff for which Watir was intended. I feel silly, but I need some help. I want to write some regular test cases right now, and I'm not really sure where to begin. First of all, there is no concise and clear documentation available that says, "Here is the basic structure of a test case, and this is what you need." That might be nice in the future! What I have so far is the following: require "rubygems" require "watir/testcase" require_gem "watir", "= 1.5.1.1145" include Watir class TC_BuyingGuides_Validation < TestCase   def setup()     @ie = Watir::IE.start("www.vehix.com")     browse_to_buying_guides   end   def teardown()     @ie.close   end   def browse_to_buying_guides()   end   def test_validateBreadCrumb()   end   def test_validateHeader()   end end # End: class TC_BuyingGuides_Validation < TestCase ******************************** When I try and run this I get four errors, first it doesn't understand Watir::IE, and the other errors stem from this error. Is this even the correct structure for a test case? I feel so stupid because I've been writing lower level stuff using Ruby and Watir for several months now, and I can't even do this simple test case! Please help me :) Thanks, Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6344&messageID=17860#17860 From christopher.mcmahon at gmail.com Tue Jan 30 16:37:30 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 30 Jan 2007 13:37:30 -0800 Subject: [Wtr-general] Watir Test Case Writing In-Reply-To: <64606817.1170191849447.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <64606817.1170191849447.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70701301337w58b0f2aerbb6912bbfd206a39@mail.gmail.com> It's worth learning. You probably should start by googling for "ruby test/unit". The best recommendation I have is to get a good book on the subject: "Programming Ruby 2nd Edition" has an excellent section on testing (and is worth having on general principles), and Brian Marick's new book "Everyday Scripting with Ruby" is also really good. Watir itself doesn't have it's own assertion rules, most people either rely on Ruby's 'test/unit' or roll their own. If you don't want to use 'test/unit', your basic building block is a conditional statement: if puts "Test passed!" else puts "Test failed!" end On 1/30/07, Nathan wrote: > He he, so I've written several libraries, spiders, and bots using Watir as my interface to the web through Internet Explorer now, and I never took the time to really get down and dirty with the basic testing stuff for which Watir was intended. I feel silly, but I need some help. I want to write some regular test cases right now, and I'm not really sure where to begin. First of all, there is no concise and clear documentation available that says, "Here is the basic structure of a test case, and this is what you need." That might be nice in the future! What I have so far is the following: > > require "rubygems" > require "watir/testcase" > > require_gem "watir", "= 1.5.1.1145" > > include Watir > > class TC_BuyingGuides_Validation < TestCase > >   def setup() >     @ie = Watir::IE.start("www.vehix.com") >     browse_to_buying_guides >   end > >   def teardown() >     @ie.close >   end > >   def browse_to_buying_guides() >   end > >   def test_validateBreadCrumb() >   end > >   def test_validateHeader() >   end > > end # End: class TC_BuyingGuides_Validation < TestCase > ******************************** > When I try and run this I get four errors, first it doesn't understand Watir::IE, and the other errors stem from this error. Is this even the correct structure for a test case? I feel so stupid because I've been writing lower level stuff using Ruby and Watir for several months now, and I can't even do this simple test case! > > Please help me :) > > Thanks, > > Nathan > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6344&messageID=17860#17860 > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From forum-watir-users at openqa.org Tue Jan 30 17:12:58 2007 From: forum-watir-users at openqa.org (Nathan) Date: Tue, 30 Jan 2007 16:12:58 CST Subject: [Wtr-general] Watir Test Case Writing In-Reply-To: <72799cd70701301337w58b0f2aerbb6912bbfd206a39@mail.gmail.com> Message-ID: <46134097.1170195208429.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> So if I understand correctly, creating a Watir Test Case relies solely on the Ruby Unit Test Framework? And that framework takes care of the actual launching of each test case or suite, as it were? Am I understanding correctly? Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6344&messageID=17867#17867 From christopher.mcmahon at gmail.com Tue Jan 30 17:18:29 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 30 Jan 2007 14:18:29 -0800 Subject: [Wtr-general] Watir Test Case Writing In-Reply-To: <46134097.1170195208429.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <72799cd70701301337w58b0f2aerbb6912bbfd206a39@mail.gmail.com> <46134097.1170195208429.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70701301418o54f2bb01q8c8fcba134d4acf1@mail.gmail.com> On 1/30/07, Nathan wrote: > So if I understand correctly, creating a Watir Test Case relies solely on the Ruby Unit Test Framework? And that framework takes care of the actual launching of each test case or suite, as it were? > > Am I understanding correctly? In a nutshell, yes. There are other assertion tools for testing, for instance Rspec, but it's probably wise to read up on 'test/unit' before you go too much further. -C From paul.rogers at shaw.ca Tue Jan 30 17:32:55 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 30 Jan 2007 15:32:55 -0700 Subject: [Wtr-general] Watir 1.4.1 and 1.5 gems can be installed In-Reply-To: <45BFA36F.4020809@pettichord.com> References: <44831515.1170186365134.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <45BFA36F.4020809@pettichord.com> Message-ID: there was also a bug I noticed in the last 1.5.1 gem ( not the one that was released a week or so ago ) where ole_object nil, and not the object I didnt report it, as I only found it a few days a go and the new gem fixed the problem Paul ----- Original Message ----- From: Bret Pettichord Date: Tuesday, January 30, 2007 12:58 pm Subject: Re: [Wtr-general] Watir 1.4.1 and 1.5 gems can be installed > Nathan wrote: > > Yeah, so when I request the OLE object via getOLEObject, I get > nil returned - don't know if that's a bug or an incompatibility > issue!!!> > > That method works in 1.4.1 and doesn't in 1.5.1 > This method was renamed to ole_object in 1.5, but we could include > an > alias to make it easier for people to upgrade to 1.5. Please log > this in > Jira so we don't forget it. > > Bret > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From forum-watir-users at openqa.org Tue Jan 30 17:33:56 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Tue, 30 Jan 2007 16:33:56 CST Subject: [Wtr-general] url for link In-Reply-To: <46358778.1170133940589.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <38633085.1170196466948.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> While I do like the answer that RyanD gave that that has not refreshed here yet, you [i]can[/i] access a link element from its "text" property. So with you code: add a term You can access this link in this manner: ie = IE.attach ( :title, "PageTitle" ) myAjaxLink = ie.link( :text, "add a term" ) Now it works, but do consider Ryan's suggestion in the longterm. Hope this helps :) Nathan Christie --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6325&messageID=17870#17870 From forum-watir-users at openqa.org Tue Jan 30 17:43:13 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Tue, 30 Jan 2007 16:43:13 CST Subject: [Wtr-general] Watir Test Case Writing In-Reply-To: <46134097.1170195208429.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <41614781.1170197041519.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Nathan, I've written thousands of Ruby unit tests that use Watir extensively for our web applications. If you have some more specific implementation / strategic questions that you want to take offline please feel free to shoot me an email: nathan -dot- christie -at- gmail -dot- com Good luck! Nathan Christie --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6344&messageID=17872#17872 From davegoodine at gmail.com Tue Jan 30 17:52:05 2007 From: davegoodine at gmail.com (david goodine) Date: Tue, 30 Jan 2007 16:52:05 -0600 Subject: [Wtr-general] saving screenshots with snagit Message-ID: <170aadc80701301452n123f2e48jbde397c1ae94f832@mail.gmail.com> Hello, I've found a couple posts that indicate that snagit's COM server can be used to capture screenshots while Watir runs tests. I've tried to implement something with this, but I am having trouble with the Autoscroll options. I have not been able to figure out how to set capture options except by using integers. However, I cannot find a reference for which integer corresponds to which option, so the process has been trial and error. What I have so far is below. When I view the resultant screen shots, they are not scrolled, so I cannot see the lower part of the web page: def screenCapture(client, environment, directory) # this method will use snagit to capture and save a screenshot to a directory require 'win32ole' # create snagit ole object: snagit = WIN32OLE.new('Snagit.ImageCapture') # set properties for the capture snagit.Input = 1 #capture a window snagit.Output = 2 #output to a file snagit.InputWindowOptions.SelectionMethod = 1 # select active window for capture # set the filename for the capture snagit.OutputImageFile.Filename = createScreenCaptureFilename("#{client}-#{environment}", directory) snagit.OutputImageFile.Directory = directory # set directy where filename will be saved snagit.OutputImageFile.FileNamingMethod = 1 # set naming method to fixed snagit.AutoScrollOptions.AutoScrollMethod = 0 # set autoscroll to vertical and horizontal snagit.OutputImageFile.ColorDepth = 5 # set color depth to 8 bits # do the capture snagit.Capture # verify that capture is done, then return while !snagit.IsCaptureDone if snagit.IsCaptureDone then return end end return end Does anyone have a reference for snagit that shows which integers correspond to which options? snagit version: 7.1 thanks in advance for any comments, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070130/6b96bf5e/attachment.html From forum-watir-users at openqa.org Tue Jan 30 17:56:35 2007 From: forum-watir-users at openqa.org (Nathan) Date: Tue, 30 Jan 2007 16:56:35 CST Subject: [Wtr-general] Watir Test Case Writing In-Reply-To: <41614781.1170197041519.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <57690507.1170197825702.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hmmm, So here is some output from a simpler test I've begun to write and I don't approve of this. If you can see that little dot, and notice the output, there is only one test. Now I want to break up my test into specific components, but I don't see that browsing to the page every time is very efficient, nor is it anything like the way that our commercial competitor (Watir's) QTP does things. So I'm thinking I'm going ot need to write my own framework ultimately, but anyway. So far I have two assertions in here, but they don't count as tests!? Also I want to reuse the same browser window, and I have encapsulated my test case in a class as you saw above. Basically my code is the same but now it works! :) The two assertions are two items that I validate on the page I get to finally. Is this making a whole lot of sense? In my previous experience using Watir to write crawlers and bots I haven't used the test framework, only the Watir framework, and I have found that to be more useful so far. Am I wrong? Started . Finished in 9.971 seconds. 1 tests, 2 assertions, 0 failures, 0 errors thanks, Nathan --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6344&messageID=17874#17874 From bret at pettichord.com Tue Jan 30 18:04:37 2007 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Jan 2007 17:04:37 -0600 Subject: [Wtr-general] Watir Test Case Writing In-Reply-To: <41614781.1170197041519.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <41614781.1170197041519.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45BFCF05.6020103@pettichord.com> Nathan Christie wrote: > Nathan, > > I've written thousands of Ruby unit tests that use Watir extensively for our web applications. If you have some more specific implementation / strategic questions that you want to take offline please feel free to shoot me an email: nathan -dot- christie -at- gmail -dot- com > > Good luck! > Nathan Christie > Until now, i thought you both were the same Nathan! From bret at pettichord.com Tue Jan 30 18:08:31 2007 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Jan 2007 17:08:31 -0600 Subject: [Wtr-general] custom attributes In-Reply-To: <27915010701292219o52c0fc43hd30da6b8a98602e6@mail.gmail.com> References: <003a01c74362$0cd0b950$6400a8c0@laptop> <27915010701290019p7664d08mcf5ffa68ce3c95f@mail.gmail.com> <27915010701292219o52c0fc43hd30da6b8a98602e6@mail.gmail.com> Message-ID: <45BFCFEF.7020601@pettichord.com> 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 From christopher.mcmahon at gmail.com Tue Jan 30 18:14:37 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 30 Jan 2007 15:14:37 -0800 Subject: [Wtr-general] Watir Test Case Writing In-Reply-To: <57690507.1170197825702.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <41614781.1170197041519.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <57690507.1170197825702.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70701301514y51bffb3cr73b282899276ab15@mail.gmail.com> On 1/30/07, Nathan wrote: > Hmmm, > So here is some output from a simpler test I've begun to write and I don't approve of this. If you can see that little dot, and notice the output, there is only one test. Seriously, get a book pretty soon. The dot means that the test passed. An "F" means failure, and an "E" means error. Within your Test::Unit::TestCase, every method that starts with the characters "test_" will be considered one pass or one fail, regardless of how many assertions that method contains. You are free to have one assertion per "test_" method, or as many as you like. Now I want to break up my test into specific components, but I don't see that browsing to the page every time is very efficient, nor is it anything like the way that our commercial competitor (Watir's) QTP does things. This is generally considered a feature. :) So I'm thinking I'm going ot need to write my own framework ultimately, but anyway. So far I have two assertions in here, but they don't count as tests!? If you want them to be two different tests, put them into two different "test_" methods. Just BTW, the behavior upon failure *is* probably what you want. You should try it out. Also, my personal advice is to relax for awhile about the framework, and get a good solid understanding of the 19 (!) different assert() methods that Ruby provides; then look into what the Rails people have done with custom assert() methods, and investigate Rspec, before you get all framework-wacky. I don't mind answering these questions, you're definitely on the right track, but you're moving fast enough now to need to read up. -Chris From bret at pettichord.com Tue Jan 30 18:16:24 2007 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Jan 2007 17:16:24 -0600 Subject: [Wtr-general] Watir 1.4.1 and 1.5 gems can be installed In-Reply-To: <45902822.1170189003784.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <45902822.1170189003784.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45BFD1C8.6040100@pettichord.com> Nathan wrote: > When I use for example footerDiv = ie.div(:id, "FooterContainer") on our website, all of which is valid, then do oleObj = footerDiv.ole_object, I also get nil. So something must have happened!? I am using Watir 1.5.1.1145. > > Also how should I report something in JIRA? I don't see a standard template, and I have no idea who to assign it to, etc. > 1. Log in on OpenQA. 2. Goto http://jira.openqa.org/browse/WTR 3. Click the Create New Issue button. If you create the ticket, we will make sure it gets assigned. (You can leave it at "automatic"). You will also be notified when the status of ticket changes. Bret From forum-watir-users at openqa.org Tue Jan 30 18:16:59 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Tue, 30 Jan 2007 17:16:59 CST Subject: [Wtr-general] Watir Test Case Writing In-Reply-To: <57690507.1170197825702.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <52960510.1170199059025.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Yes, I feel your pain on that one. If you're only using Watir, such as I am currently, I found that it usually is best to build your own [test] framework / API for your particular application. It's actually sort of fun to build an API using Watir; there's nothing better than three or four layers of abstraction to simplify things :) The goal of your API should be to mimic business and user functions so that you'll build the tools (methods) you need to create a comprehensive automated test suite using Ruby/Watir. I would create a class that represents the object your are testing, then build methods that control it. So for example, write Watir methods for this classs that allow a user to login, process a claim, make a payment, then logout. Once you have these simple functions in place, stick your custom class as a [ require 'MyApp' ] inside of your test suite / case. Now you can use these methods in your test cases. require 'test/unit' require 'IS' # <<< my custom class representing class TC_LoginScreen < Test::Unit::TestCase def setup() $is = IS.new( "http://serverName/login.aspx" ) end def test_login_incorrect_password() $is.login( "username", "badPassword" ) assert_equal( $is.get_errors(), "Invalid Password", "Password error should have been displayed." ) end def test_login_correct_password() $is.login( "username, "goodPassword" ) assert_nil( $is.get_errors(), "No errors should have been thrown." ) end You get the picture, also, it's usually best practice to limit your assertions to one per test case. More to come with questions, Nathan Christie --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6344&messageID=17878#17878 From forum-watir-users at openqa.org Tue Jan 30 18:19:47 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Tue, 30 Jan 2007 17:19:47 CST Subject: [Wtr-general] Watir Test Case Writing In-Reply-To: <45BFCF05.6020103@pettichord.com> Message-ID: <38095225.1170199217853.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Sometimes I've even been confused when glancing at thread lists quickly. I'm like, "I didn't post that!" and such. The more Nathan's the merrier I think :) --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6344&messageID=17879#17879 From bret at pettichord.com Tue Jan 30 18:20:30 2007 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Jan 2007 17:20:30 -0600 Subject: [Wtr-general] Watir Test Case Writing In-Reply-To: <57690507.1170197825702.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <57690507.1170197825702.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45BFD2BE.3040108@pettichord.com> If you want to see something fancier, use the "-rt" switch when you run the test. For example: >ruby my-test.rb -rt Try it. You'll like it! From christopher.mcmahon at gmail.com Tue Jan 30 18:29:52 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 30 Jan 2007 15:29:52 -0800 Subject: [Wtr-general] Watir Test Case Writing In-Reply-To: <45BFD2BE.3040108@pettichord.com> References: <57690507.1170197825702.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <45BFD2BE.3040108@pettichord.com> Message-ID: <72799cd70701301529i5926dfbaj6f523e18865389ad@mail.gmail.com> On 1/30/07, Bret Pettichord wrote: > If you want to see something fancier, use the "-rt" switch when you run > the test. For example: > > >ruby my-test.rb -rt > > Try it. You'll like it! That's slicker than dog snot on a doorknob, I've never tried that before! I'm running my whole SOAP suite in it right now. The GUI is really unresponsive and the tests are slow, but the eye candy is great. I assume the little TCL logo is because it's done in Ruby/Tk, not because there's real TCL anywhere? -Chris From forum-watir-users at openqa.org Tue Jan 30 18:30:28 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Tue, 30 Jan 2007 17:30:28 CST Subject: [Wtr-general] Watir Test Case Writing In-Reply-To: <57690507.1170197825702.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45491044.1170199859107.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> As for the whole browser reusing issue, it's really all about how you want to implement it. There is the Watir method in the IE object `attach( :how, what )` that is very helpful for this. Depending on the innerworkings of your application as they pertain to cookies, session ids, etc., it may be best to "log out" of your application if this is applicable, or you may want to close the browser at the end of each test. Ideally your tests should be very granular and map as closely to the business process the user would have to work through. If you create a custom class for your app, just make the method that initializes the object in your Unit Test's "setup()" method conditional. Setups a begin / catch / ensure exception handling block that first attempts to attach (Watir::IE::attach()) to your IE windows, if the exception is throw, just handle it by instantiating a new window using (Watir::IE::start()). I'm not sure of your particular application's behavior, and you may need to close the browser window after each test and create a new one at the beginning of each test. This would probably be rare though. Although it does increase overall test [suite] execution time, it's probably a good practice to do so. Let me know if you need any more explanation on this, as I felt I was kinda rambling. Thanks! Nathan Christie --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6344&messageID=17883#17883 From christopher.mcmahon at gmail.com Tue Jan 30 18:35:12 2007 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 30 Jan 2007 15:35:12 -0800 Subject: [Wtr-general] Watir Test Case Writing In-Reply-To: <52960510.1170199059025.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <57690507.1170197825702.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <52960510.1170199059025.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <72799cd70701301535l17d1d066xd67a37218934c18a@mail.gmail.com> > You get the picture, also, it's usually best practice to limit your assertions to one per test case. In general, I agree, but I also find it's often useful to have multiple assertions in one test case, where the test case maps to a business function, and you need information about the whole business function. My example is for SOAP API functions. I have one test method for each API function available. Each test method contains a number of assertions about that function. That buys me two things: first, a failure tells me that the entire API function is suspicious and needs investigation. Second, a failure for one API function does not stop the tests for the other functions from running, and I don't have to build try/catch logic into individual assertions. From forum-watir-users at openqa.org Tue Jan 30 18:49:45 2007 From: forum-watir-users at openqa.org (Nathan) Date: Tue, 30 Jan 2007 17:49:45 CST Subject: [Wtr-general] Watir Test Case Writing In-Reply-To: <72799cd70701301535l17d1d066xd67a37218934c18a@mail.gmail.com> Message-ID: <37860853.1170201015634.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Cool stuff, I'll need to reread some of these posts for sure. As for the framework writing thing - I've already written and rewritten three frameworks using Watir as a helper. One for a script launching agent, one for a bot, and one for a spider ( at one instance the bot and spider used the same framework, but not anymore). Now I'm working to simplify all of that and make it more robust. I'm still using Watir 1.4.1 because 1.5 hasn't been "released" (I think). And so writing a framework would be much less than a big deal to me. I can pretty well fork out a framework in less than a week, maybe a couple of days at best. Thanks, much to ponder, Nathan L ;) --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6344&messageID=17886#17886 From bret at pettichord.com Tue Jan 30 19:13:58 2007 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Jan 2007 18:13:58 -0600 Subject: [Wtr-general] Watir Test Case Writing In-Reply-To: <72799cd70701301529i5926dfbaj6f523e18865389ad@mail.gmail.com> References: <57690507.1170197825702.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <45BFD2BE.3040108@pettichord.com> <72799cd70701301529i5926dfbaj6f523e18865389ad@mail.gmail.com> Message-ID: <45BFDF46.9020604@pettichord.com> Chris McMahon wrote: > I assume the little TCL logo is because it's done in Ruby/Tk, not > because there's real TCL anywhere? > Yes it is Ruby/TK. From bret at pettichord.com Tue Jan 30 19:17:41 2007 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Jan 2007 18:17:41 -0600 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: <45BFE025.2050506@pettichord.com> Naga Harish Kanegolla wrote: > Hi all, > Till now I am using ie.link(:url,"http"//www.xyz/abc.html") for a link in watir.Now I have a problem for the ajax link. i.e., the url obtained in the html source is > add a term > > So how could i use this url for the link in watir?? Please tell me the syntax in watir for using such type of ajax links. Actually i am having the same "add a term" more than 10 . so i can't use the text link.Please help me out such types. > In addition to the other suggestions, this will work in 1.5: ie.link(:html, /contract_id=227/).click From bret at pettichord.com Tue Jan 30 19:43:36 2007 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Jan 2007 18:43:36 -0600 Subject: [Wtr-general] BUG: Using XPath In-Reply-To: <27915010701290430p3a0e62e9k3b4b3e9103891641@mail.gmail.com> References: <27915010701250120i7e725508j6f9ad12eb490e6ff@mail.gmail.com> <27915010701290430p3a0e62e9k3b4b3e9103891641@mail.gmail.com> Message-ID: On 1/29/07, Prema Arya wrote: > > Please find the attached patch fixing the xpath issue. > Thanks. This has been committed to trunk. http://svn.openqa.org/fisheye/changelog/watir?cs=1150 Bret -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070130/8a7e9621/attachment.html From bret at pettichord.com Tue Jan 30 21:04:37 2007 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Jan 2007 20:04:37 -0600 Subject: [Wtr-general] installing watir from trunk In-Reply-To: References: Message-ID: <45BFF935.6010409@pettichord.com> ?eljko Filipin wrote: > I checked out Watir with TortoiseSVN and build a gem from revision > 1142. But when I built the gem, it had name watir-1.5.1.1141.gem > (revision number is not the same as the number in the gem name). Is > that OK, or am I doing something wrong? Watir actually gets its version number from the revision of the watir.rb file. In your case it was last changed in 1141 and 1142 only affected other files. In other words, this is fine. > I installed and executed tests while logged in as administrator. Ruby > is ruby 1.8.5 (2006-08-25) [i386-mswin32], IE is 7. > > >gem build watir.gemspec > Successfully built RubyGem > Name: watir > Version: 1.5.1.1141 > File: watir-1.5.1.1141.gem > > Just to let you know, here are results of unit tests. > > core_tests.rb > > 1) Failure: > test_exists(TC_IE_Exists) > [C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1141/unitt > ests/../unittests/ie_exists_test.rb:15]: > is not true. > > 195 tests, 1083 assertions, 1 failures, 0 errors I have not seen this error before. This looks like an IE7 bug in Watir. I've opened up this jira ticket: http://jira.openqa.org/browse/WTR-138 > all_tests.rb > > 332 tests, 289 assertions, 5 failures, 277 errors > > I did not post output of all_test.rb because it is to verbose, I can > send it if somebody wants to take a look. There are many known problems here. I wrote up a general ticket to remind us to clean this up. http://jira.openqa.org/browse/WTR-137 Thank you very much for the reports. Bret From bret at pettichord.com Tue Jan 30 21:07:06 2007 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 30 Jan 2007 20:07:06 -0600 Subject: [Wtr-general] Watir 1.4.1 and 1.5 gems can be installed In-Reply-To: <45BFAAAC.4030408@pettichord.com> References: <44831515.1170186365134.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <45BFAAAC.4030408@pettichord.com> Message-ID: <45BFF9CA.3060408@pettichord.com> Bret Pettichord wrote: > This probably counts as a bug. I'd be happy to see it in Jira. > I just entered this. http://jira.openqa.org/browse/WTR-139 From paul.rogers at shaw.ca Tue Jan 30 22:24:22 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 30 Jan 2007 20:24:22 -0700 Subject: [Wtr-general] bug with text_fields.show References: <009801c74423$489ea890$6400a8c0@laptop> <45BFA2F1.4040404@pettichord.com> Message-ID: <011401c744e7$4d4b8ec0$6400a8c0@laptop> in Jira, issue 140 http://jira.openqa.org/browse/WTR-140 ----- Original Message ----- From: "Bret Pettichord" To: Sent: Tuesday, January 30, 2007 12:56 PM Subject: Re: [Wtr-general] bug with text_fields.show > Paul Rogers wrote: >> This seems to be the same issue as wtr-93 ( >> http://jira.openqa.org/browse/WTR-93 ) but for text fields and areas. > Could you please report this issue in Jira? > > Bret > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Tue Jan 30 22:53:07 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 30 Jan 2007 20:53:07 -0700 Subject: [Wtr-general] http_error_checker on IE7 Message-ID: <012b01c744eb$519633f0$6400a8c0@laptop> the http_checker I wrote ages ago doesnt appear to work on IE7. How should we handle this? An if statement on the document.navigator object? Ive included the html of a page that causes a 404 error Let me know how you'd like to handle the different browsers and I'll write the code for it Paul HTTP 404 Not Found
Info icon

The webpage cannot be found

 HTTP 404
 

Most likely causes:

  • There might be a typing error in the address.
  • If you clicked on a link, it may be out of date.
 

What you can try:

 

Retype the address.

 

 

Go to  and look for the information you want.

 

More information

This error (HTTP 404 Not Found) means that Internet Explorer was able to connect to the website, but the page you wanted was not found. It's possible that the webpage is temporarily unavailable. Alternatively, the website might have changed or removed the webpage.

For more information about HTTP errors, see Help.

-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070130/147bed84/attachment-0001.html From paul.rogers at shaw.ca Tue Jan 30 23:19:15 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 30 Jan 2007 21:19:15 -0700 Subject: [Wtr-general] http_error_checker on IE7 References: <012b01c744eb$519633f0$6400a8c0@laptop> Message-ID: <013e01c744ee$f853dfa0$6400a8c0@laptop> Ive posted a fix in Jira 141 sorry its not an svn patch, but I havent got the sorce checked out Paul ----- Original Message ----- From: Paul Rogers To: wtr-general at rubyforge.org Sent: Tuesday, January 30, 2007 8:53 PM Subject: [Wtr-general] http_error_checker on IE7 the http_checker I wrote ages ago doesnt appear to work on IE7. How should we handle this? An if statement on the document.navigator object? Ive included the html of a page that causes a 404 error Let me know how you'd like to handle the different browsers and I'll write the code for it Paul HTTP 404 Not Found
Info icon

The webpage cannot be found

 HTTP 404
 

Most likely causes:

  • There might be a typing error in the address.
  • If you clicked on a link, it may be out of date.
 

What you can try:

 

Retype the address.

 

 

Go to  and look for the information you want.

 

More information

This error (HTTP 404 Not Found) means that Internet Explorer was able to connect to the website, but the page you wanted was not found. It's possible that the webpage is temporarily unavailable. Alternatively, the website might have changed or removed the webpage.

For more information about HTTP errors, see Help.

------------------------------------------------------------------------------ _______________________________________________ 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/20070130/df943654/attachment-0001.html From forum-watir-users at openqa.org Wed Jan 31 01:14:00 2007 From: forum-watir-users at openqa.org (Naga Harish Kanegolla) Date: Wed, 31 Jan 2007 00:14:00 CST Subject: [Wtr-general] url for link In-Reply-To: <38633085.1170196466948.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <53471130.1170224070525.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hi, I tried using ie.link(:text,"add a term") but i have "add a term" link more than 10 in the same page. So how could i use that?? --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6325&messageID=17906#17906 From forum-watir-users at openqa.org Wed Jan 31 01:25:10 2007 From: forum-watir-users at openqa.org (Bret Pettichord) Date: Wed, 31 Jan 2007 00:25:10 CST Subject: [Wtr-general] http_error_checker on IE7 In-Reply-To: <013e01c744ee$f853dfa0$6400a8c0@laptop> Message-ID: <45972555.1170224740249.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Paul, Please go ahead and commit this change. Bret --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6349&messageID=17908#17908 From forum-watir-users at openqa.org Wed Jan 31 01:46:39 2007 From: forum-watir-users at openqa.org (Maloy kanti debnath) Date: Wed, 31 Jan 2007 00:46:39 CST Subject: [Wtr-general] hi, not able to use assert Message-ID: <53117953.1170226029039.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> hi, I am not able to use assert method . i tried the following code but its giving an error require 'watir' include Watir require 'test/unit' ie = IE.new ie.goto("www.google.com") assert( ie.contains_text('Welcome to your Google homepage') ) and the error i got is test.rb:6: undefined method `assert' for # (NoMethodError) please help me out thank you, Maloy --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6352&messageID=17909#17909 From mrussell at inpses.co.uk Wed Jan 31 04:24:10 2007 From: mrussell at inpses.co.uk (Max Russell) Date: Wed, 31 Jan 2007 09:24:10 -0000 Subject: [Wtr-general] Clicking on a flash element Message-ID: Hi- If a page uses a Flash element (in this case a debug message) is there any way to click on this element? Even if outwith the scope of WATIR, does anyone know a library for driving Flash at all? Max Russell Test Analyst. INPS Tel: 01382 223900 Fax: 01382 204488 Visit our Web site at www.inps.co.uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of In Practice Systems Limited or any of its affiliates. If you are not the intended recipient please contact is.helpdesk at inps.co.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070131/417b94bb/attachment.html From richard.conroy at gmail.com Wed Jan 31 06:02:47 2007 From: richard.conroy at gmail.com (Richard Conroy) Date: Wed, 31 Jan 2007 11:02:47 +0000 Subject: [Wtr-general] Watir Test Case Writing In-Reply-To: <41614781.1170197041519.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <46134097.1170195208429.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> <41614781.1170197041519.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <511fa3a20701310302l6a7207e1n7998b611a5c76956@mail.gmail.com> On 1/30/07, Nathan Christie wrote: > Nathan, > > I've written thousands of Ruby unit tests that use Watir extensively for our web applications. If you have some more specific implementation / strategic questions that you want to take offline please feel free to shoot me an email: nathan -dot- christie -at- gmail -dot- com Nathan, some of us wouldn't be too upset if you shared this on the list (i.e. I am dead curious about what works for you). I have done some complicated testing with WATIR and was impressed, but i felt that Iwas on my own when it came to assembling WATIR tests into a framework, that could discover and execute tests and produce a test report. In both cases I had to write my own Ruby code for this. I felt this was an unnecessary burden, and not something that would be achievable by our testers. I suppose I wanted a test/unit style execution & report harness around my WATIR tests. In my inexperience I never considered that I could just *wrap* the WATIR tests in test/unit. You miss the best solutions precisely because they are staring you in the face. From carl.l.shaulis at convergys.com Wed Jan 31 07:51:11 2007 From: carl.l.shaulis at convergys.com (carl.l.shaulis at convergys.com) Date: Wed, 31 Jan 2007 06:51:11 -0600 Subject: [Wtr-general] hi, not able to use assert In-Reply-To: <53117953.1170226029039.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Good morning: Perhaps you could try something like this: #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' include REXML include Watir class Google_Test < Test::Unit::TestCase include Watir def setup @ie = IE.new @ie.goto("http://www.google.com") end def test1 # User clicks on sign in link assert(@ie.link(:text, "Make Google Your Homepage!").exists?) @ie.link(:text, "Make Google Your Homepage!").click end end Good luck! Carl From forum-watir-users at openqa.org Wed Jan 31 09:25:55 2007 From: forum-watir-users at openqa.org (Bret Pettichord) Date: Wed, 31 Jan 2007 08:25:55 CST Subject: [Wtr-general] hi, not able to use assert In-Reply-To: <53117953.1170226029039.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <36260961.1170253585982.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> add this line: require 'test/unit/assertions' --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6352&messageID=17922#17922 From forum-watir-users at openqa.org Wed Jan 31 10:31:54 2007 From: forum-watir-users at openqa.org (Nathan Christie) Date: Wed, 31 Jan 2007 09:31:54 CST Subject: [Wtr-general] url for link In-Reply-To: <53471130.1170224070525.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <61420021.1170257544335.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> I like Bret's idea :) --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6325&messageID=17925#17925 From forum-watir-users at openqa.org Wed Jan 31 09:09:48 2007 From: forum-watir-users at openqa.org (vijay) Date: Wed, 31 Jan 2007 08:09:48 CST Subject: [Wtr-general] Unable to access a modal dialog box to select a particular value from it Message-ID: <57487289.1170252618955.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Hello people, In my application, when I select a particular value in a 'list box', a dialog named 'Select -- Web Page Dialog' gets displayed as a small window (1/4th the size of the original window). I want to select a particular value, among a list of values displayed, in this 'Dialog' and click the 'Ok' button in that. How do I do that? I think it is a modal dialog box. In this modal dialog box, there is a list of values displayed. How can I get the property (like id, name etc.) of this list to access it? Thanks, in Advance, Vijay. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6357&messageID=17920#17920 From angrez at gmail.com Wed Jan 31 09:27:34 2007 From: angrez at gmail.com (Angrez Singh) Date: Wed, 31 Jan 2007 19:57:34 +0530 Subject: [Wtr-general] how to populate hidden text area? In-Reply-To: <001401c74439$057b9bc0$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> Message-ID: 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/20070131/490853f4/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 6366 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20070131/490853f4/attachment-0001.jpg From zeljko.filipin at gmail.com Wed Jan 31 10:57:20 2007 From: zeljko.filipin at gmail.com (=?UTF-8?Q?=C5=BDeljko_Filipin?=) Date: Wed, 31 Jan 2007 16:57:20 +0100 Subject: [Wtr-general] installing watir from trunk In-Reply-To: <45BFF935.6010409@pettichord.com> References: <45BFF935.6010409@pettichord.com> Message-ID: On 1/31/07, Bret Pettichord wrote: > > Thank you very much for the reports. > I love to report bugs. :) -- Zeljko Filipin zeljkofilipin.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070131/8a809534/attachment.html From charley.baker at gmail.com Wed Jan 31 11:19:07 2007 From: charley.baker at gmail.com (Charley Baker) Date: Wed, 31 Jan 2007 09:19:07 -0700 Subject: [Wtr-general] http_error_checker on IE7 In-Reply-To: <45972555.1170224740249.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <013e01c744ee$f853dfa0$6400a8c0@laptop> <45972555.1170224740249.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Paul, I committed the change in svn after testing it on IE6 and IE7. -Charley On 1/30/07, Bret Pettichord wrote: > > Paul, > > Please go ahead and commit this change. > > Bret > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6349&messageID=17908#17908 > _______________________________________________ > 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/20070131/a0ab8b53/attachment.html From forum-watir-users at openqa.org Wed Jan 31 11:20:25 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Wed, 31 Jan 2007 10:20:25 CST Subject: [Wtr-general] Unable to access a modal dialog box to select a particular value from i In-Reply-To: <57487289.1170252618955.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <43578875.1170260455948.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Good question, heres my trick. Download a product called spysmith (its linked in the wiki, but i'm sure google can find it). After you install this spysmith allows you to see HTML values of any web page (including modal). The real trick though is that it allows you to see ALL the HTML. So what I do is get all the HTML, save it to a file on my desktop and open it. I'm then able to use the IE dev bar (or connect using the IRB show_all_objects etc) because its now just a normal web page. Hope that helps. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6357&messageID=17931#17931 From charley.baker at gmail.com Wed Jan 31 11:43:31 2007 From: charley.baker at gmail.com (Charley Baker) Date: Wed, 31 Jan 2007 09:43:31 -0700 Subject: [Wtr-general] saving screenshots with snagit In-Reply-To: <170aadc80701301452n123f2e48jbde397c1ae94f832@mail.gmail.com> References: <170aadc80701301452n123f2e48jbde397c1ae94f832@mail.gmail.com> Message-ID: There are some sample programs using the com binding on Techsmith's website and minimal COM api docs. You might also take a look at Aslak Hellesoy's screenshot library for Ruby: http://blog.aslakhellesoy.com/articles/2006/12/02/getting-screenshots-from-watir -Charley On 1/30/07, david goodine wrote: > > Hello, > > I've found a couple posts that indicate that snagit's COM server can be > used to capture screenshots while Watir runs tests. > > I've tried to implement something with this, but I am having trouble with > the Autoscroll options. I have not been able to figure out how to set > capture options except by using integers. However, I cannot find a > reference for which integer corresponds to which option, so the process has > been trial and error. > > What I have so far is below. When I view the resultant screen shots, they > are not scrolled, so I cannot see the lower part of the web page: > > def screenCapture(client, environment, directory) > # this method will use snagit to capture and save a screenshot to a > directory > require 'win32ole' > > # create snagit ole object: > snagit = WIN32OLE.new('Snagit.ImageCapture') > > # set properties for the capture > snagit.Input = 1 #capture a window > snagit.Output = 2 #output to a file > snagit.InputWindowOptions.SelectionMethod = 1 # select active window > for capture > # set the filename for the capture > snagit.OutputImageFile.Filename = > createScreenCaptureFilename("#{client}-#{environment}", directory) > snagit.OutputImageFile.Directory = directory # set directy > where filename will be saved > snagit.OutputImageFile.FileNamingMethod = 1 # set naming method > to fixed > snagit.AutoScrollOptions.AutoScrollMethod = 0 # set autoscroll to > vertical and horizontal > snagit.OutputImageFile.ColorDepth = 5 # set color depth > to 8 bits > > # do the capture > snagit.Capture > > # verify that capture is done, then return > while !snagit.IsCaptureDone > if snagit.IsCaptureDone then > return > end > end > > return > > end > > > Does anyone have a reference for snagit that shows which integers > correspond to which options? > > snagit version: 7.1 > > thanks in advance for any comments, > Dave > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070131/55c69ee8/attachment.html From paul.rogers at shaw.ca Wed Jan 31 11:52:52 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 31 Jan 2007 09:52:52 -0700 Subject: [Wtr-general] http_error_checker on IE7 In-Reply-To: References: <013e01c744ee$f853dfa0$6400a8c0@laptop> <45972555.1170224740249.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: I was about to reply that I wasnt happy with the way this works. For example a site that has this 200 Days till Christmas would get reported as an http error I think we need to check for the existance of something else before raising the exception. Do you test on 2 pcs, or is there some magic that lets me have IE6 and IE7 on the same PC? Paul -------------- next part -------------- Paul, I committed the change in svn after testing it on IE6 and IE7. -Charley On 1/30/07, Bret Pettichord wrote: > > Paul, > > Please go ahead and commit this change. > > Bret > --------------------------------------------------------------------- > Posted via Jive Forums > http://forums.openqa.org/thread.jspa?threadID=6349&messageID=17908#17908 > _______________________________________________ > 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/20070131/87fac207/attachment.html -------------- next part -------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Wed Jan 31 11:58:07 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 31 Jan 2007 09:58:07 -0700 Subject: [Wtr-general] saving screenshots with snagit In-Reply-To: References: <170aadc80701301452n123f2e48jbde397c1ae94f832@mail.gmail.com> Message-ID: I have some code ( that someone else fixed for me - Im sorrry but I cant remmeber your name ) that probably does the same as win32::screenshot I was intending to check it in in place of the nasty hack that uses the paint program The problem was that it only saves bmp, but the default on the paint was jpg, and I wasnt keen on breaking existing stuff. And I was too busy to do it anyway ;-) But this code would be a good interim step if we didnt mind the default file type to be bmp Paul -------------- next part -------------- There are some sample programs using the com binding on Techsmith's website and minimal COM api docs. You might also take a look at Aslak Hellesoy's screenshot library for Ruby: http://blog.aslakhellesoy.com/articles/2006/12/02/getting-screenshots-from-watir -Charley On 1/30/07, david goodine wrote: > > Hello, > > I've found a couple posts that indicate that snagit's COM server can be > used to capture screenshots while Watir runs tests. > > I've tried to implement something with this, but I am having trouble with > the Autoscroll options. I have not been able to figure out how to set > capture options except by using integers. However, I cannot find a > reference for which integer corresponds to which option, so the process has > been trial and error. > > What I have so far is below. When I view the resultant screen shots, they > are not scrolled, so I cannot see the lower part of the web page: > > def screenCapture(client, environment, directory) > # this method will use snagit to capture and save a screenshot to a > directory > require 'win32ole' > > # create snagit ole object: > snagit = WIN32OLE.new('Snagit.ImageCapture') > > # set properties for the capture > snagit.Input = 1 #capture a window > snagit.Output = 2 #output to a file > snagit.InputWindowOptions.SelectionMethod = 1 # select active window > for capture > # set the filename for the capture > snagit.OutputImageFile.Filename = > createScreenCaptureFilename("#{client}-#{environment}", directory) > snagit.OutputImageFile.Directory = directory # set directy > where filename will be saved > snagit.OutputImageFile.FileNamingMethod = 1 # set naming method > to fixed > snagit.AutoScrollOptions.AutoScrollMethod = 0 # set autoscroll to > vertical and horizontal > snagit.OutputImageFile.ColorDepth = 5 # set color depth > to 8 bits > > # do the capture > snagit.Capture > > # verify that capture is done, then return > while !snagit.IsCaptureDone > if snagit.IsCaptureDone then > return > end > end > > return > > end > > > Does anyone have a reference for snagit that shows which integers > correspond to which options? > > snagit version: 7.1 > > thanks in advance for any comments, > Dave > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070131/de469ccf/attachment-0001.html -------------- next part -------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Wed Jan 31 12:02:46 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 31 Jan 2007 10:02:46 -0700 Subject: [Wtr-general] Clicking on a flash element In-Reply-To: References: Message-ID: can you set focus to a control and then use auto-it to send TAB until the flash has focus and then send another auto-it command? I think there is something for testing flash, but I cant find it right now ( I found this, but it wasnt what I was looking for: http://sourceforge.net/projects/asunit ) -------------- next part -------------- Hi- If a page uses a Flash element (in this case a debug message) is there any way to click on this element? Even if outwith the scope of WATIR, does anyone know a library for driving Flash at all? Max Russell Test Analyst. INPS Tel: 01382 223900 Fax: 01382 204488 Visit our Web site at www.inps.co.uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of In Practice Systems Limited or any of its affiliates. If you are not the intended recipient please contact is.helpdesk at inps.co.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070131/b18f5e9f/attachment.html -------------- next part -------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From charley.baker at gmail.com Wed Jan 31 12:30:23 2007 From: charley.baker at gmail.com (Charley Baker) Date: Wed, 31 Jan 2007 10:30:23 -0700 Subject: [Wtr-general] http_error_checker on IE7 In-Reply-To: References: <013e01c744ee$f853dfa0$6400a8c0@laptop> <45972555.1170224740249.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Good point, I'm looking at a good way to tell if the navigation fails in IE7. So far the best way I can find is to check the url for res://..../dnserror.htm There may be other pages that get used for other errors though - 500 responses, etc. I'm using two machines to test. There is however, some magic available to run both browsers on one machine: http://blogs.msdn.com/ie/archive/2006/11/30/ie6-and-ie7-running-on-a-single-machine.aspx -Charley On 1/31/07, Paul Rogers wrote: > > I was about to reply that I wasnt happy with the way this works. > > For example a site that has this > > > 200 Days till Christmas > > > would get reported as an http error > I think we need to check for the existance of something else before > raising the exception. > > Do you test on 2 pcs, or is there some magic that lets me have IE6 and IE7 > on the same PC? > > Paul > > Paul, > I committed the change in svn after testing it on IE6 and IE7. > -Charley > > On 1/30/07, Bret Pettichord < forum-watir-users at openqa.org> wrote: > > > > Paul, > > > > Please go ahead and commit this change. > > > > Bret > > --------------------------------------------------------------------- > > Posted via Jive Forums > > http://forums.openqa.org/thread.jspa?threadID=6349&messageID=17908#17908 > > > > _______________________________________________ > > 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/20070131/6b9374f7/attachment.html From paul.rogers at shaw.ca Wed Jan 31 12:47:28 2007 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 31 Jan 2007 10:47:28 -0700 Subject: [Wtr-general] http_error_checker on IE7 In-Reply-To: References: <013e01c744ee$f853dfa0$6400a8c0@laptop> <45972555.1170224740249.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: i looked at the url yesterday ( just quickly mind ) and in the browser it showed as res:.. but from watir it just gave me the url of the page that I was trying to get to Paul -------------- next part -------------- Good point, I'm looking at a good way to tell if the navigation fails in IE7. So far the best way I can find is to check the url for res://..../dnserror.htm There may be other pages that get used for other errors though - 500 responses, etc. I'm using two machines to test. There is however, some magic available to run both browsers on one machine: http://blogs.msdn.com/ie/archive/2006/11/30/ie6-and-ie7-running-on-a-single-machine.aspx -Charley On 1/31/07, Paul Rogers wrote: > > I was about to reply that I wasnt happy with the way this works. > > For example a site that has this > > > 200 Days till Christmas > > > would get reported as an http error > I think we need to check for the existance of something else before > raising the exception. > > Do you test on 2 pcs, or is there some magic that lets me have IE6 and IE7 > on the same PC? > > Paul > > Paul, > I committed the change in svn after testing it on IE6 and IE7. > -Charley > > On 1/30/07, Bret Pettichord < forum-watir-users at openqa.org> wrote: > > > > Paul, > > > > Please go ahead and commit this change. > > > > Bret > > --------------------------------------------------------------------- > > Posted via Jive Forums > > http://forums.openqa.org/thread.jspa?threadID=6349&messageID=17908#17908 > > > > _______________________________________________ > > 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/20070131/2537b485/attachment.html -------------- next part -------------- _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Wed Jan 31 13:10:32 2007 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 31 Jan 2007 12:10:32 -0600 Subject: [Wtr-general] Unable to access a modal dialog box to select a particular value from i In-Reply-To: <43578875.1170260455948.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> References: <43578875.1170260455948.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <45C0DB98.3060508@pettichord.com> Another option is to use this script: puts $ie.modal_dialog.html From charley.baker at gmail.com Wed Jan 31 13:33:59 2007 From: charley.baker at gmail.com (Charley Baker) Date: Wed, 31 Jan 2007 11:33:59 -0700 Subject: [Wtr-general] http_error_checker on IE7 In-Reply-To: References: <013e01c744ee$f853dfa0$6400a8c0@laptop> <45972555.1170224740249.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: Noticed that too, but Watir does store it in the @url_list in the wait method before it calls run_error_checks. Which would require checking the url on the unless condition to add res errors regardless of already in the list. -c On 1/31/07, Paul Rogers wrote: > > i looked at the url yesterday ( just quickly mind ) and in the browser it > showed as res:.. > but from watir it just gave me the url of the page that I was trying to > get to > > Paul > > Good point, I'm looking at a good way to tell if the navigation fails in > IE7. So far the best way I can find is to check the url for > res://..../dnserror.htm There may be other pages that get used for other > errors though - 500 responses, etc. > > I'm using two machines to test. There is however, some magic available to > run both browsers on one machine: > > http://blogs.msdn.com/ie/archive/2006/11/30/ie6-and-ie7-running-on-a-single-machine.aspx > > -Charley > > On 1/31/07, Paul Rogers < paul.rogers at shaw.ca> wrote: > > > > I was about to reply that I wasnt happy with the way this works. > > > > For example a site that has this > > > > > > 200 Days till Christmas > > > > > > would get reported as an http error > > I think we need to check for the existance of something else before > > raising the exception. > > > > Do you test on 2 pcs, or is there some magic that lets me have IE6 and > > IE7 on the same PC? > > > > Paul > > > > Paul, > > I committed the change in svn after testing it on IE6 and IE7. > > -Charley > > > > On 1/30/07, Bret Pettichord < forum-watir-users at openqa.org> wrote: > > > > > > Paul, > > > > > > Please go ahead and commit this change. > > > > > > Bret > > > --------------------------------------------------------------------- > > > Posted via Jive Forums > > > http://forums.openqa.org/thread.jspa?threadID=6349&messageID=17908#17908 > > > > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070131/8ccfe80d/attachment-0001.html From forum-watir-users at openqa.org Wed Jan 31 14:09:47 2007 From: forum-watir-users at openqa.org (John Lolis) Date: Wed, 31 Jan 2007 13:09:47 CST Subject: [Wtr-general] Unable to access a modal dialog box to select a In-Reply-To: <45C0DB98.3060508@pettichord.com> Message-ID: <25607262.1170270617755.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> > Another option is to use this script: > > puts $ie.modal_dialog.html ... something about a forest and trees comes to mind ... Thanks for such a simple solution :) --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6357&messageID=17963#17963 From johnc at testdev.net Wed Jan 31 15:17:55 2007 From: johnc at testdev.net (John Castellucci) Date: Wed, 31 Jan 2007 12:17:55 -0800 Subject: [Wtr-general] HTML Pages with bad XML In-Reply-To: <72799cd70701231939j72b4485ax4880290e771bb68@mail.gmail.com> Message-ID: <041d01c74574$e4ab8f80$6a00a8c0@lewis> Howdy all, I'm working on a short project where I am parsing a page that happens to contain some nodes that cause REXML to die -- some specific examples are: The nodes with @, : and , all throw: c:/ruby/lib/ruby/site_ruby/1.8/rexml/parsers/treeparser.rb:90:in `parse': #\n\n", " ") xmlSource += "\n\n" xmlSource = xmlSource.gsub(/ /, ' ') xmlSource = xmlSource.gsub(/user:/, 'user') xmlSource = xmlSource.gsub(/@/, '_') xmlSource = xmlSource.gsub(/,/, '') return REXML::Document.new(xmlSource) end end end From bret at pettichord.com Wed Jan 31 18:23:07 2007 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 31 Jan 2007 17:23:07 -0600 Subject: [Wtr-general] HTML Pages with bad XML In-Reply-To: <041d01c74574$e4ab8f80$6a00a8c0@lewis> References: <041d01c74574$e4ab8f80$6a00a8c0@lewis> Message-ID: <45C124DB.2070001@pettichord.com> John Castellucci wrote: > Any tips on getting Watir to be happy with lousy XML source? > By design, REXML should handle lousy XML. I suggest you raise this issue with the REXML project. I had a problem a while ago, reported it to them with a failing tests case, and they fixed it. Bret From forum-watir-users at openqa.org Wed Jan 31 23:09:46 2007 From: forum-watir-users at openqa.org (Maloy kanti debnath) Date: Wed, 31 Jan 2007 22:09:46 CST Subject: [Wtr-general] hi, not able to use assert In-Reply-To: <36260961.1170253585982.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> Message-ID: <28025764.1170303016792.JavaMail.oqa-j2ee@openqa01.managed.contegix.com> hi, i tried adding require 'test/unit/assertions' in my code but then too its not working and is giving the same error can you give me a simple set of code using assertions. It will be really helpfull too me thank you, thanks maloy --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6352&messageID=17988#17988