global, variable, get, extract, scriptless, script-less, scripted, step, view, stepview

Method Zap.GetGlobalVar

Gets globar variable value by name

Watch this video to learn how to use this method

Have a problem with playback?

Usage

Function Zap.GetGlobalVar ( 
  String Name,
  Boolean Report [Optional]
)

ZAP Utility

ZAP Utility step

Zap.GetGlobalVar

globalVar1

True

result

Name

Report

Output Parameter

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));

Comment

Get global variable value and save it to local variable with name "result"

Script-Less next step

ZAP Utility

ZAP Utility step

Zap.GetGlobalVar

globalVar1

True

result

Script-Less next step

Comment

Use Zap.GetGlobalVar in parameter box of Exist method

Script-Less next step

Step

ZAP Object step

Exist

Zap.G...Var("demo")

true

Contact Us

3150 Roswell Rd NW

Atlanta, GA, 30305, USA

(800) 795-3552