Sample test case for creating Katalon compatible Test Objects in memory Tip

It depends on how you create the objects in memory. If you create them in-line of your code, then that is the only place they exist. Unless you share that “code” like a called Test Case, then they cannot be shared. Also, if you use the object multiple times throughout your Test Case, then there will be an issue with maintenance of your pathway should it change over time. Then, maybe use the OR or a called subroutine/method that returns the element’s pathway. The pathway is only in one location so maintenance is easier–but what is the difference between this and the OR.

If you create the pathway for the object in a Keyword class, then others that share the Keyword can create the object in memory just by using the pathway like a called subroutine/method.

yourItem = com.Tools.creatTestObject('id("yourTestElement")')

or

yourItem = com.Tools.creatTestObject(getTestElement())

public String getTestElement() {
  return 'id("yourTestElement")'
}