Screenshot of Just Window (not whole screen)

Hello,

I have a bot that takes screenshots of a webpage after completing each task. The screenshots are of the entire screen (i.e. Taskbar, other webpage tabs). Is there a way to configure the screenshot activity so that only the active window content is included?

The screenshot below shows what is included, currently. I want to keep what is inside the blue rectangle.

The screenshots are taken several times and I am trying to keep this versatile so, indicating the element on every screen is not ideal. Additionally, I will be including this in a library so I will lose the ability to specify the target.

Will indicating the clippingRegion achieve what I am looking to accomplish. Or, will it behave differently on screens with different resolution.

This is how the TakeScreenshot activity is setup right now.

Thanks,
symilawr

Use Get Active Window and save the output to a variable, e.g. activeWindow.

For the Take Screenshot, change the target to Element: activeWindow.

Hi @symilawr

kindly refer this link

hope this might help

  1. in take screenshot xaml add new argument “in_selector”

  2. set selector of take screenshot activity to in_selector

  3. now if you want to take screenshot of a window, first capture the selector of that window e.g. using click activity, then expand properties and copy selector string (then disable/delete the click activity)

  4. paste selector when calling take screenshot