How to check if application loads data

Hello All,
I am new to UIPath. I am working on UI Automation. I want to check if my application has loaded data. Even to check if there are atleast 3 rows populated in the data grid.
I was using something like

ctrl role=‘table’
ctrl role=‘row’ idx=‘123’

But the above selector selects one particular row. If that row is not in the data load, it fails. I am aiming to just check if there is something in the second row for example.
Could you please advise?

1 Like

Hi @koppikaranjali,

While application launch any loading icon coming?
Use element exists with wait for ready properly as COMPLETE

Regards,
Arivu

Hello,
thanks for answering. There is no common image or text that appears in the rows that load in the application. Hence, I am not able to select any element.
When I select an element, it searches for that text, probably in the second time I run the checks, that particular row is not there, so it fails.

1 Like

Also, when the application is loading data, one loading icon appears, but sometimes even when it finishes, the application does not return any data- it should show fail.
So, I need to configure it to see if some data appeared in the grid, it marks as complete else failed

1 Like

Hi @koppikaranjali,
What kind of application? try to use retry activity to check data exists in the application.

Regards,
Arivu

Hey @koppikaranjali

You need to pick any of the below which is reliable,

  1. Wait for loading icon to disappear to proceed to next automation step

  2. Pick a very reliable element on which you can completely depend on to check the page load may be table headers or table title or table row count or page count whichever is available for you.

Hope this helps.

Thanks
#nK

Hi

Hope the below steps would help you resolve this

  1. In variable panel create a variable named row_count which is of type int32 defined in variable panel with default value as 0

  2. Use a while loop activity with condition like
    row_count <3

  3. Inside the loop use a EXTRACT DATATABLE activity and try data scrapping that table and get the output as dt

  4. Inside the same loop now use a If condition like this

dt.Rows.Count > 3

If true it goes to then block where use a assign activity like this

row_count = dt.Rows.Count

This will make the workflow to come out of loop and also implies that table has loaded with more than three rows

If the condition fails the bot will keep trying till it reaches the stage where table loaded with more than three rows

Cheers @koppikaranjali

Thanks, I will try this

1 Like

Hello,
Thanks for your reply. But unfortunately there is no common element that appears once the load is finished. The headers are static and they even appear before the application starts loading data, as there is sometimes 0 rows returned as well.
But I need to check if there is atleast one row returned.

1 Like

@arivu96 Its a chrome based app.

1 Like

Hey @koppikaranjali

Okay fine.

So please confirm if the rows are available we can choose first row as one element for confirmation of one scenario.

But if there are no rows present what will be the element for confirmation is there any messages displayed ?

Thanks
#nK

@koppikaranjali ,

I would suggest first to wait for the Loading to be Completed, Some UI Element that let’s you understand that the Loading is Completed.

Maybe, Wait Element Vanish Activity on the Loading data Icon.

Once it finishes the Loading, You could Extract the Table, and get the Table rows Count and Check if the Rows are Greater than the Required Numbere.

Were you able to get through data scrapping @koppikaranjali