Develop an automated process

更新时间:
复制 MD 格式

This guide walks you through installing and logging on to the editor, building a simple RPA project, and publishing it as an RPA application.

Overview

Complete the following steps in order:

  1. Install and log on to the editor.

  2. Create a new cloud-based project.

  3. Develop using the visual development mode.

  4. Perform local debugging.

  5. Publish the project as an application.

Prerequisites

  1. Obtain an account with permission to use the Alibaba Cloud RPA editor.

    1. If this is your first time using this product on Alibaba Cloud, you can apply for a free trial, which is valid for one month.

    2. Contact your RPA administrator to assign you an Alibaba Cloud RPA account with editor authorization. For more information, see Administrator assigns accounts.

  2. Prepare a Windows environment to run the RPA editor. The editor currently runs only on Windows. You can use your office computer or a virtual machine, such as an ECS instance or a Wuying Workspace. For more information, see Client resource requirements.

Install and log on to the editor

  1. Log on to the console, and in the upper-right corner, click the Download button to obtain the latest version of the Alibaba Cloud RPA installation package.

    image

  2. Double-click the downloaded installer, select the editor, and follow the installation prompts. For detailed steps, see Install the client.

  3. Open the editor client to access the logon page.

  4. If you are using Alibaba Cloud RPA on the public cloud, log on according to your account type. For more information, see Log on to the client.

  5. If you are using an on-premises deployment of RPA, click Switch Server, add your private cloud server address, and then log in.

Create a new cloud-based project

On the editor welcome page, use the new project area in the upper-left corner to create a new cloud-based project and select a visual project template.

image

  • A project can be stored as a local project or a cloud-based project. To learn about the differences and their use cases, see Cloud-based projects and local projects.

  • A project can be developed using the code-based development mode or the visual development mode. To learn which mode to use, see Choose a development mode.

Develop using the visual development mode

This section guides you through developing a simple automated process using the visual development mode. For more information, see visual development mode. If you prefer to build your project with code, see code-based development mode.

Note

For more examples of visual development, see Visual development examples.

Procedure

截屏2022-07-24 下午10

Step 1: Open the Baidu homepage

  1. Add the Open New Webpage component after the start node. There are three ways to do this (you can use similar methods to search for other components later):

    1. ① In the component list on the left of the canvas, find the component in the Web Page group and drag it onto the canvas.

    2. ② In the Search Box within the Component List, search for the component by name and drag it onto the canvas.

    3. ③ On the canvas, click the Plus sign (+) after the Start Node, search for the component by name, and click to select it.

      image

  2. This step launches a browser and opens the Baidu homepage:

    1. Click the Open New Webpage component. The properties panel for this component is displayed on the right side of the canvas. Configure the properties as shown in the following figure:

      image.png

Step 2: Search for "Alibaba Cloud"

  1. This step enters text into the Baidu search box:

    1. After the Open New Webpage component, add the Fill in Input Box (Webpage) component.

    2. For Opened browser object, select the output of the previous Open new web page component, which is v_web_obj_1 in this example.

    3. In Target Element, click 5 and select Capture Element to capture the input box on the webpage that you want the robot to operate on. For more information, see Capture Element. After the element is captured and saved, select the input box element from the drop-down list.

      Warning

      image

    4. Configure the properties in the properties panel as shown in the following figure:

  2. This step clicks the Baidu Search button:

    1. After the Fill in Input Box (Web) component, add the Click Element (Web) component.

    2. In Target element, click the 5 icon and select Capture element to capture the 'Baidu Search' button on the webpage that you want the robot to click. For more information, see the Capture element documentation. After you capture and save the element, select the button element in the drop-down list.

    3. Configure the properties in the properties panel as shown in the following figure:

Step 3: Save the results to a local file

  1. This step launches a local Excel file to store the Baidu search results.

    1. After the Click Element (Web) component, add the Launch Excel component.

    2. For Launch Method, select New Excel, click image, set the file path to the desktop, and name the file 'Baidu_Entry_Record.xlsx'.

    3. Configure the properties in the properties panel as shown in the following figure:

      image

  2. This step gets the specific sheet object where the search results will be written.

    1. After the Start Excel component, add the Get Current Active Sheet component.

    2. Configure the properties in the properties panel as shown in the following figure:

  3. This step iterates through the titles of similar elements, which is a group of elements with similar characteristics.

    1. After the Get Current Active Sheet component, add the Loop Through Similar Elements (Web Page) component.

    2. In the target element, click 5 and select capture element to capture similar elements. For more information, see the Capture similar elements document.

    3. Configure the properties in the properties panel as shown in the following figure:

      image

  4. This step gets the text from each of the similar elements, which corresponds to the search result titles.

    1. Inside the Loop Similar Elements (Web Page) component, add the Get Text (Web Page) component.

    2. In the Target Element field, select Current Loop Item, which is an output of the outer Loop Similar Elements (Web) component, to locate the specific element from which to retrieve the text.

    3. Configure the properties in the properties panel as shown in the following figure:

  5. This step writes the text extracted from the element to the previously activated Excel sheet.

    1. In the For Each Similar Element (Web Page) component, after the Get Text (Web Page) component, add the Write a Row to the End of Excel component.

    2. To set the format for the content of each row written to an Excel file, in the Content to Write field, click 5 and choose to enter the content by editing an expression.

      1. In the editor, enter an array: [v_web_text_1,"RPA robot"], where:

        • v_web_text_1 is the output of the Get Text (Web Page) component, a variable that represents the text content of each retrieved title.

        • "RPA robot" is a fixed value (constant), written in the second column of each row, to indicate that the value was obtained by an RPA robot.

        • You can adjust this format as needed. If you use a variable, the process writes its current value each time. If you use a constant, the process writes the fixed value each time.

    3. Configure the properties in the properties panel as shown in the following figure:

  6. You have now finished building a simple visual RPA project.

Local debugging

Before you use your automated process in production, debug the project in the editor to ensure it runs as expected when published. Follow these steps:

  1. Click the 调试2 button (① in the figure below) in the editor's toolbar to debug the entire process on the canvas from start to finish.

  2. To debug only a part of the process, select a component (② in the figure below) and click the debug button that appears above it. This starts the debugging process from that component.

  3. To stop debugging at any time, click the red square button at position ① in the figure.

  4. After a debugging run, an icon appears in the upper-right corner of each component, indicating its execution status.

    1. An good indicates that the component executed successfully.

    2. An error indicates that the component failed to execute. Click the Log Panel (③ in the figure below) to view the logs and correct the error.

image

Publish the project as an application

After you build and debug your project, you can publish the RPA project as an RPA application. This makes it available for other robots to request and run. Follow these steps:

  1. Click the 发布2 button (① in the figure below) in the editor's toolbar.

  2. Fill in the information in the Publish dialog box, and for Publish Address, select Cloud.

  3. Fill in the application description and usage instructions.

  4. Enter the application version information.

    Note
    • An RPA application version consists of a three-part version number. The developer manually enters the first two parts, and the RPA server automatically increments the final part by 1 upon publishing.

    • When an RPA robot runs an application, it automatically fetches and executes the latest version of the application available on the server.

  5. After you have filled in all the information, click OK (as shown in Figure ②) to submit the publishing request.

  6. After an RPA administrator approves the request in the console, the application becomes visible in the Enterprise App Store.

  7. An RPA user can then request and run the application from the robot client or using API calls.

You now know how to quickly develop an automated process.