Forum Discussion
deepesh_jain
15 years agoFrequent Contributor
Hi,
XPATH Assertion will have either pass or fail status. Logically it won't be much effective if you try to combine multiple expressions in one as the assertion will fail if even one of the expression fails. And you will have to dig inside to check which failed. There fore all these should be in different assertions.
You can however write a script assertion and check for all the expressions. Initialize a counter to say 0 in your script. And increment that whenever you get a 'fail'. At the end, check for the value of counter. If its still 0 pass the script assertion otherwise fail it.
Regards,
Deepesh Jain
XPATH Assertion will have either pass or fail status. Logically it won't be much effective if you try to combine multiple expressions in one as the assertion will fail if even one of the expression fails. And you will have to dig inside to check which failed. There fore all these should be in different assertions.
You can however write a script assertion and check for all the expressions. Initialize a counter to say 0 in your script. And increment that whenever you get a 'fail'. At the end, check for the value of counter. If its still 0 pass the script assertion otherwise fail it.
Regards,
Deepesh Jain