Professional Documents
Culture Documents
==========================
' Name of the Script : Master File Reports Offering
' Scope of the Script : This test script covers 12 te
st cases related to the MF Reports --> Offering
' Author
: Imam Shareef
' Description : Master File Reports Offering
' Date and / or Version : 04-12-2008,version 1.0
'===============================================================================
============================
Sub MFReportsOffering()
'****Declaration of Environmental Variable
Environment.Value("Execution_Log")=True
'''''''''Test case count
Const TC_COUNT = 12
strVar = Environment("TestDir")
strIndVar = Split(strVar,"\",-1,1)
strBound = UBound(strIndVar)
strAllPath =""
For intCounter = 0 to strBound - 1
strAllPath = strAllPath & strIndVar(intCounter)
&"\"
Next
strPath = Trim(strPath)
strDataPath = strAllPath & "DataTables\"
'****Adding MFLogin sheet to the dataTable and Importing the Inp
ut DataTable
DataTable.AddSheet "MFLogin"
DataTable.ImportSheet strDataPath & "Login.xls","MFLogin","MFLog
in"
DataTable.AddSheet "Offering"
DataTable.ImportSheet strDataPath & "MasterFileReports.xls","Off
ering","Offering"
DataTable.AddSheet "ReportHeader"
DataTable.ImportSheet strDataPath & "MasterFileReports.xls","Rep
ortHeader","ReportHeader"
DataTable.AddSheet "HomePageVerification"
DataTable.ImportSheet strDataPath & "MasterFileReports.xls","Hom
ePageVerification","HomePageVerification"
' Logs the Scenario name Execution in a .csv file
Call Execution_log(DataTable.Value("Scenario_Name", "Master"), "
", "", "")
'****Invoking IE and navigating to the ADR Login page
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL",
"MFLogin"))
'****Checking the username, password and login objects in the lo
gin page
Call pageCheck_WebEdit("MasterFile","Login Page","username;j_pas
sword","")
Call pageCheck_WebButton("MasterFile","Login Page","Login","")
'****Entering username and password and login into the masterfil
e application
Call login("MasterFile","Login Page","User","MFLogin")
Environment.Value("DATATABLE_ROW")=1
DataTable.GetSheet("Offering").SetCurrentRow(Environment.Value("
DATATABLE_ROW"))
'***************************************** TC Driver Strat *****
**************************************************
For intTCCount =1 to TC_COUNT
Environment.Value("Execution_Log") = "True"
If DataTable("TestRunFlag","Offering")="Y" Then ''If run flag is
Y in test data table
Reporter.ReportEvent micDone,"######## BEGIN TEST CASE - '" & Da
taTable("TestCaseID","Offering") & "' ########### ","Execution of Test Case '" &
DataTable("TestCaseDesc","Offering") & "' Started"
strFuncName = "MFReportsOffering_TC" & intTCCount & "()"
''Formation of function name
''Call Function
Execute "Call " & strFuncName
If Environment.Value("Execution_Log") = "True" Then
Call Execution_log("",Datatable.Value("TestCaseI
D", "Offering"), Datatable.Value("TestCaseDesc", "Offering"), "PASS")
Else
Call Execution_log("",Datatable.Value("TestCaseI
D", "Offering"), Datatable.Value("TestCaseDesc", "Offering"), "FAIL")
End If
Reporter.ReportEvent micDone,"######### END OF TEST CASE - '" &
DataTable("TestCaseID","Offering") & "###########","The Test Case Execution Comp
leted"
End If
''Increment the test data table row
strPrevious=Trim(DataTable.Value("TestCaseID","Offering"))
''Increment the test data table row
Environment.Value("DATATABLE_ROW") = Environment.Value("DATATABLE_ROW") + 1
DataTable.GetSheet("Offering").SetCurrentRow(Environment.Value("DATATABLE_RO
W"))
strNext=Trim(DataTable.Value("TestCaseID","Offering"))
While strPrevious = strNext
Environment.Value("DATATABLE_ROW") = Environment.Value("DATATABLE_ROW") +
1
DataTable.GetSheet("Offering").SetCurrentRow(Environment.Value("DATATABLE_
ROW"))
strNext=Trim(DataTable.Value("TestCaseID","Offering"))
Wend
Next
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
'***************************************** TC Driver End *******
************************************************
End Sub