From: Raj pal Date: 2013-04-04T22:05:34+09:00 Subject: Re: question on watir Look at this code [:text_fields, :select_lists, :checkboxes].each do |type| $browser.send(type).each do |i| if type.to_s[0..-2].eql?('text_field') puts 'enter your name' p=gets.chomp puts "begin" puts "$browser.text_field(:id,'#{i.id}').set(#{p})" puts "rescue =>e" puts "end" end end end I hope now you can understand what I am doing here. RAJ -- Posted via http://www.ruby-forum.com/.