Skip to end of metadata
Go to start of metadata

Hypothetically, you want to call a Custom Keyword within a Custom Keyword that is defined in another class. Check out the code below for a sample implementation.


package my.a
import com.kms.katalon.core.annotation.Keyword
class Greeting {
 def greet(String someone) {
 return my.b.AI.sayHelloTo(someone)


package my.b
class AI {
 static def sayHelloTo(String someone) {
 return "Hello, ${someone}."


import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
def str = CustomKeywords.'my.a.Greeting.greet'("Drunda")
WebUI.comment(">>> ${str}")

The TC1 ran fine:

Credit to kazurayam

  • No labels