GetText from dynamic xpath

Have a look at the following post

This post includes a description how to interpolate a placeholder ${ptn} in a XPath of a TestObject with value supplied to findTestObject(path, params) call.