How to compair two object values.plz help me i write that code but not
work properly
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)
if(ie.text_field(:name,"userId").value ==
line)
puts line
puts ie.text_field(:name,"userId").value
puts "Correct Value of User ID"
else
puts line
puts ie.text_field(:name,"userId").value
puts "Wrong Value of User ID"
end
break
end
while(counter == 2)
ie.text_field(:name,"password").set(line)
if(ie.text_field(:name,"password").value ==
line)
puts line
puts ie.text_field(:name,"password").value
puts "Correct Value of Password"
else
puts line
puts ie.text_field(:name,"password").value
puts"Wrong Value of Password"
end
break
end
counter = counter + 1
end
file.close
ie.button(:name,"Submit").click()
···
--
Posted via http://www.ruby-forum.com/.