Data drive loop doesn't end at the end of the last row
Hi,
I am trying to create data-driven loop.
I have an Excel spreadsheet where I store 'order numbers' and using TestComplete I am attempting to 'Complete' them. I have created the loop fine and it runs too but once it reaches the last 'Order number', it doesn't end the steps, goes back to the Order number 1 and attempts to rerun it.
Could someone help me please? I have tried to recreate the steps over and over again and having no luck. Seems like I must be missing a setting somewhere.
Here is an screenshot of my test script: http://screencast.com/t/Qnxa9vgxD
Thanks in advance.
Zman.
To set a breakpoint, click as shown below.
When you run the script, TC will pause the test when it reaches the breakpoint. Then press F11 to advance the script one step at a time. The step being executed will be higlighted by TC. This may help you determine why the script is not performing as you want.
Another possible solution would be to use an If..Then statement. In your Excel file, put a number, such as 9999, in the "Order Number" column in the row after the last row you wish to include in your test. Then, in the test, have an If..Then statement checking the value of "Order Number." If "Order Number" = 9999, use a Go To label to exit the DDT loop. Below is an example.
The above is not ideal, but it may get the test to work while to you continue to debug the script.