balaji
1
How do i refer a session variable from one scala file to another?
.exec(session => {
val token = session("acmToken").as[String]
val token2 = "Bearer " + token
session.set("acmToken", token2)
})
I need to use acmToken variable in another class or store in scala variables
sbrevet
2
Hi @balaji,
As you set acmToken
in session, you can retrieve it in another step (even in another scala file) from session as well.
See Session API - Getting Attributes.
As it’s stored in session, ensure that it is from the same virtual user (ie, in the same scenario).
Cheers!
balaji
3
can you please give some examples?
I need to use or store this acmtoken value in another variable
sbrevet
4
@GeMi provided some examples: Case0009SessionValuesSimulation
Thanks @GeMi
Cheers!
1 Like
balaji
5
this doesnt help me much as well. Its written in java
Can you please help here.
system
Closed
7
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.