cancel
Showing results for 
Search instead for 
Did you mean: 

How to validate the non existing xpath in data driven approach

SOLVED
Highlighted
Contributor

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.
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Contributor

Re: How to validate the non existing xpath in data driven approach

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

View solution in original post

2 REPLIES 2
Highlighted
Contributor

Re: How to validate the non existing xpath in data driven approach

Team, Any update on the issue. 

Highlighted
Contributor

Re: How to validate the non existing xpath in data driven approach

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

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors