Unable to Extract All Flight Details from MakeMyTrip Search Results

Hi community,

Scenario

We are developing an automation to extract flight details from MakeMyTrip search results using UiPath. The search results page displays multiple flights, but only a few flights are visible on the screen at a time.

Problem We Are Facing

The automation is extracting details only for the first 4 flights that are currently visible on the screen. It is not capturing the remaining flight records that appear after scrolling down.

What We Tried

  1. Used Modern activities with table extraction.
  2. Tried Classic activities as an alternative like screen scraping, data scraping.
  3. Attempted to extract data after scrolling.
  4. Used Screen Scraping methods in the Classic experience.

Errors Encountered

When using the Classic approach, we are receiving a “Root element missing” error, and the workflow is not able to continue execution.

Questions

  1. How can we extract all flight details from the MakeMyTrip results page, including records that are not initially visible on the screen?
  2. Is there a recommended approach for handling dynamic/lazy-loaded flight listings in UiPath?
  3. What could be causing the “Root element missing” error in the Classic activities?
  4. Has anyone successfully automated flight data extraction from MakeMyTrip, and if so, which activities or techniques were used?
  5. table extraction, or a different selector strategy be a better approach?

Any guidance or suggestions would be greatly appreciated.

Thank you.

MakeMyTrip uses lazy loading, so Table Extraction may only capture the flights currently visible on the screen. Try scrolling the results section, waiting for new flights to load, and then extracting the additional records.

The “Root element missing” error is often caused by dynamic page changes during extraction. If possible, inspect the network/API calls and extract the flight data directly from the response instead of scraping the UI.

Hi @kkapula4
i used the delay activity before the table extraction to avoid early extracting the table, after fully extraction only i am using this table extraction activity then also its giving only the top 4 records

give me way to capture all the records?

Can you check whether all flight records are visible in the browser DOM (using Inspect Element) after scrolling to the bottom?

If only 4 records exist in the DOM at a time, you’ll need to scroll and extract in a loop, or use Find Children/Data Extraction with dynamic selectors rather than a single Table Extraction.

@vikasbaburao.sajjan

For dynamic loads depending on how it loads we would need to go with approach

  1. Once you scroll if elements are increasing then first keep on scrolling and then extract once you reaxh bottom if pge..generally we use load or any end element to check if load completed
  2. Second is when you scroll if only few elements load and old elements vanish then we need to use a loop with scroll and extract to avoid duplicate you can extract and compare the data with already extracted if same then extract again else move to next loop item..nad to know end if same data or last row is same in extraction then end loop

To know what kind it is have inspect panel open and scroll and check the elements ..if all are visible its 1 else its 2

Cheers

It appears that MakeMyTrip may have an API endpoint that you could hit, that would allow you to skip the UI trouble with table extraction and just collect the data

Otherwise use the Inspect Emement like @kkapula4 said to determine if a loop is necessary to grab the data from the UI

Hello,

To tackle this problem, I tried to use new feature from the UIA automation package called as UiPath Screenplay.

Using UiPath screenplay you will be able to extract all the flights till the bottom from MMT.

I just tried and tested, and it worked fine for me. First navigate to your desired page and then inside the container use Screenplay activity.

Use this prompt - “Scroll down the page to reveal more flights. At each scroll step, note the details of the very last flight card visible at the bottom of the list. If you perform a scroll and that bottom flight card (Airline, Departure Time, and Price) remains completely identical to the previous step, it means no new flights have loaded and you have reached the end. Stop scrolling immediately. Then, extract the details for all loaded flights: [Airline Name, Departure Time, Arrival Time, Total Duration, and Price] into a structured data table.”

You can read and learn more about UiPath Screenplay here - Agents - Overview

Let us know if this helps and solves your problem.

hi @tejaskumar.darji ,
thanks for the Screenplay it worked for me but it is a prompt based activity so it is use ai units. but i dont want to use the ai units so please give me any different way without using the ai units

Hi Team,

I did the video on this and you can see the video link below.

Link:- https://youtu.be/rQCRjAfN6YE

Still more doubts comment me in youtube will have a fun.

Happy learning

Regards,
Techystack