GetEnvironmentVariable

This function returns the System and UserDefined environment variable.

Format: GetEnvironmentVariable(NameOfVariable)

Examples:

{GetEnvironmentVariable("JAVA_HOME")} – This will return the JAVA_HOME variable set in the system environment variable, e.g. C:\Program Files\Java\jdk1.8.0_231.

{GetEnvironmentVariable("OS")}– This will return the OS name Windows_NT.

Practice


Want to learn more about using this function in Provar? You can use the following sample test case to get started. Simply right-click to download getEnvironmentVariable.testcase and then drag and drop the test case into the test folder within the Navigator panel of Provar.

Note: You will need to unzip/extract the compressed file before using it in Provar.

Documentation library

Other available resources

Looking for something different?

We use cookies to better understand how our website is used so we can tailor content for you. For more information about the different cookies we use please take a look at our Privacy Policy.