Ask a Question

How to validate the non existing xpath in data driven approach


How to validate the non existing xpath in data driven approach

Hi Team,

I have implemented a data driven approach for a jdbc test step with an xpath match assertion.
For few negative cases, the attributes will not be retrieved in the jdbc response window for which the assertions are failing stating "xpath missing in response".
For all positive cases, the test step implementation is holding good.
For example, assume that my first test case is a positive for which test data and the assertion values are supplied to the jdbc test step from an external file. Here test execution is smooth and working as per expectation. Jdbc response window has all expected attributes in it and xpath match assertion is also marking the validation status.
Next assume that my second test case is negative for which an invalid data is supplied due to which jdbc test step is not retrieving data and my xpath match assertion is failing stating "xpath is missing".
Since my project is designed as a data driven approach is there any possibility to handle the above issue.
Thanks in advance.

Team, Any update on the issue. 

I resolved this issue by migrating from xpath match assertion to xquery assertion.

Showing results for 
Search instead for 
Did you mean: