Forum Discussion

Zuzana's avatar
Zuzana
New Contributor
8 years ago

XPath in groovy script: How to use a variable in contains() function?

Hello,   I struggle with using a groovy variable inside a contains() function of XPath statement within a SoapUI property.   Having this xml:   <ResultSet> <Row> <Id>1</Id> <Description...
  • PaulMS's avatar
    8 years ago

     

    log.info context.expand('${JdbcRequest#ResponseAsXml#//Row[ Description/contains(., "' + groovyVariable + '") ]/Id}')

    The string is closed before the variable is added then the end of the string