sakshi
13 years agoNew Contributor
XPath for JSON Request Body Parameters
How to write XPath for Request body parameters?? For example, I have Given id and name in request body like
{
"Id":1234,
"Name":"ABC"
}
and the response returns the same JSON format with additional parameters. I want to add a XPath assertion to "Name", dynamically.
Choosing:
${RequestName:#RawRequest}; returns complete JSON Request body:
{
"Id":1234,
"Name":"ABC"
} but I need XPath for "Name" only. How to write XPath/XQuery for it??
{
"Id":1234,
"Name":"ABC"
}
and the response returns the same JSON format with additional parameters. I want to add a XPath assertion to "Name", dynamically.
Choosing:
${RequestName:#RawRequest}; returns complete JSON Request body:
{
"Id":1234,
"Name":"ABC"
} but I need XPath for "Name" only. How to write XPath/XQuery for it??