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

Method Datatable.SetValue

Sets value into the current Iteration row of a Datatable parameter

Watch this video to learn how to use this method

Have a problem with playback?

Usage

Function Datatable.SetValue( 
        String Name,
        Object Value
)

Datatable

columnName

GetProperty

Text

Column Name

Value

Parameters

Name

Type: String

The name of the parameter (column name)

Value

Type: Object

The value to set

Returns

No return value

Example

In this example we will get phone number by username and set it to datatable

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

Datatable

objectText

GetProperty

Text

Comment

Set constant value to datatable

Datatable

objectValue

Constant

100

Contact Us

Tower Place 100

3340 Peachtree Rd NE #1800 

Atlanta, GA 30326 USA

(404) 814-5227