Text Comparison providing wrong output?


I am working on a trial project with UIPath and until now, I haven’t encountered many problems. This one right now seems odd. What i am trying to do is get a text from a PDF image (Get OCR Text activity with Google OCR) and also provide a variable with the text itself and compare them. When I output both of them they are similar but when I do an if comparison, it prints out false. I also tried it by converting the text to ToUpper and ToLower. I have also tried with different OCR engines but still the same result. I am attaching a screenshot.

first output is the text that is being scraped from the pdf image
second output is the variable that i am providing uipath with

I have tried multiple if conditions but nothing seems to work:
variable1.ToLower = variable2.ToLower

Let me know if you anyone sees a problem with this?


Try to trim the ocr output and see

That actually worked! Thank you so much, I would have never guessed about the spaces.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.