Katalon Studio allows users to use external Java .jar libraries either through Katalon project settings or copying .jar files to a designated folder. Additionally, users can leverage this to extend the capabilities of Katalon Studio and handle specific situations when needed. Subsequently, in this article, Import external library to Katalon will show you how to add external libraries to Katalon Studio. Moreover, we will cover the below topics:-
- Using Katalon Project Settings
- Manually copy .jar files to the drivers folder
Using Katalon Project Settings
On Katalon Studio, from the toolbar, select Project > Settings > External Libraries. After that, click on Add to browse and select your .jar file(s) (and its dependencies, if any). Finally, click on Apply and OK to save the settings.
After saving the setting, Katalon will add the library file(s) into its Drivers folder on the local drive and loads the libraries. Consequently, now users can use the libraries in their test scripts.
Additionally, to remove imported external libraries, specify the library which you want to delete. Subsequently, click on Remove, and finally, click OK.
Manually copy .jar files to the Drivers folder.
You can also manually copy your .jar file (and its dependencies, if any) into the Drivers folder. Additionally, you have to restart Katalon (shutdown and open it again) to reload its class paths.
When Katalon recognizes your .jar library, you should be able to use it in your code. Moreover, you can refer to the topic How to create a Custom Keyword (https://docs.katalon.com/katalon-studio/docs/introduction-to-custom-keywords.html). Additionally, it will provide you information on how to utilize the email validation functionality from Apache open source library commons-validator-1.5.1.jar.