Get param form value from redirect


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?

.formParam(“user”, “bob”)
.formParam(“password”, “123”)
.check(regex("""<input Type=“hidden” Name=“id” value="(id:.*==)"""").find.saveAs(“token”)))
.post(uri5 + “/LogonSSO”)
.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,

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 :


You can do that using

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