QTP - DTParameter Object Properties



Method Name Description Syntax
Name Returns the name of the parameter in the run-time datatable. DTParameter.Name
RawValue Returns the raw value of the cell in the current row of the runtime datatable. DTParameter.RawValue
Value Retrieves or sets the value of the cell in the Active row of the parameter in the run-time datatable. DTParameter.Value
ValueByRow Retrieves the value of the cell in the specified row of the parameter in the run-time datatable. DTParameter.ValueByRow (RowNum)

Example

Consider the following DataTable −

Get RowCount and Column Count

Val = DataTable.GetSheet("Global").GetParameter("Principal").ValueByRow(2) 
print Val ' Val Displays 2556
 
DataTable.SetCurrentRow(1) 
Val1 = DataTable.GetSheet("Global").GetParameter("Principal").Value
print Val1 ' Val1 displays 232
qtp_datatables.htm
Advertisements