which assertion can be used to check value of element is present from the list.
how do I check if a value is available from the list. for an example I want to verify a value NJ for element "state" is present in ( NJ, NY, PA, CA). I tried JSON Assertor --> String Comparison Assertion with "Element must contain" - "Expected value NJ,NY,PA,CA which did not work.
Tagged:
0
Comments
Are you saying your JSON looks like this?
There's more than one way of performing a validation like that. One way is to use "Occurence Assertion" with XPath like
/root/item[text()="NJ"]
with expected number of occurences == 1 (or >= 1, depending on what you want to check).