|
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: | Method | Description | Syntax |
|---|
| AddSheet | Adds the supplied sheet to the data table at runtime. | DataTable.AddSheet (SheetName) |
|---|
| DeleteSheet | The given sheet is removed from the run-time data table. | DataTable.DeleteSheet( SheetID) |
|---|
| Export | The Datatable is exported to a new file in the provided location. | DataTable.Export(FileName) |
|---|
| ExportSheet | Run-time export of a specific sheet of the Datatable. | DataTable.ExportSheet(FileName, SheetName) |
|---|
| GetSheet | The given sheet from the run-time data table is returned. | DataTable.GetSheet(SheetID) |
|---|
| GetCurrentRow | Returns the active row of the global sheet's run-time data table.2 | DataTable.GetCurrentRow |
|---|
| GetParameterCount | The number of columns in the run-time data is returned. | DataTable.GetParameterCount |
|---|
| GetRowCount | The number of rows in the Global Sheet's run-time data table is returned. | DataTable.GetRowCount |
|---|
| GetSheetCount | The total number of sheets in the run-time data table is returned. | DataTable.GetSheetCount |
|---|
| SetCurrentRow | Sets the current row's focus to the specified row number. | DataTable.SetCurrentRow(RowNumber) |
|---|
| SetNextRow | Sets the focus of the run-time data table's next row. | DataTable.SetNextRow |
|---|
| SetPreviousRow | Sets the previous row's focus in the run-time data. Table | DataTable.SetPrevRow |
|---|
|