How to add If else command in recorder


I’m not able to add if else command. What is the correct way to add that in the script.


Hello Deepika,
welcome in the Katalon community.
You can use the if command very easily, here an example:

Best regards



I want to test
**if i not equal to 1 **
i don’t find how to test
can you help me ?


if ${i} != 1


ok thanks :slight_smile:


hi i need find string to verify (If statement)


“No more candidates awaiting Authorization” this is shown in body text then continue the expression otherwise wait

Help me


You want to test this string ?
You can store this in a variable eg . lv_Text
If lv_Text==“No more candidates awaiting Authorization”


In Katalon recorder it doesn’t recognize if statement even though its in the list. I’m trying verify if text is on the webpage but not having any success. I’m using an xpath for the target as we cannot create unique IDs in Salesforce. Any ideas?


why some commands are executed even the condition is not true?..

in my example close is inside if and even with condition is false is being executed?


pamcsmash, do you run entire test case or double clicking commands?? You need to run full testcase or at least use “Play From Here”. It’s the last option in context menu when you right click on some command. Double clicking the command can work only for simple command like click or something.

brian123abcd, Katalon just work that way. It’s mark it green because there was no error in this command and it goes throught it properly not neceserliy execute it. For what I know the only command that really execute inside if even when the condition is false is pause command.