mamar
12 years agoContributor
How to check non existence of a xml element?
Hi.
I have a scenario which i need to validate particular xml element is not returned in the response. Below is my general response.
<Transaction>
-----<Code>7019</Code>
-----<Type>Debit</Type>
<Transaction>
For one of my test case it will return as below.
<Transaction>
-----<Code>7019</Code>
<Transaction>
Here i need to check whether the <Type> element is not exist in my response. Could any help me how to validate through Groovy?
I have a scenario which i need to validate particular xml element is not returned in the response. Below is my general response.
<Transaction>
-----<Code>7019</Code>
-----<Type>Debit</Type>
<Transaction>
For one of my test case it will return as below.
<Transaction>
-----<Code>7019</Code>
<Transaction>
Here i need to check whether the <Type> element is not exist in my response. Could any help me how to validate through Groovy?