Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.
How to add loop in xpath?
In my scenario , I am getting different number of elements which depends upon data I am passing in request and I want specific set of element. I have added "IF" condition for the same and I am getting expected element and now I want to iterate this "IF" condition for this set of elements.
Tagged:
0
Answers
-
We need more details about what your payload looks like, what xpath you are using, and what exact data you would like to extract.
0 -
Perhaps you want a for expression? That link describes how to use the expression along with a concrete example.
For reference, here are some other forum posts I found:
FOR LOOP in xpath reg-ex
Is there a way to extract all the elements of a xml using condition in select xpath1