Forum Discussion

Flo's avatar
Flo
Contributor
7 years ago
Solved

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> instead.

I would like to assert the content of //result for both number values (with or without decimals). Is there a keyword/function to use in "Expected result" to achieve that ?