Having trouble with Click OCR Text

I’m a little confused why this isn’t working. (I’m using OCR because this is a Citrix app)

I’m simply trying to click the row that has 100000 in it in the middle of the screen:

I output what the Click OCR Text activity finds, and it does find that text…

image

But it doesn’t CLICK that text. It just clicks in the middle of the window.

1 Like

Middle of that line correct?

No, it clicks the middle of the WINDOW. It finds the text, it just doesn’t click the text.

It may be that I’m misunderstanding the purpose of Click OCR Text. As I’ve watched some videos etc it seems that it’s intended to find the UI Element that the text is in, and click that. But for me the UI Element is just the entire window, so that’s what it clicks.

I need to find the pixel coordinates of the text inside the window (Citrix, so basically just an image), and click at those coordinates.

1 Like

You can try and see if CV works for your case. It will largely depend on the OCR engine (Omnipage ocr is a good option among free ones. UiPath Screen Ocr if community)

1 Like

I’m not sure what your screenshot is supposed to be showing me. How would I use CV to click the text “100000”? Keep in mind, the text won’t always be 100000. That’s just an example, it’ll be a different value for each transaction.

your descriptor can be updated in the properties. The screenshot was supposed to just show the “detected text” from which you can click based on OCR

I tried the Click OCR Text activity as well. It seems to be clicking the text itself and not the element. In this case, the snipping tool window is the element and the Red dot is where the bot clicked.

Something might be off with the Citrix environment. Resolution offset sometimes causes that but not sure

Clicking the text is what I want. For me it just clicks the middle of the window. Can you post info on how you configured the Click OCR Text? I sort of thought Citrix is why these kind of activities exist. It would be a big road block if this won’t work in Citrix.

Do you know of a way to get the x/y coordinates of the text into variables or something, and then I could use those as offsets for a click against the window itself.

OK this was driving me nuts. I tried exactly what you did and it still didn’t work.

Then I thought…hmmm maybe because I’m developing on a remote machine through the VMWare Horizon client.

So I tried it on my local desktop and it worked just fine. Which means there’s a problem trying to use Click OCR Text in a remote window (not sure if Horizon is RDP, or what).

Were you able to figure it out?

Click OCR Text is just normal configuration, nothing special

This is how you would use the clipping region:

When you hover over an element when indicating the selector, this little UiPath window should display exactly what you’re hovering over. Sometimes that’s not the case but is offset, causing displaced hardware clicks. I’ve had that issue before, to fix the resolution have to signout and sign back in.

image

All I have figured out is that it doesn’t work when it’s running on a desktop I’m accessing via VMWare Horizon. Works fine on a local desktop.

And I can’t just use static coordinates, the value (and position of the value) won’t always be the same.

the workflow screenshot I posted above is not static, it’s getting the region of the ocr text dynamically and clicking on it based on those coordinates.

This isn’t a displacement issue. It’s clicking exactly in the middle of the window. If I change it to top left or anything else, it follows exactly that.

Found the problem. If you don’t have ExtractWords checked in the OCR activity, Click OCR Text doesn’t work. Seems like a bug to me.

2 Likes