Jump to content
WAPT Forum
Sign in to follow this  
Guest adoddi@123

Loop operator

Recommended Posts

Guest adoddi@123

I have a scenario where i have to use the loop operator inorder to execute some requests multiple times. I used the loop operator to do this but the problem is that the loop operaor only allows static values for loop count and my loop count is dynamic. sometimes i want the loop to be executed 5 times and sometimes 6 times depeding on the file size. (I am creating the file dynamically using javascript).

 

I tried using If else operator inside loop so that the requests are executed only if the condition is met. but the tool does not come out of loop though the condition is not met except that the requests are not executed. I am not sure how to get out of the loop when condition is not met. I also tried using only while loop, but the loop-iteration option is not available in function properties if used while operator with out the loop. (I need this paramter because i am reading the values form a CSV file and i need the tool to read each line for each loop and this can not be done by just using the while loop). Can some body please advice me on how to acheve this? Thanks.

Share this post


Link to post
Share on other sites

I have a scenario where i have to use the loop operator inorder to execute some requests multiple times. I used the loop operator to do this but the problem is that the loop operaor only allows static values for loop count and my loop count is dynamic. sometimes i want the loop to be executed 5 times and sometimes 6 times depeding on the file size. (I am creating the file dynamically using javascript).

 

I tried using If else operator inside loop so that the requests are executed only if the condition is met. but the tool does not come out of loop though the condition is not met except that the requests are not executed. I am not sure how to get out of the loop when condition is not met. I also tried using only while loop, but the loop-iteration option is not available in function properties if used while operator with out the loop. (I need this paramter because i am reading the values form a CSV file and i need the tool to read each line for each loop and this can not be done by just using the while loop). Can some body please advice me on how to acheve this? Thanks.

 

Ok, we will add an iteration counter to the While operator.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×