From: Zubair Ansari Date: 2010-05-12T01:38:08+09:00 Subject: How to read data in text file and put into the web page Hi i want to read data in the text file like. username=abcd password=1234 i write code through the counter and i want write code without counter. Plz help me...................... require 'watir' include Watir counter = 1 ie=Watir::IE.start("http://www.google.co.in") file = File.new("c:/test/test.txt", "r") while (line = file.gets '=') line = file.readline while(counter == 1) ie.text_field(:name,"userId").set(line) break end while(counter == 2) ie.text_field(:name,"password").set(line) break end counter = counter + 1 end file.close ie.button(:name,"Submit").click() -- Posted via http://www.ruby-forum.com/.