How to compair two object values.plz help me i write that co

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()

Zubair A. wrote:

                           puts line
                           puts ie.text_field(:name,"userId").value
                           puts "Wrong Value of User ID"

Change those first two to
puts line.inspect
puts ie.text_field(:name,“userId”).value.inspect

to get a better idea of what’s different. My guess is that one contains
a newline and the other doesn’t; line.chomp! is your friend.

Brian C. wrote:

Zubair A. wrote:

                           puts line
                           puts ie.text_field(:name,"userId").value
                           puts "Wrong Value of User ID"

Change those first two to
puts line.inspect
puts ie.text_field(:name,“userId”).value.inspect

to get a better idea of what’s different. My guess is that one contains
a newline and the other doesn’t; line.chomp! is your friend.

ITs show this how to remove \n this plz help

[email protected]\n”
[email protected]

********** My problem is solved ***********

Thank you…!!!