KHV
KHV

Reputation: 145

Uipath RPA Automation Screen Scraping Errors

I have an image which is a scanned copy of a page, in .tiff format. As per my research, UiPath doesn’t support tiff format - so i converted it manually to jpg, using it as an input. As it is a image, I am using screen scrapping along with Google OCR - the quality is not as expected, but they are at an acceptable level. Now, the issues that I am facing are as mentioned below.

  1. While working with screen scraping, I have done the complete process of scrapping on one system. When I move it to another system, I am getting below error. Error Image
  2. Is there a better way to get the text from the image?

Upvotes: 0

Views: 628

Answers (1)

Wolfgang Radl
Wolfgang Radl

Reputation: 2349

I am getting below error

Make sure your selectors are resilient by using wildcards. The most likely cause for your error is that UiPath looks for a window with the exact title your-file-name.tif (you redacted that part). This will always fail when you open another image with a different name.

This selector looks for an IrfanView application with the precise title:

<wnd app='i_view32.exe' cls='IrfanView' title='UK1.tif - IrfanView (Zoom: 618 x 874)' />

By introducing wildcards, you can just look for any tif file opened in IrfanView:

<wnd app='i_view32.exe' cls='IrfanView' title='*.tif*' />

Is there a better way to get the text from the image?

Instead of opening the image in a viewer, you can directly load it into a variable of type System.Drawing.Image. Note that this supports most TIFF files, as well - so, there is no need for conversion. Then you could use the Google Cloud OCR activity to perform OCR, storing the words and OCR text in two dedicated variables. Check out the help for more details.

Google OCR in UiPath

Upvotes: 2

Related Questions