Table of contents
1.
Introduction
2.
Katalon Studio
3.
Branching Statements
4.
Branching Statements in Katalon Studio 
5.
For manual mode
5.1.
Break Statement
5.2.
Continue Statement
5.3.
Return Statement
6.
For script view​
6.1.
Break
6.2.
Continue
6.3.
Return
7.
Exception handling block
7.1.
For Manual Mode
7.2.
Try
7.3.
Throw
7.4.
 Catch
7.5.
Finally
8.
Frequently Asked Questions
8.1.
Which is better: Katalon or Selenium?
8.2.
What is a soft assert?
8.3.
Does Katalon support BDD?
8.4.
Does Katalon support Java?
8.5.
What is Katalium?
9.
Conclusion
Last Updated: Mar 27, 2024
Medium

Branching Statements and Exception Handling statements in Katalon Studio

Author Muskan Sharma
0 upvote
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

Hey Readers!!

We all have heard about the branching statement and the exception handling used in our programming languages. 

But have you ever wondered how this branching statements exception handling works in Katalon Studio?

So, let's begin with this article to learn more about it.

Branching Statements and Exception Handling statements in Katalon Studio

Katalon Studio

Katalon, Inc created the automation testing software tool Katalon Platform. The application testing software is built on the open-source Selenium and Appium automation frameworks with a specialized IDE interface.

Branching Statements

The program's execution can be redirected to another section using branching statements. The three most common branching statements in other control structures are break, continue, and return.

Branching Statements in Katalon Studio 

Let's look into the different types of Branching Statements in Katalon Studio.

For manual mode

Branching Statement Manual mode

Break Statement

Break Statement

Continue Statement

Continue Statement

Return Statement

Return Statement

For script view

Using Java or Groovy, you can programmatically define and manage Break, Continue, and Return in the Script view of test cases.

Examples:

Break

for (int i = 0; i < max; i++) { if (searchMe.charAt(i) != 'c') { break; } numCs++; }

Continue

for (int i = 0; i < max; i++) {  if (searchMe.charAt(i) != 'c') { continue; }  numCs++; }

Return

for (int i = 0; i < max; i++) {  if (searchMe.charAt(i) != 'c') { return true; } numCs++; }

Exception handling block

Now let's look at different exception-handling statements:

For Manual Mode

Exception handling block Manual Mode

Try

Try Statement

Throw

Throw Statement

 Catch

Catch Statement

Finally

Finally Statement

Frequently Asked Questions

Which is better: Katalon or Selenium?

In general, Selenium moves more quickly than Katalon studio. The reason is that because Katalon is built on Java and uses Groovy as its scripting language, it must load more test objects and libraries.

What is a soft assert?

Soft assertions are the kind of assertions that do not instantly throw an exception when they fail.

Does Katalon support BDD?

Along with the original built-in keywords, Katalon Studio supports Cucumber keywords.

Does Katalon support Java?

To operate a Katalon Studio instance and create test applications, Katalon Studio uses the standard embedded Java Runtime Environment (JRE) version 8.

What is Katalium?

A framework called Katalium offers a design for TestNG and Selenium-based test automation projects.

Conclusion

In this article, we have extensively discussed Looping Statements in Katalon Studio. Decision-making statements in Katalon studio. In the end, we saw the for loop and while. 

For more content, Refer to our guided paths on Coding Ninjas Studio to upskill yourself. If you want to explore more, feel free to see our coursesinterview experiences, problems to solvetest serieslibraries, and resources

Thank You

Do upvote our blogs if you find them helpful!

Live masterclass