Skip to content

Endswith Operation: endswith

The endswith operation under the String Operations function is used to check if a given string ends with a specific substring or character. This operation returns true if the string ends with the provided argument and false otherwise.

Example: Suppose you have a string “Thank you for using HuLoop” and want to verify if it ends with the word “HuLoop“.

Steps to Configure:

  1. Add a new step.
  2. Select SET from the Action dropdown.
  3. Enter a variable name in the Element Key field (e.g., EndsWithResult). This variable will store the result of the operation (true or false).
  4. Click on Form, select Functions, and choose String Operations.
  5. Provide the following parameters:
    • operation: Choose endswith.
    • data: Enter the string to check (e.g., “Thank you for using HuLoop“).
    • argument: Enter the substring to check at the end of the string (e.g., “HuLoop“).
  6. Click Save.
v7_string_op_endsWIth_list_view
List View
v7_string_op_endsWIth_grid_view
Grid View

Outcome on Execution

  • The operation checks if the string “Thank you for using HuLoop” ends with the substring “HuLoop“.
  • Since the condition is true, the result (true) is stored in the variable defined in the Element Key field (e.g., EndsWithResult).
  • This variable can be referenced in subsequent automation steps using the syntax ${VariableName} (e.g., ${EndsWithResult}).

Last updated: Oct 7, 2025
Back To Top