Dynamic Clipping Region

Hi guys,

Does anybody know how can I pass a dynamic value to the clipping region property in a take screenshot activity?




Short answer is that you cannot directly from the property, however you can achieve the same using the following approach.

  • Start to define your scope, being an UiElement. (ex: Find element, element scope etc…)
  • Use “Set clipping region” activity, I recommend you to use the property “Direction” as rectangle
  • Set the property “Element” as base UiElement (the container)
  • Inside the “Set clipping region” activity, set now the property region with a new instance of a region object as bellow, You can replace the integer value building the rectangle by variables.
    New Uipath.Core.Region(New Rectangle(200,300,200,100))
    -Your initial UiElement variable is now translated, you can pass it as argument to the “Take screenshot” activity and save its output Image afterward.

Let me know if you have any issue.



My case the dynamic positions of element are
Left 69 Top 658 Right 99 bottom 682
Left 69 Top 684 Right 103 bottom 708
Left 66 Top 707 Right 101 bottom 737
Left 70 Top 759 Right 103 bottom 788

How to set the rectangle in select Clipping region

Hi ,
i just wonder if anyone has found any solution to this ?

1 Like

I think Florent_Salendres has answered.

If you have an issue, you should open your own topic and reference this one while exposing your specifics.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.