Hello. I have a variable with a number, and I have a condition, if at the time of capturing or get text, if that number is greater than 30, I need it to repeat an action, when I finish those actions, check again if the number of get text is greater to 30, repeat those actions again, if it is less than 30, continue to the next state or perform other different actions. I’m not sure how the logic could be, if do while is enough, if with while or if
Give a try
Variable doRepeat | Boolean - Default Value: True
Do while Activity
- get Text / other Steps
- IfActivity | Condition= x > 30
- Then: (nothing to do, log)
- Else: (newer Versions Break, older Versions: Assign Activity: doRepeat=False)
You can use Get Text to capture the text from element
Then you place a condition, as the GetText results is a Text, so if you are getting always the number, then you can place Cint(VariableGetText) > 30
Then → you can place which activity to repeat
Else → you can place your further activities
Hope this may help you
NumberVariable = GetNumber() // Your method to get the initial number
Do While (NumberVariable > 30)
Actions to be repeated
Assign NumberVariable = GetUpdatedNumber() // Your method to get the updated number
Actions to perform when the number is no longer greater than 30
Thanks & Cheers!!!
- Initialize a variable to store the number.
- Use a “While” loop, and set the condition to check if the number is greater than 30.
- Inside the “While” loop, perform the actions you want to repeat.
- After completing the actions, retrieve the number using “Get Text” or any other method.
- Update the variable with the new number.
- The “While” loop will continue as long as the number is greater than 30.
- Once the number is less than or equal to 30, the “While” loop will exit, and you can continue with other actions.