Forum Discussion
Question: When it's taking a long time, is it the first time you are running your code? It's possible that the object information needs to be created in memory for TestComplete hence the 10-15 second delay?
Also, what's the threshhold? You mention that if there's fewer rows, it runs faster. What's that lower threshhold? Is it something static? It's possible that the problem might not be in TC but in the AUT in returning the number of rows.
Just some things to think about... script performance issues are always tricky because there are a lot of factors involved.
Hi Robert,
For your question..
It is not just the first time where it is taking a long time, every time I run the code it is taking time.
And for the threshold on the number of rows, I'm not sure on this.
#Scenario 1
I tried executing the find child method with number of rows as 4.
The method executed quickly (2-3 seconds)
#Scenario 2
I increased the number of rows to 40 and executed the same method.
This time it took longer time (10-15 seconds)
Also, I tried the same test on a different application but with the same grid (XTPReport). It is taking a long time in this case also.
Thanks!
-Rajesh
- Colin_McCrae8 years agoCommunity Hero
I suspect you already answered your own question.
"But when the number of children objects are less, it executes quickly."
Seems fairly logical. The more children there are, the longer it takes. You would expect that.
Although, it sounds like it's taking quite a long time (in computing terms) to find each one. 10+ seconds for only 40 rows isn't terribly quick.
It may be that the refresh (argument 4 in your FindChild call .... set to TRUE in your code) may be taking up some of that time. Have you tried doing a SYS.REFRESH instead and setting that argument to FALSE? See if it improves any?
You already have the depth set to 0 (argument 3) so it shouldn't be digging about in children of the rows (your screenshot of the object tree suggests all the rows have further children).
Related Content
- 4 years agoSuperTester