When you begin working with LEAPWORK, it is essential to understand how automation flows, resources, data, etc. are organized. Organizing your assets is relatively simple, and doing it right from the get-go will save you a lot of troubles later.
All automation flows-related assets in LEAPWORK (Flows, reusable Sub-flows, web and desktop elements, images, data files, etc.) are shown in an explorer-style tree view. It is available from the main menu in LEAPWORK Studio by clicking 'Flows'.
Below are descriptions of the different elements of the Flows menu.
The folders in the tree-view structure are the key to organizing your automation flows and related assets.
You create a folder by clicking 'New' and selecting 'Folder'. This will create a folder at the point of focus in the tree-view. You can also right-click anywhere in the tree-view and click 'New folder'.
The figure below shows an example of how to organize a project.
An example of project organization: Create a top-level folder with the name of the project, and then add multiple folders dividing the project into features, sprints, products, or similar. Each Sub-folder can then hold one or more automation flows, and the flows can have any number of Sub-flows (reusable parts of a flow), captured web elements, data files, etc.
All automation in LEAPWORK is built as flows. In test automation, a 'flow' is a test case, and in RPA, a flow is a business process.
Flows can be created in two ways, either by:
Once a flow is created, you can give it a name, and if it is not located in the right folder, simply drag and drop it into the right position.
All assets making up automation flows, e.g. Sub-flows and captured elements, can be arranged in a hierarchical manner. This way you will have an overview of which assets belong to which flow, and it makes it easy to move a flow, including all assets, to other folders.
Here is how the organization of a simple web automation flow could look like:
For example, the 'AccountValidation' flow includes a Sub-flow named 'Login', a captured button from the web page named 'LOG IN WITH EMAIL', an Excel-sheet named TF.xlsx used for data-driven purposes and a few more elements.
A Sub-flow is an automation flow that can be re-used as a component inside other automation flows. Using Sub-flows is considered best practice because it allows you to encapsulate functionality in global components making maintenance much easier.
A Sub-flow can be created in two ways, either by:
After naming a Sub-flow, the Sub-flow is added as an asset under the flow in the tree-view, and can be reused in any LEAPWORK automation flow. A Sub-flow's position in the tree-view provides some context for their usage.
In some cases, it makes sense to organize all existing Sub-flows in a structure separate from the regular automation flows. Creating a folder structure dedicated to Sub-flows can make it easier to locate and re-use them.
Part of designing automation flows is to capture elements in the applications under automation. In LEAPWORK, this means fetching some information about an element in the application, e.g. the ID of a field, the name of a button, the area containing a specific text, etc. These elements are called 'Locators' and are an essential part of automation flows: They contain information used during the execution of automation flows to find and manipulate the given element.
Almost any software can be automated with LEAPWORK, including web applications, mobile websites, desktop applications of any kind, applications running in Citrix, etc. Automating different kinds of technologies creates different kinds of Locators. Hierarchically, all Locators are positioned below the flow they belong to in the tree-view. Below is an explanation of the different Locators in LEAPWORK:
A Web Element contains all information about a web control in a web environment, e.g. the HTML structure of a website element with a screenshot of the control.
A Desktop Element contains all information about a desktop control in a desktop application, for example, the hierarchy of a desktop Control with the screenshot of the control.
For automating virtual applications, LEAPWORK uses OCR (optical character recognition), or 'image and text recognition', to identify elements, read text, click buttons, etc. When creating automation flows for virtual applications, an image of a given control or element is captured, and the captured image is then used by the OCR engine to perform the required operation onscreen during flow execution.
The Image Collection functionality allows the user to collect captured images in a collection, and then use the collection when searching for an image. This means, for example, that the user can capture the same button in different states (no focus, in focus, hovered, pressed) and in different resolutions, and then add all captured images to one collection.
Any data file used as part of a flow (Excel-sheet, CSV-file, etc.) is also shown in the tree-view.