user310291
user310291

Reputation: 38228

How to get the value of property expansion in groovy

Let's say I have this formula in a soap request

${test#Response#//ns1:authentification/bloc1/bloc2/idSession}

If next step I want to save this value in test case property using groovy, how can I get the runtime value ?

Or is it possible to do it without even using groovy ?

Upvotes: 0

Views: 583

Answers (1)

albciff
albciff

Reputation: 18517

To get this value in the groovy script and then save it in a TestCase property you can use the follow code:

def idSession = context.expand('${test#Response#//ns1:authentification/bloc1/bloc2/idSession}')
testRunner.testCase.setPropertyValue("propName",idSession)

Hope this helps,

Upvotes: 1

Related Questions