Forum Discussion

roryLIT's avatar
roryLIT
Contributor
11 years ago

Assert value is an integer

I want to create an XPath Match assertion that validates a tag value is a number, how would I write this?

Thanks
  • GiscardN's avatar
    GiscardN
    Frequent Contributor
    Hi,

    You can use the number function in the XPath Expression part of your XPath Match configuration.
    Add this:
    number(your_node) = your_node
    If your node is a number it will evaluate to true, and false otherwise.

    Regards,

    Giscard
    SmartBear Support