Forum Discussion
SiKing
12 years agoCommunity Hero
Elsevier - OH Support wrote: in this node text db214a9f7a45341da252f64-602a0d8f43650d4d is changing on every run so wants to use some regular expression inplace of this in this response can you please let me know how i can i implement this.
The Contains assertion can use regex. Also, the XPath Match assertion uses wildcards, which may also work? Anything more and you will have to resort to Script assertion.
Elsevier - OH Support wrote: second question is i have content assertion on my whole response on the body node of response, sometimes this assertion fails because no of nodes increases or decrease on some runs...can i use regular expresion instead or is there any other method.
Personally I find the Message Content assertion very cumbersome and not flexible at all. Also, if you clone a test step, this assertion almost always breaks. Have looked at XQuery?