Alibaba Cloud RPA: Compiling an RPA Application in Visual Mode (Part 7)
This article is one of a series of lectures on Alibaba Cloud robotic process automation (RPA). It describes how to compile a first RPA application to obtain products from Taobao in visual development mode and how to enable robots to execute processes automatically.
1. Compile an RPA Application
(1) Start the Studio client, click Visual Mode, and create an attended robot, as shown in the following figure:
(2) Here we use searching for Huawei mobile phones on Taobao.com as an example. The procedure is as follows: Visit Taobao.com, search for Huawei mobile phones, obtain the product elements on the webpage by using the RPA toolkit, and save the obtained product information to the data view.
- Visit Taobao.com
- Search for Huawei mobile phones and click Capture Webpage Elements. The embedded Chrome browser appears.
Click Start Recording. The input box on the webpage is recorded. Then, click Echo. A flashing red frame is displayed around the recorded input box.
Enter “Huawei mobile phone” in the Enter Content field.
Click “Click a webpage element” to record the search button on the webpage.
- Use the RPA toolkit to obtain the product elements on the webpage.
After you enter “Huawei mobile phone” in the input box, multiple results related to Huawei mobile phones are displayed. Run a loop by clicking Search for Similar Elements to obtain the number of mobile phones.
Click Search for Similar Elements. All elements of Huawei mobile phones are displayed. So far, we have obtained the number of Huawei mobile phones displayed on the webpage. As shown in the following figure, 48 elements are found.
Next, run a loop to obtain the information from the webpage.
Obtain the element value on the following webpage:
Click Interface Design and set a name for the column, as shown in the following figure:
- Save the product information obtained to the data view.
Write the obtained product information to the data table row by row based on the number of loops. The code is as follows:
2. Commissioning Preview
Click Commissioning Preview. On the commissioning page that appears, click Start. The result is shown in the following figure:
In this way, you can obtain information about Huawei mobile phones searched on the first page of Taobao.com and write the information to the data table. Data on the second and subsequent pages can be retrieved cyclically.
You have now created your first RPA application in visual mode without writing any code. This method is applicable to users who do not have basic programming knowledge. With this method, they can create their own RPA applications that can be automatically executed by robots. The next lecture describes how to publish an application on an enterprise application market and execute the application using an attended robot.