Change in Keyword is not reflecting automatically in testcases

Hi Team ,
Need your inputs on this scenario.
I have a function with one parameter . Now , I have modified it with no parameters.
Is there anyway that this will automatically update in all the testcases where we call it?

I am using this function to capture screenshots, calling in lot of places .
image

It is only updating with changes when I go to each and every place where it is called and manually select the modified function again. This will take few hours to update manually.
Any inputs appreciated.
Thank you!

Example:Before
image
After changing:
image

1 Like

Hi there,

Thank you very much for your topic. Please note that it may take a little while before a member of our community or from Katalon team responds to you.

Thanks!

In every Katalon Project you can find a folder named .cache where KS/KRE caches the compiled classes of Keywords.

The .cache folder is automatically created by KS/KRE so it is safe to delete.

Please try deleting the .cache folder.


I guess in the KRE project you have a corrupted binary of your keyword so that you should clean the cache. I believe KS/KRE has a subtle bug about the .cache; but it is easy to fix. Just remove it.

In case @kazurayam’s method does not work, I use a third party application that has global Search and Replace (or “Replace in Files”). There are several applications that have been mentioned on this forum. Two that I use are Komodo Edit and VS Code, both free.

image

Obviously, save your project to another folder (or repository) beforehand in case you make a mistake while you learn.

Edit: Also, you can leave both methods with the same name in your Keywords as they have different method signatures. It is called Overloading. Then you can change which method you want as you “update” each TC when its time.

2 Likes

Hello @kazurayam , Thanks for your inputs . I have deleted this .cache folder . Unfortunately it didn’t work for me.

Then, try deleting the bin and Libs folders as well. These folders are auto-generated by Katalon so safe to delete.

In these folders contained the binaries of your test case scripts etc.
Removing these folders will make sure that you build your project cleanly.

1 Like

@kharitha17

Have you solved your isseue? If yes, please close this topic.

Hi @kazurayam , will update here . Thank you!