Unable to retrieve xpath value from object repository object, why?

The following code retrieves the internal of a TestObject (you do not need to add any external jar).
Please change the id of TestObject to retrieve to your target.

import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject

import com.kms.katalon.core.testobject.SelectorMethod
import com.kms.katalon.core.testobject.TestObject
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

import groovy.json.JsonOutput

TestObject tObj = findTestObject('Object Repository/Page_CURA Healthcare Service/a_Make Appointment_BASIC')

String json = JsonOutput.toJson(tObj)
println json

println JsonOutput.prettyPrint(json)

WebUI.comment(tObj.getSelectorMethod().toString())
WebUI.comment(tObj.getSelectorCollection().toString())
WebUI.comment(tObj.getSelectorCollection().get(SelectorMethod.BASIC))

from TestObjectExtension/Script1627951034417.groovy at master · kazurayam/TestObjectExtension · GitHub