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.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

ZAP Utility

Zap.Common...Box

Datatable.Value("A")

Comment

Use Datatable.Value in parameter box of Exist method

Step

Exist

Datatable.Value("A")

true

Contact Us

Tower Place 100

3340 Peachtree Rd NE #1800 

Atlanta, GA 30326 USA

(404) 814-5227