Exercise - Simulate mouse and keyboard actions

Completed

Design a flow that navigates to the properties of the current computer, takes a screenshot of the properties window, and saves it on the desktop.

The flow will:

  • Retrieve the location of the current user’s desktop folder

  • Navigate to this PC by using the Start Menu

  • Open the properties of this PC

  • Take a screenshot of the window and save it on the desktop

  1. Use the Get special folder action. Under Special folder name, select Desktop.

    Screenshot of the Get special folder action properties dialog.

  2. Use the Move mouse action. Set the coordinates of the Start button, and set Move mouse from previous position to With animation (high speed).

    Screenshot of the Move mouse action properties dialog.

    Note

    To capture the current coordinates of the mouse relative to the screen, press Ctrl + Shift. This will populate the Position X and Position Y fields.

  3. Add the Send Mouse Click action. Leave the Mouse event to send option on its default setting, Left Click.

    Screenshot of the Send mouse click action properties dialog.

  4. Add the Send keys action. In Text to send enter This PC{Enter}{Apps}{R} and set Delay between keystrokes to 500.

    Screenshot of the Send keys action properties dialog.

    1. This PC will type the text “This PC” into the Start Menu search

    2. {Enter} will simulate pressing the enter key to open this PC

    3. {Apps} will open the context menu in the PC window

    4. {R} will select and open properties

    Screenshot of the take screenshot properties.

  5. Add the Take screenshot action. Set Capture to Foreground window, Save screenshot to to File, Image file to %SpecialFolderPath%\screen.jpg and Image format to JPG.

  6. Running the flow will result in the screen.jpg file being placed on the current user’s desktop.