Break the While loop

Hello,

I am confused about breaking the while loop. everytime when the bot loops through the data. The number of data to be looped keeps changing and match for the data in 2 applications. so i have used If Condition in the while loop. Now i am confused where to put the break activity.
Kindly help me resolve my issue

@sneha_arbole ,

Could you please elaborate your requirements, steps you have performed or screenshot of activities you have used and the problems you are facing

Hi @sneha_arbole ,

What is the condition you are putting in loop?
Exit criteria of loop is always condition

Hello poorna_nayak07,

For example: i have 10 data to iterate. I have to match the data from another application. Every time the data that we have to iterate may change from 10 to 5 data. so first i am counting the total items and incrementing the counter. and then matching the data using if condition

@sneha_arbole

  1. Dynamically assign value (10 or 5 in this case) to the int variable Counter
  2. Initialize Index variable to 0
  3. Create while loop with Exit condition Index<Counter
  4. Use if condition to check if Index/Element at Index is matching with Extracted application data. If matches break the loop.
  5. Increment Index Value by 1

thank you it worked

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.