Skip to main content

Create Mobile Test Object in Memory at Runtime in Katalon Studio

You can create a new Mobile Test Object in Object Repository during runtime using this custom keyword:

* Construct a Katalon-compatible TestObject in memory.
* @param css (String) The CSS selector used to find the target element.
* @return (TestObject) The constructed TestObject.
static TestObject makeTO(String css) {
TestObject to = new TestObject()
to.addProperty("css", ConditionType.EQUALS, css)
return to

Credit to Russ Thomas