Ok, here is your misunderstanding.
For example, if you have: text_field(:index, 20) The index number '20' is for all text_field objects on the page. For example, if you have: text_field(:name=>'q', :index=>20) It does not mean the same text_field object above. It means the index '20' of all text_field with 'name=p'. If you have 'name=p' less than 20, you get 'non-existance' error. Hope that helps. Michael ----- Original Message ---- From: Isabel <joybe...@gmail.com> To: Watir General <watir-general@googlegroups.com> Sent: Tuesday, March 24, 2009 1:55:07 AM Subject: [wtr-general] Re: Multiple Attributes for Input Elements actually i am trying to create a framework around watir so by default i get the indices for all the elements and then pass the multiple attributes, so i need to work this out with both the attributes... On Mar 24, 1:38 pm, Željko Filipin <zeljko.fili...@wa-research.ch> wrote: > On Tue, Mar 24, 2009 at 09:33, Isabel <joybe...@gmail.com> wrote: > > ie.text_field(:name => "q" ,:index => 2).set("xyz") > > Still I am getting an error. > > Because it can not find the second text field with name "q". > > > ie.text_field(:name => "q" ,:index => 1).set("xyz") > > and > > ie.text_field(:index => 2).set("xyz") > > both work fine... > > I just do not understand the problem. You got it working. What do you want > to do? > > Željko --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---