Monday 25 March 2013

Datatable object in QTP

Datatable is nothing but run-time Data Table in QTP. Datatable is used to store test data in QTP.
In QTP Every test has one datatable in it. In Datatable there is one global sheet and one local sheet for each action in Test.

Please note that changes made in run time datatable will last until you execution is going on. To save the run time data table you must use export method.

Methods of Run time datatable in QTP :-

  1. AddSheet Method - Used to add new sheet to datatable
  2. DeleteSheet Method - Used to Delete existing sheet from datatable in QTP
  3. Export Method - Used to export all sheets from datatable to new excel workbook in QTP
  4. ExportSheet Method - Used to export existing sheet from datatable to new excel sheet in QTP
  5. GetCurrentRow Method - Gets the row number of current active row from datatable
  6. GetRowCount Method - gets the total number of rows from current active sheet from datatable
  7. GetSheet Method - Gets the reference to existing sheet in datatable.
  8. GetSheetCount Method - Gets the count of total number of sheets from datatable in QTP
  9. Import Method - loads the all sheets from external workbook to runtime datatable in QTP
  10. ImportSheet Method - loads the particular sheet from external workbook to runtime datatable in QTP
  11. SetCurrentRow Method - Sets the particular row active in current active sheet.
  12. SetNextRow Method - Used to move to next row in current active sheet in datatble in QTP
  13. SetPrevRow Method - Used to move to previous row in current active sheet in datatble in QTP

Properties of Run time datatable in QTP :-

  1. GlobalSheet Property - Gets the reference of global sheet in datatable in QTP
  2. LocalSheet Property - Gets the reference of particular local sheet from datatable in QTP
  3. RawValue Property - The raw value is the actual string written in a cell before the cell has been computed, such as the actual text from a formula. 
  4. Value Property - Gets the value from cell - given sheet and active row and column name or index

No comments:

Post a Comment

Please Leave your reply. We value your feedback and inputs

Best QTP Books

Everything About QTP

Hello Friends,
You can find QTP study material, Multiple choice questions (mcq), QTP question bank, QTP question papers, QTP notes, QTP questionnaire, scenario based QTP interview questions, QTP tutorial and QTP training on this site.

If you are a fresher or experienced QTP professional with (1/2/3/4) years of experience, this blog is just for you.