Professional Documents
Culture Documents
==========================
' Name of the Script : Master File Reports Position
' Scope of the Script : This test script covers 3 tes
t cases related to the Administration --> Position
' Author
: Imam Shareef
' Description : Administration Position
' Date and / or Version : 04-12-2008,version 1.0
'===============================================================================
============================
Sub MFAdministrationPosition()
'****Declaration of Environmental Variable
Environment.Value("Execution_Log")=True
'''''''''Test case count
Const TC_COUNT = 3
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 "Position"
DataTable.ImportSheet strDataPath & "MasterFileReports.xls","Pos
ition","Position"
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("Position").SetCurrentRow(Environment.Value("
DATATABLE_ROW"))
'***************************************** TC Driver Strat *****
**************************************************
For intTCCount =1 to TC_COUNT
Environment.Value("Execution_Log") = "True"
If DataTable("TestRunFlag","Position")="Y" Then ''If run
flag is Y in test data table
Reporter.ReportEvent micDone,"######## BEGIN TEST CASE - '" & Da
taTable("TestCaseID","Position") & "' ########### ","Execution of Test Case '" &
DataTable("TestCaseDesc","Position") & "' Started"
strFuncName = "MFAdministrationPosition_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", "Position"), Datatable.Value("TestCaseDesc", "Position"), "PASS")
Else
Call Execution_log("",Datatable.Value("TestCaseI
D", "Position"), Datatable.Value("TestCaseDesc", "Position"), "FAIL")
End If
Reporter.ReportEvent micDone,"######### END OF TEST CASE - '" &
DataTable("TestCaseID","Position") & "###########","The Test Case Execution Comp
leted"
End If
''Increment the test data table row
strPrevious=Trim(DataTable.Value("TestCaseID","Position"))
''Increment the test data table row
Environment.Value("DATATABLE_ROW") = Environment.Value("DATATABL
E_ROW") + 1
DataTable.GetSheet("Position").SetCurrentRow(Environment.Value("
DATATABLE_ROW"))
strNext=Trim(DataTable.Value("TestCaseID","Position"))
While strPrevious = strNext
Environment.Value("DATATABLE_ROW") = Environment.Value("DATATABL
E_ROW") + 1
DataTable.GetSheet("Position").SetCurrentRow(Environment.Value("
DATATABLE_ROW"))
strNext=Trim(DataTable.Value("TestCaseID","Position"))
Wend
Next
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
'***************************************** TC Driver End *******
************************************************
End Sub