JavaScript Command | How to use javascript | Automation Anywhere

 RPA | A2019 JavaScript Package| A2019 Automation Anywhere - Part-45

A2019 JavaScript Package - In this blog we will discuss another useful command or package provided by Automation Anywhere i.e. JavaScript package. So we will discuss the functionality for each of the actions in detail one by one using A2019 Automation Anywhere also known as Automation 360.

JavaScript package provides various actions that can be used to execute javascript. In Automation Anywhere there are two ways through which we can execute a javascript i.e. the first way is by writing the javascript code in notepad file and calling the javascript file from Automation Anywhere and the second way is by writing the javascript code itself in Automation Anywhere using the manual input option. Automation Anywhere provides various actions under the javascript package which are as follows:

  • Open - This action of javascript package is used to open a javascript. In the properties section pass in the session name which will be used during the entire bot development and in the javascript option there are two ways one is the import existing file where we need to import the javascript file from the required folder location from our system and the second way is to provide the manual input i.e. in this option we can directly write our javascript code.
  • Run JavaScript -  This command or action is used to run javascript. Under this action in the properties section we need to pass the session name which we used in the Open action and then pass in the function name i.e. pass the function which we have created and then give the parameters name if any we have used in the javascript function and finally store the output in a string variable data type.
  • Close - This action is used to close a javascript. In the properties section pass in the session name which we used in the open action of the javascript package.
After discussing in the actions that are provided by the javascript package it is now time to look at the code snippet that we have used in our bot building for the javascript package which is as follows:

JavaScript Package Bot

In the code snippet that we have build we have discussed the addition of two numbers. So the code would something like this as shown below.

function Addition(value1,value2){
  var result=Number(value1)+Number(value2);
  return result;
}   
 
So with that we have come to the end of our blog where we discussed about how to use javascript package and the various actions being provided by the javascript package using A2019 Automation Anywhere also known as Automation 360.

Lastly I would like to conclude by saying that please provide your valuable feedback as the feedback that you will provide really matters the most to me.

Comments