Académique Documents
Professionnel Documents
Culture Documents
com
Verify that the first row of data contains the Column headers.
Rename the sheet(s) to match the names used in the test script (e.g., Global,
Action1, etc.).
In the Data table section, select the "Other location" radio button.
Enter the full path to the Excel file or browse to the file using the browse button
(...).
Click <Apply>.
Click <OK>.
For QTP Realtime Scripts, visit www.ramupalanki.com
value1 = DataTable.Value("FirstSheetColumn")
DataTable.Import("C:\Temp\test1.xls") Datatable.SetCurrentRow(I)
end if Next
end if msgbox(TrueOrFalse)
3. To parameterize a password
For QTP Realtime Scripts, visit www.ramupalanki.com
Option 1:
Use the Set method instead of SetSecure and parameterize that. This method will
not encrypt the password.
For QTP Realtime Scripts, visit www.ramupalanki.com
Option 2:
If you use Option 2, you can use the SetSecure method to directly access the
encrypted password in the data table.
In the Test Setting window, you will see a section called Data Table iterations. This
is where you can specify the number of iterations. Select the "Run one iteration
only" option to run only with the first row of data. Select "Run on all rows" to
iterate through all rows of data. Select "Run from row x to row y" to specify which
rows of data in the data table to use.
Note:
For QTP Realtime Scripts, visit www.ramupalanki.com
If you want to run on only one row of data, but do not want to use the first row, select
the "Run from row x to row y" option specifying the same row for x and y.
Selecting a cell or row in the Data Table and pressing Ctrl+X or the Delete key on
the keyboard deletes the data from the selected cell or row, but does not delete the
actual cell or row. Thus, if you delete data from a row in the Data Table using one
of these shortcut keys, QuickTest will still run an iteration on that row.
Workaround: To delete an entire cell or row from the Data Table, select it and
choose Delete from the context menu, or press Ctrl+K on the keyboard.
If you import a Microsoft Excel table containing a combo box or list cells,
conditional formatting, or other special cell formats, the formats are not
imported and the cells are displayed in the Data Table with fixed values.
When you record a test and you try to play it back a popup window opens saying that
“An Exception occurred in pdm.dll and Quick Test is going to close”.
Use the ChildItem and GetROProperty methods to retrieve the state of a checkbox
The ChildItem method will return an object referencing the checkbox. Follow this
with the GetROProperty method will return the property value specified of the
object.
Example:
If you rename a particular action that gets reflected in the local data sheet whereas
you cannot rename any actions in the global data sheet.
10. to access the second row in local sheet without accessing the first row
The SetCurrentRow method sets the specified row as the current (active) row in
the run-time data table.
Sheet.SetCurrentRow(RowNumber)
For QTP Realtime Scripts, visit www.ramupalanki.com
RowNumber - Indicates the number of the row to set as the active row.
If you do not specify that the sheet is a local sheet, using GetSheet, the row will be
activated in the Global sheet by default.
Example:
' If the GetSheet function is not used, it will set the Row in the Global Sheet.
msgbox(DataTable.Value("Data1", "Action1")) ' This will read the cell value.
DataTable.GetSheet("Action2").SetCurrentRow(3)
Unicode is supported.
'ol.Skip
End Function
'**********************************************************************
***************************
ObjMail.From = SendFrom
'ObjMail.Send
'**********************************************************************
*****************************