Dynamic Clipping Region

Hi,

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.

Cheers

8 Likes