Set clipping region is wrongly shifting to the right when looping

Scenario: Reading Scanned Documents, Images, etc.

Steps to reproduce: Find OCR text, set clipping region 95 pixels to the right, read new region, repeat with new target text.

Current Behavior: Everytime it repeats, it wrongly shifts the clipping region more and more to the right.

Expected Behavior: It should always look for a region exactly 95 pixels to the right.

Studio/Robot/Orchestrator Version: 2019.5.0

Last stable behavior: Unknown
Last stable version: Unknown
OS Version: Microsoft Windows 10 Home 10.0.17134 Build 17134
Others if Relevant: (workflow, logs, .net version, service pack, etc): ClippingRegion_Test.xaml (12.1 KB)

The attached file is just and example. Ideally I would use this to read multiple fields in a scanned document.

This is how it should work. You are telling the robot to Translate the clipping region by the specified amount each iteration, so it does.

If you want it to not shift more and more every time you need to reset the clipping region in between uses by using Direction: RECTANGLE and Size: (0,0,0,0).

If you use the recorder you’ll see that it automatically generates these Reset Clipping Region activities.

1 Like

Oops. I was so close to doing that too. Only that instead of Rectangle, I used Translate: (0,0,0,0).
Thanks, though! You solved my problem. Will change the tags since it isn’t a bug.

1 Like

@DanielMitchell Sorry, to bother again; but I tried it and it didn’t work.
I even tried using the recorder activities but if you run it on debug with element highlighting, it still shifts.
Please tell me what I’m doing wrong.
ClippingRegion_Test - 2.xaml (12.1 KB)
ClippingRegion_Test - Recorder.xaml (12.3 KB)

The only thing I can think of would be maybe try it without passing “myElement” in as the Element - just leave it blank. But if it’s still shifting repeatedly using the recorder activities then that would seem to be a legitimate bug as you’d first described.

1 Like

It would seem that way.

@Samuel2001 Hello! I’m new to using UIPath but I am experiencing exactly the issue you described in this thread (the clipping region shifting to the right - Despite having a reset clipping region using a Rectangle (0,0,0,0)). Did you ever get a solution to the issue?

No sorry, I moved on from that as it appeared to be a bug.

to me it happens when the monitor has more than 100% resolution. Tested on 125% and there was shifting, on 100% wasn’t. I didn’t test resolution less then 100%