Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to parse html response with rest-assured?

I get a html response when making a GET request to certain url. I want to extract some values from html response

<span>
    <input type="hidden" id="authId" name="authId" value="erwerwwwererewwww"/>
</span>

want to get the value for authId. Tried with htmlPath() and xmlPath() but not sure how to get the path value.

like image 624
HenlenLee Avatar asked Dec 15 '25 05:12

HenlenLee


1 Answers

Try

<Code to get ValidatableResponse>.htmlPath().getString("html.body.span.input.@value")
like image 50
Dzmitry Sankouski Avatar answered Dec 16 '25 22:12

Dzmitry Sankouski



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!