Skip to main content

Desktop Calculator Demo

Desktop Calculator Demo

Introduction

This sample shows the simple actions performed against Windows Calculator with the help of desktop driver.

Prerequisites

In order to successfully set up and run Desktop Calculator Demo Sample Process:

  1. Ensure that you have a running node with the "DESKTOP" and "AP_RUN" capabilities.
  2.  Ensure that Windows 10 with Calculator ver.10.2009.4.0 is installed on the node.
  3. Upload the Desktop Calculator Demo package to the Control Server. The package can be found in the following directory: https://<CS URL>/nexus/repository/rpaplatform/eu/ibagroup/samples/ap/easy-rpa-calculator-ap/<version>/easy-rpa-calculator-ap-<version>-bin.zip The souce code can be found here: https://code.easyrpa.eu/easyrpa/easy-rpa-samples/-/tree/dev/easy-rpa-calculator-ap
  4. Ensure the following details are provided for the Desktop Calculator Demo automation process in the Automation Process Details tab:

Module class: eu.ibagroup.easyrpa.demo.screen.DesktopCalculatorAp

Group Id: eu.ibagroup.samples.ap

Artifact Id: easy-rpa-calculator-ap

Version Id: <EasyRPA version>

Desktop Calculator Demo package structure:

Folder

Description

Desktop Calculator Demo

Desktop Calculator Demo automation process.

easy-rpa-calculator-ap-<Канцлер RPA версия>.jar

Root archive and dependencies. Contains code of Desktop Calculator Demo automation process.

Configuration Parameters for Desktop Calculator Demo:

KeyDefault valueIs requiredDescription
calculator.pathC:\Windows\system32\calc.exenoPath to standard Windows calculator application.


AP task is implemented in PerformCalc class which constitutes AP Module implemented in eu.ibagroup.easyrpa.demo.screen.ScreenCalcAp.

In standalone mode the AP can be started from main method of eu.ibagroup.easyrpa.demo.screen.LocalRunner  class.

Included Steps

The bot initializes desktop driver and starts the application by running a command from calculator.path setting.

Next the bot opens upper left menu and switches to scientific mode.

This action doesn't affect anything if it was scientific from the start.

Next goes the calculation demo. The bot successively clicks on buttons to calculate the logarithm.

The bot extracts the calculation result from text display and logs it.

Finally the bot closes desktop driver both with the started application.