I am trying to luanch grids with data in my application and measure the time taken to luanch the grids. Although I have made the code to run infinite till the object is created to run, at certain instances where the wait time is too high like around 7 to 10 minutes TestComplete throws me out with an error object not found. Of course when TestComplete throws out as object not found, the object was not created or was in the process of creation.
1. But my question is why is TC throwing me out when I had written the code with inifinite loop.
So now I have doubt whether TC has a some internal Timeout sequence for searching an object.
2. At times the object is created after 10 minutes then too I've seen TC throwing me out with object not found error. But next time I run it will find the object.
Here is the part of function which measures the time luanch
StopWatch = HISUtils["StopWatch"];
// Launching the grid
//Waiting for the grid view to get populated
while (! Aliases.RAL_Client.Startup.tctlMain.zRAL_UI_WinFor ms_Stock_S02Orders_S02OrderGrid.S02OrderGrid.GridP anel.myGrid.DataGridView ["Exists"])
In your while loop, use "WaitAliasChild" to resolve the DataGridView. You cannot call the "Exists" property of an object that does not exist so you'll get the object not found error. WaitAliasChild will return a "stub" object with Exists as false if the object cannot be found, this will allow your look to just keep going.