Forum Discussion
Cizo89
11 years agoFrequent Contributor
Hi,
if you're looking for loop in specific time period, try and amend this script to reflect your requirements:
Regards,
Marek
if you're looking for loop in specific time period, try and amend this script to reflect your requirements:
Integer maxTime = 180
Integer elapsedTime = 0
Integer delay = 5
boolean isStatusChanged = false
//Loop until the status is still the same or the max. time isn't exceeded
//Check the status every 5 seconds
while (elapsedTime < maxTime){
if (status != "11"){
isStatusChanged = true
testRunner.gotoStepByName("Next Step")
break
}
Thread.sleep(delay * 1000)
elapsedTime += delay
}
//If max. time was exceeded and the status is still the same, go to DataSource TestStep in order to generate next row
if (!isStatusChanged){
testRunner.gotoStepByName("DataSource")
}
Regards,
Marek
Related Content
- 8 years ago
- 7 years ago
Recent Discussions
- 9 days ago