Forum Discussion
simonjdonnelly wrote:Passing the value through as a parameterised version should work then:
I don't have any sample REST JSON services to hand, so I've used soap but it shouldn't be too different:
Place ${Login 1 - Portal Login#Request#//Response[1]/accessToken[1]} in the second request, where you want the access token previously generated to appear.
This will take the value from the test step named 'Login 1 - Portal Login' and take the accessToken from the structure Response > accessToken.
I have tried it with SessionId, but it doesn't work.
The sessionId is not being captured and remains hardcoded in the header (instead of taking over the value of the sessionId);
any tips?
You are missing the opening curly brace below: $Nameanddestinationcoding#Request#//Response[1]/SessionId[1]}
Try it with the brace: ${Nameanddestinationcoding#Request#//Response[1]/SessionId[1]}
This should work
If it doesn't, Groovy scripting might be the work around
Related Content
Recent Discussions
- 6 days agoemoya