1
votes

I created a http request step in soapui which is an html page from which I need to extract one single value from

 <span class="result">12345<span>

I'm thinking about using groovy,is it the best way ? If yes I'm beginner in both soapui and groovy, any snippet code to get started (how to get html Content from http request step, how to parse in groovy) thanks.

2

2 Answers

2
votes

If you feel more comfortable with Groovy, then go for it!

SoapUI internally represents almost everything as XML. Therefore the easiest way to manipulate things in SoapUI is using XPath. In your case, you could probably use a Property Transfer step to extract //span[@class="result"].

0
votes

Siking answer worked setting the source 'property' to ResponseAsXml along with XPath expresions, as for common HTML XPath expressions there's a resource online at https://devhints.io/xpath