Fso & Datatable - Qtp
QuickTest Reserved Objects
The following QuickTest reserved objects can be used in your automation script to retrieve or set data for the Data Table and Environment variables associated with a test or component.
• DataTable Object
• DTParameter Object
• DTSheet Object
• Environment Object
DataTable Object
Description
The run-time Data Table.
Note: All methods performed on this object apply to the run-time DataTable object only. Changes to the run-time DataTable object are reflected in the test results, but the design-time Data Table is not affected.
Associated Methods
• AddSheet Method
• DeleteSheet Method
• Export Method
• ExportSheet Method
• GetCurrentRow Method
• GetRowCount Method
• GetSheet Method
• GetSheetCount Method
• Import Method
• ImportSheet Method
• SetCurrentRow Method
• SetNextRow Method
• SetPrevRow Method
Associated Properties
• GlobalSheet Property
• LocalSheet Property
• RawValue Property
• Value Property
AddSheet Method
Description
Adds the specified sheet to the run-time Data Table and returns the sheet so that you can directly set properties of the new sheet in the same statement.
Syntax
DataTable.AddSheet(SheetName)
|Argument |Type |Description |
|SheetName |String |Assigns a name to the new sheet. |
Return Value
DTSheet Object.
Example
The following example uses the AddSheet method to create the new sheet, "MySheet" in the run-time Data Table and then adds a parameter to the new sheet.
Variable=DataTable.AddSheet ("MySheet").AddParameter("Time", "8:00")
DeleteSheet Method
Description
Deletes the specified sheet from the run-time Data Table.
Syntax
DataTable.DeleteSheet SheetID...
View Full Essay