Variable Types

This is a companion discussion topic for the original entry at

How to set value for Global variable at run time? Please help me out with this.


i have problem in using global variable, when i using global variable that i defined in test profile in test case and run it from previous opened brfowser , it doesn’t work, and only work default profiles variable…
i use last veesion .6.1.3
please help me, my test is stoped…

Hello @melikaarmandi

According to my understanding you need to select the profile first then run your test case.

You cannot change the execution profile from the GUI when your test case is running. Although you can do that programatically ( I assume ).

Also when ever you execute a test case the Katalon will open fresh instance of browser without impacting the current state of your browser.

thanks your info, but my problem is my global variable only worked in new session and I will need use them during the run…

I need more info. It would be great if you can describe the scenario you are trying to perform

I’ve defined some data in the profiles I’ve defined it, and when I run my script in a new session, these values are read correctly from the profile, but when I run the script in the previous session, only data that defined in the default profile returned and current profile do not work and the values of the current profile values is empty.

by new session you mean a new katalon instance running? if so, after editing/updating the project in the new instance and saving it, refresh the project in the previous instance.
if anything else please describe with more details what you are trying to achieve, it is not very clear

Is there by any chance can we mask global variables?

No, I mean new session in browser…

Hi all,

Is there any way to obtain environment vars from Operative System?

Thanks in advance

Hi. Wanted to mention this link referenced on the Variable Type documentation is broken:

hay i am already test global variable and local variable in katalon browser it’s work,
but when i am running in docker with command line, it’s error no such url or can’t resolve class global variable

Would really be nice to see the Katalon variables on this page.
For example, when we run a test, there is a variable for Katalon test ID. However, this help document doesn’t say how we can access the value of this ID for our own reporting. Is it available inside a test?

Java can be accessed in scripts, so just use System.getenv()