Asset development
Application Assets consist of application methods, properties, and events that represent possible scenarios to communicate with an application and send or receive all the required data. Assets can also include a Globals space with variables or components that are specific to the application and dedicated application forms. All these elements form a shared component that you use in a robotic project to ensure the effortless use of the application.
Interface tab of the application
You create and maintain the elements of Application Assets on the Interface tab of the Project Explorer.
In the following figure, click the + icons to learn more about the Interface tab of the application designer:
Happy-path scenarios
The first step in developing Application Assets is determining the functionality of the application and possible use cases. For example, for the YourCarNowData webpage in a car rental company, the Business Subject Matter Expert (SME) identifies the following scenarios:
- Log in to the webpage.
- Search for a customer.
- Get customer details.
- Search for a vehicle.
- Get vehicle details.
The SME uses Intelligent Recording to create happy-path scenarios for the above automations, which results in producing application methods. Application methods create an interface to navigate within the application and set or get required data.
In the following figure, click the + icons to view details about the naming conventions and properties of the application methods:
Use Public Application Methods to create higher-level use cases for the users of Application Assets. For example, the GetCustomerDetails public method uses the ClientSearch private method to accomplish the use case. Automations that you use only in an asset, with no communication with the main project, must be private. A best practice is to move as much functionality as possible to private methods to prevent changes to the interface of Application Assets.
The following figure shows a Public Application Method created using Intelligent Recording that retrieves customer data from the application:
Robust scenarios
After deciding on the application interface and establishing private and public methods of the Application Assets, experienced developers should focus on error handling and providing a structure for each use case. Consider all possible execution paths; each Application Method must validate input and output parameters, check the application state and timing requirements, and provide proper messaging in case of any problems. All paths should lead to a single Exit Point.
Experienced developers can create customized properties and events when addressing application controls and embedded logic. For example, the isLoggedOn and isHomePageDisplayed boolean properties provide information about the application state and aid in controlling the method flow. After collecting data, automation navigates to the Home page and fires an event to indicate that an application is ready to perform another search or any other scenario.
In the following figure, click the + icons to view details about the elements of Application Assets that you use to create a robust scenario:
Interface of Application Asset
Application Assets create the interface to interact with the application. All public methods of an asset are exposed to the user, so pay careful attention to parameters sent to the application and data obtained using the Assets. When there are changes in the application, avoid updating created and deployed methods and their parameters between asset versions; in this case, add new methods to assure backward compatibility.
Use consistent naming across all Application Assets; this applies to method names, parameter names, and error codes.
Check your knowledge with the following interaction:
This Topic is available in the following Module:
Want to help us improve this content?