Forum Discussion

Flo's avatar
Flo
Contributor
6 years ago

XPath : How to assert numerical values

Let's say a web service returns this part of response <result> <string>Good</string> <number>10.0</number> </result> For any external reasons, sometimes the answer contains <number>10</number...
  • Flo's avatar
    Flo
    6 years ago

    Radford Yes you understand it correctly. Contains assertion may be an idea. As you said it is not ideal solution and in my case I think it is better to have a single assertion for "//number" instead of "//result".