Ask a Question

How to select a row in data grid after loading without hard coded delay

New Contributor

How to select a row in data grid after loading without hard coded delay

Dear community,

I have a query. I have a data grid in which i want to select a row but the issue is that before populating a data there executes a loading sk i need to wait for that loading to complete to select a row. My question is there a way to wait this loading to complete i do not want to use hard coded delays.
Community Hero



The way exists for (almost?) all cases.

But exact implementation depends on the tested application type (web, desktop, ...), grid (OS native, or provided as control by some third party, or been not a read grid but its visual emulation in case of web, or ...), how grid is populated and so on.

As a posible approach: wait for the grid to appear, get its record number, wait a bit, get record number again and repeat the wait until the number of records stop changing.


  /Alex [Community Hero]
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.

Thanks Alex for help.
This is desktop application built using
I have used exist property but the issue is object exists returns true as grid object is visible on screen but the data populated in grid takes micro second to fill up the grid and in this time the next step in script executes without selecting any row in grid. Before population of data loading appears. Is these any property i can use to check loading is stopped or not? Then i select row in grid.
Esteemed Contributor

As mentioned, a LOT of this depends upon the type of grid.  Without being able to examine the properties, it's hard to say. It MIGHT not be the actual grid you have to check.  For example, is there some sort of icon or text or something on screen that says "loading" however briefly?  Maybe you can check for that.

Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

Yes, like @tristaanogre said, check for the loading spinny icon on the screen

It is unfortunate that there is no event like "OnAjaxCallCompleted" or "OnJavascriptInjectionCompleted" that you can subscribe to to be notified when the injection to the grid is complete.

The way I have been doing it is find out the name of the "loading icon" for Ajax in the .NET app and wait on it to not exist anymore to keep going




Showing results for 
Search instead for 
Did you mean: