I m seeing this error while retrieving cookie value from script
" .exec(getCookieValue(CookieKey(“JSESSIONID”).withDomain(“xxx.xx-xx.testing.xxxx.cloud”).withPath(“/ietp-s1000d/”)))
.exec { session =>
println(session(“JSESSIONID”).as[String])
session
}"
Error. how to fix this?
16:40:28.905 [ERROR] i.g.c.a.b.SessionHookBuilder$$anon$1 - ‘hook-1’ crashed on session Session(ACM Token,1,Map(gatling.http.ssl.sslContexts → io.gatling.http.util.SslContexts@2ee1f94b, gatling.http.cache.dns → io.gatling.http.resolver.ShufflingNameResolver@660df2cb, gatling.http.cookies → CookieJar(Map(CookieKey(_b1626,xxx.xx-xx.testing.xxxx.cloud,/) → StoredCookie(_b1626=13698f8cb87356d0, path=/,true,false,1711624228842), CookieKey(jsessionid,xxx.xx-xx.testing.xxxx.cloud,/ietp-s1000d/) → StoredCookie(JSESSIONID=23BB1BE174AA47FE6C965DA76BBCB910, path=/ietp-s1000d/, secure, HTTPOnly,true,false,1711624228842))), gatling.http.referer → https://corena.dal-triage.testing.flatirons.cloud/ietp-s1000d/getAdminLoginDialog.do),KO,List(),io.gatling.core.protocol.ProtocolComponentsRegistry$$Lambda$543/0x000000080064c840@1966308e,io.netty.channel.nio.NioEventLoop@226b143b), forwarding to the next one
java.util.NoSuchElementException: No attribute named ‘JSESSIONID’ is defined
at io.gatling.core.session.SessionAttribute.as(Session.scala:48)
at AcmTokenSimulation.$anonfun$1(AcmTokenSimulation.scala:26)
at io.gatling.core.action.SessionHook.execute(SessionHook.scala:38)
at io.gatling.core.action.Action.$bang(Action.scala:42)