Ask a Question

How to use wildcards in XPath Match Assertion

BA_Service_Haus
Regular Contributor

How to use wildcards in XPath Match Assertion

Hello *,

we are using SoapUi 3.6.1

We try to use a wildcard * in a XPath Match assertion but it seems as if the wildcard is seen as a character and not as a wildcard.



Do you have any ideas why it is like it is? Is this a known issue?

Kind Regards,
Carsten
3 REPLIES 3
SmartBear_Suppo
SmartBear Alumni (Retired)

Hi,

Wildcards only work for when you have a block of XML and you set the contents of an element or attribute to be *. If you're just verifying that the element existis you could use this instead:


XPath Expression
declare ...
count(//ns5:getServiceInfoResponse[1]/...)

Expected Result
1


Regards,
Dain
eviware.com

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
BA_Service_Haus
Regular Contributor

hi,

are there any thoughts about to make the use of wildcards like (ABC*EFG) possible? As it is possible in Nodes.

regards
Carsten
SmartBear_Suppo
SmartBear Alumni (Retired)

Hi Carsten,

That would be pretty useful. I'll add it to the backlog!

Regards!

/Henrik
eviware support

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: