Forum Discussion

Testgeek's avatar
Testgeek
New Contributor
5 years ago
Solved

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.
  • 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.

4 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    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.

     

    • Testgeek's avatar
      Testgeek
      New Contributor
      Thanks Alex for help.
      This is desktop application built using c#.net
      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.
      • tristaanogre's avatar
        tristaanogre
        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.