From: Raj pal Date: 2013-03-13T22:04:08+09:00 Subject: Re: question on watir I am using excel sheet to store the values, while I am reading those values I am storing inside the hash, first row act as a key, remaining column act as a values, Now I need the order of those column to match with the fields, But i don't have. If i had the Order then I would not have to write like ----- begin $browser.text_field(:id,'').set(contact['Name'] rescue =>e puts e end begin $browser.text_field(:id,'').set(contact['age'] rescue =>e puts e end begin $browser.text_field(:id,'').set(contact['Gender'] rescue =>e puts e end ----- consider the above three code, I can take id dynamically and I can pass into text_field(:id,' ') here and at the same time if i can get the Name,age,Gender in the order then I can pass that too so I can put into the loop, I no need to write the static code for thousands of field. But unfortunately it's not working. Thanks for your help. RAJ -- Posted via http://www.ruby-forum.com/.