Put variables into xpath

Hello everyone
I tried to do things that described here
https://docs.katalon.com/display/KD/[WebUI]+Modify+Object+Property

My code below:

TestObject testID = ('Providers/Provider - Add Org - Choose Organisation Page/Test Object')
testID = WebUI.modifyObjectProperty(findTestObject('Providers/Provider - Add Org - Choose Organisation Page/Test Object'), 'xpath', 'equals', '//div[@class=\'rt-td\' and contains(., \'' + getID + '\')]', false)
WebUI.verifyElementPresent(testID, 0)

As a result:
WebElementNotFoundException:
Becasue it tried to find by xpath of ‘Providers/Provider - Add Org - Choose Organisation Page/Test Object’
So. Is there more ways to put variable in xpath. Please help

Best regards, Nikita

use only:

testID = findTestObject('Providers/Provider - Add Org - Choose Organisation Page/Test Object')
WebUI.modifyObjectProperty(testID, 'xpath', 'equals', '//div[@td\' and contains(., \'' + getID + '\')]', false)
WebUI.verifyElementPresent(testID, 0)

Andrej Podhajský said:

use only:

testID = findTestObject('Providers/Provider - Add Org - Choose Organisation Page/Test Object')

WebUI.modifyObjectProperty(testID, ‘xpath’, ‘equals’, ‘//div[@td’ and contains(., ‘’ + getID + ‘’)]’, false)
WebUI.verifyElementPresent(testID, 0)


  

Now im getting this error

FAILED because (of) groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.modifyObjectProperty() is applicable for argument types: (java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.Boolean) values: [Providers/Provider - Add Org - Choose Organisation Page/Test Object, …]

Possible solutions: modifyObjectProperty(com.kms.katalon.core.testobject.TestObject, java.lang.String, java.lang.String, java.lang.String, boolean), modifyObjectProperty(com.kms.katalon.core.testobject.TestObject, java.lang.String, java.lang.String, java.lang.String, boolean, com.kms.katalon.core.model.FailureHandling)

TestObject flexibleTestObject = new TestObject()flexibleTestObject.addProperty('xpath', ConditionType.EQUALS, ('//div[@class=\'rt-td\' and contains(., \'' + getID) + '\')]')WebUI.verifyElementPresent(flexibleTestObject, 0)

This thing helped me. I found soulution there: