Hi all,

 

I am new to Watir and Ruby. I saw the document (which is really good, btw) and it talk about one scenario of using regular expressions like below.

 

ie.link(:url, /shtml/).click

 

This one, I believe, will look for the term in a string. What I need do to only look for the string which ends with the given section. For example, I have two form fields with id like

 

FormName_Name1 and FormName_Name1New

 

So when I use the Watir statement like – e.text_field(:id,/_Name1/).set("astharaj") – it will put the same in both – right? I want it to just set for first field (FormName_Name1). How can I do this? Any suggestions would be great.

 

Also, if there is a label of the same name and I am using text_field in the watir statement – then it will not look at the label – right?

 

Thanks,

Astha

_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to