However, I often use the same variables. Is there a way to set a default value inside TESTCASE that’s set in case a variable is undefined?
I had to do some complicated work-around now with try/excepts. There must be simpler way?
Just using:
if(Gebruikersnaam == undefined) {
Doesn’t work, because the script won’t run because… “Gebruikersnaam” isn’t defined
In the UI of the test case, you can see the Variables tab where you can create Test Case Variables with default values. Once defined there, you can use the variables in the test case.
Maybe I don’t understand, but you can set a Global Variable the same as any variable within your project. If the Global Variable never changes, then just set it with the value in the Profile. If you want it to change, then do like below.