Using OCR result in an if-else condition

Hi,

i am trying to use an OCR result in a variable and the using that same variable in a if-else condition.

variable “${ocr}” = ocr text capture from html field (ocr puts text into variable as the value)
Variable “${result}” = Variable value “Successful”

When i say if ${ocr} = ${result}

then - perform xyz

else - perform abc

it always only follows the else path.

can you please assist, am i doing this incorrectly?
How do i get ${ocr} to equal ${result}
and follow the “Then” Path

Asheeq, I cannot see your screenshot. Could you attach it once again?

above is the screenshot, let me know if you any need any additional information. thanks for your assistance

There is a known issue with OCR when it adds junk symbol to the result.
See this topic Set cell value in Excel includes hidden character

You can solve it by removing the first character out of the OCR result.