From amatei at softwin.ro Fri Apr 1 03:07:22 2005 From: amatei at softwin.ro (Andrei MATEI) Date: Fri, 1 Apr 2005 11:07:22 +0300 Subject: [Wtr-general] hidden field In-Reply-To: <200503311306.j2VD6mAI013206@ls413.htnet.hr> Message-ID: <2000SRVMJiQTyfPefLJ000008dd@softwin.ro> Sorry, I don't understand and can't make it work. From what I see in your message, it seems to me that you have another text field in your page, named "OWS:val_10_da:Date", and this is the one flashing, not the hidden field. _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of ?eljko Filipin Sent: Thursday, March 31, 2005 4:07 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] hidden field I had the same problem just a few days ago until I found field that fills my hidden field. Maybe your problem is the same (and maybe not). Try the following: - open irb - go to page with hidden field - use ie.showAllObjects to list all objects of the page - use flash method to flash every object (at this step I found filed that fills my hidden filed) My example: HTML / JS: ...document.f.val_10.value = validDate(document.f.elements('OWS:val_10_da:Date').value)... IRB: hidden name=val_10 text id=OWS:val_10_da:Date I tried ie.textField(:id, "OWS:val_10_da:Date").flash and it flashed my "hidden" field. If you did not understand anything, send it back. Zeljko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050401/ba4e1f56/attachment.html From zeljko.filipin at tkoznazna.hr Fri Apr 1 03:28:56 2005 From: zeljko.filipin at tkoznazna.hr (=?iso-8859-2?Q?=AEeljko_Filipin?=) Date: Fri, 1 Apr 2005 10:28:56 +0200 Subject: [Wtr-general] hidden field In-Reply-To: <2000SRVMJiQTyfPefLJ000008dd@softwin.ro> Message-ID: <200504010828.j318SRAI027512@ls413.htnet.hr> Have you used flash method to flash all fields at that page? I your field did not flash, then your problem is not the same as mine. I only know HTML, not javascript, and page I tested contains both. I found text "Date/Time:" and after it a filed I thought I need to fill (screen shot is at attachment), looked at source and found ... Date/Time: ... ... I tried to fill hidden field, but I should fill javascript field "...document.f.val_10.value = validDate(document.f.elements('OWS:val_10_da:Date').value)...#. All because I do not know JS. Why do you want to fill hidden field? Can you send problem description, source, screen shot...? ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI Sent: Friday, April 01, 2005 10:07 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] hidden field Sorry, I don't understand and can't make it work. From what I see in your message, it seems to me that you have another text field in your page, named "OWS:val_10_da:Date", and this is the one flashing, not the hidden field. ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of ?eljko Filipin Sent: Thursday, March 31, 2005 4:07 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] hidden field I had the same problem just a few days ago until I found field that fills my hidden field. Maybe your problem is the same (and maybe not). Try the following: - open irb - go to page with hidden field - use ie.showAllObjects to list all objects of the page - use flash method to flash every object (at this step I found filed that fills my hidden filed) My example: HTML / JS: ...document.f.val_10.value = validDate(document.f.elements('OWS:val_10_da:Date').value)... IRB: hidden name=val_10 text id=OWS:val_10_da:Date I tried ie.textField(:id, "OWS:val_10_da:Date").flash and it flashed my "hidden" field. If you did not understand anything, send it back. Zeljko -------------- next part -------------- A non-text attachment was scrubbed... Name: hidden.png Type: image/png Size: 413 bytes Desc: not available Url : http://rubyforge.org/pipermail/wtr-general/attachments/20050401/7bab404b/attachment.png From christopher.mcmahon at gmail.com Fri Apr 1 10:02:40 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Fri, 1 Apr 2005 09:02:40 -0600 Subject: [Wtr-general] hidden field In-Reply-To: <200504010828.j318SRAI027512@ls413.htnet.hr> References: <2000SRVMJiQTyfPefLJ000008dd@softwin.ro> <200504010828.j318SRAI027512@ls413.htnet.hr> Message-ID: <72799cd7050401070255f3bc75@mail.gmail.com> > Why do you want to fill hidden field? Can you send problem description, > source, screen shot...? This is a good point. Manipulating a hidden field is arguably not a valid test. I wouldn't want to try to justify the utility of manipulating a hidden field. Maybe you could make the field not-hidden, and then manipulate it? -Chris From jkohl at telusplanet.net Fri Apr 1 10:53:46 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Fri, 1 Apr 2005 08:53:46 -0700 Subject: [Wtr-general] hidden field In-Reply-To: <72799cd7050401070255f3bc75@mail.gmail.com> Message-ID: <20050401155244.ELDK5410.priv-edtnes40.telusplanet.net@tintin> Generally, I've found a hidden field is filled in with JavaScript, or some other mechanism that is triggered by manipulating a visible object on the screen. In my watir automation experience, I've always had hidden fields get set the same way they would as a user. The only exception is if the hidden field is populated by JavaScript, you may need to use "fire_event" to trigger it. There might be one field that has a JavaScript "fireEvent" tied to it, so you'll have to trigger that after filling in data. Can you send the HTML source for the page that contains the hidden field? If you are uncomfortable sending it to the list, feel free to email it to me personally and I'll try it out. Thanks; -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Chris McMahon > Sent: April 1, 2005 8:03 AM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] hidden field > > > Why do you want to fill hidden field? Can you send problem description, > > source, screen shot...? > > This is a good point. Manipulating a hidden field is arguably not a > valid test. I wouldn't want to try to justify the utility of > manipulating a hidden field. > > Maybe you could make the field not-hidden, and then manipulate it? > -Chris > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Fri Apr 1 12:05:31 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 01 Apr 2005 10:05:31 -0700 Subject: [Wtr-general] hidden field In-Reply-To: <72799cd7050401070255f3bc75@mail.gmail.com> Message-ID: <001d01c536dd$035372c0$6400a8c0@NewDell> I was wondering why you would want to do this too. Users don't access these things, which is why we havent exposed any methods to do it. You can do it if you want, in watir.rb cut n paste the TextField class and change the getObject line in the construcor to include "hidden". Unfortunately there is not an easy way to over ride this behaviour (which is why you have to cut n paste). If you have to do this, I expect there is a better way to test what you are doing - or are you trying to test hacking attempts? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: 01 April 2005 08:03 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] hidden field > Why do you want to fill hidden field? Can you send problem > description, source, screen shot...? This is a good point. Manipulating a hidden field is arguably not a valid test. I wouldn't want to try to justify the utility of manipulating a hidden field. Maybe you could make the field not-hidden, and then manipulate it? -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Mark_Cain at rl.gov Fri Apr 1 12:57:36 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Fri, 1 Apr 2005 09:57:36 -0800 Subject: [Wtr-general] Parent window receiving child window data Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04E154EB8@EX5V.rl.gov> Thanks Paul, I have got this mostly to work. However, I find I need to put a wait in after the button click before the attach function finds the title consistently. I am using ie.wait(3) but this is throwing a JavaScript error and then an exception: 1) Error: test5_ca(TC_PER): WIN32OLERuntimeError: focus OLE error code:800A083E in htmlfile Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus. HRESULT error code:0x80020009 Exception occurred. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2866:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2866:in `set' Originator.rb:165:in `test5_ca' 6 tests, 2 assertions, 0 failures, 1 errors W, [01-Apr-2005 09:16:10#4144] WARN -- : runtime error in wait Am I using this correctly? Any insight? Also, when using the attach method as you describe sometimes the parent process loses the ability to give focus to textareas. The script returns to the parent application as expected and finds the first textarea and fills in the text, but stops for the second saying it cannot find or give focus to the field. I have looked through the source and find all textareas on the page are visible and editable. Thanks, --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Thursday, March 31, 2005 12:48 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Parent window receiving child window data for problem1, this code should work - it is used in several of the unit tests - obviously change the captions etc to what you are using ie=IE.start('mainpage.html') ie.button(:caption, "Open Child").click child_window = IE.attach(:title, 'Child Window') child_window.text_field(:index,1).set("In the Child") for 2 - the only way we might cause a javascript error is if you use the capture_events method ( as we intercept the new window and create our own) Hope that helps Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 31 March 2005 10:45 To: wtr-general at rubyforge.org Subject: [Wtr-general] Parent window receiving child window data In my application, there is a button which causes a child window to open (new window). On the child window there is form data that the user can select and post back (1 to n times) to the same child form. Once that is completed a 'Close Window' button on the child form post all the data back to the parent. Problem: 1. Once the child window is open I cannot seem to input data using WATIR. I have tried the attach method and the newWindow method, but cannot seem to be able to get at the object on the child form. 2. If in my script I click the Close Window button on the child form window there is a JavaScript error: 'parent.opener.document' is null or not an object. Is anyone else having a similar problem? What did you do to correct this? Thanks, ____________________ Mark L. Cain LMIT - E*STARS(r) ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99352 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050401/02db06f0/attachment.html From paul.rogers at shaw.ca Fri Apr 1 13:25:32 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 01 Apr 2005 11:25:32 -0700 Subject: [Wtr-general] Parent window receiving child window data In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04E154EB8@EX5V.rl.gov> Message-ID: <002301c536e8$314efd60$6400a8c0@NewDell> instead of ie.wait ( which is really an internal method ) try just using sleep - ie.button(:value, "Open New Window").click sleep 3 ie.attach(:title, "New window") for the second problem, trying doing a ie.show_all_objects we will then be able to see what objects are there Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 01 April 2005 10:58 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Parent window receiving child window data Thanks Paul, I have got this mostly to work. However, I find I need to put a wait in after the button click before the attach function finds the title consistently. I am using ie.wait(3) but this is throwing a JavaScript error and then an exception: 1) Error: test5_ca(TC_PER): WIN32OLERuntimeError: focus OLE error code:800A083E in htmlfile Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus. HRESULT error code:0x80020009 Exception occurred. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2866:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2866:in `set' Originator.rb:165:in `test5_ca' 6 tests, 2 assertions, 0 failures, 1 errors W, [01-Apr-2005 09:16:10#4144] WARN -- : runtime error in wait Am I using this correctly? Any insight? Also, when using the attach method as you describe sometimes the parent process loses the ability to give focus to textareas. The script returns to the parent application as expected and finds the first textarea and fills in the text, but stops for the second saying it cannot find or give focus to the field. I have looked through the source and find all textareas on the page are visible and editable. Thanks, --Mark _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Thursday, March 31, 2005 12:48 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Parent window receiving child window data for problem1, this code should work - it is used in several of the unit tests - obviously change the captions etc to what you are using ie=IE.start('mainpage.html') ie.button(:caption, "Open Child").click child_window = IE.attach(:title, 'Child Window') child_window.text_field(:index,1).set("In the Child") for 2 - the only way we might cause a javascript error is if you use the capture_events method ( as we intercept the new window and create our own) Hope that helps Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 31 March 2005 10:45 To: wtr-general at rubyforge.org Subject: [Wtr-general] Parent window receiving child window data In my application, there is a button which causes a child window to open (new window). On the child window there is form data that the user can select and post back (1 to n times) to the same child form. Once that is completed a 'Close Window' button on the child form post all the data back to the parent. Problem: 1. Once the child window is open I cannot seem to input data using WATIR. I have tried the attach method and the newWindow method, but cannot seem to be able to get at the object on the child form. 2. If in my script I click the Close Window button on the child form window there is a JavaScript error: 'parent.opener.document' is null or not an object. Is anyone else having a similar problem? What did you do to correct this? Thanks, ____________________ Mark L. Cain LMIT - E*STARSR ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99352 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050401/242d7409/attachment.html From jkohl at telusplanet.net Fri Apr 1 13:37:26 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Fri, 1 Apr 2005 11:37:26 -0700 Subject: [Wtr-general] XML logging update Message-ID: <20050401183622.PZWI27369.priv-edtnes51.telusplanet.net@tintin> I've got some simple logging working using REXML, but I'm not very happy with it. I'll have another look at it when I have some spare time. At this point I'm thinking about maybe doing an XML Formatter for logging instead of REXML. -Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050401/a3431579/attachment.html From Mark_Cain at rl.gov Fri Apr 1 14:49:29 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Fri, 1 Apr 2005 11:49:29 -0800 Subject: [Wtr-general] Parent window receiving child window data Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04E154EBA@EX5V.rl.gov> Thank you Paul! That worked, but I still get this when the script ends-it does not cause the script to stop thankfully. W, [01-Apr-2005 11:01:36#4128] WARN -- : runtime error in wait W, [01-Apr-2005 11:02:18#4128] WARN -- : runtime error in wait The other problem turned out to be a div tag that controls flow for legacy code. The textarea was not hidden but the div tag way. Thanks again I have now been able to create a baseline of the main use case script that will be used for writing other use case scripts for this app-as well as another customer version of the same app. I will only have to change to few minor things to leverage about a dozen or more scripts. This is huge for my team since this is the first automation that has been done here! A milestone has been reached thanks to WATIR! --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Friday, April 01, 2005 10:26 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Parent window receiving child window data instead of ie.wait ( which is really an internal method ) try just using sleep - ie.button(:value, "Open New Window").click sleep 3 ie.attach(:title, "New window") for the second problem, trying doing a ie.show_all_objects we will then be able to see what objects are there Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 01 April 2005 10:58 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Parent window receiving child window data Thanks Paul, I have got this mostly to work. However, I find I need to put a wait in after the button click before the attach function finds the title consistently. I am using ie.wait(3) but this is throwing a JavaScript error and then an exception: 1) Error: test5_ca(TC_PER): WIN32OLERuntimeError: focus OLE error code:800A083E in htmlfile Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus. HRESULT error code:0x80020009 Exception occurred. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2866:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2866:in `set' Originator.rb:165:in `test5_ca' 6 tests, 2 assertions, 0 failures, 1 errors W, [01-Apr-2005 09:16:10#4144] WARN -- : runtime error in wait Am I using this correctly? Any insight? Also, when using the attach method as you describe sometimes the parent process loses the ability to give focus to textareas. The script returns to the parent application as expected and finds the first textarea and fills in the text, but stops for the second saying it cannot find or give focus to the field. I have looked through the source and find all textareas on the page are visible and editable. Thanks, --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Thursday, March 31, 2005 12:48 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Parent window receiving child window data for problem1, this code should work - it is used in several of the unit tests - obviously change the captions etc to what you are using ie=IE.start('mainpage.html') ie.button(:caption, "Open Child").click child_window = IE.attach(:title, 'Child Window') child_window.text_field(:index,1).set("In the Child") for 2 - the only way we might cause a javascript error is if you use the capture_events method ( as we intercept the new window and create our own) Hope that helps Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 31 March 2005 10:45 To: wtr-general at rubyforge.org Subject: [Wtr-general] Parent window receiving child window data In my application, there is a button which causes a child window to open (new window). On the child window there is form data that the user can select and post back (1 to n times) to the same child form. Once that is completed a 'Close Window' button on the child form post all the data back to the parent. Problem: 1. Once the child window is open I cannot seem to input data using WATIR. I have tried the attach method and the newWindow method, but cannot seem to be able to get at the object on the child form. 2. If in my script I click the Close Window button on the child form window there is a JavaScript error: 'parent.opener.document' is null or not an object. Is anyone else having a similar problem? What did you do to correct this? Thanks, ____________________ Mark L. Cain LMIT - E*STARS(r) ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99352 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050401/38cf7749/attachment.html From paul.rogers at shaw.ca Fri Apr 1 15:02:00 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 01 Apr 2005 13:02:00 -0700 Subject: [Wtr-general] Parent window receiving child window data In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04E154EBA@EX5V.rl.gov> Message-ID: <003c01c536f5$aa715a50$6400a8c0@NewDell> if you goto watir.rb ( normally in C:\ruby\lib\ruby\site_ruby\1.8\watir.rb ) and search for "runtime error in wait" you can remove a comment char and see the exception. I'd be interested to see what it is. There was a bug to do with frames that I though i'd fixed Can you also do puts IE::REVISION $Revision: 1.133 $ to see which version it is Thanks Paul ps can I add those comments to our testimonials page? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 01 April 2005 12:49 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Parent window receiving child window data Thank you Paul! That worked, but I still get this when the script ends-it does not cause the script to stop thankfully. W, [01-Apr-2005 11:01:36#4128] WARN -- : runtime error in wait W, [01-Apr-2005 11:02:18#4128] WARN -- : runtime error in wait The other problem turned out to be a div tag that controls flow for legacy code. The textarea was not hidden but the div tag way. Thanks again I have now been able to create a baseline of the main use case script that will be used for writing other use case scripts for this app-as well as another customer version of the same app. I will only have to change to few minor things to leverage about a dozen or more scripts. This is huge for my team since this is the first automation that has been done here! A milestone has been reached thanks to WATIR! --Mark _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Friday, April 01, 2005 10:26 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Parent window receiving child window data instead of ie.wait ( which is really an internal method ) try just using sleep - ie.button(:value, "Open New Window").click sleep 3 ie.attach(:title, "New window") for the second problem, trying doing a ie.show_all_objects we will then be able to see what objects are there Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 01 April 2005 10:58 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Parent window receiving child window data Thanks Paul, I have got this mostly to work. However, I find I need to put a wait in after the button click before the attach function finds the title consistently. I am using ie.wait(3) but this is throwing a JavaScript error and then an exception: 1) Error: test5_ca(TC_PER): WIN32OLERuntimeError: focus OLE error code:800A083E in htmlfile Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus. HRESULT error code:0x80020009 Exception occurred. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2866:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2866:in `set' Originator.rb:165:in `test5_ca' 6 tests, 2 assertions, 0 failures, 1 errors W, [01-Apr-2005 09:16:10#4144] WARN -- : runtime error in wait Am I using this correctly? Any insight? Also, when using the attach method as you describe sometimes the parent process loses the ability to give focus to textareas. The script returns to the parent application as expected and finds the first textarea and fills in the text, but stops for the second saying it cannot find or give focus to the field. I have looked through the source and find all textareas on the page are visible and editable. Thanks, --Mark _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Thursday, March 31, 2005 12:48 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Parent window receiving child window data for problem1, this code should work - it is used in several of the unit tests - obviously change the captions etc to what you are using ie=IE.start('mainpage.html') ie.button(:caption, "Open Child").click child_window = IE.attach(:title, 'Child Window') child_window.text_field(:index,1).set("In the Child") for 2 - the only way we might cause a javascript error is if you use the capture_events method ( as we intercept the new window and create our own) Hope that helps Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 31 March 2005 10:45 To: wtr-general at rubyforge.org Subject: [Wtr-general] Parent window receiving child window data In my application, there is a button which causes a child window to open (new window). On the child window there is form data that the user can select and post back (1 to n times) to the same child form. Once that is completed a 'Close Window' button on the child form post all the data back to the parent. Problem: 1. Once the child window is open I cannot seem to input data using WATIR. I have tried the attach method and the newWindow method, but cannot seem to be able to get at the object on the child form. 2. If in my script I click the Close Window button on the child form window there is a JavaScript error: 'parent.opener.document' is null or not an object. Is anyone else having a similar problem? What did you do to correct this? Thanks, ____________________ Mark L. Cain LMIT - E*STARSR ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99352 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050401/0c292ed9/attachment.html From chrishedges at gmail.com Sun Apr 3 00:22:34 2005 From: chrishedges at gmail.com (Chris Hedges) Date: Sat, 2 Apr 2005 22:22:34 -0700 Subject: [Wtr-general] Mouse-overs Message-ID: <5820aff60504022122627d6710@mail.gmail.com> Here is a good way to utilize the mouse-over drop-down menus for IE. I add some sleeps and flashes for visual. Just make sure that your pop-up blockers are off. require 'thread' require 'watir' require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' include Watir testSite = 'http://www.fortlewis.edu' $ie = IE.new ie2 = nil puts "## Beginning of Example: FortLewis.edu" puts " " sleep 1 puts "Step 1: go to the test site: " + testSite $ie.goto(testSite) $ie.link(:text," Prospective Students ").fireEvent("onMouseOver") sleep 1 $ie.link(:text," Prospective Students ").fireEvent("onMouseOut") $ie.link(:text," Current Students ").fireEvent("onMouseOver") $ie.link(:url,"http://faculty.fortlewis.edu/").flash sleep 1 $ie.link(:url,"http://faculty.fortlewis.edu/").click sleep 1 ie2 = IE.attach(:title, "Faculty Web Sites @ Fort Lewis College, Durango Colorado") ie2.link(:url,"http://faculty.fortlewis.edu/ADAMS_E").flash ie2.link(:url,"http://faculty.fortlewis.edu/ADAMS_E").click sleep 1 ie2.link(:url,"classnotesandassignments.html").flash ie2.link(:url,"classnotesandassignments.html").click sleep 1 ie2.link(:url,"CLASSES/CS496SENIORSEMINAR/CS496W05/index.HTML").flash ie2.link(:url,"CLASSES/CS496SENIORSEMINAR/CS496W05/index.HTML").click sleep 1 ie2.link(:url,"schedulew05.html").flash ie2.link(:url,"schedulew05.html").click sleep 1 ie2.link(:url,"TopicProposalScheduleW05.htm").flash ie2.link(:url,"TopicProposalScheduleW05.htm").click From paul.rogers at shaw.ca Sun Apr 3 15:12:36 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sun, 03 Apr 2005 13:12:36 -0600 Subject: [Wtr-general] Mouse-overs In-Reply-To: <5820aff60504022122627d6710@mail.gmail.com> Message-ID: <001001c53881$187032b0$6400a8c0@NewDell> Chris this is great! Do you think we can add it to the examples? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris Hedges Sent: 02 April 2005 22:23 To: wtr-general at rubyforge.org Subject: [Wtr-general] Mouse-overs Here is a good way to utilize the mouse-over drop-down menus for IE. I add some sleeps and flashes for visual. Just make sure that your pop-up blockers are off. require 'thread' require 'watir' require 'test/unit' require 'test/unit/ui/console/testrunner' require 'watir/testUnitAddons' include Watir testSite = 'http://www.fortlewis.edu' $ie = IE.new ie2 = nil puts "## Beginning of Example: FortLewis.edu" puts " " sleep 1 puts "Step 1: go to the test site: " + testSite $ie.goto(testSite) $ie.link(:text," Prospective Students ").fireEvent("onMouseOver") sleep 1 $ie.link(:text," Prospective Students ").fireEvent("onMouseOut") $ie.link(:text," Current Students ").fireEvent("onMouseOver") $ie.link(:url,"http://faculty.fortlewis.edu/").flash sleep 1 $ie.link(:url,"http://faculty.fortlewis.edu/").click sleep 1 ie2 = IE.attach(:title, "Faculty Web Sites @ Fort Lewis College, Durango Colorado") ie2.link(:url,"http://faculty.fortlewis.edu/ADAMS_E").flash ie2.link(:url,"http://faculty.fortlewis.edu/ADAMS_E").click sleep 1 ie2.link(:url,"classnotesandassignments.html").flash ie2.link(:url,"classnotesandassignments.html").click sleep 1 ie2.link(:url,"CLASSES/CS496SENIORSEMINAR/CS496W05/index.HTML").flash ie2.link(:url,"CLASSES/CS496SENIORSEMINAR/CS496W05/index.HTML").click sleep 1 ie2.link(:url,"schedulew05.html").flash ie2.link(:url,"schedulew05.html").click sleep 1 ie2.link(:url,"TopicProposalScheduleW05.htm").flash ie2.link(:url,"TopicProposalScheduleW05.htm").click _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Sun Apr 3 19:53:53 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sun, 03 Apr 2005 17:53:53 -0600 Subject: [Wtr-general] Watir 1.2 released Message-ID: <001e01c538a8$640dbbd0$6400a8c0@NewDell> Watir release 1.2 This release contains several new features: URL List -------- The list of unique urls that has been visited is now available. Use the following to access, and clear it ie.url_list # returns an array of the unique urls visited ie.clear_url_list # clear the list Properties for Objects ---------------------- It is now possible to do: button = ie.button(:index,1) puts button.name puts button.id puts button.value The properties depend upon the object, but include href, innerText ( for links ) as well as those aboev. Consult the API reference for full details Iterator objects ---------------- It is now possible to iterate through most types of element. For example: ie.buttons.each do |button| if button.name == "Test Button" button.click break end end This release also contains many bug fizes to the tables code, a new graphical installer, and better api documentation Many thanks to all who have contributed! From amatei at softwin.ro Mon Apr 4 06:42:10 2005 From: amatei at softwin.ro (Andrei MATEI) Date: Mon, 4 Apr 2005 13:42:10 +0300 Subject: [Wtr-general] hidden field In-Reply-To: <001d01c536dd$035372c0$6400a8c0@NewDell> Message-ID: <2000SRVGWSa1aNEVJpj0000095e@softwin.ro> Thank you all for your answers. I am trying to set the value of a hidden field because that hidden field is normally filled by javascript when you perform some actions on a Microsoft IE TreeView control (I'm using asp.net). This renders as a strange object (it uses some .htc behaviours) and I can't manipulate it using watir (or can I ???). Paul, I've done what you said and it worked. I also had to change the set method of the TextField class and make it _not_ set focus on the object, because the hidden field doesn't support focus. Maybe you would want to include the feature in the next version, because I think it is important. Anyway, I also was able to manipulate the hidden field doing something like: y=$ie.getDocument.all['myHiddenField'] y.value="the value that I want" body=$ie.getDocument().forms['form1'] body.submit() This is great, but I am curious why stuff like this works... I can't find the code for this stuff in watir.rb. When I say $ie.getDocument(), is the return value actually a COM object? If so, are "forms", or "all", properties of this object? Am I understanding this corectly? Thanks a lot, Andrei -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Friday, April 01, 2005 8:06 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] hidden field I was wondering why you would want to do this too. Users don't access these things, which is why we havent exposed any methods to do it. You can do it if you want, in watir.rb cut n paste the TextField class and change the getObject line in the construcor to include "hidden". Unfortunately there is not an easy way to over ride this behaviour (which is why you have to cut n paste). If you have to do this, I expect there is a better way to test what you are doing - or are you trying to test hacking attempts? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: 01 April 2005 08:03 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] hidden field > Why do you want to fill hidden field? Can you send problem > description, source, screen shot...? This is a good point. Manipulating a hidden field is arguably not a valid test. I wouldn't want to try to justify the utility of manipulating a hidden field. Maybe you could make the field not-hidden, and then manipulate it? -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Mon Apr 4 11:08:38 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 04 Apr 2005 09:08:38 -0600 Subject: [Wtr-general] hidden field In-Reply-To: <2000SRVGWSa1aNEVJpj0000095e@softwin.ro> Message-ID: <003001c53928$2e745c60$6400a8c0@NewDell> This page http://authors.aspalliance.com/shark/articles/TreeView/DocTree.aspx Has an IE treeview, and there does not appear to be anyway to manipulate it. Now, if we can work around that by making the hidden field accessible I think that's something we should do Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI Sent: 04 April 2005 04:42 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] hidden field Thank you all for your answers. I am trying to set the value of a hidden field because that hidden field is normally filled by javascript when you perform some actions on a Microsoft IE TreeView control (I'm using asp.net). This renders as a strange object (it uses some .htc behaviours) and I can't manipulate it using watir (or can I ???). Paul, I've done what you said and it worked. I also had to change the set method of the TextField class and make it _not_ set focus on the object, because the hidden field doesn't support focus. Maybe you would want to include the feature in the next version, because I think it is important. Anyway, I also was able to manipulate the hidden field doing something like: y=$ie.getDocument.all['myHiddenField'] y.value="the value that I want" body=$ie.getDocument().forms['form1'] body.submit() This is great, but I am curious why stuff like this works... I can't find the code for this stuff in watir.rb. When I say $ie.getDocument(), is the return value actually a COM object? If so, are "forms", or "all", properties of this object? Am I understanding this corectly? Thanks a lot, Andrei -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Friday, April 01, 2005 8:06 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] hidden field I was wondering why you would want to do this too. Users don't access these things, which is why we havent exposed any methods to do it. You can do it if you want, in watir.rb cut n paste the TextField class and change the getObject line in the construcor to include "hidden". Unfortunately there is not an easy way to over ride this behaviour (which is why you have to cut n paste). If you have to do this, I expect there is a better way to test what you are doing - or are you trying to test hacking attempts? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: 01 April 2005 08:03 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] hidden field > Why do you want to fill hidden field? Can you send problem > description, source, screen shot...? This is a good point. Manipulating a hidden field is arguably not a valid test. I wouldn't want to try to justify the utility of manipulating a hidden field. Maybe you could make the field not-hidden, and then manipulate it? -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Mon Apr 4 11:10:41 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 04 Apr 2005 09:10:41 -0600 Subject: [Wtr-general] Tables and flash Message-ID: <003101c53928$77d2dcb0$6400a8c0@NewDell> Has anybody had problems with tables and flash? I was trying the timeclock and several tables did not flash when asked to (specifically the one at the bottom with 'Recent Records'). There was no error given. I was able to access the contents of the table using to_a and the to_s method worked to. Just not flash I havent tried to debug further. Paul From chrishedges at gmail.com Mon Apr 4 11:14:07 2005 From: chrishedges at gmail.com (Chris Hedges) Date: Mon, 4 Apr 2005 09:14:07 -0600 Subject: [Wtr-general] Mouse-overs In-Reply-To: <001001c53881$187032b0$6400a8c0@NewDell> References: <5820aff60504022122627d6710@mail.gmail.com> <001001c53881$187032b0$6400a8c0@NewDell> Message-ID: <5820aff6050404081479020c7b@mail.gmail.com> Absolutely! On Apr 3, 2005 1:12 PM, Paul Rogers wrote: > Chris this is great! Do you think we can add it to the examples? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris Hedges > Sent: 02 April 2005 22:23 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Mouse-overs > > Here is a good way to utilize the mouse-over drop-down menus for IE. > I add some sleeps and flashes for visual. > Just make sure that your pop-up blockers are off. > > require 'thread' > require 'watir' > require 'test/unit' > require 'test/unit/ui/console/testrunner' > require 'watir/testUnitAddons' > include Watir > > testSite = 'http://www.fortlewis.edu' > $ie = IE.new > ie2 = nil > puts "## Beginning of Example: FortLewis.edu" > puts " " > sleep 1 > puts "Step 1: go to the test site: " + testSite > $ie.goto(testSite) > $ie.link(:text," Prospective Students > ").fireEvent("onMouseOver") > sleep 1 > $ie.link(:text," Prospective Students > ").fireEvent("onMouseOut") > $ie.link(:text," Current Students ").fireEvent("onMouseOver") > $ie.link(:url,"http://faculty.fortlewis.edu/").flash > sleep 1 > > $ie.link(:url,"http://faculty.fortlewis.edu/").click > sleep 1 > > ie2 = IE.attach(:title, "Faculty Web Sites @ Fort Lewis College, Durango > Colorado") ie2.link(:url,"http://faculty.fortlewis.edu/ADAMS_E").flash > ie2.link(:url,"http://faculty.fortlewis.edu/ADAMS_E").click > sleep 1 > ie2.link(:url,"classnotesandassignments.html").flash > ie2.link(:url,"classnotesandassignments.html").click > sleep 1 > ie2.link(:url,"CLASSES/CS496SENIORSEMINAR/CS496W05/index.HTML").flash > ie2.link(:url,"CLASSES/CS496SENIORSEMINAR/CS496W05/index.HTML").click > sleep 1 > > ie2.link(:url,"schedulew05.html").flash > ie2.link(:url,"schedulew05.html").click > sleep 1 > > ie2.link(:url,"TopicProposalScheduleW05.htm").flash > ie2.link(:url,"TopicProposalScheduleW05.htm").click > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Mon Apr 4 11:21:46 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 04 Apr 2005 09:21:46 -0600 Subject: [Wtr-general] treeviews was ( hidden field ) In-Reply-To: <2000SRVGWSa1aNEVJpj0000095e@softwin.ro> Message-ID: <003201c5392a$04771590$6400a8c0@NewDell> The MSDN site (http://msdn.microsoft.com/library/default.asp ) Strangely does not use this control, so it can be accessed with this code: ie.goto( 'http://msdn.microsoft.com/library/default.asp') ie.frame("fraLeftFrame").frame("fraDeeptree").link(:index,6).click -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI Sent: 04 April 2005 04:42 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] hidden field Thank you all for your answers. I am trying to set the value of a hidden field because that hidden field is normally filled by javascript when you perform some actions on a Microsoft IE TreeView control (I'm using asp.net). This renders as a strange object (it uses some .htc behaviours) and I can't manipulate it using watir (or can I ???). Paul, I've done what you said and it worked. I also had to change the set method of the TextField class and make it _not_ set focus on the object, because the hidden field doesn't support focus. Maybe you would want to include the feature in the next version, because I think it is important. Anyway, I also was able to manipulate the hidden field doing something like: y=$ie.getDocument.all['myHiddenField'] y.value="the value that I want" body=$ie.getDocument().forms['form1'] body.submit() This is great, but I am curious why stuff like this works... I can't find the code for this stuff in watir.rb. When I say $ie.getDocument(), is the return value actually a COM object? If so, are "forms", or "all", properties of this object? Am I understanding this corectly? Thanks a lot, Andrei -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Friday, April 01, 2005 8:06 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] hidden field I was wondering why you would want to do this too. Users don't access these things, which is why we havent exposed any methods to do it. You can do it if you want, in watir.rb cut n paste the TextField class and change the getObject line in the construcor to include "hidden". Unfortunately there is not an easy way to over ride this behaviour (which is why you have to cut n paste). If you have to do this, I expect there is a better way to test what you are doing - or are you trying to test hacking attempts? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: 01 April 2005 08:03 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] hidden field > Why do you want to fill hidden field? Can you send problem > description, source, screen shot...? This is a good point. Manipulating a hidden field is arguably not a valid test. I wouldn't want to try to justify the utility of manipulating a hidden field. Maybe you could make the field not-hidden, and then manipulate it? -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Mark_Cain at rl.gov Mon Apr 4 11:27:06 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Mon, 4 Apr 2005 08:27:06 -0700 Subject: [Wtr-general] Parent window receiving child window data Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04E154EBC@EX5V.rl.gov> Your directions below were uncleare to me. Did you mean in an IRB session to search for the runtime error? Yes you can add my comments to the testimonials page. Thanks, Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Friday, April 01, 2005 12:02 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Parent window receiving child window data if you goto watir.rb ( normally in C:\ruby\lib\ruby\site_ruby\1.8\watir.rb ) and search for "runtime error in wait" you can remove a comment char and see the exception. I'd be interested to see what it is. There was a bug to do with frames that I though i'd fixed Can you also do puts IE::REVISION $Revision: 1.133 $ to see which version it is Thanks Paul ps can I add those comments to our testimonials page? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 01 April 2005 12:49 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Parent window receiving child window data Thank you Paul! That worked, but I still get this when the script ends-it does not cause the script to stop thankfully. W, [01-Apr-2005 11:01:36#4128] WARN -- : runtime error in wait W, [01-Apr-2005 11:02:18#4128] WARN -- : runtime error in wait The other problem turned out to be a div tag that controls flow for legacy code. The textarea was not hidden but the div tag way. Thanks again I have now been able to create a baseline of the main use case script that will be used for writing other use case scripts for this app-as well as another customer version of the same app. I will only have to change to few minor things to leverage about a dozen or more scripts. This is huge for my team since this is the first automation that has been done here! A milestone has been reached thanks to WATIR! --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Friday, April 01, 2005 10:26 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Parent window receiving child window data instead of ie.wait ( which is really an internal method ) try just using sleep - ie.button(:value, "Open New Window").click sleep 3 ie.attach(:title, "New window") for the second problem, trying doing a ie.show_all_objects we will then be able to see what objects are there Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 01 April 2005 10:58 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Parent window receiving child window data Thanks Paul, I have got this mostly to work. However, I find I need to put a wait in after the button click before the attach function finds the title consistently. I am using ie.wait(3) but this is throwing a JavaScript error and then an exception: 1) Error: test5_ca(TC_PER): WIN32OLERuntimeError: focus OLE error code:800A083E in htmlfile Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus. HRESULT error code:0x80020009 Exception occurred. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2866:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2866:in `set' Originator.rb:165:in `test5_ca' 6 tests, 2 assertions, 0 failures, 1 errors W, [01-Apr-2005 09:16:10#4144] WARN -- : runtime error in wait Am I using this correctly? Any insight? Also, when using the attach method as you describe sometimes the parent process loses the ability to give focus to textareas. The script returns to the parent application as expected and finds the first textarea and fills in the text, but stops for the second saying it cannot find or give focus to the field. I have looked through the source and find all textareas on the page are visible and editable. Thanks, --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Thursday, March 31, 2005 12:48 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Parent window receiving child window data for problem1, this code should work - it is used in several of the unit tests - obviously change the captions etc to what you are using ie=IE.start('mainpage.html') ie.button(:caption, "Open Child").click child_window = IE.attach(:title, 'Child Window') child_window.text_field(:index,1).set("In the Child") for 2 - the only way we might cause a javascript error is if you use the capture_events method ( as we intercept the new window and create our own) Hope that helps Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 31 March 2005 10:45 To: wtr-general at rubyforge.org Subject: [Wtr-general] Parent window receiving child window data In my application, there is a button which causes a child window to open (new window). On the child window there is form data that the user can select and post back (1 to n times) to the same child form. Once that is completed a 'Close Window' button on the child form post all the data back to the parent. Problem: 1. Once the child window is open I cannot seem to input data using WATIR. I have tried the attach method and the newWindow method, but cannot seem to be able to get at the object on the child form. 2. If in my script I click the Close Window button on the child form window there is a JavaScript error: 'parent.opener.document' is null or not an object. Is anyone else having a similar problem? What did you do to correct this? Thanks, ____________________ Mark L. Cain LMIT - E*STARS(r) ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99352 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050404/0241238e/attachment.html From paul.rogers at shaw.ca Mon Apr 4 11:59:32 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 04 Apr 2005 09:59:32 -0600 Subject: [Wtr-general] treeviews was ( hidden field ) In-Reply-To: <003201c5392a$04771590$6400a8c0@NewDell> Message-ID: <003c01c5392f$4ab96f80$6400a8c0@NewDell> Another popular treeview is Joust ( http://www.ivanpeters.com/ ) This can be accessed easily: ie.goto('http://www.ivanpeters.com/') irb(main):039:0> ie.show_frames there are 4 frames frame index: 0 name: title frame index: 1 name: menu frame index: 2 name: menuCntrl frame index: 3 name: text ie.frame("menu").link(:text , /Wel/).flash Because of the images used, its easier to iterate through the links collection or use :index Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: 04 April 2005 09:22 To: wtr-general at rubyforge.org Subject: [Wtr-general] treeviews was ( hidden field ) The MSDN site (http://msdn.microsoft.com/library/default.asp ) Strangely does not use this control, so it can be accessed with this code: ie.goto( 'http://msdn.microsoft.com/library/default.asp') ie.frame("fraLeftFrame").frame("fraDeeptree").link(:index,6).click -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI Sent: 04 April 2005 04:42 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] hidden field Thank you all for your answers. I am trying to set the value of a hidden field because that hidden field is normally filled by javascript when you perform some actions on a Microsoft IE TreeView control (I'm using asp.net). This renders as a strange object (it uses some .htc behaviours) and I can't manipulate it using watir (or can I ???). Paul, I've done what you said and it worked. I also had to change the set method of the TextField class and make it _not_ set focus on the object, because the hidden field doesn't support focus. Maybe you would want to include the feature in the next version, because I think it is important. Anyway, I also was able to manipulate the hidden field doing something like: y=$ie.getDocument.all['myHiddenField'] y.value="the value that I want" body=$ie.getDocument().forms['form1'] body.submit() This is great, but I am curious why stuff like this works... I can't find the code for this stuff in watir.rb. When I say $ie.getDocument(), is the return value actually a COM object? If so, are "forms", or "all", properties of this object? Am I understanding this corectly? Thanks a lot, Andrei -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Friday, April 01, 2005 8:06 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] hidden field I was wondering why you would want to do this too. Users don't access these things, which is why we havent exposed any methods to do it. You can do it if you want, in watir.rb cut n paste the TextField class and change the getObject line in the construcor to include "hidden". Unfortunately there is not an easy way to over ride this behaviour (which is why you have to cut n paste). If you have to do this, I expect there is a better way to test what you are doing - or are you trying to test hacking attempts? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: 01 April 2005 08:03 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] hidden field > Why do you want to fill hidden field? Can you send problem > description, source, screen shot...? This is a good point. Manipulating a hidden field is arguably not a valid test. I wouldn't want to try to justify the utility of manipulating a hidden field. Maybe you could make the field not-hidden, and then manipulate it? -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From amatei at softwin.ro Tue Apr 5 07:05:38 2005 From: amatei at softwin.ro (Andrei MATEI) Date: Tue, 5 Apr 2005 14:05:38 +0300 Subject: [Wtr-general] treeviews was ( hidden field ) In-Reply-To: <003c01c5392f$4ab96f80$6400a8c0@NewDell> Message-ID: <2000SRV4HGXAwxXSXI300000a57@softwin.ro> I meant in my particular case I can use a hidden field. The IE TreeView Control does not have a hidden field. Where can I find some good documentation about all the features in watir/IE COM interface? Thanks, Andrei Matei -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Monday, April 04, 2005 7:00 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] treeviews was ( hidden field ) Another popular treeview is Joust ( http://www.ivanpeters.com/ ) This can be accessed easily: ie.goto('http://www.ivanpeters.com/') irb(main):039:0> ie.show_frames there are 4 frames frame index: 0 name: title frame index: 1 name: menu frame index: 2 name: menuCntrl frame index: 3 name: text ie.frame("menu").link(:text , /Wel/).flash Because of the images used, its easier to iterate through the links collection or use :index Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: 04 April 2005 09:22 To: wtr-general at rubyforge.org Subject: [Wtr-general] treeviews was ( hidden field ) The MSDN site (http://msdn.microsoft.com/library/default.asp ) Strangely does not use this control, so it can be accessed with this code: ie.goto( 'http://msdn.microsoft.com/library/default.asp') ie.frame("fraLeftFrame").frame("fraDeeptree").link(:index,6).click -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI Sent: 04 April 2005 04:42 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] hidden field Thank you all for your answers. I am trying to set the value of a hidden field because that hidden field is normally filled by javascript when you perform some actions on a Microsoft IE TreeView control (I'm using asp.net). This renders as a strange object (it uses some .htc behaviours) and I can't manipulate it using watir (or can I ???). Paul, I've done what you said and it worked. I also had to change the set method of the TextField class and make it _not_ set focus on the object, because the hidden field doesn't support focus. Maybe you would want to include the feature in the next version, because I think it is important. Anyway, I also was able to manipulate the hidden field doing something like: y=$ie.getDocument.all['myHiddenField'] y.value="the value that I want" body=$ie.getDocument().forms['form1'] body.submit() This is great, but I am curious why stuff like this works... I can't find the code for this stuff in watir.rb. When I say $ie.getDocument(), is the return value actually a COM object? If so, are "forms", or "all", properties of this object? Am I understanding this corectly? Thanks a lot, Andrei -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Friday, April 01, 2005 8:06 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] hidden field I was wondering why you would want to do this too. Users don't access these things, which is why we havent exposed any methods to do it. You can do it if you want, in watir.rb cut n paste the TextField class and change the getObject line in the construcor to include "hidden". Unfortunately there is not an easy way to over ride this behaviour (which is why you have to cut n paste). If you have to do this, I expect there is a better way to test what you are doing - or are you trying to test hacking attempts? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: 01 April 2005 08:03 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] hidden field > Why do you want to fill hidden field? Can you send problem > description, source, screen shot...? This is a good point. Manipulating a hidden field is arguably not a valid test. I wouldn't want to try to justify the utility of manipulating a hidden field. Maybe you could make the field not-hidden, and then manipulate it? -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From amatei at softwin.ro Tue Apr 5 07:06:37 2005 From: amatei at softwin.ro (Andrei MATEI) Date: Tue, 5 Apr 2005 14:06:37 +0300 Subject: [Wtr-general] database support Message-ID: <2000SRVbI7bPKdhn3Wf00000a58@softwin.ro> Hi again, How can I access a SQL Server database from Ruby? Is there a library that I can use? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050405/a9a995d5/attachment.html From avik.sengupta at gmail.com Tue Apr 5 08:55:12 2005 From: avik.sengupta at gmail.com (Avik Sengupta) Date: Tue, 5 Apr 2005 18:25:12 +0530 Subject: [Wtr-general] Http Basic Authentication Message-ID: <76fd89bb050405055554c3ae78@mail.gmail.com> Is there a way to use Watir to test websites using HTTP Basic Authentication (ie, the big grey username/password box thrown up by the browser) ? Regards - Avik From paul.rogers at shaw.ca Tue Apr 5 09:43:46 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 05 Apr 2005 07:43:46 -0600 Subject: [Wtr-general] Http Basic Authentication In-Reply-To: <76fd89bb050405055554c3ae78@mail.gmail.com> Message-ID: <001b01c539e5$7d4e3aa0$6400a8c0@NewDell> Yes, but you will have to use the winclickers.rb There is a method called clearSecurityAlertBox() Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Avik Sengupta Sent: 05 April 2005 06:55 To: Wtr-general at rubyforge.org Subject: [Wtr-general] Http Basic Authentication Is there a way to use Watir to test websites using HTTP Basic Authentication (ie, the big grey username/password box thrown up by the browser) ? Regards - Avik _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Tue Apr 5 10:00:05 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 05 Apr 2005 08:00:05 -0600 Subject: [Wtr-general] database support In-Reply-To: <2000SRVbI7bPKdhn3Wf00000a58@softwin.ro> Message-ID: <001c01c539e7$c4e667f0$6400a8c0@NewDell> http://ruby-dbi.sourceforge.net/ -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI Sent: 05 April 2005 05:07 To: wtr-general at rubyforge.org Subject: [Wtr-general] database support Hi again, How can I access a SQL Server database from Ruby? Is there a library that I can use? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050405/aa1a297e/attachment.html From paul.rogers at shaw.ca Tue Apr 5 10:02:44 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 05 Apr 2005 08:02:44 -0600 Subject: [Wtr-general] treeviews was ( hidden field ) In-Reply-To: <2000SRV4HGXAwxXSXI300000a57@softwin.ro> Message-ID: <002101c539e8$23fce7a0$6400a8c0@NewDell> I added support for hidden fields anyway Check the rdoc for the watir api - its on wtr.rubyforge.org The unittests are also a good place to look - normally c:\watir-bonus\unittests -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI Sent: 05 April 2005 05:06 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] treeviews was ( hidden field ) I meant in my particular case I can use a hidden field. The IE TreeView Control does not have a hidden field. Where can I find some good documentation about all the features in watir/IE COM interface? Thanks, Andrei Matei -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Monday, April 04, 2005 7:00 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] treeviews was ( hidden field ) Another popular treeview is Joust ( http://www.ivanpeters.com/ ) This can be accessed easily: ie.goto('http://www.ivanpeters.com/') irb(main):039:0> ie.show_frames there are 4 frames frame index: 0 name: title frame index: 1 name: menu frame index: 2 name: menuCntrl frame index: 3 name: text ie.frame("menu").link(:text , /Wel/).flash Because of the images used, its easier to iterate through the links collection or use :index Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: 04 April 2005 09:22 To: wtr-general at rubyforge.org Subject: [Wtr-general] treeviews was ( hidden field ) The MSDN site (http://msdn.microsoft.com/library/default.asp ) Strangely does not use this control, so it can be accessed with this code: ie.goto( 'http://msdn.microsoft.com/library/default.asp') ie.frame("fraLeftFrame").frame("fraDeeptree").link(:index,6).click -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI Sent: 04 April 2005 04:42 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] hidden field Thank you all for your answers. I am trying to set the value of a hidden field because that hidden field is normally filled by javascript when you perform some actions on a Microsoft IE TreeView control (I'm using asp.net). This renders as a strange object (it uses some .htc behaviours) and I can't manipulate it using watir (or can I ???). Paul, I've done what you said and it worked. I also had to change the set method of the TextField class and make it _not_ set focus on the object, because the hidden field doesn't support focus. Maybe you would want to include the feature in the next version, because I think it is important. Anyway, I also was able to manipulate the hidden field doing something like: y=$ie.getDocument.all['myHiddenField'] y.value="the value that I want" body=$ie.getDocument().forms['form1'] body.submit() This is great, but I am curious why stuff like this works... I can't find the code for this stuff in watir.rb. When I say $ie.getDocument(), is the return value actually a COM object? If so, are "forms", or "all", properties of this object? Am I understanding this corectly? Thanks a lot, Andrei -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Friday, April 01, 2005 8:06 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] hidden field I was wondering why you would want to do this too. Users don't access these things, which is why we havent exposed any methods to do it. You can do it if you want, in watir.rb cut n paste the TextField class and change the getObject line in the construcor to include "hidden". Unfortunately there is not an easy way to over ride this behaviour (which is why you have to cut n paste). If you have to do this, I expect there is a better way to test what you are doing - or are you trying to test hacking attempts? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: 01 April 2005 08:03 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] hidden field > Why do you want to fill hidden field? Can you send problem > description, source, screen shot...? This is a good point. Manipulating a hidden field is arguably not a valid test. I wouldn't want to try to justify the utility of manipulating a hidden field. Maybe you could make the field not-hidden, and then manipulate it? -Chris _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From christopher.mcmahon at gmail.com Tue Apr 5 11:09:48 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 5 Apr 2005 10:09:48 -0500 Subject: [Wtr-general] database support In-Reply-To: <2000SRVbI7bPKdhn3Wf00000a58@softwin.ro> References: <2000SRVbI7bPKdhn3Wf00000a58@softwin.ro> Message-ID: <72799cd705040508093474b65c@mail.gmail.com> > How can I access a SQL Server database from Ruby? Is there a library that I > can use? Use the ODBC feature of Ruby's DBI library. Here's some example code: @connection = connect('db-instance', 'username', 'password') assert @connection q = @connection.prepare("SELECT * FROM table") q.execute @table_contents = q.fetch_all Untested, but should work. I did this for real just a couple of days ago. -Chris From bret at pettichord.com Tue Apr 5 09:55:52 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 05 Apr 2005 08:55:52 -0500 Subject: [Wtr-general] database support In-Reply-To: <2000SRVbI7bPKdhn3Wf00000a58@softwin.ro> Message-ID: <5.1.0.14.2.20050405085434.01b9fff0@127.0.0.1> Here is some sample code for accessing SQL Server courtesy of Chris McMahon: require 'odbc' include ODBC class TC_add_claim_kitchen_sink < Test::Unit::TestCase def setup @connection = connect('tw-wea', 'std', 'std') assert @connection q = @connection.prepare("SELECT id FROM claim WHERE claim_number = 12345678901") q.execute @current_claim_id = q.fetch_all return unless @current_claim_id ['benefit_period', 'days_worked', 'effective_dated_benefit_salary', 'effective_dated_claim_statuses', 'effective_dated_contract_days', 'last_day_worked'].each {|table| sql_execute("DELETE FROM #{table} WHERE claim_id = #{@current_claim_id}")} sql_execute("DELETE FROM claim WHERE claim_number = 12345678901") end def sql_execute sql_string @connection.prepare(sql_string).execute end ... At 06:06 AM 4/5/2005, Andrei MATEI wrote: >Hi again, > > > >How can I access a SQL Server database from Ruby? Is there a library that >I can use? > > > >Thanks >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From christopher.mcmahon at gmail.com Tue Apr 5 12:53:41 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 5 Apr 2005 11:53:41 -0500 Subject: [Wtr-general] database support In-Reply-To: <5.1.0.14.2.20050405085434.01b9fff0@127.0.0.1> References: <2000SRVbI7bPKdhn3Wf00000a58@softwin.ro> <5.1.0.14.2.20050405085434.01b9fff0@127.0.0.1> Message-ID: <72799cd7050405095358307bbc@mail.gmail.com> On Apr 5, 2005 8:55 AM, Bret Pettichord wrote: > Here is some sample code for accessing SQL Server courtesy of Chris McMahon: > I guess that wasn't proprietary after all. =) -C From c.r.mcgrath at gmail.com Tue Apr 5 18:00:42 2005 From: c.r.mcgrath at gmail.com (Chris McGrath) Date: Tue, 5 Apr 2005 23:00:42 +0100 Subject: [Wtr-general] database support In-Reply-To: <2000SRVbI7bPKdhn3Wf00000a58@softwin.ro> References: <2000SRVbI7bPKdhn3Wf00000a58@softwin.ro> Message-ID: If you're familiar with ADO at all, you can also use it through WIN32OLE require 'win32ole' rs = WIN32OLE.new("ADODB.Recordset") ... Chris On Apr 5, 2005 12:06 PM, Andrei MATEI wrote: > > > > Hi again, > > > > How can I access a SQL Server database from Ruby? Is there a library that I > can use? > > > > Thanks > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > From lsusilo at rsasecurity.com Wed Apr 6 13:24:19 2005 From: lsusilo at rsasecurity.com (Susilo, Laudhi) Date: Wed, 6 Apr 2005 10:24:19 -0700 Subject: [Wtr-general] Getting text out of table's cell Message-ID: <2548B245CD5B9D45AC32CF3889D2E6D001FDEB26@rsana-ex-va1.NA.RSA.NET> Could anyone please point me out on how to get the text out of this element by using its id? I try to use getObject(:id, "id=tblshResults[4][1]") and it returns a valid object. How do I get the text?    Full Thanks, Laudhi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050406/c411735a/attachment.html From paul.rogers at shaw.ca Wed Apr 6 13:45:25 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 06 Apr 2005 11:45:25 -0600 Subject: [Wtr-general] Getting text out of table's cell In-Reply-To: <2548B245CD5B9D45AC32CF3889D2E6D001FDEB26@rsana-ex-va1.NA.RSA.NET> Message-ID: <005601c53ad0$69cbce20$6400a8c0@NewDell> my_string = ie.cell(:id , 'blshResults[4][1]').text should do it - see table_test.rb in the unittests directory Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi Sent: 06 April 2005 11:24 To: wtr-general at rubyforge.org Subject: [Wtr-general] Getting text out of table's cell Could anyone please point me out on how to get the text out of this element by using its id? I try to use getObject(:id, "id=tblshResults[4][1]") and it returns a valid object. How do I get the text?    Full Thanks, Laudhi From Mark_Cain at rl.gov Thu Apr 7 15:58:05 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Thu, 7 Apr 2005 12:58:05 -0700 Subject: [Wtr-general] Getting text out of table's cell Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04E154ED0@EX5V.rl.gov> What if you have cells that do not have any id property set? A7 Other Problem   How would I access the delete and edit buttons in turn for cell value A7? Thanks, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, April 06, 2005 10:45 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell my_string = ie.cell(:id , 'blshResults[4][1]').text should do it - see table_test.rb in the unittests directory Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi Sent: 06 April 2005 11:24 To: wtr-general at rubyforge.org Subject: [Wtr-general] Getting text out of table's cell Could anyone please point me out on how to get the text out of this element by using its id? I try to use getObject(:id, "id=tblshResults[4][1]") and it returns a valid object. How do I get the text?    Full Thanks, Laudhi _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Thu Apr 7 16:47:28 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 07 Apr 2005 14:47:28 -0600 Subject: [Wtr-general] Getting text out of table's cell In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04E154ED0@EX5V.rl.gov> Message-ID: <006f01c53bb3$03f5eac0$6400a8c0@NewDell> For the general case, Ie.table(:id, 'my_table')[1][2].text Where [1] is the row number and [2] is the cell ( these are 1 based) You can of course use :index in place of :id Or just get the whole table as an array my_array = Ie.table(:id, 'my_table').to_a Which will now be a 2 d array If your row has an id you can use Ie.row(:id:,'my_row')[2].text Where [2] is the cell number To access buttons, you can use this, thanks to Lorenzo! table = ie.table(:index,1) table[1][1].button.click Maybe we should also add some iterators for row, and cell Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 07 April 2005 13:58 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell What if you have cells that do not have any id property set? A7 Other Problem   How would I access the delete and edit buttons in turn for cell value A7? Thanks, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, April 06, 2005 10:45 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell my_string = ie.cell(:id , 'blshResults[4][1]').text should do it - see table_test.rb in the unittests directory Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi Sent: 06 April 2005 11:24 To: wtr-general at rubyforge.org Subject: [Wtr-general] Getting text out of table's cell Could anyone please point me out on how to get the text out of this element by using its id? I try to use getObject(:id, "id=tblshResults[4][1]") and it returns a valid object. How do I get the text?    Full Thanks, Laudhi _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From amatei at softwin.ro Fri Apr 8 07:32:48 2005 From: amatei at softwin.ro (Andrei MATEI) Date: Fri, 8 Apr 2005 14:32:48 +0300 Subject: [Wtr-general] Getting text out of table's cell In-Reply-To: <006f01c53bb3$03f5eac0$6400a8c0@NewDell> Message-ID: <2000SRVQW2arWCwbn8k00000cf6@softwin.ro> What about something like accessing the third button in a certain cell? In my opinion, every "container object", like a table, a cell, a div, span, etc. should contain methods for accessing every other object, so you could do something like: Ie.table(:id,'my_table')[1][2].textField(:name,"something")... Is this possible right now? Thanks, Andrei -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Thursday, April 07, 2005 11:47 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell For the general case, Ie.table(:id, 'my_table')[1][2].text Where [1] is the row number and [2] is the cell ( these are 1 based) You can of course use :index in place of :id Or just get the whole table as an array my_array = Ie.table(:id, 'my_table').to_a Which will now be a 2 d array If your row has an id you can use Ie.row(:id:,'my_row')[2].text Where [2] is the cell number To access buttons, you can use this, thanks to Lorenzo! table = ie.table(:index,1) table[1][1].button.click Maybe we should also add some iterators for row, and cell Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 07 April 2005 13:58 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell What if you have cells that do not have any id property set? A7 Other Problem   How would I access the delete and edit buttons in turn for cell value A7? Thanks, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, April 06, 2005 10:45 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell my_string = ie.cell(:id , 'blshResults[4][1]').text should do it - see table_test.rb in the unittests directory Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi Sent: 06 April 2005 11:24 To: wtr-general at rubyforge.org Subject: [Wtr-general] Getting text out of table's cell Could anyone please point me out on how to get the text out of this element by using its id? I try to use getObject(:id, "id=tblshResults[4][1]") and it returns a valid object. How do I get the text?    Full Thanks, Laudhi _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Sat Apr 9 19:21:55 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sat, 09 Apr 2005 17:21:55 -0600 Subject: [Wtr-general] Getting text out of table's cell In-Reply-To: <2000SRVQW2arWCwbn8k00000cf6@softwin.ro> Message-ID: <003801c53d5a$ebc0cfc0$6400a8c0@NewDell> Ive added this in. Get the latest from cvs also see the table_test to see how it works - you'll need to update the html test files too. Bret, can you take a look through the code and see if you are happy with the way Ive done it? Lorenzo - you added this feature to start, is the latest implementation satisfactory for your needs? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI Sent: 08 April 2005 05:33 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell What about something like accessing the third button in a certain cell? In my opinion, every "container object", like a table, a cell, a div, span, etc. should contain methods for accessing every other object, so you could do something like: Ie.table(:id,'my_table')[1][2].textField(:name,"something")... Is this possible right now? Thanks, Andrei -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Thursday, April 07, 2005 11:47 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell For the general case, Ie.table(:id, 'my_table')[1][2].text Where [1] is the row number and [2] is the cell ( these are 1 based) You can of course use :index in place of :id Or just get the whole table as an array my_array = Ie.table(:id, 'my_table').to_a Which will now be a 2 d array If your row has an id you can use Ie.row(:id:,'my_row')[2].text Where [2] is the cell number To access buttons, you can use this, thanks to Lorenzo! table = ie.table(:index,1) table[1][1].button.click Maybe we should also add some iterators for row, and cell Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 07 April 2005 13:58 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell What if you have cells that do not have any id property set? A7 Other Problem   How would I access the delete and edit buttons in turn for cell value A7? Thanks, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, April 06, 2005 10:45 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell my_string = ie.cell(:id , 'blshResults[4][1]').text should do it - see table_test.rb in the unittests directory Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi Sent: 06 April 2005 11:24 To: wtr-general at rubyforge.org Subject: [Wtr-general] Getting text out of table's cell Could anyone please point me out on how to get the text out of this element by using its id? I try to use getObject(:id, "id=tblshResults[4][1]") and it returns a valid object. How do I get the text?    Full Thanks, Laudhi _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From lorenzo_jorquera at yahoo.com Mon Apr 11 10:25:50 2005 From: lorenzo_jorquera at yahoo.com (Lorenzo Jorquera) Date: Mon, 11 Apr 2005 09:25:50 -0500 (CDT) Subject: [Wtr-general] Getting text out of table's cell In-Reply-To: <003801c53d5a$ebc0cfc0$6400a8c0@NewDell> Message-ID: <20050411142550.44547.qmail@web32201.mail.mud.yahoo.com> I've tried it and it is working fine for me. However, I have a question: I understand that the ability to find an object in a row is useful, but why do we need to identify an object inside a cell? I mean, why do we have to write Ie.table(:id,'my_table')[1][2].textField(:name,"something") instead of Ie.table(:id,'my_table')[1][2].textField Is it posible to have more than one textField (or any other object) in a cell? Lorenzo. Paul Rogers wrote: Ive added this in. Get the latest from cvs also see the table_test to see how it works - you'll need to update the html test files too. Bret, can you take a look through the code and see if you are happy with the way Ive done it? Lorenzo - you added this feature to start, is the latest implementation satisfactory for your needs? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI Sent: 08 April 2005 05:33 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell What about something like accessing the third button in a certain cell? In my opinion, every "container object", like a table, a cell, a div, span, etc. should contain methods for accessing every other object, so you could do something like: Ie.table(:id,'my_table')[1][2].textField(:name,"something")... Is this possible right now? Thanks, Andrei -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Thursday, April 07, 2005 11:47 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell For the general case, Ie.table(:id, 'my_table')[1][2].text Where [1] is the row number and [2] is the cell ( these are 1 based) You can of course use :index in place of :id Or just get the whole table as an array my_array = Ie.table(:id, 'my_table').to_a Which will now be a 2 d array If your row has an id you can use Ie.row(:id:,'my_row')[2].text Where [2] is the cell number To access buttons, you can use this, thanks to Lorenzo! table = ie.table(:index,1) table[1][1].button.click Maybe we should also add some iterators for row, and cell Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 07 April 2005 13:58 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell What if you have cells that do not have any id property set? A7 Other Problem [input] 7);" type=button value=Delete> [input] 7);" type=button value=Edit> How would I access the delete and edit buttons in turn for cell value A7? Thanks, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, April 06, 2005 10:45 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell my_string = ie.cell(:id , 'blshResults[4][1]').text should do it - see table_test.rb in the unittests directory Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi Sent: 06 April 2005 11:24 To: wtr-general at rubyforge.org Subject: [Wtr-general] Getting text out of table's cell Could anyone please point me out on how to get the text out of this element by using its id? I try to use getObject(:id, "id=tblshResults[4][1]") and it returns a valid object. How do I get the text? Full Thanks, Laudhi _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general --------------------------------- Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, Am?rica Latina y el resto del Mundo. Vis?ta Yahoo! Noticias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050411/a710d7bb/attachment.html From paul.rogers at shaw.ca Mon Apr 11 11:28:05 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 11 Apr 2005 09:28:05 -0600 Subject: [Wtr-general] www.Watir.com Message-ID: <003601c53eab$121baae0$6400a8c0@NewDell> Ive registered this domain It just redirects to http://wtr.rubyforge.org Paul From paul.rogers at shaw.ca Mon Apr 11 11:53:41 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 11 Apr 2005 09:53:41 -0600 Subject: [Wtr-general] Getting text out of table's cell In-Reply-To: <20050411142550.44547.qmail@web32201.mail.mud.yahoo.com> Message-ID: <003a01c53eae$a5ae91c0$6400a8c0@NewDell> It certainly is possible to have many buttons or textfields in a cell consider the following: How would I access the delete and edit buttons in turn for cell value A7? Thanks, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, April 06, 2005 10:45 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell my_string = ie.cell(:id , 'blshResults[4][1]').text should do it - see table_test.rb in the unittests directory Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi Sent: 06 April 2005 11:24 To: wtr-general at rubyforge.org Subject: [Wtr-general] Getting text out of table's cell Could anyone please point me out on how to get the text out of this element by using its id? I try to use getObject(:id, "id=tblshResults[4][1]") and it returns a valid object. How do I get the text? Thanks, Laudhi _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Mon Apr 11 19:15:27 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 11 Apr 2005 17:15:27 -0600 Subject: [Wtr-general] Getting text out of table's cell In-Reply-To: <45FBDEA3EC56FF4BA10271707861A7D2C57C2A@tg-mail> Message-ID: <007e01c53eec$59124260$6400a8c0@NewDell> Should we add this for other 'container' objects, like span div etc? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sheehy, Kevin Sent: 11 April 2005 16:51 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell I just started using the table methods last week and I realized that it would be very useful if I could access the checkboxes directly. Then I saw this thread over the weekend and saw that this support had just been added. I just downloaded the latest Watir and tried it out - it works great! I can now access my checkboxes thusly: ie.table(:index, '6')[n][1].checkbox(:name, "Task").set Thanks for this great enhancement! -Kevin -----Original Message----- From: Paul Rogers [mailto:paul.rogers at shaw.ca] Sent: Saturday, April 09, 2005 7:22 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Ive added this in. Get the latest from cvs also see the table_test to see how it works - you'll need to update the html test files too. Bret, can you take a look through the code and see if you are happy with the way Ive done it? Lorenzo - you added this feature to start, is the latest implementation satisfactory for your needs? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI Sent: 08 April 2005 05:33 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell What about something like accessing the third button in a certain cell? In my opinion, every "container object", like a table, a cell, a div, span, etc. should contain methods for accessing every other object, so you could do something like: Ie.table(:id,'my_table')[1][2].textField(:name,"something")... Is this possible right now? Thanks, Andrei -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Thursday, April 07, 2005 11:47 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell For the general case, Ie.table(:id, 'my_table')[1][2].text Where [1] is the row number and [2] is the cell ( these are 1 based) You can of course use :index in place of :id Or just get the whole table as an array my_array = Ie.table(:id, 'my_table').to_a Which will now be a 2 d array If your row has an id you can use Ie.row(:id:,'my_row')[2].text Where [2] is the cell number To access buttons, you can use this, thanks to Lorenzo! table = ie.table(:index,1) table[1][1].button.click Maybe we should also add some iterators for row, and cell Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 07 April 2005 13:58 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell What if you have cells that do not have any id property set? How would I access the delete and edit buttons in turn for cell value A7? Thanks, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, April 06, 2005 10:45 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell my_string = ie.cell(:id , 'blshResults[4][1]').text should do it - see table_test.rb in the unittests directory Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi Sent: 06 April 2005 11:24 To: wtr-general at rubyforge.org Subject: [Wtr-general] Getting text out of table's cell Could anyone please point me out on how to get the text out of this element by using its id? I try to use getObject(:id, "id=tblshResults[4][1]") and it returns a valid object. How do I get the text? Thanks, Laudhi _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Mon Apr 11 20:06:11 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Mon, 11 Apr 2005 18:06:11 -0600 Subject: [Wtr-general] Getting text out of table's cell In-Reply-To: <007e01c53eec$59124260$6400a8c0@NewDell> Message-ID: <20050412000606.OELJ3997.priv-edtnes56.telusplanet.net@tintin> I think that's a good idea. The more we can do with DIVs, the better. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: April 11, 2005 5:15 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Should we add this for other 'container' objects, like span div etc? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sheehy, Kevin > Sent: 11 April 2005 16:51 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > I just started using the table methods last week and I realized that it > would be very useful if I could access the checkboxes directly. Then I > saw this thread over the weekend and saw that this support had just been > added. I just downloaded the latest Watir and tried it out - it works > great! I can now access my checkboxes thusly: ie.table(:index, > '6')[n][1].checkbox(:name, "Task").set > > Thanks for this great enhancement! > > -Kevin > > -----Original Message----- > From: Paul Rogers [mailto:paul.rogers at shaw.ca] > Sent: Saturday, April 09, 2005 7:22 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Ive added this in. Get the latest from cvs also see the table_test to > see how it works - you'll need to update the html test files too. > > Bret, can you take a look through the code and see if you are happy with > the way Ive done it? Lorenzo - you added this feature to start, is the > latest implementation satisfactory for your needs? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI > Sent: 08 April 2005 05:33 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What about something like accessing the third button in a certain cell? > > In my opinion, every "container object", like a table, a cell, a div, > span, etc. should contain methods for accessing every other object, so > you could do something like: > Ie.table(:id,'my_table')[1][2].textField(:name,"something")... > > Is this possible right now? > > Thanks, > > Andrei > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Thursday, April 07, 2005 11:47 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > For the general case, > Ie.table(:id, 'my_table')[1][2].text > > Where [1] is the row number and [2] is the cell ( these are 1 based) You > can of course use :index in place of :id > > Or just get the whole table as an array > my_array = Ie.table(:id, 'my_table').to_a > Which will now be a 2 d array > > If your row has an id you can use > > Ie.row(:id:,'my_row')[2].text > Where [2] is the cell number > > > > To access buttons, you can use this, thanks to Lorenzo! > table = ie.table(:index,1) > table[1][1].button.click > > > > > > Maybe we should also add some iterators for row, and cell > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark > Sent: 07 April 2005 13:58 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What if you have cells that do not have any id property set? > > > > > > > > > > How would I access the delete and edit buttons in turn for cell value > A7? > > Thanks, > > --Mark > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Wednesday, April 06, 2005 10:45 AM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > my_string = ie.cell(:id , 'blshResults[4][1]').text > > should do it - see table_test.rb in the unittests directory > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi > Sent: 06 April 2005 11:24 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Getting text out of table's cell > > > Could anyone please point me out on how to get the text out of this > element by using its id? I try to use getObject(:id, > "id=tblshResults[4][1]") and it returns a valid object. How do I get the > text? > > > > Thanks, > Laudhi > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From amatei at softwin.ro Tue Apr 12 04:47:42 2005 From: amatei at softwin.ro (Andrei MATEI) Date: Tue, 12 Apr 2005 11:47:42 +0300 Subject: [Wtr-general] Getting text out of table's cell In-Reply-To: <007e01c53eec$59124260$6400a8c0@NewDell> Message-ID: <2000SRVqfT7eEmP9CDB00000e0f@softwin.ro> >>Should we add this for other 'container' objects, like span div etc? Definitely! Andrei -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sheehy, Kevin Sent: 11 April 2005 16:51 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell I just started using the table methods last week and I realized that it would be very useful if I could access the checkboxes directly. Then I saw this thread over the weekend and saw that this support had just been added. I just downloaded the latest Watir and tried it out - it works great! I can now access my checkboxes thusly: ie.table(:index, '6')[n][1].checkbox(:name, "Task").set Thanks for this great enhancement! -Kevin -----Original Message----- From: Paul Rogers [mailto:paul.rogers at shaw.ca] Sent: Saturday, April 09, 2005 7:22 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Ive added this in. Get the latest from cvs also see the table_test to see how it works - you'll need to update the html test files too. Bret, can you take a look through the code and see if you are happy with the way Ive done it? Lorenzo - you added this feature to start, is the latest implementation satisfactory for your needs? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI Sent: 08 April 2005 05:33 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell What about something like accessing the third button in a certain cell? In my opinion, every "container object", like a table, a cell, a div, span, etc. should contain methods for accessing every other object, so you could do something like: Ie.table(:id,'my_table')[1][2].textField(:name,"something")... Is this possible right now? Thanks, Andrei -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Thursday, April 07, 2005 11:47 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell For the general case, Ie.table(:id, 'my_table')[1][2].text Where [1] is the row number and [2] is the cell ( these are 1 based) You can of course use :index in place of :id Or just get the whole table as an array my_array = Ie.table(:id, 'my_table').to_a Which will now be a 2 d array If your row has an id you can use Ie.row(:id:,'my_row')[2].text Where [2] is the cell number To access buttons, you can use this, thanks to Lorenzo! table = ie.table(:index,1) table[1][1].button.click Maybe we should also add some iterators for row, and cell Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 07 April 2005 13:58 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell What if you have cells that do not have any id property set? How would I access the delete and edit buttons in turn for cell value A7? Thanks, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, April 06, 2005 10:45 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell my_string = ie.cell(:id , 'blshResults[4][1]').text should do it - see table_test.rb in the unittests directory Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi Sent: 06 April 2005 11:24 To: wtr-general at rubyforge.org Subject: [Wtr-general] Getting text out of table's cell Could anyone please point me out on how to get the text out of this element by using its id? I try to use getObject(:id, "id=tblshResults[4][1]") and it returns a valid object. How do I get the text? Thanks, Laudhi _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From KSheehy at telegea.com Tue Apr 12 10:28:49 2005 From: KSheehy at telegea.com (Sheehy, Kevin) Date: Tue, 12 Apr 2005 10:28:49 -0400 Subject: [Wtr-general] Clicking link by URL attribute problem in Watir 1.2 Message-ID: <45FBDEA3EC56FF4BA10271707861A7D2C57C88@tg-mail> I upgraded to Watir 1.2 last week and I noticed that a command that had worked in a previous Watir version (rev 1.94) now no longer works. The line in question is: $ie.link(:url, "/sc2/operations/accounts.ssp").click The HTML snippet is: Accounts ...

Choose Accounts to list, manage and create new accounts.

Note, there are two links to the same page on this page. I changed the line to: $ie.link(:text, "Accounts").click and this works, but I'm curious as to why my original line no longer works. Was this support broken, changed, no longer supported, or something else? Thanks in advance, -Kevin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050412/69eb9fc9/attachment.html From paul.rogers at shaw.ca Tue Apr 12 10:57:52 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 12 Apr 2005 08:57:52 -0600 Subject: [Wtr-general] Clicking link by URL attribute problem in Watir 1.2 In-Reply-To: <45FBDEA3EC56FF4BA10271707861A7D2C57C88@tg-mail> Message-ID: <003b01c53f70$028513d0$6400a8c0@NewDell> there was a bug in previous versions of watir ( and no unit test for the particular case ) on lines like ie.link(:url , "abc.html").click you should probably be using this now: ie.link(:url , /abc.html/).click Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sheehy, Kevin Sent: 12 April 2005 08:29 To: wtr-general at rubyforge.org Subject: [Wtr-general] Clicking link by URL attribute problem in Watir 1.2 I upgraded to Watir 1.2 last week and I noticed that a command that had worked in a previous Watir version (rev 1.94) now no longer works. The line in question is: $ie.link(:url, "/sc2/operations/accounts.ssp").click The HTML snippet is: Accounts .

Choose Accounts to list, manage and create new accounts.

Note, there are two links to the same page on this page. I changed the line to: $ie.link(:text, "Accounts").click and this works, but I'm curious as to why my original line no longer works. Was this support broken, changed, no longer supported, or something else? Thanks in advance, -Kevin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050412/802076ec/attachment.html From KSheehy at telegea.com Tue Apr 12 11:30:33 2005 From: KSheehy at telegea.com (Sheehy, Kevin) Date: Tue, 12 Apr 2005 11:30:33 -0400 Subject: [Wtr-general] RE: Clicking link by URL attribute problem in Watir 1.2 Message-ID: <45FBDEA3EC56FF4BA10271707861A7D2C57CAA@tg-mail> Paul, When I try: $ie.link(:url, /sc2/operations/accounts.ssp/).click I get "unknown regular expression - prat". -Kevin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050412/866d58f1/attachment.html From paul.rogers at shaw.ca Tue Apr 12 11:40:53 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 12 Apr 2005 09:40:53 -0600 Subject: [Wtr-general] RE: Clicking link by URL attribute problem in Watir 1.2 In-Reply-To: <45FBDEA3EC56FF4BA10271707861A7D2C57CAA@tg-mail> Message-ID: <004c01c53f76$02c3bbc0$6400a8c0@NewDell> you'll need to escape the forward slashes try /sc2\/operations\/accounts/ # thats a backslash followed by forward or s = "sc2/operations/acounts.asp" re = Regexp.new( Regexp.escape( s )) ie.link(:url, re).click Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sheehy, Kevin Sent: 12 April 2005 09:31 To: wtr-general at rubyforge.org Subject: [Wtr-general] RE: Clicking link by URL attribute problem in Watir 1.2 Paul, When I try: $ie.link(:url, /sc2/operations/accounts.ssp/).click I get "unknown regular expression - prat". -Kevin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050412/23fe8f02/attachment.html From KSheehy at telegea.com Tue Apr 12 11:53:39 2005 From: KSheehy at telegea.com (Sheehy, Kevin) Date: Tue, 12 Apr 2005 11:53:39 -0400 Subject: [Wtr-general] RE: Clicking link by URL attribute problem in Watir 1.2 Message-ID: <45FBDEA3EC56FF4BA10271707861A7D2C57CBD@tg-mail> Thanks Paul, Escaping the forwardslashes: $ie.link(:url, /sc2\/operations\/accounts.ssp/).click did the trick. -Kevin P.S. On a different note, thanks for publishing release notes with the Watir 1.2 announcement, these were very helpful (and sorely missing from previous releases ;-). I hope publishing release notes with new Watir releases/announcements becomes a Watir tradition! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050412/d3214795/attachment.html From paul.rogers at shaw.ca Tue Apr 12 11:57:30 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 12 Apr 2005 09:57:30 -0600 Subject: [Wtr-general] RE: Clicking link by URL attribute problem in Watir 1.2 In-Reply-To: <45FBDEA3EC56FF4BA10271707861A7D2C57CBD@tg-mail> Message-ID: <005b01c53f78$551daa00$6400a8c0@NewDell> do you mean publishing with the release? Previous versions of release notes are available on wtr.rubyforge.org Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sheehy, Kevin Sent: 12 April 2005 09:54 To: wtr-general at rubyforge.org Subject: [Wtr-general] RE: Clicking link by URL attribute problem in Watir 1.2 Thanks Paul, Escaping the forwardslashes: $ie.link(:url, /sc2\/operations\/accounts.ssp/).click did the trick. -Kevin P.S. On a different note, thanks for publishing release notes with the Watir 1.2 announcement, these were very helpful (and sorely missing from previous releases ;-). I hope publishing release notes with new Watir releases/announcements becomes a Watir tradition! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050412/7c8a16b8/attachment.html From KSheehy at telegea.com Tue Apr 12 12:20:10 2005 From: KSheehy at telegea.com (Sheehy, Kevin) Date: Tue, 12 Apr 2005 12:20:10 -0400 Subject: [Wtr-general] RE: Clicking link by URL attribute problem in W atir 1.2 Message-ID: <45FBDEA3EC56FF4BA10271707861A7D2C57CC7@tg-mail> Ah, I see. I missed the fact that the release notes are available by clicking on the version number. It's slightly obscure, even though it's mentioned at the top of the page, I'm sure I not the only person to have missed them. In any case, including them in the official release announcement email wouldn't hurt. More importantly, getting back to the link URL, is the link by URL attribute example in the current User's Guide now incorrect? I can confirm it no longer works in Watir 1.2: ie.link(:url, "http://pragmaticprogrammer.com/titles/ruby/").click D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1537:in `object_exist_check': Unable to locate object, using url and http://pragmaticprogrammer.com/titles/ruby/ (Watir::Exception::UnknownObjectException) from D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1646:in `click' I'm sure this will trip other people up, as it did me. Thanks, -Kevin _____ From: Paul Rogers [mailto:paul.rogers at shaw.ca] Sent: Tuesday, April 12, 2005 11:58 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RE: Clicking link by URL attribute problem in Watir 1.2 do you mean publishing with the release? Previous versions of release notes are available on wtr.rubyforge.org Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sheehy, Kevin Sent: 12 April 2005 09:54 To: wtr-general at rubyforge.org Subject: [Wtr-general] RE: Clicking link by URL attribute problem in Watir 1.2 Thanks Paul, Escaping the forwardslashes: $ie.link(:url, /sc2\/operations\/accounts.ssp/).click did the trick. -Kevin P.S. On a different note, thanks for publishing release notes with the Watir 1.2 announcement, these were very helpful (and sorely missing from previous releases ;-). I hope publishing release notes with new Watir releases/announcements becomes a Watir tradition! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050412/c32be06d/attachment.html From etabora at brandmuscle.com Tue Apr 12 14:27:53 2005 From: etabora at brandmuscle.com (Eric Tabora) Date: Tue, 12 Apr 2005 14:27:53 -0400 Subject: [Wtr-general] Attach Method Message-ID: This is probably a newbie question. I am getting the message: NoMethodError: undefined method 'attach'for # while trying to use the following attach method: $ie.attach(:title, 'Test New Window') Any ideas? Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050412/c795e4d5/attachment.html From Mark_Cain at rl.gov Tue Apr 12 15:14:18 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Tue, 12 Apr 2005 12:14:18 -0700 Subject: [Wtr-general] Getting text out of table's cell Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04E154ED7@EX5V.rl.gov> Can anyone tell me why sometime I get an Access Denied when trying to access objects from a table? 1) Error: test1_EditISMS(TC_PERAdmin): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2114:in `[]' C:/watir/working/PER/admin/tc_ISMS.rb:52:in `test1_EditISMS' Thanks, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: Monday, April 11, 2005 5:06 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell I think that's a good idea. The more we can do with DIVs, the better. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: April 11, 2005 5:15 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Should we add this for other 'container' objects, like span div etc? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sheehy, Kevin > Sent: 11 April 2005 16:51 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > I just started using the table methods last week and I realized that it > would be very useful if I could access the checkboxes directly. Then I > saw this thread over the weekend and saw that this support had just been > added. I just downloaded the latest Watir and tried it out - it works > great! I can now access my checkboxes thusly: ie.table(:index, > '6')[n][1].checkbox(:name, "Task").set > > Thanks for this great enhancement! > > -Kevin > > -----Original Message----- > From: Paul Rogers [mailto:paul.rogers at shaw.ca] > Sent: Saturday, April 09, 2005 7:22 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Ive added this in. Get the latest from cvs also see the table_test to > see how it works - you'll need to update the html test files too. > > Bret, can you take a look through the code and see if you are happy with > the way Ive done it? Lorenzo - you added this feature to start, is the > latest implementation satisfactory for your needs? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI > Sent: 08 April 2005 05:33 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What about something like accessing the third button in a certain cell? > > In my opinion, every "container object", like a table, a cell, a div, > span, etc. should contain methods for accessing every other object, so > you could do something like: > Ie.table(:id,'my_table')[1][2].textField(:name,"something")... > > Is this possible right now? > > Thanks, > > Andrei > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Thursday, April 07, 2005 11:47 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > For the general case, > Ie.table(:id, 'my_table')[1][2].text > > Where [1] is the row number and [2] is the cell ( these are 1 based) You > can of course use :index in place of :id > > Or just get the whole table as an array > my_array = Ie.table(:id, 'my_table').to_a > Which will now be a 2 d array > > If your row has an id you can use > > Ie.row(:id:,'my_row')[2].text > Where [2] is the cell number > > > > To access buttons, you can use this, thanks to Lorenzo! > table = ie.table(:index,1) > table[1][1].button.click > > > > > > Maybe we should also add some iterators for row, and cell > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark > Sent: 07 April 2005 13:58 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What if you have cells that do not have any id property set? > > > > > > > > > > How would I access the delete and edit buttons in turn for cell value > A7? > > Thanks, > > --Mark > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Wednesday, April 06, 2005 10:45 AM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > my_string = ie.cell(:id , 'blshResults[4][1]').text > > should do it - see table_test.rb in the unittests directory > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi > Sent: 06 April 2005 11:24 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Getting text out of table's cell > > > Could anyone please point me out on how to get the text out of this > element by using its id? I try to use getObject(:id, > "id=tblshResults[4][1]") and it returns a valid object. How do I get the > text? > > > > Thanks, > Laudhi > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Tue Apr 12 15:13:24 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Tue, 12 Apr 2005 12:13:24 -0700 Subject: [Wtr-general] RE: Clicking link by URL attribute problem in W atir 1.2 In-Reply-To: <45FBDEA3EC56FF4BA10271707861A7D2C57CC7@tg-mail> References: <45FBDEA3EC56FF4BA10271707861A7D2C57CC7@tg-mail> Message-ID: <1113333204.425c1dd4a7eda@webmail.telusplanet.net> > More importantly, getting back to the link URL, is the link by URL attribute > example in the current User's Guide now incorrect? I can confirm it no > longer works in Watir 1.2: > > ie.link(:url, "http://pragmaticprogrammer.com/titles/ruby/").click > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1537:in `object_exist_check': Unable > to locate object, using url and http://pragmaticprogrammer.com/titles/ruby/ > (Watir::Exception::UnknownObjectException) from > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1646:in `click' Are you sure it no longer works? When I try it it works: irb(main):001:0> require 'watir' => true irb(main):002:0> ie = Watir::IE.start("http://www.google.com") => # @url_list= ["http://www.google.ca/"] > irb(main):003:0> ie.text_field(:name, "q").set("pickaxe") => nil irb(main):004:0> ie.button(:name, "btnG").click => nil irb(main):005:0> ie.link(:url, "http://pragmaticprogrammer.com/titles/ruby/").cl ick => nil On my machine, I am now on the Programming Ruby, 2nd Edition page. The link attribute only works if that URL is declared in the page you are currently on. -Jonathan From paul.rogers at shaw.ca Tue Apr 12 17:40:11 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 12 Apr 2005 15:40:11 -0600 Subject: [Wtr-general] Getting text out of table's cell In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04E154ED7@EX5V.rl.gov> Message-ID: <009901c53fa8$343d85f0$6400a8c0@NewDell> The access denied message usually means the page is reloading. I may have missed something when I added this functionality. Can you post the code you're using? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 13:14 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Can anyone tell me why sometime I get an Access Denied when trying to access objects from a table? 1) Error: test1_EditISMS(TC_PERAdmin): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2114:in `[]' C:/watir/working/PER/admin/tc_ISMS.rb:52:in `test1_EditISMS' Thanks, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: Monday, April 11, 2005 5:06 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell I think that's a good idea. The more we can do with DIVs, the better. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: April 11, 2005 5:15 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Should we add this for other 'container' objects, like span div etc? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sheehy, Kevin > Sent: 11 April 2005 16:51 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > I just started using the table methods last week and I realized that it > would be very useful if I could access the checkboxes directly. Then I > saw this thread over the weekend and saw that this support had just been > added. I just downloaded the latest Watir and tried it out - it works > great! I can now access my checkboxes thusly: ie.table(:index, > '6')[n][1].checkbox(:name, "Task").set > > Thanks for this great enhancement! > > -Kevin > > -----Original Message----- > From: Paul Rogers [mailto:paul.rogers at shaw.ca] > Sent: Saturday, April 09, 2005 7:22 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Ive added this in. Get the latest from cvs also see the table_test to > see how it works - you'll need to update the html test files too. > > Bret, can you take a look through the code and see if you are happy with > the way Ive done it? Lorenzo - you added this feature to start, is the > latest implementation satisfactory for your needs? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI > Sent: 08 April 2005 05:33 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What about something like accessing the third button in a certain cell? > > In my opinion, every "container object", like a table, a cell, a div, > span, etc. should contain methods for accessing every other object, so > you could do something like: > Ie.table(:id,'my_table')[1][2].textField(:name,"something")... > > Is this possible right now? > > Thanks, > > Andrei > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Thursday, April 07, 2005 11:47 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > For the general case, > Ie.table(:id, 'my_table')[1][2].text > > Where [1] is the row number and [2] is the cell ( these are 1 based) You > can of course use :index in place of :id > > Or just get the whole table as an array > my_array = Ie.table(:id, 'my_table').to_a > Which will now be a 2 d array > > If your row has an id you can use > > Ie.row(:id:,'my_row')[2].text > Where [2] is the cell number > > > > To access buttons, you can use this, thanks to Lorenzo! > table = ie.table(:index,1) > table[1][1].button.click > > > > > > Maybe we should also add some iterators for row, and cell > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark > Sent: 07 April 2005 13:58 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What if you have cells that do not have any id property set? > > > > > > > > > > How would I access the delete and edit buttons in turn for cell value > A7? > > Thanks, > > --Mark > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Wednesday, April 06, 2005 10:45 AM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > my_string = ie.cell(:id , 'blshResults[4][1]').text > > should do it - see table_test.rb in the unittests directory > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi > Sent: 06 April 2005 11:24 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Getting text out of table's cell > > > Could anyone please point me out on how to get the text out of this > element by using its id? I try to use getObject(:id, > "id=tblshResults[4][1]") and it returns a valid object. How do I get the > text? > > > > Thanks, > Laudhi > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Mark_Cain at rl.gov Tue Apr 12 17:51:21 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Tue, 12 Apr 2005 14:51:21 -0700 Subject: [Wtr-general] Getting text out of table's cell Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04E154EDC@EX5V.rl.gov> Here you are Paul. This is the entire test case. I replaces the server name in the url with '...'. there is an actual name there when I run the test. I am running this out of Eclipse 3.1.0 using the Ruby plugin 0.5. # Test case for admin Loacation $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'C:\watir\unittests\setup' class TC_PERAdmin_Location < Test::Unit::TestCase include Watir def gotoPopUpPage() $ie.goto("http://.../rapidweb/chg/per/per/Admin/index.cfm") end def test0_AddLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #add new location $ie.text_field(:name, "Name").set('0Location') $ie.button("Add").click table = $ie.table(:index, 8) assert_equal('0Location',table[4][1].text.strip) end def test1_EditLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #Edit Description just added $ie.button(:index, 3).click $ie.text_field(:name, "Name").append("-Edited") table = $ie.table(:index, 8) $ie.button("Save").click assert_equal('0Location-Edited',table[4][1].text.strip) end def test2_DeleteLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #delete location just added table = $ie.table(:index, 8) $ie.button(:index, 2).click assert_not_equal('0Location-Edited',table[4][1].text.strip) end def test3_ReactivateLocation gotoPopUpPage() $ie.link(:text, /Location/i).click table = $ie.table(:index, 10) #reactivate old location $ie.button(:value, "Reactivate").click assert_not_equal('101-AX',table[2][1].text.strip) end def test4_DeactivateLocation gotoPopUpPage() $ie.link(:text, /Location/i).click table = $ie.table(:index, 8) #deactivate old location table[47][2].button(:value, "Delete").click assert_not_equal('101-AX',table[47][1].text.strip) $ie.close end end --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 2:40 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell The access denied message usually means the page is reloading. I may have missed something when I added this functionality. Can you post the code you're using? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 13:14 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Can anyone tell me why sometime I get an Access Denied when trying to access objects from a table? 1) Error: test1_EditISMS(TC_PERAdmin): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2114:in `[]' C:/watir/working/PER/admin/tc_ISMS.rb:52:in `test1_EditISMS' Thanks, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: Monday, April 11, 2005 5:06 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell I think that's a good idea. The more we can do with DIVs, the better. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: April 11, 2005 5:15 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Should we add this for other 'container' objects, like span div etc? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sheehy, Kevin > Sent: 11 April 2005 16:51 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > I just started using the table methods last week and I realized that it > would be very useful if I could access the checkboxes directly. Then I > saw this thread over the weekend and saw that this support had just been > added. I just downloaded the latest Watir and tried it out - it works > great! I can now access my checkboxes thusly: ie.table(:index, > '6')[n][1].checkbox(:name, "Task").set > > Thanks for this great enhancement! > > -Kevin > > -----Original Message----- > From: Paul Rogers [mailto:paul.rogers at shaw.ca] > Sent: Saturday, April 09, 2005 7:22 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Ive added this in. Get the latest from cvs also see the table_test to > see how it works - you'll need to update the html test files too. > > Bret, can you take a look through the code and see if you are happy with > the way Ive done it? Lorenzo - you added this feature to start, is the > latest implementation satisfactory for your needs? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI > Sent: 08 April 2005 05:33 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What about something like accessing the third button in a certain cell? > > In my opinion, every "container object", like a table, a cell, a div, > span, etc. should contain methods for accessing every other object, so > you could do something like: > Ie.table(:id,'my_table')[1][2].textField(:name,"something")... > > Is this possible right now? > > Thanks, > > Andrei > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Thursday, April 07, 2005 11:47 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > For the general case, > Ie.table(:id, 'my_table')[1][2].text > > Where [1] is the row number and [2] is the cell ( these are 1 based) You > can of course use :index in place of :id > > Or just get the whole table as an array > my_array = Ie.table(:id, 'my_table').to_a > Which will now be a 2 d array > > If your row has an id you can use > > Ie.row(:id:,'my_row')[2].text > Where [2] is the cell number > > > > To access buttons, you can use this, thanks to Lorenzo! > table = ie.table(:index,1) > table[1][1].button.click > > > > > > Maybe we should also add some iterators for row, and cell > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark > Sent: 07 April 2005 13:58 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What if you have cells that do not have any id property set? > > > > > > > > > > How would I access the delete and edit buttons in turn for cell value > A7? > > Thanks, > > --Mark > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Wednesday, April 06, 2005 10:45 AM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > my_string = ie.cell(:id , 'blshResults[4][1]').text > > should do it - see table_test.rb in the unittests directory > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi > Sent: 06 April 2005 11:24 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Getting text out of table's cell > > > Could anyone please point me out on how to get the text out of this > element by using its id? I try to use getObject(:id, > "id=tblshResults[4][1]") and it returns a valid object. How do I get the > text? > > > > Thanks, > Laudhi > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Tue Apr 12 17:50:37 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 12 Apr 2005 15:50:37 -0600 Subject: [Wtr-general] Attach Method In-Reply-To: Message-ID: <009a01c53fa9$a9b37320$6400a8c0@NewDell> what version are you using? The one from cvs works ok for me Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Eric Tabora Sent: 12 April 2005 12:28 To: wtr-general at rubyforge.org Subject: [Wtr-general] Attach Method This is probably a newbie question. I am getting the message: NoMethodError: undefined method 'attach'for # while trying to use the following attach method: $ie.attach(:title, 'Test New Window') Any ideas? Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050412/ed85c1bc/attachment.html From paul.rogers at shaw.ca Tue Apr 12 18:03:30 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 12 Apr 2005 16:03:30 -0600 Subject: [Wtr-general] Getting text out of table's cell In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04E154EDC@EX5V.rl.gov> Message-ID: <00a401c53fab$764e07f0$6400a8c0@NewDell> Thanks Mark, Can I be a pain and ask you to try the latest from cvs. I cant trace any of the line numbers as I made quite a few changes ( none of which will fix this problem though!) Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 15:51 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Here you are Paul. This is the entire test case. I replaces the server name in the url with '...'. there is an actual name there when I run the test. I am running this out of Eclipse 3.1.0 using the Ruby plugin 0.5. # Test case for admin Loacation $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'C:\watir\unittests\setup' class TC_PERAdmin_Location < Test::Unit::TestCase include Watir def gotoPopUpPage() $ie.goto("http://.../rapidweb/chg/per/per/Admin/index.cfm") end def test0_AddLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #add new location $ie.text_field(:name, "Name").set('0Location') $ie.button("Add").click table = $ie.table(:index, 8) assert_equal('0Location',table[4][1].text.strip) end def test1_EditLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #Edit Description just added $ie.button(:index, 3).click $ie.text_field(:name, "Name").append("-Edited") table = $ie.table(:index, 8) $ie.button("Save").click assert_equal('0Location-Edited',table[4][1].text.strip) end def test2_DeleteLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #delete location just added table = $ie.table(:index, 8) $ie.button(:index, 2).click assert_not_equal('0Location-Edited',table[4][1].text.strip) end def test3_ReactivateLocation gotoPopUpPage() $ie.link(:text, /Location/i).click table = $ie.table(:index, 10) #reactivate old location $ie.button(:value, "Reactivate").click assert_not_equal('101-AX',table[2][1].text.strip) end def test4_DeactivateLocation gotoPopUpPage() $ie.link(:text, /Location/i).click table = $ie.table(:index, 8) #deactivate old location table[47][2].button(:value, "Delete").click assert_not_equal('101-AX',table[47][1].text.strip) $ie.close end end --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 2:40 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell The access denied message usually means the page is reloading. I may have missed something when I added this functionality. Can you post the code you're using? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 13:14 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Can anyone tell me why sometime I get an Access Denied when trying to access objects from a table? 1) Error: test1_EditISMS(TC_PERAdmin): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2114:in `[]' C:/watir/working/PER/admin/tc_ISMS.rb:52:in `test1_EditISMS' Thanks, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: Monday, April 11, 2005 5:06 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell I think that's a good idea. The more we can do with DIVs, the better. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: April 11, 2005 5:15 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Should we add this for other 'container' objects, like span div etc? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sheehy, Kevin > Sent: 11 April 2005 16:51 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > I just started using the table methods last week and I realized that it > would be very useful if I could access the checkboxes directly. Then I > saw this thread over the weekend and saw that this support had just been > added. I just downloaded the latest Watir and tried it out - it works > great! I can now access my checkboxes thusly: ie.table(:index, > '6')[n][1].checkbox(:name, "Task").set > > Thanks for this great enhancement! > > -Kevin > > -----Original Message----- > From: Paul Rogers [mailto:paul.rogers at shaw.ca] > Sent: Saturday, April 09, 2005 7:22 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Ive added this in. Get the latest from cvs also see the table_test to > see how it works - you'll need to update the html test files too. > > Bret, can you take a look through the code and see if you are happy with > the way Ive done it? Lorenzo - you added this feature to start, is the > latest implementation satisfactory for your needs? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI > Sent: 08 April 2005 05:33 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What about something like accessing the third button in a certain cell? > > In my opinion, every "container object", like a table, a cell, a div, > span, etc. should contain methods for accessing every other object, so > you could do something like: > Ie.table(:id,'my_table')[1][2].textField(:name,"something")... > > Is this possible right now? > > Thanks, > > Andrei > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Thursday, April 07, 2005 11:47 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > For the general case, > Ie.table(:id, 'my_table')[1][2].text > > Where [1] is the row number and [2] is the cell ( these are 1 based) You > can of course use :index in place of :id > > Or just get the whole table as an array > my_array = Ie.table(:id, 'my_table').to_a > Which will now be a 2 d array > > If your row has an id you can use > > Ie.row(:id:,'my_row')[2].text > Where [2] is the cell number > > > > To access buttons, you can use this, thanks to Lorenzo! > table = ie.table(:index,1) > table[1][1].button.click > > > > > > Maybe we should also add some iterators for row, and cell > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark > Sent: 07 April 2005 13:58 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What if you have cells that do not have any id property set? > > > > > > > > > > How would I access the delete and edit buttons in turn for cell value > A7? > > Thanks, > > --Mark > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Wednesday, April 06, 2005 10:45 AM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > my_string = ie.cell(:id , 'blshResults[4][1]').text > > should do it - see table_test.rb in the unittests directory > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi > Sent: 06 April 2005 11:24 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Getting text out of table's cell > > > Could anyone please point me out on how to get the text out of this > element by using its id? I try to use getObject(:id, > "id=tblshResults[4][1]") and it returns a valid object. How do I get the > text? > > > > Thanks, > Laudhi > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Mark_Cain at rl.gov Tue Apr 12 18:07:59 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Tue, 12 Apr 2005 15:07:59 -0700 Subject: [Wtr-general] Getting text out of table's cell Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04E154EDD@EX5V.rl.gov> I picked up the latest yesterday "Version "$Revision: 1.139 $". Is there a newer one? --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 3:04 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Thanks Mark, Can I be a pain and ask you to try the latest from cvs. I cant trace any of the line numbers as I made quite a few changes ( none of which will fix this problem though!) Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 15:51 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Here you are Paul. This is the entire test case. I replaces the server name in the url with '...'. there is an actual name there when I run the test. I am running this out of Eclipse 3.1.0 using the Ruby plugin 0.5. # Test case for admin Loacation $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'C:\watir\unittests\setup' class TC_PERAdmin_Location < Test::Unit::TestCase include Watir def gotoPopUpPage() $ie.goto("http://.../rapidweb/chg/per/per/Admin/index.cfm") end def test0_AddLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #add new location $ie.text_field(:name, "Name").set('0Location') $ie.button("Add").click table = $ie.table(:index, 8) assert_equal('0Location',table[4][1].text.strip) end def test1_EditLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #Edit Description just added $ie.button(:index, 3).click $ie.text_field(:name, "Name").append("-Edited") table = $ie.table(:index, 8) $ie.button("Save").click assert_equal('0Location-Edited',table[4][1].text.strip) end def test2_DeleteLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #delete location just added table = $ie.table(:index, 8) $ie.button(:index, 2).click assert_not_equal('0Location-Edited',table[4][1].text.strip) end def test3_ReactivateLocation gotoPopUpPage() $ie.link(:text, /Location/i).click table = $ie.table(:index, 10) #reactivate old location $ie.button(:value, "Reactivate").click assert_not_equal('101-AX',table[2][1].text.strip) end def test4_DeactivateLocation gotoPopUpPage() $ie.link(:text, /Location/i).click table = $ie.table(:index, 8) #deactivate old location table[47][2].button(:value, "Delete").click assert_not_equal('101-AX',table[47][1].text.strip) $ie.close end end --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 2:40 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell The access denied message usually means the page is reloading. I may have missed something when I added this functionality. Can you post the code you're using? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 13:14 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Can anyone tell me why sometime I get an Access Denied when trying to access objects from a table? 1) Error: test1_EditISMS(TC_PERAdmin): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2114:in `[]' C:/watir/working/PER/admin/tc_ISMS.rb:52:in `test1_EditISMS' Thanks, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: Monday, April 11, 2005 5:06 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell I think that's a good idea. The more we can do with DIVs, the better. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: April 11, 2005 5:15 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Should we add this for other 'container' objects, like span div etc? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sheehy, Kevin > Sent: 11 April 2005 16:51 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > I just started using the table methods last week and I realized that it > would be very useful if I could access the checkboxes directly. Then I > saw this thread over the weekend and saw that this support had just been > added. I just downloaded the latest Watir and tried it out - it works > great! I can now access my checkboxes thusly: ie.table(:index, > '6')[n][1].checkbox(:name, "Task").set > > Thanks for this great enhancement! > > -Kevin > > -----Original Message----- > From: Paul Rogers [mailto:paul.rogers at shaw.ca] > Sent: Saturday, April 09, 2005 7:22 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Ive added this in. Get the latest from cvs also see the table_test to > see how it works - you'll need to update the html test files too. > > Bret, can you take a look through the code and see if you are happy with > the way Ive done it? Lorenzo - you added this feature to start, is the > latest implementation satisfactory for your needs? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI > Sent: 08 April 2005 05:33 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What about something like accessing the third button in a certain cell? > > In my opinion, every "container object", like a table, a cell, a div, > span, etc. should contain methods for accessing every other object, so > you could do something like: > Ie.table(:id,'my_table')[1][2].textField(:name,"something")... > > Is this possible right now? > > Thanks, > > Andrei > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Thursday, April 07, 2005 11:47 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > For the general case, > Ie.table(:id, 'my_table')[1][2].text > > Where [1] is the row number and [2] is the cell ( these are 1 based) You > can of course use :index in place of :id > > Or just get the whole table as an array > my_array = Ie.table(:id, 'my_table').to_a > Which will now be a 2 d array > > If your row has an id you can use > > Ie.row(:id:,'my_row')[2].text > Where [2] is the cell number > > > > To access buttons, you can use this, thanks to Lorenzo! > table = ie.table(:index,1) > table[1][1].button.click > > > > > > Maybe we should also add some iterators for row, and cell > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark > Sent: 07 April 2005 13:58 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What if you have cells that do not have any id property set? > > > > > > > > > > How would I access the delete and edit buttons in turn for cell value > A7? > > Thanks, > > --Mark > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Wednesday, April 06, 2005 10:45 AM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > my_string = ie.cell(:id , 'blshResults[4][1]').text > > should do it - see table_test.rb in the unittests directory > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi > Sent: 06 April 2005 11:24 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Getting text out of table's cell > > > Could anyone please point me out on how to get the text out of this > element by using its id? I try to use getObject(:id, > "id=tblshResults[4][1]") and it returns a valid object. How do I get the > text? > > > > Thanks, > Laudhi > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Mark_Cain at rl.gov Tue Apr 12 18:21:26 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Tue, 12 Apr 2005 15:21:26 -0700 Subject: [Wtr-general] Getting text out of table's cell Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04E154EDE@EX5V.rl.gov> Ok just loaded the newest one. Reran the test and got this: 1) Error: test1_EditLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:42:in `test1_EditLocation' 2) Error: test2_DeleteLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:58:in `test2_DeleteLocation' 3) Error: test3_ReactivateLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:75:in `test3_ReactivateLocation' 4) Error: test4_DeactivateLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:92:in `test4_DeactivateLocation' 5 tests, 1 assertions, 0 failures, 4 errors The really weird part is that the test runs exactly like I expect it to--the browser launches completes all the things I tell it to do--but throws this error. --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: Tuesday, April 12, 2005 3:08 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell I picked up the latest yesterday "Version "$Revision: 1.139 $". Is there a newer one? --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 3:04 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Thanks Mark, Can I be a pain and ask you to try the latest from cvs. I cant trace any of the line numbers as I made quite a few changes ( none of which will fix this problem though!) Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 15:51 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Here you are Paul. This is the entire test case. I replaces the server name in the url with '...'. there is an actual name there when I run the test. I am running this out of Eclipse 3.1.0 using the Ruby plugin 0.5. # Test case for admin Loacation $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'C:\watir\unittests\setup' class TC_PERAdmin_Location < Test::Unit::TestCase include Watir def gotoPopUpPage() $ie.goto("http://.../rapidweb/chg/per/per/Admin/index.cfm") end def test0_AddLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #add new location $ie.text_field(:name, "Name").set('0Location') $ie.button("Add").click table = $ie.table(:index, 8) assert_equal('0Location',table[4][1].text.strip) end def test1_EditLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #Edit Description just added $ie.button(:index, 3).click $ie.text_field(:name, "Name").append("-Edited") table = $ie.table(:index, 8) $ie.button("Save").click assert_equal('0Location-Edited',table[4][1].text.strip) end def test2_DeleteLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #delete location just added table = $ie.table(:index, 8) $ie.button(:index, 2).click assert_not_equal('0Location-Edited',table[4][1].text.strip) end def test3_ReactivateLocation gotoPopUpPage() $ie.link(:text, /Location/i).click table = $ie.table(:index, 10) #reactivate old location $ie.button(:value, "Reactivate").click assert_not_equal('101-AX',table[2][1].text.strip) end def test4_DeactivateLocation gotoPopUpPage() $ie.link(:text, /Location/i).click table = $ie.table(:index, 8) #deactivate old location table[47][2].button(:value, "Delete").click assert_not_equal('101-AX',table[47][1].text.strip) $ie.close end end --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 2:40 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell The access denied message usually means the page is reloading. I may have missed something when I added this functionality. Can you post the code you're using? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 13:14 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Can anyone tell me why sometime I get an Access Denied when trying to access objects from a table? 1) Error: test1_EditISMS(TC_PERAdmin): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2114:in `[]' C:/watir/working/PER/admin/tc_ISMS.rb:52:in `test1_EditISMS' Thanks, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: Monday, April 11, 2005 5:06 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell I think that's a good idea. The more we can do with DIVs, the better. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: April 11, 2005 5:15 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Should we add this for other 'container' objects, like span div etc? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sheehy, Kevin > Sent: 11 April 2005 16:51 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > I just started using the table methods last week and I realized that it > would be very useful if I could access the checkboxes directly. Then I > saw this thread over the weekend and saw that this support had just been > added. I just downloaded the latest Watir and tried it out - it works > great! I can now access my checkboxes thusly: ie.table(:index, > '6')[n][1].checkbox(:name, "Task").set > > Thanks for this great enhancement! > > -Kevin > > -----Original Message----- > From: Paul Rogers [mailto:paul.rogers at shaw.ca] > Sent: Saturday, April 09, 2005 7:22 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Ive added this in. Get the latest from cvs also see the table_test to > see how it works - you'll need to update the html test files too. > > Bret, can you take a look through the code and see if you are happy with > the way Ive done it? Lorenzo - you added this feature to start, is the > latest implementation satisfactory for your needs? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI > Sent: 08 April 2005 05:33 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What about something like accessing the third button in a certain cell? > > In my opinion, every "container object", like a table, a cell, a div, > span, etc. should contain methods for accessing every other object, so > you could do something like: > Ie.table(:id,'my_table')[1][2].textField(:name,"something")... > > Is this possible right now? > > Thanks, > > Andrei > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Thursday, April 07, 2005 11:47 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > For the general case, > Ie.table(:id, 'my_table')[1][2].text > > Where [1] is the row number and [2] is the cell ( these are 1 based) You > can of course use :index in place of :id > > Or just get the whole table as an array > my_array = Ie.table(:id, 'my_table').to_a > Which will now be a 2 d array > > If your row has an id you can use > > Ie.row(:id:,'my_row')[2].text > Where [2] is the cell number > > > > To access buttons, you can use this, thanks to Lorenzo! > table = ie.table(:index,1) > table[1][1].button.click > > > > > > Maybe we should also add some iterators for row, and cell > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark > Sent: 07 April 2005 13:58 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What if you have cells that do not have any id property set? > > > > > > > > > > How would I access the delete and edit buttons in turn for cell value > A7? > > Thanks, > > --Mark > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Wednesday, April 06, 2005 10:45 AM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > my_string = ie.cell(:id , 'blshResults[4][1]').text > > should do it - see table_test.rb in the unittests directory > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi > Sent: 06 April 2005 11:24 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Getting text out of table's cell > > > Could anyone please point me out on how to get the text out of this > element by using its id? I try to use getObject(:id, > "id=tblshResults[4][1]") and it returns a valid object. How do I get the > text? > > > > Thanks, > Laudhi > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Tue Apr 12 18:23:05 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 12 Apr 2005 16:23:05 -0600 Subject: [Wtr-general] Getting text out of table's cell In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04E154EDD@EX5V.rl.gov> Message-ID: <00a501c53fae$32c0c240$6400a8c0@NewDell> Yep, I checked it in 20 minutes or so ago! -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 16:08 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell I picked up the latest yesterday "Version "$Revision: 1.139 $". Is there a newer one? --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 3:04 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Thanks Mark, Can I be a pain and ask you to try the latest from cvs. I cant trace any of the line numbers as I made quite a few changes ( none of which will fix this problem though!) Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 15:51 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Here you are Paul. This is the entire test case. I replaces the server name in the url with '...'. there is an actual name there when I run the test. I am running this out of Eclipse 3.1.0 using the Ruby plugin 0.5. # Test case for admin Loacation $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'C:\watir\unittests\setup' class TC_PERAdmin_Location < Test::Unit::TestCase include Watir def gotoPopUpPage() $ie.goto("http://.../rapidweb/chg/per/per/Admin/index.cfm") end def test0_AddLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #add new location $ie.text_field(:name, "Name").set('0Location') $ie.button("Add").click table = $ie.table(:index, 8) assert_equal('0Location',table[4][1].text.strip) end def test1_EditLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #Edit Description just added $ie.button(:index, 3).click $ie.text_field(:name, "Name").append("-Edited") table = $ie.table(:index, 8) $ie.button("Save").click assert_equal('0Location-Edited',table[4][1].text.strip) end def test2_DeleteLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #delete location just added table = $ie.table(:index, 8) $ie.button(:index, 2).click assert_not_equal('0Location-Edited',table[4][1].text.strip) end def test3_ReactivateLocation gotoPopUpPage() $ie.link(:text, /Location/i).click table = $ie.table(:index, 10) #reactivate old location $ie.button(:value, "Reactivate").click assert_not_equal('101-AX',table[2][1].text.strip) end def test4_DeactivateLocation gotoPopUpPage() $ie.link(:text, /Location/i).click table = $ie.table(:index, 8) #deactivate old location table[47][2].button(:value, "Delete").click assert_not_equal('101-AX',table[47][1].text.strip) $ie.close end end --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 2:40 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell The access denied message usually means the page is reloading. I may have missed something when I added this functionality. Can you post the code you're using? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 13:14 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Can anyone tell me why sometime I get an Access Denied when trying to access objects from a table? 1) Error: test1_EditISMS(TC_PERAdmin): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2114:in `[]' C:/watir/working/PER/admin/tc_ISMS.rb:52:in `test1_EditISMS' Thanks, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: Monday, April 11, 2005 5:06 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell I think that's a good idea. The more we can do with DIVs, the better. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: April 11, 2005 5:15 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Should we add this for other 'container' objects, like span div etc? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sheehy, Kevin > Sent: 11 April 2005 16:51 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > I just started using the table methods last week and I realized that it > would be very useful if I could access the checkboxes directly. Then I > saw this thread over the weekend and saw that this support had just been > added. I just downloaded the latest Watir and tried it out - it works > great! I can now access my checkboxes thusly: ie.table(:index, > '6')[n][1].checkbox(:name, "Task").set > > Thanks for this great enhancement! > > -Kevin > > -----Original Message----- > From: Paul Rogers [mailto:paul.rogers at shaw.ca] > Sent: Saturday, April 09, 2005 7:22 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Ive added this in. Get the latest from cvs also see the table_test to > see how it works - you'll need to update the html test files too. > > Bret, can you take a look through the code and see if you are happy with > the way Ive done it? Lorenzo - you added this feature to start, is the > latest implementation satisfactory for your needs? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI > Sent: 08 April 2005 05:33 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What about something like accessing the third button in a certain cell? > > In my opinion, every "container object", like a table, a cell, a div, > span, etc. should contain methods for accessing every other object, so > you could do something like: > Ie.table(:id,'my_table')[1][2].textField(:name,"something")... > > Is this possible right now? > > Thanks, > > Andrei > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Thursday, April 07, 2005 11:47 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > For the general case, > Ie.table(:id, 'my_table')[1][2].text > > Where [1] is the row number and [2] is the cell ( these are 1 based) You > can of course use :index in place of :id > > Or just get the whole table as an array > my_array = Ie.table(:id, 'my_table').to_a > Which will now be a 2 d array > > If your row has an id you can use > > Ie.row(:id:,'my_row')[2].text > Where [2] is the cell number > > > > To access buttons, you can use this, thanks to Lorenzo! > table = ie.table(:index,1) > table[1][1].button.click > > > > > > Maybe we should also add some iterators for row, and cell > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark > Sent: 07 April 2005 13:58 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What if you have cells that do not have any id property set? > > > > > > > > > > How would I access the delete and edit buttons in turn for cell value > A7? > > Thanks, > > --Mark > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Wednesday, April 06, 2005 10:45 AM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > my_string = ie.cell(:id , 'blshResults[4][1]').text > > should do it - see table_test.rb in the unittests directory > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi > Sent: 06 April 2005 11:24 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Getting text out of table's cell > > > Could anyone please point me out on how to get the text out of this > element by using its id? I try to use getObject(:id, > "id=tblshResults[4][1]") and it returns a valid object. How do I get the > text? > > > > Thanks, > Laudhi > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From john.lloydjones at gmail.com Tue Apr 12 19:56:00 2005 From: john.lloydjones at gmail.com (John Lloyd-Jones) Date: Tue, 12 Apr 2005 16:56:00 -0700 Subject: [Wtr-general] RE: Clicking link by URL attribute problem in W atir 1.2 In-Reply-To: <1113333204.425c1dd4a7eda@webmail.telusplanet.net> References: <45FBDEA3EC56FF4BA10271707861A7D2C57CC7@tg-mail> <1113333204.425c1dd4a7eda@webmail.telusplanet.net> Message-ID: <6fcd26f105041216566689c1ee@mail.gmail.com> Jonathan It seems that there is a change from 1.1. The test now requires the fully qualified URL (e.g. http://myhost.mydomain.com/pagename.html") whereas previously, I could simply use the URL actually given in the anchor tag (e.g. href="pagename.html" ). This has broken some of my test scripts. John On 4/12/05, jkohl at telusplanet.net wrote: > > > More importantly, getting back to the link URL, is the link by URL attribute > > example in the current User's Guide now incorrect? I can confirm it no > > longer works in Watir 1.2: > > > > ie.link(:url, "http://pragmaticprogrammer.com/titles/ruby/").click > > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1537:in `object_exist_check': Unable > > to locate object, using url and http://pragmaticprogrammer.com/titles/ruby/ > > (Watir::Exception::UnknownObjectException) from > > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1646:in `click' > Are you sure it no longer works? When I try it it works: > irb(main):001:0> require 'watir' > => true > irb(main):002:0> ie = Watir::IE.start("http://www.google.com") > => # @url_list= > ["http://www.google.ca/"] > > > irb(main):003:0> ie.text_field(:name, "q").set("pickaxe") > => nil > irb(main):004:0> ie.button(:name, "btnG").click > => nil > irb(main):005:0> ie.link(:url, "http://pragmaticprogrammer.com/titles/ruby/").cl > ick > => nil > > On my machine, I am now on the Programming Ruby, 2nd Edition page. The link > attribute only works if that URL is declared in the page you are currently on. > > -Jonathan > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From jkohl at telusplanet.net Tue Apr 12 22:38:50 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Tue, 12 Apr 2005 20:38:50 -0600 Subject: [Wtr-general] RE: Clicking link by URL attribute problem in Watir 1.2 In-Reply-To: <6fcd26f105041216566689c1ee@mail.gmail.com> Message-ID: <20050413023830.IXYK11166.priv-edtnes56.telusplanet.net@tintin> Interesting. I'll have to try that out. Does: ie.link(:url, /pagename.html/).click work? > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of John Lloyd-Jones > Sent: April 12, 2005 5:56 PM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] RE: Clicking link by URL attribute problem in > Watir 1.2 > > Jonathan > > It seems that there is a change from 1.1. > The test now requires the fully qualified URL > (e.g. http://myhost.mydomain.com/pagename.html") > whereas previously, I could simply use the URL > actually given in the anchor tag (e.g. href="pagename.html" ). > This has broken some of my test scripts. > > John > > > On 4/12/05, jkohl at telusplanet.net wrote: > > > > > More importantly, getting back to the link URL, is the link by URL > attribute > > > example in the current User's Guide now incorrect? I can confirm it > no > > > longer works in Watir 1.2: > > > > > > ie.link(:url, "http://pragmaticprogrammer.com/titles/ruby/").click > > > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1537:in `object_exist_check': > Unable > > > to locate object, using url and > http://pragmaticprogrammer.com/titles/ruby/ > > > (Watir::Exception::UnknownObjectException) from > > > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1646:in `click' > > Are you sure it no longer works? When I try it it works: > > irb(main):001:0> require 'watir' > > => true > > irb(main):002:0> ie = Watir::IE.start("http://www.google.com") > > => # @url_list= > > ["http://www.google.ca/"] > > > > > irb(main):003:0> ie.text_field(:name, "q").set("pickaxe") > > => nil > > irb(main):004:0> ie.button(:name, "btnG").click > > => nil > > irb(main):005:0> ie.link(:url, > "http://pragmaticprogrammer.com/titles/ruby/").cl > > ick > > => nil > > > > On my machine, I am now on the Programming Ruby, 2nd Edition page. The > link > > attribute only works if that URL is declared in the page you are > currently on. > > > > -Jonathan > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Tue Apr 12 22:39:17 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 12 Apr 2005 20:39:17 -0600 Subject: [Wtr-general] Getting text out of table's cell In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04E154EDE@EX5V.rl.gov> Message-ID: <00ac01c53fd1$fd28ee40$6400a8c0@NewDell> Well, I cant see anything wrong, unit tests etc pass ( even when using a remote host) Is your page created using javascript or xmlhttprequest? Can you send the html? Which is the line in your test that fails ( I think I know, but just to make sure!) Thanks Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 16:21 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Ok just loaded the newest one. Reran the test and got this: 1) Error: test1_EditLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:42:in `test1_EditLocation' 2) Error: test2_DeleteLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:58:in `test2_DeleteLocation' 3) Error: test3_ReactivateLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:75:in `test3_ReactivateLocation' 4) Error: test4_DeactivateLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:92:in `test4_DeactivateLocation' 5 tests, 1 assertions, 0 failures, 4 errors The really weird part is that the test runs exactly like I expect it to--the browser launches completes all the things I tell it to do--but throws this error. --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: Tuesday, April 12, 2005 3:08 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell I picked up the latest yesterday "Version "$Revision: 1.139 $". Is there a newer one? --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 3:04 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Thanks Mark, Can I be a pain and ask you to try the latest from cvs. I cant trace any of the line numbers as I made quite a few changes ( none of which will fix this problem though!) Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 15:51 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Here you are Paul. This is the entire test case. I replaces the server name in the url with '...'. there is an actual name there when I run the test. I am running this out of Eclipse 3.1.0 using the Ruby plugin 0.5. # Test case for admin Loacation $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'C:\watir\unittests\setup' class TC_PERAdmin_Location < Test::Unit::TestCase include Watir def gotoPopUpPage() $ie.goto("http://.../rapidweb/chg/per/per/Admin/index.cfm") end def test0_AddLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #add new location $ie.text_field(:name, "Name").set('0Location') $ie.button("Add").click table = $ie.table(:index, 8) assert_equal('0Location',table[4][1].text.strip) end def test1_EditLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #Edit Description just added $ie.button(:index, 3).click $ie.text_field(:name, "Name").append("-Edited") table = $ie.table(:index, 8) $ie.button("Save").click assert_equal('0Location-Edited',table[4][1].text.strip) end def test2_DeleteLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #delete location just added table = $ie.table(:index, 8) $ie.button(:index, 2).click assert_not_equal('0Location-Edited',table[4][1].text.strip) end def test3_ReactivateLocation gotoPopUpPage() $ie.link(:text, /Location/i).click table = $ie.table(:index, 10) #reactivate old location $ie.button(:value, "Reactivate").click assert_not_equal('101-AX',table[2][1].text.strip) end def test4_DeactivateLocation gotoPopUpPage() $ie.link(:text, /Location/i).click table = $ie.table(:index, 8) #deactivate old location table[47][2].button(:value, "Delete").click assert_not_equal('101-AX',table[47][1].text.strip) $ie.close end end --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 2:40 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell The access denied message usually means the page is reloading. I may have missed something when I added this functionality. Can you post the code you're using? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 13:14 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Can anyone tell me why sometime I get an Access Denied when trying to access objects from a table? 1) Error: test1_EditISMS(TC_PERAdmin): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2114:in `[]' C:/watir/working/PER/admin/tc_ISMS.rb:52:in `test1_EditISMS' Thanks, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: Monday, April 11, 2005 5:06 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell I think that's a good idea. The more we can do with DIVs, the better. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: April 11, 2005 5:15 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Should we add this for other 'container' objects, like span div etc? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sheehy, Kevin > Sent: 11 April 2005 16:51 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > I just started using the table methods last week and I realized that it > would be very useful if I could access the checkboxes directly. Then I > saw this thread over the weekend and saw that this support had just been > added. I just downloaded the latest Watir and tried it out - it works > great! I can now access my checkboxes thusly: ie.table(:index, > '6')[n][1].checkbox(:name, "Task").set > > Thanks for this great enhancement! > > -Kevin > > -----Original Message----- > From: Paul Rogers [mailto:paul.rogers at shaw.ca] > Sent: Saturday, April 09, 2005 7:22 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Ive added this in. Get the latest from cvs also see the table_test to > see how it works - you'll need to update the html test files too. > > Bret, can you take a look through the code and see if you are happy with > the way Ive done it? Lorenzo - you added this feature to start, is the > latest implementation satisfactory for your needs? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI > Sent: 08 April 2005 05:33 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What about something like accessing the third button in a certain cell? > > In my opinion, every "container object", like a table, a cell, a div, > span, etc. should contain methods for accessing every other object, so > you could do something like: > Ie.table(:id,'my_table')[1][2].textField(:name,"something")... > > Is this possible right now? > > Thanks, > > Andrei > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Thursday, April 07, 2005 11:47 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > For the general case, > Ie.table(:id, 'my_table')[1][2].text > > Where [1] is the row number and [2] is the cell ( these are 1 based) You > can of course use :index in place of :id > > Or just get the whole table as an array > my_array = Ie.table(:id, 'my_table').to_a > Which will now be a 2 d array > > If your row has an id you can use > > Ie.row(:id:,'my_row')[2].text > Where [2] is the cell number > > > > To access buttons, you can use this, thanks to Lorenzo! > table = ie.table(:index,1) > table[1][1].button.click > > > > > > Maybe we should also add some iterators for row, and cell > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark > Sent: 07 April 2005 13:58 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What if you have cells that do not have any id property set? > > > > > > > > > > How would I access the delete and edit buttons in turn for cell value > A7? > > Thanks, > > --Mark > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Wednesday, April 06, 2005 10:45 AM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > my_string = ie.cell(:id , 'blshResults[4][1]').text > > should do it - see table_test.rb in the unittests directory > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi > Sent: 06 April 2005 11:24 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Getting text out of table's cell > > > Could anyone please point me out on how to get the text out of this > element by using its id? I try to use getObject(:id, > "id=tblshResults[4][1]") and it returns a valid object. How do I get the > text? > > > > Thanks, > Laudhi > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Wed Apr 13 00:53:43 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 12 Apr 2005 23:53:43 -0500 Subject: [Wtr-general] Attach Method In-Reply-To: Message-ID: <5.1.0.14.2.20050412235237.03b0f178@127.0.0.1> At 01:27 PM 4/12/2005, Eric Tabora wrote: >$ie.attach(:title, 'Test New Window') Try this instead: ie = Watir::IE.attach(:title, 'Test New Window') _____________________ Bret Pettichord www.pettichord.com From etabora at brandmuscle.com Wed Apr 13 08:20:11 2005 From: etabora at brandmuscle.com (Eric Tabora) Date: Wed, 13 Apr 2005 08:20:11 -0400 Subject: [Wtr-general] Attach Method In-Reply-To: <009a01c53fa9$a9b37320$6400a8c0@NewDell> Message-ID: I'm using v1.2. I'll try checking out the lastest code from CVS. _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 5:51 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Attach Method what version are you using? The one from cvs works ok for me Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Eric Tabora Sent: 12 April 2005 12:28 To: wtr-general at rubyforge.org Subject: [Wtr-general] Attach Method This is probably a newbie question. I am getting the message: NoMethodError: undefined method 'attach'for # while trying to use the following attach method: $ie.attach(:title, 'Test New Window') Any ideas? Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050413/6e5e7597/attachment.html From aashishharsh at yahoo.com Wed Apr 13 08:38:24 2005 From: aashishharsh at yahoo.com (ashish harsh) Date: Wed, 13 Apr 2005 05:38:24 -0700 (PDT) Subject: [Wtr-general] Problem with each images In-Reply-To: <200504131214.j3DCECdT025853@rubyforge.org> Message-ID: <20050413123824.26897.qmail@web54010.mail.yahoo.com> Hi All, I'm using watir v1.2 and facing a problem ,if any body has any idea.. I've a page in which there n images with same source and no other attribute is available,some of images are only images and some of them acts as links or say buttons (with "delete" event associated with them).I'm using $ie.images.each do |image| if image.src=~/delete.gif/ startClicker("OK",3) image.click end now watir starts with each image and click that image, but in between my page is getting refreshed (because one image is removed).now whole pattern is shifted upwards. so it is going to next image ,but now all images are shifted up,so $ie.images.each is not valid and throwing unknown object exception(image with id not found)and as images are shifted up but it is going according to positions of images.if 5 images are available than i can remove only 1,3,5. Thanx Aashish K Harsh --- wtr-general-request at rubyforge.org wrote: > Send Wtr-general mailing list submissions to > wtr-general at rubyforge.org > > To subscribe or unsubscribe via the World Wide Web, > visit > http://rubyforge.org/mailman/listinfo/wtr-general > or, via email, send a message with subject or body > 'help' to > wtr-general-request at rubyforge.org > > You can reach the person managing the list at > wtr-general-owner at rubyforge.org > > When replying, please edit your Subject line so it > is more specific > than "Re: Contents of Wtr-general digest..." > > > Today's Topics: > > 1. Re: RE: Clicking link by URL attribute problem > in W atir 1.2 > (John Lloyd-Jones) > 2. RE: RE: Clicking link by URL attribute problem > in Watir 1.2 > (Jonathan Kohl) > 3. RE: Getting text out of table's cell (Paul > Rogers) > 4. Re: Attach Method (Bret Pettichord) > 5. RE: Attach Method (Eric Tabora) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 12 Apr 2005 16:56:00 -0700 > From: John Lloyd-Jones > Subject: Re: [Wtr-general] RE: Clicking link by URL > attribute problem > in W atir 1.2 > To: wtr-general at rubyforge.org > Message-ID: > <6fcd26f105041216566689c1ee at mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Jonathan > > It seems that there is a change from 1.1. > The test now requires the fully qualified URL > (e.g. http://myhost.mydomain.com/pagename.html") > whereas previously, I could simply use the URL > actually given in the anchor tag (e.g. > href="pagename.html" ). > This has broken some of my test scripts. > > John > > > On 4/12/05, jkohl at telusplanet.net > wrote: > > > > > More importantly, getting back to the link URL, > is the link by URL attribute > > > example in the current User's Guide now > incorrect? I can confirm it no > > > longer works in Watir 1.2: > > > > > > ie.link(:url, > "http://pragmaticprogrammer.com/titles/ruby/").click > > > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1537:in > `object_exist_check': Unable > > > to locate object, using url and > http://pragmaticprogrammer.com/titles/ruby/ > > > (Watir::Exception::UnknownObjectException) from > > > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1646:in > `click' > > Are you sure it no longer works? When I try it it > works: > > irb(main):001:0> require 'watir' > > => true > > irb(main):002:0> ie = > Watir::IE.start("http://www.google.com") > > => # @url_list= > > ["http://www.google.ca/"] > > > > > irb(main):003:0> ie.text_field(:name, > "q").set("pickaxe") > > => nil > > irb(main):004:0> ie.button(:name, "btnG").click > > => nil > > irb(main):005:0> ie.link(:url, > "http://pragmaticprogrammer.com/titles/ruby/").cl > > ick > > => nil > > > > On my machine, I am now on the Programming Ruby, > 2nd Edition page. The link > > attribute only works if that URL is declared in > the page you are currently on. > > > > -Jonathan > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > ------------------------------ > > Message: 2 > Date: Tue, 12 Apr 2005 20:38:50 -0600 > From: "Jonathan Kohl" > Subject: RE: [Wtr-general] RE: Clicking link by URL > attribute problem > in Watir 1.2 > To: > Message-ID: > > <20050413023830.IXYK11166.priv-edtnes56.telusplanet.net at tintin> > Content-Type: text/plain; charset="us-ascii" > > Interesting. I'll have to try that out. > > Does: > > ie.link(:url, /pagename.html/).click > > work? > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general- > > bounces at rubyforge.org] On Behalf Of John > Lloyd-Jones > > Sent: April 12, 2005 5:56 PM > > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] RE: Clicking link by > URL attribute problem in > > Watir 1.2 > > > > Jonathan > > > > It seems that there is a change from 1.1. > > The test now requires the fully qualified URL > > (e.g. http://myhost.mydomain.com/pagename.html") > > whereas previously, I could simply use the URL > > actually given in the anchor tag (e.g. > href="pagename.html" ). > > This has broken some of my test scripts. > > > > John > > > > > > On 4/12/05, jkohl at telusplanet.net > wrote: > > > > > > > More importantly, getting back to the link > URL, is the link by URL > > attribute > > > > example in the current User's Guide now > incorrect? I can confirm it > > no > > > > longer works in Watir 1.2: > > > > > > > > ie.link(:url, > "http://pragmaticprogrammer.com/titles/ruby/").click > > > > > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1537:in > `object_exist_check': > > Unable > > > > to locate object, using url and > > http://pragmaticprogrammer.com/titles/ruby/ > > > > (Watir::Exception::UnknownObjectException) > from > > > > > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1646:in > `click' > > > Are you sure it no longer works? When I try it > it works: > > > irb(main):001:0> require 'watir' > > > => true > > > irb(main):002:0> ie = > Watir::IE.start("http://www.google.com") > > > => # @url_list= > > > ["http://www.google.ca/"] > > > > > > > irb(main):003:0> ie.text_field(:name, > "q").set("pickaxe") > > > => nil > > > irb(main):004:0> ie.button(:name, "btnG").click > > > => nil > > > irb(main):005:0> ie.link(:url, > > "http://pragmaticprogrammer.com/titles/ruby/").cl > > > ick > > > => nil > > > > === message truncated === __________________________________ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail From Mark_Cain at rl.gov Wed Apr 13 09:47:59 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Wed, 13 Apr 2005 06:47:59 -0700 Subject: [Wtr-general] Getting text out of table's cell Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04E154EDF@EX5V.rl.gov> That is just it, Paul, the test runs as expected. I don't know what line it is failing on. I wouldn't even have noticed except only one of my 5 assert statements registers pass/fail. Do you know what is happening? --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 7:39 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Well, I cant see anything wrong, unit tests etc pass ( even when using a remote host) Is your page created using javascript or xmlhttprequest? Can you send the html? Which is the line in your test that fails ( I think I know, but just to make sure!) Thanks Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 16:21 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Ok just loaded the newest one. Reran the test and got this: 1) Error: test1_EditLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:42:in `test1_EditLocation' 2) Error: test2_DeleteLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:58:in `test2_DeleteLocation' 3) Error: test3_ReactivateLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:75:in `test3_ReactivateLocation' 4) Error: test4_DeactivateLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:92:in `test4_DeactivateLocation' 5 tests, 1 assertions, 0 failures, 4 errors The really weird part is that the test runs exactly like I expect it to--the browser launches completes all the things I tell it to do--but throws this error. --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: Tuesday, April 12, 2005 3:08 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell I picked up the latest yesterday "Version "$Revision: 1.139 $". Is there a newer one? --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 3:04 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Thanks Mark, Can I be a pain and ask you to try the latest from cvs. I cant trace any of the line numbers as I made quite a few changes ( none of which will fix this problem though!) Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 15:51 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Here you are Paul. This is the entire test case. I replaces the server name in the url with '...'. there is an actual name there when I run the test. I am running this out of Eclipse 3.1.0 using the Ruby plugin 0.5. # Test case for admin Loacation $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'C:\watir\unittests\setup' class TC_PERAdmin_Location < Test::Unit::TestCase include Watir def gotoPopUpPage() $ie.goto("http://.../rapidweb/chg/per/per/Admin/index.cfm") end def test0_AddLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #add new location $ie.text_field(:name, "Name").set('0Location') $ie.button("Add").click table = $ie.table(:index, 8) assert_equal('0Location',table[4][1].text.strip) end def test1_EditLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #Edit Description just added $ie.button(:index, 3).click $ie.text_field(:name, "Name").append("-Edited") table = $ie.table(:index, 8) $ie.button("Save").click assert_equal('0Location-Edited',table[4][1].text.strip) end def test2_DeleteLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #delete location just added table = $ie.table(:index, 8) $ie.button(:index, 2).click assert_not_equal('0Location-Edited',table[4][1].text.strip) end def test3_ReactivateLocation gotoPopUpPage() $ie.link(:text, /Location/i).click table = $ie.table(:index, 10) #reactivate old location $ie.button(:value, "Reactivate").click assert_not_equal('101-AX',table[2][1].text.strip) end def test4_DeactivateLocation gotoPopUpPage() $ie.link(:text, /Location/i).click table = $ie.table(:index, 8) #deactivate old location table[47][2].button(:value, "Delete").click assert_not_equal('101-AX',table[47][1].text.strip) $ie.close end end --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 2:40 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell The access denied message usually means the page is reloading. I may have missed something when I added this functionality. Can you post the code you're using? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 13:14 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Can anyone tell me why sometime I get an Access Denied when trying to access objects from a table? 1) Error: test1_EditISMS(TC_PERAdmin): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2114:in `[]' C:/watir/working/PER/admin/tc_ISMS.rb:52:in `test1_EditISMS' Thanks, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: Monday, April 11, 2005 5:06 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell I think that's a good idea. The more we can do with DIVs, the better. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: April 11, 2005 5:15 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Should we add this for other 'container' objects, like span div etc? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sheehy, Kevin > Sent: 11 April 2005 16:51 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > I just started using the table methods last week and I realized that it > would be very useful if I could access the checkboxes directly. Then I > saw this thread over the weekend and saw that this support had just been > added. I just downloaded the latest Watir and tried it out - it works > great! I can now access my checkboxes thusly: ie.table(:index, > '6')[n][1].checkbox(:name, "Task").set > > Thanks for this great enhancement! > > -Kevin > > -----Original Message----- > From: Paul Rogers [mailto:paul.rogers at shaw.ca] > Sent: Saturday, April 09, 2005 7:22 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Ive added this in. Get the latest from cvs also see the table_test to > see how it works - you'll need to update the html test files too. > > Bret, can you take a look through the code and see if you are happy with > the way Ive done it? Lorenzo - you added this feature to start, is the > latest implementation satisfactory for your needs? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI > Sent: 08 April 2005 05:33 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What about something like accessing the third button in a certain cell? > > In my opinion, every "container object", like a table, a cell, a div, > span, etc. should contain methods for accessing every other object, so > you could do something like: > Ie.table(:id,'my_table')[1][2].textField(:name,"something")... > > Is this possible right now? > > Thanks, > > Andrei > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Thursday, April 07, 2005 11:47 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > For the general case, > Ie.table(:id, 'my_table')[1][2].text > > Where [1] is the row number and [2] is the cell ( these are 1 based) You > can of course use :index in place of :id > > Or just get the whole table as an array > my_array = Ie.table(:id, 'my_table').to_a > Which will now be a 2 d array > > If your row has an id you can use > > Ie.row(:id:,'my_row')[2].text > Where [2] is the cell number > > > > To access buttons, you can use this, thanks to Lorenzo! > table = ie.table(:index,1) > table[1][1].button.click > > > > > > Maybe we should also add some iterators for row, and cell > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark > Sent: 07 April 2005 13:58 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What if you have cells that do not have any id property set? > > > > > > > > > > How would I access the delete and edit buttons in turn for cell value > A7? > > Thanks, > > --Mark > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Wednesday, April 06, 2005 10:45 AM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > my_string = ie.cell(:id , 'blshResults[4][1]').text > > should do it - see table_test.rb in the unittests directory > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi > Sent: 06 April 2005 11:24 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Getting text out of table's cell > > > Could anyone please point me out on how to get the text out of this > element by using its id? I try to use getObject(:id, > "id=tblshResults[4][1]") and it returns a valid object. How do I get the > text? > > > > Thanks, > Laudhi > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Mark_Cain at rl.gov Wed Apr 13 09:57:41 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Wed, 13 Apr 2005 06:57:41 -0700 Subject: [Wtr-general] Getting text out of table's cell Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04E154EE1@EX5V.rl.gov> Sent the html as an attachment, but it is being held waiting review because it was too big--108kb. I didn't want to put it in the email thread because it would have made it huge and practically impossible to read. I can sent it another way of you like --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: Wednesday, April 13, 2005 6:48 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell That is just it, Paul, the test runs as expected. I don't know what line it is failing on. I wouldn't even have noticed except only one of my 5 assert statements registers pass/fail. Do you know what is happening? --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 7:39 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Well, I cant see anything wrong, unit tests etc pass ( even when using a remote host) Is your page created using javascript or xmlhttprequest? Can you send the html? Which is the line in your test that fails ( I think I know, but just to make sure!) Thanks Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 16:21 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Ok just loaded the newest one. Reran the test and got this: 1) Error: test1_EditLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:42:in `test1_EditLocation' 2) Error: test2_DeleteLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:58:in `test2_DeleteLocation' 3) Error: test3_ReactivateLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:75:in `test3_ReactivateLocation' 4) Error: test4_DeactivateLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:92:in `test4_DeactivateLocation' 5 tests, 1 assertions, 0 failures, 4 errors The really weird part is that the test runs exactly like I expect it to--the browser launches completes all the things I tell it to do--but throws this error. --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: Tuesday, April 12, 2005 3:08 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell I picked up the latest yesterday "Version "$Revision: 1.139 $". Is there a newer one? --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 3:04 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Thanks Mark, Can I be a pain and ask you to try the latest from cvs. I cant trace any of the line numbers as I made quite a few changes ( none of which will fix this problem though!) Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 15:51 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Here you are Paul. This is the entire test case. I replaces the server name in the url with '...'. there is an actual name there when I run the test. I am running this out of Eclipse 3.1.0 using the Ruby plugin 0.5. # Test case for admin Loacation $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'C:\watir\unittests\setup' class TC_PERAdmin_Location < Test::Unit::TestCase include Watir def gotoPopUpPage() $ie.goto("http://.../rapidweb/chg/per/per/Admin/index.cfm") end def test0_AddLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #add new location $ie.text_field(:name, "Name").set('0Location') $ie.button("Add").click table = $ie.table(:index, 8) assert_equal('0Location',table[4][1].text.strip) end def test1_EditLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #Edit Description just added $ie.button(:index, 3).click $ie.text_field(:name, "Name").append("-Edited") table = $ie.table(:index, 8) $ie.button("Save").click assert_equal('0Location-Edited',table[4][1].text.strip) end def test2_DeleteLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #delete location just added table = $ie.table(:index, 8) $ie.button(:index, 2).click assert_not_equal('0Location-Edited',table[4][1].text.strip) end def test3_ReactivateLocation gotoPopUpPage() $ie.link(:text, /Location/i).click table = $ie.table(:index, 10) #reactivate old location $ie.button(:value, "Reactivate").click assert_not_equal('101-AX',table[2][1].text.strip) end def test4_DeactivateLocation gotoPopUpPage() $ie.link(:text, /Location/i).click table = $ie.table(:index, 8) #deactivate old location table[47][2].button(:value, "Delete").click assert_not_equal('101-AX',table[47][1].text.strip) $ie.close end end --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 2:40 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell The access denied message usually means the page is reloading. I may have missed something when I added this functionality. Can you post the code you're using? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 13:14 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Can anyone tell me why sometime I get an Access Denied when trying to access objects from a table? 1) Error: test1_EditISMS(TC_PERAdmin): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2114:in `[]' C:/watir/working/PER/admin/tc_ISMS.rb:52:in `test1_EditISMS' Thanks, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: Monday, April 11, 2005 5:06 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell I think that's a good idea. The more we can do with DIVs, the better. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: April 11, 2005 5:15 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Should we add this for other 'container' objects, like span div etc? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sheehy, Kevin > Sent: 11 April 2005 16:51 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > I just started using the table methods last week and I realized that it > would be very useful if I could access the checkboxes directly. Then I > saw this thread over the weekend and saw that this support had just been > added. I just downloaded the latest Watir and tried it out - it works > great! I can now access my checkboxes thusly: ie.table(:index, > '6')[n][1].checkbox(:name, "Task").set > > Thanks for this great enhancement! > > -Kevin > > -----Original Message----- > From: Paul Rogers [mailto:paul.rogers at shaw.ca] > Sent: Saturday, April 09, 2005 7:22 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Ive added this in. Get the latest from cvs also see the table_test to > see how it works - you'll need to update the html test files too. > > Bret, can you take a look through the code and see if you are happy with > the way Ive done it? Lorenzo - you added this feature to start, is the > latest implementation satisfactory for your needs? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI > Sent: 08 April 2005 05:33 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What about something like accessing the third button in a certain cell? > > In my opinion, every "container object", like a table, a cell, a div, > span, etc. should contain methods for accessing every other object, so > you could do something like: > Ie.table(:id,'my_table')[1][2].textField(:name,"something")... > > Is this possible right now? > > Thanks, > > Andrei > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Thursday, April 07, 2005 11:47 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > For the general case, > Ie.table(:id, 'my_table')[1][2].text > > Where [1] is the row number and [2] is the cell ( these are 1 based) You > can of course use :index in place of :id > > Or just get the whole table as an array > my_array = Ie.table(:id, 'my_table').to_a > Which will now be a 2 d array > > If your row has an id you can use > > Ie.row(:id:,'my_row')[2].text > Where [2] is the cell number > > > > To access buttons, you can use this, thanks to Lorenzo! > table = ie.table(:index,1) > table[1][1].button.click > > > > > > Maybe we should also add some iterators for row, and cell > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark > Sent: 07 April 2005 13:58 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What if you have cells that do not have any id property set? > > > > > > > > > > How would I access the delete and edit buttons in turn for cell value > A7? > > Thanks, > > --Mark > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Wednesday, April 06, 2005 10:45 AM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > my_string = ie.cell(:id , 'blshResults[4][1]').text > > should do it - see table_test.rb in the unittests directory > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi > Sent: 06 April 2005 11:24 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Getting text out of table's cell > > > Could anyone please point me out on how to get the text out of this > element by using its id? I try to use getObject(:id, > "id=tblshResults[4][1]") and it returns a valid object. How do I get the > text? > > > > Thanks, > Laudhi > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Wed Apr 13 10:03:52 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 13 Apr 2005 08:03:52 -0600 Subject: [Wtr-general] Getting text out of table's cell In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04E154EDF@EX5V.rl.gov> Message-ID: <001c01c54031$9fe5f470$6400a8c0@NewDell> I had a thought late last night and I think I know the cause. I'll look into it as soon as I get a chance Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 13 April 2005 07:48 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell That is just it, Paul, the test runs as expected. I don't know what line it is failing on. I wouldn't even have noticed except only one of my 5 assert statements registers pass/fail. Do you know what is happening? --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 7:39 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Well, I cant see anything wrong, unit tests etc pass ( even when using a remote host) Is your page created using javascript or xmlhttprequest? Can you send the html? Which is the line in your test that fails ( I think I know, but just to make sure!) Thanks Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 16:21 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Ok just loaded the newest one. Reran the test and got this: 1) Error: test1_EditLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:42:in `test1_EditLocation' 2) Error: test2_DeleteLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:58:in `test2_DeleteLocation' 3) Error: test3_ReactivateLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:75:in `test3_ReactivateLocation' 4) Error: test4_DeactivateLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:92:in `test4_DeactivateLocation' 5 tests, 1 assertions, 0 failures, 4 errors The really weird part is that the test runs exactly like I expect it to--the browser launches completes all the things I tell it to do--but throws this error. --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: Tuesday, April 12, 2005 3:08 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell I picked up the latest yesterday "Version "$Revision: 1.139 $". Is there a newer one? --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 3:04 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Thanks Mark, Can I be a pain and ask you to try the latest from cvs. I cant trace any of the line numbers as I made quite a few changes ( none of which will fix this problem though!) Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 15:51 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Here you are Paul. This is the entire test case. I replaces the server name in the url with '...'. there is an actual name there when I run the test. I am running this out of Eclipse 3.1.0 using the Ruby plugin 0.5. # Test case for admin Loacation $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'C:\watir\unittests\setup' class TC_PERAdmin_Location < Test::Unit::TestCase include Watir def gotoPopUpPage() $ie.goto("http://.../rapidweb/chg/per/per/Admin/index.cfm") end def test0_AddLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #add new location $ie.text_field(:name, "Name").set('0Location') $ie.button("Add").click table = $ie.table(:index, 8) assert_equal('0Location',table[4][1].text.strip) end def test1_EditLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #Edit Description just added $ie.button(:index, 3).click $ie.text_field(:name, "Name").append("-Edited") table = $ie.table(:index, 8) $ie.button("Save").click assert_equal('0Location-Edited',table[4][1].text.strip) end def test2_DeleteLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #delete location just added table = $ie.table(:index, 8) $ie.button(:index, 2).click assert_not_equal('0Location-Edited',table[4][1].text.strip) end def test3_ReactivateLocation gotoPopUpPage() $ie.link(:text, /Location/i).click table = $ie.table(:index, 10) #reactivate old location $ie.button(:value, "Reactivate").click assert_not_equal('101-AX',table[2][1].text.strip) end def test4_DeactivateLocation gotoPopUpPage() $ie.link(:text, /Location/i).click table = $ie.table(:index, 8) #deactivate old location table[47][2].button(:value, "Delete").click assert_not_equal('101-AX',table[47][1].text.strip) $ie.close end end --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 2:40 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell The access denied message usually means the page is reloading. I may have missed something when I added this functionality. Can you post the code you're using? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 13:14 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Can anyone tell me why sometime I get an Access Denied when trying to access objects from a table? 1) Error: test1_EditISMS(TC_PERAdmin): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2114:in `[]' C:/watir/working/PER/admin/tc_ISMS.rb:52:in `test1_EditISMS' Thanks, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: Monday, April 11, 2005 5:06 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell I think that's a good idea. The more we can do with DIVs, the better. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: April 11, 2005 5:15 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Should we add this for other 'container' objects, like span div etc? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sheehy, Kevin > Sent: 11 April 2005 16:51 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > I just started using the table methods last week and I realized that it > would be very useful if I could access the checkboxes directly. Then I > saw this thread over the weekend and saw that this support had just been > added. I just downloaded the latest Watir and tried it out - it works > great! I can now access my checkboxes thusly: ie.table(:index, > '6')[n][1].checkbox(:name, "Task").set > > Thanks for this great enhancement! > > -Kevin > > -----Original Message----- > From: Paul Rogers [mailto:paul.rogers at shaw.ca] > Sent: Saturday, April 09, 2005 7:22 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Ive added this in. Get the latest from cvs also see the table_test to > see how it works - you'll need to update the html test files too. > > Bret, can you take a look through the code and see if you are happy with > the way Ive done it? Lorenzo - you added this feature to start, is the > latest implementation satisfactory for your needs? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI > Sent: 08 April 2005 05:33 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What about something like accessing the third button in a certain cell? > > In my opinion, every "container object", like a table, a cell, a div, > span, etc. should contain methods for accessing every other object, so > you could do something like: > Ie.table(:id,'my_table')[1][2].textField(:name,"something")... > > Is this possible right now? > > Thanks, > > Andrei > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Thursday, April 07, 2005 11:47 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > For the general case, > Ie.table(:id, 'my_table')[1][2].text > > Where [1] is the row number and [2] is the cell ( these are 1 based) You > can of course use :index in place of :id > > Or just get the whole table as an array > my_array = Ie.table(:id, 'my_table').to_a > Which will now be a 2 d array > > If your row has an id you can use > > Ie.row(:id:,'my_row')[2].text > Where [2] is the cell number > > > > To access buttons, you can use this, thanks to Lorenzo! > table = ie.table(:index,1) > table[1][1].button.click > > > > > > Maybe we should also add some iterators for row, and cell > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark > Sent: 07 April 2005 13:58 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What if you have cells that do not have any id property set? > > > > > > > > > > How would I access the delete and edit buttons in turn for cell value > A7? > > Thanks, > > --Mark > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Wednesday, April 06, 2005 10:45 AM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > my_string = ie.cell(:id , 'blshResults[4][1]').text > > should do it - see table_test.rb in the unittests directory > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi > Sent: 06 April 2005 11:24 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Getting text out of table's cell > > > Could anyone please point me out on how to get the text out of this > element by using its id? I try to use getObject(:id, > "id=tblshResults[4][1]") and it returns a valid object. How do I get the > text? > > > > Thanks, > Laudhi > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Wed Apr 13 10:43:28 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 13 Apr 2005 08:43:28 -0600 Subject: [Wtr-general] Getting text out of table's cell In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04E154EE1@EX5V.rl.gov> Message-ID: <002801c54037$281ac870$6400a8c0@NewDell> Mark, Here is what is happening. I think ;-) In your code you have this: table = $ie.table(:index, 10) #reactivate old location $ie.button(:value, "Reactivate").click assert_not_equal('101-AX',table[2][1].text.strip) Now Im assuming the click on the button causes a page reload. Now, the table refers to something that is on the old page, not the page that has currently loaded Try this instead #reactivate old location $ie.button(:value, "Reactivate").click table = $ie.table(:index, 10) assert_not_equal('101-AX',table[2][1].text.strip) Now the table variable should refer to a current object. Ive done this a few times in the watir internals a few times, ( especially inside each bloacks ) which is what I thought of last night Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 13 April 2005 07:58 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Sent the html as an attachment, but it is being held waiting review because it was too big--108kb. I didn't want to put it in the email thread because it would have made it huge and practically impossible to read. I can sent it another way of you like --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: Wednesday, April 13, 2005 6:48 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell That is just it, Paul, the test runs as expected. I don't know what line it is failing on. I wouldn't even have noticed except only one of my 5 assert statements registers pass/fail. Do you know what is happening? --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 7:39 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Well, I cant see anything wrong, unit tests etc pass ( even when using a remote host) Is your page created using javascript or xmlhttprequest? Can you send the html? Which is the line in your test that fails ( I think I know, but just to make sure!) Thanks Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 16:21 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Ok just loaded the newest one. Reran the test and got this: 1) Error: test1_EditLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:42:in `test1_EditLocation' 2) Error: test2_DeleteLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:58:in `test2_DeleteLocation' 3) Error: test3_ReactivateLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:75:in `test3_ReactivateLocation' 4) Error: test4_DeactivateLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:92:in `test4_DeactivateLocation' 5 tests, 1 assertions, 0 failures, 4 errors The really weird part is that the test runs exactly like I expect it to--the browser launches completes all the things I tell it to do--but throws this error. --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: Tuesday, April 12, 2005 3:08 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell I picked up the latest yesterday "Version "$Revision: 1.139 $". Is there a newer one? --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 3:04 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Thanks Mark, Can I be a pain and ask you to try the latest from cvs. I cant trace any of the line numbers as I made quite a few changes ( none of which will fix this problem though!) Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 15:51 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Here you are Paul. This is the entire test case. I replaces the server name in the url with '...'. there is an actual name there when I run the test. I am running this out of Eclipse 3.1.0 using the Ruby plugin 0.5. # Test case for admin Loacation $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'C:\watir\unittests\setup' class TC_PERAdmin_Location < Test::Unit::TestCase include Watir def gotoPopUpPage() $ie.goto("http://.../rapidweb/chg/per/per/Admin/index.cfm") end def test0_AddLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #add new location $ie.text_field(:name, "Name").set('0Location') $ie.button("Add").click table = $ie.table(:index, 8) assert_equal('0Location',table[4][1].text.strip) end def test1_EditLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #Edit Description just added $ie.button(:index, 3).click $ie.text_field(:name, "Name").append("-Edited") table = $ie.table(:index, 8) $ie.button("Save").click assert_equal('0Location-Edited',table[4][1].text.strip) end def test2_DeleteLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #delete location just added table = $ie.table(:index, 8) $ie.button(:index, 2).click assert_not_equal('0Location-Edited',table[4][1].text.strip) end def test3_ReactivateLocation gotoPopUpPage() $ie.link(:text, /Location/i).click table = $ie.table(:index, 10) #reactivate old location $ie.button(:value, "Reactivate").click assert_not_equal('101-AX',table[2][1].text.strip) end def test4_DeactivateLocation gotoPopUpPage() $ie.link(:text, /Location/i).click table = $ie.table(:index, 8) #deactivate old location table[47][2].button(:value, "Delete").click assert_not_equal('101-AX',table[47][1].text.strip) $ie.close end end --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 2:40 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell The access denied message usually means the page is reloading. I may have missed something when I added this functionality. Can you post the code you're using? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 13:14 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Can anyone tell me why sometime I get an Access Denied when trying to access objects from a table? 1) Error: test1_EditISMS(TC_PERAdmin): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2114:in `[]' C:/watir/working/PER/admin/tc_ISMS.rb:52:in `test1_EditISMS' Thanks, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: Monday, April 11, 2005 5:06 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell I think that's a good idea. The more we can do with DIVs, the better. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: April 11, 2005 5:15 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Should we add this for other 'container' objects, like span div etc? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sheehy, Kevin > Sent: 11 April 2005 16:51 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > I just started using the table methods last week and I realized that it > would be very useful if I could access the checkboxes directly. Then I > saw this thread over the weekend and saw that this support had just been > added. I just downloaded the latest Watir and tried it out - it works > great! I can now access my checkboxes thusly: ie.table(:index, > '6')[n][1].checkbox(:name, "Task").set > > Thanks for this great enhancement! > > -Kevin > > -----Original Message----- > From: Paul Rogers [mailto:paul.rogers at shaw.ca] > Sent: Saturday, April 09, 2005 7:22 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Ive added this in. Get the latest from cvs also see the table_test to > see how it works - you'll need to update the html test files too. > > Bret, can you take a look through the code and see if you are happy with > the way Ive done it? Lorenzo - you added this feature to start, is the > latest implementation satisfactory for your needs? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI > Sent: 08 April 2005 05:33 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What about something like accessing the third button in a certain cell? > > In my opinion, every "container object", like a table, a cell, a div, > span, etc. should contain methods for accessing every other object, so > you could do something like: > Ie.table(:id,'my_table')[1][2].textField(:name,"something")... > > Is this possible right now? > > Thanks, > > Andrei > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Thursday, April 07, 2005 11:47 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > For the general case, > Ie.table(:id, 'my_table')[1][2].text > > Where [1] is the row number and [2] is the cell ( these are 1 based) You > can of course use :index in place of :id > > Or just get the whole table as an array > my_array = Ie.table(:id, 'my_table').to_a > Which will now be a 2 d array > > If your row has an id you can use > > Ie.row(:id:,'my_row')[2].text > Where [2] is the cell number > > > > To access buttons, you can use this, thanks to Lorenzo! > table = ie.table(:index,1) > table[1][1].button.click > > > > > > Maybe we should also add some iterators for row, and cell > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark > Sent: 07 April 2005 13:58 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What if you have cells that do not have any id property set? > > > > > > > > > > How would I access the delete and edit buttons in turn for cell value > A7? > > Thanks, > > --Mark > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Wednesday, April 06, 2005 10:45 AM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > my_string = ie.cell(:id , 'blshResults[4][1]').text > > should do it - see table_test.rb in the unittests directory > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi > Sent: 06 April 2005 11:24 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Getting text out of table's cell > > > Could anyone please point me out on how to get the text out of this > element by using its id? I try to use getObject(:id, > "id=tblshResults[4][1]") and it returns a valid object. How do I get the > text? > > > > Thanks, > Laudhi > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Wed Apr 13 10:44:27 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 13 Apr 2005 08:44:27 -0600 Subject: [Wtr-general] Problem with each images In-Reply-To: <20050413123824.26897.qmail@web54010.mail.yahoo.com> Message-ID: <002901c54037$4b47e8f0$6400a8c0@NewDell> Try this $ie.images.each do |image| if image.src=~/delete.gif/ startClicker("OK",3) image.click break end Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of ashish harsh Sent: 13 April 2005 06:38 To: wtr-general at rubyforge.org Subject: [Wtr-general] Problem with each images Hi All, I'm using watir v1.2 and facing a problem ,if any body has any idea.. I've a page in which there n images with same source and no other attribute is available,some of images are only images and some of them acts as links or say buttons (with "delete" event associated with them).I'm using $ie.images.each do |image| if image.src=~/delete.gif/ startClicker("OK",3) image.click end now watir starts with each image and click that image, but in between my page is getting refreshed (because one image is removed).now whole pattern is shifted upwards. so it is going to next image ,but now all images are shifted up,so $ie.images.each is not valid and throwing unknown object exception(image with id not found)and as images are shifted up but it is going according to positions of images.if 5 images are available than i can remove only 1,3,5. Thanx Aashish K Harsh --- wtr-general-request at rubyforge.org wrote: > Send Wtr-general mailing list submissions to > wtr-general at rubyforge.org > > To subscribe or unsubscribe via the World Wide Web, > visit > http://rubyforge.org/mailman/listinfo/wtr-general > or, via email, send a message with subject or body > 'help' to > wtr-general-request at rubyforge.org > > You can reach the person managing the list at > wtr-general-owner at rubyforge.org > > When replying, please edit your Subject line so it > is more specific > than "Re: Contents of Wtr-general digest..." > > > Today's Topics: > > 1. Re: RE: Clicking link by URL attribute problem > in W atir 1.2 > (John Lloyd-Jones) > 2. RE: RE: Clicking link by URL attribute problem > in Watir 1.2 > (Jonathan Kohl) > 3. RE: Getting text out of table's cell (Paul > Rogers) > 4. Re: Attach Method (Bret Pettichord) > 5. RE: Attach Method (Eric Tabora) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 12 Apr 2005 16:56:00 -0700 > From: John Lloyd-Jones > Subject: Re: [Wtr-general] RE: Clicking link by URL > attribute problem > in W atir 1.2 > To: wtr-general at rubyforge.org > Message-ID: > <6fcd26f105041216566689c1ee at mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Jonathan > > It seems that there is a change from 1.1. > The test now requires the fully qualified URL > (e.g. http://myhost.mydomain.com/pagename.html") > whereas previously, I could simply use the URL > actually given in the anchor tag (e.g. > href="pagename.html" ). > This has broken some of my test scripts. > > John > > > On 4/12/05, jkohl at telusplanet.net > wrote: > > > > > More importantly, getting back to the link URL, > is the link by URL attribute > > > example in the current User's Guide now > incorrect? I can confirm it no > > > longer works in Watir 1.2: > > > > > > ie.link(:url, > "http://pragmaticprogrammer.com/titles/ruby/").click > > > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1537:in > `object_exist_check': Unable > > > to locate object, using url and > http://pragmaticprogrammer.com/titles/ruby/ > > > (Watir::Exception::UnknownObjectException) from > > > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1646:in > `click' > > Are you sure it no longer works? When I try it it > works: > > irb(main):001:0> require 'watir' > > => true > > irb(main):002:0> ie = > Watir::IE.start("http://www.google.com") > > => # @url_list= > > ["http://www.google.ca/"] > > > > > irb(main):003:0> ie.text_field(:name, > "q").set("pickaxe") > > => nil > > irb(main):004:0> ie.button(:name, "btnG").click > > => nil > > irb(main):005:0> ie.link(:url, > "http://pragmaticprogrammer.com/titles/ruby/").cl > > ick > > => nil > > > > On my machine, I am now on the Programming Ruby, > 2nd Edition page. The link > > attribute only works if that URL is declared in > the page you are currently on. > > > > -Jonathan > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > ------------------------------ > > Message: 2 > Date: Tue, 12 Apr 2005 20:38:50 -0600 > From: "Jonathan Kohl" > Subject: RE: [Wtr-general] RE: Clicking link by URL > attribute problem > in Watir 1.2 > To: > Message-ID: > > <20050413023830.IXYK11166.priv-edtnes56.telusplanet.net at tintin> > Content-Type: text/plain; charset="us-ascii" > > Interesting. I'll have to try that out. > > Does: > > ie.link(:url, /pagename.html/).click > > work? > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general- > > bounces at rubyforge.org] On Behalf Of John > Lloyd-Jones > > Sent: April 12, 2005 5:56 PM > > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] RE: Clicking link by > URL attribute problem in > > Watir 1.2 > > > > Jonathan > > > > It seems that there is a change from 1.1. > > The test now requires the fully qualified URL > > (e.g. http://myhost.mydomain.com/pagename.html") > > whereas previously, I could simply use the URL > > actually given in the anchor tag (e.g. > href="pagename.html" ). > > This has broken some of my test scripts. > > > > John > > > > > > On 4/12/05, jkohl at telusplanet.net > wrote: > > > > > > > More importantly, getting back to the link > URL, is the link by URL > > attribute > > > > example in the current User's Guide now > incorrect? I can confirm it > > no > > > > longer works in Watir 1.2: > > > > > > > > ie.link(:url, > "http://pragmaticprogrammer.com/titles/ruby/").click > > > > > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1537:in > `object_exist_check': > > Unable > > > > to locate object, using url and > > http://pragmaticprogrammer.com/titles/ruby/ > > > > (Watir::Exception::UnknownObjectException) > from > > > > > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1646:in > `click' > > > Are you sure it no longer works? When I try it > it works: > > > irb(main):001:0> require 'watir' > > > => true > > > irb(main):002:0> ie = > Watir::IE.start("http://www.google.com") > > > => # @url_list= > > > ["http://www.google.ca/"] > > > > > > > irb(main):003:0> ie.text_field(:name, > "q").set("pickaxe") > > > => nil > > > irb(main):004:0> ie.button(:name, "btnG").click > > > => nil > > > irb(main):005:0> ie.link(:url, > > "http://pragmaticprogrammer.com/titles/ruby/").cl > > > ick > > > => nil > > > > === message truncated === __________________________________ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From john.lloydjones at gmail.com Wed Apr 13 10:49:26 2005 From: john.lloydjones at gmail.com (John Lloyd-Jones) Date: Wed, 13 Apr 2005 07:49:26 -0700 Subject: [Wtr-general] RE: Clicking link by URL attribute problem in Watir 1.2 In-Reply-To: <20050413023830.IXYK11166.priv-edtnes56.telusplanet.net@tintin> References: <6fcd26f105041216566689c1ee@mail.gmail.com> <20050413023830.IXYK11166.priv-edtnes56.telusplanet.net@tintin> Message-ID: <6fcd26f10504130749304f7a97@mail.gmail.com> Jonathan Yes John On 4/12/05, Jonathan Kohl wrote: > Interesting. I'll have to try that out. > > Does: > > ie.link(:url, /pagename.html/).click > > work? > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > > bounces at rubyforge.org] On Behalf Of John Lloyd-Jones > > Sent: April 12, 2005 5:56 PM > > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] RE: Clicking link by URL attribute problem in > > Watir 1.2 > > > > Jonathan > > > > It seems that there is a change from 1.1. > > The test now requires the fully qualified URL > > (e.g. http://myhost.mydomain.com/pagename.html") > > whereas previously, I could simply use the URL > > actually given in the anchor tag (e.g. href="pagename.html" ). > > This has broken some of my test scripts. > > > > John > > > > > > On 4/12/05, jkohl at telusplanet.net wrote: > > > > > > > More importantly, getting back to the link URL, is the link by URL > > attribute > > > > example in the current User's Guide now incorrect? I can confirm it > > no > > > > longer works in Watir 1.2: > > > > > > > > ie.link(:url, "http://pragmaticprogrammer.com/titles/ruby/").click > > > > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1537:in `object_exist_check': > > Unable > > > > to locate object, using url and > > http://pragmaticprogrammer.com/titles/ruby/ > > > > (Watir::Exception::UnknownObjectException) from > > > > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1646:in `click' > > > Are you sure it no longer works? When I try it it works: > > > irb(main):001:0> require 'watir' > > > => true > > > irb(main):002:0> ie = Watir::IE.start("http://www.google.com") > > > => # @url_list= > > > ["http://www.google.ca/"] > > > > > > > irb(main):003:0> ie.text_field(:name, "q").set("pickaxe") > > > => nil > > > irb(main):004:0> ie.button(:name, "btnG").click > > > => nil > > > irb(main):005:0> ie.link(:url, > > "http://pragmaticprogrammer.com/titles/ruby/").cl > > > ick > > > => nil > > > > > > On my machine, I am now on the Programming Ruby, 2nd Edition page. The > > link > > > attribute only works if that URL is declared in the page you are > > currently on. > > > > > > -Jonathan > > > > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From Mark_Cain at rl.gov Wed Apr 13 14:06:44 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Wed, 13 Apr 2005 11:06:44 -0700 Subject: [Wtr-general] Getting text out of table's cell Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04E154EEA@EX5V.rl.gov> That made a big difference Paul! Thanks, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, April 13, 2005 7:43 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Mark, Here is what is happening. I think ;-) In your code you have this: table = $ie.table(:index, 10) #reactivate old location $ie.button(:value, "Reactivate").click assert_not_equal('101-AX',table[2][1].text.strip) Now Im assuming the click on the button causes a page reload. Now, the table refers to something that is on the old page, not the page that has currently loaded Try this instead #reactivate old location $ie.button(:value, "Reactivate").click table = $ie.table(:index, 10) assert_not_equal('101-AX',table[2][1].text.strip) Now the table variable should refer to a current object. Ive done this a few times in the watir internals a few times, ( especially inside each bloacks ) which is what I thought of last night Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 13 April 2005 07:58 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Sent the html as an attachment, but it is being held waiting review because it was too big--108kb. I didn't want to put it in the email thread because it would have made it huge and practically impossible to read. I can sent it another way of you like --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: Wednesday, April 13, 2005 6:48 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell That is just it, Paul, the test runs as expected. I don't know what line it is failing on. I wouldn't even have noticed except only one of my 5 assert statements registers pass/fail. Do you know what is happening? --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 7:39 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Well, I cant see anything wrong, unit tests etc pass ( even when using a remote host) Is your page created using javascript or xmlhttprequest? Can you send the html? Which is the line in your test that fails ( I think I know, but just to make sure!) Thanks Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 16:21 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Ok just loaded the newest one. Reran the test and got this: 1) Error: test1_EditLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:42:in `test1_EditLocation' 2) Error: test2_DeleteLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:58:in `test2_DeleteLocation' 3) Error: test3_ReactivateLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:75:in `test3_ReactivateLocation' 4) Error: test4_DeactivateLocation(TC_PERAdmin_Location): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2192:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2138:in `[]' C:/watir/working/PER/admin/tc_Location.rb:92:in `test4_DeactivateLocation' 5 tests, 1 assertions, 0 failures, 4 errors The really weird part is that the test runs exactly like I expect it to--the browser launches completes all the things I tell it to do--but throws this error. --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: Tuesday, April 12, 2005 3:08 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell I picked up the latest yesterday "Version "$Revision: 1.139 $". Is there a newer one? --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 3:04 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Thanks Mark, Can I be a pain and ask you to try the latest from cvs. I cant trace any of the line numbers as I made quite a few changes ( none of which will fix this problem though!) Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 15:51 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Here you are Paul. This is the entire test case. I replaces the server name in the url with '...'. there is an actual name there when I run the test. I am running this out of Eclipse 3.1.0 using the Ruby plugin 0.5. # Test case for admin Loacation $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'C:\watir\unittests\setup' class TC_PERAdmin_Location < Test::Unit::TestCase include Watir def gotoPopUpPage() $ie.goto("http://.../rapidweb/chg/per/per/Admin/index.cfm") end def test0_AddLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #add new location $ie.text_field(:name, "Name").set('0Location') $ie.button("Add").click table = $ie.table(:index, 8) assert_equal('0Location',table[4][1].text.strip) end def test1_EditLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #Edit Description just added $ie.button(:index, 3).click $ie.text_field(:name, "Name").append("-Edited") table = $ie.table(:index, 8) $ie.button("Save").click assert_equal('0Location-Edited',table[4][1].text.strip) end def test2_DeleteLocation gotoPopUpPage() $ie.link(:text, /Location/i).click #delete location just added table = $ie.table(:index, 8) $ie.button(:index, 2).click assert_not_equal('0Location-Edited',table[4][1].text.strip) end def test3_ReactivateLocation gotoPopUpPage() $ie.link(:text, /Location/i).click table = $ie.table(:index, 10) #reactivate old location $ie.button(:value, "Reactivate").click assert_not_equal('101-AX',table[2][1].text.strip) end def test4_DeactivateLocation gotoPopUpPage() $ie.link(:text, /Location/i).click table = $ie.table(:index, 8) #deactivate old location table[47][2].button(:value, "Delete").click assert_not_equal('101-AX',table[47][1].text.strip) $ie.close end end --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Tuesday, April 12, 2005 2:40 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell The access denied message usually means the page is reloading. I may have missed something when I added this functionality. Can you post the code you're using? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 12 April 2005 13:14 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell Can anyone tell me why sometime I get an Access Denied when trying to access objects from a table? 1) Error: test1_EditISMS(TC_PERAdmin): WIN32OLERuntimeError: Unknown property or method `rows' HRESULT error code:0x80070005 Access is denied. C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `invoke' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2168:in `row' C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2114:in `[]' C:/watir/working/PER/admin/tc_ISMS.rb:52:in `test1_EditISMS' Thanks, --Mark -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: Monday, April 11, 2005 5:06 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Getting text out of table's cell I think that's a good idea. The more we can do with DIVs, the better. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: April 11, 2005 5:15 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Should we add this for other 'container' objects, like span div etc? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Sheehy, Kevin > Sent: 11 April 2005 16:51 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > I just started using the table methods last week and I realized that it > would be very useful if I could access the checkboxes directly. Then I > saw this thread over the weekend and saw that this support had just been > added. I just downloaded the latest Watir and tried it out - it works > great! I can now access my checkboxes thusly: ie.table(:index, > '6')[n][1].checkbox(:name, "Task").set > > Thanks for this great enhancement! > > -Kevin > > -----Original Message----- > From: Paul Rogers [mailto:paul.rogers at shaw.ca] > Sent: Saturday, April 09, 2005 7:22 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > Ive added this in. Get the latest from cvs also see the table_test to > see how it works - you'll need to update the html test files too. > > Bret, can you take a look through the code and see if you are happy with > the way Ive done it? Lorenzo - you added this feature to start, is the > latest implementation satisfactory for your needs? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andrei MATEI > Sent: 08 April 2005 05:33 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What about something like accessing the third button in a certain cell? > > In my opinion, every "container object", like a table, a cell, a div, > span, etc. should contain methods for accessing every other object, so > you could do something like: > Ie.table(:id,'my_table')[1][2].textField(:name,"something")... > > Is this possible right now? > > Thanks, > > Andrei > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Thursday, April 07, 2005 11:47 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > For the general case, > Ie.table(:id, 'my_table')[1][2].text > > Where [1] is the row number and [2] is the cell ( these are 1 based) You > can of course use :index in place of :id > > Or just get the whole table as an array > my_array = Ie.table(:id, 'my_table').to_a > Which will now be a 2 d array > > If your row has an id you can use > > Ie.row(:id:,'my_row')[2].text > Where [2] is the cell number > > > > To access buttons, you can use this, thanks to Lorenzo! > table = ie.table(:index,1) > table[1][1].button.click > > > > > > Maybe we should also add some iterators for row, and cell > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark > Sent: 07 April 2005 13:58 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > > What if you have cells that do not have any id property set? > > > > > > > > > > How would I access the delete and edit buttons in turn for cell value > A7? > > Thanks, > > --Mark > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: Wednesday, April 06, 2005 10:45 AM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Getting text out of table's cell > > my_string = ie.cell(:id , 'blshResults[4][1]').text > > should do it - see table_test.rb in the unittests directory > > Paul > > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi > Sent: 06 April 2005 11:24 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Getting text out of table's cell > > > Could anyone please point me out on how to get the text out of this > element by using its id? I try to use getObject(:id, > "id=tblshResults[4][1]") and it returns a valid object. How do I get the > text? > > > > Thanks, > Laudhi > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From etabora at brandmuscle.com Thu Apr 14 11:48:21 2005 From: etabora at brandmuscle.com (Eric Tabora) Date: Thu, 14 Apr 2005 11:48:21 -0400 Subject: [Wtr-general] Attach Method In-Reply-To: <5.1.0.14.2.20050412235237.03b0f178@127.0.0.1> Message-ID: That didn't work, but this did: $ie.attach_init(:title, 'Select Locations') -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Wednesday, April 13, 2005 12:54 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Attach Method At 01:27 PM 4/12/2005, Eric Tabora wrote: >$ie.attach(:title, 'Test New Window') Try this instead: ie = Watir::IE.attach(:title, 'Test New Window') _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Thu Apr 14 14:10:33 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 14 Apr 2005 12:10:33 -0600 Subject: [Wtr-general] Attach Method In-Reply-To: Message-ID: <003601c5411d$40271f90$6400a8c0@NewDell> I don't understand this. Get a undefined method if I try that, but ie=IE.aatch() and ie=Watir::IE.attach() both work fine Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Eric Tabora Sent: 14 April 2005 09:48 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Attach Method That didn't work, but this did: $ie.attach_init(:title, 'Select Locations') -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: Wednesday, April 13, 2005 12:54 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Attach Method At 01:27 PM 4/12/2005, Eric Tabora wrote: >$ie.attach(:title, 'Test New Window') Try this instead: ie = Watir::IE.attach(:title, 'Test New Window') _____________________ Bret Pettichord www.pettichord.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 From ati.ozgur at gmail.com Thu Apr 14 14:13:43 2005 From: ati.ozgur at gmail.com (Atilla Ozgur) Date: Thu, 14 Apr 2005 21:13:43 +0300 Subject: [Wtr-general] AutoIt javascript support - window logon Message-ID: I created a simple wrapper class for autoit and included it watir directory as WindowHelper. It uses AutoIt Com dll for now. To be able to use it, you have to install autoit. I plan to change its implementation from AutoIt to normal window call functions. But for now, it has a rudimentary support for javascript alert and confirm boxes. Also I included an example for windows integrated login. I was unable to make helper functions work in same file with script file. Therefore every test has a external script file to include. These are named jscriptExtraAlert.rb jscriptExtraConfirmOk.rb jscriptExtraConfirmCancel.rb WindowLogonExtra.rb I included a unittest for alert,confirm boxes. But i did not included unit test for window integrated login since I do not know how to duplicate such a thing without IIS. Therefore example uses http://clio.lyris.com/ for demonstrating you are able to enter name and password to logon screen. I hope they will be useful. Please comment about their functionality. From kc.baltz at firefox.co.uk Thu Apr 14 14:45:56 2005 From: kc.baltz at firefox.co.uk (K.C. Baltz) Date: Thu, 14 Apr 2005 11:45:56 -0700 Subject: [Wtr-general] What's the best way to read the value of a hidden form field? Message-ID: <425EBA64.2080408@firefox.co.uk> I couldn't find anything in the 1.2 API for reading the value of a hidden form field, so I added the following to watir.rb. I'm very new to Ruby, so scrutinize the code before using it. It's pretty much a copy of TextField with changes where appropriate. I wanted to extend TextField, but I couldn't figure out how to call the ObjectActions initialize() but override the TextField one. K.C. Baltz class Hidden < ObjectActions def initialize( ieController, how , what ) @ieController = ieController if(how != :from_object) then @o = ieController.getObject( how, what , ["hidden"] ) else @o = what end super( @o ) @how = how @what = what end def text_string_creator n = [] return n end def to_s object_exist_check r = string_creator r=r + text_string_creator return r.join("\n") end end From andy__s at hotmail.com Thu Apr 14 14:46:09 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Thu, 14 Apr 2005 14:46:09 -0400 Subject: [Wtr-general] Question and Request Message-ID: Thanks for building Watir - its a great tool. First the question: I often need to find all the values in a column from a table and compare them against an expected set of values. I'm currently using this to accomplish it: class Watir::Table def colvalues(columnnumber) return (1..row_count).collect {|idx| self[idx][columnnumber].text} end end Is there another, built in, way to do this that I should be using instead? Now the request: Would it be possible to remove the 'global' short cut key combination that is currently on the Watir docs? Everytime I upgrade this short cut gets reestablished and then I cannot use that key combination from any other applications. Thanks -andy From ruby at roblally.plus.com Thu Apr 14 15:26:41 2005 From: ruby at roblally.plus.com (Rob Lally) Date: Thu, 14 Apr 2005 20:26:41 +0100 Subject: [Wtr-general] Question and Request In-Reply-To: References: Message-ID: <425EC3F1.1010704@roblally.plus.com> Andy Sipe wrote: > Would it be possible to remove the 'global' short cut key combination > that is currently on the Watir docs? Everytime I upgrade this short cut > gets reestablished and then I cannot use that key combination from any > other applications. +1 On this. R. From etabora at brandmuscle.com Thu Apr 14 16:23:58 2005 From: etabora at brandmuscle.com (Eric Tabora) Date: Thu, 14 Apr 2005 16:23:58 -0400 Subject: [Wtr-general] Multiple instances of a button Message-ID: I have a form with two sections and two Submit buttons with the same value. I would like to select the second submit value. When I use $ie.button(:value, "Submit").click it selects the first one. How can I select the second button if the values are the same?
------ Eric Tabora, Quality Assurance BrandMuscle, Inc. P: 216.454.2010 Cell: 216-577-2835 etabora at brandmuscle.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050414/b7a709d7/attachment.html From andy__s at hotmail.com Thu Apr 14 16:27:25 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Thu, 14 Apr 2005 16:27:25 -0400 Subject: [Wtr-general] Multiple instances of a button In-Reply-To: Message-ID: Take a look at the buttons method of IE. It will let you look at the nth button and should do what you are looking to do. -andy Date: Thu, 14 Apr 2005 16:23:58 -0400 I have a form with two sections and two Submit buttons with the same value. I would like to select the second submit value. When I use $ie.button(:value, "Submit").click it selects the first one. How can I select the second button if the values are the same? From christopher.mcmahon at gmail.com Thu Apr 14 16:27:48 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 14 Apr 2005 15:27:48 -0500 Subject: Good question! Re: [Wtr-general] Multiple instances of a button In-Reply-To: References: Message-ID: <72799cd7050414132777590092@mail.gmail.com> On 4/14/05, Eric Tabora wrote: > > I have a form with two sections and two Submit buttons with the same > value. I would like to select the second submit value. > > When I use $ie.button(:value, "Submit").click it selects the first one. > > How can I select the second button if the values are the same? > You can hit it by index ie.button(:index,2).click but you raise an interesting question. Can we do ie.button(:value,"Submit, :index,2).click or something like that? That is, click the second occurrence of the button with value "Submit"? -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050414/ec0e45bc/attachment.html From paul.rogers at shaw.ca Thu Apr 14 16:45:43 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 14 Apr 2005 14:45:43 -0600 Subject: [Wtr-general] Question and Request In-Reply-To: Message-ID: <004801c54132$ed34adf0$6400a8c0@NewDell> If its ok with you, the built in way will be this method ;-) As for the request..... I thought Id switched that off some time back. I'll look into it again though Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: 14 April 2005 12:46 To: wtr-general at rubyforge.org Subject: [Wtr-general] Question and Request Thanks for building Watir - its a great tool. First the question: I often need to find all the values in a column from a table and compare them against an expected set of values. I'm currently using this to accomplish it: class Watir::Table def colvalues(columnnumber) return (1..row_count).collect {|idx| self[idx][columnnumber].text} end end Is there another, built in, way to do this that I should be using instead? Now the request: Would it be possible to remove the 'global' short cut key combination that is currently on the Watir docs? Everytime I upgrade this short cut gets reestablished and then I cannot use that key combination from any other applications. Thanks -andy _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Thu Apr 14 16:47:00 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 14 Apr 2005 14:47:00 -0600 Subject: [Wtr-general] What's the best way to read the value of a hidden form field? In-Reply-To: <425EBA64.2080408@firefox.co.uk> Message-ID: <004901c54133$1b532ae0$6400a8c0@NewDell> I added hidden field support a few days after the 1.2 release. If you get the code from cvs it will be there. It looks remarkably similar to what you have here. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of K.C. Baltz Sent: 14 April 2005 12:46 To: wtr-general at rubyforge.org Subject: [Wtr-general] What's the best way to read the value of a hidden form field? I couldn't find anything in the 1.2 API for reading the value of a hidden form field, so I added the following to watir.rb. I'm very new to Ruby, so scrutinize the code before using it. It's pretty much a copy of TextField with changes where appropriate. I wanted to extend TextField, but I couldn't figure out how to call the ObjectActions initialize() but override the TextField one. K.C. Baltz class Hidden < ObjectActions def initialize( ieController, how , what ) @ieController = ieController if(how != :from_object) then @o = ieController.getObject( how, what , ["hidden"] ) else @o = what end super( @o ) @how = how @what = what end def text_string_creator n = [] return n end def to_s object_exist_check r = string_creator r=r + text_string_creator return r.join("\n") end end _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Thu Apr 14 16:47:46 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 14 Apr 2005 14:47:46 -0600 Subject: [Wtr-general] AutoIt javascript support - window logon In-Reply-To: Message-ID: <004a01c54133$36e1ea80$6400a8c0@NewDell> Excellent! Thank You I'll take a look and get back to you soon. I may be able to do the windows login too Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Atilla Ozgur Sent: 14 April 2005 12:14 To: wtr-general at rubyforge.org Subject: [Wtr-general] AutoIt javascript support - window logon I created a simple wrapper class for autoit and included it watir directory as WindowHelper. It uses AutoIt Com dll for now. To be able to use it, you have to install autoit. I plan to change its implementation from AutoIt to normal window call functions. But for now, it has a rudimentary support for javascript alert and confirm boxes. Also I included an example for windows integrated login. I was unable to make helper functions work in same file with script file. Therefore every test has a external script file to include. These are named jscriptExtraAlert.rb jscriptExtraConfirmOk.rb jscriptExtraConfirmCancel.rb WindowLogonExtra.rb I included a unittest for alert,confirm boxes. But i did not included unit test for window integrated login since I do not know how to duplicate such a thing without IIS. Therefore example uses http://clio.lyris.com/ for demonstrating you are able to enter name and password to logon screen. I hope they will be useful. Please comment about their functionality. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Thu Apr 14 16:52:11 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 14 Apr 2005 14:52:11 -0600 Subject: Good question! Re: [Wtr-general] Multiple instances of a button In-Reply-To: <72799cd7050414132777590092@mail.gmail.com> Message-ID: <004b01c54133$d47fccd0$6400a8c0@NewDell> as Andy has already said, you can use the iterators that exist for most objects: count=1 ie.buttons.each do |b| if b.value =="Click Me" if count == 2 b.click break end count+=1 end end I have considered allowing a hash in the button constructor: ie.button( { :value=> 'submit' , :index => 2 } ).click but I think the iterator provides a solution that opens more doors Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: 14 April 2005 14:28 To: wtr-general at rubyforge.org Subject: Good question! Re: [Wtr-general] Multiple instances of a button On 4/14/05, Eric Tabora wrote: I have a form with two sections and two Submit buttons with the same value. I would like to select the second submit value. When I use $ie.button(:value, "Submit").click it selects the first one. How can I select the second button if the values are the same? You can hit it by index ie.button(:index,2).click but you raise an interesting question. Can we do ie.button(:value,"Submit, :index,2).click or something like that? That is, click the second occurrence of the button with value "Submit"? -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050414/3722ec50/attachment.html From christopher.mcmahon at gmail.com Thu Apr 14 17:00:10 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 14 Apr 2005 16:00:10 -0500 Subject: I like the hash, too. Re: Good question! Re: [Wtr-general] Multiple instances of a button In-Reply-To: <004b01c54133$d47fccd0$6400a8c0@NewDell> References: <72799cd7050414132777590092@mail.gmail.com> <004b01c54133$d47fccd0$6400a8c0@NewDell> Message-ID: <72799cd7050414140041bcf0ed@mail.gmail.com> On 4/14/05, Paul Rogers wrote: > > as Andy has already said, you can use the iterators that exist for most > objects: > count=1 > ie.buttons.each do |b| > if b.value =="Click Me" > if count == 2 > b.click > break > end > count+=1 > end > end > Thanks for the example, I hadn't considered that. > I have considered allowing a hash in the button constructor: > ie.button( { :value=> 'submit' , :index => 2 } ).click > but I think the iterator provides a solution that opens more doors > Maybe it's just my Perl bias, but I think the hash is a lot more elegant. It should be substantially more efficient, also. Maybe that's a refactoring project for some day. -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050414/f7d1be14/attachment.html From paul.rogers at shaw.ca Thu Apr 14 19:22:35 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 14 Apr 2005 17:22:35 -0600 Subject: [Wtr-general] Question and Request In-Reply-To: <425EC3F1.1010704@roblally.plus.com> Message-ID: <007901c54148$d822b090$6400a8c0@NewDell> Ok, the shortcut key crept back in when we added the gui installer. Its definitely gone now! Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Rob Lally Sent: 14 April 2005 13:27 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Question and Request Andy Sipe wrote: > Would it be possible to remove the 'global' short cut key combination > that is currently on the Watir docs? Everytime I upgrade this short cut > gets reestablished and then I cannot use that key combination from any > other applications. +1 On this. R. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Thu Apr 14 19:29:04 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 14 Apr 2005 17:29:04 -0600 Subject: [Wtr-general] Multiple instances of a button In-Reply-To: Message-ID: <007f01c54149$bf21ab40$6400a8c0@NewDell> Im sure you've already seen the post regarding the iterator, but in this case, I think you can also specify the form: ie.form(:index,1).button(:value , 'Submit').click or for the second ie.form(:index,2).button(:value , 'Submit').click Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Eric Tabora Sent: 14 April 2005 14:24 To: wtr-general at rubyforge.org Subject: [Wtr-general] Multiple instances of a button I have a form with two sections and two Submit buttons with the same value. I would like to select the second submit value. When I use $ie.button(:value, "Submit").click it selects the first one. How can I select the second button if the values are the same? ------ Eric Tabora, Quality Assurance BrandMuscle, Inc. P: 216.454.2010 Cell: 216-577-2835 etabora at brandmuscle.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050414/83e086d5/attachment.html From andy__s at hotmail.com Thu Apr 14 19:59:26 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Thu, 14 Apr 2005 19:59:26 -0400 Subject: [Wtr-general] Multiple instances of a button In-Reply-To: <007f01c54149$bf21ab40$6400a8c0@NewDell> Message-ID: couldn't you also do ie.buttons[2] -andy ----Original Message Follows---- From: Paul Rogers <paul.rogers at shaw.ca> Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Multiple instances of a button Date: Thu, 14 Apr 2005 17:29:04 -0600 Im sure you've already seen the post regarding the iterator, but in this case, I think you can also specify the form: ie.form(:index,1).button(:value , 'Submit').click or for the second ie.form(:index,2).button(:value , 'Submit').click Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Eric Tabora Sent: 14 April 2005 14:24 To: wtr-general at rubyforge.org Subject: [Wtr-general] Multiple instances of a button I have a form with two sections and two Submit buttons with the same value. I would like to select the second submit value. When I use $ie.button(:value, "Submit").click it selects the first one. How can I select the second button if the values are the same? <form name="WizardForm" method="post" action="/BrandBuilder/Wizard/WizardDirector.do"> <input type="hidden" name="action" value="getLocationsByMarket"> <input type="submit" name="action" value="Submit" class="activelink"> <form name="WizardForm" method="post" action="/BrandBuilder/Wizard/WizardDirector.do" onsubmit="javascript:closeForm(this.form)" target="parentWindow"> <input type="hidden" name="action" value="Next"> <input type="submit" name="action" value="Submit" class="activelink"> ------ Eric Tabora, Quality Assurance BrandMuscle, Inc. P: 216.454.2010 Cell: 216-577-2835 etabora at brandmuscle.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Thu Apr 14 20:11:43 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 14 Apr 2005 18:11:43 -0600 Subject: [Wtr-general] Multiple instances of a button In-Reply-To: Message-ID: <008901c5414f$b47ab690$6400a8c0@NewDell> Or ie.button(:index,2) Assuming it is the second button. Using :value or :id or :name tends to produce more future proof code Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: 14 April 2005 17:59 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Multiple instances of a button couldn't you also do ie.buttons[2] -andy ----Original Message Follows---- From: Paul Rogers <paul.rogers at shaw.ca> Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Multiple instances of a button Date: Thu, 14 Apr 2005 17:29:04 -0600 Im sure you've already seen the post regarding the iterator, but in this case, I think you can also specify the form: ie.form(:index,1).button(:value , 'Submit').click or for the second ie.form(:index,2).button(:value , 'Submit').click Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Eric Tabora Sent: 14 April 2005 14:24 To: wtr-general at rubyforge.org Subject: [Wtr-general] Multiple instances of a button I have a form with two sections and two Submit buttons with the same value. I would like to select the second submit value. When I use $ie.button(:value, "Submit").click it selects the first one. How can I select the second button if the values are the same? <form name="WizardForm" method="post" action="/BrandBuilder/Wizard/WizardDirector.do"> <input type="hidden" name="action" value="getLocationsByMarket"> <input type="submit" name="action" value="Submit" class="activelink"> <form name="WizardForm" method="post" action="/BrandBuilder/Wizard/WizardDirector.do" onsubmit="javascript:closeForm(this.form)" target="parentWindow"> <input type="hidden" name="action" value="Next"> <input type="submit" name="action" value="Submit" class="activelink"> ------ Eric Tabora, Quality Assurance BrandMuscle, Inc. P: 216.454.2010 Cell: 216-577-2835 etabora at brandmuscle.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 From andy__s at hotmail.com Thu Apr 14 20:33:49 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Thu, 14 Apr 2005 20:33:49 -0400 Subject: [Wtr-general] Question and Request In-Reply-To: <004801c54132$ed34adf0$6400a8c0@NewDell> Message-ID: Sounds great! I'd be happy to take a shot at creating some unit tests for it also?? -andy ----Original Message Follows---- From: Paul Rogers <paul.rogers at shaw.ca> Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Question and Request Date: Thu, 14 Apr 2005 14:45:43 -0600 If its ok with you, the built in way will be this method ;-) As for the request..... I thought Id switched that off some time back. I'll look into it again though Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: 14 April 2005 12:46 To: wtr-general at rubyforge.org Subject: [Wtr-general] Question and Request Thanks for building Watir - its a great tool. First the question: I often need to find all the values in a column from a table and compare them against an expected set of values. I'm currently using this to accomplish it: class Watir::Table def colvalues(columnnumber) return (1..row_count).collect {|idx| self[idx][columnnumber].text} end end Is there another, built in, way to do this that I should be using instead? Now the request: Would it be possible to remove the 'global' short cut key combination that is currently on the Watir docs? Everytime I upgrade this short cut gets reestablished and then I cannot use that key combination from any other applications. Thanks -andy _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Thu Apr 14 20:39:10 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 14 Apr 2005 18:39:10 -0600 Subject: [Wtr-general] Question and Request In-Reply-To: Message-ID: <008a01c54153$89fb3580$6400a8c0@NewDell> Sure. There is a tables_test and several html pages. Id suggest adding the test to one of the existing ones but create a new html Thanks for your help Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: 14 April 2005 18:34 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Question and Request Sounds great! I'd be happy to take a shot at creating some unit tests for it also?? -andy ----Original Message Follows---- From: Paul Rogers <paul.rogers at shaw.ca> Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Question and Request Date: Thu, 14 Apr 2005 14:45:43 -0600 If its ok with you, the built in way will be this method ;-) As for the request..... I thought Id switched that off some time back. I'll look into it again though Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: 14 April 2005 12:46 To: wtr-general at rubyforge.org Subject: [Wtr-general] Question and Request Thanks for building Watir - its a great tool. First the question: I often need to find all the values in a column from a table and compare them against an expected set of values. I'm currently using this to accomplish it: class Watir::Table def colvalues(columnnumber) return (1..row_count).collect {|idx| self[idx][columnnumber].text} end end Is there another, built in, way to do this that I should be using instead? Now the request: Would it be possible to remove the 'global' short cut key combination that is currently on the Watir docs? Everytime I upgrade this short cut gets reestablished and then I cannot use that key combination from any other applications. Thanks -andy _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Fri Apr 15 01:14:27 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 14 Apr 2005 23:14:27 -0600 Subject: [Wtr-general] AutoIt javascript support - window logon In-Reply-To: Message-ID: <00ad01c54179$ff58b8e0$6400a8c0@NewDell> The Autoit license says we are able to redistribute it. Should we include a copy with watir and make this our recommended way of dealing with pop-ups? Should we have the watir installer install it too? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Atilla Ozgur Sent: 14 April 2005 12:14 To: wtr-general at rubyforge.org Subject: [Wtr-general] AutoIt javascript support - window logon I created a simple wrapper class for autoit and included it watir directory as WindowHelper. It uses AutoIt Com dll for now. To be able to use it, you have to install autoit. I plan to change its implementation from AutoIt to normal window call functions. But for now, it has a rudimentary support for javascript alert and confirm boxes. Also I included an example for windows integrated login. I was unable to make helper functions work in same file with script file. Therefore every test has a external script file to include. These are named jscriptExtraAlert.rb jscriptExtraConfirmOk.rb jscriptExtraConfirmCancel.rb WindowLogonExtra.rb I included a unittest for alert,confirm boxes. But i did not included unit test for window integrated login since I do not know how to duplicate such a thing without IIS. Therefore example uses http://clio.lyris.com/ for demonstrating you are able to enter name and password to logon screen. I hope they will be useful. Please comment about their functionality. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Fri Apr 15 01:21:48 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Thu, 14 Apr 2005 23:21:48 -0600 Subject: [Wtr-general] AutoIt javascript support - window logon In-Reply-To: <00ad01c54179$ff58b8e0$6400a8c0@NewDell> Message-ID: <20050415052130.XNPU27811.priv-edtnes46.telusplanet.net@tintin> It might be nice as an option in the installer. > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: April 14, 2005 11:14 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] AutoIt javascript support - window logon > > The Autoit license says we are able to redistribute it. > > Should we include a copy with watir and make this our recommended way of > dealing with pop-ups? > > Should we have the watir installer install it too? > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Atilla Ozgur > Sent: 14 April 2005 12:14 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] AutoIt javascript support - window logon > > > I created a simple wrapper class for autoit and included it watir > directory as WindowHelper. It uses AutoIt Com dll for now. To be able to > use it, you have to install autoit. I plan to change its implementation > from AutoIt to normal window call functions. But for now, it has a > rudimentary support for javascript alert and confirm boxes. Also I > included an example for windows integrated login. > > I was unable to make helper functions work in same file with script > file. Therefore every test has a external script file to include. These > are named jscriptExtraAlert.rb jscriptExtraConfirmOk.rb > jscriptExtraConfirmCancel.rb WindowLogonExtra.rb > > I included a unittest for alert,confirm boxes. But i did not included > unit test for window integrated login since I do not know how to > duplicate such a thing without IIS. Therefore example uses > http://clio.lyris.com/ for demonstrating you are able to enter name and > password to logon screen. > > > I hope they will be useful. Please comment about their functionality. > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Fri Apr 15 01:23:07 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Thu, 14 Apr 2005 23:23:07 -0600 Subject: [Wtr-general] RE: Clicking link by URL attribute problem in Watir1.2 In-Reply-To: <6fcd26f10504130749304f7a97@mail.gmail.com> Message-ID: <20050415052249.EKFW18815.priv-edtnes56.telusplanet.net@tintin> It sounds like this is the intended functionality. Paul and I have been talking about this. For now, the regular expression is what is supposed to work for this: ie.link(:url, /pagename.html/).click > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of John Lloyd-Jones > Sent: April 13, 2005 8:49 AM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] RE: Clicking link by URL attribute problem in > Watir1.2 > > Jonathan > Yes > John > > On 4/12/05, Jonathan Kohl wrote: > > Interesting. I'll have to try that out. > > > > Does: > > > > ie.link(:url, /pagename.html/).click > > > > work? > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > > > bounces at rubyforge.org] On Behalf Of John Lloyd-Jones > > > Sent: April 12, 2005 5:56 PM > > > To: wtr-general at rubyforge.org > > > Subject: Re: [Wtr-general] RE: Clicking link by URL attribute problem > in > > > Watir 1.2 > > > > > > Jonathan > > > > > > It seems that there is a change from 1.1. > > > The test now requires the fully qualified URL > > > (e.g. http://myhost.mydomain.com/pagename.html") > > > whereas previously, I could simply use the URL > > > actually given in the anchor tag (e.g. href="pagename.html" ). > > > This has broken some of my test scripts. > > > > > > John > > > > > > > > > On 4/12/05, jkohl at telusplanet.net wrote: > > > > > > > > > More importantly, getting back to the link URL, is the link by URL > > > attribute > > > > > example in the current User's Guide now incorrect? I can confirm > it > > > no > > > > > longer works in Watir 1.2: > > > > > > > > > > ie.link(:url, "http://pragmaticprogrammer.com/titles/ruby/").click > > > > > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1537:in > `object_exist_check': > > > Unable > > > > > to locate object, using url and > > > http://pragmaticprogrammer.com/titles/ruby/ > > > > > (Watir::Exception::UnknownObjectException) from > > > > > D:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1646:in `click' > > > > Are you sure it no longer works? When I try it it works: > > > > irb(main):001:0> require 'watir' > > > > => true > > > > irb(main):002:0> ie = Watir::IE.start("http://www.google.com") > > > > => # @url_list= > > > > ["http://www.google.ca/"] > > > > > > > > > irb(main):003:0> ie.text_field(:name, "q").set("pickaxe") > > > > => nil > > > > irb(main):004:0> ie.button(:name, "btnG").click > > > > => nil > > > > irb(main):005:0> ie.link(:url, > > > "http://pragmaticprogrammer.com/titles/ruby/").cl > > > > ick > > > > => nil > > > > > > > > On my machine, I am now on the Programming Ruby, 2nd Edition page. > The > > > link > > > > attribute only works if that URL is declared in the page you are > > > currently on. > > > > > > > > -Jonathan > > > > > > > > _______________________________________________ > > > > Wtr-general mailing list > > > > Wtr-general at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Fri Apr 15 01:36:17 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 14 Apr 2005 23:36:17 -0600 Subject: [Wtr-general] http authentication question In-Reply-To: <4240A49F.1020504@clabs.org> Message-ID: <00ae01c5417d$0be34b90$6400a8c0@NewDell> I think the format is http://username:password at mywebaddress" (e.g. http://joeblow:default1597 at www.securewebsite.com). ( this is from the AutoIt site - http://www.autoitscript.com/forum/index.php?showtopic=5840 ) -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris Morris Sent: 22 March 2005 16:05 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] http authentication question Jonathan Kohl wrote: I see that my question was ambiguous. Here's an example: goto http://clio.lyris.com/ You will be prompted to enter a username and password. How does one tell watir to enter those? Ah, I see what you mean. That box you see is not part of Internet Explorer, so we have to use a different mechanism to control that. Watir comes with Winclickers which we have used for some of these windows, but if I recall, it isn't as simple as the other windows to deal with. I know there was a question about this a few days ago and Paul was looking into it. So I don't think there is a solution for this yet. Someone else can chime in if they have a fix for it. You can also inline your username password into the actual url. Not secure at all, of course, but may do for testing. Something like: http://www.site.com:user at pswd -- Chris http://clabs.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050414/43bc72f0/attachment.html From amatei at softwin.ro Fri Apr 15 04:48:16 2005 From: amatei at softwin.ro (Andrei MATEI) Date: Fri, 15 Apr 2005 11:48:16 +0300 Subject: [Wtr-general] controlling IE Message-ID: <2000SRVIIZS2TRqf69a0000000d@softwin.ro> Hello, This question is not directly related to Watir, but I would appreciate an answear. How do you guys control an instance of IE? I mean not an ActiveX object in your app, but a different instance of IE. Do you have any pointers about how I could do it in .net? Thanks, Andrei Matei -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050415/4e602b94/attachment.html From etabora at brandmuscle.com Fri Apr 15 07:59:29 2005 From: etabora at brandmuscle.com (Eric Tabora) Date: Fri, 15 Apr 2005 07:59:29 -0400 Subject: [Wtr-general] Multiple instances of a button In-Reply-To: <008901c5414f$b47ab690$6400a8c0@NewDell> Message-ID: Thanks for the responses guys! -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Thursday, April 14, 2005 8:12 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Multiple instances of a button Or ie.button(:index,2) Assuming it is the second button. Using :value or :id or :name tends to produce more future proof code Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: 14 April 2005 17:59 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Multiple instances of a button couldn't you also do ie.buttons[2] -andy ----Original Message Follows---- From: Paul Rogers <paul.rogers at shaw.ca> Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Multiple instances of a button Date: Thu, 14 Apr 2005 17:29:04 -0600 Im sure you've already seen the post regarding the iterator, but in this case, I think you can also specify the form: ie.form(:index,1).button(:value , 'Submit').click or for the second ie.form(:index,2).button(:value , 'Submit').click Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Eric Tabora Sent: 14 April 2005 14:24 To: wtr-general at rubyforge.org Subject: [Wtr-general] Multiple instances of a button I have a form with two sections and two Submit buttons with the same value. I would like to select the second submit value. When I use $ie.button(:value, "Submit").click it selects the first one. How can I select the second button if the values are the same? <form name="WizardForm" method="post" action="/BrandBuilder/Wizard/WizardDirector.do"> <input type="hidden" name="action" value="getLocationsByMarket"> <input type="submit" name="action" value="Submit" class="activelink"> <form name="WizardForm" method="post" action="/BrandBuilder/Wizard/WizardDirector.do" onsubmit="javascript:closeForm(this.form)" target="parentWindow"> <input type="hidden" name="action" value="Next"> <input type="submit" name="action" value="Submit" class="activelink"> ------ Eric Tabora, Quality Assurance BrandMuscle, Inc. P: 216.454.2010 Cell: 216-577-2835 etabora at brandmuscle.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Mark_Cain at rl.gov Fri Apr 15 11:38:14 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Fri, 15 Apr 2005 08:38:14 -0700 Subject: I like the hash, too. Re: Good question! Re: [Wtr-general] Multiple instances of abutton Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04E154EF6@EX5V.rl.gov> Here are the results of a time test comparing the iterator and using direct table access-which one was faster. The test page has about 700 buttons on it. Most of the buttons share 1 of 5 different values ('Delete', 'Edit', 'Up-arrow', 'Down-Arrow' and 'Reactivate'). The Reactivate buttons begin at about the bottom 1/3 of the list. The two tests consist of: 1). Using an Iterator, accessing the buttons collection to click the 7th 'Reactivate' button in the list. 2) Accessing Table index 10 (where the Reactivate buttons begin) and selecting the same row as the Iterator to click the same button. The results are as follows: 1). Using the iterator the Time to Execute: 4 Minutes, 8.00000270833333 Seconds count=1 start = DateTime.now $ie.buttons.each do |b| if b.value =="Reactivate" if count == 7 b.click stop = DateTime.now break end count+=1 end end diff = stop - start h,m,s,frac = Date.day_fraction_to_time(diff) s += frac.to_f puts "That's #{h} Hours, #{m} Minutes, #{s} Seconds" Time to Execute: 4 Minutes, 8.00000270833333 Seconds ============================================ 2). Direct table access the Time to Execute: 0 Minutes, 1.00000578703704 Seconds table = $ie.table(:index, 10) start = DateTime.now table[8][3].button(:index, 1).click stop = DateTime.now diff = stop - start h,m,s,frac = Date.day_fraction_to_time(diff) s += frac.to_f puts "That's #{h} Hours, #{m} Minutes, #{s} Seconds" Time the Execute: 0 Minutes, 1.00000578703704 Seconds =========================================== Hope this is useful. --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: Thursday, April 14, 2005 2:00 PM To: wtr-general at rubyforge.org Subject: I like the hash,too. Re: Good question! Re: [Wtr-general] Multiple instances of abutton On 4/14/05, Paul Rogers wrote: as Andy has already said, you can use the iterators that exist for most objects: count=1 ie.buttons.each do |b| if b.value =="Click Me" if count == 2 b.click break end count+=1 end end Thanks for the example, I hadn't considered that. I have considered allowing a hash in the button constructor: ie.button( { :value=> 'submit' , :index => 2 } ).click but I think the iterator provides a solution that opens more doors Maybe it's just my Perl bias, but I think the hash is a lot more elegant. It should be substantially more efficient, also. Maybe that's a refactoring project for some day. -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050415/cf9290e3/attachment.html From paul.rogers at shaw.ca Fri Apr 15 12:30:00 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 15 Apr 2005 10:30:00 -0600 Subject: I like the hash, too. Re: Good question! Re: [Wtr-general] Multiple instances of abutton In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04E154EF6@EX5V.rl.gov> Message-ID: <004001c541d8$5ea54d00$6400a8c0@NewDell> The iterator has to create a button object for each button on the page. Maybe we need to refactor this code. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 15 April 2005 09:38 To: wtr-general at rubyforge.org Subject: RE: I like the hash, too. Re: Good question! Re: [Wtr-general] Multiple instances of abutton Here are the results of a time test comparing the iterator and using direct table access-which one was faster. The test page has about 700 buttons on it. Most of the buttons share 1 of 5 different values ('Delete', 'Edit', 'Up-arrow', 'Down-Arrow' and 'Reactivate'). The Reactivate buttons begin at about the bottom 1/3 of the list. The two tests consist of: 1). Using an Iterator, accessing the buttons collection to click the 7th 'Reactivate' button in the list. 2) Accessing Table index 10 (where the Reactivate buttons begin) and selecting the same row as the Iterator to click the same button. The results are as follows: 1). Using the iterator the Time to Execute: 4 Minutes, 8.00000270833333 Seconds count=1 start = DateTime.now $ie.buttons.each do |b| if b.value =="Reactivate" if count == 7 b.click stop = DateTime.now break end count+=1 end end diff = stop - start h,m,s,frac = Date.day_fraction_to_time(diff) s += frac.to_f puts "That's #{h} Hours, #{m} Minutes, #{s} Seconds" Time to Execute: 4 Minutes, 8.00000270833333 Seconds ============================================ 2). Direct table access the Time to Execute: 0 Minutes, 1.00000578703704 Seconds table = $ie.table(:index, 10) start = DateTime.now table[8][3].button(:index, 1).click stop = DateTime.now diff = stop - start h,m,s,frac = Date.day_fraction_to_time(diff) s += frac.to_f puts "That's #{h} Hours, #{m} Minutes, #{s} Seconds" Time the Execute: 0 Minutes, 1.00000578703704 Seconds =========================================== Hope this is useful. --Mark _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: Thursday, April 14, 2005 2:00 PM To: wtr-general at rubyforge.org Subject: I like the hash,too. Re: Good question! Re: [Wtr-general] Multiple instances of abutton On 4/14/05, Paul Rogers wrote: as Andy has already said, you can use the iterators that exist for most objects: count=1 ie.buttons.each do |b| if b.value =="Click Me" if count == 2 b.click break end count+=1 end end Thanks for the example, I hadn't considered that. I have considered allowing a hash in the button constructor: ie.button( { :value=> 'submit' , :index => 2 } ).click but I think the iterator provides a solution that opens more doors Maybe it's just my Perl bias, but I think the hash is a lot more elegant. It should be substantially more efficient, also. Maybe that's a refactoring project for some day. -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050415/83b200f4/attachment.html From bret at pettichord.com Fri Apr 15 15:36:58 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 15 Apr 2005 14:36:58 -0500 Subject: [Wtr-general] Attach Method In-Reply-To: References: <5.1.0.14.2.20050412235237.03b0f178@127.0.0.1> Message-ID: <5.1.0.14.2.20050415143626.0325a848@127.0.0.1> At 10:48 AM 4/14/2005, Eric Tabora wrote: >That didn't work, but this did: > > $ie.attach_init(:title, 'Select Locations') That is a private entry point that is not intended for external use. It could change in later releases. _____________________ Bret Pettichord www.pettichord.com From chrismo at clabs.org Fri Apr 15 17:35:36 2005 From: chrismo at clabs.org (Chris Morris) Date: Fri, 15 Apr 2005 16:35:36 -0500 Subject: [Wtr-general] [Fwd: Scripting 101] Message-ID: <426033A8.6050304@clabs.org> An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050415/ed9a8284/attachment.html From christopher.mcmahon at gmail.com Sat Apr 16 14:33:01 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Sat, 16 Apr 2005 13:33:01 -0500 Subject: Ruby OLE/wsh examples, too. Re: [Wtr-general] AutoIt javascript support - window logon In-Reply-To: <00ad01c54179$ff58b8e0$6400a8c0@NewDell> References: <00ad01c54179$ff58b8e0$6400a8c0@NewDell> Message-ID: <72799cd7050416113326a2287f@mail.gmail.com> Hi... Bill Caputo has been coding Windows GUIs directly from the Ruby OLE library. See the Apr. 13 entry here: http://www.williamcaputo.com/ Anybody else know much about Windows Scripting Host and/or OLE? -Chris On 4/15/05, Paul Rogers wrote: > > The Autoit license says we are able to redistribute it. > > Should we include a copy with watir and make this our recommended way of > dealing with pop-ups? > > Should we have the watir installer install it too? > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Atilla Ozgur > Sent: 14 April 2005 12:14 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] AutoIt javascript support - window logon > > I created a simple wrapper class for autoit and included it watir > directory as WindowHelper. It uses AutoIt Com dll for now. To be able to > use it, you have to install autoit. I plan to change its implementation > from AutoIt to normal window call functions. But for now, it has a > rudimentary support for javascript alert and confirm boxes. Also I > included an example for windows integrated login. > > I was unable to make helper functions work in same file with script > file. Therefore every test has a external script file to include. These > are named jscriptExtraAlert.rb jscriptExtraConfirmOk.rb > jscriptExtraConfirmCancel.rb WindowLogonExtra.rb > > I included a unittest for alert,confirm boxes. But i did not included > unit test for window integrated login since I do not know how to > duplicate such a thing without IIS. Therefore example uses > http://clio.lyris.com/ for demonstrating you are able to enter name and > password to logon screen. > > I hope they will be useful. Please comment about their functionality. > > _______________________________________________ > 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/20050416/e686c32c/attachment.html From andy__s at hotmail.com Sat Apr 16 15:12:11 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Sat, 16 Apr 2005 15:12:11 -0400 Subject: [Wtr-general] image support Message-ID: One of the tracker items is image support -- I didn't see this being done yet and thought I might take a crack at it to get more familiar with Watir. Is anyone else working on this? ---------------------------------------- >From the Feature Request: .... Detailed description: ie.image(:id, 'xxx').save_as('c:\temp\image.gif') so when dynamic images are produced, for example a stock chart, we can save it and analyze it after the test I think we need to use code similar to the cookie manager to access the image in the cache ------- -andy From paul.rogers at shaw.ca Sat Apr 16 18:58:07 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sat, 16 Apr 2005 16:58:07 -0600 Subject: [Wtr-general] image support In-Reply-To: Message-ID: <004a01c542d7$c18248b0$6400a8c0@NewDell> Jonathan suggested that just a few weeks ago. I put it in the tracker so I wouldn't forget it. In fact I may have a need for it soon. Why don't you give it a go? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: 16 April 2005 13:12 To: wtr-general at rubyforge.org Subject: [Wtr-general] image support One of the tracker items is image support -- I didn't see this being done yet and thought I might take a crack at it to get more familiar with Watir. Is anyone else working on this? ---------------------------------------- >From the Feature Request: .... Detailed description: ie.image(:id, 'xxx').save_as('c:\temp\image.gif') so when dynamic images are produced, for example a stock chart, we can save it and analyze it after the test I think we need to use code similar to the cookie manager to access the image in the cache ------- -andy _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Sat Apr 16 19:02:08 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sat, 16 Apr 2005 17:02:08 -0600 Subject: Ruby OLE/wsh examples, too. Re: [Wtr-general] AutoIt javascript support - window logon In-Reply-To: <72799cd7050416113326a2287f@mail.gmail.com> Message-ID: <004b01c542d8$50cfc510$6400a8c0@NewDell> I took a look at this as a replacement for the winclicker. I never got far with it ( and since we now have some good AutoIt support I dont feel particularly inclined to do any more) Heres what I got Paul -------------------- # clickers using wscript =begin this example from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script5 6/html/wsmthsendkeys.asp set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run "calc" WScript.Sleep 100 WshShell.AppActivate "Calculator" WScript.Sleep 100 WshShell.SendKeys "1{+}" WScript.Sleep 500 WshShell.SendKeys "2" WScript.Sleep 500 WshShell.SendKeys "~" WScript.Sleep 500 WshShell.SendKeys "*3" WScript.Sleep 500 WshShell.SendKeys "~" WScript.Sleep 2500 =end require 'Win32API' class WinClicker def winsystem(command) # http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore9 8/html/_crt_system.2c_._wsystem.asp # using win32api pid = Win32API.new("crtdll", "system", ['P'], 'L').Call(command) # using DL #winapi= DL.dlopen("crtdll") #sys = winapi['system' , '??'] end def click_javascript_ok() my_path = File.expand_path(File.dirname(__FILE__)) winsystem( 'start ' + my_path.gsub('/', '\\') + '\' + __FILE__ + ' 3 ok' ) end def internal_click_javascript_ok() shell = WIN32OLE.new("Shell.Application") shell.AppActivate("Microsoft Internet Explorer") shell.sendKeys(" ") shell = nil end end if __FILE__ == $0 if ARGV[0] != nil sleep ARGV[0].to_i w = WinClicker.new if ARGV[1].downcase == "ok" w.click_javascript_ok end end end -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: 16 April 2005 12:33 To: wtr-general at rubyforge.org Subject: Ruby OLE/wsh examples, too. Re: [Wtr-general] AutoIt javascript support - window logon Hi... Bill Caputo has been coding Windows GUIs directly from the Ruby OLE library. See the Apr. 13 entry here: http://www.williamcaputo.com/ Anybody else know much about Windows Scripting Host and/or OLE? -Chris On 4/15/05, Paul Rogers wrote: The Autoit license says we are able to redistribute it. Should we include a copy with watir and make this our recommended way of dealing with pop-ups? Should we have the watir installer install it too? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org ] On Behalf Of Atilla Ozgur Sent: 14 April 2005 12:14 To: wtr-general at rubyforge.org Subject: [Wtr-general] AutoIt javascript support - window logon I created a simple wrapper class for autoit and included it watir directory as WindowHelper. It uses AutoIt Com dll for now. To be able to use it, you have to install autoit. I plan to change its implementation from AutoIt to normal window call functions. But for now, it has a rudimentary support for javascript alert and confirm boxes. Also I included an example for windows integrated login. I was unable to make helper functions work in same file with script file. Therefore every test has a external script file to include. These are named jscriptExtraAlert.rb jscriptExtraConfirmOk.rb jscriptExtraConfirmCancel.rb WindowLogonExtra.rb I included a unittest for alert,confirm boxes. But i did not included unit test for window integrated login since I do not know how to duplicate such a thing without IIS. Therefore example uses http://clio.lyris.com/ for demonstrating you are able to enter name and password to logon screen. I hope they will be useful. Please comment about their functionality. _______________________________________________ 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/20050416/e91224c2/attachment.html From margaret at holly.com.au Mon Apr 18 00:25:05 2005 From: margaret at holly.com.au (Margaret Dineen) Date: Mon, 18 Apr 2005 14:25:05 +1000 Subject: [Wtr-general] query on enabled/disabled buttons Message-ID: <015001c543ce$98a63300$c402000a@test02> Hi, I'm a newbie to Watir but I've been having a lot of fun with it. It's an awesome tool. I'm using the latest version of Watir which I downloaded last week and I'm scripting some tests for a web page which has a number of frames. I've located the frame I need to access and I know the name of the fields within the frame etc. My problem is that if I access the frame manually, the "save" button is initially disabled but it is enabled once text is entered into text fields on the page. If I do it via Watir, the button is disabled. The code I'm using to enter text into the fields is: ie.frame("monitor").text_field(:name,"contactname").set("Joe Bloggs") Apologies if this is a stupid question. Any assistance would be gratefully appreciated. Thanks, Mags -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050418/1a7e89c1/attachment.html From jkohl at telusplanet.net Mon Apr 18 06:15:19 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Mon, 18 Apr 2005 04:15:19 -0600 Subject: [Wtr-general] query on enabled/disabled buttons In-Reply-To: <015001c543ce$98a63300$c402000a@test02> Message-ID: <20050418101518.ZHDR16179.priv-edtnes28.telusplanet.net@tintin> Is the button enabled using JavaScript? If so, try the fire_event method to activate it. You'll need to view the source of the page in that particular frame to see if it is activated by JavaScript. If the button is enabled by an onKeyUp or onKeyPress event or something like that, you can add that after the set like this: ie.frame("monitor").text_field(:name,"contactname").fire_event("onKeyUp") or whatever the JS event that activates the button is. -Jonathan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Margaret Dineen Sent: April 17, 2005 10:25 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] query on enabled/disabled buttons Hi, I'm a newbie to Watir but I've been having a lot of fun with it. It's an awesome tool. I'm using the latest version of Watir which I downloaded last week and I'm scripting some tests for a web page which has a number of frames. I've located the frame I need to access and I know the name of the fields within the frame etc. My problem is that if I access the frame manually, the "save" button is initially disabled but it is enabled once text is entered into text fields on the page. If I do it via Watir, the button is disabled. The code I'm using to enter text into the fields is: ie.frame("monitor").text_field(:name,"contactname").set("Joe Bloggs") Apologies if this is a stupid question. Any assistance would be gratefully appreciated. Thanks, Mags -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050418/b2d60884/attachment.html From DBoyt at anteon.com Mon Apr 18 10:04:02 2005 From: DBoyt at anteon.com (Boyt, Darrel) Date: Mon, 18 Apr 2005 10:04:02 -0400 Subject: [Wtr-general] Counts Message-ID: <258593F548C79D4AB7CBA2AE72DEBEC8546164@HQ-EXVS02.anteon.com> Please excuse my unfamiliarity with the proper OO terms (I'm an old school programmer), but I would like to be able to find out how many of a certain object (a collection?) are on a page by doing something like "table_count = ie.tables.count()". Is this do-able? It would help me a bit with my testing. Thanks, Darrel Boyt Systems Analyst Anteon Corporation Montgomery, Alabama -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050418/0499ea1a/attachment.html From paul.rogers at shaw.ca Mon Apr 18 10:13:58 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 18 Apr 2005 08:13:58 -0600 Subject: [Wtr-general] Counts In-Reply-To: <258593F548C79D4AB7CBA2AE72DEBEC8546164@HQ-EXVS02.anteon.com> Message-ID: <002001c54420$dce5d820$6400a8c0@NewDell> most of the object types have iterators, buttons, text_fields, radios, checkboxes, tables, spans, dvis ( any I forgot?) you can use the length method of the iterator to find out: ie.buttons.length ie.tables.length If you're using tables, any nested tables will also be included in the count Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Boyt, Darrel Sent: 18 April 2005 08:04 To: wtr-general at rubyforge.org Subject: [Wtr-general] Counts Please excuse my unfamiliarity with the proper OO terms (I'm an old school programmer), but I would like to be able to find out how many of a certain object (a collection?) are on a page by doing something like "table_count = ie.tables.count()". Is this do-able? It would help me a bit with my testing. Thanks, Darrel Boyt Systems Analyst Anteon Corporation Montgomery, Alabama -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050418/ba6f8555/attachment.html From paul.rogers at shaw.ca Mon Apr 18 10:28:48 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 18 Apr 2005 08:28:48 -0600 Subject: [Wtr-general] query on enabled/disabled buttons In-Reply-To: <20050418101518.ZHDR16179.priv-edtnes28.telusplanet.net@tintin> Message-ID: <002a01c54422$ef52b940$6400a8c0@NewDell> I just took a look at the code for this, ands it very easy to implement this as part of the set code. Since there doesnt appear to be any unit tests for the onKeyPress event its probably worth adding the keyUp keyDown avents and doing unit tests for them all Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jonathan Kohl Sent: 18 April 2005 04:15 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] query on enabled/disabled buttons Is the button enabled using JavaScript? If so, try the fire_event method to activate it. You'll need to view the source of the page in that particular frame to see if it is activated by JavaScript. If the button is enabled by an onKeyUp or onKeyPress event or something like that, you can add that after the set like this: ie.frame("monitor").text_field(:name,"contactname").fire_event("onKeyUp" ) or whatever the JS event that activates the button is. -Jonathan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Margaret Dineen Sent: April 17, 2005 10:25 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] query on enabled/disabled buttons Hi, I'm a newbie to Watir but I've been having a lot of fun with it. It's an awesome tool. I'm using the latest version of Watir which I downloaded last week and I'm scripting some tests for a web page which has a number of frames. I've located the frame I need to access and I know the name of the fields within the frame etc. My problem is that if I access the frame manually, the "save" button is initially disabled but it is enabled once text is entered into text fields on the page. If I do it via Watir, the button is disabled. The code I'm using to enter text into the fields is: ie.frame("monitor").text_field(:name,"contactname").set("Joe Bloggs") Apologies if this is a stupid question. Any assistance would be gratefully appreciated. Thanks, Mags -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050418/1a243fe0/attachment.html From DBoyt at anteon.com Mon Apr 18 10:39:20 2005 From: DBoyt at anteon.com (Boyt, Darrel) Date: Mon, 18 Apr 2005 10:39:20 -0400 Subject: [Wtr-general] Counts Message-ID: <258593F548C79D4AB7CBA2AE72DEBEC854617E@HQ-EXVS02.anteon.com> Thanks, Paul. The length method worked for everything except tables. Here's the error message I get: NoMethodError: undefined method `tables' for # from (irb):11 Darrel Boyt Systems Analyst Anteon Corporation Montgomery, Alabama -----Original Message----- Date: Mon, 18 Apr 2005 08:13:58 -0600 From: Paul Rogers Subject: RE: [Wtr-general] Counts To: wtr-general at rubyforge.org Message-ID: <002001c54420$dce5d820$6400a8c0 at NewDell> Content-Type: text/plain; charset="us-ascii" most of the object types have iterators, buttons, text_fields, radios, checkboxes, tables, spans, dvis ( any I forgot?) you can use the length method of the iterator to find out: ie.buttons.length ie.tables.length If you're using tables, any nested tables will also be included in the count Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Boyt, Darrel Sent: 18 April 2005 08:04 To: wtr-general at rubyforge.org Subject: [Wtr-general] Counts Please excuse my unfamiliarity with the proper OO terms (I'm an old school programmer), but I would like to be able to find out how many of a certain object (a collection?) are on a page by doing something like "table_count = ie.tables.count()". Is this do-able? It would help me a bit with my testing. Thanks, Darrel Boyt Systems Analyst Anteon Corporation Montgomery, Alabama From paul.rogers at shaw.ca Mon Apr 18 10:45:14 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 18 Apr 2005 08:45:14 -0600 Subject: [Wtr-general] Counts In-Reply-To: <258593F548C79D4AB7CBA2AE72DEBEC854617E@HQ-EXVS02.anteon.com> Message-ID: <003501c54425$3b0b4440$6400a8c0@NewDell> You probably have an out of date version. Grab the latest from cvs. http://rubyforge.org/cgi-bin/viewcvs.cgi/watir/?cvsroot=wtr and click the tarball link I'll do a new release in the next week I think. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Boyt, Darrel Sent: 18 April 2005 08:39 To: wtr-general at rubyforge.org Subject: [Wtr-general] Counts Thanks, Paul. The length method worked for everything except tables. Here's the error message I get: NoMethodError: undefined method `tables' for # from (irb):11 Darrel Boyt Systems Analyst Anteon Corporation Montgomery, Alabama -----Original Message----- Date: Mon, 18 Apr 2005 08:13:58 -0600 From: Paul Rogers Subject: RE: [Wtr-general] Counts To: wtr-general at rubyforge.org Message-ID: <002001c54420$dce5d820$6400a8c0 at NewDell> Content-Type: text/plain; charset="us-ascii" most of the object types have iterators, buttons, text_fields, radios, checkboxes, tables, spans, dvis ( any I forgot?) you can use the length method of the iterator to find out: ie.buttons.length ie.tables.length If you're using tables, any nested tables will also be included in the count Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Boyt, Darrel Sent: 18 April 2005 08:04 To: wtr-general at rubyforge.org Subject: [Wtr-general] Counts Please excuse my unfamiliarity with the proper OO terms (I'm an old school programmer), but I would like to be able to find out how many of a certain object (a collection?) are on a page by doing something like "table_count = ie.tables.count()". Is this do-able? It would help me a bit with my testing. Thanks, Darrel Boyt Systems Analyst Anteon Corporation Montgomery, Alabama _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Mon Apr 18 12:33:12 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 18 Apr 2005 10:33:12 -0600 Subject: [Wtr-general] AutoIt javascript support - window logon In-Reply-To: Message-ID: <003c01c54434$507e4d90$6400a8c0@NewDell> Im getting some unit test failures in jscript_test.rb 1) Error: test_alert_button(TC_JavaScript_Test): Watir::Exception::NoMatchingWindowFoundException: Unable to locate a window with title of Alert Test c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:896:in `attach_browser_window' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:842:in `attach_init' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:835:in `attach' c:/watir_bonus/unitTests/../unittests/jscript_test.rb:15:in `goto_javascript_page' c:/watir_bonus/unitTests/../unittests/jscript_test.rb:25:in `test_alert_button' 2) Error: test_confirm_button_Cancel(TC_JavaScript_Test): Watir::Exception::NoMatchingWindowFoundException: Unable to locate a window with title of Alert Test c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:896:in `attach_browser_window' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:842:in `attach_init' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:835:in `attach' c:/watir_bonus/unitTests/../unittests/jscript_test.rb:15:in `goto_javascript_page' c:/watir_bonus/unitTests/../unittests/jscript_test.rb:55:in `test_confirm_button_Cancel' 3) Error: test_confirm_button_ok(TC_JavaScript_Test): Watir::Exception::NoMatchingWindowFoundException: Unable to locate a window with title of Alert Test c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:896:in `attach_browser_window' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:842:in `attach_init' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:835:in `attach' c:/watir_bonus/unitTests/../unittests/jscript_test.rb:15:in `goto_javascript_page' c:/watir_bonus/unitTests/../unittests/jscript_test.rb:41:in `test_confirm_button_ok' 142 tests, 890 assertions, 0 failures, 3 errors -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Atilla Ozgur Sent: 14 April 2005 12:14 To: wtr-general at rubyforge.org Subject: [Wtr-general] AutoIt javascript support - window logon I created a simple wrapper class for autoit and included it watir directory as WindowHelper. It uses AutoIt Com dll for now. To be able to use it, you have to install autoit. I plan to change its implementation from AutoIt to normal window call functions. But for now, it has a rudimentary support for javascript alert and confirm boxes. Also I included an example for windows integrated login. I was unable to make helper functions work in same file with script file. Therefore every test has a external script file to include. These are named jscriptExtraAlert.rb jscriptExtraConfirmOk.rb jscriptExtraConfirmCancel.rb WindowLogonExtra.rb I included a unittest for alert,confirm boxes. But i did not included unit test for window integrated login since I do not know how to duplicate such a thing without IIS. Therefore example uses http://clio.lyris.com/ for demonstrating you are able to enter name and password to logon screen. I hope they will be useful. Please comment about their functionality. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Mon Apr 18 12:34:16 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 18 Apr 2005 10:34:16 -0600 Subject: [Wtr-general] query on enabled/disabled buttons In-Reply-To: <015001c543ce$98a63300$c402000a@test02> Message-ID: <003d01c54434$764e2c70$6400a8c0@NewDell> Ive just checked in watir.rb and some unit tests that add support for the onKeyDown and onKeyUp events in text fields. You may want to get the latest from cvs and see if this fixes your problem Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Margaret Dineen Sent: 17 April 2005 22:25 To: wtr-general at rubyforge.org Subject: [Wtr-general] query on enabled/disabled buttons Hi, I'm a newbie to Watir but I've been having a lot of fun with it. It's an awesome tool. I'm using the latest version of Watir which I downloaded last week and I'm scripting some tests for a web page which has a number of frames. I've located the frame I need to access and I know the name of the fields within the frame etc. My problem is that if I access the frame manually, the "save" button is initially disabled but it is enabled once text is entered into text fields on the page. If I do it via Watir, the button is disabled. The code I'm using to enter text into the fields is: ie.frame("monitor").text_field(:name,"contactname").set("Joe Bloggs") Apologies if this is a stupid question. Any assistance would be gratefully appreciated. Thanks, Mags -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050418/9e3e4cb4/attachment.html From bret at pettichord.com Mon Apr 18 12:39:50 2005 From: bret at pettichord.com (Bret Pettichord) Date: Mon, 18 Apr 2005 11:39:50 -0500 Subject: [Wtr-general] Fwd: IeUnit 2.0 released Message-ID: <5.1.0.14.2.20050418113809.039744a8@127.0.0.1> Note the following in the recent release of IE Unit: > * Integrated Win32Dom into the default installation. Win32Dom > is a COM object that allows IeUnit test script to access > normal desktop windows. Win32Dom is needed to handle various > types of popup windows. The source code of Win32Dom is open > sourced under the same license as IeUnit. Is this something we could use or learn from? Complete release notes: >From: "James X. Li" >Subject: IeUnit 2.0 released >Date: Sat, 14 May 2005 19:33:24 -0600 > >I am pleased to announce the release of the web testing >framework IeUnit version 2.0. > >IeUnit is an open source implementation of the xUnit test >framework in JavaScript for the Windows and Internet Explorer >platform. IeUnit helps people to create, organize and execute >functional tests for web based applications. People with >basic knowledge about JavaScript and HTML can install IeUnit >and start coding test cases within minutes. > >The major changes in this release are: > > * Added many new functions and methods. > > * Many existing methods have been made polymorphic, > so that they accept id, name, index or regular expression > in their arguments. > > * Test script can now be both in ASCII or Unicode. > > * Integrated Win32Dom into the default installation. Win32Dom > is a COM object that allows IeUnit test script to access > normal desktop windows. Win32Dom is needed to handle various > types of popup windows. The source code of Win32Dom is open > sourced under the same license as IeUnit. > > * Since Win32Dom is developed in C#, IeUnit installation > package now requires the Microsoft .NET 1.1 runtime system. > > * Added QuickFocus as a third-party GUI tool. QuickFocus > helps users to inspect HTML pages and create IeUnit scripts. > QuickFocus is donated by VisuMap Technologies Inc. > > * This release is not compatible with the previous release. > Old scripts need some minor re-work to run under the new > release. Those re-work is most likely just renaming some > methods, e.g. from assertHasText to assertPageHasText, or > from setBox() to setCheckBox(). Please see to the release > notes for more details. > > >IeUnit 2.0 install program can be downloaded from: > > http://www.visumap.net/index.aspx?p=Resources&q=WebTesting > >The source code as well as the install program can be found at: > > http://sourceforge.net/project/showfiles.php?group_id=63823 > >Documentation is available at: > > http://ieunit.sourceforge.net/. > >Feedback, suggestions and comments are highly welcome and appreciated. > > >Kind regards, > >James X. Li >VisuMap Technologies Inc. _____________________ Bret Pettichord www.pettichord.com From jkohl at telusplanet.net Mon Apr 18 12:47:31 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Mon, 18 Apr 2005 09:47:31 -0700 Subject: [Wtr-general] assertions when an array is returned In-Reply-To: <003d01c54434$764e2c70$6400a8c0@NewDell> References: <003d01c54434$764e2c70$6400a8c0@NewDell> Message-ID: <1113842851.4263e4a3eec7f@webmail.telusplanet.net> Paul; I asked you this already, but forgot. What sort of thing should I do to do an assertion like this? result = I already ran the tests!" assert(result, change_xml_element(output, tag)) I get this: Test::Unit::AssertionFailedError: <"I already ran the tests!"> expected but was <["I already ran the tests!"]>. the result is an array that is returned, but I only want to do an assertion on one element of the array at a time. Thanks; -Jonathan From paul.rogers at shaw.ca Mon Apr 18 12:56:25 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 18 Apr 2005 10:56:25 -0600 Subject: [Wtr-general] assertions when an array is returned In-Reply-To: <1113842851.4263e4a3eec7f@webmail.telusplanet.net> Message-ID: <004c01c54437$930f9850$6400a8c0@NewDell> assert(result, change_xml_element(output, tag)[0] ) Will get the first element from the array Maybe this is what you really need to do: elements = change_xml_element(output, tag) elements.each do |e| assert_equal(what_it_should_be , e) end Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of jkohl at telusplanet.net Sent: 18 April 2005 10:48 To: wtr-general at rubyforge.org Subject: [Wtr-general] assertions when an array is returned Paul; I asked you this already, but forgot. What sort of thing should I do to do an assertion like this? result = I already ran the tests!" assert(result, change_xml_element(output, tag)) I get this: Test::Unit::AssertionFailedError: <"I already ran the tests!"> expected but was <["I already ran the tests!"]>. the result is an array that is returned, but I only want to do an assertion on one element of the array at a time. Thanks; -Jonathan _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Mon Apr 18 14:08:20 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Mon, 18 Apr 2005 11:08:20 -0700 Subject: [Wtr-general] assertions when an array is returned In-Reply-To: <004c01c54437$930f9850$6400a8c0@NewDell> References: <004c01c54437$930f9850$6400a8c0@NewDell> Message-ID: <1113847700.4263f794e0395@webmail.telusplanet.net> Thanks. This is what I was forgetting: assert(result, change_xml_element(output, tag)[0] ) Quoting Paul Rogers : > > assert(result, change_xml_element(output, tag)[0] ) > > Will get the first element from the array > > Maybe this is what you really need to do: > > elements = change_xml_element(output, tag) > elements.each do |e| > assert_equal(what_it_should_be , e) > end > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of > jkohl at telusplanet.net > Sent: 18 April 2005 10:48 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] assertions when an array is returned > > > Paul; > > I asked you this already, but forgot. What sort of thing should I do to > do an > assertion like this? > result = I already ran the tests!" > > assert(result, change_xml_element(output, tag)) > > I get this: > Test::Unit::AssertionFailedError: <"I already ran the tests!"> expected > but was <["I already ran the tests!"]>. > > the result is an array that is returned, but I only want to do an > assertion on > one element of the array at a time. > > Thanks; > > -Jonathan > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Mon Apr 18 15:53:19 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 18 Apr 2005 13:53:19 -0600 Subject: [Wtr-general] AutoIt javascript support - window logon In-Reply-To: <003c01c54434$507e4d90$6400a8c0@NewDell> Message-ID: <005a01c54450$453dd600$6400a8c0@NewDell> Ive fixed the errors and checked in Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: 18 April 2005 10:33 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] AutoIt javascript support - window logon Im getting some unit test failures in jscript_test.rb 1) Error: test_alert_button(TC_JavaScript_Test): Watir::Exception::NoMatchingWindowFoundException: Unable to locate a window with title of Alert Test c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:896:in `attach_browser_window' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:842:in `attach_init' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:835:in `attach' c:/watir_bonus/unitTests/../unittests/jscript_test.rb:15:in `goto_javascript_page' c:/watir_bonus/unitTests/../unittests/jscript_test.rb:25:in `test_alert_button' 2) Error: test_confirm_button_Cancel(TC_JavaScript_Test): Watir::Exception::NoMatchingWindowFoundException: Unable to locate a window with title of Alert Test c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:896:in `attach_browser_window' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:842:in `attach_init' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:835:in `attach' c:/watir_bonus/unitTests/../unittests/jscript_test.rb:15:in `goto_javascript_page' c:/watir_bonus/unitTests/../unittests/jscript_test.rb:55:in `test_confirm_button_Cancel' 3) Error: test_confirm_button_ok(TC_JavaScript_Test): Watir::Exception::NoMatchingWindowFoundException: Unable to locate a window with title of Alert Test c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:896:in `attach_browser_window' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:842:in `attach_init' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:835:in `attach' c:/watir_bonus/unitTests/../unittests/jscript_test.rb:15:in `goto_javascript_page' c:/watir_bonus/unitTests/../unittests/jscript_test.rb:41:in `test_confirm_button_ok' 142 tests, 890 assertions, 0 failures, 3 errors -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Atilla Ozgur Sent: 14 April 2005 12:14 To: wtr-general at rubyforge.org Subject: [Wtr-general] AutoIt javascript support - window logon I created a simple wrapper class for autoit and included it watir directory as WindowHelper. It uses AutoIt Com dll for now. To be able to use it, you have to install autoit. I plan to change its implementation from AutoIt to normal window call functions. But for now, it has a rudimentary support for javascript alert and confirm boxes. Also I included an example for windows integrated login. I was unable to make helper functions work in same file with script file. Therefore every test has a external script file to include. These are named jscriptExtraAlert.rb jscriptExtraConfirmOk.rb jscriptExtraConfirmCancel.rb WindowLogonExtra.rb I included a unittest for alert,confirm boxes. But i did not included unit test for window integrated login since I do not know how to duplicate such a thing without IIS. Therefore example uses http://clio.lyris.com/ for demonstrating you are able to enter name and password to logon screen. I hope they will be useful. Please comment about their functionality. _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From margaret at holly.com.au Tue Apr 19 00:42:59 2005 From: margaret at holly.com.au (Margaret Dineen) Date: Tue, 19 Apr 2005 14:42:59 +1000 Subject: [Wtr-general] query on enabled/disabled buttons References: <20050418101518.ZHDR16179.priv-edtnes28.telusplanet.net@tintin> Message-ID: <00b901c5449a$46128b80$c402000a@test02> JavaScript was used. Thank you - it's now working a treat. Mags ----- Original Message ----- From: Jonathan Kohl To: wtr-general at rubyforge.org Sent: Monday, April 18, 2005 8:15 PM Subject: RE: [Wtr-general] query on enabled/disabled buttons Is the button enabled using JavaScript? If so, try the fire_event method to activate it. You'll need to view the source of the page in that particular frame to see if it is activated by JavaScript. If the button is enabled by an onKeyUp or onKeyPress event or something like that, you can add that after the set like this: ie.frame("monitor").text_field(:name,"contactname").fire_event("onKeyUp") or whatever the JS event that activates the button is. -Jonathan ------------------------------------------------------------------------------ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Margaret Dineen Sent: April 17, 2005 10:25 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] query on enabled/disabled buttons Hi, I'm a newbie to Watir but I've been having a lot of fun with it. It's an awesome tool. I'm using the latest version of Watir which I downloaded last week and I'm scripting some tests for a web page which has a number of frames. I've located the frame I need to access and I know the name of the fields within the frame etc. My problem is that if I access the frame manually, the "save" button is initially disabled but it is enabled once text is entered into text fields on the page. If I do it via Watir, the button is disabled. The code I'm using to enter text into the fields is: ie.frame("monitor").text_field(:name,"contactname").set("Joe Bloggs") Apologies if this is a stupid question. Any assistance would be gratefully appreciated. Thanks, Mags ------------------------------------------------------------------------------ _______________________________________________ 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/20050419/443478c2/attachment.html From jkohl at telusplanet.net Tue Apr 19 00:41:56 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Mon, 18 Apr 2005 22:41:56 -0600 Subject: [Wtr-general] query on enabled/disabled buttons In-Reply-To: <00b901c5449a$46128b80$c402000a@test02> Message-ID: <20050419044145.VJDI6174.priv-edtnes40.telusplanet.net@tintin> Glad that helped. I should add more info on the fire_event method to the docs. -Jonathan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Margaret Dineen Sent: April 18, 2005 10:43 PM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] query on enabled/disabled buttons JavaScript was used. Thank you - it's now working a treat. Mags ----- Original Message ----- From: Jonathan Kohl To: wtr-general at rubyforge.org Sent: Monday, April 18, 2005 8:15 PM Subject: RE: [Wtr-general] query on enabled/disabled buttons Is the button enabled using JavaScript? If so, try the fire_event method to activate it. You'll need to view the source of the page in that particular frame to see if it is activated by JavaScript. If the button is enabled by an onKeyUp or onKeyPress event or something like that, you can add that after the set like this: ie.frame("monitor").text_field(:name,"contactname").fire_event("onKeyUp") or whatever the JS event that activates the button is. -Jonathan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Margaret Dineen Sent: April 17, 2005 10:25 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] query on enabled/disabled buttons Hi, I'm a newbie to Watir but I've been having a lot of fun with it. It's an awesome tool. I'm using the latest version of Watir which I downloaded last week and I'm scripting some tests for a web page which has a number of frames. I've located the frame I need to access and I know the name of the fields within the frame etc. My problem is that if I access the frame manually, the "save" button is initially disabled but it is enabled once text is entered into text fields on the page. If I do it via Watir, the button is disabled. The code I'm using to enter text into the fields is: ie.frame("monitor").text_field(:name,"contactname").set("Joe Bloggs") Apologies if this is a stupid question. Any assistance would be gratefully appreciated. Thanks, Mags _____ _______________________________________________ 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/20050418/bd823ff2/attachment.html From paul.rogers at shaw.ca Tue Apr 19 10:27:14 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 19 Apr 2005 08:27:14 -0600 Subject: [Wtr-general] query on enabled/disabled buttons In-Reply-To: <00b901c5449a$46128b80$c402000a@test02> Message-ID: <003c01c544eb$e1cd2b10$6400a8c0@NewDell> Ive added this functionality into the set method in watir. If you get time can you get the latest from cvs and see if it fixes your problem Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Margaret Dineen Sent: 18 April 2005 22:43 To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] query on enabled/disabled buttons JavaScript was used. Thank you - it's now working a treat. Mags ----- Original Message ----- From: Jonathan Kohl To: wtr-general at rubyforge.org Sent: Monday, April 18, 2005 8:15 PM Subject: RE: [Wtr-general] query on enabled/disabled buttons Is the button enabled using JavaScript? If so, try the fire_event method to activate it. You'll need to view the source of the page in that particular frame to see if it is activated by JavaScript. If the button is enabled by an onKeyUp or onKeyPress event or something like that, you can add that after the set like this: ie.frame("monitor").text_field(:name,"contactname").fire_event("onKeyUp" ) or whatever the JS event that activates the button is. -Jonathan _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Margaret Dineen Sent: April 17, 2005 10:25 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] query on enabled/disabled buttons Hi, I'm a newbie to Watir but I've been having a lot of fun with it. It's an awesome tool. I'm using the latest version of Watir which I downloaded last week and I'm scripting some tests for a web page which has a number of frames. I've located the frame I need to access and I know the name of the fields within the frame etc. My problem is that if I access the frame manually, the "save" button is initially disabled but it is enabled once text is entered into text fields on the page. If I do it via Watir, the button is disabled. The code I'm using to enter text into the fields is: ie.frame("monitor").text_field(:name,"contactname").set("Joe Bloggs") Apologies if this is a stupid question. Any assistance would be gratefully appreciated. Thanks, Mags _____ _______________________________________________ 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/20050419/c7f03e1c/attachment.html From sgtn2000 at gmail.com Tue Apr 19 11:35:13 2005 From: sgtn2000 at gmail.com (Sean Gallagher) Date: Tue, 19 Apr 2005 08:35:13 -0700 Subject: [Wtr-general] RubyConf 2005 in San Diego, Oct 14-16 Message-ID: <7f8ae47d05041908354b4e20cb@mail.gmail.com> I was wondering if anyone is planning to present Watir at RubyConf 2005 in San Diego? Thanks. -Sean From andy__s at hotmail.com Tue Apr 19 22:24:43 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Tue, 19 Apr 2005 22:24:43 -0400 Subject: [Wtr-general] image support Message-ID: I took a stab at the image support and I"ve got it pretty much working as expected. There are a couple of caveats: 1) html pages that are viewed local (file:///) don't get their images put into the cache. I detect if the src is local and just copy from the real file location. In this case the image is not coming from the cache but from the raw src location. 2) I tried several approaches to working with the IE file cache, The way the items are stored by IE is unique to say the least... In the end I settled on just searching all the cache items directly and looking for possible matches based on name and then selecting the most recent version based on time. In all the cases I tried this gave me the correct image. Since pages that are viewed from the local drive do not get their elements cached, I've been using a local web server to test the cache searching stuff. I'd like to have the tests just start up an instance of webbrick and point it to the html directory to validate that the cache searching works as expected --- what are the thoughts on putting this into the tests? -andy ----Original Message Follows---- From: Paul Rogers <paul.rogers at shaw.ca> Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] image support Date: Sat, 16 Apr 2005 16:58:07 -0600 Jonathan suggested that just a few weeks ago. I put it in the tracker so I wouldn't forget it. In fact I may have a need for it soon. Why don't you give it a go? Paul From paul.rogers at shaw.ca Tue Apr 19 22:40:00 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 19 Apr 2005 20:40:00 -0600 Subject: [Wtr-general] image support In-Reply-To: Message-ID: <009b01c54552$3fac2bd0$6400a8c0@NewDell> The unit tests for watir/simple also use webrick. Id like to keep the unit tests as simple as possible. In this case it seems like a good idea to have webrick run, its part of the standard library and I think it uses port 3000 ( or maybe that's just rails) by default, so shouldnt interfere with any thing else. I say check it in, and see if any one complains ;-) Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: 19 April 2005 20:25 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] image support I took a stab at the image support and I"ve got it pretty much working as expected. There are a couple of caveats: 1) html pages that are viewed local (file:///) don't get their images put into the cache. I detect if the src is local and just copy from the real file location. In this case the image is not coming from the cache but from the raw src location. 2) I tried several approaches to working with the IE file cache, The way the items are stored by IE is unique to say the least... In the end I settled on just searching all the cache items directly and looking for possible matches based on name and then selecting the most recent version based on time. In all the cases I tried this gave me the correct image. Since pages that are viewed from the local drive do not get their elements cached, I've been using a local web server to test the cache searching stuff. I'd like to have the tests just start up an instance of webbrick and point it to the html directory to validate that the cache searching works as expected --- what are the thoughts on putting this into the tests? -andy ----Original Message Follows---- From: Paul Rogers <paul.rogers at shaw.ca> Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] image support Date: Sat, 16 Apr 2005 16:58:07 -0600 Jonathan suggested that just a few weeks ago. I put it in the tracker so I wouldn't forget it. In fact I may have a need for it soon. Why don't you give it a go? Paul _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Jamuna.Nithyanandam at honeywell.com Wed Apr 20 03:35:20 2005 From: Jamuna.Nithyanandam at honeywell.com (Jamuna, Nithyanandam (IE10)) Date: Wed, 20 Apr 2005 00:35:20 -0700 Subject: [Wtr-general] View Source from IE Window Message-ID: <77ED2BF75D59D1439F90412CC5B109741CA2F85D@ie10-sahara.hiso.honeywell.com> Hi All, I have just started using WATIR for automating my web application. Please let me know if there is a way to View Source of the current IE browser window ? Sorry if it is a very basic question. Regards, Jamuna -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050420/d2d564f2/attachment.html From zeljko.filipin at gmail.com Wed Apr 20 03:48:23 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Wed, 20 Apr 2005 09:48:23 +0200 Subject: [Wtr-general] View Source from IE Window In-Reply-To: <77ED2BF75D59D1439F90412CC5B109741CA2F85D@ie10-sahara.hiso.honeywell.com> Message-ID: <42660927.2477c406.3b91.ffffaa0c@mx.gmail.com> This will do the job (I tried it in irb). require 'watir' include Watir ie = Watir::IE.new ie.goto( 'http://...' ) ie.html Zeljko _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Jamuna, Nithyanandam (IE10) Sent: Wednesday, April 20, 2005 9:35 AM To: wtr-general at rubyforge.org Subject: [Wtr-general] View Source from IE Window Hi All, I have just started using WATIR for automating my web application. Please let me know if there is a way to View Source of the current IE browser window ? Sorry if it is a very basic question. Regards, Jamuna -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050420/9018d313/attachment.html From aashishharsh at yahoo.com Wed Apr 20 08:53:53 2005 From: aashishharsh at yahoo.com (ashish harsh) Date: Wed, 20 Apr 2005 05:53:53 -0700 (PDT) Subject: [Wtr-general] Thanks All In-Reply-To: <200504200742.j3K7gBdT010415@rubyforge.org> Message-ID: <20050420125353.67259.qmail@web54006.mail.yahoo.com> Hi Paul, Sorry for responding late but Thanks for your prompt support,my problem is solved by your suggestion and by reading solutions for other problems. Regds Aashish Kumar Harsh __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050420/b9eed26d/attachment.html From christopher.mcmahon at gmail.com Wed Apr 20 09:13:36 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 20 Apr 2005 08:13:36 -0500 Subject: [Wtr-general] syntax help? ONCLICK in
in a ONCLICK = "foo" ONCLICK = "bar" ONCLICK = "baz" we wanted to address the ONCLICK events by index, but ran out of time. Also, I haven't worked with tables and divs much, so my normal cutting-edge development technique ("flail until it works") would have taken too much time. Thus the question: could you suggest the syntax to fire an ONCLICK inside a inside a in a in a ONCLICK = "foo" ONCLICK = "bar" ONCLICK = "baz" we wanted to address the ONCLICK events by index, but ran out of time. Also, I haven't worked with tables and divs much, so my normal cutting-edge development technique ("flail until it works") would have taken too much time. Thus the question: could you suggest the syntax to fire an ONCLICK inside a inside a which of course means it is also in a table. I've reviewed some of the discussions regarding javascript, but have not found anything in there to work. I don't expect the solution to be pretty since it appears that clicking this link involves calling some javascript contained in a class contained in a table contained in a page contained in a frame. So obviously the code is not going to be as simple as: $ie.frame("main").link(:text, "Account Attribute Groups").click #this did not work. I hope I'm not in over my head already as I would really like to show our company how automation testing can actually work with our application. Mercury's Quicktest flopped miserably, so everyone here is very skeptical towards automation. Any advice you can offer would be greatly appreciated. Thanks, Tom Feodoroff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050427/c206b318/attachment.html From christopher.mcmahon at gmail.com Wed Apr 27 18:15:28 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Wed, 27 Apr 2005 17:15:28 -0500 Subject: [Wtr-general] click link in class/table/page/frame In-Reply-To: References: Message-ID: <72799cd7050427151544b57f78@mail.gmail.com> Hi Tom... I have a couple of suggestions, let me know if they do anything useful > > which of course means it is also in a table. I've reviewed some of the > discussions regarding javascript, but have not found anything in there to > work. I don't expect the solution to be pretty since it appears that > clicking this link involves calling some javascript contained in a class > contained in a table contained in a page contained in a frame. So obviously > the code is not going to be as simple as: > > $ie.frame("main").link(:text, "Account Attribute Groups").click #this did > not work. > Nice job figuring out the frames part! See if you can click it by index (this assumes your problem link is the first link in the page): ie.frame("main").link(:index,1).click If that doesn't do it, try ie.frame("main").table(:index,1)[1][1].click to click the first row, first column in the first table. Alternatively, instead of "click" in the examples above, try the "fireEvent" method, like ie.(blahblah).fireEvent("onClick") Hope that helps. -Chris I hope I'm not in over my head already as I would really like to show our > company how automation testing can actually work with our application. > Mercury's Quicktest flopped miserably, so everyone here is very skeptical > towards automation. Any advice you can offer would be greatly appreciated. > I'd also be interested in anything you could tell us about the how/why/when/where of the QuickTest failure. Thanks, > > Tom Feodoroff > > > _______________________________________________ > 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/20050427/2e2c7b9f/attachment.html From paul.rogers at shaw.ca Wed Apr 27 22:09:39 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 27 Apr 2005 20:09:39 -0600 Subject: [Wtr-general] click link in class/table/page/frame In-Reply-To: Message-ID: <009c01c54b97$55b9c4f0$afd29044@NewDell> What version are you using? use puts IE::REVISION and puts IE::VERSION to find out Have you tried a regular expression in steaad of the actual string: $ie.frame("main").link(:text, /Account/).click The fact its in a table shouldnt be a problem, and the fact it fires some javasscript shouldnt be a problem either You can use ie.show_links which should show all the links on the page also give the suggetions that Chris posted a go too Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tom Sent: 27 April 2005 15:42 To: wtr-general at rubyforge.org Subject: [Wtr-general] click link in class/table/page/frame I just started using WATIR...today...about 3 hours ago. In less than 5 minutes I was able to write a script to log in to our application. Sweet. But that's as far as I've been able to get. Our application contains 3 frames. I want to use the frame named 'main' which contains three pages. I just want to click a link, but the code on the page for the link I want to click is: which of course means it is also in a table. I've reviewed some of the discussions regarding javascript, but have not found anything in there to work. I don't expect the solution to be pretty since it appears that clicking this link involves calling some javascript contained in a class contained in a table contained in a page contained in a frame. So obviously the code is not going to be as simple as: $ie.frame("main").link(:text, "Account Attribute Groups").click #this did not work. I hope I'm not in over my head already as I would really like to show our company how automation testing can actually work with our application. Mercury's Quicktest flopped miserably, so everyone here is very skeptical towards automation. Any advice you can offer would be greatly appreciated. Thanks, Tom Feodoroff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050427/b177aeff/attachment.html From paul.rogers at shaw.ca Wed Apr 27 22:11:01 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 27 Apr 2005 20:11:01 -0600 Subject: [Wtr-general] Runtime Error Warning message In-Reply-To: <9C0BD1E3DAF1204D842D72E2DCE2A04E154F0F@EX5V.rl.gov> Message-ID: <00a101c54b97$86822c30$afd29044@NewDell> Some sort of OLE exception occurred. This is in the rescue clause of a really big block. You can look in watir.rb for the text 'runtime error in wait' and uncomment the exception message. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark Sent: 27 April 2005 15:40 To: wtr-general at rubyforge.org Subject: [Wtr-general] Runtime Error Warning message Has anyone seen this message before? W, [27-Apr-2005 14:06:27#1728] WARN -- : runtime error in wait W, [27-Apr-2005 14:07:48#1728] WARN -- : runtime error in wait Do you know the cause? Thanks, ____________________ Mark L. Cain LMIT - E*STARSR ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99352 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050427/54394989/attachment.html From paul.rogers at shaw.ca Wed Apr 27 22:14:31 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 27 Apr 2005 20:14:31 -0600 Subject: [Wtr-general] click link in class/table/page/frame In-Reply-To: <009c01c54b97$55b9c4f0$afd29044@NewDell> Message-ID: <00ac01c54b98$03a19340$afd29044@NewDell> oops, ie.frame("main").show_links -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: 27 April 2005 20:10 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] click link in class/table/page/frame What version are you using? use puts IE::REVISION and puts IE::VERSION to find out Have you tried a regular expression in steaad of the actual string: $ie.frame("main").link(:text, /Account/).click The fact its in a table shouldnt be a problem, and the fact it fires some javasscript shouldnt be a problem either You can use ie.show_links which should show all the links on the page also give the suggetions that Chris posted a go too Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tom Sent: 27 April 2005 15:42 To: wtr-general at rubyforge.org Subject: [Wtr-general] click link in class/table/page/frame I just started using WATIR...today...about 3 hours ago. In less than 5 minutes I was able to write a script to log in to our application. Sweet. But that's as far as I've been able to get. Our application contains 3 frames. I want to use the frame named 'main' which contains three pages. I just want to click a link, but the code on the page for the link I want to click is: which of course means it is also in a table. I've reviewed some of the discussions regarding javascript, but have not found anything in there to work. I don't expect the solution to be pretty since it appears that clicking this link involves calling some javascript contained in a class contained in a table contained in a page contained in a frame. So obviously the code is not going to be as simple as: $ie.frame("main").link(:text, "Account Attribute Groups").click #this did not work. I hope I'm not in over my head already as I would really like to show our company how automation testing can actually work with our application. Mercury's Quicktest flopped miserably, so everyone here is very skeptical towards automation. Any advice you can offer would be greatly appreciated. Thanks, Tom Feodoroff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050427/5bc8c86c/attachment.html From shaorobics at gmail.com Wed Apr 27 22:30:20 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Wed, 27 Apr 2005 22:30:20 -0400 Subject: [Wtr-general] new window Message-ID: <593b9ae805042719307578dc29@mail.gmail.com> You can use a different ie variable: new_window = IE.attach(:title, "") Not sure if it will match against an empty string though..... You can click images in the same way as other objects: ie.image(:src, 'my_pic.gif').click Or ie.image(:index, 1).click Paul ************************************************************************ Hi Paul, I've another WATIR question. I'm testing a site that has a new window popping up instead of a dialog box. A window with actual html code. However, this new window has no title. Is it still possible to do: $ie = IE.attach(:title, "") ?? I'm also assuming that this call should be made in a new process... Also the "OK" button is an image in this new window but it's coded like this: not possible to click on this button since there is no name or id property for this? Thanks Shao From alex at verk.info Wed Apr 27 22:47:38 2005 From: alex at verk.info (Alexey Verkhovsky) Date: Wed, 27 Apr 2005 22:47:38 -0400 Subject: [Wtr-general] Starting and stopping the server under test Message-ID: Can anyone share code to start and stop the server under test before/after running the tests? At the moment, I do it with 'win32/process' library, but this includes some native C code, and that's a bit of an unwanted hassle. I think, it must be doable in pure Ruby with Win32API module. And, generally speaking, is there any "larger than a toy example" test suite written with Watir available for viewing anywhere? I'm going to try and write something like this for Instiki (it's a wiki clone which is ridiculously easy to install and use, see http://instiki.org for details). It would be nice to see what practical problems people have to solve in reallife Watir test suites, and how they solve those problems. -- Best regards, Alexey Verkhovsky Ruby Forum: http://ruby-forum.org (moderator) RForum: http://rforum.andreas-s.net (co-author) Instiki: http://instiki.org (maintainer) From jkohl at telusplanet.net Wed Apr 27 23:00:49 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Wed, 27 Apr 2005 21:00:49 -0600 Subject: [Wtr-general] Starting and stopping the server under test In-Reply-To: Message-ID: <20050428025959.EBYT175.priv-edtnes40.telusplanet.net@tintin> > Can anyone share code to start and stop the server under test > before/after running the tests? Are you stopping the application server? >At the moment, I do it with > 'win32/process' library, but this includes some native C code, and > that's a bit of an unwanted hassle. I think, it must be doable in pure > Ruby with Win32API module. > > And, generally speaking, is there any "larger than a toy example" test > suite written with Watir available for viewing anywhere? Not yet. Sorry, only toy examples for now. :-) We'd like to have something more comprehensive, but we need to find (or write) a web app that we can test against that is under our control. One day we hope to have an app hosted with a more complete Watir demo to go along with it. > I'm going to try and write something like this for Instiki (it's a wiki > clone which is ridiculously easy to install and use, see > http://instiki.org for details). It would be nice to see what practical > problems people have to solve in reallife Watir test suites, and how > they solve those problems. I agree. If anyone is willing to share, we all welcome experience reports. -Jonathan > > -- > Best regards, > > Alexey Verkhovsky > > Ruby Forum: http://ruby-forum.org (moderator) > RForum: http://rforum.andreas-s.net (co-author) > Instiki: http://instiki.org (maintainer) > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From alex at verk.info Wed Apr 27 23:15:10 2005 From: alex at verk.info (Alexey Verkhovsky) Date: Wed, 27 Apr 2005 23:15:10 -0400 Subject: [Wtr-general] Starting and stopping the server under test In-Reply-To: <20050428025959.EBYT175.priv-edtnes40.telusplanet.net@tintin> References: <20050428025959.EBYT175.priv-edtnes40.telusplanet.net@tintin> Message-ID: Jonathan Kohl wrote: >Are you stopping the application server? > > Ahem... if we can call it the application server, yes. In fact, it is Webrick (Ruby built-in HTTP server), and it takes under 3 seconds to restart. >We'd like to have something more comprehensive, but we need to find (or >write) a web app that we can test against that is under our control. > May I suggest that you have a look at Instiki as a possible candidate for such an app? It is pure Ruby, ridiculously easy to setup (literally, "download, unzip, run"), starts in three seconds and is fairly widely used - there must be at least a thousand installations out in the wild, maybe more. Like I said, I'm going to write a Watir suite for it anyway. -- Best regards, Alexey Verkhovsky Ruby Forum: http://ruby-forum.org (moderator) RForum: http://rforum.andreas-s.net (co-author) Instiki: http://instiki.org (maintainer) From jkohl at telusplanet.net Wed Apr 27 23:22:41 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Wed, 27 Apr 2005 21:22:41 -0600 Subject: [Wtr-general] Starting and stopping the server under test In-Reply-To: Message-ID: <20050428032150.MHZA29160.priv-edtnes27.telusplanet.net@tintin> > >Are you stopping the application server? > Ahem... if we can call it the application server, yes. In fact, it is > Webrick (Ruby built-in HTTP server), and it takes under 3 seconds to > restart. I see what you mean. :) Thanks for the clarification. I haven't tried this myself. Usually I start the server manually and leave it up and running. Another reader might have more experience with this. > >We'd like to have something more comprehensive, but we need to find (or > >write) a web app that we can test against that is under our control. > > > May I suggest that you have a look at Instiki as a possible candidate > for such an app? It is pure Ruby, ridiculously easy to setup (literally, > "download, unzip, run"), starts in three seconds and is fairly widely > used - there must be at least a thousand installations out in the wild, > maybe more. Like I said, I'm going to write a Watir suite for it anyway. Sounds like a good candidate. Using something like that would leave us only with the issue of finding space to host an application. Using Google, Yahoo et al is fine for small scripts, but then you are subject to the changes they make, and their designs. Thanks for the suggestion. -Jonathan From paul.rogers at shaw.ca Wed Apr 27 23:43:45 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 27 Apr 2005 21:43:45 -0600 Subject: [Wtr-general] Screen capture Message-ID: <00c501c54ba4$7afc4500$afd29044@NewDell> The nice folks over on the Win32Utils group were kind enough to write some code to do screen captures for us. Watir can now take a copy of the screen ( or active window) and save it to a jpg or a bmp file Usage: # this method saves the current window or whole screen as either a bitmap or a jpeg # It uses paint to save the file, so will barf if a duplicate filename is selected, or the path doesnt exist etc # * filename - string - the name of the file to save. If its not fully qualified the current directory is used # * active_window - boolean - if true, the whole screen is captured, if false, just the active window is captured # * save_as_bmp - boolean - if true saves the file as a bitmap, saves it as a jpeg otherwise def screen_capture(filename , active_window_only=false, save_as_bmp=false) ie.screen_capture('c:\\pics\\screen_1.jpg) # does a copy of the whole screen ie.screen_capture('c:\\pics\\screen_1.jpg) # does a copy of the whole screen ie.screen_capture('c:\\pics\\screen_1.jpg , true ) # does a copy of the active window ie.screen_capture('c:\\pics\\screen_1.bmp , tue , true ) # does a copy of the whole screen , saves as a bmp Paul From kamachandra at gmail.com Wed Apr 27 23:57:18 2005 From: kamachandra at gmail.com (KamaChandra LN) Date: Thu, 28 Apr 2005 09:27:18 +0530 Subject: [Wtr-general] How to handle windows created by showModalDialog and showModelessDialog methods. Message-ID: Hello All, I would like to know the event triggered by showModalDialog and showModelessDialog methods, How to handle those windows created by above methods in WATIR. Regards, KamaChandra From bret at pettichord.com Thu Apr 28 00:03:26 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 27 Apr 2005 23:03:26 -0500 Subject: [Wtr-general] dynamic Watir In-Reply-To: Message-ID: <5.1.0.14.2.20050427225329.038d5ce0@127.0.0.1> So do your dy methods use :id or :text to name objects? Your example has both. Instead of making dy an attribute of ie, i'd suggest making it a separate wrapper class. dy = Watir::DY.new(ie) dy.startdate.set("10/11/2003") I think that's slightly more compact. In general we are overloading the IE object, so i'm generally encouraging that we create collaborating objects instead of adding more attributes and methods to IE. This is a good idea. Not a new one, as Chris said, but a good thing to put back into Watir. I also like the idea of putting this in a separate file and a separate require. At least for now. Bret At 09:23 PM 4/25/2005, Andy Sipe wrote: >I've been playing with something in Watir and wondered if there was any >interest in it. > >Normally you'd say something like: > >$ie.text(:id, "startdate").set("10/11/2003") >$ie.text(:id, "enddate").set("10/11/2004") >$ie.button(:text, "Show Report").click > >An alternative would be: > >$ie.dy.startdate.set("10/11/2003") >$ie.dy.enddate.set("10/11/2004") >$ie.dy.show_report.click > >name isn't the greatest> > >It works for anything that has an Iterators implementation exposed by >Watir::IE and works reasonably well for the basic lookup mechanisms. I >find it works best on projects that can define the naming of the various >elements up front. It isn't as flexible as the default look up >mechanisms and wouldn't be a replacement for them, but it might be a bit >easier on the learning curve. > >If there is some interest then I'll make it available. > >Thanks -andy > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Apr 28 00:14:18 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 27 Apr 2005 23:14:18 -0500 Subject: [Wtr-general] dynamic Watir In-Reply-To: <426DAED4.70401@clabs.org> References: Message-ID: <5.1.0.14.2.20050427230427.0392eeb8@127.0.0.1> At 10:00 PM 4/25/2005, Chris Morris wrote: This format seems closer to some of my original code in the clIEController. Here's the watir Google example: > require 'watir' # the watir controller > include Watir > testSite = 'http://www.google.com' > $ie = IE.new > $ie.goto(testSite) > $ie.text_field(:name, "q").set("pickaxe") > $ie.button(:name, "btnG").click > > >Same example with clIEController: > > opts = { :visible => true, :auto_wrap_form => true } > @iec = ClIEController.new(opts) > @iec.navigate 'http://www.google.com' > @iec.form.q = 'web testing ruby' > @iec.submit # or maybe something like @iec.form.btnG.click IIRC it was: @iec.q = 'web testing ruby' @iec.btnG.click >The second takes advantage of the method_missing stuffs built-in to Ruby >objects, so you don't have to predefine the methods. > >IIRC, the current WATIR syntax approach was used because the fellas felt >it'd be easier for the target audience to grok. Actually the main reason was that the target audience was testers who didn't control the app, so assuming that all controls were named would not fly with them. It is a great idea to have a varient of Watir optomized for when this is true, because smart developers will do this to make testing easier. Another problem we saw when teaching Chris's controller was that the simple syntax wouldn't work if your name had an embedded hyphen or if it conflicted with a method name for @iec. This wasn't uncommon. This is why i like Andy's separation of the IE object from the thing with the method-missing magic. (although i suspect it still won't work for embedded hyphens.) Andy, you should definitely take a look at what Chris did it. It is very similar. Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Apr 28 00:15:23 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 27 Apr 2005 23:15:23 -0500 Subject: [Wtr-general] dynamic Watir In-Reply-To: <426E38DD.7040108@clabs.org> References: Message-ID: <5.1.0.14.2.20050427231507.038435b0@127.0.0.1> At 07:49 AM 4/26/2005, Chris Morris wrote: >Personally, I'd love to see both syntaxes supported. When I was still >active in the project, there was some talk of having a shared core lib and >then support for both at a higher level. Unfortunately, my work world has >left doing any web dev since I started the tiny seed, so I haven't been >able to contribute. But I think there's room for someone like yourself to >jump in and add some parallel stuffs along the method_missing route. I >think it's one of the ways that Ruby can make a tool like this rather unique. +1 _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Apr 28 00:16:39 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 27 Apr 2005 23:16:39 -0500 Subject: [Wtr-general] dynamic Watir In-Reply-To: <004c01c54a6a$27e53a10$afd29044@NewDell> References: Message-ID: <5.1.0.14.2.20050427231547.038436f0@127.0.0.1> At 09:13 AM 4/26/2005, Paul Rogers wrote: >I think you should check it in. >But, do we now need 2 sets of unit tests? >So maybe, if its possible to do it as another 'piece' ( I cant remember >how this is implemented) like watir/simple, we should do that as the >unit tests currently take about 3 minutes to run. this smells bad. we need to make watir run faster -- too much time is spent in hard coded waits. any other ideas on how to speed up the tests? _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Apr 28 00:17:57 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 27 Apr 2005 23:17:57 -0500 Subject: [Wtr-general] dynamic Watir In-Reply-To: References: <004c01c54a6a$27e53a10$afd29044@NewDell> Message-ID: <5.1.0.14.2.20050427231727.0392d008@127.0.0.1> At 03:55 PM 4/26/2005, Andy Sipe wrote: >When its ready, I'll put it in the the Watir directory. Nothing else in >that directory appears to have UTs so where should I put those? unittests/dy (or whatever you call the module) _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Apr 28 00:20:29 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 27 Apr 2005 23:20:29 -0500 Subject: [Wtr-general] Runtime Error Warning message In-Reply-To: <00a101c54b97$86822c30$afd29044@NewDell> References: <9C0BD1E3DAF1204D842D72E2DCE2A04E154F0F@EX5V.rl.gov> Message-ID: <5.1.0.14.2.20050427231819.03958580@127.0.0.1> This is a bug in Watir. We need to cleanup the wait code and figure this out. It's hard and unrewarding, so it won't happen soon. I think it might happen when you have a frame served by a different server. OLE gives an access denied in this case. Bret At 09:11 PM 4/27/2005, Paul Rogers wrote: >"urn:schemas-microsoft-com:office:office" xmlns:w = >"urn:schemas-microsoft-com:office:word" xmlns:st1 = >"urn:schemas-microsoft-com:office:smarttags"> >Some sort of OLE exception occurred. This is in the rescue clause of a >really big block. You can look in watir.rb for the text 'runtime error in >wait' and uncomment the exception message. >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Cain, Mark >Sent: 27 April 2005 15:40 >To: wtr-general at rubyforge.org >Subject: [Wtr-general] Runtime Error Warning message > >Has anyone seen this message before? >W, [27-Apr-2005 14:06:27#1728] WARN -- : runtime error in wait >W, [27-Apr-2005 14:07:48#1728] WARN -- : runtime error in wait > >Do you know the cause? > >Thanks, >____________________ >Mark L. Cain >LMIT - E*STARS? ~ Lead Test Engineer >1981 Snyder, MSIN: G3-62, Richland, WA 99352 >Mark_Cain at RL.gov >509.376.5458 >"640 Kilobytes of computer memory ought to be enough for anybody." - Bill >Gates, 1981 > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Apr 28 00:30:20 2005 From: bret at pettichord.com (Bret Pettichord) Date: Wed, 27 Apr 2005 23:30:20 -0500 Subject: [Wtr-general] How to click on the cell for a dynamic Table In-Reply-To: <77ED2BF75D59D1439F90412CC5B109741CFFD286@ie10-sahara.hiso. honeywell.com> Message-ID: <5.1.0.14.2.20050427232452.039589d0@127.0.0.1> At 09:43 AM 4/27/2005, Ramya Ramalinga, Moorthy (IE10) wrote: >Hi All, > > I am facing a problem while accessing the dynamic table. All I need is > to click on a specific cell represented in row/col format. > > Using the following code, I am not able to click the specific cell of > the 'table2', though I am not getting any error. The table gets > generated only during runtime. Is there any other way to get it done? > > $ie.table(:id,"table2")[5][1].click > > Also, I am not able to access the Check box in a table which gets > generated dynamicaly. > > While using the following code , I am getting the error as " undefined > method `checkbox' for # (NoMethodError) " I don't see how this error could occur with the current version of Watir (since Paul added the FactoryMethods module) > $ie.table(:id, > 'DG_SBUEDIT')[9][1].checkbox(:name,'DG_SBUEDIT:_ctl10:chkSelection').set > > But the same code works well in static tables. > > Thanks for any suggesstions in this regard. I suggest you use IRB to poke at your dynamic table -- watir doesn't care if it is dynamic. As long as it stays still for a moment. > >Regards, Ramya Honeywell DES - >SAIF > Extn : 8674 >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Apr 28 01:10:54 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 28 Apr 2005 00:10:54 -0500 Subject: [Wtr-general] How to access a CheckBox inside a Table In-Reply-To: <77ED2BF75D59D1439F90412CC5B109741CDC273A@ie10-sahara.hiso. honeywell.com> Message-ID: <5.1.0.14.2.20050428001020.03989f90@127.0.0.1> At 07:55 AM 4/25/2005, Ramya Ramalinga, Moorthy (IE10) wrote: > Also, is there any method available in Watir::Table , which returns the > Row/Column information if we provide the Cell Element Value. No, but it would be nice to have. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Apr 28 01:27:41 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 28 Apr 2005 00:27:41 -0500 Subject: [Wtr-general] AutoIt javascript support - window logon In-Reply-To: <00ad01c54179$ff58b8e0$6400a8c0@NewDell> References: Message-ID: <5.1.0.14.2.20050428002623.0387fbd0@127.0.0.1> At 12:14 AM 4/15/2005, Paul Rogers wrote: >Should we include a copy with watir and make this our recommended way of >dealing with pop-ups? +1. Excellent suggestion, Attila >Should we have the watir installer install it too? We should include and register AutoItX3.dll (only) as part of our install. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Apr 28 01:32:43 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 28 Apr 2005 00:32:43 -0500 Subject: Ruby OLE/wsh examples, too. Re: [Wtr-general] AutoIt javascript support - window logon In-Reply-To: <72799cd7050416113326a2287f@mail.gmail.com> References: <00ad01c54179$ff58b8e0$6400a8c0@NewDell> <00ad01c54179$ff58b8e0$6400a8c0@NewDell> Message-ID: <5.1.0.14.2.20050428003149.03716498@127.0.0.1> At 01:33 PM 4/16/2005, Chris McMahon wrote: >Bill Caputo has been coding Windows GUIs directly from the Ruby OLE >library. See the Apr. 13 entry here: >http://www.williamcaputo.com/ >Anybody else know much about Windows Scripting Host and/or OLE? OLE is what we use to directly access IE. It's also what we use to access AutoIt. WSH has a sendkey's command. That's about all, as far as we are concerned. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Apr 28 01:35:26 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 28 Apr 2005 00:35:26 -0500 Subject: [Wtr-general] Starting and stopping the server under test In-Reply-To: References: <20050428025959.EBYT175.priv-edtnes40.telusplanet.net@tintin> <20050428025959.EBYT175.priv-edtnes40.telusplanet.net@tintin> Message-ID: <5.1.0.14.2.20050428003449.0388a9b0@127.0.0.1> At 10:15 PM 4/27/2005, Alexey Verkhovsky wrote: >May I suggest that you have a look at Instiki as a possible candidate for >such an app? It is pure Ruby, ridiculously easy to setup (literally, >"download, unzip, run"), starts in three seconds and is fairly widely used >- there must be at least a thousand installations out in the wild, maybe >more. Like I said, I'm going to write a Watir suite for it anyway. Rails is another good choice, although i understand it already has Selenium built in. _____________________ Bret Pettichord www.pettichord.com From Ramya.Moorthy at honeywell.com Thu Apr 28 01:59:48 2005 From: Ramya.Moorthy at honeywell.com (Ramya Ramalinga, Moorthy (IE10)) Date: Wed, 27 Apr 2005 22:59:48 -0700 Subject: [Wtr-general] Re:How to click on the cell for a dynamic Table Message-ID: <77ED2BF75D59D1439F90412CC5B109741D0A25F5@ie10-sahara.hiso.honeywell.com> Hi Paul, I tried accessing the cell in a dynamic table as per ur suggesstions. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Code : ~~~~ Row= $ie.table(:id, 'table2')[3] puts row row.update_row_cells q=row[1].click puts q Output : ~~~~~ type: id: name: value: disabled: false nil ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When I display the 'row' , it doesn't contain the type,id,name,value parameters. So, its not working even id we give "update_row_cells" command. > Regards, > Ramya > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050427/1d41c68e/attachment.html From Ramya.Moorthy at honeywell.com Thu Apr 28 03:02:03 2005 From: Ramya.Moorthy at honeywell.com (Ramya Ramalinga, Moorthy (IE10)) Date: Thu, 28 Apr 2005 00:02:03 -0700 Subject: [Wtr-general] How to Access a Checkbox in a Table Message-ID: <77ED2BF75D59D1439F90412CC5B109741D0B94D7@ie10-sahara.hiso.honeywell.com> Hi All, My web Page is having a check box in first Row, first Column of a table. Following code, returns me the error as , "undefined method `checkbox' for # (NoMethodError)" bcoz , there is no such method defined in the TableCell Class. ie = Watir::IE.start('.....') ie.table(:id,'Table4')[1][1].checkbox(:name,"str-FunctionCode").set But I have seen mails(dated April 11th ' 05) that the above code is working for them. Am I using the latest Version. I have downloaded 'watir 1.2' from http://rubyforge.org/projects/wtr/ Plz any Suggesstions in this regard are appreciated. Code from Watir.rb File: ******************* Class TableCell (taken from Watir.rb Version "$Revision: 1.136 $")********************** class TableCell Regards, > Ramya > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050428/59d693a2/attachment.html From andy__s at hotmail.com Thu Apr 28 06:53:54 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Thu, 28 Apr 2005 06:53:54 -0400 Subject: [Wtr-general] dynamic Watir Message-ID: Doing a wrapper should work with no problem, but it does mean that the user might have to switch between IE and DY (or whatever its called). Also, doing a wrapper would mean that the search would stop at IE, it couldn't happen at a lower object (IE.form1.blah as in the example Chris gave). My current approach is actually to reopen the IE class and add the methods in the DY file, once that is all working I'd just add the same dynamic stuff to the other elements as required.. So, in that case require 'DY' would get you IE with the dynamic methods + all the existing methods. I'm open to either approach -- suggestions?? The current version actually does both name and id. It does id first and then looks through texts. My thought was to write it such that the method of resolving a match of an element to a method can be easily expanded. What I see is that this has a couple of advantages: 1) If a particular user wants a more flexible name resolution they can essentially write their own little resolver - this would help match local coding standards, or tool idioms, etc... 2) I think it'll help fix items that would make methods that aren't valid ruby syntax 3) It allows you to write code that looks more like ruby vs web page ID or texts, given how wacky some web element naming can be this is nice 4) Hopefully, if the user sees it on the screen they can type in something and often it'll figure out what they were talking about. The matching wouldn't have to be 100% exact. I'm really still in the prototype phase of playing around with the whole thing. I'll get the stuff that Chris did and check it for ideas and other goodness. -andy ----Original Message Follows---- From: Bret Pettichord <bret at pettichord.com> So do your dy methods use :id or :text to name objects? Your example has both. Instead of making dy an attribute of ie, i'd suggest making it a separate wrapper class. dy = Watir::DY.new(ie) dy.startdate.set("10/11/2003") I think that's slightly more compact. In general we are overloading the IE object, so i'm generally encouraging that we create collaborating objects instead of adding more attributes and methods to IE. This is a good idea. Not a new one, as Chris said, but a good thing to put back into Watir. I also like the idea of putting this in a separate file and a separate require. At least for now. Bret At 09:23 PM 4/25/2005, Andy Sipe wrote: >I've been playing with something in Watir and wondered if there was >any interest in it. From andy__s at hotmail.com Thu Apr 28 07:08:17 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Thu, 28 Apr 2005 07:08:17 -0400 Subject: [Wtr-general] dynamic Watir In-Reply-To: <5.1.0.14.2.20050427231547.038436f0@127.0.0.1> Message-ID: I don't have any particular ideas on the speed. But I do think that another smell with the UTs is that there is so much coming to stdout. I usually love to see dots and failures only :) If there isn't any particular reason for so much going to the console maybe I'll make a few passes through and add TCs for anything that is being visually checked and remove any extra 'puts' type statements ??? -andy ----Original Message Follows---- From: Bret Pettichord <bret at pettichord.com> At 09:13 AM 4/26/2005, Paul Rogers wrote: >I think you should check it in. >But, do we now need 2 sets of unit tests? >So maybe, if its possible to do it as another 'piece' ( I cant >remember >how this is implemented) like watir/simple, we should do that as >the >unit tests currently take about 3 minutes to run. this smells bad. we need to make watir run faster -- too much time is spent in hard coded waits. any other ideas on how to speed up the tests? _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From shaorobics at gmail.com Thu Apr 28 08:51:59 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Thu, 28 Apr 2005 08:51:59 -0400 Subject: [Wtr-general] clicking on an image Message-ID: <593b9ae805042805511e2ebaa0@mail.gmail.com> hi, I have the following line: browser.image(:src, 'login.gif').click but watir dies and gives me the error: c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1470:in `object_exist_check': Unable to locate object, using src and login.gif (Watir::Exception::UnknownObjectException ) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1579:in `click' from ./CBTClass.rb:59:in `login' from C:/Documents and Settings/stat/Desktop/Watir QA/CBT/Test_outlet.rb: 24 any ideas? It was suggested to me that this was the way to get at clicking on images, maybe I'm doing something wrong ? Shao From andy__s at hotmail.com Thu Apr 28 09:06:27 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Thu, 28 Apr 2005 09:06:27 -0400 Subject: [Wtr-general] clicking on an image In-Reply-To: <593b9ae805042805511e2ebaa0@mail.gmail.com> Message-ID: you might try as a regex? browser.image(:src, /login.gif/).click -andy ----Original Message Follows---- From: Shao Kang Tat <shaorobics at gmail.com> Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: [Wtr-general] clicking on an image Date: Thu, 28 Apr 2005 08:51:59 -0400 hi, I have the following line: browser.image(:src, 'login.gif').click but watir dies and gives me the error: c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1470:in `object_exist_check': Unable to locate object, using src and login.gif (Watir::Exception::UnknownObjectException ) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1579:in `click' from ./CBTClass.rb:59:in `login' from C:/Documents and Settings/stat/Desktop/Watir QA/CBT/Test_outlet.rb: 24 any ideas? It was suggested to me that this was the way to get at clicking on images, maybe I'm doing something wrong ? Shao _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From shaorobics at gmail.com Thu Apr 28 09:22:36 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Thu, 28 Apr 2005 09:22:36 -0400 Subject: [Wtr-general] clicking on an image In-Reply-To: References: <593b9ae805042805511e2ebaa0@mail.gmail.com> Message-ID: <593b9ae805042806223774422c@mail.gmail.com> hrm...I think I see the problem. the HTML is coded as follows: instead of a > fairly widely used - there must be at least a thousand installations >> out in the wild, maybe more. Like I said, I'm going to write a Watir >> suite for it anyway. > > Rails is another good choice, although i understand it already has > Selenium built in. Bret, hi! Instiki is built on top of Rails, so in a way it _is_ the Rails choice. And the major selling point of Instiki as a Watir example app is zero configuration. This is a non-trivial web app that runs straight after download, no futzing around with config files. Which means, you don't host it, you _distribute_ it. And then people execute the tests on their PCs, and the tests start/stop the app. Thus you can have tests that change the persisted state, you can show how to control the AUT from within the suite, and so on. Isn't that nice? :) By the way, Selenium integration is a research patch on Rails Trac, http://dev.rubyonrails.com/ticket/1056. I don't know if it will make it to Rails codebase or not. WATIR definitely has no chance, the Rails crowd is as anti-Windows as a bunch of Mac lovers can ever be :) -- Best regards, Alexey Verkhovsky Ruby Forum: http://ruby-forum.org (moderator) RForum: http://rforum.andreas-s.net (co-author) Instiki: http://instiki.org (maintainer) From KSheehy at telegea.com Thu Apr 28 09:38:59 2005 From: KSheehy at telegea.com (Sheehy, Kevin) Date: Thu, 28 Apr 2005 09:38:59 -0400 Subject: [Wtr-general] How to Access a Checkbox in a Table Message-ID: <45FBDEA3EC56FF4BA10271707861A7D20E8E05@tg-mail> Ramya, It looks like you are using Watir revision 1.136 (i.e. the Watir 1.2 release). The enhanced table support that you need was added in revision 1.139 and since there has not been a Watir release since 1.2, you'll need to grab the files from CVS (or download the tarball). Hope this helps, -Kevin P.S. Perhaps it's time for a new release? From jkohl at telusplanet.net Thu Apr 28 09:40:23 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Thu, 28 Apr 2005 07:40:23 -0600 Subject: [Wtr-general] clicking on an image In-Reply-To: <593b9ae805042806223774422c@mail.gmail.com> Message-ID: <20050428134027.BEDF4406.priv-edtnes56.telusplanet.net@tintin> You might be able to treat it like a button: ie.button(:, "").click Disclaimer: I haven't tried it with HTML that looks like what you sent yet though. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Shao Kang Tat > Sent: April 28, 2005 7:23 AM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] clicking on an image > > hrm...I think I see the problem. > the HTML is coded as follows: > > src=/images/cbt/login.gif> > > instead of a instead of a e if e.message == 'Failed To Login' puts "Invalid password was refused' else puts "Incorrect login message received! ( #{ e.message} " end end Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Alexey Verkhovsky Sent: 27 April 2005 20:48 To: wtr-general at rubyforge.org Subject: [Wtr-general] Starting and stopping the server under test Can anyone share code to start and stop the server under test before/after running the tests? At the moment, I do it with 'win32/process' library, but this includes some native C code, and that's a bit of an unwanted hassle. I think, it must be doable in pure Ruby with Win32API module. And, generally speaking, is there any "larger than a toy example" test suite written with Watir available for viewing anywhere? I'm going to try and write something like this for Instiki (it's a wiki clone which is ridiculously easy to install and use, see http://instiki.org for details). It would be nice to see what practical problems people have to solve in reallife Watir test suites, and how they solve those problems. -- Best regards, Alexey Verkhovsky Ruby Forum: http://ruby-forum.org (moderator) RForum: http://rforum.andreas-s.net (co-author) Instiki: http://instiki.org (maintainer) _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Thu Apr 28 08:31:40 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 28 Apr 2005 07:31:40 -0500 Subject: [Wtr-general] autoit winhelper internationalization Message-ID: <5.1.0.14.2.20050428072901.038cfb80@127.0.0.1> from windowhelper.rb: >@autoit.WinWait "Microsoft Internet Explorer", "" I'm pretty sure that the title is different depending on the language of the system. It may even vary if you have a version of IE that was provided by your ISP (e.g. "AT&T Worldnet Microsoft Internet Explorer"). Can we pull this text from the registry instead? Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Apr 28 08:38:38 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 28 Apr 2005 07:38:38 -0500 Subject: [Wtr-general] How to Access a Checkbox in a Table In-Reply-To: <77ED2BF75D59D1439F90412CC5B109741D0B94D7@ie10-sahara.hiso. honeywell.com> Message-ID: <5.1.0.14.2.20050428073729.038a7490@127.0.0.1> At 02:02 AM 4/28/2005, Ramya Ramalinga, Moorthy (IE10) wrote: >Am I using the latest Version. I have downloaded 'watir 1.2' from >http://rubyforge.org/projects/wtr/ > >Plz any Suggesstions in this regard are appreciated. You need code that is in CVS but which hasn't been put into a release yet. Try: http://rubyforge.org/cgi-bin/viewcvs.cgi/watir/watir.tar.gz?tarball=1&cvsroot=wtr We need to cut a new release. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Apr 28 08:41:50 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 28 Apr 2005 07:41:50 -0500 Subject: [Wtr-general] dynamic Watir In-Reply-To: References: <5.1.0.14.2.20050427231547.038436f0@127.0.0.1> Message-ID: <5.1.0.14.2.20050428074120.038cc870@127.0.0.1> At 06:08 AM 4/28/2005, Andy Sipe wrote: >I don't have any particular ideas on the speed. But I do think that >another smell with the UTs is that there is so much coming to stdout. I >usually love to see dots and failures only :) right >If there isn't any particular reason for so much going to the console >maybe I'll make a few passes through and add TCs for anything that is >being visually checked and remove any extra 'puts' type statements ??? that would be great. we've had this issue on the tracker for a while. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Thu Apr 28 08:44:54 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 28 Apr 2005 07:44:54 -0500 Subject: [Wtr-general] wsh vs autoit In-Reply-To: <5.1.0.14.2.20050428003149.03716498@127.0.0.1> References: <72799cd7050416113326a2287f@mail.gmail.com> <00ad01c54179$ff58b8e0$6400a8c0@NewDell> <00ad01c54179$ff58b8e0$6400a8c0@NewDell> Message-ID: <5.1.0.14.2.20050428074206.0389b9f0@127.0.0.1> At 12:32 AM 4/28/2005, Bret Pettichord wrote: >OLE is what we use to directly access IE. It's also what we use to access >AutoIt. > >WSH has a sendkey's command. That's about all, as far as we are concerned. i looked at the windowhelper.rb after writing this. if all we are using from autoit is autoit.Send (as we currently are), then i think we could just as well use wsh.sendkeys instead. one less dependency. but i suspect we will want to use more... _____________________ Bret Pettichord www.pettichord.com From christopher.mcmahon at gmail.com Thu Apr 28 11:16:36 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Thu, 28 Apr 2005 10:16:36 -0500 Subject: [Wtr-general] Ruby autoflush (no WATIR content, sorry) Message-ID: <72799cd705042808164e1c9782@mail.gmail.com> Hey Rubyists... How do you get Ruby to flush the output buffer constantly? In Perl it's $|=1 but Google's not treating me right for the Ruby syntax to do this. Thanks... -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050428/cc387fb3/attachment.html From tomfeo at presslogic.com Thu Apr 28 11:19:29 2005 From: tomfeo at presslogic.com (Tom) Date: Thu, 28 Apr 2005 09:19:29 -0600 Subject: [Wtr-general] RE: click link in class/table/page/frame In-Reply-To: <009c01c54b97$55b9c4f0$afd29044@NewDell> Message-ID: Thanks Paul and Chris IE::REVISION = 1.136 IE::VERSION = 1.2 I think I found the problem: irb(main):023:0> ie.frame("main").showFrames there are 3 frames frame index: 0 name: frame index: 1 name: frame index: 2 name: Inside my main frame, there is a nested frame. Unfortunately these frames have no names, just index. When I try: irb(main):025:0> ie.frame("main").frame(:index,2).show_links ArgumentError: wrong number of arguments (2 for 1) from (irb):25:in `frame' from (irb):25 from :0 Can I not reference a frame by the index? In the User Guide, the only access I see for referencing a frame is with the frame name. In our application, the frames within our main frame are dynamically built and customizable to show none to over a dozen frames, so a name has not been assigned to them, just an index. Chris: To answer your question of why QuickTest flopped: The previous QA person in our company attempted to use QuickTest since we already have the other Mercury product, Test Director. In order to get QuickTest to work with our application, a lot of VBScript needed to be used. Since the previous QA person was not versed in VBScript and no one else in the company had time to help him, it quickly died as a cumbersome tool. I have done a lot of VBScript within Test Director at my previous company, but there is such a sour taste towards automation testing in this company now that they did not want to give me the time to revive QuickTest. When I suggested WATIR, there was a lot of resistance in that they were not going to put any more money out on automation testing. When I told them it was open source and free, they agreed to let me use 'spare' time to give it a try. I was introduced to WATIR at the April 6 QA discussion group where Paul gave a brief demo and was very impressed. It has taken me this long to 'make' some 'spare' time to play with it :-) Thanks for your help so far guys. Tom _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, April 27, 2005 8:10 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] click link in class/table/page/frame What version are you using? use puts IE::REVISION and puts IE::VERSION to find out Have you tried a regular expression in steaad of the actual string: $ie.frame("main").link(:text, /Account/).click The fact its in a table shouldnt be a problem, and the fact it fires some javasscript shouldnt be a problem either You can use ie.show_links which should show all the links on the page also give the suggetions that Chris posted a go too Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tom Sent: 27 April 2005 15:42 To: wtr-general at rubyforge.org Subject: [Wtr-general] click link in class/table/page/frame I just started using WATIR...today...about 3 hours ago. In less than 5 minutes I was able to write a script to log in to our application. Sweet. But that's as far as I've been able to get. Our application contains 3 frames. I want to use the frame named 'main' which contains three pages. I just want to click a link, but the code on the page for the link I want to click is: which of course means it is also in a table. I've reviewed some of the discussions regarding javascript, but have not found anything in there to work. I don't expect the solution to be pretty since it appears that clicking this link involves calling some javascript contained in a class contained in a table contained in a page contained in a frame. So obviously the code is not going to be as simple as: $ie.frame("main").link(:text, "Account Attribute Groups").click #this did not work. I hope I'm not in over my head already as I would really like to show our company how automation testing can actually work with our application. Mercury's Quicktest flopped miserably, so everyone here is very skeptical towards automation. Any advice you can offer would be greatly appreciated. Thanks, Tom Feodoroff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050428/b9d21526/attachment.html From paul.rogers at shaw.ca Thu Apr 28 11:49:48 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 28 Apr 2005 09:49:48 -0600 Subject: [Wtr-general] RE: click link in class/table/page/frame In-Reply-To: Message-ID: <004701c54c09$e846fc30$afd29044@NewDell> there is currently no support for frames on index, just name But, I think this is a good thing to add ( anything to beat down the competition!) Tom, I'll send you a watir.rb off list with this functionality in it, and I'll add it to the real watir in the next few days, as I'll need to write the unit tests Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tom Sent: 28 April 2005 09:19 To: wtr-general at rubyforge.org Subject: [Wtr-general] RE: click link in class/table/page/frame Thanks Paul and Chris IE::REVISION = 1.136 IE::VERSION = 1.2 I think I found the problem: irb(main):023:0> ie.frame("main").showFrames there are 3 frames frame index: 0 name: frame index: 1 name: frame index: 2 name: Inside my main frame, there is a nested frame. Unfortunately these frames have no names, just index. When I try: irb(main):025:0> ie.frame("main").frame(:index,2).show_links ArgumentError: wrong number of arguments (2 for 1) from (irb):25:in `frame' from (irb):25 from :0 Can I not reference a frame by the index? In the User Guide, the only access I see for referencing a frame is with the frame name. In our application, the frames within our main frame are dynamically built and customizable to show none to over a dozen frames, so a name has not been assigned to them, just an index. Chris: To answer your question of why QuickTest flopped: The previous QA person in our company attempted to use QuickTest since we already have the other Mercury product, Test Director. In order to get QuickTest to work with our application, a lot of VBScript needed to be used. Since the previous QA person was not versed in VBScript and no one else in the company had time to help him, it quickly died as a cumbersome tool. I have done a lot of VBScript within Test Director at my previous company, but there is such a sour taste towards automation testing in this company now that they did not want to give me the time to revive QuickTest. When I suggested WATIR, there was a lot of resistance in that they were not going to put any more money out on automation testing. When I told them it was open source and free, they agreed to let me use 'spare' time to give it a try. I was introduced to WATIR at the April 6 QA discussion group where Paul gave a brief demo and was very impressed. It has taken me this long to 'make' some 'spare' time to play with it :-) Thanks for your help so far guys. Tom _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, April 27, 2005 8:10 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] click link in class/table/page/frame What version are you using? use puts IE::REVISION and puts IE::VERSION to find out Have you tried a regular expression in steaad of the actual string: $ie.frame("main").link(:text, /Account/).click The fact its in a table shouldnt be a problem, and the fact it fires some javasscript shouldnt be a problem either You can use ie.show_links which should show all the links on the page also give the suggetions that Chris posted a go too Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tom Sent: 27 April 2005 15:42 To: wtr-general at rubyforge.org Subject: [Wtr-general] click link in class/table/page/frame I just started using WATIR...today...about 3 hours ago. In less than 5 minutes I was able to write a script to log in to our application. Sweet. But that's as far as I've been able to get. Our application contains 3 frames. I want to use the frame named 'main' which contains three pages. I just want to click a link, but the code on the page for the link I want to click is: which of course means it is also in a table. I've reviewed some of the discussions regarding javascript, but have not found anything in there to work. I don't expect the solution to be pretty since it appears that clicking this link involves calling some javascript contained in a class contained in a table contained in a page contained in a frame. So obviously the code is not going to be as simple as: $ie.frame("main").link(:text, "Account Attribute Groups").click #this did not work. I hope I'm not in over my head already as I would really like to show our company how automation testing can actually work with our application. Mercury's Quicktest flopped miserably, so everyone here is very skeptical towards automation. Any advice you can offer would be greatly appreciated. Thanks, Tom Feodoroff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050428/881031cb/attachment.html From paul.rogers at shaw.ca Thu Apr 28 12:02:42 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 28 Apr 2005 10:02:42 -0600 Subject: [Wtr-general] RE: click link in class/table/page/frame In-Reply-To: <004701c54c09$e846fc30$afd29044@NewDell> Message-ID: <005101c54c0b$b5b841f0$afd29044@NewDell> ok, I checked it into CVS there is a new watir.rb and a new frame_test.rb. All existing code should still work fine If anyone doubts how useful unit tests are, look how long that change took! Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: 28 April 2005 09:50 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] RE: click link in class/table/page/frame there is currently no support for frames on index, just name But, I think this is a good thing to add ( anything to beat down the competition!) Tom, I'll send you a watir.rb off list with this functionality in it, and I'll add it to the real watir in the next few days, as I'll need to write the unit tests Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tom Sent: 28 April 2005 09:19 To: wtr-general at rubyforge.org Subject: [Wtr-general] RE: click link in class/table/page/frame Thanks Paul and Chris IE::REVISION = 1.136 IE::VERSION = 1.2 I think I found the problem: irb(main):023:0> ie.frame("main").showFrames there are 3 frames frame index: 0 name: frame index: 1 name: frame index: 2 name: Inside my main frame, there is a nested frame. Unfortunately these frames have no names, just index. When I try: irb(main):025:0> ie.frame("main").frame(:index,2).show_links ArgumentError: wrong number of arguments (2 for 1) from (irb):25:in `frame' from (irb):25 from :0 Can I not reference a frame by the index? In the User Guide, the only access I see for referencing a frame is with the frame name. In our application, the frames within our main frame are dynamically built and customizable to show none to over a dozen frames, so a name has not been assigned to them, just an index. Chris: To answer your question of why QuickTest flopped: The previous QA person in our company attempted to use QuickTest since we already have the other Mercury product, Test Director. In order to get QuickTest to work with our application, a lot of VBScript needed to be used. Since the previous QA person was not versed in VBScript and no one else in the company had time to help him, it quickly died as a cumbersome tool. I have done a lot of VBScript within Test Director at my previous company, but there is such a sour taste towards automation testing in this company now that they did not want to give me the time to revive QuickTest. When I suggested WATIR, there was a lot of resistance in that they were not going to put any more money out on automation testing. When I told them it was open source and free, they agreed to let me use 'spare' time to give it a try. I was introduced to WATIR at the April 6 QA discussion group where Paul gave a brief demo and was very impressed. It has taken me this long to 'make' some 'spare' time to play with it :-) Thanks for your help so far guys. Tom _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, April 27, 2005 8:10 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] click link in class/table/page/frame What version are you using? use puts IE::REVISION and puts IE::VERSION to find out Have you tried a regular expression in steaad of the actual string: $ie.frame("main").link(:text, /Account/).click The fact its in a table shouldnt be a problem, and the fact it fires some javasscript shouldnt be a problem either You can use ie.show_links which should show all the links on the page also give the suggetions that Chris posted a go too Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tom Sent: 27 April 2005 15:42 To: wtr-general at rubyforge.org Subject: [Wtr-general] click link in class/table/page/frame I just started using WATIR...today...about 3 hours ago. In less than 5 minutes I was able to write a script to log in to our application. Sweet. But that's as far as I've been able to get. Our application contains 3 frames. I want to use the frame named 'main' which contains three pages. I just want to click a link, but the code on the page for the link I want to click is: which of course means it is also in a table. I've reviewed some of the discussions regarding javascript, but have not found anything in there to work. I don't expect the solution to be pretty since it appears that clicking this link involves calling some javascript contained in a class contained in a table contained in a page contained in a frame. So obviously the code is not going to be as simple as: $ie.frame("main").link(:text, "Account Attribute Groups").click #this did not work. I hope I'm not in over my head already as I would really like to show our company how automation testing can actually work with our application. Mercury's Quicktest flopped miserably, so everyone here is very skeptical towards automation. Any advice you can offer would be greatly appreciated. Thanks, Tom Feodoroff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050428/129d19fb/attachment.html From taylor_ebiz at hotmail.com Thu Apr 28 12:03:56 2005 From: taylor_ebiz at hotmail.com (Kirk Taylor) Date: Thu, 28 Apr 2005 16:03:56 +0000 Subject: [Wtr-general] ONCLICK - not firing Message-ID: I'm new to the WATIR community (and not a programmer), i'm looking forward to great insight into automated testing (as a team leader of a group of QA staff).... now for my question: I have a control that is *custom* made - it displays as a combo box but is not REALLY a combo box. I am trying to click/fire the event where my HTML source says it is done by using "ONCLICK"... i've attached a sample of the HTML page. I want to be able to click the "cboAbsencePlanCode" field. THis is what I have tried and got really close: ie.frame("MainBody").table(:index,5)[1][0].fireEvent("ONCLICK") but I only got the box around the combo box to highligh (I also go it to *Flash* using the flash command). I am not sure I am providing enough info in this post, for someone to be able to assist me... but I am willing to provide whatever is necessary to get this resolved. Thanks - Kirk Kirk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050428/d45a117c/attachment.html From paul.rogers at shaw.ca Thu Apr 28 12:14:54 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 28 Apr 2005 10:14:54 -0600 Subject: [Wtr-general] ONCLICK - not firing In-Reply-To: Message-ID: <006701c54c0d$6a2320a0$afd29044@NewDell> Kirk, this looks like some sort of custom control. It doesn't show as a combo for me and I couldn't find out anything about it via google. I think what we can do, and it will take me a while to look into it, is to use the label before it, and then use the wsh.sendkeys ( or autoit) to enter data ( or select stuff ) I'll take a quick look now, but without being able to see whats happening, its kind of difficult to do! Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Kirk Taylor Sent: 28 April 2005 10:04 To: wtr-general at rubyforge.org Subject: [Wtr-general] ONCLICK - not firing I'm new to the WATIR community (and not a programmer), i'm looking forward to great insight into automated testing (as a team leader of a group of QA staff).... now for my question: I have a control that is *custom* made - it displays as a combo box but is not REALLY a combo box. I am trying to click/fire the event where my HTML source says it is done by using "ONCLICK"... i've attached a sample of the HTML page. I want to be able to click the "cboAbsencePlanCode" field. THis is what I have tried and got really close: ie.frame("MainBody").table(:index,5)[1][0].fireEvent("ONCLICK") but I only got the box around the combo box to highligh (I also go it to *Flash* using the flash command). I am not sure I am providing enough info in this post, for someone to be able to assist me... but I am willing to provide whatever is necessary to get this resolved. Thanks - Kirk Kirk From paul.rogers at shaw.ca Thu Apr 28 12:35:01 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 28 Apr 2005 10:35:01 -0600 Subject: [Wtr-general] ONCLICK - not firing In-Reply-To: Message-ID: <006c01c54c10$399a5310$afd29044@NewDell> This shows as a text box and then a button for me. I can click the button next to it with ie.button(:index,1).click Does that work for you? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Kirk Taylor Sent: 28 April 2005 10:04 To: wtr-general at rubyforge.org Subject: [Wtr-general] ONCLICK - not firing I'm new to the WATIR community (and not a programmer), i'm looking forward to great insight into automated testing (as a team leader of a group of QA staff).... now for my question: I have a control that is *custom* made - it displays as a combo box but is not REALLY a combo box. I am trying to click/fire the event where my HTML source says it is done by using "ONCLICK"... i've attached a sample of the HTML page. I want to be able to click the "cboAbsencePlanCode" field. THis is what I have tried and got really close: ie.frame("MainBody").table(:index,5)[1][0].fireEvent("ONCLICK") but I only got the box around the combo box to highligh (I also go it to *Flash* using the flash command). I am not sure I am providing enough info in this post, for someone to be able to assist me... but I am willing to provide whatever is necessary to get this resolved. Thanks - Kirk Kirk From taylor_ebiz at hotmail.com Thu Apr 28 13:28:04 2005 From: taylor_ebiz at hotmail.com (Kirk Taylor) Date: Thu, 28 Apr 2005 17:28:04 +0000 Subject: [Wtr-general] ONCLICK - not firing In-Reply-To: <006c01c54c10$399a5310$afd29044@NewDell> Message-ID: I am getting much closer... cause now i can click every button on the page, EXCEPT For that drop down... when I use this command: ie.button(:index,1).click I am brought back to the main page of the application... if I "flash" it to see what is clicked I dont see anything flicker as it does with all other buttons on the page. Is there a command to list all the buttons on the page? or maybe this isn't a "button" it's more likely an ActiveX control. Here is a response we got from Mercury when we tried to use QTP to get at this control (and the Browser crashes during the recording of the script) "Here is the technical information about what is causing the crash. The crash is due to one of the ActiveX controls that you are using in your application. The problematic ActiveX that is causing the problem has the ProgID of "SpectrumHR.EDataControl.1". The problem with this control is that it implements the IOleWindow interface although it has no UI and throws exception which causes the crash. Implementing this interface is unusual when no UI exist. You can find additional information about IOleWindow on MSND http://msdn.microsoft.com/library/en-us/com/htm/oin_ou2z_27uf.asp?frame=true" I hope this helps... this would be a big win for WATIR to get into our shop, if we get this resolved. Kirk >From: Paul Rogers >Reply-To: wtr-general at rubyforge.org >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] ONCLICK - not firing >Date: Thu, 28 Apr 2005 10:35:01 -0600 > >This shows as a text box and then a button for me. > >I can click the button next to it with >ie.button(:index,1).click > >Does that work for you? > >-----Original Message----- >From: wtr-general-bounces at rubyforge.org >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Kirk Taylor >Sent: 28 April 2005 10:04 >To: wtr-general at rubyforge.org >Subject: [Wtr-general] ONCLICK - not firing > > >I'm new to the WATIR community (and not a programmer), i'm looking >forward >to great insight into automated testing (as a team leader of a group of >QA >staff).... now for my question: > >I have a control that is *custom* made - it displays as a combo box but >is >not REALLY a combo box. I am trying to click/fire the event where my >HTML >source says it is done by using "ONCLICK"... i've attached a sample of >the >HTML page. I want to be able to click the "cboAbsencePlanCode" field. >THis >is what I have tried and got really close: > >ie.frame("MainBody").table(:index,5)[1][0].fireEvent("ONCLICK") > >but I only got the box around the combo box to highligh (I also go it to > >*Flash* using the flash command). I am not sure I am providing enough >info >in this post, for someone to be able to assist me... but I am willing to > >provide whatever is necessary to get this resolved. > >Thanks - Kirk > > > > > >Kirk > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general From shaorobics at gmail.com Thu Apr 28 13:39:11 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Thu, 28 Apr 2005 13:39:11 -0400 Subject: [Wtr-general] require Message-ID: <593b9ae805042810397e70e9a1@mail.gmail.com> hey guys, I have 3 files C:\....\folder1\test\test.rb C:\....\folder1\class.rb C:\....\folder1\objects.rb in the test.rb file I have require '../class.rb' which is fine but in class.rb I have require 'objects.rb' that's when it starts to compain to me that there is no such file to load...if I put all three files in the same directory, and take out the "../" from the test.rb it works fine...any ideas? Shao From jkohl at telusplanet.net Thu Apr 28 14:32:49 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Thu, 28 Apr 2005 11:32:49 -0700 Subject: [Wtr-general] ONCLICK - not firing In-Reply-To: References: Message-ID: <1114713169.42712c5162d83@webmail.telusplanet.net> If all else fails, sendkeys might be something to try. Back in the day when I was doing a lot of work with SilkTest, "TypeKeys()" was something I used a lot if all else failed when dealing with an object I couldn't interact with. I would click an element on the page above the troublesome element, then to a TypeKeys down-arrow or tab to the object, and then send an enter or a space bar to activate it. I haven't used autoit or windows scripting yet, so I'm not sure how this will work in practice. Once Watir has support for sendkeys, it could help for situations like these (and maybe for those drop-downs that have URLs stored in other files a la cbc.ca). -Jonathan Quoting Kirk Taylor : > I am getting much closer... cause now i can click every button on the page, > EXCEPT For that drop down... when I use this command: > > ie.button(:index,1).click > > I am brought back to the main page of the application... > > if I "flash" it to see what is clicked I dont see anything flicker as it > does with all other buttons on the page. > > Is there a command to list all the buttons on the page? or maybe this isn't > a "button" it's more likely an ActiveX control. Here is a response we got > from Mercury when we tried to use QTP to get at this control (and the > Browser crashes during the recording of the script) > > "Here is the technical information about what is causing the crash. The > crash is due to one of the ActiveX controls that you are using in your > application. The problematic ActiveX that is causing the problem has the > ProgID of "SpectrumHR.EDataControl.1". The problem with this control is that > > it implements the IOleWindow interface although it has no UI and throws > exception which causes the crash. Implementing this interface is unusual > when no UI exist. > > You can find additional information about IOleWindow on MSND > > http://msdn.microsoft.com/library/en-us/com/htm/oin_ou2z_27uf.asp?frame=true" > > > I hope this helps... this would be a big win for WATIR to get into our shop, > > if we get this resolved. > > Kirk > > > > > >From: Paul Rogers > >Reply-To: wtr-general at rubyforge.org > >To: wtr-general at rubyforge.org > >Subject: RE: [Wtr-general] ONCLICK - not firing > >Date: Thu, 28 Apr 2005 10:35:01 -0600 > > > >This shows as a text box and then a button for me. > > > >I can click the button next to it with > >ie.button(:index,1).click > > > >Does that work for you? > > > >-----Original Message----- > >From: wtr-general-bounces at rubyforge.org > >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Kirk Taylor > >Sent: 28 April 2005 10:04 > >To: wtr-general at rubyforge.org > >Subject: [Wtr-general] ONCLICK - not firing > > > > > >I'm new to the WATIR community (and not a programmer), i'm looking > >forward > >to great insight into automated testing (as a team leader of a group of > >QA > >staff).... now for my question: > > > >I have a control that is *custom* made - it displays as a combo box but > >is > >not REALLY a combo box. I am trying to click/fire the event where my > >HTML > >source says it is done by using "ONCLICK"... i've attached a sample of > >the > >HTML page. I want to be able to click the "cboAbsencePlanCode" field. > >THis > >is what I have tried and got really close: > > > >ie.frame("MainBody").table(:index,5)[1][0].fireEvent("ONCLICK") > > > >but I only got the box around the combo box to highligh (I also go it to > > > >*Flash* using the flash command). I am not sure I am providing enough > >info > >in this post, for someone to be able to assist me... but I am willing to > > > >provide whatever is necessary to get this resolved. > > > >Thanks - Kirk > > > > > > > > > > > >Kirk > > > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From paul.rogers at shaw.ca Thu Apr 28 14:53:54 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 28 Apr 2005 12:53:54 -0600 Subject: [Wtr-general] require In-Reply-To: <593b9ae805042810397e70e9a1@mail.gmail.com> Message-ID: <007401c54c23$a0705590$afd29044@NewDell> We use this in all the unit tests to fix up the problem $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ It adds the parents path to the list of dirs that ruby looks for libraries in -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Shao Kang Tat Sent: 28 April 2005 11:39 To: wtr-general at rubyforge.org Subject: [Wtr-general] require hey guys, I have 3 files C:\....\folder1\test\test.rb C:\....\folder1\class.rb C:\....\folder1\objects.rb in the test.rb file I have require '../class.rb' which is fine but in class.rb I have require 'objects.rb' that's when it starts to compain to me that there is no such file to load...if I put all three files in the same directory, and take out the "../" from the test.rb it works fine...any ideas? Shao _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Thu Apr 28 14:58:40 2005 From: bret at pettichord.com (Bret Pettichord) Date: Thu, 28 Apr 2005 13:58:40 -0500 Subject: [Wtr-general] require In-Reply-To: <593b9ae805042810397e70e9a1@mail.gmail.com> Message-ID: <5.1.0.14.2.20050428135524.038a6190@127.0.0.1> require '../foo' is a bad idea. instead modify the load path and then do your require: $LOAD_PATH << '..' require 'foo' At 12:39 PM 4/28/2005, Shao Kang Tat wrote: >hey guys, > >I have 3 files > >C:\....\folder1\test\test.rb >C:\....\folder1\class.rb >C:\....\folder1\objects.rb > > >in the test.rb file I have >require '../class.rb' > >which is fine >but in class.rb I have > >require 'objects.rb' > >that's when it starts to compain to me that there is no such file to >load...if I put all three files in the same directory, and take out >the "../" from the test.rb it works fine...any ideas? > >Shao > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From john.lloydjones at gmail.com Thu Apr 28 16:06:25 2005 From: john.lloydjones at gmail.com (John Lloyd-Jones) Date: Thu, 28 Apr 2005 13:06:25 -0700 Subject: [Wtr-general] ONCLICK - not firing In-Reply-To: References: Message-ID: <6fcd26f105042813062275e995@mail.gmail.com> Kirk I have exactly the same situation; a custome control that has special behaiour. My solution was to write a custom class: class IE def custom_control (how, what) m = CustomeControl.new(self, how, what) end # This class is used for dealing with the customet control. class Multiselect < ObjectActions ... special stuff for custome control end end The class provides methods appropriate for the cotrol (you will have to decide what you need for your class). Steal the rest from watir.rb I just require the file with these definitions in my test scripts. Now I note that you say you are not a programmer, so maybe you can cajole / coerce a colleague or friend to do it for you? John On 4/28/05, Kirk Taylor wrote: > I'm new to the WATIR community (and not a programmer), i'm looking forward > to great insight into automated testing (as a team leader of a group of QA > staff).... now for my question: > > I have a control that is *custom* made - it displays as a combo box but is > not REALLY a combo box. I am trying to click/fire the event where my HTML > source says it is done by using "ONCLICK"... i've attached a sample of the > HTML page. I want to be able to click the "cboAbsencePlanCode" field. THis > is what I have tried and got really close: > > ie.frame("MainBody").table(:index,5)[1][0].fireEvent("ONCLICK") > > but I only got the box around the combo box to highligh (I also go it to > *Flash* using the flash command). I am not sure I am providing enough info > in this post, for someone to be able to assist me... but I am willing to > provide whatever is necessary to get this resolved. > > Thanks - Kirk > > > Kirk > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > > From taylor_ebiz at hotmail.com Thu Apr 28 16:15:07 2005 From: taylor_ebiz at hotmail.com (Kirk Taylor) Date: Thu, 28 Apr 2005 20:15:07 +0000 Subject: [Wtr-general] ONCLICK - not firing In-Reply-To: <1114713169.42712c5162d83@webmail.telusplanet.net> Message-ID: I'm not sure I understand what command to enter here with what was suggested in the email thread.... I tried these commands and watir doesn't recognize the SendKeys command: ie.frame("MainBody").SendKeys(:index,1).flash or ie.frame("MainBody").SendKeys(:index,1).click I need to know the watir command to put together to do what Johnathan recommended... it sounds like that may work for me too. I don't know how to send a arrow down or tab/space bar command in order to activate the object. Kirk >From: jkohl at telusplanet.net >Reply-To: wtr-general at rubyforge.org >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] ONCLICK - not firing >Date: Thu, 28 Apr 2005 11:32:49 -0700 > >If all else fails, sendkeys might be something to try. Back in the day when >I >was doing a lot of work with SilkTest, "TypeKeys()" was something I used a >lot >if all else failed when dealing with an object I couldn't interact with. I >would click an element on the page above the troublesome element, then to a >TypeKeys down-arrow or tab to the object, and then send an enter or a space >bar >to activate it. > >I haven't used autoit or windows scripting yet, so I'm not sure how this >will >work in practice. Once Watir has support for sendkeys, it could help for >situations like these (and maybe for those drop-downs that have URLs stored >in >other files a la cbc.ca). > >-Jonathan > >Quoting Kirk Taylor : > > > I am getting much closer... cause now i can click every button on the >page, > > EXCEPT For that drop down... when I use this command: > > > > ie.button(:index,1).click > > > > I am brought back to the main page of the application... > > > > if I "flash" it to see what is clicked I dont see anything flicker as it > > does with all other buttons on the page. > > > > Is there a command to list all the buttons on the page? or maybe this >isn't > > a "button" it's more likely an ActiveX control. Here is a response we >got > > from Mercury when we tried to use QTP to get at this control (and the > > Browser crashes during the recording of the script) > > > > "Here is the technical information about what is causing the crash. The > > crash is due to one of the ActiveX controls that you are using in your > > application. The problematic ActiveX that is causing the problem has the > > ProgID of "SpectrumHR.EDataControl.1". The problem with this control is >that > > > > it implements the IOleWindow interface although it has no UI and throws > > exception which causes the crash. Implementing this interface is unusual > > when no UI exist. > > > > You can find additional information about IOleWindow on MSND > > > > >http://msdn.microsoft.com/library/en-us/com/htm/oin_ou2z_27uf.asp?frame=true" > > > > > > I hope this helps... this would be a big win for WATIR to get into our >shop, > > > > if we get this resolved. > > > > Kirk > > > > > > > > > > >From: Paul Rogers > > >Reply-To: wtr-general at rubyforge.org > > >To: wtr-general at rubyforge.org > > >Subject: RE: [Wtr-general] ONCLICK - not firing > > >Date: Thu, 28 Apr 2005 10:35:01 -0600 > > > > > >This shows as a text box and then a button for me. > > > > > >I can click the button next to it with > > >ie.button(:index,1).click > > > > > >Does that work for you? > > > > > >-----Original Message----- > > >From: wtr-general-bounces at rubyforge.org > > >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Kirk Taylor > > >Sent: 28 April 2005 10:04 > > >To: wtr-general at rubyforge.org > > >Subject: [Wtr-general] ONCLICK - not firing > > > > > > > > >I'm new to the WATIR community (and not a programmer), i'm looking > > >forward > > >to great insight into automated testing (as a team leader of a group of > > >QA > > >staff).... now for my question: > > > > > >I have a control that is *custom* made - it displays as a combo box but > > >is > > >not REALLY a combo box. I am trying to click/fire the event where my > > >HTML > > >source says it is done by using "ONCLICK"... i've attached a sample of > > >the > > >HTML page. I want to be able to click the "cboAbsencePlanCode" field. > > >THis > > >is what I have tried and got really close: > > > > > >ie.frame("MainBody").table(:index,5)[1][0].fireEvent("ONCLICK") > > > > > >but I only got the box around the combo box to highligh (I also go it >to > > > > > >*Flash* using the flash command). I am not sure I am providing enough > > >info > > >in this post, for someone to be able to assist me... but I am willing >to > > > > > >provide whatever is necessary to get this resolved. > > > > > >Thanks - Kirk > > > > > > > > > > > > > > > > > >Kirk > > > > > > > > >_______________________________________________ > > >Wtr-general mailing list > > >Wtr-general at rubyforge.org > > >http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Thu Apr 28 20:10:23 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Thu, 28 Apr 2005 18:10:23 -0600 Subject: [Wtr-general] ONCLICK - not firing In-Reply-To: Message-ID: <20050429001021.WFM14099.priv-edtnes51.telusplanet.net@tintin> I don't think we have sendkeys support yet. Sorry to lead you down the garden path. I was musing that sendkeys might be a good solution for tricky problems like this. When it becomes available, I'll test it out and post something to the FAQ. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Kirk Taylor > Sent: April 28, 2005 2:15 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] ONCLICK - not firing > > I'm not sure I understand what command to enter here with what was > suggested > in the email thread.... I tried these commands and watir doesn't recognize > the SendKeys command: > > ie.frame("MainBody").SendKeys(:index,1).flash > > or > > ie.frame("MainBody").SendKeys(:index,1).click > > I need to know the watir command to put together to do what Johnathan > recommended... it sounds like that may work for me too. I don't know how > to > send a arrow down or tab/space bar command in order to activate the > object. > > > Kirk > > > > > >From: jkohl at telusplanet.net > >Reply-To: wtr-general at rubyforge.org > >To: wtr-general at rubyforge.org > >Subject: RE: [Wtr-general] ONCLICK - not firing > >Date: Thu, 28 Apr 2005 11:32:49 -0700 > > > >If all else fails, sendkeys might be something to try. Back in the day > when > >I > >was doing a lot of work with SilkTest, "TypeKeys()" was something I used > a > >lot > >if all else failed when dealing with an object I couldn't interact with. > I > >would click an element on the page above the troublesome element, then to > a > >TypeKeys down-arrow or tab to the object, and then send an enter or a > space > >bar > >to activate it. > > > >I haven't used autoit or windows scripting yet, so I'm not sure how this > >will > >work in practice. Once Watir has support for sendkeys, it could help for > >situations like these (and maybe for those drop-downs that have URLs > stored > >in > >other files a la cbc.ca). > > > >-Jonathan > > > >Quoting Kirk Taylor : > > > > > I am getting much closer... cause now i can click every button on the > >page, > > > EXCEPT For that drop down... when I use this command: > > > > > > ie.button(:index,1).click > > > > > > I am brought back to the main page of the application... > > > > > > if I "flash" it to see what is clicked I dont see anything flicker as > it > > > does with all other buttons on the page. > > > > > > Is there a command to list all the buttons on the page? or maybe this > >isn't > > > a "button" it's more likely an ActiveX control. Here is a response we > >got > > > from Mercury when we tried to use QTP to get at this control (and the > > > Browser crashes during the recording of the script) > > > > > > "Here is the technical information about what is causing the crash. > The > > > crash is due to one of the ActiveX controls that you are using in your > > > application. The problematic ActiveX that is causing the problem has > the > > > ProgID of "SpectrumHR.EDataControl.1". The problem with this control > is > >that > > > > > > it implements the IOleWindow interface although it has no UI and > throws > > > exception which causes the crash. Implementing this interface is > unusual > > > when no UI exist. > > > > > > You can find additional information about IOleWindow on MSND > > > > > > > >http://msdn.microsoft.com/library/en- > us/com/htm/oin_ou2z_27uf.asp?frame=true" > > > > > > > > > I hope this helps... this would be a big win for WATIR to get into our > >shop, > > > > > > if we get this resolved. > > > > > > Kirk > > > > > > > > > > > > > > > >From: Paul Rogers > > > >Reply-To: wtr-general at rubyforge.org > > > >To: wtr-general at rubyforge.org > > > >Subject: RE: [Wtr-general] ONCLICK - not firing > > > >Date: Thu, 28 Apr 2005 10:35:01 -0600 > > > > > > > >This shows as a text box and then a button for me. > > > > > > > >I can click the button next to it with > > > >ie.button(:index,1).click > > > > > > > >Does that work for you? > > > > > > > >-----Original Message----- > > > >From: wtr-general-bounces at rubyforge.org > > > >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Kirk Taylor > > > >Sent: 28 April 2005 10:04 > > > >To: wtr-general at rubyforge.org > > > >Subject: [Wtr-general] ONCLICK - not firing > > > > > > > > > > > >I'm new to the WATIR community (and not a programmer), i'm looking > > > >forward > > > >to great insight into automated testing (as a team leader of a group > of > > > >QA > > > >staff).... now for my question: > > > > > > > >I have a control that is *custom* made - it displays as a combo box > but > > > >is > > > >not REALLY a combo box. I am trying to click/fire the event where my > > > >HTML > > > >source says it is done by using "ONCLICK"... i've attached a sample > of > > > >the > > > >HTML page. I want to be able to click the "cboAbsencePlanCode" field. > > > >THis > > > >is what I have tried and got really close: > > > > > > > >ie.frame("MainBody").table(:index,5)[1][0].fireEvent("ONCLICK") > > > > > > > >but I only got the box around the combo box to highligh (I also go it > >to > > > > > > > >*Flash* using the flash command). I am not sure I am providing > enough > > > >info > > > >in this post, for someone to be able to assist me... but I am willing > >to > > > > > > > >provide whatever is necessary to get this resolved. > > > > > > > >Thanks - Kirk > > > > > > > > > > > > > > > > > > > > > > > >Kirk > > > > > > > > > > > >_______________________________________________ > > > >Wtr-general mailing list > > > >Wtr-general at rubyforge.org > > > >http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > _______________________________________________ > > > Wtr-general mailing list > > > Wtr-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > >_______________________________________________ > >Wtr-general mailing list > >Wtr-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Thu Apr 28 20:53:41 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Thu, 28 Apr 2005 18:53:41 -0600 Subject: [Wtr-general] FW: Hiring an Agile Tester in the Bay Area Message-ID: <20050429005338.ZBCD11833.priv-edtnes40.telusplanet.net@tintin> FYI - Nominum is looking for agile testers with Watir experience. _____ From: agile-testing at yahoogroups.com [mailto:agile-testing at yahoogroups.com] On Behalf Of Christian Sepulveda Sent: April 28, 2005 5:13 PM To: agile-testing at yahoogroups.com Subject: [agile-testing] Hiring an Agile Tester in the Bay Area I've been at Nominum for over a year now and it has a great team and is a good place to be. I am looking for an agile tester to join the team. The full job description is below. Chris ---------- Nominum is the leading provider of IP address infrastructure solutions for Global 2000 companies. We are looking for an experienced Agile tester to work with an established XP team on a Web-based network management product. The Agile tester is responsible for working with the Customer and Developers to define requirements, specify acceptance criteria, write automated acceptance tests, understand existing code-level tests written in Java or Ruby, and test the emerging product through a series of iterations. Responsibilities Include: - Working with the Customer to clarify stories and acceptance criteria - Designing and executing acceptance-level tests for a Web application written in Java - Identifying and testing for potential risks - Identifying and reporting specific issues - Advising the team about risks and trends - Facilitating communication between the Customer and Developers - Maintaining and enhancing automated acceptance tests written in Ruby with Watir - Supporting other groups (documentation, sales engineers, etc.) in using the existing Watir test framework Minimum Qualifications: - Strong scripting skills in at least one of the following languages: Ruby, Perl, Python, or JavaScript - Strong understanding of Internet technologies, esp. IP, DNS, and BIND - Strong analysis skills - Some experience working with an IDE (IntelliJ preferred) - Experience designing and executing tests - Excellent verbal and written communication skills - Ability to prioritize and work independently - Ability to work in a team environment - Experience working on iterative development projects or testing early-stage code - Demonstrated ability to work as a technical member of a software development team Preferred Qualifications: - Bachelors or higher degree in engineering or computer science - Understanding of Extreme Programming practices (prior experience with XP preferred but not required) - At least 5 years experience working with a software development team in a technical capacity (as a programmer, technical tester, integration engineer, etc.) Please send resumes / questions to jobs-xp at nominum.com _____ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/agile-testing/ * To unsubscribe from this group, send an email to: agile-testing-unsubscribe at yahoogroups.com * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service . -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050428/98395b5d/attachment.html From paul.rogers at shaw.ca Thu Apr 28 21:19:06 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 28 Apr 2005 19:19:06 -0600 Subject: [Wtr-general] ONCLICK - not firing In-Reply-To: Message-ID: <008e01c54c59$709991c0$afd29044@NewDell> Give this a go. I may add it into watir eventually, but not right now. Paul class Util def app_activate( app = "Microsoft Internet Explorer" ) shell = WIN32OLE.new("WScript.Shell") shell.AppActivate(app) shell = nil end def sendkeys( keys , application =nil ) app_activate( application ) unless application == nil shell = WIN32OLE.new("WScript.Shell") shell.SendKeys( keys ) shell = nil end End Then in your sscript: u=Util.new u.sendkeys('g' , 'my_app.html') # the second argument is the name that appears in the title of IE # the first argument is a sendkeys string, see http://msdn.microsoft.com/library/en-us/script56/html/wsmthsendkeys.asp? frame=true For special keys -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Kirk Taylor Sent: 28 April 2005 14:15 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] ONCLICK - not firing I'm not sure I understand what command to enter here with what was suggested in the email thread.... I tried these commands and watir doesn't recognize the SendKeys command: ie.frame("MainBody").SendKeys(:index,1).flash or ie.frame("MainBody").SendKeys(:index,1).click I need to know the watir command to put together to do what Johnathan recommended... it sounds like that may work for me too. I don't know how to send a arrow down or tab/space bar command in order to activate the object. Kirk >From: jkohl at telusplanet.net >Reply-To: wtr-general at rubyforge.org >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] ONCLICK - not firing >Date: Thu, 28 Apr 2005 11:32:49 -0700 > >If all else fails, sendkeys might be something to try. Back in the day >when >I >was doing a lot of work with SilkTest, "TypeKeys()" was something I used a >lot >if all else failed when dealing with an object I couldn't interact with. I >would click an element on the page above the troublesome element, then to a >TypeKeys down-arrow or tab to the object, and then send an enter or a space >bar >to activate it. > >I haven't used autoit or windows scripting yet, so I'm not sure how >this >will >work in practice. Once Watir has support for sendkeys, it could help for >situations like these (and maybe for those drop-downs that have URLs stored >in >other files a la cbc.ca). > >-Jonathan > >Quoting Kirk Taylor : > > > I am getting much closer... cause now i can click every button on > > the >page, > > EXCEPT For that drop down... when I use this command: > > > > ie.button(:index,1).click > > > > I am brought back to the main page of the application... > > > > if I "flash" it to see what is clicked I dont see anything flicker > > as it does with all other buttons on the page. > > > > Is there a command to list all the buttons on the page? or maybe > > this >isn't > > a "button" it's more likely an ActiveX control. Here is a response > > we >got > > from Mercury when we tried to use QTP to get at this control (and > > the Browser crashes during the recording of the script) > > > > "Here is the technical information about what is causing the crash. > > The crash is due to one of the ActiveX controls that you are using > > in your application. The problematic ActiveX that is causing the > > problem has the ProgID of "SpectrumHR.EDataControl.1". The problem > > with this control is >that > > > > it implements the IOleWindow interface although it has no UI and > > throws exception which causes the crash. Implementing this interface > > is unusual when no UI exist. > > > > You can find additional information about IOleWindow on MSND > > > > >http://msdn.microsoft.com/library/en-us/com/htm/oin_ou2z_27uf.asp?frame >=true" > > > > > > I hope this helps... this would be a big win for WATIR to get into > > our >shop, > > > > if we get this resolved. > > > > Kirk > > > > > > > > > > >From: Paul Rogers > > >Reply-To: wtr-general at rubyforge.org > > >To: wtr-general at rubyforge.org > > >Subject: RE: [Wtr-general] ONCLICK - not firing > > >Date: Thu, 28 Apr 2005 10:35:01 -0600 > > > > > >This shows as a text box and then a button for me. > > > > > >I can click the button next to it with ie.button(:index,1).click > > > > > >Does that work for you? > > > > > >-----Original Message----- > > >From: wtr-general-bounces at rubyforge.org > > >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Kirk Taylor > > >Sent: 28 April 2005 10:04 > > >To: wtr-general at rubyforge.org > > >Subject: [Wtr-general] ONCLICK - not firing > > > > > > > > >I'm new to the WATIR community (and not a programmer), i'm looking > > >forward to great insight into automated testing (as a team leader > > >of a group of QA > > >staff).... now for my question: > > > > > >I have a control that is *custom* made - it displays as a combo box > > >but is not REALLY a combo box. I am trying to click/fire the event > > >where my HTML > > >source says it is done by using "ONCLICK"... i've attached a sample of > > >the > > >HTML page. I want to be able to click the "cboAbsencePlanCode" field. > > >THis > > >is what I have tried and got really close: > > > > > >ie.frame("MainBody").table(:index,5)[1][0].fireEvent("ONCLICK") > > > > > >but I only got the box around the combo box to highligh (I also go > > >it >to > > > > > >*Flash* using the flash command). I am not sure I am providing > > >enough info in this post, for someone to be able to assist me... > > >but I am willing >to > > > > > >provide whatever is necessary to get this resolved. > > > > > >Thanks - Kirk > > > > > > > > > > > > > > > > > >Kirk > > > > > > > > >_______________________________________________ > > >Wtr-general mailing list > > >Wtr-general at rubyforge.org > > >http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Thu Apr 28 21:47:01 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 28 Apr 2005 19:47:01 -0600 Subject: [Wtr-general] ONCLICK - not firing In-Reply-To: <008e01c54c59$709991c0$afd29044@NewDell> Message-ID: <009001c54c5d$5680ac70$afd29044@NewDell> There is also a new watir.rb and text_fields test and html that gives support for labels. So in your test you can now do Ie.label(:index,1).click Which in your case causes the focus to go onto the control next to it Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: 28 April 2005 19:19 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] ONCLICK - not firing Give this a go. I may add it into watir eventually, but not right now. Paul class Util def app_activate( app = "Microsoft Internet Explorer" ) shell = WIN32OLE.new("WScript.Shell") shell.AppActivate(app) shell = nil end def sendkeys( keys , application =nil ) app_activate( application ) unless application == nil shell = WIN32OLE.new("WScript.Shell") shell.SendKeys( keys ) shell = nil end End Then in your sscript: u=Util.new u.sendkeys('g' , 'my_app.html') # the second argument is the name that appears in the title of IE # the first argument is a sendkeys string, see http://msdn.microsoft.com/library/en-us/script56/html/wsmthsendkeys.asp? frame=true For special keys -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Kirk Taylor Sent: 28 April 2005 14:15 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] ONCLICK - not firing I'm not sure I understand what command to enter here with what was suggested in the email thread.... I tried these commands and watir doesn't recognize the SendKeys command: ie.frame("MainBody").SendKeys(:index,1).flash or ie.frame("MainBody").SendKeys(:index,1).click I need to know the watir command to put together to do what Johnathan recommended... it sounds like that may work for me too. I don't know how to send a arrow down or tab/space bar command in order to activate the object. Kirk >From: jkohl at telusplanet.net >Reply-To: wtr-general at rubyforge.org >To: wtr-general at rubyforge.org >Subject: RE: [Wtr-general] ONCLICK - not firing >Date: Thu, 28 Apr 2005 11:32:49 -0700 > >If all else fails, sendkeys might be something to try. Back in the day >when >I >was doing a lot of work with SilkTest, "TypeKeys()" was something I used a >lot >if all else failed when dealing with an object I couldn't interact with. I >would click an element on the page above the troublesome element, then to a >TypeKeys down-arrow or tab to the object, and then send an enter or a space >bar >to activate it. > >I haven't used autoit or windows scripting yet, so I'm not sure how >this >will >work in practice. Once Watir has support for sendkeys, it could help for >situations like these (and maybe for those drop-downs that have URLs stored >in >other files a la cbc.ca). > >-Jonathan > >Quoting Kirk Taylor : > > > I am getting much closer... cause now i can click every button on > > the >page, > > EXCEPT For that drop down... when I use this command: > > > > ie.button(:index,1).click > > > > I am brought back to the main page of the application... > > > > if I "flash" it to see what is clicked I dont see anything flicker > > as it does with all other buttons on the page. > > > > Is there a command to list all the buttons on the page? or maybe > > this >isn't > > a "button" it's more likely an ActiveX control. Here is a response > > we >got > > from Mercury when we tried to use QTP to get at this control (and > > the Browser crashes during the recording of the script) > > > > "Here is the technical information about what is causing the crash. > > The crash is due to one of the ActiveX controls that you are using > > in your application. The problematic ActiveX that is causing the > > problem has the ProgID of "SpectrumHR.EDataControl.1". The problem > > with this control is >that > > > > it implements the IOleWindow interface although it has no UI and > > throws exception which causes the crash. Implementing this interface > > is unusual when no UI exist. > > > > You can find additional information about IOleWindow on MSND > > > > >http://msdn.microsoft.com/library/en-us/com/htm/oin_ou2z_27uf.asp?frame >=true" > > > > > > I hope this helps... this would be a big win for WATIR to get into > > our >shop, > > > > if we get this resolved. > > > > Kirk > > > > > > > > > > >From: Paul Rogers > > >Reply-To: wtr-general at rubyforge.org > > >To: wtr-general at rubyforge.org > > >Subject: RE: [Wtr-general] ONCLICK - not firing > > >Date: Thu, 28 Apr 2005 10:35:01 -0600 > > > > > >This shows as a text box and then a button for me. > > > > > >I can click the button next to it with ie.button(:index,1).click > > > > > >Does that work for you? > > > > > >-----Original Message----- > > >From: wtr-general-bounces at rubyforge.org > > >[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Kirk Taylor > > >Sent: 28 April 2005 10:04 > > >To: wtr-general at rubyforge.org > > >Subject: [Wtr-general] ONCLICK - not firing > > > > > > > > >I'm new to the WATIR community (and not a programmer), i'm looking > > >forward to great insight into automated testing (as a team leader > > >of a group of QA > > >staff).... now for my question: > > > > > >I have a control that is *custom* made - it displays as a combo box > > >but is not REALLY a combo box. I am trying to click/fire the event > > >where my HTML > > >source says it is done by using "ONCLICK"... i've attached a sample of > > >the > > >HTML page. I want to be able to click the "cboAbsencePlanCode" field. > > >THis > > >is what I have tried and got really close: > > > > > >ie.frame("MainBody").table(:index,5)[1][0].fireEvent("ONCLICK") > > > > > >but I only got the box around the combo box to highligh (I also go > > >it >to > > > > > >*Flash* using the flash command). I am not sure I am providing > > >enough info in this post, for someone to be able to assist me... > > >but I am willing >to > > > > > >provide whatever is necessary to get this resolved. > > > > > >Thanks - Kirk > > > > > > > > > > > > > > > > > >Kirk > > > > > > > > >_______________________________________________ > > >Wtr-general mailing list > > >Wtr-general at rubyforge.org > > >http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From zeljko.filipin at gmail.com Fri Apr 29 02:13:10 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 29 Apr 2005 08:13:10 +0200 Subject: [Wtr-general] require In-Reply-To: <593b9ae805042810397e70e9a1@mail.gmail.com> Message-ID: <4271d055.52985be3.744c.5100@mx.gmail.com> Try adding $:.unshift File.join(File.dirname(__FILE__), "..", "lib") require ... at the beggining of the file. Zeljko -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Shao Kang Tat Sent: Thursday, April 28, 2005 7:39 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] require hey guys, I have 3 files C:\....\folder1\test\test.rb C:\....\folder1\class.rb C:\....\folder1\objects.rb in the test.rb file I have require '../class.rb' which is fine but in class.rb I have require 'objects.rb' that's when it starts to compain to me that there is no such file to load...if I put all three files in the same directory, and take out the "../" from the test.rb it works fine...any ideas? Shao _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From ati.ozgur at gmail.com Fri Apr 29 04:15:22 2005 From: ati.ozgur at gmail.com (Atilla Ozgur) Date: Fri, 29 Apr 2005 11:15:22 +0300 Subject: [Wtr-general] autoit winhelper internationalization In-Reply-To: <5.1.0.14.2.20050428072901.038cfb80@127.0.0.1> References: <5.1.0.14.2.20050428072901.038cfb80@127.0.0.1> Message-ID: I was unable to find this text with regedit. HKEY/LOCAL MACHINE/SOFTWARE/MICROSOFT/INTERNET EXPLORER does not contain such a key/value/data. . On 4/28/05, Bret Pettichord wrote: > from windowhelper.rb: > >@autoit.WinWait "Microsoft Internet Explorer", "" > > I'm pretty sure that the title is different depending on the language of > the system. It may even vary if you have a version of IE that was provided > by your ISP (e.g. "AT&T Worldnet Microsoft Internet Explorer"). > > Can we pull this text from the registry instead? > > Bret > > _____________________ > Bret Pettichord > www.pettichord.com > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From Ramya.Moorthy at honeywell.com Fri Apr 29 06:30:40 2005 From: Ramya.Moorthy at honeywell.com (Ramya Ramalinga, Moorthy (IE10)) Date: Fri, 29 Apr 2005 03:30:40 -0700 Subject: [Wtr-general] Re: How to Access a Checkbox in a Table / Clicking on a Image in side a Table Message-ID: <77ED2BF75D59D1439F90412CC5B109741D23812D@ie10-sahara.hiso.honeywell.com> Hi Kevin/Bret, Thanks for your suggesstion. I am able use the checkbox method in the latest watir version taken from CVS. Does the latest version supports all the methods available in the module FactoryMethods inside a Table? If no , what are the methods supported inside a Table ? For example, If I try to access a Image in Table Cell [2][6] , I am getting error. Can anyone help me out in this regard? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Code: table=$ie.table(:id,'Table4') puts table table[2][6].image(:alt,"Edit Parameter").click // I also tried with id/src attributes Output: C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2553:in `initialize': undefined method `getDocument' for # (NoMethodError) from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:386:in `new' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:386:in `image' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Thanks. Ramya HONEYWELL- Bangalore -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050429/9e7c05a8/attachment.html From Ramya.Moorthy at honeywell.com Fri Apr 29 07:59:55 2005 From: Ramya.Moorthy at honeywell.com (Ramya Ramalinga, Moorthy (IE10)) Date: Fri, 29 Apr 2005 04:59:55 -0700 Subject: [Wtr-general] RE: RE: How to click on the cell for a dynamic Table Message-ID: <77ED2BF75D59D1439F90412CC5B109741D255E7C@ie10-sahara.hiso.honeywell.com> Hi Paul, I tried using the method, 'update_row_cells',as per your suggesstion , but it also doesn't work. The Javscript Code for Table Tag
Some Text From a database entry
More Text From a database entry
A7 Other Problem  
   Full
A7 Other Problem  
   Full
A7Other Problem > > > > >   >
   Full
A7 Other Problem  
   Full
A7Other Problem > > > > >   >
   Full
A7Other Problem > > > > >   >
   Full
A7Other Problem > > > > >   >
   Full
A7Other Problem > > > > >   >
   Full
A7Other Problem > > > > >   >
   Full
A7Other Problem > > > > >   >
   Full
A7Other Problem > > > > >   >
   Full
A7Other Problem > > > > >   >
   Full
A7Other Problem > > > > >   >
   Full
A7Other Problem > > > > >   >
   Full
A7Other Problem > > > > >   >
   Full
A7Other Problem > > > > >   >
   Full
A7Other Problem > > > > >   >
   Full
in a
Message-ID: <72799cd70504200613702466ce@mail.gmail.com> Hi... I was working with a client on a problem, and narrowed it down to something that looks like
inside a
? Thanks... -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050420/31ea4e86/attachment.html From paul.rogers at shaw.ca Wed Apr 20 09:54:42 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 20 Apr 2005 07:54:42 -0600 Subject: [Wtr-general] syntax help? ONCLICK in
in a
In-Reply-To: <72799cd70504200613702466ce@mail.gmail.com> Message-ID: <004801c545b0$81053550$6400a8c0@NewDell> lots of ways: ie=table(:id,"mytable")[row][col].click row is an integer for the row number, col same ie.cell(:id, 'mycell').click ie.row(:id, "myrow")[col].click hope thats what you need Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Chris McMahon Sent: 20 April 2005 07:14 To: wtr-general at rubyforge.org Subject: [Wtr-general] syntax help? ONCLICK in
in a
Hi... I was working with a client on a problem, and narrowed it down to something that looks like
inside a
? Thanks... -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050420/19090b63/attachment.html From dpdevmail at myway.com Wed Apr 20 12:41:37 2005 From: dpdevmail at myway.com (dpdev) Date: Wed, 20 Apr 2005 12:41:37 -0400 (EDT) Subject: [Wtr-general] Table mouse-up Message-ID: <20050420164137.E63D53A24@mprdmxin.myway.com> Hello, I've been using Watir and am having fun so far. It's a nice tool. I'm stuck on something I'm wondering if folks here can help with. I'm trying to send a click to an "Add New Row" button in Infragistics's WebGrid control. The problem is, the click isn't a click and the button isn't a button. I'll essplain. The button is a decorated table cell made to look like a button (a bad decision on the maker's part, I think, for this and other reasons), and the cell itself does not have a click event. Instead, the table itself has mouseUp and mouseDown handlers to process clicks. So I can say "$ie.cell(:id, "xctl0somegrid_0").click" and see the cell "clicked" with the yellow highlight flash while Watir's running, but nothing happens. The table tag has the following attributes: onmousedown='igtbl_cellClickDown(event,"xctl0somegrid");' onmouseup='igtbl_cellClickUp(event,"xctl0somegrid");' Again, this is the table tag that has the attributes/events, not a row "tr" or a cell "td." How can I make these fire using Watir? These are mouse and not click handlers, so it doesn't seem like the built-in stuff can get me a handle to them. I've thought about trying to just fire the scripts from Watir somehow, but haven't come up with a solution yet. Any help would be appreciated. Thanks! - Mike _______________________________________________ No banners. No pop-ups. No kidding. Make My Way your home on the Web - http://www.myway.com From irushton at olysoftit.com Wed Apr 20 13:06:47 2005 From: irushton at olysoftit.com (Ian Rushton) Date: Wed, 20 Apr 2005 13:06:47 -0400 Subject: [Wtr-general] Table mouse-up In-Reply-To: <20050420164137.E63D53A24@mprdmxin.myway.com> Message-ID: <200504201701.j3KH11dS031950@rubyforge.org> Did you try the fire_event onKeyUp or onKeyPress to see if they trigger the button. Your call should look like: $ie.cell(:id, "xctl0somegrid_0").fire_event("onKeyUp") Ian Rushton -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of dpdev Sent: Wednesday, April 20, 2005 12:42 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Table mouse-up Hello, I've been using Watir and am having fun so far. It's a nice tool. I'm stuck on something I'm wondering if folks here can help with. I'm trying to send a click to an "Add New Row" button in Infragistics's WebGrid control. The problem is, the click isn't a click and the button isn't a button. I'll essplain. The button is a decorated table cell made to look like a button (a bad decision on the maker's part, I think, for this and other reasons), and the cell itself does not have a click event. Instead, the table itself has mouseUp and mouseDown handlers to process clicks. So I can say "$ie.cell(:id, "xctl0somegrid_0").click" and see the cell "clicked" with the yellow highlight flash while Watir's running, but nothing happens. The table tag has the following attributes: onmousedown='igtbl_cellClickDown(event,"xctl0somegrid");' onmouseup='igtbl_cellClickUp(event,"xctl0somegrid");' Again, this is the table tag that has the attributes/events, not a row "tr" or a cell "td." How can I make these fire using Watir? These are mouse and not click handlers, so it doesn't seem like the built-in stuff can get me a handle to them. I've thought about trying to just fire the scripts from Watir somehow, but haven't come up with a solution yet. Any help would be appreciated. Thanks! - Mike _______________________________________________ No banners. No pop-ups. No kidding. Make My Way your home on the Web - http://www.myway.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Wed Apr 20 13:11:21 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 20 Apr 2005 11:11:21 -0600 Subject: [Wtr-general] Table mouse-up In-Reply-To: <20050420164137.E63D53A24@mprdmxin.myway.com> Message-ID: <006601c545cb$f94e8f00$6400a8c0@NewDell> I can add the mouseUp and mouseDown events to the click event, but not for a few days (Id need to write unit tests for all objects which is the time consuming part) I suggest you do the following for now - you may have to expreiment with the class that its in - Im not sure if watir generated events will propogate - something we should try. Add this to the top of your script. It will override watirs method for the table only ( I hope ) Class Table def click @o.fire_event("onMouseDown") super @o.fire_event("onMouseUp") end end Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of dpdev Sent: 20 April 2005 10:42 To: wtr-general at rubyforge.org Subject: [Wtr-general] Table mouse-up Hello, I've been using Watir and am having fun so far. It's a nice tool. I'm stuck on something I'm wondering if folks here can help with. I'm trying to send a click to an "Add New Row" button in Infragistics's WebGrid control. The problem is, the click isn't a click and the button isn't a button. I'll essplain. The button is a decorated table cell made to look like a button (a bad decision on the maker's part, I think, for this and other reasons), and the cell itself does not have a click event. Instead, the table itself has mouseUp and mouseDown handlers to process clicks. So I can say "$ie.cell(:id, "xctl0somegrid_0").click" and see the cell "clicked" with the yellow highlight flash while Watir's running, but nothing happens. The table tag has the following attributes: onmousedown='igtbl_cellClickDown(event,"xctl0somegrid");' onmouseup='igtbl_cellClickUp(event,"xctl0somegrid");' Again, this is the table tag that has the attributes/events, not a row "tr" or a cell "td." How can I make these fire using Watir? These are mouse and not click handlers, so it doesn't seem like the built-in stuff can get me a handle to them. I've thought about trying to just fire the scripts from Watir somehow, but haven't come up with a solution yet. Any help would be appreciated. Thanks! - Mike _______________________________________________ No banners. No pop-ups. No kidding. Make My Way your home on the Web - http://www.myway.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From lsusilo at rsasecurity.com Wed Apr 20 19:19:35 2005 From: lsusilo at rsasecurity.com (Susilo, Laudhi) Date: Wed, 20 Apr 2005 16:19:35 -0700 Subject: [Wtr-general] Access Denied on Waiting for document Message-ID: <2548B245CD5B9D45AC32CF3889D2E6D00205B9DC@rsana-ex-va1.NA.RSA.NET> Could anyone give me a light on this error message please? \W, [20-Apr-2005 16:09:20#632] WARN -- : frame error in waitdocument OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:480:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:480:in `waitForIE' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:479:in `upto' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:479:in `waitForIE' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1584:in `click' E:/Console/console.rb:12 The last command executed was: $ie.link(:text,"Log On").click And it was successfully login. Thanks, Laudhi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050420/b25870ad/attachment.html From paul.rogers at shaw.ca Wed Apr 20 19:31:10 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 20 Apr 2005 17:31:10 -0600 Subject: [Wtr-general] Table mouse-up In-Reply-To: <006601c545cb$f94e8f00$6400a8c0@NewDell> Message-ID: <002101c54601$08af1250$6400a8c0@NewDell> Ive received some comments off the list that I shouldn't do this. The main reason is that its harder to test individual JS events if they all get fired. The suggestion is we leave it as it is, and expect the user to use Ie.button(:index,1).fire_event("onMouseDown") Obviously button would also apply to every object too. My reasoning for adding it is this is what would happen to a user - they would move the mouse over the object, press the button, causing the mouseDown event, etc Im now not sure what to do. Any suggestions are welcome! Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: 20 April 2005 11:11 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Table mouse-up I can add the mouseUp and mouseDown events to the click event, but not for a few days (Id need to write unit tests for all objects which is the time consuming part) I suggest you do the following for now - you may have to expreiment with the class that its in - Im not sure if watir generated events will propogate - something we should try. Add this to the top of your script. It will override watirs method for the table only ( I hope ) Class Table def click @o.fire_event("onMouseDown") super @o.fire_event("onMouseUp") end end Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of dpdev Sent: 20 April 2005 10:42 To: wtr-general at rubyforge.org Subject: [Wtr-general] Table mouse-up Hello, I've been using Watir and am having fun so far. It's a nice tool. I'm stuck on something I'm wondering if folks here can help with. I'm trying to send a click to an "Add New Row" button in Infragistics's WebGrid control. The problem is, the click isn't a click and the button isn't a button. I'll essplain. The button is a decorated table cell made to look like a button (a bad decision on the maker's part, I think, for this and other reasons), and the cell itself does not have a click event. Instead, the table itself has mouseUp and mouseDown handlers to process clicks. So I can say "$ie.cell(:id, "xctl0somegrid_0").click" and see the cell "clicked" with the yellow highlight flash while Watir's running, but nothing happens. The table tag has the following attributes: onmousedown='igtbl_cellClickDown(event,"xctl0somegrid");' onmouseup='igtbl_cellClickUp(event,"xctl0somegrid");' Again, this is the table tag that has the attributes/events, not a row "tr" or a cell "td." How can I make these fire using Watir? These are mouse and not click handlers, so it doesn't seem like the built-in stuff can get me a handle to them. I've thought about trying to just fire the scripts from Watir somehow, but haven't come up with a solution yet. Any help would be appreciated. Thanks! - Mike _______________________________________________ No banners. No pop-ups. No kidding. Make My Way your home on the Web - http://www.myway.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 From paul.rogers at shaw.ca Wed Apr 20 19:33:51 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 20 Apr 2005 17:33:51 -0600 Subject: [Wtr-general] Access Denied on Waiting for document In-Reply-To: <2548B245CD5B9D45AC32CF3889D2E6D00205B9DC@rsana-ex-va1.NA.RSA.NET> Message-ID: <002201c54601$68f44e00$6400a8c0@NewDell> there was a bug with this some time back. If you are using an older version of watir, I wouldnt worry about it. If its a recent one from cvs, you may be trying to use a frame document, where one of the frames is in a different domain, which is a security feature in IE that we cant do anything about Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi Sent: 20 April 2005 17:20 To: wtr-general at rubyforge.org Subject: [Wtr-general] Access Denied on Waiting for document Could anyone give me a light on this error message please? \W, [20-Apr-2005 16:09:20#632] WARN -- : frame error in waitdocument OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:480:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:480:in `waitForIE' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:479:in `upto' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:479:in `waitForIE' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1584:in `click' E:/Console/console.rb:12 The last command executed was: $ie.link(:text,"Log On").click And it was successfully login. Thanks, Laudhi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050420/e5c8b36c/attachment.html From lsusilo at rsasecurity.com Wed Apr 20 19:45:27 2005 From: lsusilo at rsasecurity.com (Susilo, Laudhi) Date: Wed, 20 Apr 2005 16:45:27 -0700 Subject: [Wtr-general] Access Denied on Waiting for document Message-ID: <2548B245CD5B9D45AC32CF3889D2E6D00205B9EE@rsana-ex-va1.NA.RSA.NET> I'm using version 1.2 zip file. Are you considering this an old one? Is there any way to know whether one of the frames is from different domain just by looking at the html source? Thanks, Laudhi ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, April 20, 2005 4:34 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Access Denied on Waiting for document there was a bug with this some time back. If you are using an older version of watir, I wouldnt worry about it. If its a recent one from cvs, you may be trying to use a frame document, where one of the frames is in a different domain, which is a security feature in IE that we cant do anything about Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi Sent: 20 April 2005 17:20 To: wtr-general at rubyforge.org Subject: [Wtr-general] Access Denied on Waiting for document Could anyone give me a light on this error message please? \W, [20-Apr-2005 16:09:20#632] WARN -- : frame error in waitdocument OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:480:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:480:in `waitForIE' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:479:in `upto' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:479:in `waitForIE' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1584:in `click' E:/Console/console.rb:12 The last command executed was: $ie.link(:text,"Log On").click And it was successfully login. Thanks, Laudhi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050420/e90e9556/attachment.html From paul.rogers at shaw.ca Wed Apr 20 20:00:27 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 20 Apr 2005 18:00:27 -0600 Subject: [Wtr-general] Access Denied on Waiting for document In-Reply-To: <2548B245CD5B9D45AC32CF3889D2E6D00205B9EE@rsana-ex-va1.NA.RSA.NET> Message-ID: <003501c54605$2007cc90$6400a8c0@NewDell> using irb, goto the page where you do the click, and then type ie.show_frames you may see access denied errors then click the link using watir in irb and do show_frames again you may see access denied agian. You can also goto IE, right click and do properties from the menu - that will show the url Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi Sent: 20 April 2005 17:45 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Access Denied on Waiting for document I'm using version 1.2 zip file. Are you considering this an old one? Is there any way to know whether one of the frames is from different domain just by looking at the html source? Thanks, Laudhi _____ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, April 20, 2005 4:34 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Access Denied on Waiting for document there was a bug with this some time back. If you are using an older version of watir, I wouldnt worry about it. If its a recent one from cvs, you may be trying to use a frame document, where one of the frames is in a different domain, which is a security feature in IE that we cant do anything about Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi Sent: 20 April 2005 17:20 To: wtr-general at rubyforge.org Subject: [Wtr-general] Access Denied on Waiting for document Could anyone give me a light on this error message please? \W, [20-Apr-2005 16:09:20#632] WARN -- : frame error in waitdocument OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:480:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:480:in `waitForIE' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:479:in `upto' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:479:in `waitForIE' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1584:in `click' E:/Console/console.rb:12 The last command executed was: $ie.link(:text,"Log On").click And it was successfully login. Thanks, Laudhi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050420/be94e013/attachment.html From andy__s at hotmail.com Wed Apr 20 20:06:01 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Wed, 20 Apr 2005 20:06:01 -0400 Subject: [Wtr-general] Table mouse-up Message-ID: I can see the need to test the javascript events in isolation, but I also can see how it'd be useful to run it where click means do everything that a real click would do. What if it was made configurable with something like $ie.auto_fire_events = true --- this way you could turn the behavior on and off in the middle of testing as desired. Internally this would be a bit of rework, perhaps some strategies or something, but it shouldn't be bad. -andy ----Original Message Follows---- From: Paul Rogers <paul.rogers at shaw.ca> Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Table mouse-up Date: Wed, 20 Apr 2005 17:31:10 -0600 Ive received some comments off the list that I shouldn't do this. The main reason is that its harder to test individual JS events if they all get fired. The suggestion is we leave it as it is, and expect the user to use Ie.button(:index,1).fire_event("onMouseDown") Obviously button would also apply to every object too. My reasoning for adding it is this is what would happen to a user - they would move the mouse over the object, press the button, causing the mouseDown event, etc Im now not sure what to do. Any suggestions are welcome! Paul From andy__s at hotmail.com Wed Apr 20 20:13:57 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Wed, 20 Apr 2005 20:13:57 -0400 Subject: [Wtr-general] image support In-Reply-To: <009b01c54552$3fac2bd0$6400a8c0@NewDell> Message-ID: Are the tests for watir/simple available? ----Original Message Follows---- From: Paul Rogers <paul.rogers at shaw.ca> Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] image support Date: Tue, 19 Apr 2005 20:40:00 -0600 The unit tests for watir/simple also use webrick. Id like to keep the unit tests as simple as possible. In this case it seems like a good idea to have webrick run, its part of the standard library and I think it uses port 3000 ( or maybe that's just rails) by default, so shouldnt interfere with any thing else. I say check it in, and see if any one complains ;-) Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: 19 April 2005 20:25 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] image support I took a stab at the image support and I"ve got it pretty much working as expected. There are a couple of caveats: 1) html pages that are viewed local (file:///) don't get their images put into the cache. I detect if the src is local and just copy from the real file location. In this case the image is not coming from the cache but from the raw src location. 2) I tried several approaches to working with the IE file cache, The way the items are stored by IE is unique to say the least... In the end I settled on just searching all the cache items directly and looking for possible matches based on name and then selecting the most recent version based on time. In all the cases I tried this gave me the correct image. Since pages that are viewed from the local drive do not get their elements cached, I've been using a local web server to test the cache searching stuff. I'd like to have the tests just start up an instance of webbrick and point it to the html directory to validate that the cache searching works as expected --- what are the thoughts on putting this into the tests? -andy ----Original Message Follows---- From: Paul Rogers &lt;paul.rogers at shaw.ca&gt; Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] image support Date: Sat, 16 Apr 2005 16:58:07 -0600 Jonathan suggested that just a few weeks ago. I put it in the tracker so I wouldn't forget it. In fact I may have a need for it soon. Why don't you give it a go? Paul _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From lsusilo at rsasecurity.com Wed Apr 20 20:40:44 2005 From: lsusilo at rsasecurity.com (Susilo, Laudhi) Date: Wed, 20 Apr 2005 17:40:44 -0700 Subject: [Wtr-general] Access Denied on Waiting for document Message-ID: <2548B245CD5B9D45AC32CF3889D2E6D00205BA08@rsana-ex-va1.NA.RSA.NET> When I call $ie.showFrames on the page, I've got: There are 1 frames Frame index:0 --Access Denied- The domain is the same as the url of the page. Thanks so much, Laudhi ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, April 20, 2005 5:00 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Access Denied on Waiting for document using irb, goto the page where you do the click, and then type ie.show_frames you may see access denied errors then click the link using watir in irb and do show_frames again you may see access denied agian. You can also goto IE, right click and do properties from the menu - that will show the url Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi Sent: 20 April 2005 17:45 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Access Denied on Waiting for document I'm using version 1.2 zip file. Are you considering this an old one? Is there any way to know whether one of the frames is from different domain just by looking at the html source? Thanks, Laudhi ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Wednesday, April 20, 2005 4:34 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Access Denied on Waiting for document there was a bug with this some time back. If you are using an older version of watir, I wouldnt worry about it. If its a recent one from cvs, you may be trying to use a frame document, where one of the frames is in a different domain, which is a security feature in IE that we cant do anything about Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi Sent: 20 April 2005 17:20 To: wtr-general at rubyforge.org Subject: [Wtr-general] Access Denied on Waiting for document Could anyone give me a light on this error message please? \W, [20-Apr-2005 16:09:20#632] WARN -- : frame error in waitdocument OLE error code:80070005 in Access is denied. HRESULT error code:0x80020009 Exception occurred. c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:480:in `method_missing' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:480:in `waitForIE' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:479:in `upto' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:479:in `waitForIE' c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1584:in `click' E:/Console/console.rb:12 The last command executed was: $ie.link(:text,"Log On").click And it was successfully login. Thanks, Laudhi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050420/829dbe50/attachment.html From jkohl at telusplanet.net Wed Apr 20 20:49:26 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Wed, 20 Apr 2005 18:49:26 -0600 Subject: [Wtr-general] Table mouse-up In-Reply-To: <002101c54601$08af1250$6400a8c0@NewDell> Message-ID: <20050421004914.PTXY27212.priv-edtnes40.telusplanet.net@tintin> At least one objection came from me because it could possibly cause unintended side-effects. I may want to test different events on that object, so in some cases I would rather simulate the mouseup, mousedown etc. events with fire_event. Also, since there are a lot of events that could be fired with different names, one might have to do fire_event anyway. Or, if a dev has wired up the object to use fire_event in a different way than Watir triggers it, you could end up with strange results. I'm not hard-nosed about it, just basing this on things I've seen. I don't have to get my way. :) -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: April 20, 2005 5:31 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Table mouse-up > > Ive received some comments off the list that I shouldn't do this. The > main reason is that its harder to test individual JS events if they all > get fired. > > The suggestion is we leave it as it is, and expect the user to use > Ie.button(:index,1).fire_event("onMouseDown") > Obviously button would also apply to every object too. > > My reasoning for adding it is this is what would happen to a user - they > would move the mouse over the object, press the button, causing the > mouseDown event, etc > > Im now not sure what to do. > > Any suggestions are welcome! > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers > Sent: 20 April 2005 11:11 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Table mouse-up > > > I can add the mouseUp and mouseDown events to the click event, but not > for a few days (Id need to write unit tests for all objects which is the > time consuming part) > > I suggest you do the following for now - you may have to expreiment with > the class that its in - Im not sure if watir generated events will > propogate - something we should try. > > Add this to the top of your script. It will override watirs method for > the table only ( I hope ) > > Class Table > > def click > @o.fire_event("onMouseDown") > super > @o.fire_event("onMouseUp") > end > end > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of dpdev > Sent: 20 April 2005 10:42 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] Table mouse-up > > > > Hello, > > I've been using Watir and am having fun so far. It's a nice tool. > > I'm stuck on something I'm wondering if folks here can help with. I'm > trying to send a click to an "Add New Row" button in Infragistics's > WebGrid control. The problem is, the click isn't a click and the button > isn't a button. I'll essplain. > > The button is a decorated table cell made to look like a button (a bad > decision on the maker's part, I think, for this and other reasons), and > the cell itself does not have a click event. Instead, the table itself > has mouseUp and mouseDown handlers to process clicks. So I can say > "$ie.cell(:id, "xctl0somegrid_0").click" and see the cell "clicked" with > the yellow highlight flash while Watir's running, but nothing happens. > > The table tag has the following attributes: > > onmousedown='igtbl_cellClickDown(event,"xctl0somegrid");' > onmouseup='igtbl_cellClickUp(event,"xctl0somegrid");' > > Again, this is the table tag that has the attributes/events, not a row > "tr" or a cell "td." > > How can I make these fire using Watir? These are mouse and not click > handlers, so it doesn't seem like the built-in stuff can get me a handle > to them. I've thought about trying to just fire the scripts from Watir > somehow, but haven't come up with a solution yet. > > Any help would be appreciated. > > Thanks! > > - Mike > > _______________________________________________ > No banners. No pop-ups. No kidding. > Make My Way your home on the Web - http://www.myway.com > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From dpdevmail at myway.com Thu Apr 21 09:34:47 2005 From: dpdevmail at myway.com (dpdev) Date: Thu, 21 Apr 2005 09:34:47 -0400 (EDT) Subject: [Wtr-general] Table mouse-up Message-ID: <20050421133447.196793A0C@mprdmxin.myway.com> Thanks to all for the help. I've been recommending this tool above others within my organization because of the active support community around it. I don't want to change the functionality of Watir; just trying to get my darn script working. ;) I took Ian's advice and here's where I'm at now: $ie.cell(:id, "UltraWebGrid1an_0").fireEvent("onmousedown") $ie.cell(:id, "UltraWebGrid1an_0").fireEvent("onmouseup") The way a new row placeholder is added to the grid is that _both_ of these events need to fire. So I can now send these events to the grid. However, I've run into another problem. I'm firing both events, as above, but the JS event object's button property is then used to determine which mouse button was clicked. When I click the button/cell manually, the value for "button" is either 1 or 2, depending on which button I click. But when Watir "clicks" the button, the value of "button" is 0 (and again this is the built-in button property of the DOM's event object, IOW event.button). So I'm simulating a click, but the Infragistics script can't determine which mouse button was clicked because neither was actually clicked. [They're using this to determine left- and right-button clicks for different functionality.] The DOM docs say that "button" can be set, but even if true I'm not sure how I'd set and pass it within the sequence of events I'm trying to fire. It's almost like I want to pass an argument with the button number to the mouseup/down event handlers, but I don't think that can be done (even tried it). So I'm simulating the mousedown/up events, but somehow need to simulate the actual button clicks? A general, alternative approach would be to just try to call the functions that the mousedown/up scripts point to but there's so much going on, with other elements referenced, that it doesn't seem possible. Any ideas? - Mike _______________________________________________ No banners. No pop-ups. No kidding. Make My Way your home on the Web - http://www.myway.com From paul.rogers at shaw.ca Thu Apr 21 10:09:17 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 21 Apr 2005 08:09:17 -0600 Subject: [Wtr-general] RE: pop up confirmation using Wa In-Reply-To: <593b9ae805042020284d872952@mail.gmail.com> Message-ID: <001801c5467b$b4d0c630$6400a8c0@NewDell> You need to start the clicker in a new process. #includes: require 'watir' # the watir controller include Watir $ie = IE.new() $page = 'http://www.fallpro.com/newsite/test/index.php' $w = WinClicker.new() $ie.goto($page) #*** START CLICKER HERE $w.winsystem('start clicker.rb') # I think this is the correct script ;-) $ie.button(:name, "submit").click Now, this is likely to change. AutoIt has some good support for things like this, and there is now some code in Watir to use it. You would use this instead: require 'watir/WindowHelper' helper = WindowHelper.new helper.push_confirm_button_ok() You will have to get the latest from cvs, and download and install AutoIt as well Paul -----Original Message----- From: Shao Kang Tat [mailto:shaorobics at gmail.com] Sent: 20 April 2005 21:28 To: paul.rogers at shaw.ca Subject: pop up confirmation using Wa Hi Paul I got your email through a forum I've been reading and it seems you are the expert to ask :) I have a simple thing to do in my script but I can't get it to work! basically I want it to go to: http://www.fallpro.com/newsite/test/index.php Then have the script click on "submit" without entering any data, and have the "clicker" click "OK" on the pop up box that occurs..but my script hangs. Mind taking a quick look? #includes: require 'watir' # the watir controller include Watir $ie = IE.new() $page = 'http://www.fallpro.com/newsite/test/index.php' $w = WinClicker.new() $ie.goto($page) #*** START CLICKER HERE $ie.button(:name, "submit").click #*** HAVE CLICKER CLICK "OK" ON POP UP I've tried many things but I'm out of ideas but I really need this to work because the company I'm working for is making a shift from QuickTest to Watir but we're still in the analyzing phase, weighing advantages to disadvantages. I personally would like Watir to win. So please help me if you can! Thanks so much! Shao From paul.rogers at shaw.ca Thu Apr 21 10:15:11 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 21 Apr 2005 08:15:11 -0600 Subject: [Wtr-general] Table mouse-up In-Reply-To: <20050421133447.196793A0C@mprdmxin.myway.com> Message-ID: <001901c5467c$87680f40$6400a8c0@NewDell> You could possibly ( Ive never tried...) run a javascript using this http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/execsc ript.asp?frame=true So in watir you would do $ie.ie.window.execScript(myMethod , 'javascript') I'll look into that event problem some more. Looks like we need to fake the event object as well as the event. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of dpdev Sent: 21 April 2005 07:35 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Table mouse-up Thanks to all for the help. I've been recommending this tool above others within my organization because of the active support community around it. I don't want to change the functionality of Watir; just trying to get my darn script working. ;) I took Ian's advice and here's where I'm at now: $ie.cell(:id, "UltraWebGrid1an_0").fireEvent("onmousedown") $ie.cell(:id, "UltraWebGrid1an_0").fireEvent("onmouseup") The way a new row placeholder is added to the grid is that _both_ of these events need to fire. So I can now send these events to the grid. However, I've run into another problem. I'm firing both events, as above, but the JS event object's button property is then used to determine which mouse button was clicked. When I click the button/cell manually, the value for "button" is either 1 or 2, depending on which button I click. But when Watir "clicks" the button, the value of "button" is 0 (and again this is the built-in button property of the DOM's event object, IOW event.button). So I'm simulating a click, but the Infragistics script can't determine which mouse button was clicked because neither was actually clicked. [They're using this to determine left- and right-button clicks for different functionality.] The DOM docs say that "button" can be set, but even if true I'm not sure how I'd set and pass it within the sequence of events I'm trying to fire. It's almost like I want to pass an argument with the button number to the mouseup/down event handlers, but I don't think that can be done (even tried it). So I'm simulating the mousedown/up events, but somehow need to simulate the actual button clicks? A general, alternative approach would be to just try to call the functions that the mousedown/up scripts point to but there's so much going on, with other elements referenced, that it doesn't seem possible. Any ideas? - Mike _______________________________________________ No banners. No pop-ups. No kidding. Make My Way your home on the Web - http://www.myway.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From dpdevmail at myway.com Thu Apr 21 14:26:53 2005 From: dpdevmail at myway.com (dpdev) Date: Thu, 21 Apr 2005 14:26:53 -0400 (EDT) Subject: [Wtr-general] Table mouse-up Message-ID: <20050421182653.C13B612CF9@mprdmxin.myway.com> Paul, Thanks for your help. I think I'm getting closer, but I can't get the "window" property--it doesn't seem to be a valid property of the InternetExplorer object, here: http://msdn.microsoft.com/workshop/browser/webbrowser/reference/objects/internetexplorer.asp So these lines work: puts $ie.ie puts $ie.ie.Document As do any others with properties as listed in the above document, but I don't see a window property on the object. When I do: puts $ie.ie.window no reference is shown. Instead, I get the error "unknown property or method 'window'." So I can't get to execScript without the window reference. I did search the list archives on this and didn't find any examples. Thanks again for all the help. - Mike --- On Thu 04/21, Paul Rogers < paul.rogers at shaw.ca > wrote: From: Paul Rogers [mailto: paul.rogers at shaw.ca] To: wtr-general at rubyforge.org Date: Thu, 21 Apr 2005 08:15:11 -0600 Subject: RE: [Wtr-general] Table mouse-up You could possibly ( Ive never tried...) run a javascript using this
http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/execsc
ript.asp?frame=true


So in watir you would do

$ie.ie.window.execScript(myMethod , 'javascript')



I'll look into that event problem some more. Looks like we need to fake
the event object as well as the event.

Paul

-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of dpdev
Sent: 21 April 2005 07:35
To: wtr-general at rubyforge.org
Subject: RE: [Wtr-general] Table mouse-up



Thanks to all for the help. I've been recommending this tool above
others within my organization because of the active support community
around it.

I don't want to change the functionality of Watir; just trying to get my
darn script working. ;)

I took Ian's advice and here's where I'm at now:

$ie.cell(:id, "UltraWebGrid1an_0").fireEvent("onmousedown")
$ie.cell(:id, "UltraWebGrid1an_0").fireEvent("onmouseup")

The way a new row placeholder is added to the grid is that _both_ of
these events need to fire. So I can now send these events to the grid.
However, I've run into another problem.

I'm firing both events, as above, but the JS event object's button
property is then used to determine which mouse button was clicked.

When I click the button/cell manually, the value for "button" is either
1 or 2, depending on which button I click. But when Watir "clicks" the
button, the value of "button" is 0 (and again this is the built-in
button property of the DOM's event object, IOW event.button).

So I'm simulating a click, but the Infragistics script can't determine
which mouse button was clicked because neither was actually clicked.
[They're using this to determine left- and right-button clicks for
different functionality.]

The DOM docs say that "button" can be set, but even if true I'm not sure
how I'd set and pass it within the sequence of events I'm trying to
fire. It's almost like I want to pass an argument with the button number
to the mouseup/down event handlers, but I don't think that can be done
(even tried it).

So I'm simulating the mousedown/up events, but somehow need to simulate
the actual button clicks?

A general, alternative approach would be to just try to call the
functions that the mousedown/up scripts point to but there's so much
going on, with other elements referenced, that it doesn't seem possible.

Any ideas?

- Mike

_______________________________________________
No banners. No pop-ups. No kidding.
Make My Way your home on the Web - http://www.myway.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
_______________________________________________ No banners. No pop-ups. No kidding. Make My Way your home on the Web - http://www.myway.com From paul.rogers at shaw.ca Thu Apr 21 15:15:11 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 21 Apr 2005 13:15:11 -0600 Subject: [Wtr-general] Table mouse-up In-Reply-To: <20050421182653.C13B612CF9@mprdmxin.myway.com> Message-ID: <003901c546a6$7087f180$6400a8c0@NewDell> I've been looking at this a bit too. You can get the window by http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/par entwindow.asp Win = $ie.ie.document.parentWindow Ive also been looking at the createEvent Object: http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/create eventobject.asp?frame=true Now, I can make it work in javascript, but not fom watir. Heres the code Ive been using Class IE def create_event_object( params ) #event = @ie.document.parentWindow.event #ev = @ie.document.createEventObject(event) ev = @ie.document.createEventObject() params.each_pair do |k,v| eval("ev.#{k} = #{v}" ) end return ev end end Class ObjectActions def fireEvent(event , event_object = nil ) object_exist_check object_disabled_check highLight(:set) if event_object == nil @o.fireEvent("#{event}") else puts "Using supplied event!" @o.fireEvent("#{event}" , event_object) end @ieController.waitForIE() highLight(:clear) end end And then in your script e = ie.create_event_object( {'button' => 1} ) ie.button(:value, 'Click Tester').fireEvent('onMouseDown',e) But it the button property in the browser isnt set when I examine it. I'll keep trying and see if anything comes up Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of dpdev Sent: 21 April 2005 12:27 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Table mouse-up Paul, Thanks for your help. I think I'm getting closer, but I can't get the "window" property--it doesn't seem to be a valid property of the InternetExplorer object, here: http://msdn.microsoft.com/workshop/browser/webbrowser/reference/objects/ internetexplorer.asp So these lines work: puts $ie.ie puts $ie.ie.Document As do any others with properties as listed in the above document, but I don't see a window property on the object. When I do: puts $ie.ie.window no reference is shown. Instead, I get the error "unknown property or method 'window'." So I can't get to execScript without the window reference. I did search the list archives on this and didn't find any examples. Thanks again for all the help. - Mike --- On Thu 04/21, Paul Rogers < paul.rogers at shaw.ca > wrote: From: Paul Rogers [mailto: paul.rogers at shaw.ca] To: wtr-general at rubyforge.org Date: Thu, 21 Apr 2005 08:15:11 -0600 Subject: RE: [Wtr-general] Table mouse-up You could possibly ( Ive never tried...) run a javascript using this
http://msdn.microsoft.com/workshop/author/dhtml/reference/method s/execsc
ript.asp?frame=true


So in watir you would do

$ie.ie.window.execScript(myMethod , 'javascript')



I'll look into that event problem some more. Looks like we need to fake
the event object as well as the event.

Paul

-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyfor ge.org] On Behalf Of dpdev
Sent: 21 April 2005 07:35
To: wtr-general at rubyforge.org
Subject: RE: [Wtr-general] Table mouse-up



Thanks to all for the help. I've been recommending this tool above
others within my organization because of the active support community
around it.

I don't want to change the functionality of Watir; just trying to get my
darn script working. ;)

I took Ian's advice and here's where I'm at now:
$ie.cell(:id, >"UltraWebGrid1an_0").fireEvent("onmousedown")
$ie.cell(:id, "UltraWebGrid1an_0").fireEvent("onmouseup")

The way a new row placeholder is added to the grid is that _both_ of
these events need to fire. So I can now send these events to the grid.
However, I've run into another problem.

I'm firing both events, as above, but the JS event object's button
property is then used to determine which mouse button was clicked.

When I click the button/cell manually, the value for "button" is either
1 or 2, depending on which button I click. But when Watir "clicks" the
button, the value of "button" is 0 (and again this is the built-in
button property of the DOM's event object, IOW event.button).

So I'm simulating a click, but the Infragistics script can't determine
which mouse button was clicked because neither was actually clicked.
[They're using this to determine left- and right-button clicks for
different functiona! lity.]

The DOM docs say that "button" can be set, but even if true I'm not sure
how I'd set and pass it within the sequence of events I'm trying to
fire. It's almost like I want to pass an argument with the button number
to the mouseup/down event handlers, but I don't think that can be done
(even tried it).

So I'm simulating the mousedown/up events, but somehow need to simulate
the actual button clicks?

A general, alternative approach would be to just try to call the
functions that the mousedown/up scripts point to but there's so much
going on, with other elements referenced, that it doesn't seem possible.

Any ideas?

- Mike

_______________________________________________
No banners. No pop-ups. No kidding.
Make My Way your home on the Web - http://www.myway.com
_______________________________________________< br>Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listin fo! /wtr-general

_______________________________________________
W tr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listin fo/wtr-general
_______________________________________________ No banners. No pop-ups. No kidding. Make My Way your home on the Web - http://www.myway.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Thu Apr 21 15:56:00 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 21 Apr 2005 13:56:00 -0600 Subject: [Wtr-general] image support In-Reply-To: Message-ID: <003c01c546ac$245533d0$6400a8c0@NewDell> This is from a mail in February The tests Im thinking of may be from systir which you can get from rubyforge Paul ---------------------------------------------- Hi Karlin There is a watir subdir - put it in there, this way it will end up installed in C:\ruby\lib\ruby\site_ruby\1.8\watir So a user would then do require 'watir/simple' Thanks for your contribution - I hear great things about it. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of fox at atomicobject.com Sent: 16 February 2005 11:43 To: wtr-general at rubyforge.org Subject: [Wtr-general] Announcing Watir::Simple and Systir Hi, Those of you who attended AWTA6 might remember my presentation on a simple domain-language system testing framework built on top of Watir. Brett suggested that the lower-level library be put directly into Watir's repository as an extension, with the idea that others may want to build layers on top of Watir and that they should be a part of the project itself. We have now prepared the bottom half of this library for release and we are calling it Watir::Simple (watir_simple.rb), taking advantage of the new module name for Watir. What I want to know from developers on this list is: where in the repository should this stuff go? Next to watir.rb? In an extensions/ directory? As soon as this is decided, I'll commit the file to the Watir repository. We are also pleased to announce on this list that the upper-level library, which we are calling Systir (System Testing in Ruby) has been released along with the demo that I showed at AWTA this year. It's available at http://rubyforge.org/projects/systir This project is a standalone system testing project that is not necessarily tied to Watir. However it's development was certainly driven by Watir so we hope to see this community using or contributing to Systir soon! The demo I showed at the conference is in the examples/mondo_pizza directory in the Systir package. Happy testing! -Karlin _______________________________________________ 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 -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: 20 April 2005 18:14 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] image support Are the tests for watir/simple available? ----Original Message Follows---- From: Paul Rogers <paul.rogers at shaw.ca> Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] image support Date: Tue, 19 Apr 2005 20:40:00 -0600 The unit tests for watir/simple also use webrick. Id like to keep the unit tests as simple as possible. In this case it seems like a good idea to have webrick run, its part of the standard library and I think it uses port 3000 ( or maybe that's just rails) by default, so shouldnt interfere with any thing else. I say check it in, and see if any one complains ;-) Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: 19 April 2005 20:25 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] image support I took a stab at the image support and I"ve got it pretty much working as expected. There are a couple of caveats: 1) html pages that are viewed local (file:///) don't get their images put into the cache. I detect if the src is local and just copy from the real file location. In this case the image is not coming from the cache but from the raw src location. 2) I tried several approaches to working with the IE file cache, The way the items are stored by IE is unique to say the least... In the end I settled on just searching all the cache items directly and looking for possible matches based on name and then selecting the most recent version based on time. In all the cases I tried this gave me the correct image. Since pages that are viewed from the local drive do not get their elements cached, I've been using a local web server to test the cache searching stuff. I'd like to have the tests just start up an instance of webbrick and point it to the html directory to validate that the cache searching works as expected --- what are the thoughts on putting this into the tests? -andy ----Original Message Follows---- From: Paul Rogers &lt;paul.rogers at shaw.ca&gt; Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] image support Date: Sat, 16 Apr 2005 16:58:07 -0600 Jonathan suggested that just a few weeks ago. I put it in the tracker so I wouldn't forget it. In fact I may have a need for it soon. Why don't you give it a go? Paul _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From andy__s at hotmail.com Thu Apr 21 17:16:38 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Thu, 21 Apr 2005 17:16:38 -0400 Subject: [Wtr-general] image support In-Reply-To: <009b01c54552$3fac2bd0$6400a8c0@NewDell> Message-ID: I checked the changes in. The only thing I was unhappy with was the logging the webrick does to the console. I tried several different configurations and no matter what it spits a little to the console. Thanks -andy ----Original Message Follows---- Subject: RE: [Wtr-general] image support Date: Tue, 19 Apr 2005 20:40:00 -0600 The unit tests for watir/simple also use webrick. Id like to keep the unit tests as simple as possible. In this case it seems like a good idea to have webrick run, its part of the standard library and I think it uses port 3000 ( or maybe that's just rails) by default, so shouldnt interfere with any thing else. I say check it in, and see if any one complains ;-) Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: 19 April 2005 20:25 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] image support I took a stab at the image support and I"ve got it pretty much working as expected. There are a couple of caveats: 1) html pages that are viewed local (file:///) don't get their images put into the cache. I detect if the src is local and just copy from the real file location. In this case the image is not coming from the cache but from the raw src location. 2) I tried several approaches to working with the IE file cache, From paul.rogers at shaw.ca Thu Apr 21 21:14:06 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Thu, 21 Apr 2005 19:14:06 -0600 Subject: [Wtr-general] image support In-Reply-To: Message-ID: <005001c546d8$94c84400$6400a8c0@NewDell> Thanks Andy this looks really good! Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: 21 April 2005 15:17 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] image support I checked the changes in. The only thing I was unhappy with was the logging the webrick does to the console. I tried several different configurations and no matter what it spits a little to the console. Thanks -andy ----Original Message Follows---- Subject: RE: [Wtr-general] image support Date: Tue, 19 Apr 2005 20:40:00 -0600 The unit tests for watir/simple also use webrick. Id like to keep the unit tests as simple as possible. In this case it seems like a good idea to have webrick run, its part of the standard library and I think it uses port 3000 ( or maybe that's just rails) by default, so shouldnt interfere with any thing else. I say check it in, and see if any one complains ;-) Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: 19 April 2005 20:25 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] image support I took a stab at the image support and I"ve got it pretty much working as expected. There are a couple of caveats: 1) html pages that are viewed local (file:///) don't get their images put into the cache. I detect if the src is local and just copy from the real file location. In this case the image is not coming from the cache but from the raw src location. 2) I tried several approaches to working with the IE file cache, _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From lsusilo at rsasecurity.com Thu Apr 21 23:44:48 2005 From: lsusilo at rsasecurity.com (Susilo, Laudhi) Date: Thu, 21 Apr 2005 20:44:48 -0700 Subject: [Wtr-general] Accessing Pop-up menu Message-ID: <2548B245CD5B9D45AC32CF3889D2E6D00205BBD0@rsana-ex-va1.NA.RSA.NET> Hi, I have a link that when clicked it displays a pop-up menu. I need to click one of the link on the menu. $ie.link(:text,'user1').click $ie.link(:text,'Edit').click The problem is that the first function does not return anything and wait infinitely (the spinner just keep spinning). The pop-up menu is displayed though with several links such as View, Edit. Somehow the 'Edit' link cannot be access (object not found) without clicking the user's link first. Is there any other way to access the pop-up menu? Please find the HTML code attached. Thanks for the help. - Laudhi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050421/33ccaea3/attachment.html -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: popupmenu.txt Url: http://rubyforge.org/pipermail/wtr-general/attachments/20050421/33ccaea3/attachment.txt From ati.ozgur at gmail.com Fri Apr 22 03:22:39 2005 From: ati.ozgur at gmail.com (Atilla Ozgur) Date: Fri, 22 Apr 2005 10:22:39 +0300 Subject: [Wtr-general] Accessing Pop-up menu In-Reply-To: <2548B245CD5B9D45AC32CF3889D2E6D00205BBD0@rsana-ex-va1.NA.RSA.NET> References: <2548B245CD5B9D45AC32CF3889D2E6D00205BBD0@rsana-ex-va1.NA.RSA.NET> Message-ID: I am sorry but I was unable to use your example manually. I use IE 6.1, Windows XP SP2. I click to admin link manually but nothing happens. Firefox give me the same result. if you give me a better examle about what you want to do, may be I can help. > > Please find the HTML code attached. > From lsusilo at rsasecurity.com Fri Apr 22 12:20:22 2005 From: lsusilo at rsasecurity.com (Susilo, Laudhi) Date: Fri, 22 Apr 2005 09:20:22 -0700 Subject: [Wtr-general] Accessing Pop-up menu Message-ID: <2548B245CD5B9D45AC32CF3889D2E6D00205BC0F@rsana-ex-va1.NA.RSA.NET> The html code attached is not a complete HTML content, but only a portion of code that I need to access. Unfortunately I cannot disclose the complete HTML code. Thanks for the help. - Laudhi -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Atilla Ozgur Sent: Friday, April 22, 2005 12:23 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Accessing Pop-up menu I am sorry but I was unable to use your example manually. I use IE 6.1, Windows XP SP2. I click to admin link manually but nothing happens. Firefox give me the same result. if you give me a better examle about what you want to do, may be I can help. > > Please find the HTML code attached. > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From andy__s at hotmail.com Fri Apr 22 14:06:04 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Fri, 22 Apr 2005 14:06:04 -0400 Subject: [Wtr-general] Accessing Pop-up menu Message-ID: I tried to boil your sample down to a basic html file -- its attached. It basically uses overlib to create a link that shows a table (the submenu) when clicked. I tried to keep the syntax of the overlib call as close in my sample as in your sample, but I've never seen some of the REFX stuff (I'm by no means an overlib expert). ***note I'm using the latest version of overlib from the web, you'll have to have that in the same folder as the html file for this to work*** If you access the sample via watir it seems to work as expected: require 'watir' include Watir $ie = ie.start("file:///c:/sample.html") $ie.link(:text, /Menu/).click $ie.link(:text, /Item1/).flash $ie.link(:text, /Item2/).flash $ie.link(:text, /Item1/).click Maybe my sample isn't accurate or something else is off? If you could look at the sample and update it to be closer that might help. There are some subtle differences in the markup (embedded ' and such) also. Thanks -andy ----Original Message Follows---- From: "Susilo, Laudhi" <lsusilo at rsasecurity.com> Reply-To: wtr-general at rubyforge.org To: <wtr-general at rubyforge.org> Subject: [Wtr-general] Accessing Pop-up menu Date: Thu, 21 Apr 2005 20:44:48 -0700 Hi, I have a link that when clicked it displays a pop-up menu. I need to click one of the link on the menu. $ie.link(:text,'user1').click $ie.link(:text,'Edit').click The problem is that the first function does not return anything and wait infinitely (the spinner just keep spinning). The pop-up menu is displayed though with several links such as View, Edit. Somehow the 'Edit' link cannot be access (object not found) without clicking the user's link first. Is there any other way to access the pop-up menu? Please find the HTML code attached. Thanks for the help. - Laudhi << popupmenu.txt >> _______________________________________________ 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/20050422/dfcf71df/attachment.html From andy__s at hotmail.com Fri Apr 22 14:25:33 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Fri, 22 Apr 2005 14:25:33 -0400 Subject: [Wtr-general] Accessing Pop-up menu In-Reply-To: Message-ID: One other question, are you using overlib or overlibmws? I found the refx items under overlibmws and setup a sample using that -- it seems to work fine also. Are you using any javascript plugins that come with overlibmws? -andy ----Original Message Follows---- From: "Andy Sipe" <andy__s at hotmail.com> Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu Date: Fri, 22 Apr 2005 14:06:04 -0400 I tried to boil your sample down to a basic html file -- its attached. It basically uses overlib to create a link that shows a table (the submenu) when clicked. I tried to keep the syntax of the overlib call as close in my sample as in your sample, but I've never seen some of the REFX stuff (I'm by no means an overlib expert). ***note I'm using the latest version of overlib from the web, you'll have to have that in the same folder as the html file for this to work*** If you access the sample via watir it seems to work as expected: require 'watir' include Watir $ie = ie.start("file:///c:/sample.html") $ie.link(:text, /Menu/).click $ie.link(:text, /Item1/).flash $ie.link(:text, /Item2/).flash $ie.link(:text, /Item1/).click Maybe my sample isn't accurate or something else is off? If you could look at the sample and update it to be closer that might help. There are some subtle differences in the markup (embedded ' and such) also. Thanks -andy ----Original Message Follows---- From: &quot;Susilo, Laudhi&quot; &lt;lsusilo at rsasecurity.com&gt; Reply-To: wtr-general at rubyforge.org To: &lt;wtr-general at rubyforge.org&gt; Subject: [Wtr-general] Accessing Pop-up menu Date: Thu, 21 Apr 2005 20:44:48 -0700 Hi, I have a link that when clicked it displays a pop-up menu. I need to click one of the link on the menu. $ie.link(:text,'user1').click $ie.link(:text,'Edit').click The problem is that the first function does not return anything and wait infinitely (the spinner just keep spinning). The pop-up menu is displayed though with several links such as View, Edit. Somehow the 'Edit' link cannot be access (object not found) without clicking the user's link first. Is there any other way to access the pop-up menu? Please find the HTML code attached. Thanks for the help. - Laudhi &lt;&lt; popupmenu.txt &gt;&gt; _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general << sample.html >> _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From dpdevmail at myway.com Fri Apr 22 15:04:18 2005 From: dpdevmail at myway.com (dpdev) Date: Fri, 22 Apr 2005 15:04:18 -0400 (EDT) Subject: [Wtr-general] Table mouse-up Message-ID: <20050422190418.CFDE23A2C@mprdmxin.myway.com> Paul, Thanks again for your help. We're trying here too, even outside Watir by just interacting with the IE COM object (which is ultimately what we're all doing, right?). - Mike --- On Thu 04/21, Paul Rogers < paul.rogers at shaw.ca > wrote: From: Paul Rogers [mailto: paul.rogers at shaw.ca] To: wtr-general at rubyforge.org Date: Thu, 21 Apr 2005 13:15:11 -0600 Subject: RE: [Wtr-general] Table mouse-up I've been looking at this a bit too. I'll keep trying and see if anything comes up

Paul
_______________________________________________ No banners. No pop-ups. No kidding. Make My Way your home on the Web - http://www.myway.com From lsusilo at rsasecurity.com Fri Apr 22 15:14:11 2005 From: lsusilo at rsasecurity.com (Susilo, Laudhi) Date: Fri, 22 Apr 2005 12:14:11 -0700 Subject: [Wtr-general] Accessing Pop-up menu Message-ID: <2548B245CD5B9D45AC32CF3889D2E6D00205BCDB@rsana-ex-va1.NA.RSA.NET> Firstly, thanks so much for your effort. I noticed in the HTML code, is uses: overlib_mini.js, overlibmws.js and overlibmws_iframe.js. I try the first two libraries with your sample code and they work just fine. I'm still trying to get it work with the overlibmws_iframe.js. Back to the original problem, I try use flash after click the menu, but the problem still exists: the spinner keep waiting for document completion. Thanks, Laudhi -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: Friday, April 22, 2005 11:26 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu One other question, are you using overlib or overlibmws? I found the refx items under overlibmws and setup a sample using that -- it seems to work fine also. Are you using any javascript plugins that come with overlibmws? -andy ----Original Message Follows---- From: "Andy Sipe" <andy__s at hotmail.com> Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu Date: Fri, 22 Apr 2005 14:06:04 -0400 I tried to boil your sample down to a basic html file -- its attached. It basically uses overlib to create a link that shows a table (the submenu) when clicked. I tried to keep the syntax of the overlib call as close in my sample as in your sample, but I've never seen some of the REFX stuff (I'm by no means an overlib expert). ***note I'm using the latest version of overlib from the web, you'll have to have that in the same folder as the html file for this to work*** If you access the sample via watir it seems to work as expected: require 'watir' include Watir $ie = ie.start("file:///c:/sample.html") $ie.link(:text, /Menu/).click $ie.link(:text, /Item1/).flash $ie.link(:text, /Item2/).flash $ie.link(:text, /Item1/).click Maybe my sample isn't accurate or something else is off? If you could look at the sample and update it to be closer that might help. There are some subtle differences in the markup (embedded ' and such) also. Thanks -andy ----Original Message Follows---- From: &quot;Susilo, Laudhi&quot; &lt;lsusilo at rsasecurity.com&gt; Reply-To: wtr-general at rubyforge.org To: &lt;wtr-general at rubyforge.org&gt; Subject: [Wtr-general] Accessing Pop-up menu Date: Thu, 21 Apr 2005 20:44:48 -0700 Hi, I have a link that when clicked it displays a pop-up menu. I need to click one of the link on the menu. $ie.link(:text,'user1').click $ie.link(:text,'Edit').click The problem is that the first function does not return anything and wait infinitely (the spinner just keep spinning). The pop-up menu is displayed though with several links such as View, Edit. Somehow the 'Edit' link cannot be access (object not found) without clicking the user's link first. Is there any other way to access the pop-up menu? Please find the HTML code attached. Thanks for the help. - Laudhi &lt;&lt; popupmenu.txt &gt;&gt; _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general << sample.html >> _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Sun Apr 24 19:25:06 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sun, 24 Apr 2005 17:25:06 -0600 Subject: [Wtr-general] Accessing Pop-up menu In-Reply-To: Message-ID: <005101c54924$d9765b70$6400a8c0@NewDell> Andy, is this something we can add to our examples directory? Would we need to do much with it to make it usable as a demo for menus? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: 22 April 2005 12:06 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu I tried to boil your sample down to a basic html file -- its attached. It basically uses overlib to create a link that shows a table (the submenu) when clicked. I tried to keep the syntax of the overlib call as close in my sample as in your sample, but I've never seen some of the REFX stuff (I'm by no means an overlib expert). ***note I'm using the latest version of overlib from the web, you'll have to have that in the same folder as the html file for this to work*** If you access the sample via watir it seems to work as expected: require 'watir' include Watir $ie = ie.start("file:///c:/sample.html") $ie.link(:text, /Menu/).click $ie.link(:text, /Item1/).flash $ie.link(:text, /Item2/).flash $ie.link(:text, /Item1/).click Maybe my sample isn't accurate or something else is off? If you could look at the sample and update it to be closer that might help. There are some subtle differences in the markup (embedded ' and such) also. Thanks -andy ----Original Message Follows---- From: "Susilo, Laudhi" <lsusilo at rsasecurity.com> Reply-To: wtr-general at rubyforge.org To: <wtr-general at rubyforge.org> Subject: [Wtr-general] Accessing Pop-up menu Date: Thu, 21 Apr 2005 20:44:48 -0700 Hi, I have a link that when clicked it displays a pop-up menu. I need to click one of the link on the menu. $ie.link(:text,'user1').click $ie.link(:text,'Edit').click The problem is that the first function does not return anything and wait infinitely (the spinner just keep spinning). The pop-up menu is displayed though with several links such as View, Edit. Somehow the 'Edit' link cannot be access (object not found) without clicking the user's link first. Is there any other way to access the pop-up menu? Please find the HTML code attached. Thanks for the help. - Laudhi << popupmenu.txt >> _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From andy__s at hotmail.com Sun Apr 24 20:17:46 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Sun, 24 Apr 2005 20:17:46 -0400 Subject: [Wtr-general] Accessing Pop-up menu In-Reply-To: <2548B245CD5B9D45AC32CF3889D2E6D00205BCDB@rsana-ex-va1.NA.RSA.NET> Message-ID: I've tried it several ways using the iframe js stuff and I cannot get it to fail :( Another thought I had was just to access the link directly. Without triggering the menus. With the sample, using overlibmws: ie.link(:text, /Item1/).click Do this directly without worrying about the javascript menu layers. It might at least get you going forward? -andy ----Original Message Follows---- From: "Susilo, Laudhi" <lsusilo at rsasecurity.com> Reply-To: wtr-general at rubyforge.org To: <wtr-general at rubyforge.org> Subject: RE: [Wtr-general] Accessing Pop-up menu Date: Fri, 22 Apr 2005 12:14:11 -0700 Firstly, thanks so much for your effort. I noticed in the HTML code, is uses: overlib_mini.js, overlibmws.js and overlibmws_iframe.js. I try the first two libraries with your sample code and they work just fine. I'm still trying to get it work with the overlibmws_iframe.js. Back to the original problem, I try use flash after click the menu, but the problem still exists: the spinner keep waiting for document completion. Thanks, Laudhi -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: Friday, April 22, 2005 11:26 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu One other question, are you using overlib or overlibmws? I found the refx items under overlibmws and setup a sample using that -- it seems to work fine also. Are you using any javascript plugins that come with overlibmws? -andy ----Original Message Follows---- From: &quot;Andy Sipe&quot; &lt;andy__s at hotmail.com&gt; Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu Date: Fri, 22 Apr 2005 14:06:04 -0400 I tried to boil your sample down to a basic html file -- its attached. It basically uses overlib to create a link that shows a table (the submenu) when clicked. I tried to keep the syntax of the overlib call as close in my sample as in your sample, but I've never seen some of the REFX stuff (I'm by no means an overlib expert). ***note I'm using the latest version of overlib from the web, you'll have to have that in the same folder as the html file for this to work*** If you access the sample via watir it seems to work as expected: require 'watir' include Watir $ie = ie.start(&quot;file:///c:/sample.html&quot;) $ie.link(:text, /Menu/).click $ie.link(:text, /Item1/).flash $ie.link(:text, /Item2/).flash $ie.link(:text, /Item1/).click Maybe my sample isn't accurate or something else is off? If you could look at the sample and update it to be closer that might help. There are some subtle differences in the markup (embedded ' and such) also. Thanks -andy ----Original Message Follows---- From: &amp;quot;Susilo, Laudhi&amp;quot; &amp;lt;lsusilo at rsasecurity.com&amp;gt; Reply-To: wtr-general at rubyforge.org To: &amp;lt;wtr-general at rubyforge.org&amp;gt; Subject: [Wtr-general] Accessing Pop-up menu Date: Thu, 21 Apr 2005 20:44:48 -0700 Hi, I have a link that when clicked it displays a pop-up menu. I need to click one of the link on the menu. $ie.link(:text,'user1').click $ie.link(:text,'Edit').click The problem is that the first function does not return anything and wait infinitely (the spinner just keep spinning). The pop-up menu is displayed though with several links such as View, Edit. Somehow the 'Edit' link cannot be access (object not found) without clicking the user's link first. Is there any other way to access the pop-up menu? Please find the HTML code attached. Thanks for the help. - Laudhi &amp;lt;&amp;lt; popupmenu.txt &amp;gt;&amp;gt; _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general &lt;&lt; sample.html &gt;&gt; _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From andy__s at hotmail.com Sun Apr 24 20:21:27 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Sun, 24 Apr 2005 20:21:27 -0400 Subject: [Wtr-general] Accessing Pop-up menu In-Reply-To: <005101c54924$d9765b70$6400a8c0@NewDell> Message-ID: Let me check into it. Shouldn't be a problem. -andy ----Original Message Follows---- From: Paul Rogers <paul.rogers at shaw.ca> Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu Date: Sun, 24 Apr 2005 17:25:06 -0600 Andy, is this something we can add to our examples directory? Would we need to do much with it to make it usable as a demo for menus? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: 22 April 2005 12:06 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu I tried to boil your sample down to a basic html file -- its attached. It basically uses overlib to create a link that shows a table (the submenu) when clicked. I tried to keep the syntax of the overlib call as close in my sample as in your sample, but I've never seen some of the REFX stuff (I'm by no means an overlib expert). ***note I'm using the latest version of overlib from the web, you'll have to have that in the same folder as the html file for this to work*** If you access the sample via watir it seems to work as expected: require 'watir' include Watir $ie = ie.start("file:///c:/sample.html") $ie.link(:text, /Menu/).click $ie.link(:text, /Item1/).flash $ie.link(:text, /Item2/).flash $ie.link(:text, /Item1/).click Maybe my sample isn't accurate or something else is off? If you could look at the sample and update it to be closer that might help. There are some subtle differences in the markup (embedded ' and such) also. Thanks -andy ----Original Message Follows---- From: &quot;Susilo, Laudhi&quot; &lt;lsusilo at rsasecurity.com&gt; Reply-To: wtr-general at rubyforge.org To: &lt;wtr-general at rubyforge.org&gt; Subject: [Wtr-general] Accessing Pop-up menu Date: Thu, 21 Apr 2005 20:44:48 -0700 Hi, I have a link that when clicked it displays a pop-up menu. I need to click one of the link on the menu. $ie.link(:text,'user1').click $ie.link(:text,'Edit').click The problem is that the first function does not return anything and wait infinitely (the spinner just keep spinning). The pop-up menu is displayed though with several links such as View, Edit. Somehow the 'Edit' link cannot be access (object not found) without clicking the user's link first. Is there any other way to access the pop-up menu? Please find the HTML code attached. Thanks for the help. - Laudhi &lt;&lt; popupmenu.txt &gt;&gt; _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Ramya.Moorthy at honeywell.com Mon Apr 25 08:55:50 2005 From: Ramya.Moorthy at honeywell.com (Ramya Ramalinga, Moorthy (IE10)) Date: Mon, 25 Apr 2005 05:55:50 -0700 Subject: [Wtr-general] How to access a CheckBox inside a Table Message-ID: <77ED2BF75D59D1439F90412CC5B109741CDC273A@ie10-sahara.hiso.honeywell.com> Hi All, I would like to know how to set/clear the Check Box Control placed inside a Table. Also, is there any method available in Watir::Table , which returns the Row/Column information if we provide the Cell Element Value. > Regards, > Ramya > Honeywell > DES - SAIF > Extn : 8674 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050425/a4b22c15/attachment.html From etabora at brandmuscle.com Mon Apr 25 11:51:58 2005 From: etabora at brandmuscle.com (Eric Tabora) Date: Mon, 25 Apr 2005 11:51:58 -0400 Subject: [Wtr-general] Simulating Keystrokes Message-ID: Is there anyway to simulate a keystroke, such as 'Return' or 'Tab'? ------ Eric Tabora, Quality Assurance BrandMuscle, Inc. P: 216.454.2010 Cell: 216-577-2835 etabora at brandmuscle.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050425/05c4c2a5/attachment.html From paul.rogers at shaw.ca Mon Apr 25 12:41:25 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 25 Apr 2005 10:41:25 -0600 Subject: [Wtr-general] Simulating Keystrokes In-Reply-To: Message-ID: <005901c549b5$9ee6a0f0$afd29044@NewDell> for a text area or text field /t and /n ( or /r) may work other wise try autoit Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Eric Tabora Sent: 25 April 2005 09:52 To: wtr-general at rubyforge.org Subject: [Wtr-general] Simulating Keystrokes Is there anyway to simulate a keystroke, such as 'Return' or 'Tab'? ------ Eric Tabora, Quality Assurance BrandMuscle, Inc. P: 216.454.2010 Cell: 216-577-2835 etabora at brandmuscle.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050425/96de92bc/attachment.html From paul.rogers at shaw.ca Mon Apr 25 12:42:24 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 25 Apr 2005 10:42:24 -0600 Subject: [Wtr-general] How to access a CheckBox inside a Table In-Reply-To: <77ED2BF75D59D1439F90412CC5B109741CDC273A@ie10-sahara.hiso.honeywell.com> Message-ID: <005e01c549b5$c27edf50$afd29044@NewDell> ie.table(:id, 'my_table)[1[2].checkbox(:index,1).set for the second question, the answer is no! You can do it yourself easily though Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ramya Ramalinga, Moorthy (IE10) Sent: 25 April 2005 06:56 To: wtr-general at rubyforge.org Subject: [Wtr-general] How to access a CheckBox inside a Table Hi All, I would like to know how to set/clear the Check Box Control placed inside a Table. Also, is there any method available in Watir::Table , which returns the Row/Column information if we provide the Cell Element Value. Regards, Ramya Honeywell DES - SAIF Extn : 8674 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050425/17c4cff2/attachment.html From lsusilo at rsasecurity.com Mon Apr 25 13:34:24 2005 From: lsusilo at rsasecurity.com (Susilo, Laudhi) Date: Mon, 25 Apr 2005 10:34:24 -0700 Subject: [Wtr-general] Accessing Pop-up menu Message-ID: <2548B245CD5B9D45AC32CF3889D2E6D00205BE3B@rsana-ex-va1.NA.RSA.NET> I tried accessing the menu's item directly, but somehow the link did not exist yet. One of the differences about the sample page and the actual html is the number of frames. The page that I'm trying to access has 4 frames. I tried to put a simple debugging message on the wait function (Watir.rb): until @ie.document.frames[i.to_s].document.readyState == "complete" puts "Sleep..." Sleep 002 s.spin end This function keeps looping: E:\Console>console there are 4 frames frame index: 0 name: frame index: 1 name: frame index: 2 name: frame index: 3 name: gToday:agenda.js Sleep... \Sleep... |Sleep... /Sleep... -Sleep... \Sleep... -Sleep... The spinner will keep spinning until I click one of the menu's items manually and so the script can continue to next syntax. I can make this to work by commenting out the part of the wait function that does the wait on frames: #until @ie.document.frames[i.to_s].document.readyState == "complete" #sleep 002 #s.spin #end I don't think this is a good approach. Thanks for any suggestion. - Laudhi -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: Sunday, April 24, 2005 5:18 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu I've tried it several ways using the iframe js stuff and I cannot get it to fail :( Another thought I had was just to access the link directly. Without triggering the menus. With the sample, using overlibmws: ie.link(:text, /Item1/).click Do this directly without worrying about the javascript menu layers. It might at least get you going forward? -andy ----Original Message Follows---- From: "Susilo, Laudhi" <lsusilo at rsasecurity.com> Reply-To: wtr-general at rubyforge.org To: <wtr-general at rubyforge.org> Subject: RE: [Wtr-general] Accessing Pop-up menu Date: Fri, 22 Apr 2005 12:14:11 -0700 Firstly, thanks so much for your effort. I noticed in the HTML code, is uses: overlib_mini.js, overlibmws.js and overlibmws_iframe.js. I try the first two libraries with your sample code and they work just fine. I'm still trying to get it work with the overlibmws_iframe.js. Back to the original problem, I try use flash after click the menu, but the problem still exists: the spinner keep waiting for document completion. Thanks, Laudhi -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: Friday, April 22, 2005 11:26 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu One other question, are you using overlib or overlibmws? I found the refx items under overlibmws and setup a sample using that -- it seems to work fine also. Are you using any javascript plugins that come with overlibmws? -andy ----Original Message Follows---- From: &quot;Andy Sipe&quot; &lt;andy__s at hotmail.com&gt; Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu Date: Fri, 22 Apr 2005 14:06:04 -0400 I tried to boil your sample down to a basic html file -- its attached. It basically uses overlib to create a link that shows a table (the submenu) when clicked. I tried to keep the syntax of the overlib call as close in my sample as in your sample, but I've never seen some of the REFX stuff (I'm by no means an overlib expert). ***note I'm using the latest version of overlib from the web, you'll have to have that in the same folder as the html file for this to work*** If you access the sample via watir it seems to work as expected: require 'watir' include Watir $ie = ie.start(&quot;file:///c:/sample.html&quot;) $ie.link(:text, /Menu/).click $ie.link(:text, /Item1/).flash $ie.link(:text, /Item2/).flash $ie.link(:text, /Item1/).click Maybe my sample isn't accurate or something else is off? If you could look at the sample and update it to be closer that might help. There are some subtle differences in the markup (embedded ' and such) also. Thanks -andy ----Original Message Follows---- From: &amp;quot;Susilo, Laudhi&amp;quot; &amp;lt;lsusilo at rsasecurity.com&amp;gt; Reply-To: wtr-general at rubyforge.org To: &amp;lt;wtr-general at rubyforge.org&amp;gt; Subject: [Wtr-general] Accessing Pop-up menu Date: Thu, 21 Apr 2005 20:44:48 -0700 Hi, I have a link that when clicked it displays a pop-up menu. I need to click one of the link on the menu. $ie.link(:text,'user1').click $ie.link(:text,'Edit').click The problem is that the first function does not return anything and wait infinitely (the spinner just keep spinning). The pop-up menu is displayed though with several links such as View, Edit. Somehow the 'Edit' link cannot be access (object not found) without clicking the user's link first. Is there any other way to access the pop-up menu? Please find the HTML code attached. Thanks for the help. - Laudhi &amp;lt;&amp;lt; popupmenu.txt &amp;gt;&amp;gt; _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general &lt;&lt; sample.html &gt;&gt; _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From christopher.mcmahon at gmail.com Mon Apr 25 14:32:26 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Mon, 25 Apr 2005 13:32:26 -0500 Subject: [Wtr-general] Author of SAMIE O'Reilly article on OLE/COM Message-ID: <72799cd705042511326d93e900@mail.gmail.com> Hi... Interesting read for those interested in the guts of WATIR/SAMIE/AutoIT/etc.: http://www.perl.com/pub/a/2005/04/21/win32ole.html -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050425/cbf64d56/attachment.html From paul.rogers at shaw.ca Mon Apr 25 14:48:15 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 25 Apr 2005 12:48:15 -0600 Subject: [Wtr-general] Accessing Pop-up menu In-Reply-To: <2548B245CD5B9D45AC32CF3889D2E6D00205BE3B@rsana-ex-va1.NA.RSA.NET> Message-ID: <007201c549c7$571cc530$afd29044@NewDell> If you change your code from until @ie.document.frames[i.to_s].document.readyState == "complete" puts "Sleep..." Sleep 002 s.spin End To until @ie.document.frames[i.to_s].document.readyState == "complete" puts "Frame #{i} readystate = #{@ie.document.frames[i.to_s].document.readyState} " Sleep 002 s.spin end What happems? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi Sent: 25 April 2005 11:34 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu I tried accessing the menu's item directly, but somehow the link did not exist yet. One of the differences about the sample page and the actual html is the number of frames. The page that I'm trying to access has 4 frames. I tried to put a simple debugging message on the wait function (Watir.rb): until @ie.document.frames[i.to_s].document.readyState == "complete" puts "Sleep..." Sleep 002 s.spin end This function keeps looping: E:\Console>console there are 4 frames frame index: 0 name: frame index: 1 name: frame index: 2 name: frame index: 3 name: gToday:agenda.js Sleep... \Sleep... |Sleep... /Sleep... -Sleep... \Sleep... -Sleep... The spinner will keep spinning until I click one of the menu's items manually and so the script can continue to next syntax. I can make this to work by commenting out the part of the wait function that does the wait on frames: #until @ie.document.frames[i.to_s].document.readyState == "complete" #sleep 002 #s.spin #end I don't think this is a good approach. Thanks for any suggestion. - Laudhi -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: Sunday, April 24, 2005 5:18 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu I've tried it several ways using the iframe js stuff and I cannot get it to fail :( Another thought I had was just to access the link directly. Without triggering the menus. With the sample, using overlibmws: ie.link(:text, /Item1/).click Do this directly without worrying about the javascript menu layers. It might at least get you going forward? -andy ----Original Message Follows---- From: "Susilo, Laudhi" <lsusilo at rsasecurity.com> Reply-To: wtr-general at rubyforge.org To: <wtr-general at rubyforge.org> Subject: RE: [Wtr-general] Accessing Pop-up menu Date: Fri, 22 Apr 2005 12:14:11 -0700 Firstly, thanks so much for your effort. I noticed in the HTML code, is uses: overlib_mini.js, overlibmws.js and overlibmws_iframe.js. I try the first two libraries with your sample code and they work just fine. I'm still trying to get it work with the overlibmws_iframe.js. Back to the original problem, I try use flash after click the menu, but the problem still exists: the spinner keep waiting for document completion. Thanks, Laudhi -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: Friday, April 22, 2005 11:26 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu One other question, are you using overlib or overlibmws? I found the refx items under overlibmws and setup a sample using that -- it seems to work fine also. Are you using any javascript plugins that come with overlibmws? -andy ----Original Message Follows---- From: &quot;Andy Sipe&quot; &lt;andy__s at hotmail.com&gt; Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu Date: Fri, 22 Apr 2005 14:06:04 -0400 I tried to boil your sample down to a basic html file -- its attached. It basically uses overlib to create a link that shows a table (the submenu) when clicked. I tried to keep the syntax of the overlib call as close in my sample as in your sample, but I've never seen some of the REFX stuff (I'm by no means an overlib expert). ***note I'm using the latest version of overlib from the web, you'll have to have that in the same folder as the html file for this to work*** If you access the sample via watir it seems to work as expected: require 'watir' include Watir $ie = ie.start(&quot;file:///c:/sample.html&quot;) $ie.link(:text, /Menu/).click $ie.link(:text, /Item1/).flash $ie.link(:text, /Item2/).flash $ie.link(:text, /Item1/).click Maybe my sample isn't accurate or something else is off? If you could look at the sample and update it to be closer that might help. There are some subtle differences in the markup (embedded ' and such) also. Thanks -andy ----Original Message Follows---- From: &amp;quot;Susilo, Laudhi&amp;quot; &amp;lt;lsusilo at rsasecurity.com&amp;gt; Reply-To: wtr-general at rubyforge.org To: &amp;lt;wtr-general at rubyforge.org&amp;gt; Subject: [Wtr-general] Accessing Pop-up menu Date: Thu, 21 Apr 2005 20:44:48 -0700 Hi, I have a link that when clicked it displays a pop-up menu. I need to click one of the link on the menu. $ie.link(:text,'user1').click $ie.link(:text,'Edit').click The problem is that the first function does not return anything and wait infinitely (the spinner just keep spinning). The pop-up menu is displayed though with several links such as View, Edit. Somehow the 'Edit' link cannot be access (object not found) without clicking the user's link first. Is there any other way to access the pop-up menu? Please find the HTML code attached. Thanks for the help. - Laudhi &amp;lt;&amp;lt; popupmenu.txt &amp;gt;&amp;gt; _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general &lt;&lt; sample.html &gt;&gt; _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From lsusilo at rsasecurity.com Mon Apr 25 15:25:50 2005 From: lsusilo at rsasecurity.com (Susilo, Laudhi) Date: Mon, 25 Apr 2005 12:25:50 -0700 Subject: [Wtr-general] Accessing Pop-up menu Message-ID: <2548B245CD5B9D45AC32CF3889D2E6D00205BEC1@rsana-ex-va1.NA.RSA.NET> I should have done this before instead of using "Sleep..." message. Here is the message: there are 4 frames frame index: 0 name: frame index: 1 name: frame index: 2 name: frame index: 3 name: gToday:agenda.js Frame 0 readystate = loading nil \Frame 0 readystate = loading nil |Frame 0 readystate = loading nil /Frame 0 readystate = loading nil -Frame 0 readystate = loading Nil In this state, the pop-up menu is displayed. The script will wait until I manually select one of the menu items. Here is the complete info about the frame (I use IEDOMInspector tool to see elements and attributes). The url of the first three frames are "about:blank" and there is no rendered HTML. Hope this might help. Title URL about:blank referrer lastModified 04/25/2005 12:18:51 domain domain.com cookie charset unicode defaultCharset windows-1252 protocol Unknown Protocol mimeType n/a fileSize n/a security This type of document does not have a security certificate. All Element Count 4 Links Count 0 Images Count 0 Forms Count 0 Thank you. - Laudhi -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Monday, April 25, 2005 11:48 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu If you change your code from until @ie.document.frames[i.to_s].document.readyState == "complete" puts "Sleep..." Sleep 002 s.spin End To until @ie.document.frames[i.to_s].document.readyState == "complete" puts "Frame #{i} readystate = #{@ie.document.frames[i.to_s].document.readyState} " Sleep 002 s.spin end What happems? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi Sent: 25 April 2005 11:34 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu I tried accessing the menu's item directly, but somehow the link did not exist yet. One of the differences about the sample page and the actual html is the number of frames. The page that I'm trying to access has 4 frames. I tried to put a simple debugging message on the wait function (Watir.rb): until @ie.document.frames[i.to_s].document.readyState == "complete" puts "Sleep..." Sleep 002 s.spin end This function keeps looping: E:\Console>console there are 4 frames frame index: 0 name: frame index: 1 name: frame index: 2 name: frame index: 3 name: gToday:agenda.js Sleep... \Sleep... |Sleep... /Sleep... -Sleep... \Sleep... -Sleep... The spinner will keep spinning until I click one of the menu's items manually and so the script can continue to next syntax. I can make this to work by commenting out the part of the wait function that does the wait on frames: #until @ie.document.frames[i.to_s].document.readyState == "complete" #sleep 002 #s.spin #end I don't think this is a good approach. Thanks for any suggestion. - Laudhi -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: Sunday, April 24, 2005 5:18 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu I've tried it several ways using the iframe js stuff and I cannot get it to fail :( Another thought I had was just to access the link directly. Without triggering the menus. With the sample, using overlibmws: ie.link(:text, /Item1/).click Do this directly without worrying about the javascript menu layers. It might at least get you going forward? -andy ----Original Message Follows---- From: "Susilo, Laudhi" <lsusilo at rsasecurity.com> Reply-To: wtr-general at rubyforge.org To: <wtr-general at rubyforge.org> Subject: RE: [Wtr-general] Accessing Pop-up menu Date: Fri, 22 Apr 2005 12:14:11 -0700 Firstly, thanks so much for your effort. I noticed in the HTML code, is uses: overlib_mini.js, overlibmws.js and overlibmws_iframe.js. I try the first two libraries with your sample code and they work just fine. I'm still trying to get it work with the overlibmws_iframe.js. Back to the original problem, I try use flash after click the menu, but the problem still exists: the spinner keep waiting for document completion. Thanks, Laudhi -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: Friday, April 22, 2005 11:26 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu One other question, are you using overlib or overlibmws? I found the refx items under overlibmws and setup a sample using that -- it seems to work fine also. Are you using any javascript plugins that come with overlibmws? -andy ----Original Message Follows---- From: &quot;Andy Sipe&quot; &lt;andy__s at hotmail.com&gt; Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu Date: Fri, 22 Apr 2005 14:06:04 -0400 I tried to boil your sample down to a basic html file -- its attached. It basically uses overlib to create a link that shows a table (the submenu) when clicked. I tried to keep the syntax of the overlib call as close in my sample as in your sample, but I've never seen some of the REFX stuff (I'm by no means an overlib expert). ***note I'm using the latest version of overlib from the web, you'll have to have that in the same folder as the html file for this to work*** If you access the sample via watir it seems to work as expected: require 'watir' include Watir $ie = ie.start(&quot;file:///c:/sample.html&quot;) $ie.link(:text, /Menu/).click $ie.link(:text, /Item1/).flash $ie.link(:text, /Item2/).flash $ie.link(:text, /Item1/).click Maybe my sample isn't accurate or something else is off? If you could look at the sample and update it to be closer that might help. There are some subtle differences in the markup (embedded ' and such) also. Thanks -andy ----Original Message Follows---- From: &amp;quot;Susilo, Laudhi&amp;quot; &amp;lt;lsusilo at rsasecurity.com&amp;gt; Reply-To: wtr-general at rubyforge.org To: &amp;lt;wtr-general at rubyforge.org&amp;gt; Subject: [Wtr-general] Accessing Pop-up menu Date: Thu, 21 Apr 2005 20:44:48 -0700 Hi, I have a link that when clicked it displays a pop-up menu. I need to click one of the link on the menu. $ie.link(:text,'user1').click $ie.link(:text,'Edit').click The problem is that the first function does not return anything and wait infinitely (the spinner just keep spinning). The pop-up menu is displayed though with several links such as View, Edit. Somehow the 'Edit' link cannot be access (object not found) without clicking the user's link first. Is there any other way to access the pop-up menu? Please find the HTML code attached. Thanks for the help. - Laudhi &amp;lt;&amp;lt; popupmenu.txt &amp;gt;&amp;gt; _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general &lt;&lt; sample.html &gt;&gt; _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Mon Apr 25 15:57:51 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Mon, 25 Apr 2005 13:57:51 -0600 Subject: [Wtr-general] Accessing Pop-up menu In-Reply-To: <2548B245CD5B9D45AC32CF3889D2E6D00205BEC1@rsana-ex-va1.NA.RSA.NET> Message-ID: <000401c549d1$0ff5b2c0$afd29044@NewDell> It could be that it loads too quickly for us to reliably detect - Ive seen this before. Or it could be that because this isnt a real document, it doesn't load in the same way as others. The only thing I can suggest is to change the wait method to something like this ( just the part we have already modified) if @ie.document.frames[i.to_s].document.url != "about:blank" 0.upto @ie.document.frames.length-1 do |i| until @ie.document.frames[i.to_s].document.readyState == "complete" sleep 0.02 s.spin end @url_list << @ie.document.frames[i.to_s].document.url unless url_list.include?(@ie.document.frames[i.to_s].document.url) end end Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi Sent: 25 April 2005 13:26 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu I should have done this before instead of using "Sleep..." message. Here is the message: there are 4 frames frame index: 0 name: frame index: 1 name: frame index: 2 name: frame index: 3 name: gToday:agenda.js Frame 0 readystate = loading nil \Frame 0 readystate = loading nil |Frame 0 readystate = loading nil /Frame 0 readystate = loading nil -Frame 0 readystate = loading Nil In this state, the pop-up menu is displayed. The script will wait until I manually select one of the menu items. Here is the complete info about the frame (I use IEDOMInspector tool to see elements and attributes). The url of the first three frames are "about:blank" and there is no rendered HTML. Hope this might help. Title URL about:blank referrer lastModified 04/25/2005 12:18:51 domain domain.com cookie charset unicode defaultCharset windows-1252 protocol Unknown Protocol mimeType n/a fileSize n/a security This type of document does not have a security certificate. All Element Count 4 Links Count 0 Images Count 0 Forms Count 0 Thank you. - Laudhi -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: Monday, April 25, 2005 11:48 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu If you change your code from until @ie.document.frames[i.to_s].document.readyState == "complete" puts "Sleep..." Sleep 002 s.spin End To until @ie.document.frames[i.to_s].document.readyState == "complete" puts "Frame #{i} readystate = #{@ie.document.frames[i.to_s].document.readyState} " Sleep 002 s.spin end What happems? -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Susilo, Laudhi Sent: 25 April 2005 11:34 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu I tried accessing the menu's item directly, but somehow the link did not exist yet. One of the differences about the sample page and the actual html is the number of frames. The page that I'm trying to access has 4 frames. I tried to put a simple debugging message on the wait function (Watir.rb): until @ie.document.frames[i.to_s].document.readyState == "complete" puts "Sleep..." Sleep 002 s.spin end This function keeps looping: E:\Console>console there are 4 frames frame index: 0 name: frame index: 1 name: frame index: 2 name: frame index: 3 name: gToday:agenda.js Sleep... \Sleep... |Sleep... /Sleep... -Sleep... \Sleep... -Sleep... The spinner will keep spinning until I click one of the menu's items manually and so the script can continue to next syntax. I can make this to work by commenting out the part of the wait function that does the wait on frames: #until @ie.document.frames[i.to_s].document.readyState == "complete" #sleep 002 #s.spin #end I don't think this is a good approach. Thanks for any suggestion. - Laudhi -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: Sunday, April 24, 2005 5:18 PM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu I've tried it several ways using the iframe js stuff and I cannot get it to fail :( Another thought I had was just to access the link directly. Without triggering the menus. With the sample, using overlibmws: ie.link(:text, /Item1/).click Do this directly without worrying about the javascript menu layers. It might at least get you going forward? -andy ----Original Message Follows---- From: "Susilo, Laudhi" <lsusilo at rsasecurity.com> Reply-To: wtr-general at rubyforge.org To: <wtr-general at rubyforge.org> Subject: RE: [Wtr-general] Accessing Pop-up menu Date: Fri, 22 Apr 2005 12:14:11 -0700 Firstly, thanks so much for your effort. I noticed in the HTML code, is uses: overlib_mini.js, overlibmws.js and overlibmws_iframe.js. I try the first two libraries with your sample code and they work just fine. I'm still trying to get it work with the overlibmws_iframe.js. Back to the original problem, I try use flash after click the menu, but the problem still exists: the spinner keep waiting for document completion. Thanks, Laudhi -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: Friday, April 22, 2005 11:26 AM To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu One other question, are you using overlib or overlibmws? I found the refx items under overlibmws and setup a sample using that -- it seems to work fine also. Are you using any javascript plugins that come with overlibmws? -andy ----Original Message Follows---- From: &quot;Andy Sipe&quot; &lt;andy__s at hotmail.com&gt; Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu Date: Fri, 22 Apr 2005 14:06:04 -0400 I tried to boil your sample down to a basic html file -- its attached. It basically uses overlib to create a link that shows a table (the submenu) when clicked. I tried to keep the syntax of the overlib call as close in my sample as in your sample, but I've never seen some of the REFX stuff (I'm by no means an overlib expert). ***note I'm using the latest version of overlib from the web, you'll have to have that in the same folder as the html file for this to work*** If you access the sample via watir it seems to work as expected: require 'watir' include Watir $ie = ie.start(&quot;file:///c:/sample.html&quot;) $ie.link(:text, /Menu/).click $ie.link(:text, /Item1/).flash $ie.link(:text, /Item2/).flash $ie.link(:text, /Item1/).click Maybe my sample isn't accurate or something else is off? If you could look at the sample and update it to be closer that might help. There are some subtle differences in the markup (embedded ' and such) also. Thanks -andy ----Original Message Follows---- From: &amp;quot;Susilo, Laudhi&amp;quot; &amp;lt;lsusilo at rsasecurity.com&amp;gt; Reply-To: wtr-general at rubyforge.org To: &amp;lt;wtr-general at rubyforge.org&amp;gt; Subject: [Wtr-general] Accessing Pop-up menu Date: Thu, 21 Apr 2005 20:44:48 -0700 Hi, I have a link that when clicked it displays a pop-up menu. I need to click one of the link on the menu. $ie.link(:text,'user1').click $ie.link(:text,'Edit').click The problem is that the first function does not return anything and wait infinitely (the spinner just keep spinning). The pop-up menu is displayed though with several links such as View, Edit. Somehow the 'Edit' link cannot be access (object not found) without clicking the user's link first. Is there any other way to access the pop-up menu? Please find the HTML code attached. Thanks for the help. - Laudhi &amp;lt;&amp;lt; popupmenu.txt &amp;gt;&amp;gt; _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general &lt;&lt; sample.html &gt;&gt; _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From andy__s at hotmail.com Mon Apr 25 20:35:25 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Mon, 25 Apr 2005 20:35:25 -0400 Subject: [Wtr-general] Accessing Pop-up menu In-Reply-To: <005101c54924$d9765b70$6400a8c0@NewDell> Message-ID: If a demo relied upon the 3rd party javascript libraries (open source) would there be any problem including them in the demos distro of watir? -andy ----Original Message Follows---- From: Paul Rogers <paul.rogers at shaw.ca> Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu Date: Sun, 24 Apr 2005 17:25:06 -0600 Andy, is this something we can add to our examples directory? Would we need to do much with it to make it usable as a demo for menus? Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: 22 April 2005 12:06 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Accessing Pop-up menu I tried to boil your sample down to a basic html file -- its attached. It basically uses overlib to create a link that shows a table (the submenu) when clicked. I tried to keep the syntax of the overlib call as close in my sample as in your sample, but I've never seen some of the REFX stuff (I'm by no means an overlib expert). ***note I'm using the latest version of overlib from the web, you'll have to have that in the same folder as the html file for this to work*** If you access the sample via watir it seems to work as expected: require 'watir' include Watir $ie = ie.start("file:///c:/sample.html") $ie.link(:text, /Menu/).click $ie.link(:text, /Item1/).flash $ie.link(:text, /Item2/).flash $ie.link(:text, /Item1/).click Maybe my sample isn't accurate or something else is off? If you could look at the sample and update it to be closer that might help. There are some subtle differences in the markup (embedded ' and such) also. Thanks -andy ----Original Message Follows---- From: &quot;Susilo, Laudhi&quot; &lt;lsusilo at rsasecurity.com&gt; Reply-To: wtr-general at rubyforge.org To: &lt;wtr-general at rubyforge.org&gt; Subject: [Wtr-general] Accessing Pop-up menu Date: Thu, 21 Apr 2005 20:44:48 -0700 Hi, I have a link that when clicked it displays a pop-up menu. I need to click one of the link on the menu. $ie.link(:text,'user1').click $ie.link(:text,'Edit').click The problem is that the first function does not return anything and wait infinitely (the spinner just keep spinning). The pop-up menu is displayed though with several links such as View, Edit. Somehow the 'Edit' link cannot be access (object not found) without clicking the user's link first. Is there any other way to access the pop-up menu? Please find the HTML code attached. Thanks for the help. - Laudhi &lt;&lt; popupmenu.txt &gt;&gt; _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Mon Apr 25 20:45:25 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Mon, 25 Apr 2005 18:45:25 -0600 Subject: [Wtr-general] Accessing Pop-up menu In-Reply-To: Message-ID: <20050426004503.GSAP21890.priv-edtnes28.telusplanet.net@tintin> I can't see a problem, as long as the JS libraries were GPL, or some such license that permits redistribution. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Andy Sipe > Sent: April 25, 2005 6:35 PM > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Accessing Pop-up menu > > If a demo relied upon the 3rd party javascript libraries (open source) > would > there be any problem including them in the demos distro of watir? > > -andy > > ----Original Message Follows---- > From: Paul Rogers <paul.rogers at shaw.ca> > Reply-To: wtr-general at rubyforge.org > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Accessing Pop-up menu > Date: Sun, 24 Apr 2005 17:25:06 -0600 > > Andy, is this something we can add to our examples directory? Would we > need to do much with it to make it usable as a demo for menus? > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe > Sent: 22 April 2005 12:06 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Accessing Pop-up menu > > > I tried to boil your sample down to a basic html file -- its attached. > It > basically uses overlib to create a link that shows a table (the submenu) > > when clicked. I tried to keep the syntax of the overlib call as close > in > my sample as in your sample, but I've never seen some of the REFX stuff > > (I'm by no means an overlib expert). ***note I'm using the > latest > version of overlib from the web, you'll have to have that in the same > folder > as the html file for this to work*** > > If you access the sample via watir it seems to work as expected: > > require 'watir' > include Watir > > $ie = ie.start("file:///c:/sample.html") > $ie.link(:text, /Menu/).click > $ie.link(:text, /Item1/).flash > $ie.link(:text, /Item2/).flash > $ie.link(:text, /Item1/).click > > Maybe my sample isn't accurate or something else is off? If you could > look > at the sample and update it to be closer that might help. There are > some > subtle differences in the markup (embedded ' and such) also. > > Thanks -andy > > > ----Original Message Follows---- > From: &quot;Susilo, Laudhi&quot; > &lt;lsusilo at rsasecurity.com&gt; > Reply-To: wtr-general at rubyforge.org > To: &lt;wtr-general at rubyforge.org&gt; > Subject: [Wtr-general] Accessing Pop-up menu > Date: Thu, 21 Apr 2005 20:44:48 -0700 > > Hi, I have a link that when clicked it displays a pop-up menu. I need to > click one of the link on the menu. > > > > $ie.link(:text,'user1').click > > $ie.link(:text,'Edit').click > > > > The problem is that the first function does not return anything and wait > infinitely (the spinner just keep spinning). > > The pop-up menu is displayed though with several links such as View, > Edit. > > > > Somehow the 'Edit' link cannot be access (object not found) without > clicking the user's link first. > > Is there any other way to access the pop-up menu? > > > > Please find the HTML code attached. > > > > Thanks for the help. > > - Laudhi > > > > > > &lt;&lt; popupmenu.txt &gt;&gt; > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From andy__s at hotmail.com Mon Apr 25 22:23:23 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Mon, 25 Apr 2005 22:23:23 -0400 Subject: [Wtr-general] dynamic Watir Message-ID: I've been playing with something in Watir and wondered if there was any interest in it. Normally you'd say something like: $ie.text(:id, "startdate").set("10/11/2003") $ie.text(:id, "enddate").set("10/11/2004") $ie.button(:text, "Show Report").click An alternative would be: $ie.dy.startdate.set("10/11/2003") $ie.dy.enddate.set("10/11/2004") $ie.dy.show_report.click It works for anything that has an Iterators implementation exposed by Watir::IE and works reasonably well for the basic lookup mechanisms. I find it works best on projects that can define the naming of the various elements up front. It isn't as flexible as the default look up mechanisms and wouldn't be a replacement for them, but it might be a bit easier on the learning curve. If there is some interest then I'll make it available. Thanks -andy From jkohl at telusplanet.net Mon Apr 25 22:50:17 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Mon, 25 Apr 2005 20:50:17 -0600 Subject: [Wtr-general] dynamic Watir In-Reply-To: Message-ID: <20050426024953.EKKN22775.priv-edtnes46.telusplanet.net@tintin> Sounds interesting to me. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Andy Sipe > Sent: April 25, 2005 8:23 PM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] dynamic Watir > > I've been playing with something in Watir and wondered if there was any > interest in it. > > Normally you'd say something like: > > $ie.text(:id, "startdate").set("10/11/2003") > $ie.text(:id, "enddate").set("10/11/2004") > $ie.button(:text, "Show Report").click > > An alternative would be: > > $ie.dy.startdate.set("10/11/2003") > $ie.dy.enddate.set("10/11/2004") > $ie.dy.show_report.click > > name > isn't the greatest> > > It works for anything that has an Iterators implementation exposed by > Watir::IE and works reasonably well for the basic lookup mechanisms. I > find it works best on projects that can define the naming of the various > elements up front. It isn't as flexible as the default look up > mechanisms > and wouldn't be a replacement for them, but it might be a bit easier on > the > learning curve. > > If there is some interest then I'll make it available. > > Thanks -andy > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From chrismo at clabs.org Mon Apr 25 23:00:36 2005 From: chrismo at clabs.org (Chris Morris) Date: Mon, 25 Apr 2005 22:00:36 -0500 Subject: [Wtr-general] dynamic Watir In-Reply-To: References: Message-ID: <426DAED4.70401@clabs.org> Andy Sipe wrote: > I've been playing with something in Watir and wondered if there was > any interest in it. > > Normally you'd say something like: > > $ie.text(:id, "startdate").set("10/11/2003") > $ie.text(:id, "enddate").set("10/11/2004") > $ie.button(:text, "Show Report").click > > An alternative would be: > > $ie.dy.startdate.set("10/11/2003") > $ie.dy.enddate.set("10/11/2004") > $ie.dy.show_report.click This format seems closer to some of my original code in the clIEController. Here's the watir Google example: require 'watir' # the watir controller include Watir testSite = 'http://www.google.com' $ie = IE.new $ie.goto(testSite) $ie.text_field(:name, "q").set("pickaxe") $ie.button(:name, "btnG").click Same example with clIEController: opts = { :visible => true, :auto_wrap_form => true } @iec = ClIEController.new(opts) @iec.navigate 'http://www.google.com' @iec.form.q = 'web testing ruby' @iec.submit # or maybe something like @iec.form.btnG.click The second takes advantage of the method_missing stuffs built-in to Ruby objects, so you don't have to predefine the methods. IIRC, the current WATIR syntax approach was used because the fellas felt it'd be easier for the target audience to grok. -- Chris http://clabs.org/blogki From Ramya.Moorthy at honeywell.com Tue Apr 26 01:14:33 2005 From: Ramya.Moorthy at honeywell.com (Ramya Ramalinga, Moorthy (IE10)) Date: Mon, 25 Apr 2005 22:14:33 -0700 Subject: [Wtr-general] Accessing Pop up Dialog Controls Message-ID: <77ED2BF75D59D1439F90412CC5B109741CE47E85@ie10-sahara.hiso.honeywell.com> Hi All, I would like to know how to access the standard controls available in the Popup Window. I tried to get the Handle of the Popup window & tried accessing the controls(Eg:ComboBox) using Winclicker Class , but I am getting the error message as " undefined method `getWindowTitle' for WinClicker:Class (NoMethodError) " . $ie = Watir::IE.start('...') #On Click of this Add button, new popup window is opened $ie.button(:caption, "Add").click #Getting the Handle of the newly opened Popup window hTheActiveWindow = Win32API.new("user32", "GetActiveWindow", [], 'I') #Getting the Title of the Popup window wincaption=WinClicker.getWindowTitle(hTheActiveWindow) #Now using this Popup window handle, I can get all the child handles & then call setComboBoxText(hwnd , settext) Can anyone help me in this regard. Thanks for any of your suggesstions > Regards, > Ramya > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050425/a666c8e2/attachment.html From andy__s at hotmail.com Tue Apr 26 07:38:32 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Tue, 26 Apr 2005 07:38:32 -0400 Subject: [Wtr-general] dynamic Watir In-Reply-To: <426DAED4.70401@clabs.org> Message-ID: Sounds like we were doing the same thing with the missing method stuff and that it's already been looked at. Thanks for the heads up. -andy ----Original Message Follows---- From: Chris Morris <chrismo at clabs.org> Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] dynamic Watir Date: Mon, 25 Apr 2005 22:00:36 -0500 Andy Sipe wrote: >I've been playing with something in Watir and wondered if there was >any interest in it. > This format seems closer to some of my original code in the clIEController. Here's the watir Google example: .... The second takes advantage of the method_missing stuffs built-in to Ruby objects, so you don't have to predefine the methods. IIRC, the current WATIR syntax approach was used because the fellas felt it'd be easier for the target audience to grok. -- Chris http://clabs.org/blogki _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From chrismo at clabs.org Tue Apr 26 08:49:33 2005 From: chrismo at clabs.org (Chris Morris) Date: Tue, 26 Apr 2005 07:49:33 -0500 Subject: [Wtr-general] dynamic Watir In-Reply-To: References: Message-ID: <426E38DD.7040108@clabs.org> Andy Sipe wrote: > Sounds like we were doing the same thing with the missing method stuff > and that it's already been looked at. Personally, I'd love to see both syntaxes supported. When I was still active in the project, there was some talk of having a shared core lib and then support for both at a higher level. Unfortunately, my work world has left doing any web dev since I started the tiny seed, so I haven't been able to contribute. But I think there's room for someone like yourself to jump in and add some parallel stuffs along the method_missing route. I think it's one of the ways that Ruby can make a tool like this rather unique. -- Chris http://clabs.org/blogki From Mark_Cain at rl.gov Tue Apr 26 10:08:52 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Tue, 26 Apr 2005 07:08:52 -0700 Subject: [Wtr-general] Accessing Pop up Dialog Controls Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04E154F04@EX5V.rl.gov> When you say 'Popup Window' do you mean: 1) a JavaScript Alert, Confirm, or Prompt? Or 2) do you mean another browser window that has form information which gets posted back to the parent that has the 'Add" button on it? The following have worked for me in both situations. If it is #1 then this works for the JavaScript type popup: #define the popup method first (this is right out of unittests\popups_test.rb) def startClicker( button , waitTime = 3) w = WinClicker.new longName = $ie.dir.gsub("/" , "\\" ) shortName = w.getShortFileName(longName) c = "start rubyw #{shortName }\\watir\\clickJSDialog.rb #{button } #{ waitTime} " puts "Starting #{c}" w.winsystem(c) w=nil end #then call it just before your button click startClicker("OK" , 3) $ie.button("Submit").click If it is #2 then this works for the browser window 'Popup' #parent window clicks the button $ie.button( "Add Causal Codes" ).click sleep 3 #child form window pops up and get posted pack to the parent cw = IE.attach( :title, /PER Causal Code Management/i ) #this could also be a URL cw.selectBox( :index, 1).select(/A1/ ) cw.selectBox( :index, 3).select(/B1/ ) cw.selectBox( :index, 11).select(/C01/ ) cw.button( "Add Causal Codes" ).click cw.button( "Close Window" ).click Hope this helps. --Mark ________________________________ From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ramya Ramalinga, Moorthy (IE10) Sent: Monday, April 25, 2005 10:15 PM To: wtr-general at rubyforge.org Subject: [Wtr-general] Accessing Pop up Dialog Controls Hi All, I would like to know how to access the standard controls available in the Popup Window. I tried to get the Handle of the Popup window & tried accessing the controls(Eg:ComboBox) using Winclicker Class , but I am getting the error message as " undefined method `getWindowTitle' for WinClicker:Class (NoMethodError) " . $ie = Watir::IE.start('...') #On Click of this Add button, new popup window is opened $ie.button(:caption, "Add").click #Getting the Handle of the newly opened Popup window hTheActiveWindow = Win32API.new("user32", "GetActiveWindow", [], 'I') #Getting the Title of the Popup window wincaption=WinClicker.getWindowTitle(hTheActiveWindow) #Now using this Popup window handle, I can get all the child handles & then call setComboBoxText(hwnd , settext) Can anyone help me in this regard. Thanks for any of your suggesstions Regards, Ramya -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050426/1e7404d1/attachment.html From paul.rogers at shaw.ca Tue Apr 26 10:07:06 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 26 Apr 2005 08:07:06 -0600 Subject: [Wtr-general] Accessing Pop up Dialog Controls In-Reply-To: <77ED2BF75D59D1439F90412CC5B109741CE47E85@ie10-sahara.hiso.honeywell.com> Message-ID: <004201c54a69$3ab4b4f0$afd29044@NewDell> if its a regular pop-up window , you can use attach my_pop_up = IE.attach(:title, 'Window Title') and then you can use normal watir methods my_pop_up.selct_box(:index,1).flash If the pop up is opened with showModalDialog, or showModeless dialog, then we havent figured out a way to get to it. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ramya Ramalinga, Moorthy (IE10) Sent: 25 April 2005 23:15 To: wtr-general at rubyforge.org Subject: [Wtr-general] Accessing Pop up Dialog Controls Hi All, I would like to know how to access the standard controls available in the Popup Window. I tried to get the Handle of the Popup window & tried accessing the controls(Eg:ComboBox) using Winclicker Class , but I am getting the error message as " undefined method `getWindowTitle' for WinClicker:Class (NoMethodError) " . $ie = Watir::IE.start('...') #On Click of this Add button, new popup window is opened $ie.button(:caption, "Add").click #Getting the Handle of the newly opened Popup window hTheActiveWindow = Win32API.new("user32", "GetActiveWindow", [], 'I') #Getting the Title of the Popup window wincaption=WinClicker.getWindowTitle(hTheActiveWindow) #Now using this Popup window handle, I can get all the child handles & then call setComboBoxText(hwnd , settext) Can anyone help me in this regard. Thanks for any of your suggesstions Regards, Ramya -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050426/0fa368aa/attachment.html From paul.rogers at shaw.ca Tue Apr 26 10:13:44 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 26 Apr 2005 08:13:44 -0600 Subject: [Wtr-general] dynamic Watir In-Reply-To: Message-ID: <004c01c54a6a$27e53a10$afd29044@NewDell> I think you should check it in. But, do we now need 2 sets of unit tests? So maybe, if its possible to do it as another 'piece' ( I cant remember how this is implemented) like watir/simple, we should do that as the unit tests currently take about 3 minutes to run. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: 25 April 2005 20:23 To: wtr-general at rubyforge.org Subject: [Wtr-general] dynamic Watir I've been playing with something in Watir and wondered if there was any interest in it. Normally you'd say something like: $ie.text(:id, "startdate").set("10/11/2003") $ie.text(:id, "enddate").set("10/11/2004") $ie.button(:text, "Show Report").click An alternative would be: $ie.dy.startdate.set("10/11/2003") $ie.dy.enddate.set("10/11/2004") $ie.dy.show_report.click It works for anything that has an Iterators implementation exposed by Watir::IE and works reasonably well for the basic lookup mechanisms. I find it works best on projects that can define the naming of the various elements up front. It isn't as flexible as the default look up mechanisms and wouldn't be a replacement for them, but it might be a bit easier on the learning curve. If there is some interest then I'll make it available. Thanks -andy _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From jkohl at telusplanet.net Tue Apr 26 10:19:43 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Tue, 26 Apr 2005 07:19:43 -0700 Subject: [Wtr-general] dynamic Watir In-Reply-To: <004c01c54a6a$27e53a10$afd29044@NewDell> References: <004c01c54a6a$27e53a10$afd29044@NewDell> Message-ID: <1114525183.426e4dff1381e@webmail.telusplanet.net> I like this idea as well. -Jonathan Quoting Paul Rogers : > I think you should check it in. > But, do we now need 2 sets of unit tests? > So maybe, if its possible to do it as another 'piece' ( I cant remember > how this is implemented) like watir/simple, we should do that as the > unit tests currently take about 3 minutes to run. > > > Paul > > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe > Sent: 25 April 2005 20:23 > To: wtr-general at rubyforge.org > Subject: [Wtr-general] dynamic Watir > > > I've been playing with something in Watir and wondered if there was any > interest in it. > > Normally you'd say something like: > > $ie.text(:id, "startdate").set("10/11/2003") > $ie.text(:id, "enddate").set("10/11/2004") > $ie.button(:text, "Show Report").click > > An alternative would be: > > $ie.dy.startdate.set("10/11/2003") > $ie.dy.enddate.set("10/11/2004") > $ie.dy.show_report.click > > name > isn't the greatest> > > It works for anything that has an Iterators implementation exposed by > Watir::IE and works reasonably well for the basic lookup mechanisms. > I > find it works best on projects that can define the naming of the various > > elements up front. It isn't as flexible as the default look up > mechanisms > and wouldn't be a replacement for them, but it might be a bit easier on > the > learning curve. > > If there is some interest then I'll make it available. > > Thanks -andy > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From TNyberg at healthetech.com Tue Apr 26 13:01:52 2005 From: TNyberg at healthetech.com (Tim Nyberg) Date: Tue, 26 Apr 2005 11:01:52 -0600 Subject: [Wtr-general] Multiple Separate IE instances with their own 'iexplore.exe' processes? Message-ID: I apologize if the focus of this request is not appropriate to this forum. We have begun using Ruby and Watir to perform some low level testing of a web-based application. We need to have multiple concurrent Internet Explorer windows that are not based on the same 'iexplore.exe' process. That is to say, we need to have 5 Internet Explorer applications running, with 5 independent 'iexplore.exe' processes. While we have been able to open multiple Internet Explorer windows concurrently (using the methods shown in the 'concurrent_search' multi-thread example), we have been unable to determine a way to have new IE instances created with their own iexplore.exe process. We have begun investigating the WIN32OLE, but wanted to see whether this issue has been addressed previously by Watir. Thank you for your time. From christopher.mcmahon at gmail.com Tue Apr 26 13:07:37 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 26 Apr 2005 12:07:37 -0500 Subject: [Wtr-general] Multiple Separate IE instances with their own 'iexplore.exe' processes? In-Reply-To: References: Message-ID: <72799cd705042610071671cb43@mail.gmail.com> ie = IE.New ie2 = IE.New No problem, eh? -Chris On 4/26/05, Tim Nyberg wrote: > > I apologize if the focus of this request is not appropriate to this forum. > We have begun using Ruby and Watir to perform some low level testing of a > web-based application. We need to have multiple concurrent Internet Explorer > windows that are not based on the same 'iexplore.exe' process. That is to > say, we need to have 5 Internet Explorer applications running, with 5 > independent 'iexplore.exe' processes. > While we have been able to open multiple Internet Explorer windows > concurrently (using the methods shown in the 'concurrent_search' > multi-thread example), we have been unable to determine a way to have new IE > instances created with their own iexplore.exe process. We have begun > investigating the WIN32OLE, but wanted to see whether this issue has been > addressed previously by Watir. Thank you for your time. > > _______________________________________________ > 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/20050426/d61e68db/attachment.html From TNyberg at healthetech.com Tue Apr 26 13:16:31 2005 From: TNyberg at healthetech.com (Tim Nyberg) Date: Tue, 26 Apr 2005 11:16:31 -0600 Subject: [Wtr-general] Multiple Separate IE instances with their own'iexplore.exe' processes? Message-ID: Still have the problem. We tried that, but still only have a single 'iexplore.exe' for all IE instances, not one system process for each individual IE instance. All Internet Explorers still seem to be spawned within a single 'iexplore.exe' process, and not as independent siblings. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Chris McMahon Sent: Tuesday, April 26, 2005 11:08 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Multiple Separate IE instances with their own'iexplore.exe' processes? ie = IE.New ie2 = IE.New No problem, eh? -Chris On 4/26/05, Tim Nyberg < TNyberg at healthetech.com> wrote: I apologize if the focus of this request is not appropriate to this forum. We have begun using Ruby and Watir to perform some low level testing of a web-based application. We need to have multiple concurrent Internet Explorer windows that are not based on the same 'iexplore.exe' process. That is to say, we need to have 5 Internet Explorer applications running, with 5 independent 'iexplore.exe' processes. While we have been able to open multiple Internet Explorer windows concurrently (using the methods shown in the 'concurrent_search' multi-thread example), we have been unable to determine a way to have new IE instances created with their own iexplore.exe process. We have begun investigating the WIN32OLE, but wanted to see whether this issue has been addressed previously by Watir. Thank you for your time. _______________________________________________ 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/20050426/cc5f6bd6/attachment.html From christopher.mcmahon at gmail.com Tue Apr 26 13:20:16 2005 From: christopher.mcmahon at gmail.com (Chris McMahon) Date: Tue, 26 Apr 2005 12:20:16 -0500 Subject: [Wtr-general] Multiple Separate IE instances with their own'iexplore.exe' processes? In-Reply-To: References: Message-ID: <72799cd70504261020387450f8@mail.gmail.com> Hrrm. Have you tried system()? system("C://ruby/ruby.exe myScript.rb") ? -Chris On 4/26/05, Tim Nyberg wrote: > > Still have the problem. We tried that, but still only have a single ' > iexplore.exe' for all IE instances, not one system process for each > individual IE instance. All Internet Explorers still seem to be spawned > within a single 'iexplore.exe' process, and not as independent siblings. > > -----Original Message----- > *From:* wtr-general-bounces at rubyforge.org [mailto: > wtr-general-bounces at rubyforge.org]*On Behalf Of *Chris McMahon > *Sent:* Tuesday, April 26, 2005 11:08 AM > *To:* wtr-general at rubyforge.org > *Subject:* Re: [Wtr-general] Multiple Separate IE instances with their > own'iexplore.exe' processes? > > > ie = IE.New > ie2 = IE.New > > No problem, eh? > -Chris > > On 4/26/05, Tim Nyberg wrote: > > > > I apologize if the focus of this request is not appropriate to this > > forum. We have begun using Ruby and Watir to perform some low level testing > > of a web-based application. We need to have multiple concurrent Internet > > Explorer windows that are not based on the same 'iexplore.exe' process. > > That is to say, we need to have 5 Internet Explorer applications running, > > with 5 independent 'iexplore.exe' processes. > > While we have been able to open multiple Internet Explorer windows > > concurrently (using the methods shown in the 'concurrent_search' > > multi-thread example), we have been unable to determine a way to have new IE > > instances created with their own iexplore.exe process. We have begun > > investigating the WIN32OLE, but wanted to see whether this issue has been > > addressed previously by Watir. Thank you for your time. > > > > _______________________________________________ > > 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/20050426/37a52c53/attachment.html From paul.rogers at shaw.ca Tue Apr 26 13:42:05 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 26 Apr 2005 11:42:05 -0600 Subject: [Wtr-general] Multiple Separate IE instances with theirown'iexplore.exe' processes? In-Reply-To: Message-ID: <007001c54a87$42c14550$afd29044@NewDell> Tim, look through the archives for this year - you can launch IE using something like system('internetexoplorer.exe 1.html') then do ie=IE.attach(:url , "1.html') Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tim Nyberg Sent: 26 April 2005 11:17 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Multiple Separate IE instances with theirown'iexplore.exe' processes? Still have the problem. We tried that, but still only have a single 'iexplore.exe' for all IE instances, not one system process for each individual IE instance. All Internet Explorers still seem to be spawned within a single 'iexplore.exe' process, and not as independent siblings. -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Chris McMahon Sent: Tuesday, April 26, 2005 11:08 AM To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] Multiple Separate IE instances with their own'iexplore.exe' processes? ie = IE.New ie2 = IE.New No problem, eh? -Chris On 4/26/05, Tim Nyberg wrote: I apologize if the focus of this request is not appropriate to this forum. We have begun using Ruby and Watir to perform some low level testing of a web-based application. We need to have multiple concurrent Internet Explorer windows that are not based on the same 'iexplore.exe' process. That is to say, we need to have 5 Internet Explorer applications running, with 5 independent 'iexplore.exe' processes. While we have been able to open multiple Internet Explorer windows concurrently (using the methods shown in the 'concurrent_search' multi-thread example), we have been unable to determine a way to have new IE instances created with their own iexplore.exe process. We have begun investigating the WIN32OLE, but wanted to see whether this issue has been addressed previously by Watir. Thank you for your time. _______________________________________________ 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/20050426/b04a5b00/attachment.html From jkohl at telusplanet.net Tue Apr 26 14:16:28 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Tue, 26 Apr 2005 11:16:28 -0700 Subject: [Wtr-general] Multiple Separate IE instances with theirown'iexplore.exe' processes? In-Reply-To: <007001c54a87$42c14550$afd29044@NewDell> References: <007001c54a87$42c14550$afd29044@NewDell> Message-ID: <1114539388.426e857c71eeb@webmail.telusplanet.net> I think this is the thread: http://rubyforge.org/pipermail/wtr-general/2005-March/001074.html Quoting Paul Rogers : > Tim, > > look through the archives for this year - you can launch IE using > something like system('internetexoplorer.exe 1.html') > then do ie=IE.attach(:url , "1.html') > > Paul > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tim Nyberg > Sent: 26 April 2005 11:17 > To: wtr-general at rubyforge.org > Subject: RE: [Wtr-general] Multiple Separate IE instances with > theirown'iexplore.exe' processes? > > > Still have the problem. We tried that, but still only have a single > 'iexplore.exe' for all IE instances, not one system process for each > individual IE instance. All Internet Explorers still seem to be spawned > within a single 'iexplore.exe' process, and not as independent siblings. > > -----Original Message----- > From: wtr-general-bounces at rubyforge.org > [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Chris McMahon > Sent: Tuesday, April 26, 2005 11:08 AM > To: wtr-general at rubyforge.org > Subject: Re: [Wtr-general] Multiple Separate IE instances with their > own'iexplore.exe' processes? > > > > ie = IE.New > ie2 = IE.New > > No problem, eh? > -Chris > > > On 4/26/05, Tim Nyberg wrote: > > I apologize if the focus of this request is not appropriate to this > forum. We have begun using Ruby and Watir to perform some low level > testing of a web-based application. We need to have multiple concurrent > Internet Explorer windows that are not based on the same 'iexplore.exe' > process. That is to say, we need to have 5 Internet Explorer > applications running, with 5 independent 'iexplore.exe' processes. > While we have been able to open multiple Internet Explorer windows > concurrently (using the methods shown in the 'concurrent_search' > multi-thread example), we have been unable to determine a way to have > new IE instances created with their own iexplore.exe process. We have > begun investigating the WIN32OLE, but wanted to see whether this issue > has been addressed previously by Watir. Thank you for your time. > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > > > > From jkohl at telusplanet.net Tue Apr 26 14:20:17 2005 From: jkohl at telusplanet.net (jkohl at telusplanet.net) Date: Tue, 26 Apr 2005 11:20:17 -0700 Subject: [Wtr-general] Multiple Separate IE instances with theirown'iexplore.exe' processes? In-Reply-To: <1114539388.426e857c71eeb@webmail.telusplanet.net> References: <007001c54a87$42c14550$afd29044@NewDell> <1114539388.426e857c71eeb@webmail.telusplanet.net> Message-ID: <1114539617.426e866145309@webmail.telusplanet.net> scratch that. I think this is the one: http://rubyforge.org/pipermail/wtr-general/2005-March/001276.html Quoting jkohl at telusplanet.net: > I think this is the thread: > http://rubyforge.org/pipermail/wtr-general/2005-March/001074.html > > > Quoting Paul Rogers : > > > Tim, > > > > look through the archives for this year - you can launch IE using > > something like system('internetexoplorer.exe 1.html') > > then do ie=IE.attach(:url , "1.html') > > > > Paul > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tim Nyberg > > Sent: 26 April 2005 11:17 > > To: wtr-general at rubyforge.org > > Subject: RE: [Wtr-general] Multiple Separate IE instances with > > theirown'iexplore.exe' processes? > > > > > > Still have the problem. We tried that, but still only have a single > > 'iexplore.exe' for all IE instances, not one system process for each > > individual IE instance. All Internet Explorers still seem to be spawned > > within a single 'iexplore.exe' process, and not as independent siblings. > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Chris McMahon > > Sent: Tuesday, April 26, 2005 11:08 AM > > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] Multiple Separate IE instances with their > > own'iexplore.exe' processes? > > > > > > > > ie = IE.New > > ie2 = IE.New > > > > No problem, eh? > > -Chris > > > > > > On 4/26/05, Tim Nyberg wrote: > > > > I apologize if the focus of this request is not appropriate to this > > forum. We have begun using Ruby and Watir to perform some low level > > testing of a web-based application. We need to have multiple concurrent > > Internet Explorer windows that are not based on the same 'iexplore.exe' > > process. That is to say, we need to have 5 Internet Explorer > > applications running, with 5 independent 'iexplore.exe' processes. > > While we have been able to open multiple Internet Explorer windows > > concurrently (using the methods shown in the 'concurrent_search' > > multi-thread example), we have been unable to determine a way to have > > new IE instances created with their own iexplore.exe process. We have > > begun investigating the WIN32OLE, but wanted to see whether this issue > > has been addressed previously by Watir. Thank you for your time. > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > From bret at pettichord.com Tue Apr 26 14:52:00 2005 From: bret at pettichord.com (Bret Pettichord) Date: Tue, 26 Apr 2005 13:52:00 -0500 Subject: [Wtr-general] Multiple Separate IE instances with theirown'iexplore.exe' processes? In-Reply-To: <1114539617.426e866145309@webmail.telusplanet.net> References: <1114539388.426e857c71eeb@webmail.telusplanet.net> <007001c54a87$42c14550$afd29044@NewDell> <1114539388.426e857c71eeb@webmail.telusplanet.net> Message-ID: <5.1.0.14.2.20050426135035.037f2598@127.0.0.1> That makes this a Frequently Asked Question. Anyone interested in collecting questions like these on our wiki? http://wtr.rubyforge.org/wiki/wiki.pl?HomePage At 01:20 PM 4/26/2005, jkohl at telusplanet.net wrote: >scratch that. I think this is the one: >http://rubyforge.org/pipermail/wtr-general/2005-March/001276.html > > >Quoting jkohl at telusplanet.net: > > > I think this is the thread: > > http://rubyforge.org/pipermail/wtr-general/2005-March/001074.html > > > > > > Quoting Paul Rogers : > > > > > Tim, > > > > > > look through the archives for this year - you can launch IE using > > > something like system('internetexoplorer.exe 1.html') > > > then do ie=IE.attach(:url , "1.html') > > > > > > Paul > > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org > > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tim Nyberg > > > Sent: 26 April 2005 11:17 > > > To: wtr-general at rubyforge.org > > > Subject: RE: [Wtr-general] Multiple Separate IE instances with > > > theirown'iexplore.exe' processes? > > > > > > > > > Still have the problem. We tried that, but still only have a single > > > 'iexplore.exe' for all IE instances, not one system process for each > > > individual IE instance. All Internet Explorers still seem to be spawned > > > within a single 'iexplore.exe' process, and not as independent siblings. > > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org > > > [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Chris McMahon > > > Sent: Tuesday, April 26, 2005 11:08 AM > > > To: wtr-general at rubyforge.org > > > Subject: Re: [Wtr-general] Multiple Separate IE instances with their > > > own'iexplore.exe' processes? > > > > > > > > > > > > ie = IE.New > > > ie2 = IE.New > > > > > > No problem, eh? > > > -Chris > > > > > > > > > On 4/26/05, Tim Nyberg wrote: > > > > > > I apologize if the focus of this request is not appropriate to this > > > forum. We have begun using Ruby and Watir to perform some low level > > > testing of a web-based application. We need to have multiple concurrent > > > Internet Explorer windows that are not based on the same 'iexplore.exe' > > > process. That is to say, we need to have 5 Internet Explorer > > > applications running, with 5 independent 'iexplore.exe' processes. > > > While we have been able to open multiple Internet Explorer windows > > > concurrently (using the methods shown in the 'concurrent_search' > > > multi-thread example), we have been unable to determine a way to have > > > new IE instances created with their own iexplore.exe process. We have > > > begun investigating the WIN32OLE, but wanted to see whether this issue > > > has been addressed previously by Watir. Thank you for your time. > > > > > > _______________________________________________ > > > 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 _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Tue Apr 26 14:52:39 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 26 Apr 2005 12:52:39 -0600 Subject: [Wtr-general] Multiple Separate IE instances withtheirown'iexplore.exe' processes? In-Reply-To: <1114539617.426e866145309@webmail.telusplanet.net> Message-ID: <008301c54a91$1e7d7920$afd29044@NewDell> Thanks for finding it Jonathan That's the one I was thinking of. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of jkohl at telusplanet.net Sent: 26 April 2005 12:20 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Multiple Separate IE instances withtheirown'iexplore.exe' processes? scratch that. I think this is the one: http://rubyforge.org/pipermail/wtr-general/2005-March/001276.html Quoting jkohl at telusplanet.net: > I think this is the thread: > http://rubyforge.org/pipermail/wtr-general/2005-March/001074.html > > > Quoting Paul Rogers : > > > Tim, > > > > look through the archives for this year - you can launch IE using > > something like system('internetexoplorer.exe 1.html') then do > > ie=IE.attach(:url , "1.html') > > > > Paul > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tim Nyberg > > Sent: 26 April 2005 11:17 > > To: wtr-general at rubyforge.org > > Subject: RE: [Wtr-general] Multiple Separate IE instances with > > theirown'iexplore.exe' processes? > > > > > > Still have the problem. We tried that, but still only have a single > > 'iexplore.exe' for all IE instances, not one system process for each > > individual IE instance. All Internet Explorers still seem to be > > spawned within a single 'iexplore.exe' process, and not as > > independent siblings. > > > > -----Original Message----- > > From: wtr-general-bounces at rubyforge.org > > [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Chris McMahon > > Sent: Tuesday, April 26, 2005 11:08 AM > > To: wtr-general at rubyforge.org > > Subject: Re: [Wtr-general] Multiple Separate IE instances with their > > own'iexplore.exe' processes? > > > > > > > > ie = IE.New > > ie2 = IE.New > > > > No problem, eh? > > -Chris > > > > > > On 4/26/05, Tim Nyberg wrote: > > > > I apologize if the focus of this request is not appropriate to this > > forum. We have begun using Ruby and Watir to perform some low level > > testing of a web-based application. We need to have multiple > > concurrent Internet Explorer windows that are not based on the same > > 'iexplore.exe' process. That is to say, we need to have 5 Internet > > Explorer applications running, with 5 independent 'iexplore.exe' > > processes. While we have been able to open multiple Internet > > Explorer windows concurrently (using the methods shown in the > > 'concurrent_search' multi-thread example), we have been unable to > > determine a way to have new IE instances created with their own > > iexplore.exe process. We have begun investigating the WIN32OLE, but > > wanted to see whether this issue has been addressed previously by > > Watir. Thank you for your time. > > > > _______________________________________________ > > Wtr-general mailing list > > Wtr-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > > > > > > > > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Tue Apr 26 15:00:56 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Tue, 26 Apr 2005 13:00:56 -0600 Subject: [Wtr-general] Multiple Separate IE instances withtheirown'iexplore.exe' processes? In-Reply-To: <5.1.0.14.2.20050426135035.037f2598@127.0.0.1> Message-ID: <008801c54a92$470ad4e0$afd29044@NewDell> We could also make this into another example to go with the release. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 26 April 2005 12:52 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Multiple Separate IE instances withtheirown'iexplore.exe' processes? That makes this a Frequently Asked Question. Anyone interested in collecting questions like these on our wiki? http://wtr.rubyforge.org/wiki/wiki.pl?HomePage At 01:20 PM 4/26/2005, jkohl at telusplanet.net wrote: >scratch that. I think this is the one: >http://rubyforge.org/pipermail/wtr-general/2005-March/001276.html > > >Quoting jkohl at telusplanet.net: > > > I think this is the thread: > > http://rubyforge.org/pipermail/wtr-general/2005-March/001074.html > > > > > > Quoting Paul Rogers : > > > > > Tim, > > > > > > look through the archives for this year - you can launch IE using > > > something like system('internetexoplorer.exe 1.html') then do > > > ie=IE.attach(:url , "1.html') > > > > > > Paul > > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org > > > [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Tim Nyberg > > > Sent: 26 April 2005 11:17 > > > To: wtr-general at rubyforge.org > > > Subject: RE: [Wtr-general] Multiple Separate IE instances with > > > theirown'iexplore.exe' processes? > > > > > > > > > Still have the problem. We tried that, but still only have a > > > single 'iexplore.exe' for all IE instances, not one system process > > > for each individual IE instance. All Internet Explorers still > > > seem to be spawned within a single 'iexplore.exe' process, and not > > > as independent siblings. > > > > > > -----Original Message----- > > > From: wtr-general-bounces at rubyforge.org > > > [mailto:wtr-general-bounces at rubyforge.org]On Behalf Of Chris > > > McMahon > > > Sent: Tuesday, April 26, 2005 11:08 AM > > > To: wtr-general at rubyforge.org > > > Subject: Re: [Wtr-general] Multiple Separate IE instances with their > > > own'iexplore.exe' processes? > > > > > > > > > > > > ie = IE.New > > > ie2 = IE.New > > > > > > No problem, eh? > > > -Chris > > > > > > > > > On 4/26/05, Tim Nyberg wrote: > > > > > > I apologize if the focus of this request is not appropriate to > > > this forum. We have begun using Ruby and Watir to perform some > > > low level testing of a web-based application. We need to have > > > multiple concurrent Internet Explorer windows that are not based > > > on the same 'iexplore.exe' process. That is to say, we need to > > > have 5 Internet Explorer applications running, with 5 independent > > > 'iexplore.exe' processes. While we have been able to open multiple > > > Internet Explorer windows concurrently (using the methods shown in > > > the 'concurrent_search' multi-thread example), we have been unable > > > to determine a way to have new IE instances created with their own > > > iexplore.exe process. We have begun investigating the WIN32OLE, > > > but wanted to see whether this issue has been addressed previously > > > by Watir. Thank you for your time. > > > > > > _______________________________________________ > > > 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 _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From andy__s at hotmail.com Tue Apr 26 16:55:39 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Tue, 26 Apr 2005 16:55:39 -0400 Subject: [Wtr-general] dynamic Watir In-Reply-To: <004c01c54a6a$27e53a10$afd29044@NewDell> Message-ID: It should be easy enough to implement as an optional feature that will add behavior to the approriate classes if requested. My current way of doing it uses all built in Watir methods of finding the various elements that make up a page so I'm not sure we'd need double tests. When its ready, I'll put it in the the Watir directory. Nothing else in that directory appears to have UTs so where should I put those? -andy ----Original Message Follows---- From: Paul Rogers <paul.rogers at shaw.ca> Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] dynamic Watir Date: Tue, 26 Apr 2005 08:13:44 -0600 I think you should check it in. But, do we now need 2 sets of unit tests? So maybe, if its possible to do it as another 'piece' ( I cant remember how this is implemented) like watir/simple, we should do that as the unit tests currently take about 3 minutes to run. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: 25 April 2005 20:23 To: wtr-general at rubyforge.org Subject: [Wtr-general] dynamic Watir I've been playing with something in Watir and wondered if there was any interest in it. Normally you'd say something like: $ie.text(:id, "startdate").set("10/11/2003") $ie.text(:id, "enddate").set("10/11/2004") $ie.button(:text, "Show Report").click An alternative would be: $ie.dy.startdate.set("10/11/2003") $ie.dy.enddate.set("10/11/2004") $ie.dy.show_report.click <dy is an attribute of IE that gets reset everytime the page moves, the name isn't the greatest> It works for anything that has an Iterators implementation exposed by Watir::IE and works reasonably well for the basic lookup mechanisms. I find it works best on projects that can define the naming of the various elements up front. It isn't as flexible as the default look up mechanisms and wouldn't be a replacement for them, but it might be a bit easier on the learning curve. If there is some interest then I'll make it available. Thanks -andy _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From Ramya.Moorthy at honeywell.com Wed Apr 27 10:43:17 2005 From: Ramya.Moorthy at honeywell.com (Ramya Ramalinga, Moorthy (IE10)) Date: Wed, 27 Apr 2005 07:43:17 -0700 Subject: [Wtr-general] How to click on the cell for a dynamic Table Message-ID: <77ED2BF75D59D1439F90412CC5B109741CFFD286@ie10-sahara.hiso.honeywell.com> Hi All, I am facing a problem while accessing the dynamic table. All I need is to click on a specific cell represented in row/col format. Using the following code, I am not able to click the specific cell of the 'table2', though I am not getting any error. The table gets generated only during runtime. Is there any other way to get it done? $ie.table(:id,"table2")[5][1].click Also, I am not able to access the Check box in a table which gets generated dynamicaly. While using the following code , I am getting the error as " undefined method `checkbox' for # (NoMethodError) " $ie.table(:id, 'DG_SBUEDIT')[9][1].checkbox(:name,'DG_SBUEDIT:_ctl10:chkSelection').set But the same code works well in static tables. Thanks for any suggesstions in this regard. > Regards, > Ramya > Honeywell > DES - SAIF > Extn : 8674 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050427/cbcfa935/attachment.html From paul.rogers at shaw.ca Wed Apr 27 12:08:47 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Wed, 27 Apr 2005 10:08:47 -0600 Subject: [Wtr-general] How to click on the cell for a dynamic Table In-Reply-To: <77ED2BF75D59D1439F90412CC5B109741CFFD286@ie10-sahara.hiso.honeywell.com> Message-ID: <002401c54b43$64e8fd50$afd29044@NewDell> there is a method on the tablerow object you use can use after the table has been created or changed, to update the watir version of it. this might work for you row= $ie.table(:id, 'table2')[5] # stuff that updates the table happens here row.update_row_cells row[1].click Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ramya Ramalinga, Moorthy (IE10) Sent: 27 April 2005 08:43 To: wtr-general at rubyforge.org Subject: [Wtr-general] How to click on the cell for a dynamic Table Hi All, I am facing a problem while accessing the dynamic table. All I need is to click on a specific cell represented in row/col format. Using the following code, I am not able to click the specific cell of the 'table2', though I am not getting any error. The table gets generated only during runtime. Is there any other way to get it done? $ie.table(:id,"table2")[5][1].click Also, I am not able to access the Check box in a table which gets generated dynamicaly. While using the following code , I am getting the error as " undefined method `checkbox' for # (NoMethodError) " $ie.table(:id, 'DG_SBUEDIT')[9][1].checkbox(:name,'DG_SBUEDIT:_ctl10:chkSelection').set But the same code works well in static tables. Thanks for any suggesstions in this regard. Regards, Ramya Honeywell DES - SAIF Extn : 8674 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050427/3924b035/attachment.html From Mark_Cain at rl.gov Wed Apr 27 17:39:35 2005 From: Mark_Cain at rl.gov (Cain, Mark) Date: Wed, 27 Apr 2005 14:39:35 -0700 Subject: [Wtr-general] Runtime Error Warning message Message-ID: <9C0BD1E3DAF1204D842D72E2DCE2A04E154F0F@EX5V.rl.gov> Has anyone seen this message before? W, [27-Apr-2005 14:06:27#1728] WARN -- : runtime error in wait W, [27-Apr-2005 14:07:48#1728] WARN -- : runtime error in wait Do you know the cause? Thanks, ____________________ Mark L. Cain LMIT - E*STARS(r) ~ Lead Test Engineer 1981 Snyder, MSIN: G3-62, Richland, WA 99352 Mark_Cain at RL.gov 509.376.5458 "640 Kilobytes of computer memory ought to be enough for anybody." - Bill Gates, 1981 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050427/831eaca2/attachment.html From tomfeo at presslogic.com Wed Apr 27 17:41:59 2005 From: tomfeo at presslogic.com (Tom) Date: Wed, 27 Apr 2005 15:41:59 -0600 Subject: [Wtr-general] click link in class/table/page/frame Message-ID: I just started using WATIR...today...about 3 hours ago. In less than 5 minutes I was able to write a script to log in to our application. Sweet. But that's as far as I've been able to get. Our application contains 3 frames. I want to use the frame named 'main' which contains three pages. I just want to click a link, but the code on the page for the link I want to click is:
Even the table information is getting displayed as 'nil' if use the following code. table=$ie.table(:id,"table2") table.to_s() Its basically a search scenario, which displays the records in the table(id:'table2') on click on search button. Thanks Ramya **************************************************************************** **************************************** Date: Wed, 27 Apr 2005 10:08:47 -0600 From: Paul Rogers this might work for you row= $ie.table(:id, 'table2')[5] # stuff that updates the table happens here row.update_row_cells row[1].click Paul From paul.rogers at shaw.ca Fri Apr 29 09:52:38 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 29 Apr 2005 07:52:38 -0600 Subject: [Wtr-general] Re: How to Access a Checkbox in a Table / Clicking on a Image in side a Table In-Reply-To: <77ED2BF75D59D1439F90412CC5B109741D23812D@ie10-sahara.hiso.honeywell.com> Message-ID: <002101c54cc2$b4b75f90$afd29044@NewDell> Thats a bug. I almost have it fixed. I found a few others while fixing it. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ramya Ramalinga, Moorthy (IE10) Sent: 29 April 2005 04:31 To: wtr-general at rubyforge.org Subject: [Wtr-general] Re: How to Access a Checkbox in a Table / Clicking on a Image in side a Table Hi Kevin/Bret, Thanks for your suggesstion. I am able use the checkbox method in the latest watir version taken from CVS. Does the latest version supports all the methods available in the module FactoryMethods inside a Table? If no , what are the methods supported inside a Table ? For example, If I try to access a Image in Table Cell [2][6] , I am getting error. Can anyone help me out in this regard? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Code: table=$ie.table(:id,'Table4') puts table table[2][6].image(:alt,"Edit Parameter").click // I also tried with id/src attributes Output: C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2553:in `initialize': undefined method `getDocument' for # (NoMethodError) from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:386:in `new' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:386:in `image' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Thanks. Ramya HONEYWELL- Bangalore -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050429/cf0b8e9a/attachment.html From paul.rogers at shaw.ca Fri Apr 29 09:53:09 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 29 Apr 2005 07:53:09 -0600 Subject: [Wtr-general] RE: RE: How to click on the cell for a dynamic Table In-Reply-To: <77ED2BF75D59D1439F90412CC5B109741D255E7C@ie10-sahara.hiso.honeywell.com> Message-ID: <002601c54cc2$c6d71d00$afd29044@NewDell> Ok, I'll try writing a dynamic table test and get back to you Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ramya Ramalinga, Moorthy (IE10) Sent: 29 April 2005 06:00 To: wtr-general at rubyforge.org Subject: [Wtr-general] RE: RE: How to click on the cell for a dynamic Table Hi Paul, I tried using the method, 'update_row_cells',as per your suggesstion , but it also doesn't work. The Javscript Code for Table Tag
..
Even the table information is getting displayed as 'nil' if use the following code. table=$ie.table(:id,"table2") table.to_s() Its basically a search scenario, which displays the records in the table(id:'table2') on click on search button. Thanks Ramya ************************************************************************ **** **************************************** Date: Wed, 27 Apr 2005 10:08:47 -0600 From: Paul Rogers this might work for you row= $ie.table(:id, 'table2')[5] # stuff that updates the table happens here row.update_row_cells row[1].click Paul _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Fri Apr 29 11:46:52 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 29 Apr 2005 09:46:52 -0600 Subject: [Wtr-general] Re: How to Access a Checkbox in a Table / Clickingon a Image in side a Table In-Reply-To: <002101c54cc2$b4b75f90$afd29044@NewDell> Message-ID: <004801c54cd2$aa000ba0$afd29044@NewDell> Its fixed in cvs, with unittest and html Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Paul Rogers Sent: 29 April 2005 07:53 To: wtr-general at rubyforge.org Subject: RE: [Wtr-general] Re: How to Access a Checkbox in a Table / Clickingon a Image in side a Table Thats a bug. I almost have it fixed. I found a few others while fixing it. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ramya Ramalinga, Moorthy (IE10) Sent: 29 April 2005 04:31 To: wtr-general at rubyforge.org Subject: [Wtr-general] Re: How to Access a Checkbox in a Table / Clicking on a Image in side a Table Hi Kevin/Bret, Thanks for your suggesstion. I am able use the checkbox method in the latest watir version taken from CVS. Does the latest version supports all the methods available in the module FactoryMethods inside a Table? If no , what are the methods supported inside a Table ? For example, If I try to access a Image in Table Cell [2][6] , I am getting error. Can anyone help me out in this regard? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Code: table=$ie.table(:id,'Table4') puts table table[2][6].image(:alt,"Edit Parameter").click // I also tried with id/src attributes Output: C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2553:in `initialize': undefined method `getDocument' for # (NoMethodError) from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:386:in `new' from C:/ruby/lib/ruby/site_ruby/1.8/watir.rb:386:in `image' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Thanks. Ramya HONEYWELL- Bangalore -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wtr-general/attachments/20050429/6a270732/attachment.html From zeljko.filipin at gmail.com Fri Apr 29 11:50:15 2005 From: zeljko.filipin at gmail.com (Zeljko Filipin) Date: Fri, 29 Apr 2005 17:50:15 +0200 Subject: [Wtr-general] watir is not used only for testing In-Reply-To: <002601c54cc2$c6d71d00$afd29044@NewDell> Message-ID: <42725794.5451fa6e.366e.75d3@mx.gmail.com> I don't have a problem, I just wanted to share a funny story how watir made my life easier. I am using ruby and watir for a mont or two, for automated testing of web/e-mail applications. I had some old mail at one server that I coud not download with pop3. The only thing I could do is to forward each of about 200 e-mails to another account. So, I decided to make a little watir script that will do the job for me. And it worked. The only problem is that from that account I can send only 50 e-mails a day, so I will have to run it 4 times. :) I just wanted to say thanks for the great tool. Zeljko From bret at pettichord.com Fri Apr 29 16:36:44 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 29 Apr 2005 15:36:44 -0500 Subject: [Wtr-general] bug in jscript_test.rb Message-ID: <5.1.0.14.2.20050429150925.037df4a8@127.0.0.1> Most unittests do not depend on what the working directory is. However, jscript_test.rb assumed that the working directory is the unittest directory. If this is not true (as it usually isn't when i run the tests), then the script hangs and the buttons are not clicked. I've checked in a fix for this problem. I'm thinking we should start using damage control for our builds so these kinds of problems get caught quicker. Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Fri Apr 29 17:40:52 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 29 Apr 2005 16:40:52 -0500 Subject: [Wtr-general] images_tests.rb failures Message-ID: <5.1.0.14.2.20050429163325.0391db20@127.0.0.1> Unit test images_tests.rb also fails if the current working directory is not the unittests directory. It seems that webrick doesn't start up correctly. In addition, even when run from the unittests directory, i get the following errors: 1) Error: test_save_remote_image(TC_Images): Watir::Exception::CacheItemNotFound: match not found D:/workspace/watir/unittests/../watir.rb:2719:in `save' D:/workspace/watir/unittests/images_test.rb:181:in `safe_file_block' D:/workspace/watir/unittests/images_test.rb:181:in `each' D:/workspace/watir/unittests/images_test.rb:181:in `safe_file_block' D:/workspace/watir/unittests/images_test.rb:134:in `test_save_remote_image' D:/workspace/watir/unittests/images_test.rb:132:in `run_webrick' D:/workspace/watir/unittests/images_test.rb:132:in `test_save_remote_image' 2) Error: test_save_remote_image_overwrites(TC_Images): Watir::Exception::CacheItemNotFound: match not found D:/workspace/watir/unittests/../watir.rb:2719:in `save' D:/workspace/watir/unittests/images_test.rb:181:in `safe_file_block' D:/workspace/watir/unittests/images_test.rb:181:in `each' D:/workspace/watir/unittests/images_test.rb:181:in `safe_file_block' D:/workspace/watir/unittests/images_test.rb:143:in `test_save_remote_image_o verwrites' D:/workspace/watir/unittests/images_test.rb:141:in `run_webrick' D:/workspace/watir/unittests/images_test.rb:141:in `test_save_remote_image_o verwrites' 11 tests, 84 assertions, 0 failures, 2 errors _____________________ Bret Pettichord www.pettichord.com From paul.rogers at shaw.ca Fri Apr 29 19:09:43 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 29 Apr 2005 17:09:43 -0600 Subject: [Wtr-general] RE: RE: How to click on the cell for a dynamic Table In-Reply-To: <77ED2BF75D59D1439F90412CC5B109741D255E7C@ie10-sahara.hiso.honeywell.com> Message-ID: <00be01c54d10$873bdcf0$afd29044@NewDell> I looked into this, and tables seem to work ok without using the update_rows method I added a test into tables_test.rb for this. If you look at table1.html there is a button that adds a row. In the irb session below, I do a table.to_s and then click the button to add a row and then do another table.to_s It all seems ok Paul ------------------------------------------- irb(main):047:0> puts t.to_s type: id: t1 name: value: disabled: false rows: 5 cols: 1 => nil irb(main):048:0> ie.button(:index,1).click => nil irb(main):049:0> puts t.to_s type: id: t1 name: value: disabled: false rows: 6 cols: 1 => nil -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Ramya Ramalinga, Moorthy (IE10) Sent: 29 April 2005 06:00 To: wtr-general at rubyforge.org Subject: [Wtr-general] RE: RE: How to click on the cell for a dynamic Table Hi Paul, I tried using the method, 'update_row_cells',as per your suggesstion , but it also doesn't work. The Javscript Code for Table Tag
..
Even the table information is getting displayed as 'nil' if use the following code. table=$ie.table(:id,"table2") table.to_s() Its basically a search scenario, which displays the records in the table(id:'table2') on click on search button. Thanks Ramya ************************************************************************ **** **************************************** Date: Wed, 27 Apr 2005 10:08:47 -0600 From: Paul Rogers this might work for you row= $ie.table(:id, 'table2')[5] # stuff that updates the table happens here row.update_row_cells row[1].click Paul _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From andy__s at hotmail.com Fri Apr 29 19:21:16 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Fri, 29 Apr 2005 19:21:16 -0400 Subject: [Wtr-general] images_tests.rb failures In-Reply-To: <5.1.0.14.2.20050429163325.0391db20@127.0.0.1> Message-ID: I'll take a look at them. I had thought they were working as expected, but I didn't run them from a different directory. -andy ----Original Message Follows---- From: Bret Pettichord <bret at pettichord.com> Unit test images_tests.rb also fails if the current working directory is not the unittests directory. It seems that webrick doesn't start up correctly. In addition, even when run from the unittests directory, i get the following errors: 1) Error: test_save_remote_image(TC_Images): Watir::Exception::CacheItemNotFound: match not found D:/workspace/watir/unittests/../watir.rb:2719:in `save' D:/workspace/watir/unittests/images_test.rb:181:in `safe_file_block' D:/workspace/watir/unittests/images_test.rb:181:in `each' D:/workspace/watir/unittests/images_test.rb:181:in `safe_file_block' D:/workspace/watir/unittests/images_test.rb:134:in `test_save_remote_image' D:/workspace/watir/unittests/images_test.rb:132:in `run_webrick' D:/workspace/watir/unittests/images_test.rb:132:in `test_save_remote_image' 2) Error: test_save_remote_image_overwrites(TC_Images): Watir::Exception::CacheItemNotFound: match not found D:/workspace/watir/unittests/../watir.rb:2719:in `save' D:/workspace/watir/unittests/images_test.rb:181:in `safe_file_block' D:/workspace/watir/unittests/images_test.rb:181:in `each' D:/workspace/watir/unittests/images_test.rb:181:in `safe_file_block' D:/workspace/watir/unittests/images_test.rb:143:in `test_save_remote_image_o verwrites' D:/workspace/watir/unittests/images_test.rb:141:in `run_webrick' D:/workspace/watir/unittests/images_test.rb:141:in `test_save_remote_image_o verwrites' 11 tests, 84 assertions, 0 failures, 2 errors _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From andy__s at hotmail.com Fri Apr 29 19:44:21 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Fri, 29 Apr 2005 19:44:21 -0400 Subject: [Wtr-general] images_tests.rb failures In-Reply-To: Message-ID: I fixed how the path was being generated, it is not using the $myDir variable that is created in the global setup. I didn't get any failures when running it from the UT directory though. -andy ----Original Message Follows---- From: "Andy Sipe" <andy__s at hotmail.com> I'll take a look at them. I had thought they were working as expected, but I didn't run them from a different directory. -andy ----Original Message Follows---- From: Bret Pettichord &lt;bret at pettichord.com&gt; Unit test images_tests.rb also fails if the current working directory is not the unittests directory. It seems that webrick doesn't start up correctly. In addition, even when run from the unittests directory, i get the following errors: 1) Error: test_save_remote_image(TC_Images): Watir::Exception::CacheItemNotFound: match not found D:/workspace/watir/unittests/../watir.rb:2719:in `save' D:/workspace/watir/unittests/images_test.rb:181:in `safe_file_block' D:/workspace/watir/unittests/images_test.rb:181:in `each' D:/workspace/watir/unittests/images_test.rb:181:in `safe_file_block' D:/workspace/watir/unittests/images_test.rb:134:in `test_save_remote_image' D:/workspace/watir/unittests/images_test.rb:132:in `run_webrick' D:/workspace/watir/unittests/images_test.rb:132:in `test_save_remote_image' 2) Error: test_save_remote_image_overwrites(TC_Images): Watir::Exception::CacheItemNotFound: match not found D:/workspace/watir/unittests/../watir.rb:2719:in `save' D:/workspace/watir/unittests/images_test.rb:181:in `safe_file_block' D:/workspace/watir/unittests/images_test.rb:181:in `each' D:/workspace/watir/unittests/images_test.rb:181:in `safe_file_block' D:/workspace/watir/unittests/images_test.rb:143:in `test_save_remote_image_o verwrites' D:/workspace/watir/unittests/images_test.rb:141:in `run_webrick' D:/workspace/watir/unittests/images_test.rb:141:in `test_save_remote_image_o verwrites' 11 tests, 84 assertions, 0 failures, 2 errors _____________________ Bret Pettichord www.pettichord.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 From jkohl at telusplanet.net Fri Apr 29 20:06:52 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Fri, 29 Apr 2005 18:06:52 -0600 Subject: [Wtr-general] watir is not used only for testing In-Reply-To: <42725794.5451fa6e.366e.75d3@mx.gmail.com> Message-ID: <20050430000636.EANN25465.priv-edtnes27.telusplanet.net@tintin> Great story! I believe that Chris Morris wrote IEC to deal with his online banking. IEC was really the tool that started this whole project. I use Watir for testing, but not always for automating a complete test. I will write scripts that are essentially a fixture for exploratory testing sessions. I'll automate what I've tested already if I need to get deep into an app, and then take over the web browser and do manual exploratory testing once the script has completed. -Jonathan > -----Original Message----- > From: wtr-general-bounces at rubyforge.org [mailto:wtr-general- > bounces at rubyforge.org] On Behalf Of Zeljko Filipin > Sent: April 29, 2005 9:50 AM > To: wtr-general at rubyforge.org > Subject: [Wtr-general] watir is not used only for testing > > I don't have a problem, I just wanted to share a funny story how watir > made > my life easier. > I am using ruby and watir for a mont or two, for automated testing of > web/e-mail applications. > I had some old mail at one server that I coud not download with pop3. The > only thing I could do is to forward each of about 200 e-mails to another > account. So, I decided to make a little watir script that will do the job > for me. And it worked. The only problem is that from that account I can > send > only 50 e-mails a day, so I will have to run it 4 times. :) > > I just wanted to say thanks for the great tool. > > Zeljko > > _______________________________________________ > Wtr-general mailing list > Wtr-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general From andy__s at hotmail.com Fri Apr 29 21:35:31 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Fri, 29 Apr 2005 21:35:31 -0400 Subject: [Wtr-general] testing show_links Message-ID: In trying to remove some of the noise from the unit tests, I'd to add this to the show_links type methods. def show_links(strm=$stdout) ... ... strm.puts .. This way we can substitue another stream and do the test and it shouldn't change any end user behavior. Any thoughts on this? -andy From paul.rogers at shaw.ca Fri Apr 29 21:46:29 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 29 Apr 2005 19:46:29 -0600 Subject: [Wtr-general] testing show_links In-Reply-To: Message-ID: <00c101c54d26$6d7f6a50$afd29044@NewDell> I think that 1. the show methods don't really need tests 2. now that we have iterators for almost everything, the show methods should use these, and make unit tests for the show methods ( if we really want them) much simpler I really only added them to the unit tests so that there were examples available. But I don't think people are really using the unit tests as examples. When we get some better docs on how to use watir with irb ( im going to do it next week I hope) we can use those instead of the examples. But by all means do this in the mean time. It actually sounds like a good thing. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: 29 April 2005 19:36 To: wtr-general at rubyforge.org Subject: [Wtr-general] testing show_links In trying to remove some of the noise from the unit tests, I'd to add this to the show_links type methods. def show_links(strm=$stdout) ... ... strm.puts .. This way we can substitue another stream and do the test and it shouldn't change any end user behavior. Any thoughts on this? -andy _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From paul.rogers at shaw.ca Fri Apr 29 21:56:45 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Fri, 29 Apr 2005 19:56:45 -0600 Subject: [Wtr-general] testing show_links In-Reply-To: Message-ID: <00c201c54d27$dceeada0$afd29044@NewDell> Andy, do a fresh check out as Bret has made a lot of changes to the unit tests this afternoon Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: 29 April 2005 19:36 To: wtr-general at rubyforge.org Subject: [Wtr-general] testing show_links In trying to remove some of the noise from the unit tests, I'd to add this to the show_links type methods. def show_links(strm=$stdout) ... ... strm.puts .. This way we can substitue another stream and do the test and it shouldn't change any end user behavior. Any thoughts on this? -andy _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From andy__s at hotmail.com Fri Apr 29 22:45:27 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Fri, 29 Apr 2005 22:45:27 -0400 Subject: [Wtr-general] testing show_links In-Reply-To: <00c101c54d26$6d7f6a50$afd29044@NewDell> Message-ID: sounds fine -- its pretty easy to add the tests, so as I go through I'll add them as I see them. It'll get us one step closer to a cleaner UT run and if the underneath impl changes then they can help verify that. -andy ----Original Message Follows---- From: Paul Rogers <paul.rogers at shaw.ca> I think that 1. the show methods don't really need tests 2. now that we have iterators for almost everything, the show methods should use these, and make unit tests for the show methods ( if we really want them) much simpler I really only added them to the unit tests so that there were examples available. But I don't think people are really using the unit tests as examples. When we get some better docs on how to use watir with irb ( im going to do it next week I hope) we can use those instead of the examples. But by all means do this in the mean time. It actually sounds like a good thing. Paul -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Andy Sipe Sent: 29 April 2005 19:36 To: wtr-general at rubyforge.org Subject: [Wtr-general] testing show_links In trying to remove some of the noise from the unit tests, I'd to add this to the show_links type methods. def show_links(strm=$stdout) ... ... strm.puts .. This way we can substitue another stream and do the test and it shouldn't change any end user behavior. Any thoughts on this? -andy _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Fri Apr 29 23:01:20 2005 From: bret at pettichord.com (Bret Pettichord) Date: Fri, 29 Apr 2005 22:01:20 -0500 Subject: [Wtr-general] unit test cleanup Message-ID: <5.1.0.14.2.20050429215737.03ae6b88@127.0.0.1> Today Paul and i cleaned up the unit tests. The new suite core_tests.rb runs most of the tests in about 100 seconds. Previously all_tests ran in 300 seconds. The core suite can be run in the background. It omits six tests for the specified reasons: ['popups', # has problems when run in a suite (is ok when run alone); # must be visible # will be revised to use autoit # takes 15 seconds to run 'images', # failing tests; also assumes working dir is unittests 'screen_capture', # is always visible; takes 25 secons 'filefield', # is always visible; takes 40 seconds 'jscript', 'js_events' # is always visible We hope that most of these will eventually be fixed, so they can be added back to the core suite. Continue to use all_tests.rb to run all the unit tests before commits. _____________________ Bret Pettichord www.pettichord.com From andy__s at hotmail.com Fri Apr 29 23:11:01 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Fri, 29 Apr 2005 23:11:01 -0400 Subject: [Wtr-general] unit test cleanup In-Reply-To: <5.1.0.14.2.20050429215737.03ae6b88@127.0.0.1> Message-ID: The images tests should be working now. I put in a change this evening that uses the correct path information. -andy ----Original Message Follows---- From: Bret Pettichord <bret at pettichord.com> Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: [Wtr-general] unit test cleanup Date: Fri, 29 Apr 2005 22:01:20 -0500 Today Paul and i cleaned up the unit tests. The new suite core_tests.rb runs most of the tests in about 100 seconds. Previously all_tests ran in 300 seconds. The core suite can be run in the background. It omits six tests for the specified reasons: ['popups', # has problems when run in a suite (is ok when run alone); # must be visible # will be revised to use autoit # takes 15 seconds to run 'images', # failing tests; also assumes working dir is unittests 'screen_capture', # is always visible; takes 25 secons 'filefield', # is always visible; takes 40 seconds 'jscript', 'js_events' # is always visible We hope that most of these will eventually be fixed, so they can be added back to the core suite. Continue to use all_tests.rb to run all the unit tests before commits. _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From bret at pettichord.com Sat Apr 30 01:03:15 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 30 Apr 2005 00:03:15 -0500 Subject: [Wtr-general] dynamic Watir In-Reply-To: <003301c54bf8$c4a61b00$afd29044@NewDell> References: Message-ID: <5.1.0.14.2.20050430000218.03ae6cc8@127.0.0.1> At 08:47 AM 4/28/2005, Paul Rogers wrote: >There are also lots of page reloads, each one will slow the tests down. >In many cases we don't need toreload, but the page load is in the setup >method of the test, so it automatically gets reloaded. >Im not sure of the solution to this. if you don't need to reload the page, then i don't see any reason not to combine two test methods into one. but you should time it both ways to measure the difference. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Apr 30 01:05:55 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 30 Apr 2005 00:05:55 -0500 Subject: [Wtr-general] dynamic Watir In-Reply-To: <5.1.0.14.2.20050428074120.038cc870@127.0.0.1> References: <5.1.0.14.2.20050427231547.038436f0@127.0.0.1> Message-ID: <5.1.0.14.2.20050430000332.03ae8758@127.0.0.1> At 07:41 AM 4/28/2005, Bret Pettichord wrote: >>If there isn't any particular reason for so much going to the console >>maybe I'll make a few passes through and add TCs for anything that is >>being visually checked and remove any extra 'puts' type statements ??? > >that would be great. we've had this issue on the tracker for a while. actually i should be more clear. if it is something like puts '--- some stuff here ---' then it can be removed. if it is like puts $ie.show_something then what we need to do is capture the output and assert that it is correct (instead of depending on manual verification). there are some tests that do that if you need a guide. check for ones that require 'iostring'. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Apr 30 01:10:01 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 30 Apr 2005 00:10:01 -0500 Subject: [Wtr-general] dynamic Watir In-Reply-To: Message-ID: <5.1.0.14.2.20050430000624.039b4e18@127.0.0.1> At 05:53 AM 4/28/2005, Andy Sipe wrote: >Doing a wrapper should work with no problem, but it does mean that the >user might have to switch between IE and DY (or whatever its called). ok. >Also, doing a wrapper would mean that the search would stop at IE, it >couldn't happen at a lower object (IE.form1.blah as in the example Chris gave). i don't understand. >My current approach is actually to reopen the IE class and add the methods >in the DY file, once that is all working I'd just add the same dynamic >stuff to the other elements as required.. So, in that case require 'DY' >would get you IE with the dynamic methods + all the existing methods. > >I'm open to either approach -- suggestions?? check it in and it will be easier to discuss. >The current version actually does both name and id. It does id first and >then looks through texts. name and id and text are three different things. do you plan to do all three? i suggest it be configurable, like this: dy = Watir::DY.new(ie, [:id]) >My thought was to write it such that the method of resolving a match of an >element to a method can be easily expanded. >What I see is that this has a couple of advantages: > >1) If a particular user wants a more flexible name resolution they can >essentially write their own little resolver - this would help match local >coding standards, or tool idioms, etc... >2) I think it'll help fix items that would make methods that aren't valid >ruby syntax >3) It allows you to write code that looks more like ruby vs web page ID or >texts, given how wacky some web element naming can be this is nice >4) Hopefully, if the user sees it on the screen they can type in something >and often it'll figure out what they were talking about. The matching >wouldn't have to be 100% exact. > >I'm really still in the prototype phase of playing around with the whole >thing. I'll get the stuff that Chris did and check it for ideas and other >goodness. > >-andy _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Apr 30 01:15:25 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 30 Apr 2005 00:15:25 -0500 Subject: [Wtr-general] testing show_links In-Reply-To: Message-ID: <5.1.0.14.2.20050430001302.03ae2eb0@127.0.0.1> Here's how to do it without changing the method: class TC_show_frames < Test::Unit::TestCase include MockStdoutTestCase def capture_and_compare(page, expected) $ie.goto($htmlRoot + page) $stdout = @mockout $ie.showFrames assert_equal(expected, @mockout) end def test_show_nested_frames capture_and_compare("nestedFrames.html", <In trying to remove some of the noise from the unit tests, I'd to add this >to the show_links type methods. > >def show_links(strm=$stdout) >... >... >strm.puts >.. > > > >This way we can substitue another stream and do the test and it shouldn't >change any end user behavior. > >Any thoughts on this? > >-andy > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Apr 30 01:17:49 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 30 Apr 2005 00:17:49 -0500 Subject: [Wtr-general] testing show_links In-Reply-To: <00c101c54d26$6d7f6a50$afd29044@NewDell> References: Message-ID: <5.1.0.14.2.20050430001541.03ae21c0@127.0.0.1> At 08:46 PM 4/29/2005, Paul Rogers wrote: >I think that >1. the show methods don't really need tests i disagree. i've made changes where i actually fixed the tests of the show methods (so they were verified) first so that i could make changes that impacted them with confidence. >2. now that we have iterators for almost everything, the show methods >should use these, and make unit tests for the show methods ( if we >really want them) much simpler maybe. tests in place first would ensure that this refactoring didn't break existing behavior. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Apr 30 01:44:22 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 30 Apr 2005 00:44:22 -0500 Subject: [Wtr-general] images_tests.rb failures In-Reply-To: References: Message-ID: <5.1.0.14.2.20050430003658.037c8378@127.0.0.1> At 06:44 PM 4/29/2005, Andy Sipe wrote: >I fixed how the path was being generated, it is not using the $myDir >variable that is >created in the global setup. looks good, thanks >I didn't get any failures when running it from the UT directory though. here's the code that is failing: # This method saves the image to the file path that is given. If # the image src references a local url (file:///...) then the image # is saved directly from the src. If the image references any # other kind of url then the 'Temporary Internet Files' cache is # searched for the image. # Raises a CacheItemNotFound exception if the image cannot be located # path - directory path and file name of where image should be saved def save(path) if (src =~ /^file\:\/\/\//) File.copy(src.gsub(/^file:\/\/\//, ''), path) else loc = WIN32OLE.new("Shell.Application").Namespace(0x0020).Self.Path name = src.slice(src.rindex('/')+1,src.length) name = Regexp.new(name.sub(/^([^.]+)/, '\1\[\d+\]')) matches = [] Find.find(loc) { |entry| matches << entry if (entry =~ name) } raise CacheItemNotFound, "match not found" if (matches.length == 0) match = matches[0] matches.each { |entry| match = entry if (File.atime(entry) > File.atime(match)) } File.copy(match, path) end end matches.length is presumably 0. i tried to figure this out, but was confused. what is 'name' supposed to be? i tried to puts it, but it is actually a regexp that can't be putted. can you explain what this code is supposed to be doing? bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Apr 30 01:47:17 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 30 Apr 2005 00:47:17 -0500 Subject: [Wtr-general] bug in jscript_test.rb In-Reply-To: <5.1.0.14.2.20050429150925.037df4a8@127.0.0.1> Message-ID: <5.1.0.14.2.20050430004613.039c8cf8@127.0.0.1> At 03:36 PM 4/29/2005, Bret Pettichord wrote: >I've checked in a fix for this problem. I'm thinking we should start using >damage control for our builds so these kinds of problems get caught quicker. damage control, if you are wondering, is a continuous integration server written in ruby. it would automatically run the unittests whenever anyone checked in new code to cvs. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Apr 30 02:46:43 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 30 Apr 2005 01:46:43 -0500 Subject: [Wtr-general] fast running watir Message-ID: <5.1.0.14.2.20050430012628.039be638@127.0.0.1> Want to run your Watir tests faster? There are now two ways. 1. Use a new command line switch '-f' (for fast) test_script.rb -f 2. Use a new Watir::IE method ie = Watir::IE.new ie.set_fast_speed Expect to see test scripts to run approx twice as fast as before. Let us know if this introduces problems. I have also turned off the spinner by default. If you use Scite for your development, this means that you won't see 'BS' all over when you run tests. If you run fast, you really wouldn't see the spinner anyway. If you like to run slow and see the spinner (Paul), then you can use the -x switch to bring the spinner back. (The -s switch used to turn off the spinner; now it does nothing.) This is in HEAD and will be in the next release. Bret _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Apr 30 02:52:43 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 30 Apr 2005 01:52:43 -0500 Subject: [Wtr-general] show_links failure Message-ID: <5.1.0.14.2.20050430015222.039be778@127.0.0.1> 1) Failure: test_showLinks(TC_Links) [d:/workspace/watir/unittests/../unittests/links_test.rb:124:in `test_showLinks' d:/workspace/watir/unittests/../unittests/links_test.rb:124:in `each_with_index' d:/workspace/watir/unittests/../unittests/links_test.rb:124:in `each' d:/workspace/watir/unittests/../unittests/links_test.rb:124:in `each_with_index' d:/workspace/watir/unittests/../unittests/links_test.rb:124:in `test_showLinks']: is not true. _____________________ Bret Pettichord www.pettichord.com From bret at pettichord.com Sat Apr 30 04:32:52 2005 From: bret at pettichord.com (Bret Pettichord) Date: Sat, 30 Apr 2005 03:32:52 -0500 Subject: [Wtr-general] Clicking Popup Windows Message-ID: <5.1.0.14.2.20050430021205.03adcc28@127.0.0.1> We're going to switch to using AutoIt as our intermediary for the Win32 API's. This'll mean including this DLL in our distribution and registering as part of the installation. And it'll mean rewriting a lot of stuff that has been using the WinClicker. I also think there is a better logic that we can use for this stuff. Suppose manual steps are: 1. Click button on page marked 'go' 2. Confirm dialog Scripts have looked like this: startClicker("OK") $ie.button("Go").click Which is necessary, but backwards (and thus hard to understand). I suggest that we do something like this instead: Thread.new {$ie.button("Go").click} window_helper.push_confirm_button_ok This way the child thread will be blocked, allowing the main thread to click the popup. See test_alert_button2 in jscript_test.rb for an example of how to really put this together. Bret _____________________ Bret Pettichord www.pettichord.com From jkohl at telusplanet.net Sat Apr 30 04:41:33 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Sat, 30 Apr 2005 02:41:33 -0600 Subject: [Wtr-general] Clicking Popup Windows In-Reply-To: <5.1.0.14.2.20050430021205.03adcc28@127.0.0.1> Message-ID: <20050430084111.YQPH10290.priv-edtnes56.telusplanet.net@tintin> > > 1. Click button on page marked 'go' > 2. Confirm dialog > > Scripts have looked like this: > > startClicker("OK") > $ie.button("Go").click > > Which is necessary, but backwards (and thus hard to understand). > > I suggest that we do something like this instead: > > Thread.new {$ie.button("Go").click} > window_helper.push_confirm_button_ok > > This way the child thread will be blocked, allowing the main thread to > click the popup. See test_alert_button2 in jscript_test.rb for an example > of how to really put this together. This is definitely more intuitive than what we have been doing, and closer to what I think would be the most intuitive: ie.button("Go").click window_helper.push_confirm_button_ok I don't know how we could do the latter without using threads, but the example you gave is better than what we've been doing. -Jonathan From jkohl at telusplanet.net Sat Apr 30 05:32:51 2005 From: jkohl at telusplanet.net (Jonathan Kohl) Date: Sat, 30 Apr 2005 03:32:51 -0600 Subject: [Wtr-general] unit test failures Message-ID: <20050430093229.VSJR1968.priv-edtnes28.telusplanet.net@tintin> Running core_tests: .................EFC:/watir_bonus/unitTests/../unittests/navigate_test.rb:22 : warning: string p attern instead of regexp; metacharacters no longer effective C:/watir_bonus/unitTests/../unittests/navigate_test.rb:29: warning: string pattern instead of r egexp; metacharacters no longer effective ....radio 1 is set : false ............................................E....... Finished in 129.005 seconds. 1) Error!!! test_newWindows(TC_Links): NoMethodError: undefined method `title' for nil:NilClass C:/watir_bonus/unitTests/../unittests/newWindow_test.rb:15:in `test_newWindows' C:/watir_bonus/unitTests/core_tests.rb:7 2) Failure!!! test_showLinks(TC_Links) [C:/watir_bonus/unitTests/../unittests/links_test.rb:124]: 3) Error!!! test_getLink_ByBadHow(TC_ie): NoMethodError: undefined method `assert_raise' for # C:/watir_bonus/unitTests/../unittests/ie_test.rb:35:in `test_getLink_ByBadHow' C:/watir_bonus/unitTests/core_tests.rb:7 134 tests, 850 assertions, 1 failures, 2 errors test_newWindows may be failing because of my pop-up blocker. I ran with the -f switch for fast, and it ran very quickly. Very cool feature! Sadly, my Ruby runtime crashed (looked like a General Protection fault) about half way through the test run using 1.8.0-10 on Win2K. Lots of good changes with the cleanup though. -Jonathan From paul.rogers at shaw.ca Sat Apr 30 10:04:12 2005 From: paul.rogers at shaw.ca (Paul Rogers) Date: Sat, 30 Apr 2005 08:04:12 -0600 Subject: [Wtr-general] Clicking Popup Windows In-Reply-To: <5.1.0.14.2.20050430021205.03adcc28@127.0.0.1> Message-ID: <000001c54d8d$7c70ec70$afd29044@NewDell> Ive updated the installer to install and register autoit -----Original Message----- From: wtr-general-bounces at rubyforge.org [mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Bret Pettichord Sent: 30 April 2005 02:33 To: wtr-general at rubyforge.org Subject: [Wtr-general] Clicking Popup Windows We're going to switch to using AutoIt as our intermediary for the Win32 API's. This'll mean including this DLL in our distribution and registering as part of the installation. And it'll mean rewriting a lot of stuff that has been using the WinClicker. I also think there is a better logic that we can use for this stuff. Suppose manual steps are: 1. Click button on page marked 'go' 2. Confirm dialog Scripts have looked like this: startClicker("OK") $ie.button("Go").click Which is necessary, but backwards (and thus hard to understand). I suggest that we do something like this instead: Thread.new {$ie.button("Go").click} window_helper.push_confirm_button_ok This way the child thread will be blocked, allowing the main thread to click the popup. See test_alert_button2 in jscript_test.rb for an example of how to really put this together. Bret _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From andy__s at hotmail.com Sat Apr 30 11:34:29 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Sat, 30 Apr 2005 11:34:29 -0400 Subject: [Wtr-general] testing show_links In-Reply-To: <5.1.0.14.2.20050430001302.03ae2eb0@127.0.0.1> Message-ID: I updated it to use what you are describing below. I also updated the assert to use assert_match so it'll show a more meaningful message on failures. The test is passing on my local build, if someone can send in the failing message I can fix it, I'm sure it has something to do with the building of the file URLs and the $myDir variables. Thanks -andy ----Original Message Follows---- From: Bret Pettichord <bret at pettichord.com> Reply-To: wtr-general at rubyforge.org To: wtr-general at rubyforge.org Subject: Re: [Wtr-general] testing show_links Date: Sat, 30 Apr 2005 00:15:25 -0500 Here's how to do it without changing the method: class TC_show_frames < Test::Unit::TestCase include MockStdoutTestCase def capture_and_compare(page, expected) $ie.goto($htmlRoot + page) $stdout = @mockout $ie.showFrames assert_equal(expected, @mockout) end def test_show_nested_frames capture_and_compare("nestedFrames.html", <<END_OF_MESSAGE) there are 2 frames frame index: 0 name: nestedFrame frame index: 1 name: nestedFrame2 END_OF_MESSAGE end end The MockStdoutTestCase has a setup method that creates a @mockout that actually captures what would ordinarily go to stdout. Please ask if this isn't clear. Bret At 08:35 PM 4/29/2005, Andy Sipe wrote: >In trying to remove some of the noise from the unit tests, I'd to >add this to the show_links type methods. > >def show_links(strm=$stdout) >... >... >strm.puts >.. > > > >This way we can substitue another stream and do the test and it >shouldn't change any end user behavior. > >Any thoughts on this? > >-andy > > >_______________________________________________ >Wtr-general mailing list >Wtr-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/wtr-general _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From andy__s at hotmail.com Sat Apr 30 11:53:14 2005 From: andy__s at hotmail.com (Andy Sipe) Date: Sat, 30 Apr 2005 11:53:14 -0400 Subject: [Wtr-general] images_tests.rb failures In-Reply-To: <5.1.0.14.2.20050430003658.037c8378@127.0.0.1> Message-ID: Name is a regex that is trying to match something like imagename[1].jpg or imagename[15].bmp. The code is walking the users cache and is looking to find the most recent image in the cache that matches the file name of the src attribute of the image in question. The regex is used becaue the cache isn't filled with imagename.jpg but imagename[x].jpg. Basically every image that is a possible match is stuck in the matches array. If no matches are found then the CacheItemNotFound exception is thrown meaning we couldn't find the cache. If matches are found then the most recent (by timestamp) is the image that is saved. It seems the failures you are seeing are because the items isn't being found when it is expected -- the CacheItemNotFound exception is being thrown. Are others seeing this same test failure? If not maybe it is a local IE cache setting or a full cache? It could also be a problem with the assumptions the search is using (OS or browser version or...). -andy ----Original Message Follows---- From: Bret Pettichord <bret at pettichord.com> At 06:44 PM 4/29/2005, Andy Sipe wrote: >I didn't get any failures when running it from the UT directory >though. here's the code that is failing: # This method saves the image to the file path that is given. If # the image src references a local url (file:///...) then the image # is saved directly from the src. If the image references any # other kind of url then the 'Temporary Internet Files' cache is # searched for the image. # Raises a CacheItemNotFound exception if the image cannot be located # path - directory path and file name of where image should be saved def save(path) if (src =~ /^file\:\/\/\//) File.copy(src.gsub(/^file:\/\/\//, ''), path) else loc = WIN32OLE.new("Shell.Application").Namespace(0x0020).Self.Path name = src.slice(src.rindex('/')+1,src.length) name = Regexp.new(name.sub(/^([^.]+)/, '\1\[\d+\]')) matches = [] Find.find(loc) { |entry| matches << entry if (entry =~ name) } raise CacheItemNotFound, "match not found" if (matches.length == 0) match = matches[0] matches.each { |entry| match = entry if (File.atime(entry) > File.atime(match)) } File.copy(match, path) end end matches.length is presumably 0. i tried to figure this out, but was confused. what is 'name' supposed to be? i tried to puts it, but it is actually a regexp that can't be putted. can you explain what this code is supposed to be doing? bret _____________________ Bret Pettichord www.pettichord.com _______________________________________________ Wtr-general mailing list Wtr-general at rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general From shaorobics at gmail.com Sat Apr 30 20:32:13 2005 From: shaorobics at gmail.com (Shao Kang Tat) Date: Sat, 30 Apr 2005 20:32:13 -0400 Subject: [Wtr-general] counting regular expressions on a page Message-ID: <593b9ae8050430173242e64228@mail.gmail.com> hi, say I'm doing this: assert($ie.contains_text(*some regular expression*)) is there a way to get a hold of the # of occurences this regular expression appears on the page? Thanks Shao
..