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-