I have a pretty large web page that is mostly nested steps and associated text. The problem is that is need to read the step numbers and text to validate the accuracy. Some of my pages run to over 300 steps and it takes TestComplete over 30 minutes to run the findElements() command to read in the steps and my program times the user out before it gets a chance to finish.
I have read some technical articles but can’t really find anything to help me out in this department. I looked into doing a snapshot of the page and then parsing through that, but parsing the snapshot file would probably take longer than what I am doing now.
Any help or suggestions in this department would be greatly appreciated.
I can’t do screen shots because it is a classified environment but the page essentially looks like this:
Text
1.(a) Text
1.(b) Text
Text
And this continues for 250+ steps. The HTML looks something like:
1.
Text
So I can’t read everything at one time. So I read all the step labels at one time and then go back and get each step text and compare it against our verification data.
Our software has a hard timeout and TestComplete can’t complete reading the step labels before the software times out.
You could use the FindAll method to retrieve all elements that match your criteria. Or, if your hierarchy structure is deep, then it might be best to export innerHTML to a file, and then perform the necessary checks.
I agree with rraghvani anything you can do to ‘front load’ your objects before you start it should reduce time spent looping through the DOM and touching the UI which is really slow. Check out..
Originally posted by TikiHardBop1 on June 03, 2026
Yeah, the innerHTML was the way to go! It sped things up by a factor of 10 or more! I have a couple of other places where this is appropriate as well, so thanks for the tip!