Getting GlobalVariable.<<Parameter>> value as null

I have a simple query.
I am trying to open a webpage by passing a parameter value as part of global variable. Below is my code:

import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject

import com.kms.katalon.core.testdata.InternalData
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

import internal.GlobalVariable as GlobalVariable

WebUI.openBrowser(β€˜β€™)

println GlobalVariable.URL1
WebUI.navigateToUrl(GlobalVariable.URL1)

My global variable looks like this:

However, when I am trying to run the script, I am getting error as:

Please help me to resolve this issue.

Hello,

does println fuction return correct URL? Do you have your environment properly set before running a test? Is your Global Variable String?

@Marek_Melocik
yes I have set the Global Variable as String

And NO, println returns as null. This is why it is failing.

Any help here will be appreciated.

Do you have correct environment set (β€˜test’ in your case)?

20190509-114340

1 Like

@Marek_Melocik -
Thanks for your help!
I missed the env set up.
image

I have changed to test and it works fine now.
Thank again for your help!