Forum Discussion

paarmann-ara's avatar
paarmann-ara
Contributor
6 years ago

wait for Listview loaded

I have a massive problem with testcomplete :-) .


My Listview has more than thousand tuple (row). So, I must waiting for listview to ListView complete loaded, after that start to click on upper Combobox. Now, the problem is that how can I find the listview is loaded completely?

 

Look to picture 0.jpg! a symbol for wait.


But how can I achieve this property to know the Listview is completely loaded and a wait symbol is not more in screen.

I have use wItemCount, but the problem for wItemCount is, she coming before wait-symbol disappear :-(.

  • Wamboo's avatar
    Wamboo
    6 years ago

    I think you can use ImageRepository Class.

     

    Create the image from screen with loading spinner (If the spinner is moving, the photo may not be recognized, if it is moving, do only part of the loading message)

     

    After that check in script for this image. Take a look at this one:

     

    if(ImageRepository.obj.obj.Exists(Sys.Desktop));
        
    function waitUntilObjectExist(obj, counter) {
      var counter = counter || 60;
      for (var i = 1; i <= counter; i++) {
        if (obj.Exists == true) {
          aqUtils.Delay(1000);
        } else {
          break;
        }
      }
    }
  • You check for the existence of the wait symbol every 2 or 3 seconds and when it's not there any more, then you're done.

    • paarmann-ara's avatar
      paarmann-ara
      Contributor

      Many thanks for your answer.
      I have already a function for checking if object Exists. So, the ListView Exists but not loaded or Listview Exists but loaded not finished

       

       

      • paarmann-ara's avatar
        paarmann-ara
        Contributor

        Moreover the Wait-Symbol is not separated object. That is in ListView. I cannot catch a Wait-Symbol.