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
-
Start the process with the
Openactivity under theApplicationsection to open the Booking.com website. Drag and drop the activities you want to use into the design area. -
In the
Namefield, write the website name after the defaultOpento explain the step. Typing a value in theNamefield for all activities helps understand the process flow. -
Enter a reference value without spaces in the
Application namefield. This reference will be available for selection in later activities to determine the application for the operation. -
Since you will use Chrome as an application, choose the
Chromeoption from theTypefield.
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 |
- Continue the process with the
Mouse actionactivity. 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”)] |
-
Enter the HTML location information of the field you want to click on the page. Use Robusta's
Inspectorfeature. -
Find the location information of the flight departure airport area. Click the
Fieldbutton, then clickNewto add a new page. ChooseChromeas the application type, enter the URLhttps://booking.kayak.com/, and clickOpen. -
After the page opens, find the desired location information by selecting the application from the list and clicking the
Inspectbutton. Move the cursor over the relevant field; it will be marked in yellow. -
Wait 3 seconds on this area. The yellow marking will disappear, and the location information will automatically display in the
RelXPatharea. -
Click the
OKbutton to save the location information. Since you have learned how to get XPath selector data using Robusta'sInspectorfeature, subsequent steps will directly use the correct XPath without re-inspecting. -
Obtain pre-defined variables from the
Data Objectscreen. Use these variables in the${}structure within the process. To access theData Objectwindow, click the white space of the canvas, then click theData Objectsarea in the parameters pane. -
Use
Data Objectsto easily place variables into the process. -
Use the
Set methodsactivity 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 |
- In the next step, use the
Mouse actionactivity, 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 |
- Continue the process with another
Mouse actionactivity, 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 |
-
Again, use
Data Objectsto easily place the variable (${toAirport}) into the web form field. -
Use the
Set methodsactivity 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 |
- Use another
Mouse actionactivity, 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 |
- Continue the process with the
Mouse actionactivity, 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”)] |
-
Now, use the
Data Objectvariable (${departureDate}) to place it in the process. -
Use the
Set methodsactivity 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 |
- Continue the process with the
Mouse actionactivity, 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”)] |
-
Now, use the
Data Objectvariable (${returnDate}) to place it in the process. -
Use the
Set methodsactivity 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 |
- After entering all criteria, ensure the search button is clicked. On the subsequent page, monitor the loading process using the
Loadingfield at the top left. This field updates as the page loads. Use theWait 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] |
- In the
Wait actionsactivity, choose thevisibleoption in theWait forfield to wait until the specified location field is visible. Return to the initialOpenactivity and enter the desired wait time in seconds in theTimeoutfield. For example, a value of120allows 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 |