I have a scenario where I POST a file using soap service (xml). The scenario works ok, but I need to get the id that is generated automatically and incrementaly and to save it in a variable. Someone asked me to use this:
- def id= //logId And print id
It worked in another case where the id is always the same. That is, in one case where I insert a file that is overwritten, keeping the same id.
However, if I try to use it for the first case, where the id is incremental it returns a #notpresent message in the "print id". But if I use and assertion where I write:
id == #present, it returs ok.
This es the response after executing the scenario. It is Ok, the id is present in the assertion but it doesn't print.
And match response /Envelope/Body/respuesta/return/message == 'OK'
And match response /Envelope/Body/respuesta/return/status == '0100'
And match response /Envelope/Body/respuesta/return/logId == '#present'
* def id = //logId
And print id
12:48:23.800 [print] #notpresent
Thanks for your help.