I need a few node values, the script assertion below gives me the same (first) node value, and if I try (in the secondResponse) something like ("//Chassis:eventList/Chassis:eventList/CT:event/CT:message") the return value is null.
Any suggestions on how I get the second Node value if my (example - excerpt) response appears as follows?:
you reckon you need to differentiate between the two using the correct index value.
jsonpath starts with zero, but i think xpath starts with 1, so using the following as an example:
So including the index, the xpath to the first instance of 'Author' tag would be //Books/Book/Author and xpath to the second instance of Author tag would be something like //Books/Book/Author
OR thereabouts - it's been awhile since I was playing with xpath - just been focused on jsonpath for hte last couple of years.
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta