Re: AcriveData Sheet without using ActiveData Wizard.
This may help; below is a section of code that manually reads data from an Active Data spreadsheet. The data exists in 1 row; multiple columns, in the sheet. Each column name is defined as constants, exactly as they appear in the spread sheet. The ActiveData asset must be defined in TestPartner along with the sheet name; this example's ActiveData asset is defined as "Cad_EmailControl" in TestPartner, and below in code as a constant "AD_EMAIL_OPTIONS".
'Load the Active Data spreadsheet
Dim gobjEmailControls_Row As TActiveDataRow
Dim gobjEmailControls_ActiveData As TActiveData
'Define Active Data spreadsheet column names.
'If column names change in the spreadsheet, they need to be changed here.
Const COL_EMAIL_SEND = "Send Email"
Const COL_SUM_SUBJECT = "Summary Subject"
Const COL_ERR_SUBJECT = "Error Subject"
Const COL_FROM_ADDR = "From Address"
Const COL_TO_SUM_ADDR = "Summary To Address"
Const COL_TO_ERR_ADDR = "Error To Address"
Const COL_TO_CC_ADDR = "CC Address"
'Active Data asset name for the email control spreadsheet
Const AD_EMAIL_OPTIONS = "Cad_EmailControl"
Set gobjEmailControls_ActiveData = LoadActiveData(AD_EMAIL_OPTIONS)
For Each gobjEmailControls_Row In gobjEmailControls_ActiveData
'Get True/False send Email flag
strSendEmail = gobjEmailControls_Row.GetString(COL_EMAIL_SEND)
getting other control options
'Get Email subject for a summary Email (test case complete)
gstrEmailSumSubject = gobjEmailControls_Row.GetString(COL_SUM_SUBJECT)
'Get Email FROM Address for a error & summary Email
gstrEmailFromAddress = gobjEmailControls_Row.GetString(COL_FROM_ADDR)
'Get Email TO & CC Addresses for a summary & error email
gstrEmailSumToAddress = gobjEmailControls_Row.GetString(COL_TO_SUM_ADDR)
gstrEmailErrToAddress = gobjEmailControls_Row.GetString(COL_TO_ERR_ADDR)
gstrEmailCCToAddress = gobjEmailControls_Row.GetString(COL_TO_CC_ADDR)
Using TestPartner 6.0 Build 462
Test Scripts & Visual Tests