Forum Discussion

mgroen's avatar
mgroen
Frequent Contributor
15 years ago

How to update a loop variable (in keyword test / VBScript)



Hi,

using a while loop in a keyword test.

I defined a local variable of type integer (temporary);

The point is, the loop does not stop.

I use the following statement to update the loopcounter in the while loop:



KeywordTests.Shipment_Overview_Uitvoeren.Variables.loopteller = KeywordTests.Shipment_Overview_Uitvoeren.Variables.loopteller + 1



appearantly that does not work (loop does not stop).



what is the best way to tackle this?







1 Reply

  • Hi,



    What is the condition in your loop? Also, while loops don't have counters, and they don't stop on counters, so, do you use KeywordTests.Shipment_Overview_Uitvoeren.Variables.loopteller in the condition? If yes, how?