Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction 
2.
Adding External Libraries
2.1.
Using Gradle
2.2.
Using the Katalon Studio Project Settings
2.2.1.
Result
2.3.
Manually copying and pasting .jar files to the Driver Folder
2.3.1.
Result
3.
Exclude Built-in Libraries
3.1.
Note
3.2.
Procedure
4.
Frequently Asked Questions
4.1.
In which folder should the .jar files be placed while manually adding an external library?
4.2.
Why does the user need to restart the Katalon Studio when adding an external library manually?
4.3.
Name any one library that the user cannot exclude in Katalon Studio.
5.
Conclusion
Last Updated: Mar 27, 2024
Easy

Library Management in Katalon Studio

Introduction 

Hello, Readers!!

Have you guys heard about Katalon Studio?

No? Don't worry, we got you covered. Katalon Studio is a robust automation tool with a Selenium-based engine. It is designed in order to create and reuse automated test scripts for UI without needing to code. 

In this blog, we will discuss in detail about how to manage libraries in Katalon Studio in detail.

So let us begin!

Library Management in Katalon Studio

Adding External Libraries

Katalon Studio allows the user to use external Java libraries either through project settings or by adding them to a designated folder. These libraries help the user to extend the capabilities of Katalon Studio and handle certain situations when needed

There are three different ways in which a user can add external libraries to a Katalon Studio project, which are:

  • Using Gradle.
  • By going to the Libraries Management of the Project Settings of the project.
  • By copying and pasting the library's .jar file to the Driver folder of the project.

Using Gradle

Katalon Studio supports the automatic downloading of the required libraries from Maven repositories using Gradle.

Using the Katalon Studio Project Settings

The below-mentioned steps should be followed in order to add external libraries using the Katalon Studio project settings:

  • Navigate to ProjectSettingsLibrary Management. If the Katalon Studio's version is older than 7.8.0, then navigate to ProjectSettingsExternal Library.
  • In the Library management section, click on Add in order to choose the .jar file. In order to remove an added external library, simply select the library and click Remove > OK.
Library Management section

Source: Katalon Docs

  • Click on Apply and Close in order to save the settings.


Result

Once the above settings are saved, Katalon will then add the library files to the Drivers folder of the project and will load the libraries. Now the user can use these libraries in their test scripts.

Manually copying and pasting .jar files to the Driver Folder

Users can also manually copy and paste the .jar files directly into the Drivers folder of the project. In order to reload the class paths, the user needs to restart the Katalon Studio (that is, close and re-open the project again).

Result

Once the .jar library gets recognized by the test engine, the user should be able to use it.

Exclude Built-in Libraries

Users have the ability to remove the built-in libraries that are stored in the .classpath file of the project folder. They can also replace them with an external one for a more flexible library usage in the test project.

Note

The features mentioned above applies to all libraries in the classpath, except:

  • com.kms.katalon.*.jar
  • selenium-server-standalone-3.141.59.jar
  • poi-3.17.jar
  • poi-ooxml-3.17.jar
  • poi-ooxml-schemas-3.17.jar
  • java-client-7.0.0.jar
  • io.cucumber.*.jar


Procedure

  • Navigate to ProjectSettingsLibrary Management.
  • In the Exclude the following built-in libraries section, click on Add in order to add a built-in library's name that will be removed.
  • In the External Libraries section, click on Add in order to browse an external library to replace it with the excluded one.
External Libraries section

Source: Katalon Docs

Frequently Asked Questions

In which folder should the .jar files be placed while manually adding an external library?

The .jar files should be placed in the Drivers folder of the project when adding an external library manually.

Why does the user need to restart the Katalon Studio when adding an external library manually?

When adding an external library manually, the user needs to restart the Katalon Studio in order to reload its class paths.

Name any one library that the user cannot exclude in Katalon Studio.

The poi-3.17.jar is one of the libraries that the user in Katalon Studio cannot exclude.

Conclusion

In this article, we have extensively discussed about Library Management in Katalon Studio.

After reading about Library Management in Katalon Studio, are you not feeling excited to read/explore more articles on APIs? Don't worry; Coding Ninjas has you covered. 

If you wish to enhance your skills in Data Structures and AlgorithmsCompetitive ProgrammingJavaScript, etc., you should check out our Guided path column at Coding Ninjas Studio. We at Coding Ninjas Studio organize many contests in which you can participate. You can also prepare for the contests and test your coding skills by giving the mock test series available. In case you have just started the learning process, and your dream is to crack major tech giants like Amazon, Microsoft, etc., then you should check out the most frequently asked problems and the interview experiences of your seniors that will surely help you in landing a job in your dream company. 

Do upvote if you find the blogs helpful.

Happy Learning!

Thank you

Live masterclass