Method SetValue

Sets value into the current Iteration row of a Datatable parameter

Usage

Function Datatable.SetValue( 
        String Name,
        Object Value
)

Datatable

columnName

ZAP Object step

GetProperty

Text

Column Name

Datatable Step Value

Value

Parameters

Name

Type: String

The name of the parameter (column name)

Value

Type: Object

The value to set

Returns

No return value

Example

VBScript

Application("Demo").View("DemoView").Object("txtUsername").SetProperty "text", Datatable.Value("Username")
Application("Demo").View("DemoView").Object("btnGetPhoneByUsername").Click
phoneNumber = Application("Demo").View("DemoView").Object("Phone").GetProperty("text")
Datatable.SetValue "Phone", phoneNumber

JavaScript

Application("Demo").View("DemoView").Object("txtUsername").SetProperty("text", Datatable.Value("Username"));
Application("Demo").View("DemoView").Object("btnGetPhoneByUsername").Click();
var phoneNumber = Application("Demo").View("DemoView").Object("Phone").GetProperty("text");
Datatable.SetValue("Phone", phoneNumber);

Comment

Get Text property from object and save it to datatable

Script-Less next step

Datatable

objectText

ZAP Object step

GetProperty

Text

Script-Less next step

Comment

Set constant value to datatable

Script-Less next step

Datatable

objectValue

Constant

100

ZAP Object step