Loops command group

Loop (or loop) is a command group that helps you perform a task multiple times without duplicating similar commands.

Loop data

The Loop data command is used when you know the exact number of iterations, with settings as follows:

  • Loop through: Number

    • From number: Enter a numerical value.

    • To number: Enter a numerical value.

    • Note: Ensure that the To value is always greater than or equal to the From value to satisfy the loop condition.

Example: If the "From number" is 1 and the "To number" is 5, it means that the loop will repeate 5 times.

  • Loop through: Variable (can be used when the Variable is a list).

    • Variable: Choose the variable to use.

    • Max data to loop: Maximum number of iterations. If you don't input or set it to 0, the loop won't execute.

    • Start from index: Start executing from the specified position.

    • Element variable: Select the variable to assign values when looping.

While loop

You use the While loop command when you don't know the exact number of iterations. The loop executes only when certain conditions you specify are met. Key settings to note include:

  • Value: Input the value for comparison.

  • Equals: This operator compares two values and returns True if they are equal and False if not.

  • Equals (case insensitive): Similar to the Equals operator, but it does not differentiate between uppercase and lowercase letters, typically used for strings. For example, "Hello" will be considered equal to "hello".

  • Not equals: The opposite of the Equals operator, returns True if two values are not equal and False if they are.

  • Less than: Compares whether one value is less than another. Returns True if the condition is met, False otherwise.

  • Less than or equal: Compares whether one value is less than or equal to another. Returns True if the condition is met, False otherwise.

  • Greater than or equal: Compares whether one value is greater than or equal to another. Returns True if the condition is met, False otherwise.

  • Greater than: Compares whether one value is greater than another. Returns True if the condition is met, False otherwise.

  • Contains: Checks if a string or set contains a specific element. Returns True if it does, False otherwise.

  • Contains (case insensitive): Similar to the Contains operator, but it does not differentiate between uppercase and lowercase letters in strings.

  • Not contains: Checks if a string or set does not contain a specific element. Returns True if it does not, False otherwise.

  • Not contains (case insensitive): Similar to the Not contains operator, but it does not differentiate between uppercase and lowercase letters in strings.

  • Starts with: Checks if a string starts with a specific sequence of characters. Returns True if it does, False otherwise.

  • Ends with: Checks if a string ends with a specific sequence of characters. Returns True if it does, False otherwise.

  • Match with RegEx: Checks if a string matches a regular expression pattern. Returns True if it matches, False otherwise.

  • Variable exists: Checks if a variable has a valid input value.

  • Variable not exists: Checks if a variable does not have a valid input value.

  • Element exists: Checks if an element has a valid input value.

  • Element not exists: Checks if an element does not have a valid input value.

    • You need to select the element retrieval type (CSS or Xpath) and paste the selector.

    • Waiting time: Time to wait for selector verification.

  • Add: Used when multiple conditions need to be satisfied simultaneously.

  • Or: Used when one of the conditions needs to be satisfied.

Stop loop

The Stop loop command is used to indicate the end of a loop. When using Loop data/While loop commands, you must use the Stop loop command to terminate the loop.

Last updated