Design a Bot Using Desktop Automation Activities

This tutorial shows you how to design a simple Desktop Automation bot and execute it on your computer. The bot will open the Calculator application and perform simple calculations.

Background

You will use only the activities available in Desktop Automation to create the bot.

Prerequisites

  • Access to ASG Studio Manager.
  • Start the Automation Spy application using ASG-Studio Manager.
  • Check if the Calculator application is available on your computer. In this tutorial, we have used the Calculator app for Windows 10.

Design the Bot

In this section, you design the RPA Model using activities available for Desktop Automation.

  1. Launch ASG-Studio.
  2. Create an RPA Model. See Create and Design RPA Model.
    Alternatively, you can open an existing RPA Model. If you are using an existing RPA Model click Clear in the Element Toolbar to remove any activities that have been previously added to the visual designer.
  3. In the visual designer, drag Start Event from the element tool and drop it on the visual designer. Keep the default action name.
  4. In the Activities Panel, expand Desktop Automation, then drag the following activities and drop them onto the visual designer.

    Keep the default display name of the activities.

    To connect the action shapes, select the first action shape, click and hold the Sequence Flow or Association arrow icon, drag the arrow to the other shape, and then click the second action shape.

    Use Automation Spy application to retrieve the automation ID for each keystroke action in the calculator.

    Sub-Folder

    Action Name

    Other Properties

    Connect From

    Connect To

    Generic Actions

    Open Application

    Application Name/Path: calc

    Start

    Open Application

    Generic Actions

    Window Element Action

    • Choose Action: (Select) Click Element
    • Action (Left Click), Key (AutomationID), Value (num1Button)
    • Action (Left Click), Key (AutomationID), Value (num0Button)
    • Action (Left Click), Key (Name), Value (Plus)
    • Action (Left Click), Key (AutomationID), Value (num1Button)

    Open Application

    Window Element Action

    Keyboard Actions

    Send Keystrokes

    • Key (Number Pad + [Add]), Action (Key Press (Down + Up)
    • Key (9 [D9]), Action (Key Press (Down + Up)
    • Key (Number Pad - [Subtract]), Action (Key Press (Down + Up)
    • Key (4 [D4]), Action (Key Press (Down + Up)
    • Key (Enter [Return]), Action (Key Press (Down + Up)

    Open Application

    Send Keystrokes

  5. Drag End Event from the Element Toolbar and drop it on the visual designer. Keep the default action name. Connect Send Keystrokes to End Event.
  6. In the Element Toolbar of the visual designer, click Run to execute the RPA Model.
    • When the bot is running, notice the following calculation being performed in the Calculator application: 10+1+9-4=16
    • A message is also displayed in the visual designer after successful completion of the RPA Model execution.