Method GetGlobalVar
Gets globar variable value by nameUsage
Function ZAP.GetGlobalVar (
String Name,
Boolean Report [Optional]
)
Parameters
Name
Type: String
Variable name
Report (optional)
Type: Boolean
Default Value: False
Generate report for this step
Returns
Global variable value
Example
VBScript
msgbox Zap.GetGlobalVar("demoGlobalVariable", True)
JavaScript
alert(Zap.GetGlobalVar("demoGlobalVariable", true));
Documentation Categories
![](https://www.zaptest.com/wp-content/uploads/2022/02/1SCRIPT_STEP.jpg)
ZAPTEST
![](https://www.zaptest.com/wp-content/uploads/2022/02/FARM.jpg)
FARM
![](https://www.zaptest.com/wp-content/uploads/2022/02/LOAD.jpg)
Comment
Get global variable value and save it to local variable with name "result"