datatable, data, table, value, information, variable, scriptless, script-less, scripted, step, view, stepview

Method Datatable.Value

Retrieves value from the Datatable

Watch this video to learn how to use this method

Have a problem with playback?

Usage

Function DataTable.Value( 
	String Name
)

ZAP Utility

ZAP Utility step

Zap.Comm...Box

Zap.Datatable("A")

Use in parameter

Parameters

Name

Type: String

The name of the parameter (column name)

Returns

Value from Datatable for the current Iteration

Example

For example, lets update script to run same script for different browsers.

We will rename Datatable column "A" to "Browser" and add three cells in a column: chrome, firefox, opera.

Now update Application.Launch method calling

VBScript

site_url = "demo.zaptest.com"
Application("Demo").Launch Datatable.Value("Browser"), site_url
'now on each iteration ZAPTEST will get browser name from Datatable to launch it

JavaScript

var siteUrl = "demo.zaptest.com";
Application("Demo").Launch(Datatable.Value("Browser"), siteUrl);
// now on each iteration ZAPTEST will get browser name from Datatable to launch it

Comment

Show message box with datatable parameter value

Script-Less next step

ZAP Utility

ZAP Utility step

Zap.Common...Box

Datatable.Value("A")

Script-Less next step

Comment

Use Datatable.Value in parameter box of Exist method

Script-Less next step

Step

ZAP Object step

Exist

Datatable.Value("A")

true

Contact Us

3150 Roswell Rd NW

Atlanta, GA, 30305, USA

(800) 795-3552