I have a login screen and wanted to take a screenshot. We can automate this process.
Let’s do this by following the steps below:
1.On the Component ToolBox panel, extract the following components to the Designer Surface.
a.Click icon Action .
b.From the Action category drop-down menu, drag the ActionSet component.
c.Click Icon Utilities.
d.From Utilities Category drop-down menu, click Image Utilities and drag Save onto the Designer Surface.
2.Go to Designer Surface, double-click ActionSet Component.
3.An Action Setting Dialog box should appear.
4.Open the image or screenshot you wanted to automate.
5.Go to ActionSet Setting dialog box, Click Capture Button.
6.Press “Ctrl+Shift’ key and drag the portion of image to be extracted.
7.The screenshot is appeared on ActionSet Settings as shown in the fig.
8.Right-click Image and click AddActionGroup and select GetImage to adjust the Anchor as per the image size.
9.Close the dialog box.
10.Connect the Control In/Out ports between the components right from Start to End component.
11.Connect the Data In/Out ports of GetImage of ActionSet, Image of Image utilities and MessageBox components.
12.Press F5 key to run the activity.
The Result is displayed as :