How to define a ClippingRegion in Click Activity

I am trying to define the ClippingRegion in Click Activity by calculating the values of Left, Top, Right and Bottom basing on the specific display and location in a web page.

How would I define this Region variable by 4 Int32 variables in the activity form below?

Thank you.

Hi @GhostBuster

By indicating the screen

Ashwin S

HI, @AshwinS2 ,
Could you please elaborate on “indicating the screen”?

hi @GhostBuster

click on indicate on screen based on that you will be clipping region coordinates

Ashwin S

Perhaps you did not read my question: what I want is to define the component of Region (i.e. left, top, right and bottom) using variables.

Do you mean like “under the login button”?

Sorry, what is “under the login botton”?

Perhaps I shall make my question clearer:

In the image below, I am able to define the region by values, e.g. (100, 100, 200, 110).

However, those values are calculated by a set of formulas and represented by variables, (e.g. x1, y1, x2 and y2). When I define the region using (x1, y1, x2, y2), it does not work and the expressions simply disappear without any error message.

So my question is: is there a way to define a Region by four Int32 variables?

Hi @GhostBuster,

How about this Activity?

Best regards,
Erina :blush:

Hi, @Erina,
Thank you for your reply.
I did use SetClippingRegion. But I still have to define the region in Click activity, right?

Can you try this;

Create a variable. Choose type UiPath.Core.Region

Put an Assign, put variable to the left, to the right type this;

New UiPath.Core.Region(New rectangle(x1,x2,y1,y2)) (You should check the order of variables x and y)

After that i think you should use set clipping region. Type your variable part to region part , create new ui element for element part, then in click activity you should type to element part of your element variable.

I did try to do exactly the same way you recommended.
As I said, it does not work as the expression simply disappeared.

I edited the message. Try again.

Hi, @ercanebiler,

Thank you and tried to follow your advice. It did not work however.
It seems that in “set clipping region”, the element part is used as an input to define a region, instead of an output after a region is defined.