Upload
imaarha
View
220
Download
0
Embed Size (px)
Citation preview
8/7/2019 ADRMF_AdministrationContactCategory
1/17
'=========================================================================================================' Name of the Script : MFAdminContactCategory' Scope of the Script : This test script covers 6
test cases related to MF Administration Contact Category' Author : Satish Dupati' Description : MF Administration Contact
Category' Date and / or Version : 03-12-2008,version 1.0'===========================================================================================================Sub MFAdminContactCategory()
'****Declaration of Environmental VariableEnvironment.Value("Execution_Log")="True"Environment.Value("strSheetName")="ContactCategory"
'''''''''Test case countConst TC_COUNT =6
strVar = Environment("TestDir")strIndVar = Split(strVar,"\",-1,1)strBound = UBound(strIndVar)strAllPath =""
For intCounter = 0 to strBound - 1strAllPath = strAllPath & strIndVar(intCounter)
&"\"Next
strPath = Trim(strPath)strDataPath = strAllPath & "DataTables\"strLibPath = strAllPath & "Function_Library\"
' Including the Library files where all the Scripts are saved'ExecuteFile strLibPath & "CAReportsAgingItemsTC.vbs"
'****Adding CALogin sheet to the dataTable and Importing the Input DataTable
DataTable.AddSheet "MFLogin"DataTable.ImportSheet strDataPath & "Login.xls","MFLogin","MFLog
in"DataTable.AddSheet "ContactCategory"DataTable.ImportSheet strDataPath & "MasterFileAdmin.xls","Conta
ctCategory","ContactCategory"DataTable.AddSheet "HomePageVerification"DataTable.ImportSheet strDataPath & "MasterFileReports.xls","Hom
ePageVerification","HomePageVerification"DataTable.AddSheet "ReportHeader"DataTable.ImportSheet strDataPath & "MasterFileReports.xls","Rep
ortHeader","ReportHeader"'Logs the Scenario name Execution in a .csv fileCall Execution_log(DataTable.Value("Scenario_Name", "Master"), "
", "", "")
'****Invoking IE and navigating to the ADR Login pageDataTable.GetSheet("MFLogin").SetCurrentRow(1)
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin"))
8/7/2019 ADRMF_AdministrationContactCategory
2/17
'****Checking the username, password and login objects in the login page
Call pageCheck_WebEdit("MasterFile","Login Page","username;j_password","")
Call pageCheck_WebButton("MasterFile","Login Page","Login","")
'****Entering username and password and login into the masterfile application
Call login("MasterFile","Login Page","User","MFLogin")Call chkADRHomePage("MasterFile","Depositary Receipt Division's"
,DataTable.Value("HomePageLinks","HomePageVerification"),Environment.Value("NormalUser"))
Environment.Value("DATATABLE_ROW")=1DataTable.GetSheet("ContactCategory").SetCurrentRow(Environment.
Value("DATATABLE_ROW"))
'***************************************** TC Driver Strat *******************************************************
For intTCCount = 1 to TC_COUNT
Environment.Value("Execution_Log") = "True"If DataTable("TestRunFlag","ContactCategory") = "Y" Then
''If run flag is Y in test data tableEnvironment.Value("TestCase_Log")="True"
Reporter.ReportEvent micDone,"######## BEGIN TEST CASE - '" & DataTable("TestCaseID","ContactCategory") & "' ########### ","Execution of Test Case '" & DataTable("TestCaseDesc","ContactCategory") & "' Started"
strFuncName = "MFAdminContactCategory_TC" & intTCCount & "()"''Formation of function name
Execute "Call " & strFuncNameIf Environment.Value("Execution_Log") = "True"
ThenCall Execution_log("",Datatable.
Value("TestCaseID", "ContactCategory"), Datatable.Value("TestCaseDesc", "ContactCategory"), "PASS")
ElseCall Execution_log("",Datatable.
Value("TestCaseID", "ContactCategory"), Datatable.Value("TestCaseDesc", "ContactCategory"), "FAIL")
End IfReporter.ReportEvent micDone,"######### END OF T
EST CASE - '" & DataTable("TestCaseID","ContactCategory") & "###########","The Test Case Execution Completed"
End IfstrPrevious=Trim(DataTable.Value("TestCaseID","ContactCa
tegory"))''Increment the test data table rowEnvironment.Value("DATATABLE_ROW") = Environment.Value("
DATATABLE_ROW") + 1DataTable.GetSheet("ContactCategory").SetCurrentRow(Envi
ronment.Value("DATATABLE_ROW"))strNext=Trim(DataTable.Value("TestCaseID","ContactCatego
ry"))While strPrevious = strNext
Environment.Value("DATATABLE_ROW") = Environment.Value("DATATABLE_ROW") + 1
DataTable.GetSheet("ContactCategory").SetCurrentRow(Environment.Value("DATATABLE_ROW"))
8/7/2019 ADRMF_AdministrationContactCategory
3/17
strNext=Trim(DataTable.Value("TestCaseID","ContactCategory"))
WendNext
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
End Sub'***************************************** TC Driver End *******************************************************
'*******************************************************************************************Test Case 1 to Test Case 6 *******************************************************************************************************************************************Public Function MFAdminContactCategory_TC1()
'Step 3
Call click_WebElement("MasterFile","Depositary Receipt Division's","MasterFile")Call chkMFCAHomePage("MasterFile","MasterFile",DataTable.Value("
MenuName","HomePageVerification"),Environment.Value("NormalUser"))If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 3:Click on Master File","Master File screen is displayed with Welcome Message, Version and the Built Date. "
ElseReporter.ReportEvent micFail,"Step 3:Click on M
aster File","Master File screen is displayed with Welcome Message, Version and the Built Date. "
Call captureScreenshot()Environment.Value("TestCase_Log")="True"
End If
'Step 4,5Call check_Menu("MasterFile","MasterFile",DataTable.Value("MenuP
ath","ContactCategory"))Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","ContactCategory"))Call pageCheck_WebElementinTable("MasterFile","Administration -
Contact","Search By:","ContactCategory:")Call pageCheck_WebEditOR("MasterFile","Administration - Contact","Contac
tCategoryCode;ContactCategory")Call pageCheck_WebElementinTable("MasterFile","Administration -
Contact","Contact Category Search Results;Contact Category;Contact Category Code","ContactCategorySearchResults")
Call pageCheck_Image("MasterFile","Administration - Contact","New;Search;Clear","")
If Environment.Value("TestCase_Log") = "True" ThenReporter.ReportEvent micPass,"Step 4,5:Click on
Administration Link and then Contact Category Link","The Administration Link list contained Contact Category, Administration - Contact Category Search screen displayed with all required fields"
ElseReporter.ReportEvent micFail,"Step 4,5:Click on
Administration Link and then Contact Category Link","The Administration Link list contained Contact Category, Administration - Contact Category Search screendisplayed with all required fields"
Call captureScreenshot()
8/7/2019 ADRMF_AdministrationContactCategory
4/17
Environment.Value("TestCase_Log")="True"End If
'Step 6Call MFAdminContactSearch("MasterFile","Administration - Contact
")Call chkMFAdminContactSearchResult("MasterFile","Administration
- Contact")If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 6:Entering any input value Click Search","Contact Category Search Results table present withthe fields with all Rows related to search value "
ElseReporter.ReportEvent micFail,"Step 6:Entering a
ny input value Click Search","Contact Category Search Results table present withthe fields with all Rows related to search value "
Call captureScreenshot()Environment.Value("TestCase_Log")="True"
End If
Call select_Menu("MasterFile","Administration - Contact","Home;DR Home")End Function'************************************************************************************************************************************************************************************************************************************************************************************************Public Function MFAdminContactCategory_TC2()
'Step 3Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")Call chkMFCAHomePage("MasterFile","MasterFile",DataTable.Value("
MenuName","HomePageVerification"),Environment.Value("NormalUser"))If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 3:Click on Master File","Master File screen is displayed with Welcome Message, Version and the Built Date. "
ElseReporter.ReportEvent micFail,"Step 3:Click on M
aster File","Master File screen is displayed with Welcome Message, Version and the Built Date. "
Call captureScreenshot()Environment.Value("TestCase_Log")="True"
End If
'Step 4,5Call check_Menu("MasterFile","MasterFile",DataTable.Value("MenuP
ath","ContactCategory"))Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","ContactCategory"))Call pageCheck_WebElementinTable("MasterFile","Administration -
Contact","Search By:","ContactCategory:")Call pageCheck_WebEditOR("MasterFile","Administration - Contact"
,"ContactCategoryCode;ContactCategory")Call pageCheck_WebElementinTable("MasterFile","Administration -
Contact","Contact Category Search Results;Contact Category;Contact Category Code","ContactCategorySearchResults")
Call pageCheck_Image("MasterFile","Administration - Contact","New;Search;Clear","")
8/7/2019 ADRMF_AdministrationContactCategory
5/17
If Environment.Value("TestCase_Log") = "True" ThenReporter.ReportEvent micPass,"Step 4,5:Click on
Administration Link and then Contact Category Link","The Administration Link list contained Contact Category, Administration - Contact Category Search screen displayed with all required fields"
ElseReporter.ReportEvent micFail,"Step 4,5:Click on
Master File","Master File screen is displayed with Welcome Message, Version andthe Built Date. "
Call captureScreenshot()Environment.Value("TestCase_Log")="True"
End If
'Step 6Call MFAdminContactSearch("MasterFile","Administration - Contact
")Call chkMFAdminContactSearchResult("MasterFile","Administration
- Contact")If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 6:Entering any input value Click Search","Contact Category Search Results table present withthe fields with all Rows related to search value "
ElseReporter.ReportEvent micFail,"Step 6:Entering a
ny input value Click Search","Contact Category Search Results table present withthe fields with all Rows related to search value "
Call captureScreenshot()Environment.Value("TestCase_Log")="True"
End If
'Step 7If Browser("MasterFile").Page("Administration - Contact").WebTab
le("ContactCategoryResults").RowCount ThenstrVal=Browser("MasterFile").Page("Administratio
n - Contact").WebTable("ContactCategoryResults").GetCellData(1,1)Browser("MasterFile").Page("Administration - Con
tact").webElement("html tag:=TD","index:=0","innertext:="&strVal).clickCall PageCheck_MFAdminContactCategoryDetail("Mas
terFile","Contact Category Detail")If Environment.Value("TestCase_Log") = "True"
ThenReporter.ReportEvent micPass,"St
ep 7:Click any of the search result","Contact Category Opened with all req fields"
ElseReporter.ReportEvent micFail,"S
tep 7:Click any of the search result","Contact Category Opened with all req fields"
Call captureScreenshot()Environment.Value("TestCase_Log
")="True"End If
'Step 8intSubDeptRC=(Browser("MasterFile").Page("Contac
t Category Detail").WebTable("SubdepartmentContact").RowCount)-2Call set_WebEdit_Value("MasterFile","Contact Cat
egory Detail","ContactCategory",DataTable.Value("NewContactCategory","ContactCategory"))
Call select_Combo_Value("MasterFile","Contact Ca
8/7/2019 ADRMF_AdministrationContactCategory
6/17
tegory Detail","BNYCategoryFlag","No")Call click_Image("MasterFile","Contact Category
Detail","SaveProfile")Wait(5)Call fnc_wait(Browser("MasterFile").Page("Contac
t Category Detail").WebTable("Validation Error"))If intSubDeptRC Then
If (Browser("MasterFile").Page("Contact Category Detail").WebTable("Validation Error").RowCount)-4 = Browser("MasterFile").Page("Contact
Category Detail").WebTable("SubdepartmentContact").RowCount ThenReporter.ReportE
vent micPass,"Step 8:Change the Contact Category,BNY Category Flag fields and click save","Validation Error window is present with same number of rows that Sub
Department Contact consists"Else
Reporter.ReportEvent micFail,"Step 8:Change the Contact Category,BNY Category Flag fields and click save","Validation Error window is present with same number of rows that Sub
Department Contact consists"
Call captureScreenshot()Environment.Valu
e("TestCase_Log")="True"Environment.Valu
e("Execution_Log")="False"End If
Call click_Image("MasterFile","Contact Category Detail","ValidationErrorClose")
ElseReporter.ReportEvent micWarning,
"Step 8:Verification of Validation Error window,Sub Department Contact CategoryDetail Records","No records in the table so there is No validation Error"
End If'Step 9
Call select_Combo_Value("MasterFile","Contact Category Detail","BNYCategoryFlag","Yes")
Call click_Image("MasterFile","Contact CategoryDetail","SaveProfile")
Call pageCheck_ImageORNegitive("MasterFile","Contact Category Detail","ValidationErrorImage")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 9:Change the BNY Category Flag to Yes and Click Save","Contact Category which
we changed will be saved."Else
Reporter.ReportEvent micFail,"Step 9:Change the BNY Category Flag to Yes and Click Save","Contact Category which we changed will be saved."
Call captureScreenshot()Environment.Value("TestCase_Log
")="True"End If
Call select_Menu("MasterFile","Contact CategoryDetail","Home;DR Home")
End IfEnd Function'*******************************************************************************
8/7/2019 ADRMF_AdministrationContactCategory
7/17
*****************************************************************************************************************************************************************************************************************Public Function MFAdminContactCategory_TC3()
'Step 3Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")Call chkMFCAHomePage("MasterFile","MasterFile",DataTable.Value("
MenuName","HomePageVerification"),Environment.Value("NormalUser"))If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 3:Click on Master File","Master File screen is displayed with Welcome Message, Version and the Built Date. "
ElseReporter.ReportEvent micFail,"Step 3:Click on M
aster File","Master File screen is displayed with Welcome Message, Version and the Built Date. "
Call captureScreenshot()
Environment.Value("TestCase_Log")="True"End If
'Step 4,5Call check_Menu("MasterFile","MasterFile",DataTable.Value("MenuP
ath","ContactCategory"))Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","ContactCategory"))Call pageCheck_WebElementinTable("MasterFile","Administration -
Contact","Search By:","ContactCategory:")Call pageCheck_WebEditOR("MasterFile","Administration - Contact"
,"ContactCategoryCode;ContactCategory")Call pageCheck_WebElementinTable("MasterFile","Administration -
Contact","Contact Category Search Results;Contact Category;Contact Category Code","ContactCategorySearchResults")
Call pageCheck_Image("MasterFile","Administration - Contact","New;Search;Clear","")
If Environment.Value("TestCase_Log") = "True" ThenReporter.ReportEvent micPass,"Step 4,5:Click on
Administration Link and then Contact Category Link","The Administration Link list contained Contact Category, Administration - Contact Category Search screen displayed with all required fields"
ElseReporter.ReportEvent micFail,"Step 4,5:Click on
Administration Link and then Contact Category Link","The Administration Link list contained Contact Category, Administration - Contact Category Search screendisplayed with all required fields"
Call captureScreenshot()Environment.Value("TestCase_Log")="True"
End If
'Step 6Call MFAdminContactSearch("MasterFile","Administration - Contact
")Call chkMFAdminContactSearchResult("MasterFile","Administration
- Contact")If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 6:Entering any input value Click Search","Contact Category Search Results table present withthe fields with all Rows related to search value "
Else
8/7/2019 ADRMF_AdministrationContactCategory
8/17
Reporter.ReportEvent micFail,"Step 6:Entering any input value Click Search","Contact Category Search Results table present with
the fields with all Rows related to search value "Call captureScreenshot()
Environment.Value("TestCase_Log")="True"End If
'Step 7If Browser("MasterFile").Page("Administration - Contact").WebTab
le("ContactCategoryResults").RowCount ThenstrVal=Browser("MasterFile").Page("Administratio
n - Contact").WebTable("ContactCategoryResults").GetCellData(1,1)Browser("MasterFile").Page("Administration - Con
tact").webElement("html tag:=TD","index:=0","innertext:="&strVal).clickCall PageCheck_MFAdminContactCategoryDetail("Mas
terFile","Contact Category Detail")If Environment.Value("TestCase_Log") = "True" T
henReporter.ReportEvent micPass,"St
ep 7:Click any of the search result","Contact Category Opened with all req fields"Else
Reporter.ReportEvent micFail,"Step 7:Click any of the search result","Contact Category Opened with all req fields"
Call captureScreenshot()Environment.Value("TestCase_Log
")="True"End IfstrRowCountBefore=Browser("MasterFile").Page("Co
ntact Category Detail").WebTable("SubdepartmentContact").RowCount
'Step 8Call click_webButton("MasterFile","Contact Categ
ory Detail","Add")strRowCountAfter=Browser("MasterFile").Page("Co
ntact Category Detail").WebTable("SubdepartmentContact").RowCountIf strRowCountBefore < strRowCountAfter Then
Reporter.ReportEvent micPass,"Step 8:Verification of new row addition in Sub Dept Cotact Records","New row is added "
ElseReporter.ReportEvent micFail,"S
tep 8:Verification of new row addition in Sub Dept Cotact Records","New row is NOT added "
Call captureScreenshot()Environment.Value("Execution_Log
")="False"End If
'Step 9Browser("MasterFile").Page("Contact Category Det
ail").WebTable("SubdepartmentContact").ChildItem(strRowCountAfter,1,"WebList",0).Select DataTable.Value("NewDepartment","ContactCategory")
Browser("MasterFile").Page("Contact Category Detail").WebTable("SubdepartmentContact").ChildItem(strRowCountAfter,2,"Image",0).click
If Browser("MasterFile").Page("Contact CategoryDetail").Frame("SubDepartmentFrame").WebTable("Subdepartment").RowCount > 1 Then
strSubDeptval=Browser("MasterFil
8/7/2019 ADRMF_AdministrationContactCategory
9/17
e").Page("Contact Category Detail").Frame("SubDepartmentFrame").WebTable("Subdepartment").GetCellData(2,1)
Browser("MasterFile").Page("Contact Category Detail").Frame("SubDepartmentFrame").webElement("html tag:=TD","innertext:="&strSubDeptval).click
If Browser("MasterFile").Page("Contact Category Detail").WebTable("SubdepartmentContact").ChildItem(strRowCountAfter,3,"WebEdit",0).getRoProperty("value")"" And Browser("MasterFile").Page("Contact Category Detail").WebTable("SubdepartmentContact").ChildItem(strRowCountAfter,4,"WebEdit",0).getRoProperty("value")"" Then
Reporter.ReportEvent micPass,"Step 9:Verification for auto updation of Position And Location Values","Position and Location values are Auto Updated"
ElseReporter.Report
Event micFail,"Step 9:Verification for auto updation of Position And Location Values","Position and Location values are Not Auto Updated"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"End If
'Step 10Call click_Image("MasterFile","C
ontact Category Detail","SaveProfile")If Browser("MasterFile").Page("C
ontact Category Detail").WebTable("Validation Error").Exist ThenCall click_Image
("MasterFile","Contact Category Detail","ValidationErrorClose")Call pageCheck_I
mageORNegitive("MasterFile","Contact Category Detail","ValidationErrorImage")End IfIf Environment.Value("TestCase_
Log") = "True" ThenReporter.ReportE
vent micPass,"Step 10:Click Save","The row should be saved and it should be sorted with first alphabet."
ElseReporter.Report
Event micFail,"Step 10:Click Save","The row should be saved and it should be sorted with first alphabet."
Call captureScreenshot()
Environment.Value("TestCase_Log")="True"
End If
'Step 11Browser("MasterFile").Page("Cont
act Category Detail").WebTable("SubdepartmentContact").ChildItem(strRowCountAfter,6,"Image",0).click
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist Then
Reporter.ReportEvent micPass,"Step 11:Verification for A Microsoft Pop-up stating 'Are u sure want to delete this record'","Microsoft popup is appeared"
'Step 12Browser("MasterF
ile").Dialog("Microsoft Internet Explorer").WinButton("OK").Click
8/7/2019 ADRMF_AdministrationContactCategory
10/17
If Browser("MasterFile").Page("Contact Category Detail").WebTable("SubdepartmentContact").RowCount < strRowCountAfter Then
Reporter.ReportEvent micPass,"Step 12:Verification for Deletion of Added New Row","New Row is Deleted"
Else
Reporter.ReportEvent micFail,"Step 12:Verification for A Microsoft Pop-up stating 'Are u sure want to delete this record'","Popup not appeared"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"End If
ElseReporter.ReportE
vent micFail,"Step 11:Verification for A Microsoft Pop-up stating 'Are u sure want to delete this record'","Popup not appeared"
Call captureScreenshot()Environment.Valu
e("Execution_Log")="False"End If
End IfCall select_Menu("MasterFile","Contact Category
Detail",DataTable.Value("MenuPath","ContactCategory"))End IfCall select_Menu("MasterFile","Administration - Contact","Home;D
R Home")
End Function'************************************************************************************************************************************************************************************************************************************************************************************************Public Function MFAdminContactCategory_TC4()
'Step 3Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")Call chkMFCAHomePage("MasterFile","MasterFile",DataTable.Value("
MenuName","HomePageVerification"),Environment.Value("NormalUser"))If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 3:Click on Master File","Master File screen is displayed with Welcome Message, Version and the Built Date. "
ElseReporter.ReportEvent micFail,"Step 3:Click on M
aster File","Master File screen is displayed with Welcome Message, Version and the Built Date. "
Call captureScreenshot()Environment.Value("TestCase_Log")="True"
End If
'Step 4,5Call check_Menu("MasterFile","MasterFile",DataTable.Value("MenuP
ath","ContactCategory"))Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","ContactCategory"))
8/7/2019 ADRMF_AdministrationContactCategory
11/17
Call pageCheck_WebElementinTable("MasterFile","Administration -Contact","Search By:","ContactCategory:")
Call pageCheck_WebEditOR("MasterFile","Administration - Contact","ContactCategoryCode;ContactCategory")
Call pageCheck_WebElementinTable("MasterFile","Administration -Contact","Contact Category Search Results;Contact Category;Contact Category Code","ContactCategorySearchResults")
Call pageCheck_Image("MasterFile","Administration - Contact","New;Search;Clear","")
If Environment.Value("TestCase_Log") = "True" ThenReporter.ReportEvent micPass,"Step 4,5:Click on
Administration Link and then Contact Category Link","The Administration Link list contained Contact Category, Administration - Contact Category Search screen displayed with all required fields"
ElseReporter.ReportEvent micFail,"Step 4,5:Click on
Administration Link and then Contact Category Link","The Administration Link list contained Contact Category, Administration - Contact Category Search screendisplayed with all required fields"
Call captureScreenshot()Environment.Value("TestCase_Log")="True"End If
'Step 6Call click_Image("MasterFile","Administration - Contact","New")Call pageCheck_WebElementinTable("MasterFile","Contact Category
Detail","New Contact Category","NewContactCategory")Call pageCheck_WebElementinTable("MasterFile","Contact Category
Detail","Contact Category Detail","ContactCategoryDetail")Call pageCheck_webEditOR("MasterFile","Contact Category Detail",
"ContactCategory;ContactCategoryCode")Call pageCheck_webListOR("MasterFile","Contact Category Detail",
"BNYCategoryFlag")Call pageCheck_WebElementinTable("MasterFile","Contact Category
Detail","Subdepartment Contact Category Detail;Department;Subdepartment;Position;Location","SubdepartmentContact")
Call pageCheck_webButton("MasterFile","Contact Category Detail","Add","")
If Environment.Value("TestCase_Log") = "True" ThenReporter.ReportEvent micPass,"Step 6:Click New",
"Contact Category Detail screen displayed "Else
Reporter.ReportEvent micFail,"Step 6:Click New","Contact Category Detail screen displayed "
Call captureScreenshot()Environment.Value("TestCase_Log")="True"
End If
'Step 7Call click_Image("MasterFile","Contact Category Detail","SavePro
file")Call ValidationErrorDetails_AllDetails("MasterFile","Contact Cat
egory Detail","Validation Error","Contact Category Code;Contact Category;BNY Category Flag","Field is required.","SubdeptContactCat")
If Environment.Value("TestCase_Log") = "True" ThenReporter.ReportEvent micPass,"Step 7:Without ent
ering any values click Save","Validation Error window displayed with all the fields "
ElseReporter.ReportEvent micFail,"Step 7:Without en
8/7/2019 ADRMF_AdministrationContactCategory
12/17
tering any values click Save","Validation Error window displayed with all the fields "
Call captureScreenshot()Environment.Value("TestCase_Log")="True"
End If
'Step 8Call click_Image("MasterFile","Contact Category Detail","Validat
ionErrorClose")If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 8:Close the Window ","Window should be closed"
ElseReporter.ReportEvent micFail,"Step 8:Close the
Window ","Window should be closed"Call captureScreenshot()
Environment.Value("TestCase_Log")="True"End If
'Step 9Call set_webEdit_Value("MasterFile","Contact Category Detail","ContactCategory",Datatable.Value("NewContactCategory","ContactCategory"))
strOldGenNum= Datatable.Value("NewContactCategoryCode","ContactCategory")
strNewGenNum = "ACD"&Chr(Asc(Mid(strOldGenNum,4))+1)Datatable.Value("NewContactCategoryCode","ContactCategory") = st
rNewGenNum
strVar = Environment("TestDir")strIndVar = Split(strVar,"\",-1,1)strBound = UBound(strIndVar)strAllPaths = ""
For intCounter = 0 to strBound - 1
strAllPaths = strAllPaths & strIndVar(intCounter) &"\"
Next
strAllPaths = Trim(strAllPaths)strDataPath1 = strAllPaths & "DataTables\"
DataTable.ExportSheet strDataPath1 & "MasterFileAdmin.xls","ContactCategory"
Call set_webEdit_Value("MasterFile","Contact Category Detail","C
ontactCategoryCode",Datatable.Value("NewContactCategoryCode","ContactCategory"))Call select_Combo_Value("MasterFile","Contact Category Detail","
BNYCategoryFlag",Datatable.Value("BNYCategoryFlag","ContactCategory"))Call click_Image("MasterFile","Contact Category Detail","SavePro
file")Call pageCheck_ImageORNegitive("MasterFile","Contact Category De
tail","ValidationErrorImage")If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 9: Fill the information for Contact Category, Contact Category Code, BNY Category Flag","Details should be saved."
ElseReporter.ReportEvent micFail,"Step 9: Fill the
information for Contact Category, Contact Category Code, BNY Category Flag","Details should be saved."
Call captureScreenshot()
8/7/2019 ADRMF_AdministrationContactCategory
13/17
Environment.Value("TestCase_Log")="True"End If
Call select_Menu("MasterFile","Contact Category Detail","Home;DRHome")
End Function'************************************************************************************************************************************************************************************************************************************************************************************************Public Function MFAdminContactCategory_TC5()
'Step 3Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")Call chkMFCAHomePage("MasterFile","MasterFile",DataTable.Value("
MenuName","HomePageVerification"),Environment.Value("NormalUser"))If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 3:Click on Master File","Master File screen is displayed with Welcome Message, Version and the Built Date. "
ElseReporter.ReportEvent micFail,"Step 3:Click on M
aster File","Master File screen is displayed with Welcome Message, Version and the Built Date. "
Call captureScreenshot()Environment.Value("TestCase_Log")="True"
End If
'Step 4,5Call check_Menu("MasterFile","MasterFile",DataTable.Value("MenuP
ath","ContactCategory"))Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","ContactCategory"))Call pageCheck_WebElementinTable("MasterFile","Administration -
Contact","Search By:","ContactCategory:")Call pageCheck_WebEditOR("MasterFile","Administration - Contact"
,"ContactCategoryCode;ContactCategory")Call pageCheck_WebElementinTable("MasterFile","Administration -
Contact","Contact Category Search Results;Contact Category;Contact Category Code","ContactCategorySearchResults")
Call pageCheck_Image("MasterFile","Administration - Contact","New;Search;Clear","")
If Environment.Value("TestCase_Log") = "True" ThenReporter.ReportEvent micPass,"Step 4,5:Click on
Administration Link and then Contact Category Link","The Administration Link list contained Contact Category, Administration - Contact Category Search screen displayed with all required fields"
ElseReporter.ReportEvent micFail,"Step 4,5:Click on
Administration Link and then Contact Category Link","The Administration Link list contained Contact Category, Administration - Contact Category Search screendisplayed with all required fields"
Call captureScreenshot()Environment.Value("TestCase_Log")="True"
End If
'Step 6Call click_Image("MasterFile","Administration - Contact","New")
8/7/2019 ADRMF_AdministrationContactCategory
14/17
Call pageCheck_WebElementinTable("MasterFile","Contact CategoryDetail","New Contact Category","NewContactCategory")
Call pageCheck_WebElementinTable("MasterFile","Contact CategoryDetail","Contact Category Detail","ContactCategoryDetail")
Call pageCheck_webEditOR("MasterFile","Contact Category Detail","ContactCategory;ContactCategoryCode")
Call pageCheck_webListOR("MasterFile","Contact Category Detail","BNYCategoryFlag")
Call pageCheck_WebElementinTable("MasterFile","Contact CategoryDetail","Subdepartment Contact Category Detail;Department;Subdepartment;Position;Location","SubdepartmentContact")
Call pageCheck_webButton("MasterFile","Contact Category Detail","Add","")
If Environment.Value("TestCase_Log") = "True" ThenReporter.ReportEvent micPass,"Step 6:Click New",
"Contact Category Detail screen displayed "Else
Reporter.ReportEvent micFail,"Step 6:Click New","Contact Category Detail screen displayed "
Call captureScreenshot()Environment.Value("TestCase_Log")="True"End If
'Step 7Call click_Image("MasterFile","Contact Category Detail","SavePro
file")Call ValidationErrorDetails_AllDetails("MasterFile","Contact Cat
egory Detail","Validation Error","Contact Category Code;Contact Category;BNY Category Flag","Field is required.","SubdeptContactCat")
If Environment.Value("TestCase_Log") = "True" ThenReporter.ReportEvent micPass,"Step 7:Without ent
ering any values click Save","Validation Error window displayed with all the fields "
ElseReporter.ReportEvent micFail,"Step 7:Without en
tering any values click Save","Validation Error window displayed with all the fields "
Call captureScreenshot()Environment.Value("TestCase_Log")="True"
End If
'Step 8Call click_Image("MasterFile","Contact Category Detail","Validat
ionErrorClose")If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 8:Close the Window ","Window should be closed"
ElseReporter.ReportEvent micFail,"Step 8:Close the
Window ","Window should be closed"Call captureScreenshot()
Environment.Value("TestCase_Log")="True"End If
'Step 9Call set_webEdit_Value("MasterFile","Contact Category Detail","C
ontactCategory",Datatable.Value("NewContactCategory","ContactCategory"))Call set_webEdit_Value("MasterFile","Contact Category Detail","C
ontactCategoryCode",Datatable.Value("NewContactCategoryCode","ContactCategory"))Call select_Combo_Value("MasterFile","Contact Category Detail","
8/7/2019 ADRMF_AdministrationContactCategory
15/17
BNYCategoryFlag",Datatable.Value("BNYCategoryFlag","ContactCategory"))Call click_Image("MasterFile","Contact Category Detail","SavePro
file")Call pageCheck_ImageORNegitive("MasterFile","Contact Category De
tail","ValidationErrorImage")If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 9: Fill the information for Contact Category, Contact Category Code, BNY Category Flag","Details should be saved."
ElseReporter.ReportEvent micFail,"Step 9: Fill the
information for Contact Category, Contact Category Code, BNY Category Flag","Details should be saved."
Call captureScreenshot()Environment.Value("TestCase_Log")="True"
End If
'Step 10Call click_Image("MasterFile","Contact Category Detail","DeleteP
rofile") If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist Then
Reporter.ReportEvent micPass,"Step 10:After click on Delete profile,Verification for A Microsoft Pop-up stating 'Are u sure want
to delete the Profile'","Microsoft popup is appeared"'Step 11,12Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("OK").ClickCall pageCheck_WebElementinTable("MasterFile","Administration -
Contact","Search By:","ContactCategory:")Call MFAdminContactSearch("MasterFile","Administ
ration - Contact")If Browser("MasterFile").Page("Administration -
Contact").WebTable("ContactCategoryResults").RowCount ThenReporter.ReportEvent micFail,"St
ep 11,12:After click on Ok on pop up,Verification for Deletion of Added New Profile","New Profile is Not Deleted"
Call captureScreenshot()Environment.Value("Execution_Log
")="False"Else
Reporter.ReportEvent micPass,"Step 11,12:After click on Ok on pop upVerification for Deletion of Added New Profile","New Profile is Deleted,Zero Results after Search"
End IfElse
Reporter.ReportEvent micFail,"Step 10:Verification for A Microsoft Pop-up stating 'Are u sure want to delete the Profile'","Popup not appeared"
Call captureScreenshot()Environment.Value("Execution_Log")="False"
End IfCall select_Menu("MasterFile","Administration - Contact","Home;D
R Home")
End Function'************************************************************************************************************************************************************************************************************************************************************************************************
8/7/2019 ADRMF_AdministrationContactCategory
16/17
Public Function MFAdminContactCategory_TC6()
'Step 3Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")Call chkMFCAHomePage("MasterFile","MasterFile",DataTable.Value("
MenuName","HomePageVerification"),Environment.Value("NormalUser"))If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 3:Click on Master File","Master File screen is displayed with Welcome Message, Version and the Built Date. "
ElseReporter.ReportEvent micFail,"Step 3:Click on M
aster File","Master File screen is displayed with Welcome Message, Version and the Built Date. "
Call captureScreenshot()Environment.Value("TestCase_Log")="True"
End If
'Step 4,5Call check_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","ContactCategory"))
Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","ContactCategory"))
Call pageCheck_WebElementinTable("MasterFile","Administration -Contact","Search By:","ContactCategory:")
Call pageCheck_WebEditOR("MasterFile","Administration - Contact","ContactCategoryCode;ContactCategory")
Call pageCheck_WebElementinTable("MasterFile","Administration -Contact","Contact Category Search Results;Contact Category;Contact Category Code","ContactCategorySearchResults")
Call pageCheck_Image("MasterFile","Administration - Contact","New;Search;Clear","")
If Environment.Value("TestCase_Log") = "True" ThenReporter.ReportEvent micPass,"Step 4,5:Click on
Administration Link and then Contact Category Link","The Administration Link list contained Contact Category, Administration - Contact Category Search screen displayed with all required fields"
ElseReporter.ReportEvent micFail,"Step 4,5:Click on
Administration Link and then Contact Category Link","The Administration Link list contained Contact Category, Administration - Contact Category Search screendisplayed with all required fields"
Call captureScreenshot()Environment.Value("TestCase_Log")="True"
End If
'Step 6Call MFAdminContactSearch("MasterFile","Administration - Contact
")Call chkMFAdminContactSearchResult("MasterFile","Administration
- Contact")If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 6:Entering any input value Click Search","Contact Category Search Results table present withthe fields with all Rows related to search value "
ElseReporter.ReportEvent micFail,"Step 6:Entering a
ny input value Click Search","Contact Category Search Results table present withthe fields with all Rows related to search value "
8/7/2019 ADRMF_AdministrationContactCategory
17/17
Call captureScreenshot()Environment.Value("TestCase_Log")="True"
End If
'Step 7If Browser("MasterFile").Page("Administration - Contact").WebTab
le("ContactCategoryResults").RowCount ThenstrVal=Browser("MasterFile").Page("Administratio
n - Contact").WebTable("ContactCategoryResults").GetCellData(1,1)Browser("MasterFile").Page("Administration - Con
tact").webElement("html tag:=TD","index:=0","innertext:="&strVal).clickCall PageCheck_MFAdminContactCategoryDetail("Mas
terFile","Contact Category Detail")If Environment.Value("TestCase_Log") = "True"
ThenReporter.ReportEvent micPass,"St
ep 7:Click any of the search result","Contact Category Opened with all req fields"
Else
Reporter.ReportEvent micFail,"Step 7:Click any of the search result","Contact Category Opened with all req fields"
Call captureScreenshot()Environment.Value("TestCase_Log
")="True"End If
'Step 8Call click_Image("MasterFile","Contact Category
Detail","RelatedProfiles")If Browser("MasterFile").Page("Contact Category
Detail").Frame("SubDepartmentFrame").Exist ThenReporter.ReportEvent micPass,"St
ep 8:Verification for Realated Profile Frame after click on Related Profile Button","Related Profile Frame is Appearing"
ElseReporter.ReportEvent micFail,"St
ep 8:Verification for Realated Profile Frame after click on Related Profile Button","Related Profile Frame is Not Appearing"
Call captureScreenshot()Environment.Value("Execution_Log
")="False"End If
End IfCall select_Menu("MasterFile","Contact Category Detail","Home;DR
Home")End Function'************************************************************************************************************************************************************************************************************************************************************************************************