Get param form value from redirect

Hi,

I’m trying to get a token from our login process but the token is in a redirect. Is there anyway to get the token to use it to send into the next post?

.exec(http(“request_2”)
.post("/authentificationProcess")
.headers(headers_2)
.formParam(“user”, “bob”)
.formParam(“password”, “123”)
.check(regex("""<input Type=“hidden” Name=“id” value="(id:.*==)"""").find.saveAs(“token”)))
.pause(2)
.exec(http(“request_3”)
.post(uri5 + “/LogonSSO”)
.headers(headers_3)
.formParam(“awID”, “${token}”)
.formParam(“msgId”, “open”))

What I want is to be able to obtain the token between authentificationProcess and LogonSSO to use it as a variable in my formparam.

Best regards,
René

What’s your problem exactly?
You might have missed the fact that checks are applied on the landing page, not intermediate redirects.

On the landing page, there is a hidden field whose value I need to get. However I try I can’t make it works… everytime I get the error “not found”.
What I want is to get the value of the hidden field and send it back as a variable into the next post

Here’s what it looks like on the landing page :

Hello,

You can do that using

.check(css(“input[name=‘token’]”, “value”)
.find
.saveAs(“token”)

)