Re: [Wtr-general] Variable Number and Type of Method Parameters?
Right now Watir normally only supports a single attribute. You may want to look at Wet, which supports multiple attributes. Or, as Angrez has suggested, use xpath. BretOn 1/20/06, Andrew McFarlane [EMAIL PROTECTED] wrote: I am testing an application whose UI controls are often difficult tospecify.Sometimes I can uniquely identify a control with one attribute,and sometimes I need 3 or 4.Sometimes I can't see the difference between multiple controls, so I need to use an index value as one of those 3 or 4attributes.With WATIR, can I specify a control by using a variable numberand kind of parameters?I have a watered-down-not-thread-safe-has-synchronization-problems Perl tool (that I would like to toss) emulated from WATIR where I can say:$browser-link( innerText = 'Modify', nameProp =qr(modifyProductContract), outerHTML = qr((Pro|Select|Value) Service),index = 4 )-click; I see that I can use regex's with WATIR (very good), so I just need to makesure that I can pass in any number of control attributes and values before Iembrace WATIR.If I can, how do I do it?A hash?Something else? Thanks.Andrew McFarlane___Wtr-general mailing listWtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Variable Number and Type of Method Parameters?
Hi, I don't understand. You're saying that WATIR uses REXML to allow Xpath expressions against the IE DOM?Correct.- Angrez ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] Variable Number and Type of Method Parameters?
I am testing an application whose UI controls are often difficult to specify. Sometimes I can uniquely identify a control with one attribute, and sometimes I need 3 or 4. Sometimes I can't see the difference between multiple controls, so I need to use an index value as one of those 3 or 4 attributes. With WATIR, can I specify a control by using a variable number and kind of parameters? I have a watered-down-not-thread-safe-has-synchronization-problems Perl tool (that I would like to toss) emulated from WATIR where I can say: $browser-link( innerText = 'Modify', nameProp = qr(modifyProductContract), outerHTML = qr((Pro|Select|Value) Service), index = 4 )-click; I see that I can use regex's with WATIR (very good), so I just need to make sure that I can pass in any number of control attributes and values before I embrace WATIR. If I can, how do I do it? A hash? Something else? Thanks. Andrew McFarlane ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Variable Number and Type of Method Parameters?
Hi,I think XPath extenstion to WATiR would be helpful in this case. Please download the tar ball from HEAD and read the supporting document in the 'docs' directory.Regards,Angrez On 1/20/06, Andrew McFarlane [EMAIL PROTECTED] wrote: I am testing an application whose UI controls are often difficult tospecify.Sometimes I can uniquely identify a control with one attribute,and sometimes I need 3 or 4.Sometimes I can't see the difference between multiple controls, so I need to use an index value as one of those 3 or 4attributes.With WATIR, can I specify a control by using a variable numberand kind of parameters?I have a watered-down-not-thread-safe-has-synchronization-problems Perl tool (that I would like to toss) emulated from WATIR where I can say:$browser-link( innerText = 'Modify', nameProp =qr(modifyProductContract), outerHTML = qr((Pro|Select|Value) Service),index = 4 )-click; I see that I can use regex's with WATIR (very good), so I just need to makesure that I can pass in any number of control attributes and values before Iembrace WATIR.If I can, how do I do it?A hash?Something else? Thanks.Andrew McFarlane___Wtr-general mailing listWtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Variable Number and Type of Method Parameters?
Not sure if you guys realize it but there is an xml library available in Ruby called REXML and from there you can use it in your WATIR scripts. I don't know if you saw my last post but I had written a small testing framework on top of Ruby and WATIR that utilizes REXML so that I can store my controls in an XML file and reference them from there. If you get a chance you might want to take a look to see how you can use the REXML library. Sergio From: [EMAIL PROTECTED] on behalf of Angrez Singh Sent: Fri 1/20/2006 12:35 AM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] Variable Number and Type of Method Parameters? Hi, I think XPath extenstion to WATiR would be helpful in this case. Please download the tar ball from HEAD and read the supporting document in the 'docs' directory. Regards, Angrez On 1/20/06, Andrew McFarlane [EMAIL PROTECTED] wrote: I am testing an application whose UI controls are often difficult to specify. Sometimes I can uniquely identify a control with one attribute, and sometimes I need 3 or 4. Sometimes I can't see the difference between multiple controls, so I need to use an index value as one of those 3 or 4 attributes. With WATIR, can I specify a control by using a variable number and kind of parameters? I have a watered-down-not-thread-safe-has-synchronization-problems Perl tool (that I would like to toss) emulated from WATIR where I can say: $browser-link( innerText = 'Modify', nameProp = qr(modifyProductContract), outerHTML = qr((Pro|Select|Value) Service), index = 4 )-click; I see that I can use regex's with WATIR (very good), so I just need to make sure that I can pass in any number of control attributes and values before I embrace WATIR. If I can, how do I do it? A hash? Something else? Thanks. Andrew McFarlane ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general winmail.dat___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Variable Number and Type of Method Parameters?
Hi Sergio,The XPath extension internally uses REXML only to find the elements in IE DOM. Regards,AngrezOn 1/20/06, Sergio Pinon [EMAIL PROTECTED] wrote:Not sure if you guys realize it but there is an xml library available in Ruby called REXML and from there you can use it in your WATIR scripts. I don't know if you saw my last post but I had written a small testing framework on top of Ruby and WATIR that utilizes REXML so that I can store my controls in an XML file and reference them from there. If you get a chance you might want to take a look to see how you can use the REXML library. SergioFrom: [EMAIL PROTECTED] on behalf of Angrez SinghSent: Fri 1/20/2006 12:35 AMTo: wtr-general@rubyforge.orgSubject: Re: [Wtr-general] Variable Number and Type of Method Parameters?Hi,I think XPath extenstion to WATiR would be helpful in this case. Please download the tar ball from HEAD and read the supporting document in the 'docs' directory. Regards,AngrezOn 1/20/06, Andrew McFarlane [EMAIL PROTECTED] wrote:I am testing an application whose UI controls are often difficult to specify.Sometimes I can uniquely identify a control with one attribute,and sometimes I need 3 or 4.Sometimes I can't see the difference betweenmultiple controls, so I need to use an index value as one of those 3 or 4 attributes.With WATIR, can I specify a control by using a variable numberand kind of parameters?I have a watered-down-not-thread-safe-has-synchronization-problems Perl tool(that I would like to toss) emulated from WATIR where I can say: $browser-link( innerText = 'Modify', nameProp =qr(modifyProductContract), outerHTML = qr((Pro|Select|Value) Service),index = 4 )-click;I see that I can use regex's with WATIR (very good), so I just need to make sure that I can pass in any number of control attributes and values before Iembrace WATIR.If I can, how do I do it?A hash?Something else?Thanks.Andrew McFarlane ___Wtr-general mailing listWtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general___Wtr-general mailing listWtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Variable Number and Type of Method Parameters?
I dont understand. Youre saying that WATIR uses REXML to allow Xpath expressions against the IE DOM? Sergio From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Angrez Singh Sent: Friday, January 20, 2006 10:56 AM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] Variable Number and Type of Method Parameters? Hi Sergio, The XPath extension internally uses REXML only to find the elements in IE DOM. Regards, Angrez On 1/20/06, Sergio Pinon [EMAIL PROTECTED] wrote: Not sure if you guys realize it but there is an xml library available in Ruby called REXML and from there you can use it in your WATIR scripts. I don't know if you saw my last post but I had written a small testing framework on top of Ruby and WATIR that utilizes REXML so that I can store my controls in an XML file and reference them from there. If you get a chance you might want to take a look to see how you can use the REXML library. Sergio From: [EMAIL PROTECTED] on behalf of Angrez Singh Sent: Fri 1/20/2006 12:35 AM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] Variable Number and Type of Method Parameters? Hi, I think XPath extenstion to WATiR would be helpful in this case. Please download the tar ball from HEAD and read the supporting document in the 'docs' directory. Regards, Angrez On 1/20/06, Andrew McFarlane [EMAIL PROTECTED] wrote: I am testing an application whose UI controls are often difficult to specify.Sometimes I can uniquely identify a control with one attribute, and sometimes I need 3 or 4.Sometimes I can't see the difference between multiple controls, so I need to use an index value as one of those 3 or 4 attributes.With WATIR, can I specify a control by using a variable number and kind of parameters? I have a watered-down-not-thread-safe-has-synchronization-problems Perl tool (that I would like to toss) emulated from WATIR where I can say: $browser-link( innerText = 'Modify', nameProp = qr(modifyProductContract), outerHTML = qr((Pro|Select|Value) Service), index = 4 )-click; I see that I can use regex's with WATIR (very good), so I just need to make sure that I can pass in any number of control attributes and values before I embrace WATIR. If I can, how do I do it?A hash?Something else? Thanks. Andrew McFarlane ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general