Answered question

How to Update and parameterize POST parameters where the post content type=text

We have to run a script where we have to change the value for one of the field name on webpage, as a part of POST parameters section we are only having a single line e.g.
{"type":"EXP","name":"ValueName02","description":"DescName01","exportPassword":"Test@12340","criteria":{"version":1,"page":1,"resultsPerPage":1000}
(which was recorded during the recording of user path)

In the above line is there any way(s) so that we can update the value of only field at each iteration so that can make a unique request with each iteration.

Thanks in Advance.

GULSHAN K.
GULSHAN K.

GULSHAN K.

Level
0
77 / 100
points

You can create a variable in the variable manager of type current date, name it something like 'timeMillis', the format will be milliseconds from the format list, you can then just modify your payload to be...

{"type":"EXP","name":"ValueName${timeMillis}","description":"DescName01","exportPassword":"Test@12340","criteria":{"version":1,"page":1,"resultsPerPage":1000}

Did you find this useful ?

No (0)

Yes (0)

0% of users found this answer useful

Other answers

GULSHAN K.
GULSHAN K.

GULSHAN K.

Level
0
77 / 100
points

@Neil W thanks for your response, could you please assist me more on how to pass the value of TimeStamp in the request as we are unable to pass any variable_name (which usually starts with $ sign) in the request.
If we are passing any variable using ${Var_name} it will just taking this as the value and the same is getting passed in the request.

Thanks in advance.

GULSHAN K.
GULSHAN K.

GULSHAN K.

Level
0
77 / 100
points

Thanks @Neil W,
I have made the changes as suggested by you but I am still getting the response code as 400 for the request, have attached the request and response for your reference.

Thanks in advance.

GULSHAN K.
GULSHAN K.

GULSHAN K.

Level
0
77 / 100
points

added the attachment.