cindyso
3 years agoNew Contributor
How to get substring from a text
//get feature
def feature = context.expand( '${Check Feature_JDBC#ResponseAsXml#//Results[1]/ResultSet[1]/Row/NAME[text()="UVA "]//following-sibling::ENABLED}' )
The space after keyword 'UVA' might disappear sometimes. How could I update the script to avoid the space? Thanks.
Something like:
context.expand( '${Check Feature_JDBC#ResponseAsXml#//Results[1]/ResultSet[1]/Row/NAME[text().trim()="UVA"]//following-sibling::ENABLED}' )