1.

What do you understand by data tables in the context of UFT? Explain the different types of data tables. Describe some of the data table object methods.

Answer»

A DataTable, like MS Excel, aids TESTERS in the creation of data-driven TEST scenarios that may be used to repeat an Action. Datatables are divided into two categories:

  • Local Datatable: Each action has its own private data table, sometimes known as a local data table, which can be accessed ACROSS actions.
  • Global Datatable: Each test has a single global data sheet that is accessible across all actions.

The data sheet can be found under QTP's "Data" TAB, as seen below.

The following table lists some of the data table object methods:

MethodDescriptionSyntax
AddSheetAdds the supplied sheet to the data table at runtime.DataTable.AddSheet (SheetName)
DeleteSheetThe given sheet is removed from the run-time data table.DataTable.DeleteSheet( SheetID)
ExportThe Datatable is exported to a new file in the provided location.DataTable.Export(FileName)
ExportSheetRun-time export of a specific sheet of the Datatable.DataTable.ExportSheet(FileName, SheetName)
GetSheetThe given sheet from the run-time data table is returned.DataTable.GetSheet(SheetID)
GetCurrentRowReturns the active row of the global sheet's run-time data table.2DataTable.GetCurrentRow
GetParameterCountThe number of columns in the run-time data is returned.DataTable.GetParameterCount
GetRowCountThe number of rows in the Global Sheet's run-time data table is returned.DataTable.GetRowCount
GetSheetCountThe total number of sheets in the run-time data table is returned.DataTable.GetSheetCount
SetCurrentRowSets the current row's focus to the specified row number.DataTable.SetCurrentRow(RowNumber)
SetNextRowSets the focus of the run-time data table's next row.DataTable.SetNextRow
SetPreviousRowSets the previous row's focus in the run-time data. TableDataTable.SetPrevRow


Discussion

No Comment Found