Quantcast
Channel: LoadRunner Practitioners Forum topics
Viewing all articles
Browse latest Browse all 3978

How to limit do while loop

$
0
0

I have a do while which is checking for the state of the variable "WFState".

Can anybody help me how to break this loop if the variable for any reason did not reach that state.

The loop may become infinite.

This is a code I'm using:

// var Opx = "Opened";
temp2="Investigation in Progress";  //compare string 2


//set x to 0 x is the success flag
x=0;
do{
web_reg_save_param("WFState",
"LB/IC=; border-left: 0px;\">",
"RB/IC= ",
"Ord=5",
"Search=Body",
"RelFrameId=1",
"NotFound=warning",
LAST);
//Compare correlation value with charater string
temp = lr_eval_string(lr_eval_string("{WFState}"));

if (strcmp(temp,temp2)==0) {
x=9; //set flag to indicate success
}
}while (x == 0);    //do while flag is not set


Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>