Skip to content

How to design a sample process that includes web applications with Robusta RPA tool step by step?

PROCESS SCENARIO

In this tutorial:

Do a price search from a flight ticket price comparison website that we have determined.

First, ensure that the Booking.com website is opened, and a flight search will be made according to the criteria we have determined.

Find the best match from the incoming search results, assign the price information to a variable, and save the process as successful and end our process.

In cases where flight data or the best price match is not found, save the process result as failed and end our process.

STEP BY STEP PROCESS

  1. Start the process with the Open activity under the Application section to open the Booking.com website. Drag and drop the activities you want to use into the design area.

  2. In the Name field, write the website name after the default Open to explain the step. Typing a value in the Name field for all activities helps understand the process flow.

  3. Enter a reference value without spaces in the Application name field. This reference will be available for selection in later activities to determine the application for the operation.

  4. Since you will use Chrome as an application, choose the Chrome option from the Type field.

Applications > Mouse actions

Name Open: Booking.com
*Application name bookingDemo
*Type CHROME
*Url https://booking.kayak.com
Wait until load True
Timeout (sec) 120
Maximize True
  1. Continue the process with the Mouse action activity. The visible area for the flight departure airport on this site requires a click to make the data entry field visible.

Applications > Mouse actions

Name Mouse actions : From Airport
*Application name ${bookingDemo}
Button LEFT
*Field //div[contains(@id,”originairport-display-inner”)]
  1. Enter the HTML location information of the field you want to click on the page. Use Robusta's Inspector feature.

  2. Find the location information of the flight departure airport area. Click the Field button, then click New to add a new page. Choose Chrome as the application type, enter the URL https://booking.kayak.com/, and click Open.

  3. After the page opens, find the desired location information by selecting the application from the list and clicking the Inspect button. Move the cursor over the relevant field; it will be marked in yellow.

  4. Wait 3 seconds on this area. The yellow marking will disappear, and the location information will automatically display in the RelXPath area.

  5. Click the OK button to save the location information. Since you have learned how to get XPath selector data using Robusta's Inspector feature, subsequent steps will directly use the correct XPath without re-inspecting.

  6. Obtain pre-defined variables from the Data Object screen. Use these variables in the ${} structure within the process. To access the Data Object window, click the white space of the canvas, then click the Data Objects area in the parameters pane.

  7. Use Data Objects to easily place variables into the process.

  8. Use the Set methods activity to interact with the web form field and type the ${fromAirport} data object. This ensures the desired flight departure airport (Newyork NY, NYC) is entered into the relevant field.

Applications > Set methods

Name Set methods : From airport
*Application Name ${bookingDemo}
*Field //input[@name=”origin”]
Clear True
*Type text
*Text ${fromAirport}
Wait until visible True
  1. In the next step, use the Mouse action activity, similar to the previous one.

Applications > Mouse actions

Name Mouse actions: Select From Airport
*Application name ${bookingDemo}
Button LEFT
*Field //div[@class=”item-info”]
Wait until load True
Wait until visible True
  1. Continue the process with another Mouse action activity, as a click on this area is required to make the data entry field visible.

Applications > Mouse actions

Name Mouse actions : From Airport
*Application name ${bookingDemo}
Button LEFT
*Field /html/body/div[1]/div[1]/main/div[1]/div[1]/div/div[1]/div/div[2]/section[2] /div/div/div[2]/form[1]/div[1]/div/div[1]/div/div[3]/div/div/div
  1. Again, use Data Objects to easily place the variable (${toAirport}) into the web form field.

  2. Use the Set methods activity to interact with the web form field and type the ${toAirport} data object. This ensures the desired flight departure airport (Chicago, IL (CHI)) is entered into the relevant field.

Applications > Set methods

Name Set methods : To airport
*Application Name ${bookingDemo}
*Field //input[@name=”destination”]
Clear True
*Type text
*Text ${toAirport}
Wait until visible True
  1. Use another Mouse action activity, similar to the previous one.

Applications > Mouse actions

Name Mouse actions: Select To Airport
*Application name ${bookingDemo}
Button LEFT
*Field (//div[@class=”item-info”])[2]
Wait until load True
Wait until visible True
  1. Continue the process with the Mouse action activity, as a click on this area is required to enter data.

Applications > Mouse actions

Name Mouse actions: Departure Date
*Application name ${bookingDemo}
Button LEFT
*Field //div[contains(@id,”dateRangeInputdisplay-start-inner”)]
  1. Now, use the Data Object variable (${departureDate}) to place it in the process.

  2. Use the Set methods activity to interact with the web form field and type the ${departureDate} data object. This ensures the desired flight departure date is entered into the relevant field.

Applications > Set methods

Name Set methods: Departure Date
*Application Name ${bookingDemo}
*Field //div[contains(@id,”departinput”)]
Clear True
*Type text
*Text ${departureDate}
Wait until visible True
  1. Continue the process with the Mouse action activity, as a click on this area is required to enter data.

Applications > Mouse actions

Name Mouse actions: Return Date
*Application name ${bookingDemo}
Button LEFT
*Field //div[contains(@id,”dateRangeInputdisplay-end-inner”)]
  1. Now, use the Data Object variable (${returnDate}) to place it in the process.

  2. Use the Set methods activity to interact with the web form field and type the ${returnDate} data object. This ensures the desired flight return date is entered into the relevant field.

Applications > Set methods

Name Set methods: Return Date
*Application Name ${bookingDemo}
*Field //div[contains(@id,”returninput”)]
Clear True
*Type text
*Text ${returnDate}
Wait until visible True
  1. After entering all criteria, ensure the search button is clicked. On the subsequent page, monitor the loading process using the Loading field at the top left. This field updates as the page loads. Use the Wait action(s) activity to wait until the specified area on the application is visible or active, checking if the search failed.

Applications > Mouse actions

Name Mouse actions: Click Search
*Application name ${bookingDemo}
Button LEFT
*Field (//button[contains(@id,”submit”)])[1]
  1. In the Wait actions activity, choose the visible option in the Wait for field to wait until the specified location field is visible. Return to the initial Open activity and enter the desired wait time in seconds in the Timeout field. For example, a value of 120 allows 120 seconds for Booking.com results to load. If the page does not load within the specified time, this step will end with an error.

Applications > Wait actions

Name Wait actions: Check if loaded
*Application name ${bookingDemo}
*Field