UploadFile Keywords - MissingMethodException

I use following script to create TestObject and call plugin with it.

static TestObject makeTO(String xpath) {
	TestObject to = new TestObject()
	to.addProperty("xpath", xpath)
	return to
}

TestObject originalFileObj = makeTO('originalFiles');
UploadFile.uploadFile(originalFileObj, filepath);

I get following error message:

org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: com.kms.katalon.core.testobject.TestObject.addProperty() is applicable for argument types: (java.lang.String, java.lang.String) values: [xpath, originalFiles]

You are missing a parameter to ‘addProperty’, see examples in https://docs.katalon.com/katalon-studio/docs/creation-of-test-object-in-object-repository-in-runtime.html

1 Like

@r.klein1 : I see and import com.kms.katalon.core.testobject.ConditionType is needed to use it.