Quick Tip: Hotkey for adding import statements to your scripts/keywords

Hey all, just a quick PSA regarding organizing imports in your scripts/keywords, as people new to Katalon/Eclipse/programming in general might not be aware.

If you’re asked to add custom code to your scripts (outside of the normal WebUI methods), or if you are implementing a Custom Keyword, you will likely need to include some extra import statements at the top. Instead of hunting each one down and adding them individually, Katalon/Eclipse has a hotkey to add new imports (as well as alphabetize them) automatically: ctrl + shift + o

When the automatic import encounters multiple potential classes that share the same class name, a modal will appear that will allow you to choose the appropriate class:

image

That’s it! Hopefully this is helpful to some of you :slight_smile:

2 Likes