Lesson 7 Practice 2 Scraping Text problem

In Lesson 7 practice 2 there is a small app that you have been given to scrape text from press buttons etc.

In the example walkthrough they pick the CSG team which only has one member ‘Amy’. The click text OCR seems to be able to pick this up.

I was looking at the other selectable groups and had issue with the OCR not picking up all the names either in google or microsoft mode

e.g.

If I pick employee group FTE the supplied app produces this list of names

image

In citrix recording if I now ‘click text’ and select the app window for scraping in google OCR mode it returns this

You can see that it has picked up Claire and Palle but not Terry

If I change to Microsoft OCR mode and refresh I get

This gives the names Tea-y, Clawe and Palte none of which are really helpful.

Does anyone have any ideas about scraping that might help in this situation?

Hi @charliefik,

Thank you for using UiPath forum.

Can you please try changing the “Scale” property of Microsoft OCR.

Setting Scale = 2 seems to be working for me. With image automation, sometimes you need to play with different properties and use the one that works best for you.

Notably, Scale refers to the scaling factor of the selected UI element or image. The higher the number is, the more you enlarge the image. This can provide a better OCR read and it is recommended with small images. If you want to scale down, values between 0 and 1 are also accepted. By default, the value is 1.

Let us know if you have any more queries.

Many Thanks,
Hiren

1 Like

Thanks very much Hiren that worked for me too. In that I could see Terry in the scrape results.

However when I ‘Set Mouse Position’ the mouse appeared near the Cost Center label. If I then change the name to Claire it seems to be placing in the same position as for Terry. Not sure how this would work. See settings and result below.

Set Mouse position for Terry gives

image

Set Mouse position for Claire gives

image

Which seems exactly the same

Any ideas?

Hi @charliefik,

Here I don’t think you need to use Set Mouse Position. Just type “Terry Adams” in Search Text and click on Test Click. It will work. It will scrape the entire text and click on the text “Terry Adams”.

Many Thanks,
Hiren

1 Like

For me if I type in Terry Adams, the test click points to the Cost Center label as in my screen shots above

Can you please try re-scraping the region again using this.

image

Many thanks,
Hiren

1 Like

It goes to the correct position if I change the Scale back to 1 while in Microsoft OCR and type in Tea-y Adams (but this is obviously not what we are going for) As far as I can tell the scaling is causing an issue with the positioning

Re scraping didn’t seem to make any difference sorry

Just tried another scrape and now I’m getting T Adams instead of Terry Adams (I think that was because I had Terry Adams highlighted when I rescraped, this is not related to the mouse positioning issue though)

OK rescraped again using Indicate another UI element, Microsoft OCR, Scale 2 and then Test clicked and searching for Terry Adams and Test Clicking back to Cost center (I can see Terry Adams in the scrape) so this is still wrong for me.

Do you not have the same problem when you search for Terry with the Scale set to 2 on Microsoft OCR?

HI Hiren,

Is there anything further you can do regarding this issue?

It’s just that I don’t know how you can properly interact with the form if you can only scrape the data from the form accurately by increasing the scaling factor which then affects the positioning of the cursor.

Do you get the same issue when you use that form with the FTE group of employees? If so I would say that is a major problem with the system for anyone wanting to interact with forms in general as that is a fairly basic form.

1 Like

Hi @charliefik,

For my machine, it seems to be working fine.

It is definitely not that the scaling factor affects the positioning of the cursor. I think it is related to some system settings of yours.

Can you tell changing the default scale and layout to 100%?

Note that, you will need to Sign Out and Sign In again once you change the display settings.

Many thanks,
Hiren

Hi Hiren,

Thanks for coming back on this topic. Unfortunately my default scale and layout were already 100%.

I am using dual displays but I doubt that’s an issue as most developers would be using dual displays anyway I would assume.

The weird thing for me is that with the scale factor unchanged it goes to exactly the correct position (unfortunately the scraping doesn’t work well with the scale at 1 for Microsoft OCR in this case) but when the scale factor is changed to anything else this is when it moves the cursor and the bigger the scale the more the cursor moves from the correct position.

Hi @charliefik,

I tried again on my system and it seems to be working fine. This issue is specific to your machine it seems. However with OCR, there is a little trade-off. We need to play with different combinations and find the right one which suits our requirements.

Did you click refresh after you change the Scale or any other property?

refresh

If still your issue is not resolved and you want a solution, you can log a ticket with UiPath Support and we’ll be more than happy to help.

Many thanks,
Hiren

Thanks Hiren,

I had been pressing refresh after any time I changed the scaling factor.

I just reopened the test app and a new citrix recorder and (please don’t hurt me!) it worked perfectly.

Sorry about this but it was doing weird things before (absolutely genuinely) but lets call it a day for now. If it happens again and I can work out what difference there is I’ll let you know. (The positioning change in my last post related to what I was seeing before not today)

Sorry about that.

Many thanks for your time,

1 Like

Hi @charliefik,

No issues. I think both of us learned something today. And that’s beauty and fun of automation! :wink:

I am happy it’s resolved.

Many thanks,
Hiren

FYI the only difference that may have occurred between then and now is that I installed Microsoft Sharepoint Designer as there was no available ‘MS Office OCR’ activity to drag into ‘Read PDF with OCR’ and I read that you need to install Sharepoint Designer to get it. ( for Lesson 11 practice 2)

This may have nothing at all to do with my issue but I mention it as obviously the problem I was having was with Microsoft OCR (but in citrix text scraping not it’s own separate activity).

In case anyone in future has this issue maybe they can try that (as I say it’s probably completely unconnected though)

1 Like