You are on page 1of 200

'===============================================================================

==========================
' Name of the Script : DR Life Cycle
' Scope of the Script : This test script covers 29 te
st cases related to the DRLifeCycle
' Author : Shyam H D
' Description : DR Life Cycle
' Date and / or Version : 05-01-2009,version 1.0
'===============================================================================
============================
'Sub DRLifeCycle()
Public Function DRLifeCycle()
'****Declaration of Environmental Variable
Environment.Value("Execution_Log") = "True"
Environment.Value("TestCase_Log") = "True"
Environment.Value("AppURL") = "https://160.254.95.16:9123/adr/lo
gin.page"
'''''''''Test case count
Const TC_COUNT = 29
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\"
strLibPath = strAllPath & "Function_Library\"
'****Adding MFLogin sheet to the dataTable and Importing the Input DataT
able
DataTable.AddSheet "MFLogin"
DataTable.ImportSheet strDataPath & "Login.xls","MFLogin","MFLog
in"
DataTable.AddSheet "DRLifeCycle"
DataTable.ImportSheet strDataPath & "DRLifeCycle.xls","DRLifeCyc
le","DRLifeCycle"
DataTable.AddSheet "ReportHeader"
DataTable.ImportSheet strDataPath & "MasterFileProfile.xls","Rep
ortHeader","ReportHeader"
DataTable.AddSheet "HomePageVerification"
DataTable.ImportSheet strDataPath & "MasterFileProfile.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_pa
ssword","")
'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("DRLifeCycle").SetCurrentRow(Environment.Valu
e("DATATABLE_ROW"))
'***************************************** TC Driver Strat *****
**************************************************
For intTCCount = 1 to TC_COUNT
Environment.Value("Execution_Log") = "True"
If DataTable("TestRunFlag","DRLifeCycle")="Y" Then
''If run flag is Y in test data table
Reporter.ReportEvent micDone,"######## BEGIN TES
T CASE - '" & DataTable("TestCaseID","DRLifeCycle") & "' ########### ","Executio
n of Test Case '" & DataTable("TestCaseDesc","DRLifeCycle") & "' Started"
strFuncName = "DRLifeCycle_TC" & intTCCount & "(
)" ''Formation of function name
'MsgBox strFuncName
''Call Function
Execute "Call " & strFuncName
If Environment.Value("Execution_Log") = "True"
Then
Call Execution_log("",Datatable.
Value("TestCaseID", "DRLifeCycle"), Datatable.Value("TestCaseDesc", "DRLifeCycle
"), "PASS")
Else
Call Execution_log("",Datatable.
Value("TestCaseID", "DRLifeCycle"), Datatable.Value("TestCaseDesc", "DRLifeCycle
"), "FAIL")
End If
Reporter.ReportEvent micDone,"######### END OF T
EST CASE - '" & DataTable("TestCaseID","DRLifeCycle") & "###########","The Test
Case Execution Completed"
End If

strPrevious=Trim(DataTable.Value("TestCaseID","DRLifeCyc
le"))
''Increment the test data table row
Environment.Value("DATATABLE_ROW") = Environment.Value("
DATATABLE_ROW") + 1
DataTable.GetSheet("DRLifeCycle").SetCurrentRow(Environm
ent.Value("DATATABLE_ROW"))
strNext=Trim(DataTable.Value("TestCaseID","DRLifeCycle")
)
While strPrevious = strNext
Environment.Value("DATATABLE_ROW") = Environment
.Value("DATATABLE_ROW") + 1
DataTable.GetSheet("DRLifeCycle").SetCurrentRow(
Environment.Value("DATATABLE_ROW"))
strNext=Trim(DataTable.Value("TestCaseID","DRLif
eCycle"))
Wend
Next
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
'***************************************** TC Driver End *******
************************************************
End Function
'End Sub
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++
Public Function DRLifeCycle_TC1()
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" Then
Call CreateBifurcatedDR("MasterFile","Profile - DR Searc
h","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Search","DR
Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR for Perfor
ming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType","DR
LifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR for Per
forming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType",
"DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Login to the Application and Performing the DR Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call UpdateDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to Step 42: Verifyi
ng if the DR is Upgraded successfully","The DR " & DataTable.Value("DRName","DRL
ifeCycle") & " is successfully Changed to Level " & DataTable.Value("UpgradeLeve
l","DRLifeCycle")
Else
Reporter.ReportEvent micFail,"Step 1 to Step 42: Verifyi
ng if the DR is Upgraded successfully","The DR " & DataTable.Value("DRName","DRL
ifeCycle") & " is NOT successfully Changed to Level " & DataTable.Value("Upgrade
Level","DRLifeCycle")
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Loging with Approval ID and Approve the Changes made to the DR
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","Approver","MFLogin")
' Approving the Changes while Performing DR Life Cycle
Call DRApprovalFunction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 43 to 61: Approving t
he Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micFail,"Step 43 to 61: Approving t
he Changes made to the DR","The Changes made are NOT Approved Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Log out and Login with Normal User ID
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
' Logging in with Normal User ID and verfiy if all the changes m
ade are Approved and there are No Flags displayed
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call chkApprovedDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 62 to 74: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are Approved and the Flags are Not Present"
Else
Reporter.ReportEvent micFail,"Verfiying if the Modifed F
ields are Approved and check for the Flags","The Modifeid Fields are NOT Approve
d and the Flags are Present"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++
' Create a DR of Level I of BNY Depository and Sponsored DR
'======== Upgrade from Level I to Level III
Public Function DRLifeCycle_TC2()
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" Then
Call CreateBifurcatedDR("MasterFile","Profile - DR Searc
h","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Search","DR
Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR for Perfor
ming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType","DR
LifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR for Per
forming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType",
"DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Login to the Application and Performing the DR Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call UpdateDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 42: Verifying if
the DR is Upgraded successfully","The DR " & DataTable.Value("DRName","DRLifeCy
cle") & " is successfully Changed to Level " & DataTable.Value("UpgradeLevel","D
RLifeCycle")
Else
Reporter.ReportEvent micFail,"Step 1 to 42: Verifying if
the DR is Upgraded successfully","The DR " & DataTable.Value("DRName","DRLifeCy
cle") & " is NOT successfully Changed to Level " & DataTable.Value("UpgradeLevel
","DRLifeCycle")
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Loging with Approval ID and Approve the Changes made to the DR
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","Approver","MFLogin")
' Approving the Changes while Performing DR Life Cycle
Call DRApprovalFunction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 43 to 61: Approving t
he Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micFail,"Step 43 to 61: Approving t
he Changes made to the DR","The Changes made are NOT Approved Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Log out and Login with Normal User ID
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
' Logging in with Normal User ID and verfiy if all the changes m
ade are Approved and there are No Flags displayed
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call chkApprovedDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 62 to 74: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are Approved and the Flags are Not Present"
Else
Reporter.ReportEvent micFail,"Step 62 to 74: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are NOT Approved and the Flags are Present"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++
' Create a DR of Reg.S Type of Sponsored DR
'================ PPC DR from Reg.S to Level I
Public Function DRLifeCycle_TC3()
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" Then
Call CreateBifurcatedDR("MasterFile","Profile - DR Searc
h","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Search","DR
Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR for Perfor
ming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType","DR
LifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR for Per
forming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType",
"DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Login to the Application and Performing the DR Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call UpdateDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 20: Verifying if
the DR is PPC successfully","The DR " & DataTable.Value("DRName","DRLifeCycle")
& " is successfully Changed to Level " & DataTable.Value("UpgradeLevel","DRLife
Cycle")
Else
Reporter.ReportEvent micFail,"Step 1 to 20: Verifying if
the DR is PPC successfully","The DR " & DataTable.Value("DRName","DRLifeCycle")
& " is NOT successfully Changed to Level " & DataTable.Value("UpgradeLevel","DR
LifeCycle")
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Loging with Approval ID and Approve the Changes made to the DR
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","Approver","MFLogin")
' Approving the Changes while Performing DR Life Cycle
Call DRApprovalFunction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 21 to 34: Approving t
he Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micFail,"Step 21 to 34 :Approving t
he Changes made to the DR","The Changes made are NOT Approved Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Log out and Login with Normal User ID
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
' Logging in with Normal User ID and verfiy if all the changes m
ade are Approved and there are No Flags displayed
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call chkApprovedDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 35 to 46: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are Approved and the Flags are Not Present"
Else
Reporter.ReportEvent micFail,"Step 35 to 46: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are NOT Approved and the Flags are Present"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++
' Create a DR of 144A Type of Sponsored DR
'================ PPC DR from Reg.S to Level II
Public Function DRLifeCycle_TC4()
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" Then
Call CreateBifurcatedDR("MasterFile","Profile - DR Searc
h","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Search","DR
Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR for Perfor
ming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType","DR
LifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR for Per
forming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType",
"DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Login to the Application and Performing the DR Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call UpdateDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 42: Verifying if
the DR is PPC successfully","The DR " & DataTable.Value("DRName","DRLifeCycle")
& " is successfully Changed to Level " & DataTable.Value("UpgradeLevel","DRLife
Cycle")
Else
Reporter.ReportEvent micFail,"Step 1 to 42: Verifying if
the DR is PPC successfully","The DR " & DataTable.Value("DRName","DRLifeCycle")
& " is NOT successfully Changed to Level " & DataTable.Value("UpgradeLevel","DR
LifeCycle")
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Loging with Approval ID and Approve the Changes made to the DR
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","Approver","MFLogin")
' Approving the Changes while Performing DR Life Cycle
Call DRApprovalFunction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 43 to 66: Approving t
he Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micFail,"Step 43 to 66: Approving t
he Changes made to the DR","The Changes made are NOT Approved Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Log out and Login with Normal User ID
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
' Logging in with Normal User ID and verfiy if all the changes m
ade are Approved and there are No Flags displayed
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call chkApprovedDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 67 to 78: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are Approved and the Flags are Not Present"
Else
Reporter.ReportEvent micFail,"Step 67 to 78: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are NOT Approved and the Flags are Present"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++
' Create a Bifurcated DR: Reg.S Sponsored DR
' =================== PPC Bifurcated DR to Level III
Public Function DRLifeCycle_TC5()
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" Then
Call CreateBifurcatedDR("MasterFile","Profile - DR Searc
h","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Search","DR
Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR for Perfor
ming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType","DR
LifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR for Per
forming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType",
"DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Login to the Application and Performing the DR Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call UpdateDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 20: Verifying if
the DR is PPC successfully","The DR " & DataTable.Value("DRName","DRLifeCycle")
& " is successfully Changed to Level " & DataTable.Value("UpgradeLevel","DRLife
Cycle")
Else
Reporter.ReportEvent micFail,"Step 1 to 20: Verifying if
the DR is PPC successfully","The DR " & DataTable.Value("DRName","DRLifeCycle")
& " is NOT successfully Changed to Level " & DataTable.Value("UpgradeLevel","DR
LifeCycle")
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Loging with Approval ID and Approve the Changes made to the DR
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","Approver","MFLogin")
' Approving the Changes while Performing DR Life Cycle
Call DRApprovalFunction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 21 to 34: Approving t
he Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micPass,"Step 21 to 34: Approving t
he Changes made to the DR","The Changes made are NOT Approved Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Log out and Login with Normal User ID
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
' Logging in with Normal User ID and verfiy if all the changes m
ade are Approved and there are No Flags displayed
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call chkApprovedDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 35 to 49: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are Approved and the Flags are Not Present"
Else
Reporter.ReportEvent micFail,"Step 35 to 49: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are NOT Approved and the Flags are Present"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++
' Need some Information from Manual Team
' Create a Level III DR of Sponsored Type
' ============== Delisting from Level III to Level I
Public Function DRLifeCycle_TC6()
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" Then
Call CreateBifurcatedDR("MasterFile","Profile - DR Searc
h","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Search","DR
Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR for Perfor
ming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType","DR
LifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR for Per
forming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType",
"DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Login to the Application and Performing the DR Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call UpdateDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 32Verifying if t
he DR is Delisting successfully","The DR " & DataTable.Value("DRName","DRLifeCyc
le") & " is successfully Changed to Level " & DataTable.Value("UpgradeLevel","DR
LifeCycle")
Else
Reporter.ReportEvent micFail,"Step 1 to 32: Verifying if
the DR is Delisting successfully","The DR " & DataTable.Value("DRName","DRLifeC
ycle") & " is NOT successfully Changed to Level " & DataTable.Value("UpgradeLeve
l","DRLifeCycle")
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Loging with Approval ID and Approve the Changes made to the DR
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","Approver","MFLogin")
' Approving the Changes while Performing DR Life Cycle
Call DRApprovalFunction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 33 to 51: Approving t
he Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micFail,"Step 33 to 51: Approving t
he Changes made to the DR","The Changes made are NOT Approved Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Log out and Login with Normal User ID
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
' Logging in with Normal User ID and verfiy if all the changes m
ade are Approved and there are No Flags displayed
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call chkApprovedDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 52 to 64: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are Approved and the Flags are Not Present"
Else
Reporter.ReportEvent micFail,"Step 52 to 64: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are NOT Approved and the Flags are Present"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++
' Create a Level IIIDR of Sponsored Type
' ============== Delisting from Level II to Level I
Public Function DRLifeCycle_TC7()
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" Then
Call CreateBifurcatedDR("MasterFile","Profile - DR Searc
h","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Search","DR
Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR for Perfor
ming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType","DR
LifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR for Per
forming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType",
"DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Login to the Application and Performing the DR Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call UpdateDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 41: Veri
fying if the DR is Delisted successfully","The DR " & DataTable.Value("DRName","
DRLifeCycle") & " is successfully Changed to Level " & DataTable.Value("UpgradeL
evel","DRLifeCycle")
Else
Reporter.ReportEvent micFail,"Step 1 to 41: Verifying if
the DR is Delisted successfully","The DR " & DataTable.Value("DRName","DRLifeCy
cle") & " is NOT successfully Changed to Level " & DataTable.Value("UpgradeLevel
","DRLifeCycle")
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Loging with Approval ID and Approve the Changes made to the DR
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","Approver","MFLogin")
' Approving the Changes while Performing DR Life Cycle
Call DRApprovalFunction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 42 to 65: Approving t
he Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micFail,"Step 42 to 65: Approving t
he Changes made to the DR","The Changes made are NOT Approved Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Log out and Login with Normal User ID
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
' Logging in with Normal User ID and verfiy if all the changes m
ade are Approved and there are No Flags displayed
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call chkApprovedDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 66 to 77: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are Approved and the Flags are Not Present"
Else
Reporter.ReportEvent micFail,"Step 66 to 77: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are NOT Approved and the Flags are Present"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++
' Create a DR of 144A of Sponsored DR
' '======================== PPC DR from 144A to Level I
Public Function DRLifeCycle_TC8()
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" Then
Call CreateBifurcatedDR("MasterFile","Profile - DR Searc
h","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Search","DR
Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR for Perfor
ming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType","DR
LifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR for Per
forming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType",
"DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Login to the Application and Performing the DR Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call UpdateDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 40: Verifying if
the DR is PPC successfully","The DR " & DataTable.Value("DRName","DRLifeCycle")
& " is successfully Changed to Level " & DataTable.Value("UpgradeLevel","DRLife
Cycle")
Else
Reporter.ReportEvent micFail,"Step 1 to 40: Verifying if
the DR is PPC successfully","The DR " & DataTable.Value("DRName","DRLifeCycle")
& " is NOT successfully Changed to Level " & DataTable.Value("UpgradeLevel","DR
LifeCycle")
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Loging with Approval ID and Approve the Changes made to the DR
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","Approver","MFLogin")
' Approving the Changes while Performing DR Life Cycle
Call DRApprovalFunction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 41 to 64: Approving t
he Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micFail,"Step 41 to 64: Approving t
he Changes made to the DR","The Changes made are NOT Approved Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Log out and Login with Normal User ID
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
' Logging in with Normal User ID and verfiy if all the changes m
ade are Approved and there are No Flags displayed
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call chkApprovedDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 65 to 76: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are Approved and the Flags are Not Present"
Else
Reporter.ReportEvent micFail,"Step 65 to 76: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are NOT Approved and the Flags are Present"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")

End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++
' Create a DR of 144A of Sponsored DR
' '======================== PPC DR from 144A to Level II
Public Function DRLifeCycle_TC9()
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" Then
Call CreateBifurcatedDR("MasterFile","Profile - DR Searc
h","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Search","DR
Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR for Perfor
ming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType","DR
LifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR for Per
forming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType",
"DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Login to the Application and Performing the DR Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call UpdateDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 41: Verifying if
the DR is PPC successfully","The DR " & DataTable.Value("DRName","DRLifeCycle")
& " is successfully Changed to Level " & DataTable.Value("UpgradeLevel","DRLife
Cycle")
Else
Reporter.ReportEvent micFail,"Step 1 to 41: Verifying if
the DR is PPC successfully","The DR " & DataTable.Value("DRName","DRLifeCycle")
& " is NOT successfully Changed to Level " & DataTable.Value("UpgradeLevel","DR
LifeCycle")
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Loging with Approval ID and Approve the Changes made to the DR
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","Approver","MFLogin")
' Approving the Changes while Performing DR Life Cycle
Call DRApprovalFunction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 42 to 65: Approving t
he Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micPass,"Step 42 to 65: Approving t
he Changes made to the DR","The Changes made are NOT Approved Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Log out and Login with Normal User ID
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
' Logging in with Normal User ID and verfiy if all the changes m
ade are Approved and there are No Flags displayed
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call chkApprovedDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 66 to 76: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are Approved and the Flags are Not Present"
Else
Reporter.ReportEvent micFail,"Step 66 to 76: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are NOT Approved and the Flags are Present"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++
' Create a DR of 144A of Sponsored DR
' '======================== PPC DR from 144A to Level III of Sponsored Type
Public Function DRLifeCycle_TC10()
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" Then
Call CreateBifurcatedDR("MasterFile","Profile - DR Searc
h","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Search","DR
Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR for Perfor
ming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType","DR
LifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR for Per
forming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType",
"DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Login to the Application and Performing the DR Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call UpdateDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 43: Verifying if
the DR is PPC successfully","The DR " & DataTable.Value("DRName","DRLifeCycle")
& " is successfully Changed to Level " & DataTable.Value("UpgradeLevel","DRLife
Cycle")
Else
Reporter.ReportEvent micFail,"Step 1 to 43: Verifying if
the DR is PPC successfully","The DR " & DataTable.Value("DRName","DRLifeCycle")
& " is NOT successfully Changed to Level " & DataTable.Value("UpgradeLevel","DR
LifeCycle")
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Loging with Approval ID and Approve the Changes made to the DR
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","Approver","MFLogin")
' Approving the Changes while Performing DR Life Cycle
Call DRApprovalFunction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 44 to 68: Approving t
he Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micFail,"Step 44 to 68: Approving t
he Changes made to the DR","The Changes made are NOT Approved Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Log out and Login with Normal User ID
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
' Logging in with Normal User ID and verfiy if all the changes m
ade are Approved and there are No Flags displayed
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call chkApprovedDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 69 to 80: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are Approved and the Flags are Not Present"
Else
Reporter.ReportEvent micFail,"Step 69 to 80: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are NOT Approved and the Flags are Present"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' Create a DR of Level I of Unsponsored DR
'===== Convert it to Sponsored Type DR with BNY Depository
Public Function DRLifeCycle_TC11()
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" Then
Call CreateBifurcatedDR("MasterFile","Profile - DR Searc
h","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Search","DR
Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR for Perfor
ming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType","DR
LifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR for Per
forming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType",
"DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Login to the Application and Performing the DR Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call UpdateDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 44: Verifying if
the DR is Converted successfully","The DR " & DataTable.Value("DRName","DRLifeC
ycle") & " is successfully Converted to Sponsored DR"
Else
Reporter.ReportEvent micPass,"Step 1 to 44: Verifying if
the DR is Converted successfully","The DR " & DataTable.Value("DRName","DRLifeC
ycle") & " is successfully NOT Converted to Unsponsored DR"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Loging with Approval ID and Approve the Changes made to the DR
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","Approver","MFLogin")
' Approving the Changes while Performing DR Life Cycle
Call DRApprovalFunction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 45 to 63: Approving t
he Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micFail,"Step 45 to 63: Approving t
he Changes made to the DR","The Changes made are NOT Approved Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Log out and Login with Normal User ID
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
' Logging in with Normal User ID and verfiy if all the changes m
ade are Approved and there are No Flags displayed
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call chkApprovedDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 64 to 76: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are Approved and the Flags are Not Present"
Else
Reporter.ReportEvent micFail,"Step 64 to 76: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are NOT Approved and the Flags are Present"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++
' Create a DR of Level II of Unsponsored DR
'===== Convert it to Sponsored Type DR with BNY Depository
Public Function DRLifeCycle_TC12()
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" Then
Call CreateBifurcatedDR("MasterFile","Profile - DR Searc
h","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Search","DR
Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR for Perfor
ming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType","DR
LifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR for Per
forming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType",
"DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Login to the Application and Performing the DR Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call UpdateDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 44: Verifying if
the DR is Converted successfully","The DR " & DataTable.Value("DRName","DRLifeC
ycle") & " is successfully Converted to Sponsored DR"
Else
Reporter.ReportEvent micFail,"Step 1 to 44: Verifying if
the DR is Converted successfully","The DR " & DataTable.Value("DRName","DRLifeC
ycle") & " is successfully NOT Converted to Sponsored DR"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Loging with Approval ID and Approve the Changes made to the DR
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","Approver","MFLogin")
' Approving the Changes while Performing DR Life Cycle
Call DRApprovalFunction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 45 to 63: Approving t
he Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micFail,"Step 45 to 63: Approving t
he Changes made to the DR","The Changes made are NOT Approved Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Log out and Login with Normal User ID
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
' Logging in with Normal User ID and verfiy if all the changes m
ade are Approved and there are No Flags displayed
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call chkApprovedDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 64 to 76: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are Approved and the Flags are Not Present"
Else
Reporter.ReportEvent micFail,"Step 64 to 76: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are NOT Approved and the Flags are Present"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' Create a DR of Level III of Unsponsored DR
'===== Convert it to Sponsored Type DR with BNY Depository
Public Function DRLifeCycle_TC13()
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" Then
Call CreateBifurcatedDR("MasterFile","Profile - DR Searc
h","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Search","DR
Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR for Perfor
ming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType","DR
LifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR for Per
forming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType",
"DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Login to the Application and Performing the DR Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call UpdateDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 44: Verifying if
the DR is Converted successfully","The DR " & DataTable.Value("DRName","DRLifeC
ycle") & " is successfully Converted to Sponsored DR"
Else
Reporter.ReportEvent micFail,"Step 1 to 44: Verifying if
the DR is Converted successfully","The DR " & DataTable.Value("DRName","DRLifeC
ycle") & " is successfully NOT Converted to Sponsored DR"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Loging with Approval ID and Approve the Changes made to the DR
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","Approver","MFLogin")
' Approving the Changes while Performing DR Life Cycle
Call DRApprovalFunction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 45 to 63: Approving t
he Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micFail,"Step 45 to 63: Approving t
he Changes made to the DR","The Changes made are NOT Approved Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Log out and Login with Normal User ID
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
' Logging in with Normal User ID and verfiy if all the changes m
ade are Approved and there are No Flags displayed
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call chkApprovedDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 64 to 77: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are Approved and the Flags are Not Present"
Else
Reporter.ReportEvent micFail,"Step 64 to 77: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are NOT Approved and the Flags are Present"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' Create a DR 144A First and then Reg.S both Sharing the Same CUSIP of "Unspons
ored Type"
' ============= Convert Bifurcated DR of Unsponsored to Sponsored with BNY Depos
itory
Public Function DRLifeCycle_TC14()
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" Then
Call CreateBifurcatedDR("MasterFile","Profile - DR Searc
h","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Search","DR
Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR for Perfor
ming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType","DR
LifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR for Per
forming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType",
"DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Login to the Application and Performing the DR Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call UpdateDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 44: Verifying if
the Bifurcated DR is Converrted successfully","The DR " & DataTable.Value("DRNa
me","DRLifeCycle") & " is successfully Converted to Sponsored DR"
Else
Reporter.ReportEvent micFail,"Step 1 to 44: Verifying if
the Bifurcated DR is Converted successfully","The DR " & DataTable.Value("DRNam
e","DRLifeCycle") & " is successfully NOT Converted to Sponsored DR"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Loging with Approval ID and Approve the Changes made to the DR
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","Approver","MFLogin")
' Approving the Changes while Performing DR Life Cycle
Call DRApprovalFunction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 45 to 68: Approving t
he Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micFail,"Step 45 to 68: Approving t
he Changes made to the DR","The Changes made are NOT Approved Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Log out and Login with Normal User ID
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
' Logging in with Normal User ID and verfiy if all the changes m
ade are Approved and there are No Flags displayed
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call chkApprovedDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 69 to 85: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are Approved and the Flags are Not Present"
Else
Reporter.ReportEvent micFail,"Step 69 to 85: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are NOT Approved and the Flags are Present"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' Create a DR 144A First and then Reg.S both Sharing the Same CUSIP .
' ============= PPC for Bifurcated Reg.S DR
Public Function DRLifeCycle_TC15()
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" Then
Call CreateBifurcatedDR("MasterFile","Profile - DR Searc
h","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Search","DR
Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR for Perfor
ming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType","DR
LifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR for Per
forming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType",
"DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Login to the Application and Performing the DR Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call UpdateDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 46: Verifying if
the Bifurcated RegS DR is PPC successfully","The DR " & DataTable.Value("DRName
","DRLifeCycle") & " is successfully PPC to Level " & DataTable.Value("UpgradeLe
vel","DRLifeCycle")
Else
Reporter.ReportEvent micFail,"Step 1 to 46: Verifying if
the Bifurcated RegS DR is PPC successfull","The DR " & DataTable.Value("DRName"
,"DRLifeCycle") & " is NOT successfully PPC to Level " & DataTable.Value("Upgra
deLevel","DRLifeCycle")
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Loging with Approval ID and Approve the Changes made to the DR
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","Approver","MFLogin")
' Approving the Changes while Performing DR Life Cycle
Call DRApprovalFunction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 47 to 70: Approving t
he Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micFail,"Step 47 to 70: Approving t
he Changes made to the DR","The Changes made are NOT Approved Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Log out and Login with Normal User ID
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
' Logging in with Normal User ID and verfiy if all the changes m
ade are Approved and there are No Flags displayed
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call chkApprovedDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 71 to 86: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are Approved and the Flags are Not Present"
Else
Reporter.ReportEvent micFail,"Step 71 to 86: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are NOT Approved and the Flags are Present"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' Create a Level II Dr of Sponsored Type
' ============ Warrent Level II DR
Public Function DRLifeCycle_TC16()
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" Then
Call CreateBifurcatedDR("MasterFile","Profile - DR Searc
h","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Search","DR
Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR for Perfor
ming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType","DR
LifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR for Per
forming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType",
"DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Login to the Application and Performing the DR Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call UpdateDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 33: Verifying if
the DR is Warrented successfully","The DR " & DataTable.Value("DRName","DRLifeC
ycle") & " is successfully Warrented"
Else
Reporter.ReportEvent micFail,"Step 1 to 33: Verifying if
the DR is Warrented successfully","The DR " & DataTable.Value("DRName","DRLifeC
ycle") & " is NOT successfully Warrented"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Loging with Approval ID and Approve the Changes made to the DR
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","Approver","MFLogin")
' Approving the Changes while Performing DR Life Cycle
Call DRApprovalFunction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 34 to 52: Approving t
he Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micFail,"Step 34 to 52: Approving t
he Changes made to the DR","The Changes made are NOT Approved Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Log out and Login with Normal User ID
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
' Logging in with Normal User ID and verfiy if all the changes m
ade are Approved and there are No Flags displayed
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call chkApprovedDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 53 to 62: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are Approved and the Flags are Not Present"
Else
Reporter.ReportEvent micFail,"Step 53 to 62: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are NOT Approved and the Flags are Present"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' Create a Level III DR of Sponsored Type
' ============ Warrent Level III DR
Public Function DRLifeCycle_TC17()
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" Then
Call CreateBifurcatedDR("MasterFile","Profile - DR Searc
h","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Search","DR
Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR for Perfor
ming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType","DR
LifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR for Per
forming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType",
"DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Login to the Application and Performing the DR Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call UpdateDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 24: Verifying if
the DR is Warrented successfully","The DR " & DataTable.Value("DRName","DRLifeC
ycle") & " is successfully Warrent"
Else
Reporter.ReportEvent micFail,"Step 1 to 24: Verifying if
the DR is Warrented successfully","The DR " & DataTable.Value("DRName","DRLifeC
ycle") & " is NOT Warrent successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Loging with Approval ID and Approve the Changes made to the DR
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","Approver","MFLogin")
' Approving the Changes while Performing DR Life Cycle
Call DRApprovalFunction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 25 to 38: Approving
the Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micFail,"Step 25 to 38: Approving t
he Changes made to the DR","The Changes made are NOT Approved Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Log out and Login with Normal User ID
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
' Logging in with Normal User ID and verfiy if all the changes m
ade are Approved and there are No Flags displayed
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call chkApprovedDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 39 to 47: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are Approved and the Flags are Not Present"
Else
Reporter.ReportEvent micFail,"Step 39 to 47: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are NOT Approved and the Flags are Present"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function

'====================================================== 1 st of Test Casese ====


=====================
'-------------------------------------- Test Case Related to Corporate Action --
------------------------------------------------------------
' Create 3 Sponsored DRs with different Depositary --- CIT, JPM and DB
Public Function DRLifeCycle_TC18()
For intTestCounter = 1 to 3
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" T
hen
Call CreateBifurcatedDR("MasterFile","Profile -
DR Search","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Sear
ch","DR Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR fo
r Performing DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRT
ype","DRLifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR
for Performing DR Life Cycle","The Required DR of type " & DataTable.Value("New
DRType","DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Login to the Application and Performing Corporate Acti
on on the DR
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call DR_CorporateAction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 38: Veri
fying if the Corporate Action is Done on the DR successfully","The Corporate Act
ion is Performed on the DR " & DataTable.Value("DRName","DRLifeCycle") & " Succe
ssfully"
Else
Reporter.ReportEvent micFail,"Step 1 to 38: Veri
fying if the Corporate Action is Done on the DR successfully","The Corporate Act
ion is Not Performed on the DR " & DataTable.Value("DRName","DRLifeCycle") & " S
uccessfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call logoutfromApp("MasterFile","Underlying Security Pro
file")
'Loging with Approval ID and Approve the Changes made
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","Approver","MFLogin
")
' Approving the Changes
Call DRApprovalFunction_CorporateAction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 39 to 52: App
roving the Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micFail,"Step 39 to 52: App
roving the Changes made to the DR","The Changes made are NOT Approved Successful
ly"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call logoutfromApp("MasterFile","Depositary Receipt Divi
sion's")
' Login again
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call click_WebElement("MasterFile","Depositary Receipt Divisi
on's","MasterFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("M
enuPath","DRLifeCycle"))
strStatus = Browser("MasterFile").Page("Profile - DR Sea
rch").WebList("Status").GetROProperty("value")
strDRType = Browser("MasterFile").Page("Profile - DR Sea
rch").WebList("DRType").GetROProperty("value")
strDROrigin = Browser("MasterFile").Page("Profile - DR S
earch").WebList("DROrigin").GetROProperty("value")
strCountryofManagement = Browser("MasterFile").Page("Pro
file - DR Search").WebList("CountryofManagement").GetROProperty("value")
SU = Browser("MasterFile").Page("Profile - DR Search").W
ebList("SU").GetROProperty("value")
strSubstatus = Browser("MasterFile").Page("Profile - DR
Search").WebList("SubStatus").GetROProperty("value")
strDRExchange = Browser("MasterFile").Page("Profile - DR
Search").WebList("DRExchange").GetROProperty("value")
If Instr(1,strStatus,"All") <> 0 And Instr(1,strDRType,"
All") <> 0 And Instr(1,strDROrigin,"All") <> 0 And Instr(1,strCountryofManagemen
t,"All") <> 0 And Instr(1,SU,"All") <> 0 And Instr(1,strSubstatus,"All") <> 0 An
d Instr(1,strDRExchange,"All") <> 0 Then
'If strStatus = " All" And strDRType = " All" And strDRO
rigin = " All" And strCountryofManagement = " All" And SU = " All" And strSubsta
tus = " All" And strDRExchange = " All" Then
Reporter.ReportEvent micPass,"Step 53 to 54: Ver
ifying the Default Values of Fields in the Profile - DR Search page","The Defaul
t Values of the Fields are 'All' "
Else
Reporter.ReportEvent micFail,"Step 53 to 54: Ver
ifying the Default Values of Fields in the Profile - DR Search page","The Defaul
t Values of the Fields areNOT 'All' "
Environment.Value("Execution_Log") = "False"
End If
'Search for the Modified DR
Call ModifiedDRSearchCriteria("MasterFile","Profile - DR Sear
ch","Search")
intValues = Browser("MasterFile").Page("Profile - DR Search").WebTabl
e("DRSearchResults").GetRowWithCellText(DataTable.Value("DRName","DRLifeCycle"))
If intValues <> -1 Then
Reporter.ReportEvent micPass,"Step 55: Verifying
if the Required DR is displayed in the List or Not","The Required DR " & DataTa
ble.Value("DRName","DRLifeCycle") & " is displayed in the Search Result"
Else
Reporter.ReportEvent micFail,"Step 55: Verifying
if the Required DR is displayed in the List or Not","The Required DR " & DataTa
ble.Value("DRName","DRLifeCycle") & " is NOT displayed in the Search Result"
Environment.Value("Execution_Log") = "False"
End If
' Selecting the Required DR
Browser("MasterFile").Page("Profile - DR Search").WebEle
ment("html tag:=TD","innertext:="& DataTable.Value("NewValue","DRLifeCycle")).Cl
ick
Wait(5)
'Comparing the Old Values in the Audit log
Call CompareDROldNewValue("MasterFile","DR Profile","2")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 57: Comapring
the Old Values and New Values of the DR and CUSIP by clicking on Audit Button",
"The Old and New Values are Displayed Correctly"
Else
Reporter.ReportEvent micFail,"Step 57: Comapring
the Old Values and New Values of the DR and CUSIP by clicking on Audit Button",
"The Old and New Values are NOt Displayed Correctly"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Checks if the Flags are Present or Not
Call DRFlagCheck()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 56, 58: Verif
ying if Pending Approval Flags are Still present after Approving the Changes mad
e","The Pending Approval Flags are Not Present Next to the Modifed Fields after
approving the Changes made"
Else
Reporter.ReportEvent micFail,"Step 56, 58: Verif
ying if Pending Approval Flags are Still present after Approving the Changes mad
e","The Pending Approval Flags are Still Present Next to the Modifed Fields afte
r approving the Changes made"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Logout from Application and Approver the Changes made
to the Approver
Call logoutfromApp("MasterFile","Corporate Action Data F
ix")
'Loging with Approval ID and Approve the Changes made t
o the Issuer
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","Approver","MFLogin
")
Call ApprovalFunction_DR("MasterFile","Underlying Securi
ty","Name;Status;Last User Updated;Last Updated",Environment.Value("UnderlyingSe
curityName"),"Approved","Approved","Pending Approval")
If intTestCounter <> 3 Then
Environment.Value("DATATABLE_ROW")= Environment.
Value("DATATABLE_ROW") + 1
DataTable.GetSheet("DRLifeCycle").SetCurrentRow(
Environment.Value("DATATABLE_ROW"))
End If
Next
Call select_Menu("MasterFile","Corporate Action Data Fix","Home;DR Home"
)
End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
' Create 3 Un Sponsored DRs with different Depositary
Public Function DRLifeCycle_TC19()
For intTestCounter = 1 to 2
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" T
hen
Call CreateBifurcatedDR("MasterFile","Profile -
DR Search","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Sear
ch","DR Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR fo
r Performing DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRT
ype","DRLifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR
for Performing DR Life Cycle","The Required DR of type " & DataTable.Value("New
DRType","DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Login to the Application and Performing Corporate Acti
on on the DR
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call DR_CorporateAction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 38: Veri
fying if the Corporate Action is Done on the DR successfully","The Corporate Act
ion is Performed on the DR " & DataTable.Value("DRName","DRLifeCycle") & " Succe
ssfully"
Else
Reporter.ReportEvent micFail,"Step 1 to 38: Veri
fying if the Corporate Action is Done on the DR successfully","The Corporate Act
ion is Not Performed on the DR " & DataTable.Value("DRName","DRLifeCycle") & " S
uccessfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call logoutfromApp("MasterFile","Underlying Security Pro
file")
'Loging with Approval ID and Approve the Changes made
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","Approver","MFLogin
")
' Approving the Changes
Call DRApprovalFunction_CorporateAction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 39 to 64: App
roving the Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micFail,"Step 39 to 64: App
roving the Changes made to the DR","The Changes made are NOT Approved Successful
ly"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call logoutfromApp("MasterFile","Depositary Receipt Divi
sion's")
' Login again
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call click_WebElement("MasterFile","Depositary Receipt Divisi
on's","MasterFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("M
enuPath","DRLifeCycle"))
strStatus = Browser("MasterFile").Page("Profile - DR Sea
rch").WebList("Status").GetROProperty("value")
strDRType = Browser("MasterFile").Page("Profile - DR Sea
rch").WebList("DRType").GetROProperty("value")
strDROrigin = Browser("MasterFile").Page("Profile - DR S
earch").WebList("DROrigin").GetROProperty("value")
strCountryofManagement = Browser("MasterFile").Page("Pro
file - DR Search").WebList("CountryofManagement").GetROProperty("value")
SU = Browser("MasterFile").Page("Profile - DR Search").W
ebList("SU").GetROProperty("value")
strSubstatus = Browser("MasterFile").Page("Profile - DR
Search").WebList("SubStatus").GetROProperty("value")
strDRExchange = Browser("MasterFile").Page("Profile - DR
Search").WebList("DRExchange").GetROProperty("value")
If Instr(1,strStatus,"All") <> 0 And Instr(1,strDRType,"
All") <> 0 And Instr(1,strDROrigin,"All") <> 0 And Instr(1,strCountryofManagemen
t,"All") <> 0 And Instr(1,SU,"All") <> 0 And Instr(1,strSubstatus,"All") <> 0 An
d Instr(1,strDRExchange,"All") <> 0 Then
'If strStatus = " All" And strDRType = " All" And strDRO
rigin = " All" And strCountryofManagement = " All" And SU = " All" And strSubsta
tus = " All" And strDRExchange = " All" Then
Reporter.ReportEvent micPass,"Step 65 to 66: Ver
ifying the Default Values of Fields in the Profile - DR Search page","The Defaul
t Values of the Fields are 'All' "
Else
Reporter.ReportEvent micFail,"Step 65 to 66: Ver
ifying the Default Values of Fields in the Profile - DR Search page","The Defaul
t Values of the Fields areNOT 'All' "
Environment.Value("Execution_Log") = "False"
End If
'Search for the Modified DR
Call ModifiedDRSearchCriteria("MasterFile","Profile - DR Sear
ch","Search")
intValues = Browser("MasterFile").Page("Profile - DR Search").WebTabl
e("DRSearchResults").GetRowWithCellText(DataTable.Value("DRName","DRLifeCycle"))
If intValues <> -1 Then
Reporter.ReportEvent micPass,"Step 67: Verifying
if the Required DR is displayed in the List or Not","The Required DR " & DataTa
ble.Value("DRName","DRLifeCycle") & " is displayed in the Search Result"
Else
Reporter.ReportEvent micFail,"Step 67: Verifying
if the Required DR is displayed in the List or Not","The Required DR " & DataTa
ble.Value("DRName","DRLifeCycle") & " is NOT displayed in the Search Result"
Environment.Value("Execution_Log") = "False"
End If
' Selecting the Required DR
Browser("MasterFile").Page("Profile - DR Search").WebEle
ment("html tag:=TD","innertext:="& DataTable.Value("NewValue","DRLifeCycle")).Cl
ick
Wait(5)
'Comparing the Old Values in the Audit log
Call CompareDROldNewValue("MasterFile","DR Profile","2")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 69: Comapring
the Old Values and New Values of the DR and CUSIP by clicking on Audit Button",
"The Old and New Values are Displayed Correctly"
Else
Reporter.ReportEvent micFail,"Step 69: Comapring
the Old Values and New Values of the DR and CUSIP by clicking on Audit Button",
"The Old and New Values are NOt Displayed Correctly"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Checks if the Flags are Present or Not
Call DRFlagCheck()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 68, 70 to 76:
Verifying if Pending Approval Flags are Still present after Approving the Chang
es made","The Pending Approval Flags are Not Present Next to the Modifed Fields
after approving the Changes made"
Else
Reporter.ReportEvent micFail,"Step 68, 70 to 76:
Verifying if Pending Approval Flags are Still present after Approving the Chang
es made","The Pending Approval Flags are Still Present Next to the Modifed Field
s after approving the Changes made"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Logout from Application and Approver the Changes made
to the Approver
Call logoutfromApp("MasterFile","Corporate Action Data F
ix")
' Loging with Approval ID and Approve the Changes made to
the Issuer
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","Approver","MFLogin
")
Call ApprovalFunction_DR("MasterFile","Underlying Securi
ty","Name;Status;Last User Updated;Last Updated",Environment.Value("UnderlyingSe
curityName"),"Approved","Approved","Pending Approval")
'IssuerName_NewValue
If intTestCounter <> 2 Then
Environment.Value("DATATABLE_ROW")= Environment.
Value("DATATABLE_ROW") + 1
DataTable.GetSheet("DRLifeCycle").SetCurrentRow(
Environment.Value("DATATABLE_ROW"))
End If
Next
Call select_Menu("MasterFile","Corporate Action Data Fix","Home;DR Home"
)
End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++

' Create Bifurcated Sponsored DRs -- Execute for 144 A and Reg.s
'================ Perform Corporate for DR 144 A and Then for Reg.S
Public Function DRLifeCycle_TC20()
For intTestCounter = 1 to 2
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" T
hen
Call CreateBifurcatedDR("MasterFile","Profile -
DR Search","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Sear
ch","DR Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR fo
r Performing DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRT
ype","DRLifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR
for Performing DR Life Cycle","The Required DR of type " & DataTable.Value("New
DRType","DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Login to the Application and Performing Corporate Acti
on on the DR
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call DR_CorporateAction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 38: Veri
fying if the Corporate Action is Done on the DR successfully","The Corporate Act
ion is Performed on the DR " & DataTable.Value("DRName","DRLifeCycle") & " Succe
ssfully"
Else
Reporter.ReportEvent micFail,"Step 1 to 38: Veri
fying if the Corporate Action is Done on the DR successfully","The Corporate Act
ion is Not Performed on the DR " & DataTable.Value("DRName","DRLifeCycle") & " S
uccessfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call logoutfromApp("MasterFile","Underlying Security Pro
file")
'Loging with Approval ID and Approve the Changes made
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","Approver","MFLogin
")
' Approving the Changes
Call DRApprovalFunction_CorporateAction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 39 to 52: App
roving the Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micFail,"Step 39 to 52: App
roving the Changes made to the DR","The Changes made are NOT Approved Successful
ly"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call logoutfromApp("MasterFile","Depositary Receipt Divi
sion's")
' Login again
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call click_WebElement("MasterFile","Depositary Receipt Divisi
on's","MasterFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("M
enuPath","DRLifeCycle"))
strStatus = Browser("MasterFile").Page("Profile - DR Sea
rch").WebList("Status").GetROProperty("value")
strDRType = Browser("MasterFile").Page("Profile - DR Sea
rch").WebList("DRType").GetROProperty("value")
strDROrigin = Browser("MasterFile").Page("Profile - DR S
earch").WebList("DROrigin").GetROProperty("value")
strCountryofManagement = Browser("MasterFile").Page("Pro
file - DR Search").WebList("CountryofManagement").GetROProperty("value")
SU = Browser("MasterFile").Page("Profile - DR Search").W
ebList("SU").GetROProperty("value")
strSubstatus = Browser("MasterFile").Page("Profile - DR
Search").WebList("SubStatus").GetROProperty("value")
strDRExchange = Browser("MasterFile").Page("Profile - DR
Search").WebList("DRExchange").GetROProperty("value")
If Instr(1,strStatus,"All") <> 0 And Instr(1,strDRType,"
All") <> 0 And Instr(1,strDROrigin,"All") <> 0 And Instr(1,strCountryofManagemen
t,"All") <> 0 And Instr(1,SU,"All") <> 0 And Instr(1,strSubstatus,"All") <> 0 An
d Instr(1,strDRExchange,"All") <> 0 Then
'If strStatus = " All" And strDRType = " All" And strDRO
rigin = " All" And strCountryofManagement = " All" And SU = " All" And strSubsta
tus = " All" And strDRExchange = " All" Then
Reporter.ReportEvent micPass,"Step 53 to 54: Ver
ifying the Default Values of Fields in the Profile - DR Search page","The Defaul
t Values of the Fields are 'All' "
Else
Reporter.ReportEvent micFail,"Step 53 to 54: Ver
ifying the Default Values of Fields in the Profile - DR Search page","The Defaul
t Values of the Fields areNOT 'All' "
Environment.Value("Execution_Log") = "False"
End If
'Search for the Modified DR
Call ModifiedDRSearchCriteria("MasterFile","Profile - DR Sear
ch","Search")
intValues = Browser("MasterFile").Page("Profile - DR Search").WebTabl
e("DRSearchResults").GetRowWithCellText(DataTable.Value("DRName","DRLifeCycle"))
If intValues <> -1 Then
Reporter.ReportEvent micPass,"Step 55: Verifying
if the Required DR is displayed in the List or Not","The Required DR " & DataTa
ble.Value("DRName","DRLifeCycle") & " is displayed in the Search Result"
Else
Reporter.ReportEvent micFail,"Step 55: Verifying
if the Required DR is displayed in the List or Not","The Required DR " & DataTa
ble.Value("DRName","DRLifeCycle") & " is NOT displayed in the Search Result"
Environment.Value("Execution_Log") = "False"
End If
' Selecting the Required DR
Browser("MasterFile").Page("Profile - DR Search").WebEle
ment("html tag:=TD","innertext:="& DataTable.Value("NewValue","DRLifeCycle")).Cl
ick
Wait(5)
'Comparing the Old Values in the Audit log
Call CompareDROldNewValue("MasterFile","DR Profile","2")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 57: Comapring
the Old Values and New Values of the DR and CUSIP by clicking on Audit Button",
"The Old and New Values are Displayed Correctly"
Else
Reporter.ReportEvent micFail,"Step 57: Comapring
the Old Values and New Values of the DR and CUSIP by clicking on Audit Button",
"The Old and New Values are NOt Displayed Correctly"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Checks if the Flags are Present or Not
Call DRFlagCheck()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 56, 58:Verify
ing if Pending Approval Flags are Still present after Approving the Changes made
","The Pending Approval Flags are Not Present Next to the Modifed Fields after a
pproving the Changes made"
Else
Reporter.ReportEvent micFail,"Step 56 , 58: Veri
fying if Pending Approval Flags are Still present after Approving the Changes ma
de","The Pending Approval Flags are Still Present Next to the Modifed Fields aft
er approving the Changes made"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Logout from Application and Approver the Changes made
to the Approver
Call logoutfromApp("MasterFile","Corporate Action Data F
ix")
' Loging with Approval ID and Approve the Changes made to
the Issuer
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","Approver","MFLogin
")
Call ApprovalFunction_DR("MasterFile","Underlying Securi
ty","Name;Status;Last User Updated;Last Updated",Environment.Value("UnderlyingSe
curityName"),"Approved","Approved","Pending Approval")
'IssuerName_NewValue
If intTestCounter <> 2 Then
Environment.Value("DATATABLE_ROW")= Environment.
Value("DATATABLE_ROW") + 1
DataTable.GetSheet("DRLifeCycle").SetCurrentRow(
Environment.Value("DATATABLE_ROW"))
End If
Next
Call select_Menu("MasterFile","Corporate Action Data Fix","Home;DR Home"
)
End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
' Data Fix
' Create DRs with Non BNYM Depository - 3 DRs for different NOn BNYM Depository
' ========= Perform Corporate Action by Selecting Data Fix from Drop down
Public Function DRLifeCycle_TC21()
For intTestCounter = 1 to 3
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" T
hen
Call CreateBifurcatedDR("MasterFile","Profile -
DR Search","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Sear
ch","DR Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR fo
r Performing DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRT
ype","DRLifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR
for Performing DR Life Cycle","The Required DR of type " & DataTable.Value("New
DRType","DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Login to the Application and Performing Corporate Acti
on on the DR
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call DR_CorporateAction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 38: Veri
fying if the Corporate Action is Done on the DR successfully","The Corporate Act
ion is Performed on the DR " & DataTable.Value("DRName","DRLifeCycle") & " Succe
ssfully"
Else
Reporter.ReportEvent micFail,"Step 1 to 38: Veri
fying if the Corporate Action is Done on the DR successfully","The Corporate Act
ion is Not Performed on the DR " & DataTable.Value("DRName","DRLifeCycle") & " S
uccessfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call logoutfromApp("MasterFile","Underlying Security Pro
file")
'Loging with Approval ID and Approve the Changes made
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","Approver","MFLogin
")
' Approving the Changes
Call DRApprovalFunction_CorporateAction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 39 to 52: App
roving the Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micFail,"Step 39 to 52: App
roving the Changes made to the DR","The Changes made are NOT Approved Successful
ly"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call logoutfromApp("MasterFile","Depositary Receipt Divi
sion's")
' Login again
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call click_WebElement("MasterFile","Depositary Receipt Divisi
on's","MasterFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("M
enuPath","DRLifeCycle"))
strStatus = Browser("MasterFile").Page("Profile - DR Sea
rch").WebList("Status").GetROProperty("value")
strDRType = Browser("MasterFile").Page("Profile - DR Sea
rch").WebList("DRType").GetROProperty("value")
strDROrigin = Browser("MasterFile").Page("Profile - DR S
earch").WebList("DROrigin").GetROProperty("value")
strCountryofManagement = Browser("MasterFile").Page("Pro
file - DR Search").WebList("CountryofManagement").GetROProperty("value")
SU = Browser("MasterFile").Page("Profile - DR Search").W
ebList("SU").GetROProperty("value")
strSubstatus = Browser("MasterFile").Page("Profile - DR
Search").WebList("SubStatus").GetROProperty("value")
strDRExchange = Browser("MasterFile").Page("Profile - DR
Search").WebList("DRExchange").GetROProperty("value")
If Instr(1,strStatus,"All") <> 0 And Instr(1,strDRType,"
All") <> 0 And Instr(1,strDROrigin,"All") <> 0 And Instr(1,strCountryofManagemen
t,"All") <> 0 And Instr(1,SU,"All") <> 0 And Instr(1,strSubstatus,"All") <> 0 An
d Instr(1,strDRExchange,"All") <> 0 Then
Reporter.ReportEvent micPass,"Step 53 to 54: Ver
ifying the Default Values of Fields in the Profile - DR Search page","The Defaul
t Values of the Fields are 'All' "
Else
Reporter.ReportEvent micFail,"Step 53 to 54: Ver
ifying the Default Values of Fields in the Profile - DR Search page","The Defaul
t Values of the Fields areNOT 'All' "
Environment.Value("Execution_Log") = "False"
End If
'Search for the Modified DR
Call ModifiedDRSearchCriteria("MasterFile","Profile - DR Sear
ch","Search")
intValues = Browser("MasterFile").Page("Profile - DR Search").WebTabl
e("DRSearchResults").GetRowWithCellText(DataTable.Value("DRName","DRLifeCycle"))
If intValues <> -1 Then
Reporter.ReportEvent micPass,"Step 55: Verifying
if the Required DR is displayed in the List or Not","The Required DR " & DataTa
ble.Value("DRName","DRLifeCycle") & " is displayed in the Search Result"
Else
Reporter.ReportEvent micFail,"Step 55: Verifying
if the Required DR is displayed in the List or Not","The Required DR " & DataTa
ble.Value("DRName","DRLifeCycle") & " is NOT displayed in the Search Result"
Environment.Value("Execution_Log") = "False"
End If
' Selecting the Required DR
Browser("MasterFile").Page("Profile - DR Search").WebEle
ment("html tag:=TD","innertext:="& DataTable.Value("NewValue","DRLifeCycle")).Cl
ick
Wait(5)
'Comparing the Old Values in the Audit log
Call CompareDROldNewValue("MasterFile","DR Profile","2")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 57: Comapring
the Old Values and New Values of the DR and CUSIP by clicking on Audit Button",
"The Old and New Values are Displayed Correctly"
Else
Reporter.ReportEvent micFail,"Step 57: Comapring
the Old Values and New Values of the DR and CUSIP by clicking on Audit Button",
"The Old and New Values are NOt Displayed Correctly"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Checks if the Flags are Present or Not
Call DRFlagCheck()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 56,58: Verify
ing if Pending Approval Flags are Still present after Approving the Changes made
","The Pending Approval Flags are Not Present Next to the Modifed Fields after a
pproving the Changes made"
Else
Reporter.ReportEvent micFail,"Step 56, 58: Verif
ying if Pending Approval Flags are Still present after Approving the Changes mad
e","The Pending Approval Flags are Still Present Next to the Modifed Fields afte
r approving the Changes made"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Logout from Application and Approver the Changes made
to the Approver
Call logoutfromApp("MasterFile","Corporate Action Data F
ix")
' Loging with Approval ID and Approve the Changes made t
o the Issuer
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","Approver","MFLogin
")
Call ApprovalFunction_DR("MasterFile","Underlying Securi
ty","Name;Status;Last User Updated;Last Updated",Environment.Value("UnderlyingSe
curityName"),"Approved","Approved","Pending Approval")
'IssuerName_NewValue
If intTestCounter <> 3 Then
Environment.Value("DATATABLE_ROW")= Environment.
Value("DATATABLE_ROW") + 1
DataTable.GetSheet("DRLifeCycle").SetCurrentRow(
Environment.Value("DATATABLE_ROW"))
End If
Next
Call select_Menu("MasterFile","Corporate Action Data Fix","Home;DR Home"
)
End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
' Data Fix
' Bifurcated
' Create a Bifurcated DRs with Non BNYM Depository for 144A Level and REgs -- N
on BNYM Depository
'============ Perform Corporate Action on 144A first and then with Reg.S
Public Function DRLifeCycle_TC22()
For intTestCounter = 1 to 2
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" T
hen
Call CreateBifurcatedDR("MasterFile","Profile -
DR Search","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Sear
ch","DR Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR fo
r Performing DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRT
ype","DRLifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR
for Performing DR Life Cycle","The Required DR of type " & DataTable.Value("New
DRType","DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Login to the Application and Performing Corporate Acti
on on the DR
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call DR_CorporateAction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 38: Veri
fying if the Corporate Action is Done on the DR successfully","The Corporate Act
ion is Performed on the DR " & DataTable.Value("DRName","DRLifeCycle") & " Succe
ssfully"
Else
Reporter.ReportEvent micFail,"Step 1 to 38: Veri
fying if the Corporate Action is Done on the DR successfully","The Corporate Act
ion is Not Performed on the DR " & DataTable.Value("DRName","DRLifeCycle") & " S
uccessfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call logoutfromApp("MasterFile","Underlying Security Pro
file")
'Loging with Approval ID and Approve the Changes made
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","Approver","MFLogin
")
' Approving the Changes
Call DRApprovalFunction_CorporateAction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 39 to 52: App
roving the Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micFail,"Step 39 to 52: App
roving the Changes made to the DR","The Changes made are NOT Approved Successful
ly"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call logoutfromApp("MasterFile","Depositary Receipt Divi
sion's")
' Login again
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call click_WebElement("MasterFile","Depositary Receipt Divisi
on's","MasterFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("M
enuPath","DRLifeCycle"))
strStatus = Browser("MasterFile").Page("Profile - DR Sea
rch").WebList("Status").GetROProperty("value")
strDRType = Browser("MasterFile").Page("Profile - DR Sea
rch").WebList("DRType").GetROProperty("value")
strDROrigin = Browser("MasterFile").Page("Profile - DR S
earch").WebList("DROrigin").GetROProperty("value")
strCountryofManagement = Browser("MasterFile").Page("Pro
file - DR Search").WebList("CountryofManagement").GetROProperty("value")
SU = Browser("MasterFile").Page("Profile - DR Search").W
ebList("SU").GetROProperty("value")
strSubstatus = Browser("MasterFile").Page("Profile - DR
Search").WebList("SubStatus").GetROProperty("value")
strDRExchange = Browser("MasterFile").Page("Profile - DR
Search").WebList("DRExchange").GetROProperty("value")
If Instr(1,strStatus,"All") <> 0 And Instr(1,strDRType,"
All") <> 0 And Instr(1,strDROrigin,"All") <> 0 And Instr(1,strCountryofManagemen
t,"All") <> 0 And Instr(1,SU,"All") <> 0 And Instr(1,strSubstatus,"All") <> 0 An
d Instr(1,strDRExchange,"All") <> 0 Then
Reporter.ReportEvent micPass,"Step 53 to 54: Verifying the Defau
lt Values of Fields in the Profile - DR Search page","The Default Values of the
Fields are 'All' "
Else
Reporter.ReportEvent micFail,"Step 53 to 54: Ver
ifying the Default Values of Fields in the Profile - DR Search page","The Defaul
t Values of the Fields areNOT 'All' "
Environment.Value("Execution_Log") = "False"
End If
'Search for the Modified DR
Call ModifiedDRSearchCriteria("MasterFile","Profile - DR Sear
ch","Search")
intValues = Browser("MasterFile").Page("Profile - DR Search").WebTabl
e("DRSearchResults").GetRowWithCellText(DataTable.Value("DRName","DRLifeCycle"))
If intValues <> -1 Then
Reporter.ReportEvent micPass,"Step 55: Verifying
if the Required DR is displayed in the List or Not","The Required DR " & DataTa
ble.Value("DRName","DRLifeCycle") & " is displayed in the Search Result"
Else
Reporter.ReportEvent micFail,"Step 55: Verifying
if the Required DR is displayed in the List or Not","The Required DR " & DataTa
ble.Value("DRName","DRLifeCycle") & " is NOT displayed in the Search Result"
Environment.Value("Execution_Log") = "False"
End If
' Selecting the Required DR
Browser("MasterFile").Page("Profile - DR Search").WebEle
ment("html tag:=TD","innertext:="& DataTable.Value("NewValue","DRLifeCycle")).Cl
ick
Wait(5)
'Comparing the Old Values in the Audit log
Call CompareDROldNewValue("MasterFile","DR Profile","2")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 57: Comapring
the Old Values and New Values of the DR and CUSIP by clicking on Audit Button",
"The Old and New Values are Displayed Correctly"
Else
Reporter.ReportEvent micFail,"Step 57: Comapring
the Old Values and New Values of the DR and CUSIP by clicking on Audit Button",
"The Old and New Values are NOt Displayed Correctly"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Checks if the Flags are Present or Not
Call DRFlagCheck()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 56, 58: Verif
ying if Pending Approval Flags are Still present after Approving the Changes mad
e","The Pending Approval Flags are Not Present Next to the Modifed Fields after
approving the Changes made"
Else
Reporter.ReportEvent micFail,"Step 56, 58: Verif
ying if Pending Approval Flags are Still present after Approving the Changes mad
e","The Pending Approval Flags are Still Present Next to the Modifed Fields afte
r approving the Changes made"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Logout from Application and Approver the Changes made
to the Approver
Call logoutfromApp("MasterFile","Corporate Action Data F
ix")
'Loging with Approval ID and Approve the Changes made t
o the Issuer
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","Approver","MFLogin
")
Call ApprovalFunction_DR("MasterFile","Underlying Securi
ty","Name;Status;Last User Updated;Last Updated",Environment.Value("UnderlyingSe
curityName"),"Approved","Approved","Pending Approval")
'IssuerName_NewValue
If intTestCounter <> 2 Then
Environment.Value("DATATABLE_ROW")= Environment.
Value("DATATABLE_ROW") + 1
DataTable.GetSheet("DRLifeCycle").SetCurrentRow(
Environment.Value("DATATABLE_ROW"))
End If
Next
Call select_Menu("MasterFile","Corporate Action Data Fix","Home;DR Home"
)
End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++
' Data Fix
' Create a DR on any Level of BNY Type Depository
' ======================= Perform Corporate Action i.e., Data Fix
Public Function DRLifeCycle_TC23()
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" T
hen
Call CreateBifurcatedDR("MasterFile","Profile -
DR Search","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Sear
ch","DR Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR fo
r Performing DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRT
ype","DRLifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR
for Performing DR Life Cycle","The Required DR of type " & DataTable.Value("New
DRType","DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Login to the Application and Performing Corporate Acti
on on the DR
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call DR_CorporateAction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 38: Veri
fying if the Corporate Action is Done on the DR successfully","The Corporate Act
ion is Performed on the DR " & DataTable.Value("DRName","DRLifeCycle") & " Succe
ssfully"
Else
Reporter.ReportEvent micFail,"Step 1 to 38: Veri
fying if the Corporate Action is Done on the DR successfully","The Corporate Act
ion is Not Performed on the DR " & DataTable.Value("DRName","DRLifeCycle") & " S
uccessfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call logoutfromApp("MasterFile","Underlying Security Pro
file")
'Loging with Approval ID and Approve the Changes made
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","Approver","MFLogin
")
' Approving the Changes
Call DRApprovalFunction_CorporateAction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 39 to 64: App
roving the Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micFail,"Step 39 to 64: App
roving the Changes made to the DR","The Changes made are NOT Approved Successful
ly"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call logoutfromApp("MasterFile","Depositary Receipt Divi
sion's")
' Login again
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call click_WebElement("MasterFile","Depositary Receipt Divisi
on's","MasterFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("M
enuPath","DRLifeCycle"))
strStatus = Browser("MasterFile").Page("Profile - DR Sea
rch").WebList("Status").GetROProperty("value")
strDRType = Browser("MasterFile").Page("Profile - DR Sea
rch").WebList("DRType").GetROProperty("value")
strDROrigin = Browser("MasterFile").Page("Profile - DR S
earch").WebList("DROrigin").GetROProperty("value")
strCountryofManagement = Browser("MasterFile").Page("Pro
file - DR Search").WebList("CountryofManagement").GetROProperty("value")
SU = Browser("MasterFile").Page("Profile - DR Search").W
ebList("SU").GetROProperty("value")
strSubstatus = Browser("MasterFile").Page("Profile - DR
Search").WebList("SubStatus").GetROProperty("value")
strDRExchange = Browser("MasterFile").Page("Profile - DR
Search").WebList("DRExchange").GetROProperty("value")
If Instr(1,strStatus,"All") <> 0 And Instr(1,strDRType,"
All") <> 0 And Instr(1,strDROrigin,"All") <> 0 And Instr(1,strCountryofManagemen
t,"All") <> 0 And Instr(1,SU,"All") <> 0 And Instr(1,strSubstatus,"All") <> 0 An
d Instr(1,strDRExchange,"All") <> 0 Then
'If strStatus = " All" And strDRType = " All" And strDRO
rigin = " All" And strCountryofManagement = " All" And SU = " All" And strSubsta
tus = " All" And strDRExchange = " All" Then
Reporter.ReportEvent micPass,"Step 65 to 66: Ver
ifying the Default Values of Fields in the Profile - DR Search page","The Defaul
t Values of the Fields are 'All' "
Else
Reporter.ReportEvent micFail,"Step 65 to 66: Ver
ifying the Default Values of Fields in the Profile - DR Search page","The Defaul
t Values of the Fields areNOT 'All' "
Environment.Value("Execution_Log") = "False"
End If
'Search for the Modified DR
Call ModifiedDRSearchCriteria("MasterFile","Profile - DR Sear
ch","Search")
intValues = Browser("MasterFile").Page("Profile - DR Search").WebTabl
e("DRSearchResults").GetRowWithCellText(DataTable.Value("DRName","DRLifeCycle"))
If intValues <> -1 Then
Reporter.ReportEvent micPass,"Step 67: Verifying
if the Required DR is displayed in the List or Not","The Required DR " & DataTa
ble.Value("DRName","DRLifeCycle") & " is displayed in the Search Result"
Else
Reporter.ReportEvent micFail,"Step 67: Verifying
if the Required DR is displayed in the List or Not","The Required DR " & DataTa
ble.Value("DRName","DRLifeCycle") & " is NOT displayed in the Search Result"
Environment.Value("Execution_Log") = "False"
End If
' Selecting the Required DR
Browser("MasterFile").Page("Profile - DR Search").WebEle
ment("html tag:=TD","innertext:="& DataTable.Value("NewValue","DRLifeCycle")).Cl
ick
Wait(5)
'Comparing the Old Values in the Audit log
Call CompareDROldNewValue("MasterFile","DR Profile","2")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 69: Comapring
the Old Values and New Values of the DR and CUSIP by clicking on Audit Button",
"The Old and New Values are Displayed Correctly"
Else
Reporter.ReportEvent micFail,"Step 69: Comapring
the Old Values and New Values of the DR and CUSIP by clicking on Audit Button",
"The Old and New Values are NOt Displayed Correctly"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Checks if the Flags are Present or Not
Call DRFlagCheck()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 68, 70 to 76:
Verifying if Pending Approval Flags are Still present after Approving the Chang
es made","The Pending Approval Flags are Not Present Next to the Modifed Fields
after approving the Changes made"
Else
Reporter.ReportEvent micFail,"Step 68, 70 to 76:
Verifying if Pending Approval Flags are Still present after Approving the Chang
es made","The Pending Approval Flags are Still Present Next to the Modifed Field
s after approving the Changes made"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' ' Logout from Application and Approver the Changes made
to the Approver
' Call logoutfromApp("MasterFile","Corporate Action Data F
ix")
'
'' Loging with Approval ID and Approve the Changes made to
the Issuer
' Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
' Call Login("MasterFile","Login Page","Approver","MFLogin
")
' Call ApprovalFunction_DR("MasterFile","Issuer","",DataTa
ble.Value("IssuerName_NewValue"),"Approved","Approved","Pending Approval")
Call select_Menu("MasterFile","Corporate Action Data Fix
","Home;DR Home")
End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++
' Data Fix - Bifurcated
' Create a DR on of BNY Type Depository - 144 A and Regs -- Sponsored and BNYM
Depository
' ========================== Perform Corporate Action on 144A and Reg.S
Public Function DRLifeCycle_TC24()
For intTestCounter = 1 to 2
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" T
hen
Call CreateBifurcatedDR("MasterFile","Profile -
DR Search","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Sear
ch","DR Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR fo
r Performing DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRT
ype","DRLifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR
for Performing DR Life Cycle","The Required DR of type " & DataTable.Value("New
DRType","DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Login to the Application and Performing Corporate Acti
on on the DR
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call DR_CorporateAction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 38: Veri
fying if the Corporate Action is Done on the DR successfully","The Corporate Act
ion is Performed on the DR " & DataTable.Value("DRName","DRLifeCycle") & " Succe
ssfully"
Else
Reporter.ReportEvent micFail,"Step 1 to 38: Veri
fying if the Corporate Action is Done on the DR successfully","The Corporate Act
ion is Not Performed on the DR " & DataTable.Value("DRName","DRLifeCycle") & " S
uccessfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call logoutfromApp("MasterFile","Underlying Security Pro
file")
'Loging with Approval ID and Approve the Changes made
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call Login("MasterFile","Login Page","Approver","MFLogin
")
' Approving the Changes
Call DRApprovalFunction_CorporateAction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 39 to 64: App
roving the Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micFail,"Step 39 to 64: App
roving the Changes made to the DR","The Changes made are NOT Approved Successful
ly"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call logoutfromApp("MasterFile","Depositary Receipt Divi
sion's")
' Login again
Call invoke_URL("MasterFile","Login Page",Environment.Va
lue("AppURL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call click_WebElement("MasterFile","Depositary Receipt Divisi
on's","MasterFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("M
enuPath","DRLifeCycle"))
strStatus = Browser("MasterFile").Page("Profile - DR Sea
rch").WebList("Status").GetROProperty("value")
strDRType = Browser("MasterFile").Page("Profile - DR Sea
rch").WebList("DRType").GetROProperty("value")
strDROrigin = Browser("MasterFile").Page("Profile - DR S
earch").WebList("DROrigin").GetROProperty("value")
strCountryofManagement = Browser("MasterFile").Page("Pro
file - DR Search").WebList("CountryofManagement").GetROProperty("value")
SU = Browser("MasterFile").Page("Profile - DR Search").W
ebList("SU").GetROProperty("value")
strSubstatus = Browser("MasterFile").Page("Profile - DR
Search").WebList("SubStatus").GetROProperty("value")
strDRExchange = Browser("MasterFile").Page("Profile - DR
Search").WebList("DRExchange").GetROProperty("value")
If Instr(1,strStatus,"All") <> 0 And Instr(1,strDRType,"
All") <> 0 And Instr(1,strDROrigin,"All") <> 0 And Instr(1,strCountryofManagemen
t,"All") <> 0 And Instr(1,SU,"All") <> 0 And Instr(1,strSubstatus,"All") <> 0 An
d Instr(1,strDRExchange,"All") <> 0 Then
Reporter.ReportEvent micPass,"Step 65 to 66: Ver
ifying the Default Values of Fields in the Profile - DR Search page","The Defaul
t Values of the Fields are 'All' "
Else
Reporter.ReportEvent micFail,"Step 65 to 66: Ver
ifying the Default Values of Fields in the Profile - DR Search page","The Defaul
t Values of the Fields areNOT 'All' "
Environment.Value("Execution_Log") = "False"
End If
'Search for the Modified DR
Call ModifiedDRSearchCriteria("MasterFile","Profile - DR Sear
ch","Search")
intValues = Browser("MasterFile").Page("Profile - DR Search").WebTabl
e("DRSearchResults").GetRowWithCellText(DataTable.Value("DRName","DRLifeCycle"))
If intValues <> -1 Then
Reporter.ReportEvent micPass,"Step 67: Verifying
if the Required DR is displayed in the List or Not","The Required DR " & DataTa
ble.Value("DRName","DRLifeCycle") & " is displayed in the Search Result"
Else
Reporter.ReportEvent micFail,"Step 67: Verifying
if the Required DR is displayed in the List or Not","The Required DR " & DataTa
ble.Value("DRName","DRLifeCycle") & " is NOT displayed in the Search Result"
Environment.Value("Execution_Log") = "False"
End If
' Selecting the Required DR
Browser("MasterFile").Page("Profile - DR Search").WebEle
ment("html tag:=TD","innertext:="& DataTable.Value("NewValue","DRLifeCycle")).Cl
ick
Wait(5)
'Comparing the Old Values in the Audit log
Call CompareDROldNewValue("MasterFile","DR Profile","2")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 69: Comapring
the Old Values and New Values of the DR and CUSIP by clicking on Audit Button",
"The Old and New Values are Displayed Correctly"
Else
Reporter.ReportEvent micFail,"Step 69: Comapring
the Old Values and New Values of the DR and CUSIP by clicking on Audit Button",
"The Old and New Values are NOt Displayed Correctly"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Checks if the Flags are Present or Not
Call DRFlagCheck()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 67, 69 to 76:
Verifying if Pending Approval Flags are Still present after Approving the Chang
es made","The Pending Approval Flags are Not Present Next to the Modifed Fields
after approving the Changes made"
Else
Reporter.ReportEvent micFail,"Step 67, 69 to 76:
Verifying if Pending Approval Flags are Still present after Approving the Chang
es made","The Pending Approval Flags are Still Present Next to the Modifed Field
s after approving the Changes made"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'' Logout from Application and Approver the Changes made
to the Approver
'Call logoutfromApp("MasterFile","Corporate Action Data
Fix")
' Loging with Approval ID and Approve the Changes made t
o the Issuer
'Call invoke_URL("MasterFile","Login Page",Environment.V
alue("AppURL"))
'Call Login("MasterFile","Login Page","Approver","MFLogi
n")
'Call ApprovalFunction_DR("MasterFile","Issuer","",DataT
able.Value("IssuerName_NewValue"),"Approved","Approved","Pending Approval")
'IssuerName_NewValue
If intTestCounter <> 2 Then
Environment.Value("DATATABLE_ROW")= Environment.
Value("DATATABLE_ROW") + 1
DataTable.GetSheet("DRLifeCycle").SetCurrentRow(
Environment.Value("DATATABLE_ROW"))
End If
Next
Call select_Menu("MasterFile","Corporate Action Data Fix","Home;DR Home"
)
End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++
' Created a Bifuracted BNYM DR ( 144A and Reg.S)
' Created a Bifuracted Non - BNYM DR ( 144A and Reg.S)
' Created a Level II or Level III and Warrent
' =============================== Test for the Functionality of Related , Previe
w Button.

Public Function DRLifeCycle_TC25()


' Step 3
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
' Step 4
Call check_Menu("MasterFile","MasterFile",DataTable.Value("MenuP
ath","DRLifeCycle"))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 4: Verifying if the D
R Menu is Present or Not","The DR Menu is Present in the Profile Menu"
Else
Reporter.ReportEvent micFail,"Step 4: Verifying if the D
R Menu is Present or Not","The DR Menu is NOT Present in the Profile Menu"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Step 5:
Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","DR
LifeCycle"))
Call pageCheck_WebEditOR("MasterFile","Profile - DR Search","Iss
uerName;DRName")
Call pageCheck_WebListOR("MasterFile","Profile - DR Search","DRT
ype;DROrigin;CountryofManagement;Status;SubStatus;SU;DRExchange")
Call pageCheck_WebElementinTable("MasterFile","Profile - DR Sear
ch","Name;Country of Management;Type;Status;Sub-Status;S/U;Effective Date;Deposi
tary;Origin;Structure","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 5: Verifying if all t
he Elements are Present in the Page 'Profile -DR Search'","All the Required Fiel
ds are Present in the Page 'Profile - DR Search'"
Else
Reporter.ReportEvent micFail,"Step 5: Verifying if all t
he Fields are Present in the Page 'Profile -DR Search'","All the Required Fields
are NOT Present in the Page 'Profile - DR Search'"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") =False
End If
' Step 6
strStatus = Browser("MasterFile").Page("Profile - DR Search").WebList("S
tatus").GetROProperty("value")
strDRType = Browser("MasterFile").Page("Profile - DR Search").We
bList("DRType").GetROProperty("value")
strDROrigin = Browser("MasterFile").Page("Profile - DR Search").
WebList("DROrigin").GetROProperty("value")
strCountryofManagement = Browser("MasterFile").Page("Profile - D
R Search").WebList("CountryofManagement").GetROProperty("value")
SU = Browser("MasterFile").Page("Profile - DR Search").WebList("
SU").GetROProperty("value")
strSubstatus = Browser("MasterFile").Page("Profile - DR Search")
.WebList("SubStatus").GetROProperty("value")
strDRExchange = Browser("MasterFile").Page("Profile - DR Search"
).WebList("DRExchange").GetROProperty("value")
If Instr(1,strStatus,"All") <> 0 And Instr(1,strDRType,"All") <>
0 And Instr(1,strDROrigin,"All") <> 0 And Instr(1,strCountryofManagement,"All")
<> 0 And Instr(1,SU,"All") <> 0 And Instr(1,strSubstatus,"All") <> 0 And Instr(
1,strDRExchange,"All") <> 0 Then
Reporter.ReportEvent micPass,"Step 6: Verifying the Defa
ult Values of Fields in the Profile - DR Search page","The Default Values of the
Fields are 'All' "
Else
Reporter.ReportEvent micFail,"Step 6: Verifying the Defa
ult Values of Fields in the Profile - DR Search page","The Default Values of the
Fields areNOT 'All' "
Environment.Value("Execution_Log") = "False"
End If

' Search based on Issuer Name and Select Level II or Level III D
R.
Call set_WebEdit_Value("MasterFile","Profile - DR Search","Issue
rName",DataTable.Value("IssuerName","DRLifeCycle"))
Call click_Image("MasterFile","Profile - DR Search","Search")
Call pageCheck_WebElementinTable("MasterFile","Profile - DR Sear
ch","Name;Country of Management;Type;Status;Sub-Status;S/U;Effective Date;Deposi
tary;Origin;Structure","")
intRowCount = Browser("MasterFile").Page("Profile - DR Search").
WebTable("DRSearchResults").RowCount
If Environment.Value("TestCase_Log") = "True" And intRowCount >
2 Then
Reporter.ReportEvent micPass,"Step 7: Verfiying the Sear
ch Result","The Result is Displayed Successfully with the Required Columns"
Else
Reporter.ReportEvent micPass,"Step 7: Verfiying the Sear
ch Result","The Results are Not Displayed Successfully with the Required Columns
"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Not Checked for the Expected Result
strLevelIIDRName = FindRequiredDR("BNY","Level II","Yes")
strBNYBifurcated144ADR = FindRequiredDR("BNY","144A","")
strBNYBifurcatedRegSDR = FindRequiredDR("BNY","Reg. S")
strNonBNYBifurcated144ADR = FindRequiredDR("CIT","144A","")
strNonBNYBifurcatedRegSDR = FindRequiredDR("CIT","Reg. S")
strRequiredDRs = strLevelIIDRName & ":" & strBNYBifurcated144ADR
& ":" & strBNYBifurcatedRegSDR & ":" & strNonBNYBifurcated144ADR & ":" & strNon
BNYBifurcatedRegSDR
' Step 7 to 20
strRequiredDR = Split(strRequiredDRs,":",-1,1)
For intValCounter = 0 to UBound(strRequiredDR)
strRequiredDRName = strRequiredDR(intValCounter)
Browser("MasterFile").Page("Profile - DR Search"
).WebElement("html tag:=TD","innertext:=" &strRequiredDRName).Click
Wait(5)
Call pageCheck_ImageOR("MasterFile","DR Profile","Save;Preview;R
elated")
If Environment.Value("TestCase_Log") = "True" Th
en
Reporter.ReportEvent micPass,"St
ep " & intVal & ": Verifying the Buttons in the Page 'DR Profile'","The Required
Buttons namely 'Save, Related and Preview' are Present in the Page'"
Else
Reporter.ReportEvent micFail,"St
ep 6: Verifying the Buttons in the Page 'DR Profile'","The Required Buttons name
ly 'Save, Related and Preview' are NOT Present in the Page'"
Environment.Value("TestCase_Log"
) = "True"
Environment.Value("Execution_Log
") = "False"
End If
' Clicking the Related Button
Call click_Image("MasterFile","DR Profile","Rela
ted")
' Verifying if the Related DR is displayed or NO
T
intRowCount = Browser("MasterFile").Page("DR Pro
file").Frame("lookupFrame").WebTable("DR").RowCount
For intRowCounter = 1 to intRowCount
intColumnCount = Browser("MasterFile").P
age("DR Profile").Frame("lookupFrame").WebTable("DR").ColumnCount(intRowCounter)
For intColumnCounter = 1 to intColumnCou
nt
strCellData = Browser("MasterFil
e").Page("DR Profile").Frame("lookupFrame").WebTable("DR").GetCellData(intRowCou
nter,intColumnCounter)
If Instr(1,strCellData,DataTable
.Value("ModifiedDRName","DRLifeCycle")) <> 0 Then
blnFlag = "True"
Exit For
End If
Next
If blnFlag = "True" Then
Exit For
End If
Next
If blnFlag = "True" Then
Reporter.ReportEvent micPass,"Verifying
if the Related DR is displayed","The Related DR " & strNextDRName & " is display
ed when clicked on Related Profile Button"
Else
Reporter.ReportEvent micFail,"Verifying
if the Related DR is displayed","The Related DR " & strNextDRName & " is NOT dis
played when clicked on Related Profile Button"
Environment.Value("Execution_Log") = "Fa
lse"
Environment.Value("TestCase_Log") = "Fal
se"
End If
' Click on Preview Button
Call click_Image("MasterFile","DR Profile","Prev
iew")
' Verfiying the Preview Button functionality
blnFlag1 = Browser("MasterFile").Page("DR Profil
e").Frame("Frame").WebTable("Details").Exist(2)
blnFlag2 = Browser("MasterFile").Page("DR Profil
e").Frame("Frame").WebTable("CUSIPSummary").Exist(2)
blnFlag3 = Browser("MasterFile").Page("DR Profil
e").Frame("Frame").WebTable("Offering").Exist(2)
blnFlag4= Browser("MasterFile").Page("DR Profile
").Frame("Frame").WebTable("AdditionalDRExchange").Exist(2)
If blnFlag1 = "True" And blnFlag2 = "True" And b
lnFlag3 = "True" And blnFlag4 = "True" Then
Reporter.ReportEvent micPass,"Verifying
if the functionality of Preview Button","The Details, CUSIP Summary, Offering an
d the Additional DR Exchange details are displayed"
Else
Reporter.ReportEvent micFail,"Verifying
if the functionality of Preview Button","The Details, CUSIP Summary, Offering an
d the Additional DR Exchange details are NOT displayed"
Environment.Value("Execution_Log") = "Fa
lse"
Environment.Value("TestCase_Log") = "Fal
se"
End If
Wait(5)
If intValCounter <> UBound(strRequiredDR) Then
Browser("MasterFile").Page("DR Profile")
.WebElement("DRSearch").Click
End If
Wait(5)
Next
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 7 to 20: Verfiying th
e Functionality of Related and Preview buttons","The Related DRs are displayed w
hen clicked on Related DR button"
Else
Reporter.ReportEvent micFail,"Step 7 to 20: Verfiying th
e Functionality of Related and Preview buttons","The Related DRs are NOT display
ed when clicked on Related DR button"
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
' Clicking on Return button
Call click_Image("MasterFile","DR Profile","Back")
' Testing the Next and Prior DR Button functionality
If Browser("MasterFile").Page("DR Profile").WebButton("NextDR").
Exist(2) Then
Browser("MasterFile").Page("DR Profile").WebButton("Next
DR").Click
strDRName = get_WebEdit_Value("MasterFile","DR Profile",
"Details_Name")
If strDRName = DataTable.Value("ModifiedDRName","DRLifeC
ycle") Then
Reporter.ReportEvent micPass,"Step 21: Verifying
the Functionality of Next DR Button","The DR Next in the Hierarchy is displayed
"
Else
Reporter.ReportEvent micFail,"Step 21: Verifying
the Functionality of Next DR Button","The DR Next in the Hierarchy is NOT displ
ayed"
Environment.Value("Execution_Log") = "False"
End If
If Browser("MasterFile").Page("DR Profile").WebButton("P
riorDR").Exist(2) Then
Browser("MasterFile").Page("DR Profile").WebButt
on("PriorDR").Click
strDRName = get_WebEdit_Value("MasterFile","DR P
rofile","Details_Name")
If strDRName = DataTable.Value("DRName","DRLifeC
ycle") Then
Reporter.ReportEvent micPass,"Step 22: V
erifying the Functionality of Prior DR Button","The Prior DR in the Hierarchy is
displayed"
Else
Reporter.ReportEvent micFail,"Step 22: V
erifying the Functionality of Next DR Button","The Prior DR in the Hierarchy is
NOT displayed"
Environment.Value("Execution_Log") = "Fa
lse"
End If
End If
ElseIf Browser("MasterFile").Page("DR Profile").WebButton("Prior
DR").Exist(2) Then
Browser("MasterFile").Page("DR Profile").WebButton("Prio
rDR").Click
strDRName = get_WebEdit_Value("MasterFile","DR Profile",
"Details_Name")
If strDRName = DataTable.Value("DRName","DRLifeCycle")
Then
Reporter.ReportEvent micPass,"Step 21: Verifying
the Functionality of Prior DR Button","The Prior DR in the Hierarchy is display
ed"
Else
Reporter.ReportEvent micFail,"Step 21: Verifying
the Functionality of Next DR Button","The Prior DR in the Hierarchy is NOT dis
played"
Environment.Value("Execution_Log") = "False"
End If
If Browser("MasterFile").Page("DR Profile").WebButton("N
extDR").Exist(2) Then
Browser("MasterFile").Page("DR Profile").WebButt
on("NextDR").Click
strDRName = get_WebEdit_Value("MasterFile","DR P
rofile","Details_Name")
If strDRName = DataTable.Value("ModifiedDRName",
"DRLifeCycle") Then
Reporter.ReportEvent micPass,"Step 22: V
erifying the Functionality of Next DR Button","The DR Next in the Hierarchy is d
isplayed"
Else
Reporter.ReportEvent micFail,"Step 22: V
erifying the Functionality of Next DR Button","The DR Next in the Hierarchy is N
OT displayed"
Environment.Value("Execution_Log") = "Fa
lse"
End If
End If
End If
' Click on the Related DR Button
Call click_WebButton("MasterFile","DR Profile","RelatedDR")
strDRName = get_WebEdit_Value("MasterFile","DR Profile","Details
_Name")
If strDRName = DataTable.Value("ModifiedDRName","DRLifeCycle") T
hen
Reporter.ReportEvent micPass,"Step 23: Verifying the Fun
ctionality of Related DR Button","The Related DR Details is displayed"
Else
Reporter.ReportEvent micFail,"Step 23: Verifying the Fun
ctionality of Related DR Button","The Related DR Details is NOT displayed"
Environment.Value("Execution_Log") = "False"
End If
Call select_Menu("MasterFile","Corporate Action Data Fix","Home;
DR Home")
End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++
' Test for the Functionality of Search Button
Public Function DRLifeCycle_TC26()
' Step 3
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
' Select DR Menu from Profile
Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","D
RLifeCycle"))
' Verifying the Fields present in the Profile - DR Search
Call pageCheck_WebEditOR("MasterFile","Profile - DR Search","Iss
uerName;DRName")
Call pageCheck_WebListOR("MasterFile","Profile - DR Search","DRT
ype;DROrigin;CountryofManagement;Status;SubStatus;SU;DRExchange")
Call pageCheck_WebElementinTable("MasterFile","Profile - DR Sear
ch","Name;Country of Management;Type;Status;Sub-Status;S/U;Effective Date;Deposi
tary;Origin;Structure","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 3: Verifying if all t
he Elements are Present in the Page 'Profile -DR Search'","All the Required Fiel
ds are Present in the Page 'Profile - DR Search'"
Else
Reporter.ReportEvent micFail,"Step 3: Verifying if all t
he Fields are Present in the Page 'Profile -DR Search'","All the Required Fields
are NOT Present in the Page 'Profile - DR Search'"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") =False
End If
' Step 4
strStatus = Browser("MasterFile").Page("Profile - DR Search").We
bList("Status").GetROProperty("value")
strDRType = Browser("MasterFile").Page("Profile - DR Search").We
bList("DRType").GetROProperty("value")
strDROrigin = Browser("MasterFile").Page("Profile - DR Search").
WebList("DROrigin").GetROProperty("value")
strCountryofManagement = Browser("MasterFile").Page("Profile - D
R Search").WebList("CountryofManagement").GetROProperty("value")
SU = Browser("MasterFile").Page("Profile - DR Search").WebList("
SU").GetROProperty("value")
strSubstatus = Browser("MasterFile").Page("Profile - DR Search")
.WebList("SubStatus").GetROProperty(" value")
strDRExchange = Browser("MasterFile").Page("Profile - DR Search"
).WebList("DRExchange").GetROProperty("value")
If strStatus = "All" And strDRType = "All" And strDROrigin = "Al
l" And strCountryofManagement = "All" And SU = "All" And strSubstatus = "All" An
d strDRExchange = "All" Then
Reporter.ReportEvent micPass,"Verifying the Default Valu
es of Fields in the Profile - DR Search page","The Default Values of the Fields
are 'All' "
Else
Reporter.ReportEvent micPass,"Verifying the Default Valu
es of Fields in the Profile - DR Search page","The Default Values of the Fields
are 'All' "
Environment.Value("Execution_Log") = "False"
End If
' Step 4
Call set_WebEdit_Value("MasterFile","Profile - DR Search","Issue
rName",DataTable.Value("IssuerName","DRLIfeCycle"))
Call click_Image("MasterFile","Profile - DR Search","Search")
' Need to verify the Expected Result of Step 4
' Step 5
Call set_WebEdit_Value("MasterFile","Profile - DR Search","Issue
rName",DataTable.Value("IssuerName","DRLIfeCycle"))
Call Select_Combo_Value("MasterFile","Profile - DR Search","DRType",Data
Table.Value("NewDRType","DRLifeCycle"))
Call click_Image("MasterFile","Profile - DR Search","Search")
' Checking for the Results in the Result Table
intRowCount = Browser("MasterFile").Page("Profile - DR Search").
WebTable("DRSearchResults").RowCount
If intRowCount > 2 Then
Call chkResultinTable("MasterFile","Profile - DR
Search","DRSearchResults","Type",DataTable.Value("NewDRType","DRLifeCycle"))
If Environment.Value("TestCase_Log") = "True" T
hen
Reporter.ReportEvent micPass,"Step 5: Ve
rifying if the Results are Displayed as per the Search Criteria","The Results ar
e displayed with the Value " & DataTable.Value("NewDRType","DRLifeCycle") & " in
the Column 'Type'"
Else
Reporter.ReportEvent micFail,"Step 5: Ve
rifying if the Results are Displayed as per the Search Criteria","The Results ar
e NOT displayed with the Value " & DataTable.Value("NewDRType","DRLifeCycle") &
" in the Column 'Type'"
Environment.Value("TestCase_Log") = "Tru
e"
Environment.Value("Execution_Log") = "Fa
lse"
End If
Else
Reporter.ReportEvent micWarning,"Step 5: Verifyi
ng if the Results are Displayed as per the Search Criteria","No Results are disp
layed for the Search Criteria ' Issuer Name : = " & DataTable.Value("IssuerName"
,"DRLifeCycle") & " and ' DRType := " & DataTable.Value("NewDRType","DRLifeCycle
")
End If
' Step 6
Call set_WebEdit_Value("MasterFile","Profile - DR Search","Issue
rName",DataTable.Value("IssuerName","DRLIfeCycle"))
Call Select_Combo_Value("MasterFile","Profile - DR Search","DROrigin",Da
taTable.Value("Origin","DRLifeCycle"))
Call click_Image("MasterFile","Profile - DR Search","Search")
' Checking for the Results in the Result Table
intRowCount = Browser("MasterFile").Page("Profile - DR Search").
WebTable("DRSearchResults").RowCount
If intRowCount > 2 Then
Call chkResultinTable("MasterFile","Profile - DR
Search","DRSearchResults","Origin",DataTable.Value("Origin","DRLifeCycle"))
If Environment.Value("TestCase_Log") = "True" Th
en
Reporter.ReportEvent micPass,"Step 6: Ve
rifying if the Results are Displayed as per the Search Criteria","The Results ar
e displayed with the Value " & DataTable.Value("Origin","DRLifeCycle") & " in th
e Column 'Type'"
Else
Reporter.ReportEvent micFail,"Step 6: Ve
rifying if the Results are Displayed as per the Search Criteria","The Results ar
e NOT displayed with the Value " & DataTable.Value("Origin","DRLifeCycle") & " i
n the Column 'Type'"
Environment.Value("TestCase_Log") = "Tru
e"
Environment.Value("Execution_Log") = "Fa
lse"
End If
Else
Reporter.ReportEvent micWarning,"Step 6: Verifyi
ng if the Results are Displayed as per the Search Criteria","No Results are disp
layed for the Search Criteria ' Issuer Name : = " & DataTable.Value("IssuerName"
,"DRLifeCycle") & " and ' Origin := " & DataTable.Value("Origin","DRLifeCycle")
End If
' Step 7
Call set_WebEdit_Value("MasterFile","Profile - DR Search","IssuerName",D
ataTable.Value("IssuerName","DRLIfeCycle"))
Call Select_Combo_Value("MasterFile","Profile - DR Search","CountryofMan
agement",DataTable.Value("CountryofManagement","DRLifeCycle"))
Call click_Image("MasterFile","Profile - DR Search","Search")
' Checking for the Results in the Result Table
intRowCount = Browser("MasterFile").Page("Profile - DR Search").
WebTable("DRSearchResults").RowCount
If intRowCount > 2 Then
Call chkResultinTable("MasterFile","Profile - DR
Search","DRSearchResults","Country of Management",DataTable.Value("CountryofMan
agement","DRLifeCycle"))
If Environment.Value("TestCase_Log") = "True" Th
en
Reporter.ReportEvent micPass,"Step 7: Ve
rifying if the Results are Displayed as per the Search Criteria","The Results ar
e displayed with the Value " & DataTable.Value("CountryofManagement","DRLifeCycl
e") & " in the Column 'Country of Management'"
Else
Reporter.ReportEvent micFail,"Step 7: Ve
rifying if the Results are Displayed as per the Search Criteria","The Results ar
e NOT displayed with the Value " & DataTable.Value("CountryofManagement","DRLife
Cycle") & " in the Column 'Country of Management'"
Environment.Value("TestCase_Log") = "Tru
e"
Environment.Value("Execution_Log") = "Fa
lse"
End If
Else
Reporter.ReportEvent micWarning,"Step 7: Verifyi
ng if the Results are Displayed as per the Search Criteria","No Results are disp
layed for the Search Criteria ' Issuer Name : = " & DataTable.Value("IssuerName"
,"DRLifeCycle") & " and ' Country of Management := " & DataTable.Value("Countryo
fManagement","DRLifeCycle")
End If
' Step 8 - Search based on Status
Call set_WebEdit_Value("MasterFile","Profile - DR Search","IssuerName",D
ataTable.Value("IssuerName","DRLIfeCycle"))
Call Select_Combo_Value("MasterFile","Profile - DR Search","Status",Data
Table.Value("Status","DRLifeCycle"))
Call click_Image("MasterFile","Profile - DR Search","Search")
' Checking for the Results in the Result Table
intRowCount = Browser("MasterFile").Page("Profile - DR Search").
WebTable("DRSearchResults").RowCount
If intRowCount > 2 Then
Call chkResultinTable("MasterFile","Profile - DR
Search","DRSearchResults","Status",DataTable.Value("Status","DRLifeCycle"))
If Environment.Value("TestCase_Log") = "True" Th
en
Reporter.ReportEvent micPass,"Step 8: Ve
rifying if the Results are Displayed as per the Search Criteria","The Results ar
e displayed with the Value " & DataTable.Value("Status","DRLifeCycle") & " in th
e Column 'Status'"
Else
Reporter.ReportEvent micFail,"Step 8: Ve
rifying if the Results are Displayed as per the Search Criteria","The Results ar
e NOT displayed with the Value " & DataTable.Value("Status","DRLifeCycle") & " i
n the Column 'Status'"
Environment.Value("TestCase_Log") = "Tru
e"
Environment.Value("Execution_Log") = "Fa
lse"
End If
Else
Reporter.ReportEvent micWarning,"Step 8: Verifyi
ng if the Results are Displayed as per the Search Criteria","No Results are disp
layed for the Search Criteria ' Issuer Name : = " & DataTable.Value("IssuerName"
,"DRLifeCycle") & " and ' Status := " & DataTable.Value("Status","DRLifeCycle")
End If
' Step 9 - Search based on 'SubStatus
Call set_WebEdit_Value("MasterFile","Profile - DR Search","IssuerName",D
ataTable.Value("IssuerName","DRLIfeCycle"))
Call Select_Combo_Value("MasterFile","Profile - DR Search","SubStatus",D
ataTable.Value("SubStatus","DRLifeCycle"))
Call click_Image("MasterFile","Profile - DR Search","Search")
' Checking for the Results in the Result Table
intRowCount = Browser("MasterFile").Page("Profile - DR Search").
WebTable("DRSearchResults").RowCount
If intRowCount > 2 Then
Call chkResultinTable("MasterFile","Profile - DR
Search","DRSearchResults","Sub-Status",DataTable.Value("SubStatus","DRLifeCycle
"))
If Environment.Value("TestCase_Log") = "True" Th
en
Reporter.ReportEvent micPass,"Step 9: Ve
rifying if the Results are Displayed as per the Search Criteria","The Results ar
e displayed with the Value " & DataTable.Value("SubStatus","DRLifeCycle") & " in
the Column 'SubStatus'"
Else
Reporter.ReportEvent micFail,"Step 9: Ve
rifying if the Results are Displayed as per the Search Criteria","The Results ar
e NOT displayed with the Value " & DataTable.Value("SubStatus","DRLifeCycle") &
" in the Column 'SubStatus'"
Environment.Value("TestCase_Log") = "Tru
e"
Environment.Value("Execution_Log") = "Fa
lse"
End If
Else
Reporter.ReportEvent micWarning,"Step 9: Verifyi
ng if the Results are Displayed as per the Search Criteria","No Results are disp
layed for the Search Criteria ' Issuer Name : = " & DataTable.Value("IssuerName"
,"DRLifeCycle") & " and ' Sub-Status := " & DataTable.Value("SubStatus","DRLifeC
ycle")
End If
' Step 10 - Search based on S/U
Call set_WebEdit_Value("MasterFile","Profile - DR Search","IssuerName",D
ataTable.Value("IssuerName","DRLIfeCycle"))
Call Select_Combo_Value("MasterFile","Profile - DR Search","SU",DataTabl
e.Value("Sponsored","DRLifeCycle"))
Call click_Image("MasterFile","Profile - DR Search","Search")
' Checking for the Results in the Result Table
intRowCount = Browser("MasterFile").Page("Profile - DR Search").
WebTable("DRSearchResults").RowCount
If intRowCount > 2 Then
Call chkResultinTable("MasterFile","Profile - DR
Search","DRSearchResults","S/U",DataTable.Value("Sponsored","DRLifeCycle"))
If Environment.Value("TestCase_Log") = "True" Th
en
Reporter.ReportEvent micPass,"Step 10: V
erifying if the Results are Displayed as per the Search Criteria","The Results a
re displayed with the Value " & DataTable.Value("Sponsored","DRLifeCycle") & " i
n the Column 'S/U'"
Else
Reporter.ReportEvent micFail,"Step 10: V
erifying if the Results are Displayed as per the Search Criteria","The Results a
re NOT displayed with the Value " & DataTable.Value("Sponsored","DRLifeCycle") &
" in the Column 'S/U'"
Environment.Value("TestCase_Log") = "Tru
e"
Environment.Value("Execution_Log") = "Fa
lse"
End If
Else
Reporter.ReportEvent micWarning,"Step 10: Verify
ing if the Results are Displayed as per the Search Criteria","No Results are dis
played for the Search Criteria ' Issuer Name : = " & DataTable.Value("IssuerName
","DRLifeCycle") & " and ' S/U := " & DataTable.Value("Sponsored","DRLifeCycle")
End If
Call select_Menu("MasterFile","Corporate Action Data Fix","Home;
DR Home")
End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++======+
Public Function DRLifeCycle_TC27()
' Call invoke_URL("MasterFile","Login Page",Environment.Value("URL"))
' Call Login("MasterFile","Login Page","Approval","MFLogin")
Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","D
RLifeCycle"))
' Step 11 - Search based on DRType and DR Exchange
Call set_WebEdit_Value("MasterFile","Profile - DR Search","IssuerName",D
ataTable.Value("IssuerName","DRLIfeCycle"))
Call Select_Combo_Value("MasterFile","Profile - DR Search","DRType",Data
Table.Value("NewDRType","DRLifeCycle"))
Call Select_Combo_Value("MasterFile","Profile - DR Search","DREx
change",DataTable.Value("DRExchange","DRLifeCycle"))
Call click_Image("MasterFile","Profile - DR Search","Search")
' Checking for the Results in the Result Table
intRowCount = Browser("MasterFile").Page("Profile - DR Search").
WebTable("DRSearchResults").RowCount
If intRowCount > 2 Then
Call chkResultinTable("MasterFile","Profile - DR
Search","DRSearchResults","Type ",DataTable.Value("NewDRType","DRLifeCycle"))
If Environment.Value("TestCase_Log") = "True" Th
en
Reporter.ReportEvent micPass,"Step 11: V
erifying if the Results are Displayed as per the Search Criteria","The Results a
re displayed with the Value " & DataTable.Value("NewDRType","DRLifeCycle") & " i
n the Column 'Type'"
Else
Reporter.ReportEvent micFail,"Step 11: V
erifying if the Results are Displayed as per the Search Criteria","The Results a
re NOT displayed with the Value " & DataTable.Value("NewDRType","DRLifeCycle") &
" in the Column 'Type'"
Environment.Value("TestCase_Log") = "Tru
e"
Environment.Value("Execution_Log") = "Fa
lse"
End If
Else
Reporter.ReportEvent micWarning,"Step 11: Verify
ing if the Results are Displayed as per the Search Criteria","No Results are dis
played for the Search Criteria ' Issuer Name : = " & DataTable.Value("IssuerName
","DRLifeCycle") & " and ' Type := " & DataTable.Value("NewDRType","DRLifeCycle"
) & " and DR Exchange: = " & DataTable.Value("DRExchange","DRLifeCycle")
End If
' Step 12 - Search based on DR Type , Country of Management
Call set_WebEdit_Value("MasterFile","Profile - DR Search","Issue
rName",DataTable.Value("IssuerName","DRLIfeCycle"))
strDRType = "Reg. S"
Call Select_Combo_Value("MasterFile","Profile - DR Search","DRType",strD
RType)
Call Select_Combo_Value("MasterFile","Profile - DR Search","Coun
tryofManagement",DataTable.Value("CountryofManagement","DRLifeCycle"))
Call click_Image("MasterFile","Profile - DR Search","Search")
' Checking for the Results in the Result Table
intRowCount = Browser("MasterFile").Page("Profile - DR Search").
WebTable("DRSearchResults").RowCount
If intRowCount > 2 Then
blnFlag = "False"
'Call chkResultinTable("MasterFile","Profile - D
R Search","DRSearchResults","Type ",DataTable.Value("DRType","DRLifeCycle"))
For intRowCounter = 3 to intRowCount
strDRTypes = Browser("MasterFile
").Page("Profile - DR Search").WebTable("DRSearchResults").GetCellData(intRowCou
nter,3)
strCountry = Browser("MasterFile
").Page("Profile - DR Search").WebTable("DRSearchResults").GetCellData(intRowCou
nter,2)
If strDRTypes <> "ERROR: The spe
cified cell does not exist." And strCountry <> "ERROR: The specified cell does
not exist." Then
If strDRTypes = DRType A
nd strCountry = DataTable.Value("CountryofManagement","DRLifeCycle") Then
blnFlag = "True"
End If
End If
Next
If blnFlag = "True" Then
Reporter.ReportEvent micPass,"Step 12: V
erifying if the Results are Displayed as per the Search Criteria","The Results a
re displayed with the Value " & strDRType & " in the Column 'Type' and " & DataT
able.Value("CountryofManagement","DRLifeCycle") & " in Column Country of Managem
ent"
Else
Reporter.ReportEvent micFail,"Step 12: V
erifying if the Results are Displayed as per the Search Criteria","The Results a
re NOT displayed with the Value " & strDRType & " in the Column 'Type' and " & D
ataTable.Value("CountryofManagement","DRLifeCycle") & " in Column Country of Man
agement"
Environment.Value("Execution_Log") = "False"
End If
Else
Reporter.ReportEvent micWarning,"Step 12: Verify
ing if the Results are Displayed as per the Search Criteria","No Results are dis
played for the Search Criteria ' Issuer Name : = " & DataTable.Value("IssuerName
","DRLifeCycle") & " and ' Type := " & strDRType & " and Country of Management:
= " & DataTable.Value("CountryofManagement","DRLifeCycle")
End If
' Step 13 - Search based on DR Type , Country of Management
Call set_WebEdit_Value("MasterFile","Profile - DR Search","Issue
rName",DataTable.Value("IssuerName","DRLIfeCycle"))
strDRType = "Reg. S"
Call Select_Combo_Value("MasterFile","Profile - DR Search","DRType",strD
RType)
Call Select_Combo_Value("MasterFile","Profile - DR Search","Stat
us",DataTable.Value("Status","DRLifeCycle"))
Call Select_Combo_Value("MasterFile","Profile - DR Search","Coun
tryofManagement",DataTable.Value("CountryofManagement","DRLifeCycle"))
Call click_Image("MasterFile","Profile - DR Search","Search")
' Checking for the Results in the Result Table
intRowCount = Browser("MasterFile").Page("Profile - DR Search").
WebTable("DRSearchResults").RowCount
If intRowCount > 2 Then
blnFlag = "False"
'Call chkResultinTable("MasterFile","Profile - D
R Search","DRSearchResults","Type ",DataTable.Value("DRType","DRLifeCycle"))
For intRowCounter = 3 to intRowCount
strDRTypes = Browser("MasterFile
").Page("Profile - DR Search").WebTable("DRSearchResults").GetCellData(intRowCou
nter,3)
strCountry = Browser("MasterFile
").Page("Profile - DR Search").WebTable("DRSearchResults").GetCellData(intRowCou
nter,2)
strStatus = Browser("MasterFile"
).Page("Profile - DR Search").WebTable("DRSearchResults").GetCellData(intRowCoun
ter,4)
If strDRTypes <> "ERROR: The spe
cified cell does not exist." And strCountry <> "ERROR: The specified cell does
not exist." And strStatus <> "ERROR: The specified cell does not exist." Then
If strDRTypes = DRType A
nd strCountry = DataTable.Value("CountryofManagement","DRLifeCycle") And strStat
us = DataTable.Value("Status","DRLifeCycle") Then
blnFlag = "True"
End If
End If
Next
If blnFlag = "True" Then
Reporter.ReportEvent micPass,"Step 13: V
erifying if the Results are Displayed as per the Search Criteria","The Results a
re displayed with the Value " & strDRType & " in the Column 'Type' and " & DataT
able.Value("CountryofManagement","DRLifeCycle") & " in Column Country of Managem
ent and " & DataTable.Value("Status","DRLifeCycle") & " in Column 'Status'"
Else
Reporter.ReportEvent micFail,"Step 13: V
erifying if the Results are Displayed as per the Search Criteria","The Results a
re NOT displayed with the Value " & strDRType & " in the Column 'Type' and " & D
ataTable.Value("CountryofManagement","DRLifeCycle") & " in Column Country of Man
agement and " & DataTable.Value("Status","DRLifeCycle") & " in Column 'Status'"
Environment.Value("Execution_Log") = "False"
End If
Else
Reporter.ReportEvent micWarning,"Step 13: Verify
ing if the Results are Displayed as per the Search Criteria","No Results are dis
played for the Search Criteria ' Issuer Name : = " & DataTable.Value("IssuerName
","DRLifeCycle") & " and ' Type := " & strDRType & " and Country of Management:
= " & DataTable.Value("CountryofManagement","DRLifeCycle") & " and Status:= " &
DataTable.Value("Status","DRLifeCycle")
End If
Call select_Menu("MasterFile","Profile - DR Process","Home;DR Ho
me")
End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++
' Create a DR of Level II Iof Unsponsored DR and Non-Bny Depository
'===== Convert it to Sponsored Type DR with BNY Depository
Public Function DRLifeCycle_TC28()
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" Then
Call CreateBifurcatedDR("MasterFile","Profile - DR Searc
h","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Search","DR
Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR for Perfor
ming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType","DR
LifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR for Per
forming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType",
"DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Login to the Application and Performing the DR Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call UpdateDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 43: Verifying if
the DR is Converted successfully","The DR " & DataTable.Value("DRName","DRLifeC
ycle") & " is successfully Converted to Sponsored DR"
Else
Reporter.ReportEvent micFail,"Step 1 to 43: Verifying if
the DR is Upgraded successfully","The DR " & DataTable.Value("DRName","DRLifeCy
cle") & " is NOT successfully Converted to Sponsored DR"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Loging with Approval ID and Approve the Changes made to the DR
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","Approver","MFLogin")
' Approving the Changes while Performing DR Life Cycle
Call DRApprovalFunction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 44 to 66: Approving t
he Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micFail,"Step 44 to 66: Approving t
he Changes made to the DR","The Changes made are NOT Approved Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Log out and Login with Normal User ID
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
' Logging in with Normal User ID and verfiy if all the changes m
ade are Approved and there are No Flags displayed
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call chkApprovedDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 67 to 81: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are Approved and the Flags are Not Present"
Else
Reporter.ReportEvent micFail,"Step 67 to 81: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are NOT Approved and the Flags are Present"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++
' Create a Bifurcated Sponsored DR of Non-BNYM Depository
'================= Convert it to BNY Depository
Public Function DRLifeCycle_TC29()
'Create a New DR which has to under go Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" Then
Call CreateBifurcatedDR("MasterFile","Profile - DR Searc
h","DR Profile","CUSIP Profile")
Else
Call CreateNewDR("MasterFile","Profile - DR Search","DR
Profile","CUSIP Profile")
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Creating the DR for Perfor
ming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType","DR
LifeCycle") & " is created Successfully"
Else
Reporter.ReportEvent micWarning,"Creating the DR for Per
forming DR Life Cycle","The Required DR of type " & DataTable.Value("NewDRType",
"DRLifeCycle") & " is NOT created Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Login to the Application and Performing the DR Life Cycle
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","User","MFLogin")
Call UpdateDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1 to 42: Verifying if
the Bifurcated DR is Converted from Non-BNYM to BNYM successfully","The DR " &
DataTable.Value("DRName","DRLifeCycle") & " is successfully Converted from Non-B
NYM to BNYM successfully"
Else
Reporter.ReportEvent micFail,"Step 1 to 42: Verifying if
the Bifurcated DR is Converted from Non-BNYM to BNYM successfully","The DR " &
DataTable.Value("DRName","DRLifeCycle") & " is NOT successfully Converted from N
on-BNYM to BNYM successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Loging with Approval ID and Approve the Changes made to the DR
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call Login("MasterFile","Login Page","Approver","MFLogin")
' Approving the Changes while Performing DR Life Cycle
Call DRApprovalFunction()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 43 to 66: Approving t
he Changes made to the DR","The Changes made are Approved Successfully"
Else
Reporter.ReportEvent micFail,"Step 43 to 66: Approving t
he Changes made to the DR","The Changes made are NOT Approved Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Log out and Login with Normal User ID
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
' Logging in with Normal User ID and verfiy if all the changes m
ade are Approved and there are No Flags displayed
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call login("MasterFile","Login Page","User","MFLogin")
Call chkApprovedDR()
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 67 to 84: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are Approved and the Flags are Not Present"
Else
Reporter.ReportEvent micFail,"Step 67 to 84: Verfiying i
f the Modifed Fields are Approved and check for the Flags","The Modifeid Fields
are NOT Approved and the Flags are Present"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++
'------------------------------------------------------- Functi
ons for DR Life Cycle Begins from here -----------------------------------------
-----------
'===============================================================================
============================================
Public Function DRApprovalFunction()
' strModuleName = Split(strModuleNames,";",-1,1)
' For intValCount = 0 to UBound(strModuleName)
' strRequiredModule = strModuleName(intValCount)
' Select Case strRequiredModule
' Case "DR Documen
tation"
'
Call ApprovalFunction_DR("MasterFile",strRequiredModule,"",DataTable.Value("Deta
ils_Name","DRLifeCycle"),"Approved","Approved","Pending Approval")
' Case "Issuer Doc
umentation"
'
Call ApprovalFunction_DR("MasterFile",strRequiredModule ,"",DataTable.Value("Iss
uerName","DRLifeCycle"),"Approved","Approved","Pending Approval")
' Case "CUSIP Prof
ile"
'
Call ApprovalFunction_DR("MasterFile",strRequiredModule,"",DataTable.Value("Sele
ctCUSIPName","DRLifeCycle"),"Approved","Approved","Pending Approval")
' Case "DR Profile
"
' Call ApprovalFunction_DR("MasterFi
le",strModuleName,"",DataTable.Value("Details_Name","DRLifeCycle"),"Approved","A
pproved","Pending Approval")
' End Select
' Next
If DataTable.Value("CreateCUSIP","DRLifeCycle") = "Y" Then
Call ApprovalFunction_DR("MasterFile","CUSIP Profile","N
ame;CUSIP;Last User Updated;Last Updated",DataTable.Value("SelectCUSIPName","DRL
ifeCycle"),"Approved","Approved","Pending Approval")
End If
If DataTable.Value("DRDocumentationRequired","DRLifeCycle") = "Y
" Then
Call ApprovalFunction_DR("MasterFile","DR Documentation"
,"DR Name;DR Type;S/U;Origin;DR Structure;Last User Updated;Last Updated",DataTa
ble.Value("Details_Name","DRLifeCycle"),"Approved","Approved","Pending Approval"
)
End If
If DataTable.Value("IssuerDocumentation","DRLifeCycle") = "Y" T
hen
Call ApprovalFunction_DR("MasterFile","Issuer Documentat
ion","Issuer;Last User Updated;Last Updated",DataTable.Value("Details_Name","DRL
ifeCycle"),"Approved","Approved","Pending Approval")
End If
Call ApprovalFunction_DR("MasterFile","DR Profile","Name;Type;De
positary;S/U;Origin;Structure;Last User Updated;Last Updated",DataTable.Value("D
etails_Name","DRLifeCycle"),"Approved","Approved","Pending Approval")

End Function
'===============================================================================
============================================
Public Function DRApprovalFunction_CorporateAction()
' Approving the Changes made to CUSIP
Call ApprovalFunction_DR("MasterFile","CUSIP Profile","Name;CUSIP;Last U
ser Updated;Last Updated",DataTable.Value("SelectCUSIPName","DRLifeCycle"),"Appr
oved","Approved","Pending Approval")
If DataTable.Value("CheckCorporateActionIssuerFlag","DRLifeCycle
") = "Y" Then
' Approving Underlying Security
Call ApprovalFunction_DR("MasterFile","Underlying Securi
ty","Name;Status;Last User Updated;Last Updated",Environment.Value("UnderlyingSe
curityName"),"Approved","Approved","Pending Approval")
' Approving the Issuer
Call ApprovalFunction_DR("MasterFile","Issuer","Name;Las
t User Updated;Last Updated",DataTable.Value("IssuerName","DRLifeCycle"),"Approv
ed","Approved","Pending Approval")
End If
' Approving the DR
Call ApprovalFunction_DR("MasterFile","DR Profile","Name;Type;De
positary;S/U;Origin;Structure;Last User Updated;Last Updated",DataTable.Value("D
RName","DRLifeCycle"),"Approved","Approved","Pending Approval")

End Function
'===============================================================================
============================================

Public Function chkApprovedDR()


' Click on Master File Link and Select DR Menu from Profile Menu
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","DRLifeCycle"))
' Verifying the Default Values
strStatus = Browser("MasterFile").Page("Profile - DR Search").We
bList("Status").GetROProperty("value")
strDRType = Browser("MasterFile").Page("Profile - DR Search").We
bList("DRType").GetROProperty("value")
strDROrigin = Browser("MasterFile").Page("Profile - DR Search").
WebList("DROrigin").GetROProperty("value")
strCountryofManagement = Browser("MasterFile").Page("Profile - D
R Search").WebList("CountryofManagement").GetROProperty("value")
strSU = Browser("MasterFile").Page("Profile - DR Search").WebLis
t("SU").GetROProperty("value")
strSubstatus = Browser("MasterFile").Page("Profile - DR Search")
.WebList("SubStatus").GetROProperty("value")
strDRExchange = Browser("MasterFile").Page("Profile - DR Search"
).WebList("DRExchange").GetROProperty("value")
If InStr(1,strStatus,"All") <> 0 AND InStr(1,strDRType,"All") <>
0 AND InStr(1,strDROrigin,"All") <> 0 AND InStr(1,strCountryofManagement,"All")
<> 0 AND InStr(1,strSU,"All") <> 0 AND InStr(1,strSubstatus,"All") <> 0 AND InS
tr(1,strDRExchange,"All") <> 0 Then
Reporter.ReportEvent micPass,"Verifying the Default Valu
e of the Fields in DR Search Page","The Default Value of the Fields namely 'Stat
us, DR Type, DR Origin, Country of Management, SU, Substatus and DR Exchange is
' 'ALL'"
Else
Reporter.ReportEvent micFail,"Verifying the Default Valu
e of the Fields in DR Search Page","The Default Value of the Fields namely 'Stat
us, DR Type, DR Origin, Country of Management, SU, Substatus OR DR Exchange is N
OT ' 'ALL'"
Environment.Value("Execution_Log") = "False"
End If
' Check for the Modified DR
Call ModifiedDRSearchCriteria("MasterFile","Profile - DR Search"
,"Search")
Call pageCheck_ImageOR("MasterFile","Profile - DR Search","Clear;Search"
)
Call chkResultinDRTable("MasterFile","Profile - DR Search","DRSearchResu
lts",DataTable.Value("ModifiedDRName","DRLifeCycle"),"Type",DataTable.Value("Upg
radeLevel","DRLifeCycle"))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Results a
re Displayed or NOT","The Results are Dispalyed as per the Search Criteria: Type
= " & DataTable.Value("UpgradeLevel","DRLifeCycle")
Else
Reporter.ReportEvent micPass," Verifying if the Results
are Displayed or NOT","The Results are NOT Dispalyed as per the Search Criteria
: Type = " & DataTable.Value("UpgradeLevel","DRLifeCycle")
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call chkResultinDRTable("MasterFile","Profile - DR Search","DRSe
archResults",DataTable.Value("ModifiedDRName","DRLifeCycle"),"S/U",DataTable.Val
ue("Sponsored","DRLifeCycle"))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Results a
re Displayed or NOT","The Results are Dispalyed as per the Search Criteria: SU =
" & DataTable.Value("Sponsored","DRLifeCycle")
Else
Reporter.ReportEvent micPass," Verifying if the Results
are Displayed or NOT","The Results are NOT Dispalyed as per the Search Criteria
: SU = " & DataTable.Value("Sponsored","DRLifeCycle")
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call chkResultinDRTable("MasterFile","Profile - DR Search","DRSe
archResults",DataTable.Value("ModifiedDRName","DRLifeCycle"),"Status",DataTable.
Value("DRStatus","DRLifeCycle"))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Results a
re Displayed or NOT","The Results are Dispalyed as per the Search Criteria: Stat
us = " & DataTable.Value("ModifiedDRName","DRLifeCycle")
Else
Reporter.ReportEvent micPass," Verifying if the Results
are Displayed or NOT","The Results are NOT Dispalyed as per the Search Criteria
: Status = " & DataTable.Value("ModifiedDRName","DRLifeCycle")
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call chkResultinDRTable("MasterFile","Profile - DR Search","DRSearchResu
lts",DataTable.Value("ModifiedDRName","DRLifeCycle"),"Origin",DataTable.Value("O
rigin","DRLifeCycle"))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verfiying the Value in the
Origin Column","The Value in the Origin Column is " & DataTable.Value("Origin",
"DRLifeCycle")
Else
Reporter.ReportEvent micFail,"Verfiying the Value in the
Origin Column","The Value in the Origin Column is NOT " & DataTable.Value("Orig
in","DRLifeCycle")
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Selecting the Modified DR
If DataTable.Value("Details_Name","DRLifeCycle") <> "" Then
Browser("MasterFile").Page("Profile - DR Search").WebEle
ment("html tag:= TD","innertext:= " & DataTable.Value("Details_Name","DRLifeCycl
e")).Click
Else
Browser("MasterFile").Page("Profile - DR Search").WebEle
ment("html tag:= TD","innertext:= " & DataTable.Value("ModifiedDRName","DRLifeCy
cle")).Click
End If
' Checking for the Flags in the DR Profile Page
Call chkFlagImage("MasterFile","DR Profile","Details","Name;Secu
rity Description;Status;Effective Date","Not Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag Exis
ts in the DR Detail tab or Not","The Flag does not Exist in the DR Details tab"
Else
Reporter.ReportEvent micFail,"Verifying if the Flag Exis
ts in the DR Detail tab or Not","The Flag Still exists in the DR Details tab"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Select CUSIP Summary Tab
Call click_WebElement("MasterFile","DR Profile","CUSIPSummary")
Call FlagImageCheck("MasterFile","DR Profile","CUSIPSummary","Not Exist"
)
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag Exis
ts in the CUSIP Summary Tab or Not","The Flag does not Exist in the CUSIP Summar
y Tab"
Else
Reporter.ReportEvent micFail,"Verifying if the Flag Exis
ts in the CUSIP Summary Tab or Not","The Flag Still Exist in the CUSIP Summary T
ab"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Checking for the CUSIP Details
If DataTable.Value("DRLifeCycleType","DRLifeCycle") = "Upgrade"
Then
intRowCount = Browser("MasterFile").Page("DR Pro
file").WebTable("CUSIPSummary").RowCount
intColumnCount = Browser("MasterFile").Page("DR
Profile").WebTable("CUSIPSummary").ColumnCount(2)
For intColumnCounter = 1 to intColumnCount
intCount = Browser("MasterFile").Page("D
R Profile").WebTable("CUSIPSummary").ChildItemCount(3,intColumnCounter,"WebEdit"
)
If intCount > 0 Then
strCellData2 = Browser("MasterF
ile").Page("DR Profile").WebTable("CUSIPSummary").ChildItem(3,intColumnCounter,"
WebEdit",0).GetROProperty("value")
strAppValue = strAppValue & strC
ellData2 & ":"
End If
Next
If Trim(strAppValue) = Trim(Environment.Value("C
USIPDetails")) Then
Reporter.ReportEvent micPass,"Verfiying
the CUSIP Details","The CUSIP Details before the Approval is same as the Details
after Approving"
Else
Reporter.ReportEvent micFail,"Verfiying
the CUSIP Details","The CUSIP Details before the Approval is NOT same as the Det
ails after Approving"
Reporter.ReportEvent micFail,"Old CUSIP
Data : = " & Environment.Value("CUSIPDetails"),"CUSIP New Data : = " & strAppVal
ue
Environment.Value("Execution_Log") = "Fa
lse"
End If
End If
' Selecting Details Tab
Call click_WebElement("MasterFile","DR Profile","Detail")
strDateValue = Replace(DataTable.Value("Details_EffectiveDate","
DRLifeCycle"),";","-")
strEffectiveDate = get_WebEdit_Value("MasterFile","DR Profile","
Details_EffectiveDate")
strOrigin = get_WebEdit_Value("MasterFile","DR Profile","Details
_Origin")
strStatus = get_WebList_Value("MasterFile","DR Profile","Details
_Status")
strInitialSaleDate = get_WebEdit_Value("MasterFile","DR Profile"
,"InitialSaleDate")
If DateValue(strDateValue) = DateValue(strEffectiveDate) AND str
Origin = DataTable.Value("Origin","DRLifeCycle") AND strStatus = DataTable.Value
("Details_Status","DRLifeCycle") AND Trim(strInitialSaleDate) = "" Then
Reporter.ReportEvent micPass,"Verifying the Details in t
he Fields Effective Date, Origin and the Status","The Value in the Effective Dat
e is " & strEffectiveDate & ", Origin is " & DataTable.Value("Origin","DRLifeCy
cle") & " and Status is " & DataTable.Value("Details_Status","DRLifeCycle")
Else
Reporter.ReportEvent micFail,"Verifying the Details in t
he Fields Effective Date, Origin and the Status","The Value in the Effective Dat
e is NOT " & strEffectiveDate & ", OR Origin is " & DataTable.Value("Origin","D
RLifeCycle") & " OR Status is " & DataTable.Value("Details_Status","DRLifeCycle"
)
Environment.Value("Execution_Log") = "False"
End If
' Verify the Prior and Next
If Browser("MasterFile").Page("DR Profile").WebButton("PriorDR")
.Exist(5) Then
Reporter.ReportEvent micPass,"Verifying if the Prior But
ton is Present or Not","The Prior DR Button is Present"
Call click_WebButton("MasterFile","DR Profile","PriorDR"
)
strNewDRName = get_WebEdit_Value("MasterFile","DR Profil
e","Details_Name")
If strNewDRName = DataTable.Value("DRName","DRLifeCycle"
) Then
Reporter.ReportEvent micPass,"Verifying if the O
ld DR is displayed after clicking on the Prior DR Button","The Old DR " & DataTa
ble.Value("DRName","DRLifeCycle") & " is Displayed after clicking on the Prior D
R Button"
Else
Reporter.ReportEvent micFail,"Verifying if the O
ld DR is displayed after clicking on the Prior DR Button","The Old DR " & DataTa
ble.Value("DRName","DRLifeCycle") & " is NOT Displayed after clicking on the Pri
or DR Button"
Environment.Value("Execution_Log") = "False"
End If
Else
Reporter.ReportEvent micFail,"Verifying if the Prior But
ton is Present or Not","The Prior DR Button is NOT Present"
Environment.Value("Execution_Log") = "False"
End If
If Browser("MasterFile").Page("DR Profile").WebButton("NextDR").
Exist(5) Then
Reporter.ReportEvent micPass,"Verifying if the Next DR B
utton is Present or Not","The Next DR Button is Present"
Call click_WebButton("MasterFile","DR Profile","NextDR")
strNewDRName = get_WebEdit_Value("MasterFile","DR Profil
e","Details_Name")
If strNewDRName = DataTable.Value("Details_Name","DRLife
Cycle") Then
Reporter.ReportEvent micPass,"Verifying if the N
ew DR is displayed after clicking on the Next DR Button","The New DR " & DataTab
le.Value("Details_Name","DRLifeCycle") & " is Displayed after clicking on the Ne
xt DR Button"
Else
Reporter.ReportEvent micFail,"Verifying if the N
ew DR is displayed after clicking on the Prior DR Button","The New DR " & DataTa
ble.Value("Details_Name","DRLifeCycle") & " is NOT Displayed after clicking on t
he Next DR Button"
Environment.Value("Execution_Log") = "False"
End If
Else
Reporter.ReportEvent micFail,"Verifying if the Next DR B
utton is Present or Not","The Next DR Button is NOT Present"
Environment.Value("Execution_Log") = "False"
End If
' Click on the DR Search
Call click_WebElement("MasterFile","DR Profile","DRSearch")
Call chkResultinDRTable("MasterFile","Profile - DR Search","DRSe
archResults",DataTable.Value("DRName","DRLifeCycle"),"Name",DataTable.Value("DRN
ame","DRLifeCycle"))
Call chkResultinDRTable("MasterFile","Profile - DR Search","DRSe
archResults",DataTable.Value("Details_Name","DRLifeCycle"),"Name",DataTable.Valu
e("Details_Name","DRLifeCycle"))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if both the Old
and the New DR is displayed in the Result Table or NOT","Both the Old DR i.e., "
& DataTable.Value("DRName","DRLifeCycle") & " and the New DR " & DataTable.Valu
e("Details_Name","DRLifeCycle") & " is displayed in the Result"
Else
Reporter.ReportEvent micFail,"Verifying if both the Old
and the New DR is displayed in the Result Table or NOT","The Old DR i.e., " & Da
taTable.Value("DRName","DRLifeCycle") & " OR the New DR " & DataTable.Value("Det
ails_Name","DRLifeCycle") & " is NOT displayed in the Result"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Selecting the DR that under went the DR Life Cycle i.e., OLD D
R
Browser("MasterFile").Page("Profile - DR Search").WebElement("ht
ml tag:=TD","innertext:= " & DataTable.Value("DRName","DRLifeCycle"),"index:=1")
.Click
If Browser("MasterFile").Page("DR Profile").Exist(5) Then
strDRName = get_WebEdit_Value("MasterFile","DR Profile",
"Details_Name")
If strDRName = DataTable.Value("DRName","DRLifeCycle") T
hen
Reporter.ReportEvent micPass,"Verifying if the P
age 'DR Profile' is displayed or NOT","The Page 'DR Profile' is displayed with t
he Details of the DR " & DataTable.Value("DRName","DRLifeCycle")
Else
Reporter.ReportEvent micFail,"Verifying if the P
age 'DR Profile' is displayed or NOT","The Page 'DR Profile' is NOT displayed wi
th the Details of the DR " & DataTable.Value("DRName","DRLifeCycle")
Environment.Value("Execution_Log") = "False"
End If
End If
' Termination Reason and Effective Date
If DataTable.Value("TerminationReason","DRLifeCycle") <> "" Then
strTerminationValue = get_WebEdit_Value("MasterFile","DR
Profile","Details_TerminationReason")
If UCase(Trim(strTerminationValue)) = UCase(Trim(DataTab
le.Value("TerminationReason","DRLifeCycle"))) Then
Reporter.ReportEvent micPass,"Verifying if the T
ermination Reason is Dispalyed or NOT","The Termination Reason is displayed in t
he Field and the Value is " & strTerminationValue
Else
Reporter.ReportEvent micFail,"Verifying if the T
ermination Reason is Dispalyed or NOT","The Termination Reason is NOT displayed
in the Field"
Environment.Value("Execution_Log") = "False"
End If
strTerminationDate = get_WebEdit_Value("MasterFile","DR
Profile","Details_TerminationDate")
strEffectiveDate = Replace(DataTable.Value("Details_Effe
ctiveDate","DRLifeCycle"),";","-")
intValue = DateDiff("d",strterminationDate,strEffectiveD
ate)
If intValue = 1 Then
Reporter.ReportEvent micPass,"Verifying if the T
ermination Date is One Day Prior to the Effective Date","The Termination Date is
One Day Prior to the Effective Date"
Else
Reporter.ReportEvent micFail,"Verifying if the T
ermination Date is One Day Prior to the Effective Date","The Termination Date is
NOT One Day Prior to the Effective Date"
Environment.Value("Execution_Log") = "False"
End If
End If
' Need to Check in Create History Tab
Call click_WebElement("MasterFile","DR Profile","Detail")
strLevelType = get_WebEdit_Value("MasterFile","DR Profile","Details_T
ype")
blnExistFlag = Browser("MasterFile").Page("DR Profile").WebElement("C
reateHistoryCUSIP").Exist(5)
If blnExistFlag = "True" AND strLevelType = DataTable.Value("NewDRTyp
e","DRLifeCycle") Then
Reporter.ReportEvent micPass,"Verfiying if the CreateHistoryC
USIP Tab is displayed or Not","The CreateCUSIPHistory tab is displayed with Type
as " & DataTable.Value("NewDRType","DRLifeCycle")
Call click_WebElement("MasterFile","DR Profile","CreateHistor
yCUSIP")
strCUSIPNum = get_WebEdit_Value("MasterFile","DR Profile","CH
_CUSIP")
If DataTable.Value("CUSIP","DRLifeCycle") = strCUSIPNum
Then
Reporter.ReportEvent micPass,"Verfiying if the D
etails of the CUSIP " & DataTable.Value("CUSIP","DRLifeCycle") & " is displayed
or NOT","The Details of the CUSIP " & DataTable.Value("CUSIP","DRLifeCycle") &
" is displayed in the CreateCUSIPHistory tab"
Else
Reporter.ReportEvent micFail,"Verfiying if the D
etails of the CUSIP " & DataTable.Value("CUSIP","DRLifeCycle") & " is displayed
or NOT","The Details of the CUSIP " & DataTable.Value("CUSIP","DRLifeCycle") &
" is NOT displayed in the CreateCUSIPHistory tab"
Reporter.ReportEvent micFail,"Displayed CUSIP No
: = " & strCUSIPNum,"Required CUSIP No: = " & DataTable.Value("CUSIP","DRLifeCyc
le")
Environment.Value("Execution_Log") = "False"
End If
Else
Reporter.ReportEvent micFail,"Verfiying if the CreateHis
toryCUSIP Tab is displayed or Not","The CreateCUSIPHistory tab is NOT displayed
with Type as " & DataTable.Value("NewDRType","DRLifeCycle")
Environment.Value("Execution_Log") = "False"
End If
' Select CUSIP Tab

End Function

'===============================================================================
=============================
Public Function UpdateDR()
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)
strDataPaths = strAllPath & "DataTables\"
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" Then
If DataTable.Value("NewDRType","DRLifeCycle") = "144A" T
hen
DataTable.Value("DRName","DRLifeCycle") = Enviro
nment.Value("DR144A")
DataTable.Value("CUSIPName","DRLifeCycle") = Env
ironment.Value("CUSIP144A")
DataTable.Value("SelectCUSIPName","DRLifeCycle")
= Environment.Value("SelectCUSIP144A")
ElseIf DataTable.Value("NewDRType","DRLifeCycle") = "Reg
. S" Then
DataTable.Value("DRName","DRLifeCycle") = Enviro
nment.Value("DRRegS")
DataTable.Value("CUSIPName","DRLifeCycle") = Env
ironment.Value("CUSIPRegS")
DataTable.Value("SelectCUSIPName","DRLifeCycle")
= Environment.Value("SelectCUSIPRegS")
End If
End If
DataTable.ExportSheet strDataPaths & "DRLifeCycle.xls","DRLifeCy
cle"
DataTable.ImportSheet strDataPaths & "DRLifeCycle.xls","DRLifeCycle","DR
LifeCycle"
' Step 3
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
' Step 4
Call check_Menu("MasterFile","MasterFile",DataTable.Value("MenuP
ath","DRLifeCycle"))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 4: Verifying if the S
ub Menu DR is Present in Profile or NOT","The Sub Menu DR is Present in the Prof
ile Menu"
Else
Reporter.ReportEvent micFail,"Step 4: Verifying if the S
ub Menu DR is Present in Profile or NOT","The Sub Menu DR is NOT Present in the
Profile Menu"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Step 5
Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","DRLifeCycle"))
Call pageCheck_WebEditOR("MasterFile","Profile - DR Search","Iss
uerName;DRName")
Call pageCheck_WebListOR("MasterFile","Profile - DR Search","DRT
ype;DROrigin;CountryofManagement;Status;SubStatus;SU;DRExchange")
Call pageCheck_WebElementinTable("MasterFile","Profile - DR Sear
ch","Name;Country of Management;Type;Status;Sub-Status;S/U;Effective Date;Deposi
tary;Origin;Structure","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 5: Verifying if all t
he Elements are Present in the Page 'Profile -DR Search'","All the Required Fiel
ds are Present in the Page 'Profile - DR Search'"
Else
Reporter.ReportEvent micFail,"Step 5: Verifying if all t
he Fields are Present in the Page 'Profile -DR Search'","All the Required Fields
are NOT Present in the Page 'Profile - DR Search'"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") =False
End If
' Step 6
strStatus = Browser("MasterFile").Page("Profile - DR Search").WebList("S
tatus").GetROProperty("value")
strDRType = Browser("MasterFile").Page("Profile - DR Search").We
bList("DRType").GetROProperty("value")
strDROrigin = Browser("MasterFile").Page("Profile - DR Search").
WebList("DROrigin").GetROProperty("value")
strCountryofManagement = Browser("MasterFile").Page("Profile - D
R Search").WebList("CountryofManagement").GetROProperty("value")
SU = Browser("MasterFile").Page("Profile - DR Search").WebList("
SU").GetROProperty("value")
strSubstatus = Browser("MasterFile").Page("Profile - DR Search")
.WebList("SubStatus").GetROProperty("value")
strDRExchange = Browser("MasterFile").Page("Profile - DR Search"
).WebList("DRExchange").GetROProperty("value")
If Instr(1,strStatus,"All") <> 0 And Instr(1,strDRType,"All") <>
0 And Instr(1,strDROrigin,"All") <> 0 And Instr(1,strCountryofManagement,"All")
<> 0 And Instr(1,SU,"All") <> 0 And Instr(1,strSubstatus,"All") <> 0 And Instr(
1,strDRExchange,"All") <> 0 Then
Reporter.ReportEvent micPass,"Verifying the Default Valu
es of Fields in the Profile - DR Search page","The Default Values of the Fields
are 'All' "
Else
Reporter.ReportEvent micFail,"Verifying the Default Valu
es of Fields in the Profile - DR Search page","The Default Values of the Fields
areNOT 'All' "
Environment.Value("Execution_Log") = "False"
End If
' Search for DR
Call DRSearchCriteria("MasterFile","Profile - DR Search","Search
")
Call pageCheck_ImageOR("MasterFile","Profile - DR Search","Clear
;Search")
'Call chkResultinTable("MasterFile","Profile - DR Search","DRSea
rchResults","Name",DataTable.Value("DRName","DRLifeCycle"))
Call chkResultinTable("MasterFile","Profile - DR Search","DRSear
chResults","Type",DataTable.Value("NewDRType","DRLifeCycle"))
Call chkResultinTable("MasterFile","Profile - DR Search","DRSear
chResults","S/U",DataTable.Value("Sponsored","DRLifeCycle"))
Call chkResultinTable("MasterFile","Profile - DR Search","DRSear
chResults","Status",DataTable.Value("DRStatus","DRLifeCycle"))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 6: Verifying if the R
esults are Displayed or NOT","The Results are Dispalyed as per the Search Criter
ia"
Else
Reporter.ReportEvent micFail,"Step 6: Verifying if the R
esults are Displayed or NOT","The Results are NOT Dispalyed as per the Search Cr
iteria"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Step 7: Selecting a DR
Browser("MasterFile").Page("Profile - DR Search").WebElement("ht
ml tag:=TD","innertext:=" & DataTable.Value("DRName","DRLifeCycle"),"index:=2").
Click
Wait (5)
If Browser("MasterFile").Page("DR Profile").Exist(5) Then
strName = get_WebEdit_Value("MasterFile","DR Profile","D
etails_Name")
If Trim(UCase(strName)) = Trim(UCase(DataTable.Value("DR
Name","DRLifeCycle"))) Then
Reporter.ReportEvent micPass,"Step 7: Verifiyng
if the Details of the DR is Displayed or NOT","The Details of the DR " & DataTab
le.Value("DRName","DRLifeCycle") & " is displayed"
Else
Reporter.ReportEvent micFail,"Step 7: Verifiyng
if the Details of the DR is Displayed or NOT","The Details of the DR " & DataTab
le.Value("DRName","DRLifeCycle") & " NOT is displayed"
Environment.Value("Execution_Log") = "False"
End If
End If
' Step 8: Selecting DR Life Cycle
Call click_WebElement("MasterFile","DR Profile","DRLifeCycle")
strDRName = Browser("DR Lifecycle").Page("DR Lifecycle").WebTabl
e("DR").GetCellData(1,2)
strCountry = Browser("DR Lifecycle").Page("DR Lifecycle").WebTab
le("DR").GetCellData(1,4)
blnFlag = "False"
If UCase(Trim(strDRName)) = UCase(Trim(DataTable.Value("DRName","DRLifeC
ycle"))) Then
blnFlag = "True"
End If
Call pageCheck_ImageOR("DR Lifecycle","DR Lifecycle","CreateNewD
R;Cancel")
Call pageCheck_WebRadioGroupOR("DR Lifecycle","DR Lifecycle","Up
grade")
strSUValue = get_WebList_Value("DR Lifecycle","DR Lifecycle","SU
")
strDepositary = get_WebEdit_Value("DR Lifecycle","DR Lifecycle",
"Depositary")
' Step 9
Browser("DR Lifecycle").Page("DR Lifecycle").WebRadioGroup("Upgr
ade").Select DataTable("RadioGroupValue","DRLifeCycle")
' Select the Level to UPGrade
If DataTable.Value("DRLifeCycleType","DRLifeCycle") = "Upgrade"
Then
strAllItems = Browser("DR Lifecycle").Page("DR Lifecycle").WebList("
Upgrade").GetROProperty("all items")
Call Select_Combo_Value("DR Lifecycle","DR Lifecycle","Upgrade",Data
Table.Value("UpgradeLevel","DRLifeCycle"))
End If
' PPC
If DataTable.Value("DRLifeCycleType","DRLifeCycle") = "PPC" Then
strAllItems = Browser("DR Lifecycle").Page("DR Lifecycle").WebList("
PPCType").GetROProperty("all items")
Call Select_Combo_Value("DR Lifecycle","DR Lifecycle","P
PCType",DataTable.Value("UpgradeLevel","DRLifeCycle"))
End If
' Delisting
If DataTable.Value("DRLifeCycleType","DRLifeCycle") = "Delistin
g" Then
strAllItems = Browser("DR Lifecycle").Page("DR Lifecycle").WebList(
"Delist").GetROProperty("all items")
Call Select_Combo_Value("DR Lifecycle","DR Lifecycle","D
elist",DataTable.Value("UpgradeLevel","DRLifeCycle"))
End If
blnFlag = "True"
strNotRequiredValue = DataTable.Value("NewDRType","DRLifeCycle")
strAppItems = Split(strAllItems,";",-1,1)
For intCounters = 0 to UBound(strAppItems)
If strAppItems(intCounters) = strNotRequiredValue Then
blnFlag = "False"
End If
Next
If blnFlag = "True" AND strSUValue = DataTable("Sponsored","DRL
ifeCycle") AND blnFlag = "True" AND strDepositary = "" Then
Reporter.ReportEvent micPass,"Step 8: Verfiying the Fiel
ds Present and Values in few Fields","The Required Fields are Present and the Re
quired Values are Dispalyed in the Fields"
Else
Reporter.ReportEvent micFail,"Step 8: Verfiying the Fiel
ds Present and Values in few Fields","The Required Fields are NOT Present OR the
Required Values are NOT Dispalyed in the Fields"
'Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Selecting Sponsored or Unsponsored
If DataTable.Value("ModifiedSU","DRLifeCycle") <> "" Then
Call Select_Combo_Value("DR Lifecycle","DR Lifecycle","S
U",DataTable.Value("ModifiedSU","DRLifeCycle"))
End If
' Selecting the Depository
If DataTable.Value("Depositary","DRLifeCycle") <> "" Then
Call click_Image("DR Lifecycle","DR Lifecycle","Depositary")
intRowCount = Browser("DR Lifecycle").Page("DR Lifecycle
").Frame("lookupFrame").WebTable("Depositaries").RowCount
For intRowCounter = 1 to intRowCount
strName = Browser("DR Lifecycle").Page("DR Lifec
ycle").Frame("lookupFrame").WebTable("Depositaries").GetCellData(intRowCounter,2
)
If UCase(strName) = Ucase(DataTable.Value("Depos
itary","DRLifeCycle")) Then
intRC = intRowCounter
Exit For
End If
Next
Browser("DR Lifecycle").Page("DR Lifecycle").Frame("look
upFrame").WebTable("Depositaries").ChildItem(intRC,1,"WebCheckBox","0").Click
Browser("DR Lifecycle").Page("DR Lifecycle").Frame("look
upFrame").WebButton("Ok").Click
End If

Call click_WebButton("DR Lifecycle","DR Lifecycle","CreateNewDR"


)
Wait(5)
strOrigin = get_WebEdit_Value("MasterFile","DR Profile","Details
_Origin")
strDRType = get_WebEdit_Value("MasterFile","DR Profile","Detail
s_Type")
strStatus = get_WebList_Value("MasterFile","DR Profile","Details
_Status")
Call chkWebEditReadOnly("MasterFile","DR Profile","Details_Type"
,"ReadOnly")
If DataTable.Value("UpgradeLevel","DRLifeCycle") <> "" Then
strDataDRType = DataTable.Value("UpgradeLevel","DRLifeCy
cle")
Else
strDataDRType = DataTable.Value("NewDRType","DRLifeCycle
")
End If
If DataTable.Value("Origin","DRLifeCycle") <> "" Then
strDataOrigin = DataTable.Value("Origin","DRLifeCycle")
If strDRType = strDataDRType AND strOrigin = DataTable.V
alue("Origin","DRLifeCycle") AND strStatus = DataTable.Value("Status","DRLifeCyc
le") AND Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 9: Verifying
if the Required Details are Dispalyed","The Required Details namely Type : = " &
strDRType & " Status := " & strStatus & " and Origin := " & strOrigin & " are D
ispalyed"
Else
Reporter.ReportEvent micFail,"Step 9: Verifying
if the Required Details are Dispalyed","The Required Details namely Type : = " &
strDRType & " Status := " & strStatus & " and Origin := " & strOrigin & " are N
ot Dispalyed"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Else
If strDRType = strDataDRType AND strStatus = DataTable.V
alue("Status","DRLifeCycle") AND Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 9: Verifying
if the Required Details are Dispalyed","The Required Details namely Type : = " &
strDRType & " Status := " & strStatus & " are Dispalyed"
Else
Reporter.ReportEvent micFail,"Step 9: Verifying
if the Required Details are Dispalyed","The Required Details namely Type : = " &
strDRType & " Status := " & strStatus & " are Not Dispalyed"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
End If

' Step 10, 11


Call ChangeDRDetails("MasterFile","DR Profile","Save")
Call chkFlagImage("MasterFile","DR Profile","Details","Name;Effe
ctive Date;Status;Security Description","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 10, 11: Verifiyng if
the Flag Exists Next to the Modified Field","The Modified Flag Exists Next to th
e Modified Field"
Else
Reporter.ReportEvent micPass,"Step 10,11: Verifiyng if t
he Flag Exists Next to the Modified Field","The Modified Falg Exists Next to th
e Modified Field"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Filling the SEC Filing Tab if Empty
If DataTable.Value("DRDocumentationRequired","DRLifeCycle") = "Y
" Then
Call DRFillSECFiling()
End If
' Step 12 : Select CUSIP Tab
Call click_WebElement("MasterFile","DR Profile","CUSIPSummary")
Call pageCheck_WebElementinTable("MasterFile","DR Profile","Type
;CUSIP;DR Exchange;DR Ticker Symbol;Ratio DRs;Ratio Underlying Shares;Current CU
SIP","")
Call pageCheck_WebButton("MasterFile","DR Profile","Add","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 12: Verifying if the
Required Fields are Present in the CUSIP Summary Tab","The Required Fields are P
resent in the CUSIP Summary tab"
Else
Reporter.ReportEvent micFail,"Step 12: Verifying if the
Required Fields are Present in the CUSIP Summary Tab","The Required Fields are N
OT Present in the CUSIP Summary tab"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Step 13: Click on Add Button
initialRowCount = Browser("MasterFile").Page("DR Profile").WebTa
ble("CUSIPSummary").RowCount
Call click_WebButton("MasterFile","DR Profile","Add")
FinalRowCount = Browser("MasterFile").Page("DR Profile").WebTable("CUSIP
Summary").RowCount
If FinalRowCount = initialRowCount + 1 Then
Reporter.ReportEvent micPass,"Step 13: Verfiying if the
New Row is added on Click of Add button","A New Row is added With the Required F
ields on Click of Add Button"
Else
Reporter.ReportEvent micFail,"Step 13: Verfiying if the
New Row is added on Click of Add button","A New Row is NOT added With the Requir
ed Fields on Click of Add Button"
Environment.Value("Execution_Log") = "False"
End If
' Step 14, 15, 16
' Selecting the Type of CUSIP
Browser("MasterFile").Page("DR Profile").WebTable("CUSIPSummary"
).ChildItem(FinalRowCount,1,"WebList","0").Select DataTable.Value("CUSIP_Type","
DRLifeCycle")
If DataTable.Value("CreateCUSIP","DRLifeCycle") = "Y" Then
intRowCount = Browser("MasterFile").Page("DR Profile").W
ebTable("CUSIPSummary").RowCount
intColumnCount = Browser("MasterFile").Page("DR Profile"
).WebTable("CUSIPSummary").ColumnCount(intRowCount)
For intColumnCounter = 1 to intColumnCount
intImageCount = Browser("MasterFile").Page("DR P
rofile").WebTable("CUSIPSummary").ChildItemCount(intRowCount,intColumnCounter,"I
mage")
If intImageCount > 0 Then
strFileName = Browser("MasterFile").Page
("DR Profile").WebTable("CUSIPSummary").ChildItem(intRowCount,intColumnCounter,"
Image","0").GetROProperty("file name")
If strFileName = "editbutton.gif" Then
Browser("MasterFile").Page("DR P
rofile").WebTable("CUSIPSummary").ChildItem(intRowCount,intColumnCounter,"Image"
,"0").Click
Wait 5
Exit For
End If
End If
Next
' Creating a New CUSIP
Call CreateNewCUSIPForDR("MasterFile","CUSIP Profile","Save")
' Entering the Warrent Details
If DataTable.Value("WarrentRequired","DRLifeCycl
e") = "Y" Then
If Browser("MasterFile").Page("CUSIP Pro
file").Exist(5) Then
Call click_Image("MasterFile","C
USIP Profile","WarrantAgent")
'Call SelectValueinFrame("Master
File","CUSIP Profile","lookupFrame","Name")
Browser("MasterFile").Page("CUSI
P Profile").WebElement("html tag:=TD","innertext:="& DataTable.Value("WarrentAge
nt","DRLifeCycle")).Click
' Setting the Distribution Date
Call click_Image("MasterFile","C
USIP Profile","DistributionDate")
Call SetDate("MasterFile","CUSIP
Profile",DataTable.Value("DistributionDate","DRLifeCycle"))
' Setting the Expiration Date
Call click_Image("MasterFile","C
USIP Profile","ExpirationDate")
Call SetDate("MasterFile","CUSIP
Profile",DataTable.Value("ExpirationDate","DRLifeCycle"))
Call click_Image("MasterFile","C
USIP Profile","Save")
Call chkFlagImage("MasterFile","
CUSIP Profile","Warrants","Warrent Agent;Distribution Date;Expiration Date","Exi
st")
If Environment.Value("TestCase_L
og") = "True" Then
Reporter.ReportEvent mic
Pass,"Verifying if the Flag is displayed Next to Modified Fields in Warrent Tab"
,"The Flags are Displayed next to the Modified Fields in Warrent Tab"
Else
Reporter.ReportEvent mic
Fail,"Verifying if the Flag is displayed Next to Modified Fields in Warrent Tab"
,"The Flags are NOT Displayed next to the Modified Fields in Warrent Tab"
Environment.Value("TestC
ase_Log") = "True"
Environment.Value("Execu
tion_Log") = "False"
End If
' Selecting the DR Element
strDRValues = Browser("MasterFil
e").Page("CUSIP Profile").WebTable("DR").GetCellData(1,2)
Browser("MasterFile").Page("CUSI
P Profile").WebElement("html tag:=TD","innertext:="& strDRValues,"index:=0").Cli
ck
End If
End If
Else
Call SelectExistingCUSIP()
Call click_Image("MasterFile","DR Profile","Save")
End If
Call click_WebElement("MasterFile","DR Profile","CUSIPSummary")
intRowCount = Browser("MasterFile").Page("DR Profile").WebTable(
"CUSIPSummary").RowCount
intColumnCount = Browser("MasterFile").Page("DR Profile").WebTab
le("CUSIPSummary").ColumnCount(2)
strAppValue1 = ""
For intColumnCounter = 1 to intColumnCount
intCount = Browser("MasterFile").Page("DR Profile").WebT
able("CUSIPSummary").ChildItemCount(3,intColumnCounter,"WebEdit")
If intCount > 0 Then
strCellData2 = Browser("MasterFile").Page("DR P
rofile").WebTable("CUSIPSummary").ChildItem(3,intColumnCounter,"WebEdit",0).GetR
OProperty("value")
strAppValue1 = strAppValue1 & strCellData2 & ":
"
End If
Next
' Capturing the CUSIP Details
Environment.Value("CUSIPDetails") = strAppValue1
intRowCount = Browser("MasterFile").Page("DR Profile").WebTable(
"CUSIPSummary").RowCount
For intColumnCount = 1 to 7
intCount = Browser("MasterFile").Page("DR Profile").WebT
able("CUSIPSummary").ChildItemCount(intRowCount,intColumnCount,"WebEdit")
If intCount > 0 Then
strValue = Browser("MasterFile").Page("DR Profil
e").WebTable("CUSIPSummary").ChildItem(intRowCount,i,"WebEdit","0").GetRoPropert
y("value")
If strValue <> "" Then
Reporter.ReportEvent micPass,"Step 14,15
: Verfiying if the CUSIP Details are displayed or NOT","The CUSIP Details are D
isplayed"
Else
Reporter.ReportEvent micFail,"Step 14,15
: Verfiying if the CUSIP Details are displayed or NOT","The CUSIP Details are N
OT Displayed"
Environment.Value("Execution_Log") = "Fa
lse"
End If
End If
Next
' Check for the Flag
Call FlagImageCheck("MasterFile","DR Profile","CUSIPSummary","Ex
ist")
blnFlag = "False"
If Browser("MasterFile").Page("DR Profile").WebElement("CreateHi
storyCUSIP").Exist(2) Then
blnFlag = "True"
End If
If Environment.Value("TestCase_Log") = "True" AND blnFlag = "Tru
e" Then
Reporter.ReportEvent micPass,"Step 16: Verifying if the
Flag is Dispalyed in CUSIP Summary tab and the Tab Create / History CUSIP is Dis
palyed or NOT","The Flag is Displayed CUSIP Summary tab and the Tab Create / His
tory CUSIP is dispalyed"
Else
Reporter.ReportEvent micFail,"Step 16: Verifying if the
Flag is Dispalyed CUSIP Summary tab and the Tab Create / History CUSIP is Dispal
yed or NOT","The Flag is NOT Displayed CUSIP Summary tab OR the Tab Create / His
tory CUSIP is NOT dispalyed"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Step 17 : History CUSIP
Call click_WebElement("MasterFile","DR Profile","CreateHistoryCUSIP")
Call pageCheck_WebEditOR("MasterFile","DR Profile","CH_CUSIP;CH_
RatioDRs;CH_RatioUnderlyingShares;CH_DRISIN;CH_TickerSymbol;CH_SEDOL;CH_CommonCo
de;CH_Exchange;CH_PreReleaseLimit;CH_SpecialistFirm;CH_CommonDepository")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 17: Verifying if the
Required Fields are Present in the Tab Create / History CUSIP","The Required Fie
lds are Present in the Tab Create / History CUSIP"
Else
Reporter.ReportEvent micFail,"Step 17: Verifying if the
Required Fields are Present in the Tab Create / History CUSIP","The Required Fie
lds are NOT Present in the Tab Create / History CUSIP"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Step 18
Call SelectImage("MasterFile","DR Profile","CUSIPInformation","E
xchange","info.gif")
'Call click_Image("MasterFile","DR Profile","CH_Exchange")
Call SelectDRExchange("MasterFile","DR Profile","DR",DataTable.V
alue("CH_Exchange","DRLifeCycle"))
' strValue = DataTable.Value("CH_Exchange","DRLifeCycle")
' Browser("MasterFile").Page("DR Profile").WebElement("html tag:=T
D","innertext:= " & strValue).Click
strExchange = get_WebEdit_Value("MasterFile","DR Profile","CH_Ex
change")
blnFlag = "False"
If strExchange = DataTable.Value("CH_Exchange","DRLifeCycle") Th
en
Reporter.ReportEvent micPass,"Verifying the Value in the
Exchange Field","The Value in the Exchange Field is " & DataTable.Value("CH_Exc
hange","DRLifeCycle")
blnFlag = "True"
Else
Reporter.ReportEvent micFail,"Verifying the Value in the
Exchange Field","The Value in the Exchange Field is NOT " & DataTable.Value("CH
_Exchange","DRLifeCycle")
Environment.Value("Execution_Log") = "False"
End If
Call click_Image("MasterFile","DR Profile","Save")
Call chkFlagImage("MasterFile","DR Profile","CUSIPInformation","
Exchange","Exist")
If Environment.Value("TestCase_Log") = "True" AND blnFlag = "Tru
e" Then
Reporter.ReportEvent micPass,"Step 18: Verfiying if the
Flag Exists or Not","The Flag Exist Next to the Modified Field"
Else
Reporter.ReportEvent micFail,"Step 18: Verfiying if the
Flag Exists or Not","The Flag does NOT Exist Next to the Modified Field"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Step 19, 20
Call click_WebElement("MasterFile","DR Profile","Detail")
Call Select_Combo_Value("MasterFile","DR Profile","Details_Statu
s",DataTable.Value("Details_Status","DRLifeCycle"))
Call click_Image("MasterFile","DR Profile","Save")
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(5)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("Cancel").Click
' strAppValues = Browser("MasterFile").Dialog("Microsoft I
nternet Explorer").Static("MessageText").GetROProperty("text")
' strReqValue = ""
' If strAppValues = strReqValue Then
' Reporter.ReportEvent micPass,"Step 19: Verifying
if the Dialog is Displayed with the Required text or NOT","The Dialog is displa
yed with the text " & strReqValue
' Else
' Reporter.ReportEvent micFail,"Step 19: Verifying
if the Dialog is Displayed with the Required text or NOT","The Dialog is NOT di
splayed with the text " & strReqValue
' Environment.Value("Execution_Log") = "False"
' End If
' Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("Cancel").Click
' If Browser("MasterFile").Page("DR Profile").WebTable("Er
rorMessage").Exist(5) Then
' strInnerText = Browser("MasterFile").Page("DR Pr
ofile").WebTable("ErrorMessage").GetROProperty("innertext")
' strRequiredText = "DR Documentation had not been
entered"
' If Instr(1,strInnerText,strRequiredtext) <> 0 Th
en
' Reporter.ReportEvent micPass,"Step 20: V
erifying if a Error Message is Displayed","An Error Message is Dispalyed with th
e Error " & strRequiredText
' Else
' Reporter.ReportEvent micFail,"Step 20: V
erifying if a Error Message is Displayed","An Error Message is NOT Dispalyed wit
h the Error " & strRequiredText
' Environment.Value("Execution_Log") = "Fa
lse"
' End If
' End If
' Else
' Reporter.ReportEvent micWarning,"Step 19, 20: Verify if
the Dialog is Displayed or NOT","The Dialog is Not displayed"
End If
Wait(5)
If Browser("MasterFile").Page("DR Profile").WebEdit("Details_SU").Exist(
5) Then
strSUValue = Browser("MasterFile").Page("DR Profile").We
bEdit("Details_SU").GetROProperty("value")
Environment.Value("SponserUnsponser") = strSUValue
End If
If DataTable.Value("NewDRDepositary","DRLifeCycle") = "BNY" or D
ataTable.Value("Depositary","DRLifeCycle") = "BNY" Then
Call DRFillSECFiling()
End If
' Step 21 : DR Documentation
If DataTable.Value("DRDocumentationRequired","DRLifeCycle") = "Y
" Then
Call DRDocumentation()
End If
' Step 31 to 38, 39
If DataTable.Value("IssuerDocumentation","DRLifeCycle") = "Y" Th
en
Call DRIssuerDocumentation()
Call click_WebElement("MasterFile","Issuer Profile","DRS
earch")
If Browser("MasterFile").Dialog("Microsoft Internet Expl
orer").Exist(5) Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
Else
Call click_WebElement("MasterFile","DR Profile","DRSearc
h")
If Browser("MasterFile").Dialog("Microsoft Internet Expl
orer").Exist(5) Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
Wait(5)
If Browser("MasterFile").Page("DR Profile").Exist(5) The
n
Call click_WebElement("MasterFile","DR Profile",
"DRSearch")
If Browser("MasterFile").Dialog("Microsoft Inter
net Explorer").Exist(5) Then
Browser("MasterFile").Dialog("Microsoft
Internet Explorer").WinButton("Cancel").Click
End If
End If
End If
Wait(5)
intColumnCount = Browser("MasterFile").Page("Profile - DR Searc
h").WebTable("DRSearchResults").ColumnCount(2)
For intColumnCounter = 1 to intColumnCount
strCellData = Browser("MasterFile").Page("Profil
e - DR Search").WebTable("DRSearchResults").GetCellData(2,intColumnCounter)
If strCellData = "Status" Then
intColumn = intColumnCounter
Exit For
End If
Next
strOldDRNameRow = Browser("MasterFile").Page("Profile - DR Search").WebT
able("DRSearchResults").GetRowWithCellText(DataTable.Value("DRName","DRLifeCycle
"))
If strOldDRNameRow <> -1 Then
strOldDRStatus = Browser("MasterFile").Page("Profile - D
R Search").WebTable("DRSearchResults").GetCellData(strOldDRNameRow,intColumn)
If InStr(1,strOldDRStatus,"Effective") <> 0 Then
Reporter.ReportEvent micPass,"Step 39: Verfiying
the Status of the Old DR","The Status of the Old DR is " & strOldDRStatus
Else
Reporter.ReportEvent micFail,"Step 39: Verfiying
the Status of the Old DR","The Status of the Old DR is NOT " & strOldDRStatus
Environment.Value("Execution_Log") = "False"
End If
End If
strNewDRNameRow = Browser("MasterFile").Page("Profile - DR Searc
h").WebTable("DRSearchResults").GetRowWithCellText(DataTable.Value("Details_Name
","DRLifeCycle"))
If strNewDRNameRow <> -1 Then
strNewDRStatus = Browser("MasterFile").Page("Profile - D
R Search").WebTable("DRSearchResults").GetCellData(strNewDRNameRow,intColumn)
If InStr(1,strNewDRStatus,"Committed") <> 0 Then
Reporter.ReportEvent micPass,"Step 39: Verfiying
the Status of the Old DR","The Status of the New DR is " & strNewDRStatus
Else
Reporter.ReportEvent micFail,"Step 39: Verfiying
the Status of the Old DR","The Status of the New DR is NOT " & strNewDRStatus
Environment.Value("Execution_Log") = "False"
End If
End If
' Selecting the New DR and Chnage the Status to Effective
Browser("MasterFile").Page("Profile - DR Search").WebElement("ht
ml tag:=TD","innertext:=" & DataTable.Value("Details_Name","DRLifeCycle"),"index
:=1").Click
Wait(10)
' Checking for Name
' intRowCount = Browser("MasterFile").Page("Profile - DR Search").
WebTable("DRSearchResults").RowCount
' For intRowCounter = 1 to intRowCount
' strAppValue = Browser("MasterFile").Page("Profile - DR S
earch").WebTable("DRSearchResults").GetCellData(intRowCounter,1)
' If UCase(Trim(strAppValue)) = UCase(Trim(DataTable.Value
("Details_Name","DRLifeCycle"))) Then
' strStatus = Browser("MasterFile").Page("Profile
- DR Search").WebTable("DRSearchResults").GetCellData(intRowCounter,intColumn)
' If strStaus = "Committed" Then
' Browser("MasterFile").Page("Profile - DR
Search").WebElement("html tag:=TD","innertext:= " & strAppValue,"index:=0").Cli
ck
' Exit For
' End If
' End If
' Next
strName = get_WebEdit_Value("MasterFile","DR Profile","Details_N
ame")
If strName = DataTable.Value("Details_Name","DRLifeCycle") Then
Reporter.ReportEvent micPass,"Step 40: Verifying if the
DR is Opened or NOT","The DR " & DataTable.Value("Details_Name","DRLifeCycle") &
" is Opened Successfully"
Else
Reporter.ReportEvent micFail,"Step 40: Verifying if the
DR is Opened or NOT","The DR " & DataTable.Value("Details_Name","DRLifeCycle") &
" is NOT Opened Successfully"
Environment.Value("Execution_Log") = "False"
End If
' Step 41: Change it to Effective
Call Select_Combo_Value("MasterFile","DR Profile","Details_Statu
s",DataTable.Value("Details_Status","DRLifeCycle"))
Call click_Image("MasterFile","DR Profile","Save")
strStatusValue = get_WebList_Value("MasterFile","DR Profile","De
tails_Status")
If Trim(strStatusValue) = Trim(DataTable.Value("Details_Status",
"DRLifeCycle")) Then
Reporter.ReportEvent micPass,"Step 41: Verfiying the Sta
tus of the DR","The DR is in " & DataTable.Value("Details_Status","DRLifeCycle")
& "State"
Else
Reporter.ReportEvent micFail,"Step 41: Verfiying the Sta
tus of the DR","The DR is NOT in " & DataTable.Value("Details_Status","DRLifeCyc
le") & "State"
Environment.Value("Execution_Log") = "False"
'Exit Function
End If
Call logoutfromApp("MasterFile","DR Profile")
End Function
'-------------------------------------------------------------------------------
--------------------------------------------------------------------------------
------------------------------------------
Public Function DRSearchCriteria(strBrowserName,strPageName,strImageName)
If DataTable.Value("IssuerName","DRLifeCycle") <> "" Then
Call set_WebEdit_Value(strBrowserName,strPageName,"IssuerName",DataTa
ble.Value("IssuerName","DRLifeCycle"))
End If
If DataTable.Value("DRName","DRLifeCycle") <> "" Then
Call set_WebEdit_Value(strBrowserName,strPageName,"DRName",DataTable.
Value("DRName","DRLifeCycle"))
End If
If DataTable.Value("NewDRType","DRLifeCycle") <> "" Then
Call Select_Combo_Value(strBrowserName,strPageName,"DRType",DataTable
.Value("NewDRType","DRLifeCycle"))
End If
If DataTable.Value("Sponsored","DRLifeCycle") <> "" Then
Call Select_Combo_Value(strBrowserName,strPageName,"SU",DataTable.Val
ue("Sponsored","DRLifeCycle"))
End If
If DataTable.Value("DRStatus","DRLifeCycle") <> "" Then
Call Select_Combo_Value(strBrowserName,strPageName,"Status",DataTable
.Value("DRStatus","DRLifeCycle"))
End If
Call Click_Image(strBrowserName,strPageName,strImageName)
End Function

'===============================================================================
' Written for Underlying Notification
Public Function chkResultinDRTable(strBrowserName, strPageName, strTableName, st
rDRName, strColumnName, strColumnValue)
' Gets the Column Number of the Column thats Needs to be verifie
d
blnExistFlag = "True"
blnFlag = "False"
intRowCount = Browser(strBrowserName).Page(strPageName).WebTable(strTabl
eName).RowCount
For intRowCounter = 1 To intRowCount
intColumnCount = Browser(strBrowserName).Page(strPageName).WebTable(
strTableName).ColumnCount(intRowCounter)
For intColumnCounter = 1 To intColumnCount
strCellData = Browser(strBrowserName).Page(strPageName).WebTable
(strTableName).GetCellData(intRowCounter, intColumnCounter)
If strCellData = strColumnName Then
intColumn = intColumnCounter
'intRow = intRowCounter
blnFlag = "True"
Exit For
End If
Next
If blnFlag = "True" Then
Exit For
End If
Next
' Gets the Row Number of the DR
blnFlag = "False"
intRowCount = Browser(strBrowserName).Page(strPageName).WebTable
(strTableName).RowCount
For intRowCounter = 1 To intRowCount
' intColumnCount = Browser(strBrowserName).Page(strPageName).WebTable
(strTableName).ColumnCount(intRowCounter)
' For intColumnCounter = 1 To intColumnCount
strCellData = Browser(strBrowserName).Page(strPageName).WebTable
(strTableName).GetCellData(intRowCounter, 1)
If UCase(Trim(strCellData)) = UCase(Trim(strDRName)) Then
intRow = intRowCounter
blnFlag = "True"
Exit For
End If
Next
' If blnFlag = "True" Then
' Exit For
' End If
'Next
' Checks for the Value in that Particlar Column in that Row
strReqValue = Browser(strBrowserName).Page(strPageName).WebTable(strTabl
eName).GetCellData(intRow,intColumn)
If UCase(Trim(strReqValue)) = UCase(Trim(strColumnValue)) Then
Reporter.ReportEvent micPass,"Verfiying if the Required
Value is dispalyed in the Column","The Value dispalyed in the Column "& strColum
nName & " is " & strColumnValue
Else
Reporter.ReportEvent micFail,"Verfiying if the Required
Value is dispalyed in the Column","The Value dispalyed in the Column "& strColum
nName & "is NOT " & strColumnValue
Environment.Value("Execution_Log") = "False"
Environment.Value("TestCase_Log") = "False"
End If

' If blnExistFlag = "True" Then


' Reporter.ReportEvent micPass, "Verifying if the Search Result are D
ispalyed based on the Search Criteria", "The Search Results are dispalyed based
on the Search Criteria " & strEnteredData
' Else
' Reporter.ReportEvent micFail, "Verifying if the Search Result are D
ispalyed based on the Search Criteria", "The Search Results are NOT dispalyed ba
sed on the Search Criteria " & strEnteredData
' Environment.Value("TestCase_Log") = "False"
' Environment.Value("Execution_Log") = "False"
' End If
End Function
'===============================================================================
=
Public Function ChangeDRDetails(strBrowserName,strPageName,strImageName)
strModifiedDRName = DataTable.Value("DRName","DRLifeCycle") & "_TC"
DataTable.Value("Details_Name","DRLifeCycle") = strModifiedDRName
strVar1 = Environment("TestDir")
strIndVar1 = Split(strVar1,"\",-1,1)
strBound = UBound(strIndVar1)
strAllPath1 =""
For intCounters = 0 to strBound - 1
strAllPath1 = strAllPath1 & strIndVar1(intCounters) &"\"
Next
strPath1 = Trim(strPath1)
strDataPath1 = strAllPath1 & "DataTables\"
strOldDRName = DataTable.Value("DRName","DRLifeCycle")
strModifiedDRName = strOldDRName&"_Modified"
DataTable.Value("ModifiedDRName","DRLifeCycle") = strModifiedDRName
DataTable.Value("Details_Name","DRLifeCycle") = strModifiedDRName
DataTable.ExportSheet strDataPath1 &"DRLifeCycle.xls","DRLifeCycle"
DataTable.ImportSheet strDataPath1 &"DRLifeCycle.xls","DRLifeCycle","DRL
ifeCycle"
' DataTable.ExportSheet strDataPath1 & "DRLifeCycle.xls","DRLifeCycle"
' 'DataTable.AddSheet "DRLifeCycle"
' DataTable.ImportSheet strDataPath1 & "MasterFileProfile.xls","DRLifeCycl
e","DRLifeCycle"
If DataTable.Value("Details_Name","DRLifeCycle") <> "" Then
Call set_WebEdit_Value(strBrowserName,strPageName,"Details_Name",Data
Table.Value("Details_Name","DRLifeCycle"))
End If
If DataTable.Value("Details_EffectiveDate","DRLifeCycle") <> "" Then
Call SelectImage("MasterFile","DR Profile","Details","Effective
Date","show-calendar.gif")
'Call click_Image(strBrowserName,strPageName,"Details_EffectiveDate")
Call SetDate(strBrowserName,strPageName,DataTable.Value("Details_Effe
ctiveDate","DRLifeCycle"))
If Browser(strBrowserName).Dialog("Microsoft Internet Explorer").Exis
t(2) Then
strMessageText = Browser(strBrowserName).Dialog("Microsoft In
ternet Explorer").Static("MessageText").GetROProperty("text")
If strMessageText = "WARNING: The Effective Date is before To
days date" Then
Reporter.ReportEvent micPass,"Verifying the Text in t
he Dialog","The Text Displayed in the Dialog is " & strMessageText
Else
Reporter.ReportEvent micFail,"Verifying the Text
in the Dialog","The Text Displayed in the Dialog is NOT " & strMessageText
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
Browser(strBrowserName).Dialog("Microsoft Internet Explorer")
.WinButton("OK").Click
End If
End If
If DataTable.Value("SecurityDescription","DRLifeCycle") <> "" Then
Call Select_Combo_Value("MasterFile","DR Profile","SecurityDescriptio
n",DataTable.Value("SecurityDescription","DRLifeCycle"))
End If
Call click_Image(strBrowserName,strPageName,strImageName)
End Function

'===============================================================================
=============================================
Public Function ModifiedDRSearchCriteria(strBrowserName,strPageName,strImageName
)
If DataTable.Value("IssuerName","DRLifeCycle") <> "" Then
Call set_WebEdit_Value(strBrowserName,strPageName,"IssuerName",DataTa
ble.Value("IssuerName","DRLifeCycle"))
ElseIf DataTable.Value("CheckCorporateActionIssuerFlag","DRLifeCycle") =
"Y" Then
Call set_WebEdit_Value(strBrowserName,strPageName,"IssuerName",D
ataTable.Value("IssuerName_NewValue","DRLifeCycle"))
End If
If DataTable.Value("Details_Name","DRLifeCycle") <> "" Then
Call set_WebEdit_Value(strBrowserName,strPageName,"DRName",DataTable.
Value("Details_Name","DRLifeCycle"))
Else
Call set_WebEdit_Value(strBrowserName,strPageName,"DRName",DataT
able.Value("NewValue","DRLifeCycle"))
End If
If DataTable.Value("UpgradeLevel","DRLifeCycle") <> "" Then
Call Select_Combo_Value(strBrowserName,strPageName,"DRType",DataTable
.Value("UpgradeLevel","DRLifeCycle"))
End If
If DataTable.Value("ModifiedSU","DRLifeCycle") <> "" Then
Call Select_Combo_Value(strBrowserName,strPageName,"SU",DataTable.Val
ue("ModifiedSU","DRLifeCycle"))
End If
If DataTable.Value("DRStatus","DRLifeCycle") <> "" Then
Call Select_Combo_Value(strBrowserName,strPageName,"Status",DataTable
.Value("DRStatus","DRLifeCycle"))
End If

Call Click_Image(strBrowserName,strPageName,strImageName)
End Function

'===============================================================================
===================================================
' Name of the Function : CreateNewCUSIPForDR
' Scope of the Function : Public
' Author : Shyam H D
' Description : This function is used to CREATE A NEW CUSIP in
While Creating a DR
' Parameters accepted : BrowserName, PageName, Table Name and Image Na
me i.e., Save
' Parameter returned : Nill
' Date and / or Version : 22-11-2008,version 1.0
'===============================================================================
===================================================
Public Function CreateNewCUSIPForDR(strBrowserName,strPageName,strImageName)
strCUSIPDefaultName = set_WebEdit_Value(strBrowserName,strPageNa
me,"CUSIPName")
strFirstChar = Mid(strCUSIPDefaultName,1,1)
strCurrentTime = Time
strCurrentDate = Date
strDate = Split(strCurrentDate,"/" ,-1,1)
strTime = Split(strCurrentTime,":",-1,1)
strDateTimeStamp = strDate(0) &strDate(1)&strDate(2) & " "& str
Time(0) & strTime(1) & strTime(2)
If Asc(strFirstChar) = 94 or Asc(strFirstChar) = 38 Then
CUSIPNames = "QTPCUSIP_" & strDateTimeStamp
Else
CUSIPNames = strFirstChar & "QTPCUSIP_" & strDateTimeSta
mp
End If
CUSIPName = Replace(CUSIPNames," ","")
strCurrentTime = Time
strTime = Split(strCurrentTime,":",-1,1)
strIndTime = Split(strTime(2)," ",-1,1)
strTimeStamp = strTime(0) & strTime(1) & strIndTime(0) &strIndTi
me(1)
CUSIPNo = "0" & strTimeStamp
DataTable.Value("CUSIPName", "DRLifeCycle") = CUSIPName
DataTable.Value("CUSIP", "DRLifeCycle") = CUSIPNo
strVar1 = Environment("TestDir")
strIndVar1 = Split(strVar1,"\",-1,1)
strBound = UBound(strIndVar1)
strAllPath1 =""
For intCounters = 0 to strBound - 1
strAllPath1 = strAllPath1 & strIndVar1(intCounte
rs) &"\"
Next
strPath1 = Trim(strPath1)
strDataPath1 = strAllPath1 & "DataTables\"
DataTable.ExportSheet strDataPath1 & "DRLifeCycle.xls","DRLifeCycle"
DataTable.AddSheet "DRLifeCycle"
DataTable.ImportSheet strDataPath1 & "MasterFileProfile.xls","DR
LifeCycle","DRLifeCycle"
If DataTable.Value("CUSIPName","DRLifeCycle") <> "" Then
Call set_WebEdit_Value(strBrowserName,strPageNam
e,"CUSIPName",DataTable.Value("CUSIPName","DRLifeCycle"))
End If
If DataTable.Value("BriefName","DRLifeCycle") <> "" Then
Call set_WebEdit_Value(strBrowserName,strPageNam
e,"BriefName",DataTable.Value("BriefName","DRLifeCycle"))
End If
If DataTable.Value("RatioDRs","DRLifeCycle") <> "" Then
Call set_WebEdit_Value(strBrowserName,strPageNam
e,"RatioDRs",DataTable.Value("RatioDRs","DRLifeCycle"))
End If
If DataTable.Value("RatioUnderlyingShares","DRLifeCycle") <> ""
Then
Call set_WebEdit_Value(strBrowserName,strPageNam
e,"RatioUnderlyingShares",DataTable.Value("RatioUnderlyingShares","DRLifeCycle")
)
End If
If DataTable.Value("DRExchange","DRLifeCycle") <> "" Then
Call SelectImage(strBrowserName,strCUSIPPageName
,"Detail","DR Exchange","info.gif")
'Call click_Image(strBrowserName,strCUSIPPageName,"DRExchange")
Call SelectDRExchange(strBrowserName,strCUSIPPag
eName,"Exchange",DataTable.Value("DRExchange","DRLifeCycle"))
End If
If DataTable.Value("DRTickerSymbol","DRLifeCycle") <> "" Then
Call set_WebEdit_Value(strBrowserName,strPageNam
e,"DRTickerSymbol",DataTable.Value("DRTickerSymbol","DRLifeCycle"))
End If
Call SelectImage(strBrowserName,strPageName,"Detail","Underlying
Security","info.gif")
'Call click_Image(strBrowserName,strPageName,"UnderlyingSecurity
")
Call SelectValueinFrame(strBrowserName,strPageName,"lookupFrame"
,"Exchange")
If DataTable.Value("CUSIP","CUSIP") <> "" Then
Call set_WebEdit_Value(strBrowserName,strPageNam
e,"CUSIP",DataTable.Value("CUSIP","CUSIP"))
If Browser(strBrowserName).Dialog("Microsoft Int
ernet Explorer").Exist(2) Then
Browser(strBrowserName).Dialog("
Microsoft Internet Explorer").WinButton("OK").Click
End If
End If
Call click_Image(strBrowserName,strPageName,strImageName)

End Function

'=============================================================================
Public Function FillDRDocumentation(strBrowserName,strPageName)
If DataTable.Value("LawGoverningDepositAgreement","DRLifeCycle") <> "" Then
Call Select_Combo_Value(strBrowserName,strPageName,"LawGoverning",Dat
aTable.Value("LawGoverningDepositAgreement","DRLifeCycle"))
End If
If Environment.Value("SponserUnsponser") = "S" Then
If DataTable.Value("DepositAgreementDate","DRLifeCycle")
= "Y" Then
Call click_Image(strBrowserName,strPageName,"DepositA
greementDate")
Browser("MasterFile").Page("DR Documentation Detail")
.Frame("PopCalFrame").WebElement("Today").Click
If Browser("MasterFile").Dialog("Microsoft Internet E
xplorer").Exist(2) Then
Browser("MasterFile").Dialog("Microsoft Inter
net Explorer").WinButton("OK").Click
End If
End If
End If
If Environment.Value("SponserUnsponser") = "S" Then
If DataTable.Value("DepositAgreementAmendedDate","DRLifeCycle")
= "Y" Then
Call click_Image(strBrowserName,strPageName,"DepositAgre
ementAmendedDate")
Browser("MasterFile").Page("DR Documentation Detail").Fr
ame("PopCalFrame").WebElement("Today").Click
If Browser("MasterFile").Dialog("Microsoft Internet Expl
orer").Exist(2) Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("OK").Click
End If
End If
End If
If DataTable.Value("VotingType","DRLifeCycle") <> "" Then
Call Select_Combo_Value(strBrowserName,strPageName,"VotingType",DataT
able.Value("VotingType","DRLifeCycle"))
End If
If DataTable.Value("LawFirmBNY","DRLifeCycle") <> "" Then
Call SelectImage("MasterFile","DR Documentation Detail","DepositAgreem
ent","Law Firm - BNY","info.gif")
'Call click_Image(strBrowserName,strPageName,"LawFirmBNY")
Browser(strBrowserName).Page(strPageName).WebElement("html tag:=TD","
innertext:= " & DataTable.Value("LawFirmBNY","DRLifeCycle")).Click
End If
If DataTable.Value("LawFirmIssuer","DRLifeCycle") <> "" Then
Call SelectImage("MasterFile","DR Documentation Detail","Deposit
Agreement","Law Firm - Issuer","info.gif")
'Call click_Image(strBrowserName,strPageName,"LawFirmIssuer")
Browser(strBrowserName).Page(strPageName).WebElement("html tag:=TD","
innertext:= " & DataTable.Value("LawFirmIssuer","DRLifeCycle")).Click
End If
If DataTable.Value("LawFirmInvestmentBank","DRLifeCycle") <> "" Then
Call SelectImage("MasterFile","DR Documentation Detail","Deposit
Agreement","Law Firm - Investment Bank","info.gif")
'Call click_Image(strBrowserName,strPageName,"LawFirmInvestmentBank")
Browser(strBrowserName).Page(strPageName).WebElement("html tag:=TD","
innertext:= " & DataTable.Value("LawFirmInvestmentBank","DRLifeCycle")).Click
End If
If DataTable.Value("InvestmentBank","DRLifeCycle") <> "" Then
Call SelectImage("MasterFile","DR Documentation Detail","Deposit
Agreement","Investment Bank","info.gif")
'Call click_Image(strBrowserName,strPageName,"InvestmentBank")
Browser(strBrowserName).Page(strPageName).WebElement("html tag:=TD","
innertext:= " & DataTable.Value("InvestmentBank","DRLifeCycle")).Click
End If
If DataTable.Value("PreReleaseSideLetter","DRLifeCycle") <> "" Then
Call Select_Combo_Value(strBrowserName,strPageName,"PreReleas
eSideLetter",DataTable.Value("PreReleaseSideLetter","DRLifeCycle"))
End If
If Environment.Value("SponserUnsponser") = "S" Then
If DataTable.Value("OperationalChecklist","DRLifeCycle") <> ""
Then
Call Select_Combo_Value(strBrowserName,strPageName,"Oper
ationalChecklist",DataTable.Value("OperationalChecklist","DRLifeCycle"))
End If
End If
If DataTable.Value("TerminationPeriod","DRLifeCycle") <> "" Then
Call Select_Combo_Value(strBrowserName,strPageName,"TerminationPeriod
",DataTable.Value("TerminationPeriod","DRLifeCycle"))
End If
If DataTable.Value("BlockingType","DRLifeCycle") <> "" Then
Call Select_Combo_Value(strBrowserName,strPageName,"BlockingType",Dat
aTable.Value("BlockingType","DRLifeCycle"))
End If
Call Click_Image(strBrowserName,strPageName,"Save")
End Function

'===============================================================================
===================================================
' Name of the Function : FlagImageCheckAllRow
' Scope of the Function : Public
' Author : Shyam H D
' Description : This function checks for the New and Approval
Image in for all the Rows in a Table
' Parameters accepted : BrowserName, PageName, Table Name and the Cond
tion "Exist" or Not Exist
' Parameter returned : Null
' Date and / or Version : 22-11-2008,version 1.0
'===============================================================================
===================================================
'Call FlagImageCheckAllRow("MasterFile","DR Documentation Detail","Fees","Fee Ty
pe","Exist")
Public Function FlagImageCheckAllRow(strBrowserName, strPageName, strTableName,
strElementName, strCheckFlag)
blnFlag = "False"
intRowCount = Browser(strBrowserName).Page(strPageName).WebTable(strTableNam
e).RowCount
For intCounter = 1 to intRowCount
intColCounter = Browser("MasterFile").Page("DR Documentation Det
ail").WebTable("Fees").ColumnCount(intCounter)
For intCC = 1 to intColCounter
strCell = Browser("MasterFile").Page("DR Documentation D
etail").WebTable("Fees").GetCellData(intCounter,intCC)
If Trim(strCell) = Trim(strElementName) Then
intReqRow = intCounter + 1
blnFlag = "True"
Exit For
End If
Next
If blnFlag = "True" Then
Exit For
End If
Next
If blnFlag = "True" Then
For intRowCounter = intReqRow to intRowCount
blnFlag = "False"
intColumnCount = Browser(strBrowserName).Page(strPageName).WebTa
ble(strTableName).ColumnCount(intRowCounter)
For intColumnCounter = 1 To intColumnCount
intImageCount = Browser(strBrowserName).
Page(strPageName).WebTable(strTableName).ChildItemCount(intRowCounter, intColumn
Counter, "Image")
If intImageCount > 0 Then
For intImageCounter = 0 To intIm
ageCount-1
strNameName = Browser(st
rBrowserName).Page(strPageName).WebTable(strTableName).ChildItem(intRowCounter,
intColumnCounter, "Image", intImageCounter).GetROProperty("alt")
If strNameName = "Action
:New" Or strNameName = " Approval Status:Pending Approval" Then
blnFlag = "True"
End If
Next
End If
Next
Select Case strCheckFlag
Case "Exist"
If blnFl
ag = "True" Then
Reporter.ReportEvent micPass, "Verifying if the New OR Approval Image is Display
ed or NOT", "The New OR Approval Image is Present"
Else
Reporter.ReportEvent micFail, "Verifying if the New OR Approval Image is Display
ed or NOT", "The New OR Approval Image is NOT Present"
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
Case "Not Exist"
If blnF
lag = "False" Then
Reporter.ReportEvent micPass, "Verifying if the New OR Approval Image is Display
ed or NOT", "The New OR Approval Image is NOT Present"
Else
Reporter.ReportEvent micFail, "Verifying if the New OR Approval Image is Displa
yed or NOT", "The New OR Approval Image is Present"
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
End Select
Next
Else
Reporter.ReportEvent micFail,"Verfiying if the Required
Element Exist in the Table to check for the Flag","The Required Element does not
Exist in the Table, hence can' t verify for the Flag"
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
End Function
'===============================================================================
=======================================================

' Function for Test Cases involving Corporate Actions in DRLifeCycle


Public Function DR_CorporateAction()
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)
strDataTablePath = strAllPath & "DataTables\"
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" Then
If DataTable.Value("NewDRType","DRLifeCycle") = "144A" T
hen
DataTable.Value("DRName","DRLifeCycle") = Enviro
nment.Value("DR144A")
DataTable.Value("CUSIPName","DRLifeCycle") = Env
ironment.Value("CUSIP144A")
DataTable.Value("SelectCUSIPName","DRLifeCycle")
= Environment.Value("SelectCUSIP144A")
ElseIf DataTable.Value("NewDRType","DRLifeCycle") = "Reg
. S" Then
DataTable.Value("DRName","DRLifeCycle") = Enviro
nment.Value("DRRegS")
DataTable.Value("CUSIPName","DRLifeCycle") = Env
ironment.Value("CUSIPRegS")
DataTable.Value("SelectCUSIPName","DRLifeCycle")
= Environment.Value("SelectCUSIPRegS")
End If
End If
DataTable.ExportSheet strDataTablePath & "DRLifeCycle.xls","DRLi
feCycle"
DataTable.ImportSheet strDataTablePath & "DRLifeCycle.xls","DRLifeCycle"
,"DRLifeCycle"
' Select Master File Link
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
' Check for the DR Menu
Call check_Menu("MasterFile","MasterFile",DataTable.Value("MenuP
ath","DRLifeCycle"))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 4: Verifying if the S
ub Menu DR is Present in Profile or NOT","The Sub Menu DR is Present in the Prof
ile Menu"
Else
Reporter.ReportEvent micFail,"Step 4: Verifying if the S
ub Menu DR is Present in Profile or NOT","The Sub Menu DR is NOT Present in the
Profile Menu"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Select DR Menu from Profile and verify if the Required Fields
are Present or Not
Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","DRLifeCycle"))
Call pageCheck_WebEditOR("MasterFile","Profile - DR Search","Iss
uerName;DRName")
Call pageCheck_WebListOR("MasterFile","Profile - DR Search","DRT
ype;DROrigin;CountryofManagement;Status;SubStatus;SU;DRExchange")
Call pageCheck_WebElementinTable("MasterFile","Profile - DR Sear
ch","Name;Country of Management;Type;Status;Sub-Status;S/U;Effective Date;Deposi
tary;Origin;Structure","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 5: Verifying if all t
he Elements are Present in the Page 'Profile -DR Search'","All the Required Fiel
ds are Present in the Page 'Profile - DR Search'"
Else
Reporter.ReportEvent micFail,"Step 5: Verifying if all t
he Fields are Present in the Page 'Profile -DR Search'","All the Required Fields
are NOT Present in the Page 'Profile - DR Search'"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") =False
End If
' Step 6 : Search for DR
Call DRSearchCriteria("MasterFile","Profile - DR Search","Search
")
Wait(5)
Call pageCheck_ImageOR("MasterFile","Profile - DR Search","Clear
;Search")
'Call chkResultinTable("MasterFile","Profile - DR Search","DRSea
rchResults","Name",DataTable.Value("DRName","DRLifeCycle"))
Call chkResultinTable("MasterFile","Profile - DR Search","DRSear
chResults","Type",DataTable.Value("NewDRType","DRLifeCycle"))
Call chkResultinTable("MasterFile","Profile - DR Search","DRSear
chResults","S/U",DataTable.Value("Sponsored","DRLifeCycle"))
Call chkResultinTable("MasterFile","Profile - DR Search","DRSear
chResults","Status",DataTable.Value("DRStatus","DRLifeCycle"))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 6: Verifying if the R
esults are Displayed or NOT","The Results are Dispalyed as per the Search Criter
ia"
Else
Reporter.ReportEvent micFail,"Step 6: Verifying if the R
esults are Displayed or NOT","The Results are NOT Dispalyed as per the Search Cr
iteria"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Step 7: Selecting a DR
Browser("MasterFile").Page("Profile - DR Search").WebElement("ht
ml tag:=TD","innertext:=" & DataTable.Value("DRName","DRLifeCycle"),"index:=2").
Click
Wait (5)
If Browser("MasterFile").Page("DR Profile").Exist(5) Then
strName = get_WebEdit_Value("MasterFile","DR Profile","D
etails_Name")
If Trim(UCase(strName)) = Trim(UCase(DataTable.Value("DR
Name","DRLifeCycle"))) Then
Reporter.ReportEvent micPass,"Step 7: Verifiyng
if the Details of the DR is Displayed or NOT","The Details of the DR " & DataTab
le.Value("DRName","DRLifeCycle") & " is displayed"
Else
Reporter.ReportEvent micFail,"Step 7: Verifiyng
if the Details of the DR is Displayed or NOT","The Details of the DR " & DataTab
le.Value("DRName","DRLifeCycle") & " NOT is displayed"
Environment.Value("Execution_Log") = "False"
End If
End If
' Select Corporate Action Link in DR Profile Page
Call click_WebElement("MasterFile","DR Profile","CorporateAction
")
Wait(5)
intRowCount = Browser("MasterFile").Page("Corporate Action Data
Fix").WebTable("Name").RowCount
strDisplayedName = ""
For intRowCounter = 1 to intRowCount
strName = ""
strName1 = Browser("MasterFile").Page("Corporate Action
Data Fix").WebTable("Name").GetCellData(intRowCounter,1)
strName1 = Replace(strName1," ","")
strName2 = Browser("MasterFile").Page("Corporate Action
Data Fix").WebTable("Name").ChildItem(intRowCounter,2,"WebEdit",0).GetROProperty
("value")
strName = strName1 &":" & strName2
If intRowCounter =intRowCount Then
strDisplayedName = strDisplayedName & strName
Else
strDisplayedName = strDisplayedName & strName &
";"
End If
Next
'strDisplayedName = Replace(strDisplayedName," ","")
If DataTable.Value("BifurcatedDR","DRLifeCycle") = "Y" Then
strRequiredName = "Name:"& DataTable.Value("DRName","DRL
ifeCycle") &";Type:"& DataTable.Value("NewDRType","DRLifeCycle") &";Depositary:
"& DataTable.Value("NewDRDepositary","DRLifeCycle") &";S/U:"& DataTable.Value("S
ponsored","DRLifeCycle") &";Origin:New Program;Structure:Bifurcated"
Else
strRequiredName = "Name:"& DataTable.Value("DRName","DRL
ifeCycle") &";Type:"& DataTable.Value("NewDRType","DRLifeCycle") &";Depositary:
"& DataTable.Value("NewDRDepositary","DRLifeCycle") &";S/U:"& DataTable.Value("S
ponsored","DRLifeCycle") &";Origin:New Program;Structure:"
End If
If UCase(Trim(strDisplayedName))= UCase(Trim(strRequiredName)) T
hen
Reporter.ReportEvent micPass,"Verifying the Details of t
he DR Displayed in Corporate Action Data Fix Page", "The Details of the DR dispa
lyed is " & strRequiredName
Else
Reporter.ReportEvent micFail,"Verifying the Details of t
he DR Displayed in Corporate Action Data Fix Page", "The Details of the DR dispa
lyed is NOT " & strRequiredName
Environment.Value("Execution_Log") = "False"
End If
'==================================== Select Name Change Tab
' Selecting the Name Changed Tab
Call pageCheck_WebElementinTable("MasterFile","Corporate Action
Data Fix","Name Change;CUSIP Change","")
Call pageCheck_WebListOR("MasterFile","Corporate Action Data Fix
","NameChange")
Call pageCheck_WebEditOR("MasterFile","Corporate Action Data Fix
","OldValue;NewValue;EffectiveDate;Comments")
Call pageCheck_WebCheckbox("MasterFile","Corporate Action Data Fix","rem
ove_1","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Required
Fields are Present in the Page","The Required Fields are Present in the Page 'Co
rporate Action Data Fix'"
Else
Reporter.ReportEvent micFail,"Verifying if the Required
Fields are Present in the Page","The Required Fields are NOT Present in the Page
'Corporate Action Data Fix'"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Verifying if the Field Old Value is Editable or Not
Call chkWebEditReadOnly("MasterFile","Corporate Action Data Fix"
,"OldValue","ReadOnly")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Field 'Ol
d Value' is Editable or Not","The Field 'Old Value' is Not Editable"
Else
Reporter.ReportEvent micFail,"Verifying if the Field 'Ol
d Value' is Editable or Not","The Field 'Old Value' is Editable"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Verifying if the Field New Value is Editable or Not
Call chkWebEditReadOnly("MasterFile","Corporate Action Data Fix"
,"NewValue","Not ReadOnly")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Field 'Ne
w Value' is Editable or Not","The Field 'New Value' is Editable"
Else
Reporter.ReportEvent micFail,"Verifying if the Field 'Ne
w Value' is Editable or Not","The Field 'New Value' is Not Editable"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
strAllItems = Browser("MasterFile").Page("Corporate Action Data
Fix").WebList("NameChange").GetROProperty("all items")
strRequiredItems = "Corporate Action;Data Fix;New Value"
If InStr(1,strAllItems,strRequiredItems) <> 0 Then
Reporter.ReportEvent micPass,"Verifying all the Items in
the Field 'Name Change'","The Required items are Present in the Field 'Name Cha
nge'"
Else
Reporter.ReportEvent micFail,"Verifying all the Items in
the Field 'Name Change'","The Required items are NOT Present in the Field 'Name
Change'"
Environment.Value("Execution_Log") = "False"
End If
strOldDRName = DataTable.Value("DRName","DRLifeCycle")
strModifiedDRName = strOldDRName&"_Modified"
DataTable.Value("ModifiedDRName","DRLifeCycle") = strModifiedDRN
ame
DataTable.Value("NewValue","DRLifeCycle") = strModifiedDRName
DataTable.ExportSheet strDataTablePath&"DRLifeCycle.xls","DRLife
Cycle"
DataTable.ImportSheet strDataTablePath&"DRLifeCycle.xls","DRLife
Cycle","DRLifeCycle"
' Selection in Name Change Tab
strName = Browser("MasterFile").Page("Corporate Action Data Fix"
).WebList("NameChange").GetROProperty("value")
If strName <> DataTable.Value("NameChange","DRLifeCycle") Then
Call Select_Combo_Value("MasterFile","Corporate Action D
ata Fix","NameChange",DataTable.Value("NameChange","DRLifeCycle"))
End If
' Entering the Effective Date
Call click_Image("MasterFile","Corporate Action Data Fix","Effec
tiveDate")
Call SetDate("MasterFile","Corporate Action Data Fix",DataTable.
Value("CA_EffectiveDate","DRLifeCycle"))
' Entering the New Value
'Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix"
,"NewValue",DataTable.Value("NewValue","DRLifeCycle"))
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix",
"NewValue",strModifiedDRName)
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix",
"Comments",DataTable.Value("CA_Comments","DRLifeCycle"))
Call click_Image("MasterFile","Corporate Action Data Fix","Save"
)
NameChange_OldValue = get_WebEdit_Value("MasterFile","Corporate
Action Data Fix","OldValue")
Environment.Value("NameChange_OldValue") = NameChange_OldValue
Call chkFlagImageinTab("MasterFile","Corporate Action Data Fix",
"TabName","Name Change","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is P
resent Next to the 'Name Changed Tab'","The Flag is Displayed Next to the Tab 'N
ame Changed Tab' "
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is P
resent Next to the 'Name Changed Tab'","The Flag is NOT Displayed Next to the Ta
b 'Name Changed Tab"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call chkFlagImage("MasterFile","Corporate Action Data Fix","NewV
alue","Name","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is P
resent Next to the 'New Name Field'","The Flag is Displayed Next to the Tab 'New
Name Field' "
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is P
resent Next to the 'New Name Field'","The Flag is NOT Displayed Next to the Tab
'New Name Field' "
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

' ========== Select CUSIP Change Tab


' Selecting CUSIP Change Tab
Call click_WebElement("MasterFile","Corporate Action Data Fix","
CUSIPChange")
' Verfiying the Values in the CUSIP Change Field and Effective D
ate Field
strEffectiveDate = get_WebEdit_Value("MasterFile","Corporate Act
ion Data Fix","CUSIP_EffectiveDate")
strValue = get_WebList_Value("MasterFile","Corporate Action Data
Fix","CUSIPChange")
If InStr(1,strValue,DataTable.Value("CUSIPChange","DRLifeCycle")
) <> 0 AND strEffectiveDate = "" Then
Reporter.ReportEvent micPass,"Verifying the Values displ
ayed in the Field CUSIP Change and Effective Date","The Value Displayed in the C
USIP Change Field is " & strValue & " and the Value displayed in the Field Effec
tive Date is 'NULL'"
Else
Reporter.ReportEvent micFail,"Verifying the Values displ
ayed in the Field CUSIP Change and Effective Date","The Value Displayed in the C
USIP Change Field is NOT " & strValue & " OR the Value displayed in the Field Ef
fective Date is NOT 'NULL'"
Environment.Value("Execution_Log") = "False"
End If
Call pageCheck_WebEditOR("MasterFile","Corporate Action Data Fix
","OldValue_Type;OldValue_CUSIP;OldValue_DRISIN;OldValue_DRTickerSymbol;OldValue
_RatioDRs;OldValue_RatioUnderlyingShares;OldValue_DRExchange;OldValue_Specialist
Firm")
Call pageCheck_WebEditOR("MasterFile","Corporate Action Data Fix
","NewValue_Type;NewValue_CUSIP;NewValue_DRISIN;NewValue_DRTickerSymbol;NewValue
_RatioDRs;NewValue_RatioUnderlyingShares;NewValue_DRExchange;NewValue_Specialist
Firm")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verfiying if the Required
Fields are Present in the CUSIP Change tab","The Required Fields are present in
the CUSIP Change tab"
Else
Reporter.ReportEvent micFail,"Verfiying if the Required
Fields are Present in the CUSIP Change tab","The Required Fields are NOT Present
in the CUSIP Change tab"
Environment.Value("Execution_Log") =False
End If
' Verifying if the Old Value Fields are NOT Editable
Call chkWebEditReadOnly("MasterFile","Corporate Action Data Fix"
,"OldValue_Type;OldValue_CUSIP;OldValue_DRISIN;OldValue_DRTickerSymbol;OldValue_
RatioDRs;OldValue_RatioUnderlyingShares;OldValue_DRExchange;OldValue_SpecialistF
irm","ReadOnly")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Field in
the Old Value Table is Not Editable","The Fields in the Old Value table is Not e
ditable"
Else
Reporter.ReportEvent micFail,"Verifying if the Field in
the Old Value Table is Not Editable","The Fields in the Old Value table is Edita
ble"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Wait(5)
CUSIPNum = GenerateCUSIPNumber()
strDRISINNum = DataTable.Value("NewValue_DRISIN","DRLifeCycle")
strCommonNames = Mid(strDRISINNum,1,8)
strDRISINNums = Mid(strDRISINNum,9)
strGenNums = CINT(strDRISINNums)+1
strNewDRISINNum = strCommonNames & strGenNums
DataTable.Value("NewValue_DRISIN","DRLifeCycle") = strNewDRISINN
um
DataTable.Value("NewValue_CUSIP","DRLifeCycle") = CUSIPNum
DataTable.ExportSheet strDataTablePath &"DRLifeCycle.xls","DRLif
eCycle"
DataTable.ImportSheet strDataTablePath & "DRLifeCycle.xls","DRLi
feCycle","DRLieCycle"
' Changing the Values in the Tab
Wait(5)
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix","NewValu
e_CUSIP",CUSIPNum)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").E
xist(5) Then
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("OK").Click
End If
Wait(5)
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix",
"NewValue_DRISIN",DataTable.Value("NewValue_DRISIN","DRLifeCycle"))
Wait(1)
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix",
"NewValue_DRTickerSymbol",DataTable.Value("NewValue_DRTickerSymbol","DRLifeCycle
"))
intRatioDRValue = get_WebEdit_Value("MasterFile","Corporate Acti
on Data Fix","NewValue_RatioDRs")
intNewRatioDRValue = Cint(intRatioDRValue)+1
intRatioSharesValue = get_WebEdit_Value("MasterFile","Corporate
Action Data Fix","NewValue_RatioUnderlyingShares")
intNewRatioSharesValue = Cint(intRatioSharesValue)+1
Environment.Value("CUSIP_NewRatioDRs") = intNewRatioDRValue
Environment.Value("CUSIP_NewRatioUnderlyingShares") = intNewRati
oSharesValue
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix",
"NewValue_RatioDRs",intNewRatioDRValue)
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix",
"NewValue_RatioUnderlyingShares",intNewRatioSharesValue)
Wait(5)
' Select DR Exchange Value
Call click_Image("MasterFile","Corporate Action Data Fix","Ratio
_EffectiveDate")
Call SelectDRExchange("MasterFile","Corporate Action Data Fix","
Exchange",DataTable.Value("NewValue_DRExchange","DRLifeCycle"))
Wait(2)
' Setting the Effective Date
Call click_Image("MasterFile","Corporate Action Data Fix","CUSIP
_EffectiveDate")
Call SetDate("MasterFile","Corporate Action Data Fix",DataTable.
Value("CUSIP_EffectiveDate","DRLifeCycle"))
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix",
"Comments_CUSIPChange",DataTable.Value("Comments_CUSIPChange","DRLifeCycle"))
' Saving the Changes made
Call click_Image("MasterFile","Corporate Action Data Fix","Save"
)
' Capturing all the Values in CUSIP Change Tab and then storing it in En
vironment Variable
CUSIPChange_CUSIP = get_WebEdit_Value("MasterFile","Corporate Ac
tion Data Fix","OldValue_CUSIP")
Environment.Value("CUSIPChange_CUSIP") = CUSIPChange_CUSIP
CUSIPChange_DRISIN = get_WebEdit_Value("MasterFile","Corporate A
ction Data Fix","OldValue_DRISIN")
Environment.Value("CUSIPChange_DRISIN") = CUSIPChange_DRISIN
CUSIPChange_DRTickerSymbol = get_WebEdit_Value("MasterFile","Cor
porate Action Data Fix","OldValue_DRTickerSymbol")
Environment.Value("CUSIPChange_DRTickerSymbol") = CUSIPChange_DR
TickerSymbol
CUSIPChange_RatioDRs = get_WebEdit_Value("MasterFile","Corporate
Action Data Fix","OldValue_RatioDRs")
Environment.Value("CUSIPChange_RatioDRs") = CUSIPChange_RatioDRs
CUSIPChange_RatioUnderlyingShares = get_WebEdit_Value("MasterFil
e","Corporate Action Data Fix","OldValue_RatioUnderlyingShares")
Environment.Value("CUSIPChange_RatioUnderlyingShares") = CUSIPCh
ange_RatioUnderlyingShares
CUSIPChange_SpecialistFirm = get_WebEdit_Value("MasterFile","Cor
porate Action Data Fix","OldValue_SpecialistFirm")
Environment.Value("CUSIPChange_SpecialistFirm") = CUSIPChange_Sp
ecialistFirm
CUSIPChange_DRExchange = get_WebEdit_Value("MasterFile","Corpor
ate Action Data Fix","OldValue_DRExchange")
Environment.Value("CUSIPChange_DRExchange") = CUSIPChange_DRExch
ange
strAppCUSIPValue = get_WebEdit_Value("MasterFile","Corporate Action Data
Fix","NewValue_CUSIP")
' Checking for the Falg in the Tab and the next to the Modified
Fields
Call chkFlagImageinTab("MasterFile","Corporate Action Data Fix",
"TabName","CUSIP Change","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is P
resent Next to the 'CUSIP Changed Tab'","The Flag is Displayed Next to the Tab '
CUSIP Changed Tab' "
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is P
resent Next to the 'CUSIP Changed Tab'","The Flag is NOT Displayed Next to the T
ab 'CUSIP Changed Tab"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call chkFlagImage("MasterFile","Corporate Action Data Fix","CUSI
P_NewValue","CUSIP;DR ISIN;DR Ticker Symbol;Ratio DRs;Ratio Underlying Shares;DR
Exchange","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is P
resent Next to the 'Modified Field in CUSIP Changed tab'","The Flag is Displayed
Next to the 'Modified Fields in CUSIP Changed Tab'"
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is P
resent Next to the 'Modified Field in CUSIP Changed tab'","The Flag is NOT Displ
ayed Next to the 'Modified Fields in CUSIP Changed Tab'"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Clicking on DR Profile Link
Call click_WebElement("MasterFile","Corporate Action Data Fix","
DRProfile")
If Browser("MasterFile").Page("DR Profile").Exist(5) Then
Reporter.ReportEvent micPass,"Verifying if the Page 'DR
Profile' is displayed or Not","The page 'DR Profile' is Displayed Successfully"
Else
Reporter.ReportEvent micFail,"Verifying if the Page 'DR
Profile' is displayed or Not","The page 'DR Profile' is NOT Displayed"
Environment.Value("Execution_Log") = "False"
End If
' Check for Flag Image next to the name Field in Details tab
Call chkFlagImage("MasterFile","DR Profile","Details","Name","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verfiying if the Flag is d
isplayed next to the 'Name' Field in the Page 'DR Profile'","The Flag is present
Next to the 'Name' Field"
Else
Reporter.ReportEvent micFail,"Verfiying if the Flag is d
isplayed next to the 'Name' Field in the Page 'DR Profile'","The Flag is NOT Pre
sent Next to the 'Name' Field"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'============= Select CUSIP Summary Tab in DR Profile Tab
' Selecting the Cusip Summary tab
Call click_WebElement("MasterFile","DR Profile","CUSIPSummary")
strAppValue = Browser("MasterFile").Page("DR Profile").WebTable(
"CUSIPSummary").ChildItem(3,2,"WebEdit",0).GetROProperty("value")
If Trim(strAppValue) = Trim(strAppCUSIPValue) Then
Reporter.ReportEvent micPass,"Verifying the CUSIP Number
","The CUSIP Number displayed in CUSIP Summary tab is same as the one in the Cha
nge CUSIP tab"
Else
Reporter.ReportEvent micFail,"Verifying the CUSIP Number
","The CUSIP Number displayed in CUSIP Summary tab is NOT same as the one in the
Change CUSIP tab"
Reporter.ReportEvent micFail,"Displayed CUSIP No: = " &
strAppValue,"Changed CUSIP Number: = " & strAppCUSIPValue
Environment.Value("Execution_Log") = "False"
End If
' Checking for the Modified Flag
Call ModifiedFlagImageCheck("MasterFile","DR Profile","CUSIPSumm
ary","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Modified
Flag is Displayed in the CUSIP Row or NOT","A Modified Mark and the Yellow Flag
is dispalyed in the CUSIP Row"
Else
Reporter.ReportEvent micFail,"Verifying if the Modified
Flag is Displayed in the CUSIP Row or NOT","A Modified Mark OR Yellow Flag is di
spalyed in the CUSIP Row"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Clicking on the CUSIP
Browser("MasterFile").Page("DR Profile").WebTable("CUSIPSummary"
).ChildItem(3,2,"WebEdit",0).Click
If Browser("MasterFile").Page("CUSIP Profile").Exist(5) Then
Reporter.ReportEvent micPass,"Verfiying if the CUSIP Pro
file Page is displayed or NOT","The Page 'CUSIP Profile' is displayed successful
ly"
Else
Reporter.ReportEvent micFail,"Verfiying if the CUSIP Pro
file Page is displayed or NOT","The Page 'CUSIP Profile' is NOT displayed succes
sfully"
Environment.Value("Execution_Log") = "False"
End If
' Clicking on the Corporate Action Element
Call click_WebElement("MasterFile","CUSIP Profile","CorporateAct
ion")
Wait(5)
strDisplayedName = ""
intRowCount = Browser("MasterFile").Page("Corporate Action Data Fix").We
bTable("Name").RowCount
For intRowCounter = 1 to intRowCount
strName = ""
strName1 = Browser("MasterFile").Page("Corporate Action
Data Fix").WebTable("Name").GetCellData(intRowCounter,1)
strName1 = Replace(strName1," ","")
strName2 = Browser("MasterFile").Page("Corporate Action
Data Fix").WebTable("Name").ChildItem(intRowCounter,2,"WebEdit",0).GetROProperty
("value")
strName = strName1 &":" & strName2
If intRowCounter =intRowCount Then
strDisplayedName = strDisplayedName & strName
Else
strDisplayedName = strDisplayedName & strName &
";"
End If
Next
strRequiredName = "Name:"& DataTable.Value("CUSIPName","DRLifeCy
cle") &";CUSIP:"& DataTable.Value("CUSIP","DRLifeCycle")
If UCase(Trim(strDisplayedName))= UCase(Trim(strRequiredName)) T
hen
Reporter.ReportEvent micPass,"Verifying the Details of t
he CUSIP Displayed in Corporate Action Data Fix Page", "The Details of the CUSIP
dispalyed is " & strRequiredName
Else
Reporter.ReportEvent micFail,"Verifying the Details of t
he DR Displayed in Corporate Action Data Fix Page", "The Details of the CUSIP di
spalyed is NOT " & strRequiredName
Environment.Value("Execution_Log") = "False"
End If
' ================ Selecting NAME Tab
' Selecting the Name Tab and checking for the Fields Present
Call pageCheck_WebElementinTable("MasterFile","Corporate Action
Data Fix","Name;DR ISIN;Ratio;Exchange/Ticker Symbol","")
Call pageCheck_WebEditOR("MasterFile","Corporate Action Data Fix
","EffectiveDate;CUSIP_NewValue;CUSIP_OldValue;Comments")
Call pageCheck_WebCheckbox("MasterFile","Corporate Action Data F
ix","remove_1","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verfiying if the Required
Fields are present in the Page or NOT","The Required Fields are Present in the P
age"
Else
Reporter.ReportEvent micFail,"Verfiying if the Required
Fields are present in the Page or NOT","The Required Fields are NOT Present in t
he Page"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
strAllValue = Browser("MasterFile").Page("Corporate Action Data
Fix").WebList("NameChange").GetROProperty("all items")
strReqValue = "Corporate Action;Data Fix;New Value"
If Trim(strAllValue) = Trim(strReqValue) Then
Reporter.ReportEvent micPass,"Verifying if all the requi
red items are Present or Not","The required items are Present in the Field 'Name
'"
Else
Reporter.ReportEvent micFail,"Verifying if all the requi
red items are Present or Not","The required items are NOT Present in the Field '
Name'"
Environment.Value("Execution_Log") = "False"
End If
' Verifying if the Field Old Value is Editable or Not
Call chkWebEditReadOnly("MasterFile","Corporate Action Data Fix"
,"CUSIP_OldValue","ReadOnly")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Field 'Ol
d Value' is Editable or Not","The Field 'Old Value' is Not Editable"
Else
Reporter.ReportEvent micFail,"Verifying if the Field 'Ol
d Value' is Editable or Not","The Field 'Old Value' is Editable"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Verifying if the Field New Value is Editable or Not
Call chkWebEditReadOnly("MasterFile","Corporate Action Data Fix"
,"CUSIP_NewValue","Not ReadOnly")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Field 'Ne
w Value' is Editable or Not","The Field 'New Value' is Editable"
Else
Reporter.ReportEvent micFail,"Verifying if the Field 'Ne
w Value' is Editable or Not","The Field 'New Value' is Not Editable"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
strOldCUSIPName = DataTable.Value("CUSIPName","DRLifeCycle")
strModifiedCUSIPName = strOldCUSIPName & "_1"
DataTable.Value("Name_NewName","DRLifeCycle") = strModifiedCUSIP
Name
DataTable.Value("ModifiedCUSIPName","DRLifeCycle") = strModified
CUSIPName
DataTable.ExportSheet strDataTablePath&"DRLifeCycle.xls","DRLife
Cycle"
DataTable.ImportSheet strDataTablePath&"DRLifeCycle.xls","DRLife
Cycle","DRLifeCycle"
' Selecting the Name and entering the Effective Date
Call Select_Combo_Value("MasterFile","Corporate Action Data Fix","NameCh
ange",strModifiedCUSIPName)
Call click_Image("MasterFile","Corporate Action Data Fix","Effec
tiveDate")
Call SetDate("MasterFile","Corporate Action Data Fix",DataTable.
Value("Name_EffectiveDate","DRLifeCycle"))
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix",
"CUSIP_NewValue",DataTable.Value("Name_NewName","DRLifeCycle"))
intVal = Browser("MasterFile").Page("Corporate Action Data Fix")
.WebEdit("CUSIP_NewBriefName").GetROProperty("readonly")
If intVal <> 1 Then
Call set_WebEdit_Value("MasterFile","Corporate Action Da
ta Fix","CUSIP_NewBriefName",DataTable.Value("Name_NewBriefName","DRLifeCycle"))
Else
Reporter.ReportEvent micFail,"Verifying if the Brief Nam
e field is Editable or NOT","The Brief Field Name is Not Editable"
Environment.Value("Execution_Log") = "False"
End If
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix",
"Comments",DataTable.Value("Name_Comments","DRLifeCycle"))
Call click_Image("MasterFile","Corporate Action Data Fix","Save"
)
Name_OldValue = get_WebEdit_Value("MasterFile","Corporate Action
Data Fix","CUSIP_OldValue")
Environment.Value("Name_OldValue") = Name_OldValue
' Checking if the Flag is Dispalyed in the Tab and Next to the F
ield Modified
Call chkFlagImageinTab("MasterFile","Corporate Action Data Fix",
"TabName","Name","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is P
resent Next to the 'Name Tab'","The Flag is Displayed Next to the Tab 'Name Tab'
"
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is P
resent Next to the 'Name Tab'","The Flag is NOT Displayed Next to the Tab 'Name
Tab"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call chkFlagImage("MasterFile","Corporate Action Data Fix","NewV
alue","Name","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is P
resent Next to the Modified Field 'Name Field in Name Tab' ","The Flag is Displa
yed Next to the 'Name Field in Name Tab' "
Else
Reporter.ReportEvent micPass,"Verifying if the Flag is P
resent Next to the Modified Field 'Name Field in Name Tab' ","The Flag is NOT D
isplayed Next to the ''Name Field in Name Tab' "
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' =================================== Select DR ISIN Tab
' Select DR ISIN Tab
Call click_WebElement("MasterFile","Corporate Action Data Fix","
DRISIN")
Call pageCheck_WebEditOR("MasterFile","Corporate Action Data Fix
","CUSIP_EffectiveDate;DRISIN_NewValue;DRISIN_OldValue")
Call pageCheck_WebCheckbox("MasterFile","Corporate Action Data F
ix","remove_2","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Required
fields are Present in the 'DR ISIN Tab'","The Required fields are Present in the
'DR ISIN Tab'"
Else
Reporter.ReportEvent micPass,"Verifying if the Required
fields are Present in the 'DR ISIN Tab'","The Required fields are Present in the
'DR ISIN Tab'"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Checking all Items in the Field DR ISIN
strAllValue = Browser("MasterFile").Page("Corporate Action Data
Fix").WebList("CUSIPChange").GetROProperty("all items")
strReqValue = "Corporate Action;Data Fix;New Value"
If Trim(strAllValue) = Trim(strReqValue) Then
Reporter.ReportEvent micPass,"Verifying if all the requi
red items are Present or Not","The required items are Present in the Field 'DR I
SIN'"
Else
Reporter.ReportEvent micFail,"Verifying if all the requi
red items are Present or Not","The required items are NOT Present in the Field '
DR ISIN'"
Environment.Value("Execution_Log") = "False"
End If
' Verifying if the Field Old Value is Editable or Not
Call chkWebEditReadOnly("MasterFile","Corporate Action Data Fix"
,"DRISIN_OldValue","ReadOnly")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Field 'Ol
d Value' is Editable or Not","The Field 'Old Value' is Not Editable"
Else
Reporter.ReportEvent micFail,"Verifying if the Field 'Ol
d Value' is Editable or Not","The Field 'Old Value' is Editable"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Verifying if the Field New Value is Editable or Not
Call chkWebEditReadOnly("MasterFile","Corporate Action Data Fix"
,"DRISIN_NewValue","Not ReadOnly")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Field 'Ne
w Value' is Editable or Not","The Field 'New Value' is Editable"
Else
Reporter.ReportEvent micFail,"Verifying if the Field 'Ne
w Value' is Editable or Not","The Field 'New Value' is Not Editable"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Changing the Details in the DR ISIN Tab
Call Select_Combo_Value("MasterFile","Corporate Action Data Fix"
,"CUSIPChange",DataTable.Value("DRISINName","DRLifeCycle"))
Call click_Image("MasterFile","Corporate Action Data Fix","CUSIP
_EffectiveDate")
Call SetDate("MasterFile","Corporate Action Data Fix",DataTable.
Value("DREffectiveDate","DRLifeCycle"))
strDRISINNo = DataTable.Value("DRISINNewValue","DRLifeCycle")
strCommonName = Mid(strDRISINNo,1,8)
strDRISINNum = Mid(strDRISINNo,9)
strGenNum = CINT(strDRISINNum)+1
strNewDRISIN = strCommonName & strGenNum
DataTable.Value("DRISINNewValue","DRLifeCycle") = strNewDRISIN
DataTable.ExportSheet strDataTablePath &"DRLifeCycle.xls","DRLif
eCycle"
DataTable.ImportSheet strDataTablePath & "DRLifeCycle.xls","DRLi
feCycle","DRLieCycle"
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix","DRISIN_
NewValue",DataTable.Value("DRISINNewValue","DRLifeCycle"))
Call click_Image("MasterFile","Corporate Action Data Fix","Save"
)
DRISIN_OldValue = get_WebEdit_Value("MasterFile","Corporate Acti
on Data Fix","DRISIN_OldValue")
Environment.Value("DRISIN_OldValue") = DRISIN_OldValue
' Checking if the Flag is Dispalyed in the Tab and Next to the F
ield Modified
Call chkFlagImageinTab("MasterFile","Corporate Action Data Fix",
"TabName","DR ISIN","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is P
resent Next to the 'DR ISIN Tab'","The Flag is Displayed Next to the 'DR ISIN T
ab' "
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is P
resent Next to the 'DR ISIN Tab' ","The Flag is NOT Displayed Next to the 'DR I
SIN Tab' "
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call chkFlagImage("MasterFile","Corporate Action Data Fix","CUSI
P_NewValue","DR ISIN","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is P
resent Next to the 'DR ISIN Field' ","The Flag is Displayed Next to the 'DR ISI
N Field' "
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is P
resent Next to the 'DR ISIN Field' ","The Flag is NOT Displayed Next to the 'DR
ISIN Field' "
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

' ============= Select Ratio Tab


' Select Ratio Tab
Call click_WebElement("MasterFile","Corporate Action Data Fix","
Ratio")
Call pageCheck_WebEditOR("MasterFile","Corporate Action Data Fix
","Ratio_EffectiveDate;OldRatioDRs;OldRatioUnderlyingShares;NewRatioDRs;NewRatio
UnderlyingShares;Ratio_Comments")
Call pageCheck_WebCheckbox("MasterFile","Corporate Action Data F
ix","remove_3","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Required
Fields are present in the 'Ratio Tab'","The Required Fields are present in the '
Ratio Tab'"
Else
Reporter.ReportEvent micFail,"Verifying if the Required
Fields are present in the 'Ratio Tab'","The Required Fields are NOT present in t
he 'Ratio Tab'"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Checking all Items in the Field Ratio Name
strAllValue = Browser("MasterFile").Page("Corporate Action Data
Fix").WebList("ExchangeName").GetROProperty("all items")
strReqValue = "Corporate Action;Data Fix;New Value"
If Trim(strAllValue) = Trim(strReqValue) Then
Reporter.ReportEvent micPass,"Verifying if all the requi
red items are Present or Not","The required items are Present in the Field 'Rati
oName Field'"
Else
Reporter.ReportEvent micFail,"Verifying if all the requi
red items are Present or Not","The required items are NOT Present in the Field '
RatioName Field'"
Environment.Value("Execution_Log") = "False"
End If
'Verifying if the Field Old Value is Editable or Not
Call chkWebEditReadOnly("MasterFile","Corporate Action Data Fix"
,"OldRatioDRs;OldRatioUnderlyingShares","ReadOnly")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Field 'Ol
d Value' is Editable or Not","The Field 'Old Value' is Not Editable"
Else
Reporter.ReportEvent micFail,"Verifying if the Field 'Ol
d Value' is Editable or Not","The Field 'Old Value' is Editable"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Verifying if the Field New Value is Editable or Not
Call chkWebEditReadOnly("MasterFile","Corporate Action Data Fix"
,"NewRatioDRs;NewRatioUnderlyingShares","Not ReadOnly")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Field 'Ne
w Value' is Editable or Not","The Field 'New Value' is Editable"
Else
Reporter.ReportEvent micFail,"Verifying if the Field 'Ne
w Value' is Editable or Not","The Field 'New Value' is Not Editable"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Changing the Details in Ratio Tab
Call Select_Combo_Value("MasterFile","Corporate Action Data Fix"
,"RatioName",DataTable.Value("ExchangeName","DRLifeCycle"))
Call click_Image("MasterFile","Corporate Action Data Fix","Ratio
_EffectiveDate")
Call SetDate("MasterFile","Corporate Action Data Fix",DataTable.
Value("RatioEffectiveDate","DRLifeCycle"))
intRatioDRValue = get_WebEdit_Value("MasterFile","Corporate Acti
on Data Fix","NewRatioDRs")
intNewRatioDRValue = CINT(intRatioDRValue)+1
intRatioSharesValue = get_WebEdit_Value("MasterFile","Corporate
Action Data Fix","NewRatioUnderlyingShares")
intNewRatioSharesValue = Cint(intRatioSharesValue)+1
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix",
"NewRatioDRs",intNewRatioDRValue)
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix","NewRati
oUnderlyingShares",intNewRatioSharesValue)
' Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix",
"NewRatioDRs",DataTable.Value("NewRatioDRs","DRLifeCycle"))
' Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix","NewRat
ioUnderlyingShares",DataTable.Value("NewRatioUnderlyingShares","DRLifeCycle"))
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix",
"Ratio_Comments",DataTable.Value("RatioComments","DRLifeCycle"))
Call click_Image("MasterFile","Corporate Action Data Fix","Save"
)
' Capturing the Old Values in Ratio Tab and storing it in Enviro
nment Variable
Ratio_RatioDRs = get_WebEdit_Value("MasterFile","Corporate Actio
n Data Fix","OldRatioDRs")
Environment.Value("Ratio_RatioDRs") = Ratio_RatioDRs
Ratio_RatioUnderlyingShares = get_WebEdit_Value("MasterFile","Co
rporate Action Data Fix","OldRatioUnderlyingShares")
Environment.Value("Ratio_RatioUnderlyingShares") = Ratio_RatioUn
derlyingShares
' Checking if the Flag is Dispalyed in the Ratio Tab and Next to
the Field Modified
Call chkFlagImageinTab("MasterFile","Corporate Action Data Fix",
"TabName","Ratio","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is P
resent Next to the 'Ratio Tab'","The Flag is Displayed Next to the Tab 'Ratio Ta
b' "
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is P
resent Next to the 'Ratio Tab' ","The Flag is NOT Displayed Next to the 'Ratio T
ab'"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call chkFlagImage("MasterFile","Corporate Action Data Fix","Rati
o_NewValue","Ratio DRs;Ratio Underlying Shares","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is P
resent Next to the 'Modified Fields in Ratio Tab' ","The Flag is Displayed Next
to the 'Modified Fields in Ratio Tab'"
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is P
resent Next to the 'Modified Fields in Ratio Tab' ","The Flag is NOT Displayed N
ext to the 'Modified Fields in Ratio Tab'"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'===================== Selecting Exchange Tab
' Select Exchange Tab
Call click_WebElement("MasterFile","Corporate Action Data Fix","
ExchangeTickerSymbol")
Call pageCheck_WebEditOR("MasterFile","Corporate Action Data Fix
","Exchange_EffectiveDate;OldDRExchange;OldDRTickerSymbol;NewDRExchange;NewDRTic
kerSymbol;Exchange_Comments")
Call pageCheck_WebCheckbox("MasterFile","Corporate Action Data F
ix","remove_4","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Required
Fields are present in the 'Ratio Tab'","The Required Fields are present in the '
Exchange Tab'"
Else
Reporter.ReportEvent micFail,"Verifying if the Required
Fields are present in the 'Ratio Tab'","The Required Fields are NOT present in t
he 'Exchange Tab'"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Checking all Items in the Field Exchange Name
strAllValue = Browser("MasterFile").Page("Corporate Action Data
Fix").WebList("ExchangeName").GetROProperty("all items")
strReqValue = "Corporate Action;Data Fix;New Value"
If Trim(strAllValue) = Trim(strReqValue) Then
Reporter.ReportEvent micPass,"Verifying if all the requi
red items are Present or Not","The required items are Present in the Field 'Exch
ange Name Field'"
Else
Reporter.ReportEvent micFail,"Verifying if all the requi
red items are Present or Not","The required items are NOT Present in the Field '
Exchange Name Field'"
Environment.Value("Execution_Log") = "False"
End If
' Verifying if the Field Old Value is Editable or Not
Call chkWebEditReadOnly("MasterFile","Corporate Action Data Fix"
,"OldDRExchange;OldDRTickerSymbol;OldSpecialistFirm","ReadOnly")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Fields 'O
ld Value' is Editable or Not","The Fields 'Old Value' is Not Editable"
Else
Reporter.ReportEvent micFail,"Verifying if the Field 'Ol
d Value' is Editable or Not","The Field 'Old Value' is Editable"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Verifying if the Field New Value is Editable or Not
Call pageCheck_ImageOR("MasterFile","Corporate Action Data Fix",
"NewDRExchange;NewDRTickerSymbol")
Call chkWebEditReadOnly("MasterFile","Corporate Action Data Fix"
,"NewSpecialistFirm","Not ReadOnly")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Field 'Ne
w Value' is Editable or Not","All the New Value Fields are Editable"
Else
Reporter.ReportEvent micFail,"Verifying if the Field 'Ne
w Value' is Editable or Not","The Field 'New Value' is Not Editable"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Changing the Details in ExchangeTickerSymbol Tab
Call Select_Combo_Value("MasterFile","Corporate Action Data Fix"
,"RatioName",DataTable.Value("ExchangeName","DRLifeCycle"))
Call click_Image("MasterFile","Corporate Action Data Fix","Excha
nge_EffectiveDate")
Call SetDate("MasterFile","Corporate Action Data Fix",DataTable.
Value("ExchangeEffectiveDate","DRLifeCycle"))
Call click_Image("MasterFile","Corporate Action Data Fix","NewDR
Exchange")
Call SelectDRExchange("MasterFile","Corporate Action Data Fix","
Exchange",DataTable.Value("Exchange_DRExchange","DRLifeCycle"))
'Browser("MasterFile").Page("Corporate Action Data Fix").WebElem
ent("html tag:=TD","innertext:=" & DataTable.Value("Exchange_DRExchange","DRLife
Cycle")).Click
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix",
"NewDRTickerSymbol",DataTable.Value("Exchange_DRTickerSymbol","DRLifeCycle"))
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix",
"Exchange_Comments",DataTable.Value("Exchange_Comments","DRLifeCycle"))
Call click_Image("MasterFile","Corporate Action Data Fix","Save"
)
' Capturing Old Values in Exchange Tab and storing it in Environ
ment Variable
Exchange_DRExchange = get_WebEdit_Value("MasterFile","Corporate
Action Data Fix","OldDRExchange")
Environment.Value("Exchange_DRExchange") = Exchange_DRExchange
Exchange_DRTickerSymbol = get_WebEdit_Value("MasterFile","Corpor
ate Action Data Fix","OldDRTickerSymbol")
Environment.Value("Exchange_DRTickerSymbol") = Exchange_DRTicker
Symbol
' Checking if the Flag is Dispalyed in the Ratio Tab and Next to
the Field Modified
Call chkFlagImageinTab("MasterFile","Corporate Action Data Fix",
"TabName","Exchange/Ticker Symbol","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is P
resent Next to the 'Exchange Ticker Symbol Tab'","The Flag is Displayed Next to
the Tab 'Exchange Ticker Symbol Tab' "
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is P
resent Next to the 'Exchange Ticker Symbol Tab'","The Flag is NOT Displayed Next
to the Tab 'Exchange Ticker Symbol Tab' "
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call chkFlagImage("MasterFile","Corporate Action Data Fix","Exch
ange_NewValue","DR Exchange;DR Ticker Symbol","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is P
resent Next to the 'Modified Fields in Exchange Ticker Tab'","The Flag is Displa
yed Next to the 'Modified Fields in Exchange Ticker Tab'"
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is P
resent Next to the 'Modified Fields in Exchange Ticker Tab'","The Flag is NOT Di
splayed Next to the 'Modified Fields in Exchange Ticker Tab'"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'===== Select Issuer Link
' Selecting the Issuer Link
Call click_WebElement("MasterFile","Corporate Action Data Fix","
CUSIPProfile") ' Clicking on CUSIP Profile Link
Wait(5)
strCellData = Browser("MasterFile").Page("CUSIP Profile").WebTab
le("DR").GetCellData(1,2) ' Selecting the DR
Browser("MasterFile").Page("CUSIP Profile").WebElement("html tag
:=TD","innertext:="& strCellData,"class:=tabselected").Click
Wait(5)
strData = Browser("MasterFile").Page("DR Profile").WebTable("Iss
uer").GetCellData(1,2)
Browser("MasterFile").Page("DR Profile").WebElement("html tag:=T
D","innertext:="& strData,"class:=tabselected").Click
Wait(5)
If Browser("MasterFile").Page("Issuer Profile").Exist(5) Then
Reporter.ReportEvent micPass,"Verifying if the Page 'Iss
uer Profile' is displayed or Not","The Page 'Issuer Profile' is displayed"
Else
Reporter.ReportEvent micPass,"Verifying if the Page 'Iss
uer Profile' is displayed or Not","The Page 'Issuer Profile' is displayed"
Environment.Value("Execution_Log") = "False"
End If
' Clicking on Corporate Actions in Issuer Profile page
Call click_WebElement("MasterFile","Issuer Profile","CorporateAc
tion")
Wait(5)
strDisplayedName = ""
intRowCount = Browser("MasterFile").Page("Corporate Action Data
Fix").WebTable("Name").RowCount
For intRowCounter = 1 to intRowCount
strName = ""
strName1 = Browser("MasterFile").Page("Corporate Action
Data Fix").WebTable("Name").GetCellData(intRowCounter,1)
strName1 = Replace(strName1," ","")
strName2 = Browser("MasterFile").Page("Corporate Action
Data Fix").WebTable("Name").ChildItem(intRowCounter,2,"WebEdit",0).GetROProperty
("value")
strName = strName1 &":" & strName2
If intRowCounter =intRowCount Then
strDisplayedName = strDisplayedName & strName
Else
strDisplayedName = strDisplayedName & strName &
";"
End If
Next
strRequiredName = "Name:"& DataTable.Value("IssuerName","DRLifeC
ycle")
If UCase(Trim(strDisplayedName))= UCase(Trim(strRequiredName)) T
hen
Reporter.ReportEvent micPass,"Verifying the Details of t
he Issuer Displayed in Corporate Action Data Fix Page", "The Details of the Issu
er displayed is " & strRequiredName
Else
Reporter.ReportEvent micFail,"Verifying the Details of t
he Issuer Displayed in Corporate Action Data Fix Page", "The Details of the Issu
er displayed is NOT" & strRequiredName
Environment.Value("Execution_Log") = "False"
End If
Call pageCheck_WebTableOR("MasterFile","Corporate Action Data Fix","Name
")
' ============================ Select Name Tab after Selecting
' Select Name Tab
Call pageCheck_WebListOR("MasterFile","Corporate Action Data Fix
","NameChange")
Call pageCheck_WebElementinTable("MasterFile","Corporate Action
Data Fix","Name;Marketing Name","")
Call pageCheck_WebEditOR("MasterFile","Corporate Action Data Fix
","EffectiveDate;Name_OldValue;Name_NewValue;Comments")
Call pageCheck_WebCheckbox("MasterFile","Corporate Action Data F
ix","remove_1","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Required
Fields are present in the 'Name Tab'","The Required Fields are Present in the 'N
ame Tab'"
Else
Reporter.ReportEvent micFail,"Verifying if the Required
Fields are present in the 'Name Tab'","The Required Fields are NOT Present in th
e 'Name Tab'"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Checking all Items in the Field Name
strAllValue = Browser("MasterFile").Page("Corporate Action Data
Fix").WebList("NameChange").GetROProperty("all items")
strReqValue = "Corporate Action;Data Fix;New Value"
If Trim(strAllValue) = Trim(strReqValue) Then
Reporter.ReportEvent micPass,"Verifying if all the requi
red items are Present or Not","The required items are Present in the Field 'Name
Field'"
Else
Reporter.ReportEvent micFail,"Verifying if all the requi
red items are Present or Not","The required items are NOT Present in the Field '
Name Field'"
Environment.Value("Execution_Log") = "False"
End If
' Verifying if the Field Old Value is Editable or Not
Call chkWebEditReadOnly("MasterFile","Corporate Action Data Fix"
,"Name_OldValue","ReadOnly")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Fields 'N
ame_OldValue' is Editable or Not","The Fields 'Name_OldValue' is Not Editable"
Else
Reporter.ReportEvent micFail,"Verifying if the Field 'Na
me_OldValue' is Editable or Not","The Field 'Name_OldValue' is Editable"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Verifying if the Field New Value is Editable or Not
Call chkWebEditReadOnly("MasterFile","Corporate Action Data Fix"
,"Name_NewValue","Not ReadOnly")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Fields 'N
ame_NewValue' is Editable or Not","The Fields 'Name_NewValue' is Editable"
Else
Reporter.ReportEvent micFail,"Verifying if the Field 'Na
me_NewValue' is Editable or Not","The Field 'Name_NewValue' is Not Editable"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Changing the Details in the Name Tab
Call Select_Combo_Value("MasterFile","Corporate Action Data Fix"
,"NameChange",DataTable.Value("IssuerName_Name","DRLifeCycle"))
Call click_Image("MasterFile","Corporate Action Data Fix","Effec
tiveDate")
Call SetDate("MasterFile","Corporate Action Data Fix",DataTable.
Value("IssuerName_EffectiveDate","DRLifeCycle"))
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix",
"Name_NewValue",DataTable.Value("IssuerName_NewValue","DRLifeCycle"))
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix",
"Comments",DataTable.Value("IssuerName_Comments","DRLifeCycle"))
Call click_Image("MasterFile","Corporate Action Data Fix","Save"
)
' Capturing the Old Values and Storing it in a Environment Varia
ble
Name_OldIssuerName = get_WebEdit_Value("MasterFile","Corporate A
ction Data Fix","Name_OldValue")
Environment.Value("Name_OldIssuerName") = Name_OldIssuerName
' Checking for the Falgs on the Name Tab and Next ot the Modifie
d Field
Call chkFlagImageinTab("MasterFile","Corporate Action Data Fix",
"TabName","Name","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is P
resent Next to the 'Name Tab'","The Flag is Displayed Next to the Tab 'Name Tab'
"
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is P
resent Next to the 'Name Tab'","The Flag is NOT Displayed Next to the Tab 'Name
Tab"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call chkFlagImage("MasterFile","Corporate Action Data Fix","NewV
alue","Name","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is P
resent Next to the 'Modified Fields in Name tab'","The Flag is Displayed Next to
the 'Modified Fields in Name tab' "
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is P
resent Next to the 'Modified Fields in Name tab'","The Flag is NOT Displayed Nex
t to the 'Modified Fields in Name tab' "
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' For resuability reverting back to the changes made to the Issu
er
If CheckCorporateActionIssuerFlag <> "Y" Then
Call set_WebEdit_Value("MasterFile","Corporate Action Da
ta Fix","Name_NewValue",Name_OldIssuerName)
Call click_Image("MasterFile","Corporate Action Data Fix
","Save")
End If
Wait(5)
' ==================== Selecting Marketing Name Tab
' Selecting Marketing Name Tab
Call click_WebElement("MasterFile","Corporate Action Data Fix","
MarketingName")
Call pageCheck_WebListOR("MasterFile","Corporate Action Data Fix
","CUSIPChange")
Call pageCheck_WebEditOR("MasterFile","Corporate Action Data Fix
","CUSIP_EffectiveDate;Market_NewValue;Market_OldValue;Comments_CUSIPChange")
Call pageCheck_WebCheckbox("MasterFile","Corporate Action Data F
ix","remove_2","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verfiying if the Required
Fields are Present in the 'Marketing Name tab'","The Required Fields are Present
in the 'Marketing Name tab'"
Else
Reporter.ReportEvent micPass,"Verfiying if the Required
Fields are Present in the 'Marketing Name tab'","The Required Fields are Present
in the 'Marketing Name tab'"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Checking all Items in the Field Name in Marketing Name Tab
strAllValue = Browser("MasterFile").Page("Corporate Action Data
Fix").WebList("CUSIPChange").GetROProperty("all items")
strReqValue = "Corporate Action;Data Fix;New Value"
If Trim(strAllValue) = Trim(strReqValue) Then
Reporter.ReportEvent micPass,"Verifying if all the requi
red items are Present or Not","The required items are Present in the Field 'Name
Field'"
Else
Reporter.ReportEvent micFail,"Verifying if all the requi
red items are Present or Not","The required items are NOT Present in the Field '
Name Field'"
Environment.Value("Execution_Log") = "False"
End If
' Verifying if the Field Old Value is Editable or Not
Call chkWebEditReadOnly("MasterFile","Corporate Action Data Fix"
,"Market_OldValue","ReadOnly")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Fields 'M
arket_OldValue' is Editable or Not","The Fields 'Market_OldValue' is Not Editabl
e"
Else
Reporter.ReportEvent micFail,"Verifying if the Field 'Ma
rket_OldValue' is Editable or Not","The Field 'Market_OldValue' is Editable"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Verifying if the Field New Value is Editable or Not
Call chkWebEditReadOnly("MasterFile","Corporate Action Data Fix"
,"Market_NewValue","Not ReadOnly")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Fields 'M
arket_NewValue' is Editable or Not","The Fields 'Market_NewValue' is Editable"
Else
Reporter.ReportEvent micFail,"Verifying if the Field 'Ma
rket_NewValue' is Editable or Not","The Field 'Market_NewValue' is Not Editable"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Changing the Details in the Marketing Name Tab
Call Select_Combo_Value("MasterFile","Corporate Action Data Fix"
,"CUSIPChange",DataTable.Value("MarketName","DRLifeCycle"))
Call click_Image("MasterFile","Corporate Action Data Fix","CUSIP
_EffectiveDate")
Call SetDate("MasterFile","Corporate Action Data Fix",DataTable.
Value("MarketEffectiveDate","DRLifeCycle"))
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix",
"Market_NewValue",DataTable.Value("MarketNewValue","DRLifeCycle"))
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix",
"Comments_CUSIPChange",DataTable.Value("MarketComments","DRLifeCycle"))
Call click_Image("MasterFile","Corporate Action Data Fix","Save"
)
' Capturing the OldValue and storing it in a Environment Variabl
e
Market_OldValue = get_WebEdit_Value("MasterFile","Corporate Acti
on Data Fix","Market_OldValue")
Environment.Value("Market_OldValue") = Market_OldValue
' Checking if the Flags are Displayed Next to the Modified Field
s and on the Tab
Call chkFlagImageinTab("MasterFile","Corporate Action Data Fix",
"TabName","Marketing Name","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is P
resent Next to the 'Marketing Name Tab '","The Flag is Displayed Next to the 'M
arketing Name Tab' "
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is P
resent Next to the 'Marketing Name Tab'","The Flag is NOT Displayed Next to the
'Marketing Name Tab' "
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call chkFlagImage("MasterFile","Corporate Action Data Fix","CUSI
P_NewValue","Marketing Name","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is P
resent Next to the 'Marketing Name Field'","The Flag is Displayed Next to the Ta
b 'Marketing Name Field' "
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is P
resent Next to the 'Marketing Name Field'","The Flag is NOT Displayed Next to th
e 'Marketing Name Field' "
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Reverting Back the Changes made to the Issuer for Resuability
If CheckCorporateActionIssuerFlag <> "Y" Then
Call set_WebEdit_Value("MasterFile","Corporate Action Da
ta Fix","Market_NewValue",Market_OldValue)
Call click_Image("MasterFile","Corporate Action Data Fix
","Save")
End If
Wait(5)
'========== Selecting Issuer Link in Corporate Action Data Fix page
Call click_WebElement("MasterFile","Corporate Action Data Fix","
Issuer")
Wait 2
If Browser("MasterFile").Page("Issuer Profile").Exist(5) Then
Reporter.ReportEvent micPass,"Verifying if the Page 'Iss
uer Profile' is Displayed or Not","The Page 'Issuer Profile' is displayed."
Else
Reporter.ReportEvent micFail,"Verifying if the Page 'Iss
uer Profile' is Displayed or Not","The Page 'Issuer Profile' is NOT displayed."
Environment.Value("Execution_Log") = "False"
End If
' Getting the Issuer Name from Application
strIssuerName = get_WebEdit_Value("MasterFile","Issuer Profile",
"IssuerName")
' Selecting Underlying Security Search link
Call click_WebElement("MasterFile","Issuer Profile","UnderlyingS
ecuritySearch")
Wait 2
If Browser("MasterFile").Page("Profile - Underlying Security").E
xist(5) Then
Reporter.ReportEvent micPass,"Verifying if the page 'Pro
file - Underlying Security' is displayed or Not","The Page 'Profile - Underlying
Security' is displayed"
Else
Reporter.ReportEvent micFail,"Verifying if the page 'Pro
file - Underlying Security' is displayed or Not","The Page 'Profile - Underlying
Security' is NOT displayed"
Environment.Value("Execution_Log") = "False"
End If
intRow = Browser("MasterFile").Page("Profile - Underlying Securi
ty").WebTable("UnderlyingSecuritySearch").GetRowWithCellText(strIssuerName)
If intRow <> -1 Then
Reporter.ReportEvent micPass,"Verifying if the Required
Issuer Name is Present in the Result or NOT","The Required Issuer Name " & strIs
suerName & " is Present in the Result Table"
Else
Reporter.ReportEvent micPass,"Verifying if the Required
Issuer Name is Present in the Result or NOT","The Required Issuer Name " & strIs
suerName & " is Present in the Result Table"
Environment.Value("Execution_Log") = "False"
End If
' Selecting Underlying Security
If intRow > 0 Then
strAppCellData = Browser("MasterFile").Page("Profile - U
nderlying Security").WebTable("UnderlyingSecuritySearch").GetCellData(intRow+1,1
)
End If
Environment.Value("UnderlyingSecurityName") = strAppCellData
Browser("MasterFile").Page("Profile - Underlying Security").WebE
lement("html tag:=TD","innertext:=" & strAppCellData ,"index:=0").Click
Wait(5)
If Browser("MasterFile").Page("Underlying Security Profile").Exist(5) Th
en
Reporter.ReportEvent micPass,"Verifying if the Page 'Und
erlying Security Profile' is Displayed or Not","The Page 'Underlying Security Pr
ofile' is displayed"
Else
Reporter.ReportEvent micPass,"Verifying if the Page 'Und
erlying Security Profile' is Displayed or Not","The Page 'Underlying Security Pr
ofile' is displayed"
Environment.Value("Execution_Log") = "False"
End If
' Clicking on the Corporate Action link in the page 'Underlying
Security Profile' page
Call click_WebElement("MasterFile","Underlying Security Profile"
,"CorporateAction")
Wait(5)
intRowCount = Browser("MasterFile").Page("Corporate Action Data
Fix").WebTable("Name").RowCount
strDisplayedName = ""
For intRowCounter = 1 to intRowCount
strName = ""
strName1 = Browser("MasterFile").Page("Corporate Action
Data Fix").WebTable("Name").GetCellData(intRowCounter,1)
strName1 = Replace(strName1," ","")
strName2 = Browser("MasterFile").Page("Corporate Action
Data Fix").WebTable("Name").ChildItem(intRowCounter,2,"WebEdit",0).GetROProperty
("value")
strName = strName1 &":" & strName2
If intRowCounter =intRowCount Then
strDisplayedName = strDisplayedName & strName
Else
strDisplayedName = strDisplayedName & strName &
";"
End If
Next
strRequiredName = "Name:"& strAppCellData &";Status:Effective"
If UCase(Trim(strDisplayedName))= UCase(Trim(strRequiredName)) T
hen
Reporter.ReportEvent micPass,"Verifying the Details of t
he Issuer Displayed with Status in Corporate Action Data Fix Page", "The Details
of the Issuer displayed is " & strRequiredName
Else
Reporter.ReportEvent micFail,"Verifying the Details of t
he Issuer Displayed with Status in Corporate Action Data Fix Page ", "The Detai
ls of the Issuer displayed is NOT" & strRequiredName
Environment.Value("Execution_Log") = "False"
End If
' ================ Select SEDOL Tab in Underlying Security Profi
le Page
' Selecting the SEDOL Tab
Call pageCheck_WebElementinTable("MasterFile","Corporate Action
Data Fix","SEDOL;ISIN;Board Lot;Par Value/Currency ","")
Call pageCheck_WebListOR("MasterFile","Corporate Action Data Fix
","NameChange")
Call pageCheck_WebCheckbox("MasterFile","Corporate Action Data F
ix","remove_1","")
Call pageCheck_WebEditOR("MasterFile","Corporate Action Data Fix
","EffectiveDate;SEDOLOldValue;SEDOLNewValue")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying the Fields Prese
nt in the 'SEDOL Tab'","The Required Fields are Present in the 'SEDOL Tab'"
Else
Reporter.ReportEvent micPass,"Verifying the Fields Prese
nt in the 'SEDOL Tab'","The Required Fields are Present in the 'SEDOL Tab'"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Checking all Items in the SEDOL Name Field
strAllValue = Browser("MasterFile").Page("Corporate Action Data
Fix").WebList("NameChange").GetROProperty("all items")
strReqValue = "Corporate Action;Data Fix;New Value"
If Trim(strAllValue) = Trim(strReqValue) Then
Reporter.ReportEvent micPass,"Verifying if all the requi
red items are Present or Not","The required items are Present in the Field 'Name
Field'"
Else
Reporter.ReportEvent micFail,"Verifying if all the requi
red items are Present or Not","The required items are NOT Present in the Field '
Name Field'"
Environment.Value("Execution_Log") = "False"
End If
' Verifying if the Field SEDOL Old Value is Editable or Not
Call chkWebEditReadOnly("MasterFile","Corporate Action Data Fix"
,"SEDOLOldValue","ReadOnly")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Fields 'S
EDOLOldValue' is Editable or Not","The Fields 'SEDOLOldValue' is Not Editable"
Else
Reporter.ReportEvent micFail,"Verifying if the Field 'SE
DOLOldValue' is Editable or Not","The Field 'SEDOLOldValue' is Editable"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Verifying if the Field SEDOLNewValue is Editable or Not
Call chkWebEditReadOnly("MasterFile","Corporate Action Data Fix"
,"SEDOLNewValue","Not ReadOnly")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Fields 'S
EDOLNewValue' is Editable or Not","The Fields 'SEDOLNewValue' is Editable"
Else
Reporter.ReportEvent micFail,"Verifying if the Field 'SE
DOLNewValue' is Editable or Not","The Field 'SEDOLNewValue' is Not Editable"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Changing the Details in the SEDOL Tab
Call Select_Combo_Value("MasterFile","Corporate Action Data Fix"
,"NameChange",DataTable.Value("SEDOLName","DRLifeCycle"))
Call click_Image("MasterFile","Corporate Action Data Fix","Effec
tiveDate")
Call SetDate("MasterFile","Corporate Action Data Fix",DataTable.
Value("SEDOLEffectiveDate","DRLifeCycle"))
' Generating the SEDOL Number and Entering it
strDRSEDOLNumber =CreateAlphanumericString(7)
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix","SEDOLNe
wValue",strDRSEDOLNumber)
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix",
"Comments",DataTable("SEDOLComments","DRLifeCycle"))
Call click_Image("MasterFile","Corporate Action Data Fix","Save"
)
' Capturing the OldValue and storing it in a Environment Variabl
e
SEDOL_OldValue = get_WebEdit_Value("MasterFile","Corporate Actio
n Data Fix","SEDOLOldValue")
Environment.Value("SEDOL_OldValue") = SEDOL_OldValue
' Check for the Flags Next to the Modified Field and in the Tab
Call chkFlagImageinTab("MasterFile","Corporate Action Data Fix",
"TabName","SEDOL","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is P
resent Next to the 'SEDOL Tab '","The Flag is Displayed Next to the 'SEDOL Tab'
"
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is P
resent Next to the 'SEDOL Tab'","The Flag is NOT Displayed Next to the 'SEDOL Ta
b' "
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call chkFlagImage("MasterFile","Corporate Action Data Fix","NewV
alue","Underlying SEDOL","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is P
resent Next to the 'Underlying SEDOL Field '","The Flag is Displayed Next to the
'Underlying SEDOL Field' "
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is P
resent Next to the 'Underlying SEDOL Field'","The Flag is NOT Displayed Next to
the 'Underlying SEDOL Field' "
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'=========== Select ISIN Tab


' Select ISIN Tab
Call click_WebElement("MasterFile","Corporate Action Data Fix","
ISIN")
Call pageCheck_WebListOR("MasterFile","Corporate Action Data Fix
","CUSIPChange")
Call pageCheck_WebCheckbox("MasterFile","Corporate Action Data F
ix","remove_2","")
Call pageCheck_WebEditOR("MasterFile","Corporate Action Data Fix
","CUSIP_EffectiveDate;ISINOldValue;ISINNewValue")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying the Fields Prese
nt in the 'ISIN Tab'","The Required Fields are Present in the 'ISIN Tab'"
Else
Reporter.ReportEvent micPass,"Verifying the Fields Prese
nt in the 'ISIN Tab'","The Required Fields are Present in the 'ISIN Tab'"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Checking all Items in the ISIN Name Field
strAllValue = Browser("MasterFile").Page("Corporate Action Data
Fix").WebList("CUSIPChange").GetROProperty("all items")
strReqValue = "Corporate Action;Data Fix;New Value"
If Trim(strAllValue) = Trim(strReqValue) Then
Reporter.ReportEvent micPass,"Verifying if all the requi
red items are Present or Not","The required items are Present in the Field 'ISIN
Name Field'"
Else
Reporter.ReportEvent micFail,"Verifying if all the requi
red items are Present or Not","The required items are NOT Present in the Field '
ISIN Name Field'"
Environment.Value("Execution_Log") = "False"
End If
' Verifying if the Field ISIN Old Value is Editable or Not
Call chkWebEditReadOnly("MasterFile","Corporate Action Data Fix"
,"ISINOldValue","ReadOnly")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Fields 'I
SINOldValue' is Editable or Not","The Fields 'ISINOldValue' is Not Editable"
Else
Reporter.ReportEvent micFail,"Verifying if the Field 'IS
INOldValue' is Editable or Not","The Field 'ISINOldValue' is Editable"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Verifying if the Field ISINNewValue is Editable or Not
Call chkWebEditReadOnly("MasterFile","Corporate Action Data Fix"
,"ISINNewValue","Not ReadOnly")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Fields 'I
SINNewValue' is Editable or Not","The Fields 'ISINNewValue' is Editable"
Else
Reporter.ReportEvent micFail,"Verifying if the Field 'IS
INNewValue' is Editable or Not","The Field 'ISINNewValue' is Not Editable"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
strISINNum = DataTable.Value("ISINNewValue","DRLifeCycle")
strCommonNames = Mid(strISINNum,1,8)
strISINNums = Mid(strISINNum,9)
strGenNums = CINT(strISINNums)+1
strNewISINNum = strCommonNames & strGenNums
DataTable.Value("ISINNewValue","DRLifeCycle") = strNewISINNum
DataTable.ExportSheet strDataTablePath &"DRLifeCycle.xls","DRLif
eCycle"
DataTable.ImportSheet strDataTablePath & "DRLifeCycle.xls","DRLi
feCycle","DRLieCycle"

' Changing the Values in ISIN Tab


Call Select_Combo_Value("MasterFile","Corporate Action Data Fix"
,"CUSIPChange",DataTable.Value("ISINName","DRLifeCycle"))
Call click_Image("MasterFile","Corporate Action Data Fix","CUSIP
_EffectiveDate")
Call SetDate("MasterFile","Corporate Action Data Fix",DataTable.
Value("ISINEffectiveDate","DRLifeCycle"))
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix",
"ISINNewValue",DataTable.Value("ISINNewValue","DRLifeCycle"))
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix",
"Comments_CUSIPChange",DataTable.Value("ISINComments","DRLifeCycle"))
Call click_Image("MasterFile","Corporate Action Data Fix","Save"
)
' Capturing the OldValue and storing it in a Environment Variabl
e
ISIN_OldValue = get_WebEdit_Value("MasterFile","Corporate Action
Data Fix","ISINOldValue")
Environment.Value("ISIN_OldValue") = ISIN_OldValue
' Check for the Flaga Next to the Modified Field and in the Tab
Call chkFlagImageinTab("MasterFile","Corporate Action Data Fix",
"TabName","ISIN","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is P
resent Next to the 'ISIN Tab '","The Flag is Displayed Next to the 'Underlying
ISIN Tab' "
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is P
resent Next to the 'ISIN Tab'","The Flag is NOT Displayed Next to the 'Underlyin
g ISIN Tab' "
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call chkFlagImage("MasterFile","Corporate Action Data fix","CUSI
P_NewValue","Underlying ISIN","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is P
resent Next to the 'Underlying ISIN Field '","The Flag is Displayed Next to the
'Underlying ISIN Field' "
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is P
resent Next to the 'Underlying ISIN Field'","The Flag is NOT Displayed Next to t
he 'Underlying ISIN Field' "
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

' ==== Select Par Value / Currency Tab


' Select Par Value Tab
Call click_WebElement("MasterFile","Corporate Action Data Fix","
ParValue")
Call pageCheck_WebListOR("MasterFile","Corporate Action Data Fix
","RatioName")
Call pageCheck_WebEditOR("MasterFile","Corporate Action Data Fix
","Ratio_EffectiveDate;ParValueOldValue;ParValueCurrencyNewValue;ParValueNewValu
e;ParValueCurrencyNewValue;Ratio_Comments")
Call pageCheck_WebCheckbox("MasterFile","Corporate Action Data F
ix","remove_3","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Required
Fields are Present in the 'Par Value / Currency tab'","The Required Values are P
resent in the 'Par Value / Currency tab'"
Else
Reporter.ReportEvent micFail,"Verifying if the Required
Fields are Present in the 'Par Value / Currency tab'","The Required Values are N
OT Present in the 'Par Value / Currency tab'"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Changing the Details in the Par Value Tab
Call Select_Combo_Value("MasterFile","Corporate Action Data Fix"
,"RatioName",DataTable.Value("ParValueName","DRLifeCycle"))
Call click_Image("MasterFile","Corporate Action Data Fix","Ratio
_EffectiveDate")
Call SetDate("MasterFile","Corporate Action Data Fix",DataTable.
Value("ParValueEffectiveDate","DRLifeCycle"))
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix",
"ParValueNewValue",DataTable.Value("ParValueNewValue","DRLifeCycle"))
Call click_Image("MasterFile","Corporate Action Data Fix","Excha
nge_EffectiveDate")
Browser("MasterFile").Page("Corporate Action Data Fix").WebEleme
nt("html tag:=TD","innertext:="& DataTable.Value("ParValueCurrencyNewValue","DRL
ifeCycle")).Click
Call set_WebEdit_Value("MasterFile","Corporate Action Data Fix",
"Ratio_Comments",DataTable.Value("ParValueComments","DRLifeCycle"))
Call click_Image("MasterFile","Corporate Action Data Fix","Save"
)
' Capturing the OldValue and storing it in a Environment Variabl
e
ParValue_OldValue = get_WebEdit_Value("MasterFile","Corporate Ac
tion Data Fix","ParValueOldValue")
Environment.Value("ParValue_OldValue") = ParValue_OldValue
ParValue_CurrenyOldValue = get_WebEdit_Value("MasterFile","Corpo
rate Action Data Fix","ParValueCurrenyOldValue")
Environment.Value("ParValue_CurrenyOldValue") = ParValue_Curreny
OldValue
' Check for the Flag Next ot the Modified Field an in the Tab
Call chkFlagImageinTab("MasterFile","Corporate Action Data Fix",
"TabName","Par Value/Currency","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is P
resent Next to the 'Par Value Currency Tab '","The Flag is Displayed Next to the
'Par Value Currency Tab' "
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is P
resent Next to the 'Par Value Currency Tab'","The Flag is NOT Displayed Next to
the 'Par Value Currency Tab' "
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call chkFlagImage("MasterFile","Corporate Action Data Fix","Rati
o_NewValue","Par Value;Currency","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is P
resent Next to the 'Modified Fields in Par Value Currency Tab '","The Flag is Di
splayed Next to the 'Modified Fields in Par Value Currency Tab' "
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is P
resent Next to the 'Modified Fields in Par Value Currency Tab'","The Flag is NO
T Displayed Next to the ' Modified Fields in Par Value Currency Tab' "
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

' Click on the UnderlyingSecurity Element


Call click_WebElement("MasterFile","Corporate Action Data Fix","
UnderlyingSecurity")
' Checking for the Flags in the Underlying Security Profile
Call chkFlagImage("MasterFile","Underlying Security Profile","De
tail","Underlying ISIN;Underlying SEDOL;Par Value","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flags are
displayed in the Page","The Flags are displayed Next to the Fields Modified in
the Page 'Underlying Security Profile'"
Else
Reporter.ReportEvent micFail,"Verifying if the Flags are
displayed in the Page","The Flags are NOT displayed Next to the Fields Modified
in the Page 'Underlying Security Profile'"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

End Function

'===============================================================================
=============================================================
Public Function GenerateCUSIPNumber()
strCurrentTime = Time
strTime = Split(strCurrentTime,":",-1,1)
strIndTime = Split(strTime(2)," ",-1,1)
strTimeStamp = strTime(0) & strTime(1) & strIndTime(0) &strIndTime(1)
CUSIPNo = "0" & strTimeStamp
intLength = Len(CUSIPNo)
If intLength = 8 Then
CUSIPNo = CUSIPNo & "0"
End If
GenerateCUSIPNumber = CUSIPNo
End Function
'===============================================================================
===================================================
' Name of the Function : ModifiedFlagImageCheck
' Scope of the Function : Public
' Author : Shyam H D
' Description : This function checks for the Modified and the
' Parameters accepted : BrowserName, PageName, Table Name and the Cond
tion "Exist" or Not Exist
' Parameter returned : Null
' Date and / or Version : 22-11-2008,version 1.0
'===============================================================================
===================================================

Public Function ModifiedFlagImageCheck(strBrowserName, strPageName, strTableName


, strCheckFlag)
blnFlag = "False"
intRowCount = Browser(strBrowserName).Page(strPageName).WebTable(strTableNam
e).RowCount
intColumnCount = Browser(strBrowserName).Page(strPageName).WebTable(strT
ableName).ColumnCount(intRowCount)
For intColumnCounter = 1 To intColumnCount
intImageCount = Browser(strBrowserName).Page(str
PageName).WebTable(strTableName).ChildItemCount(intRowCount, intColumnCounter, "
Image")
If intImageCount > 0 Then
For intImageCounter = 0 To intImageCount
-1
strName = Browser(strBrowserName
).Page(strPageName).WebTable(strTableName).ChildItem(intRowCount, intColumnCount
er, "Image", intImageCounter).GetROProperty("alt")
strReqName = "Action:Modified;Ap
proval Status:Pending Approval"
' If Instr(1,strReqName,strName) <
> 0 Then
' blnFlag = "True"
' End If
If strName = "Action:Modified" O
r strName = " Approval Status:Pending Approval" Or strName = "Corporate Action A
pproval Status:Pending Approval" Then
blnFlag = "True"
Select Case strCheckFlag
Case "Ex
ist"
If blnFlag = "True" Then
Reporter.ReportEvent micPass, "Verifying if the Modified OR Approval Image is Di
splayed or NOT", "The Image " & strName & " is Displayed Successfully"
Else
Reporter.ReportEvent micFail, "Verifying if the Modified OR Approval Image is Di
splayed or NOT", "The Image " & strName & " is NOT Displayed Successfully"
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
Case "No
t Exist"
If blnFlag = "False" Then
Reporter.ReportEvent micPass, "V
erifying if the Modified OR Approval Image is Displayed or NOT", "The Image " &
strName & " is NOT Displayed"
Else
Reporter.ReportEvent micFail, "Verifying if the Modified OR Approval Image is Di
splayed or NOT", "The Image " & strName & " is Displayed"
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
End Select
End If
Next
End If
Next
If strCheckFlag = "NotExist" Then
If blnFlag = "False" Then
Reporter.ReportEvent mic
Pass, "Verifying if the Modified OR Approval Image is Displayed or NOT", "The Mo
dified OR Approval Image is NOT Present"
Else
Reporter.ReportEvent mic
Fail, "Verifying if the Modified OR Approval Image is Displayed or NOT", "The M
odified OR Approval Image is Present"
Environment.Value("TestC
ase_Log") = "False"
Environment.Value("Execu
tion_Log") = "False"
End If
End If
End Function

'===============================================================================
===================================================
' Name of the Function : chkFlagImageinTab
' Scope of the Function : Public
' Author : Shyam H D
' Description : This function checks for the Flag Image that will be dispa
lyed next to the Modified fields.
' Parameters accepted : BrowserName, PageName and Name of the Fields that ar
e modified.
' Parameter returned : Null
' Date and / or Version : 20-10-2008,version 1.0
' Call Statement : 'Call chkFlagImage("MasterFile","Profile - HOLDR
Profile","Detail","US Exchange;Price","Exist")
'===============================================================================
===================================================
Public Function chkFlagImageinTab(strBrowserName, strPageName, strTableName, str
AllCheckVariable, strCheckFlag)
blnImageFlag = "False"
strCheckVariable = Split(strAllCheckVariable, ";", -1, 1)
For intVariable = 0 To UBound(strCheckVariable)
intRowCount = Browser(strBrowserName).Page(strPageName).WebTable(strTabl
eName).RowCount
For intRowCounter = 1 To intRowCount
intColumnCount = Browser(strBrowserName).Page(strPageName).WebTable(
strTableName).ColumnCount(intRowCounter)
For intColumnCounter = 1 To intColumnCount
strGetCellData = Trim(Browser(strBrowserName).Page(strPageName).
WebTable(strTableName).GetCellData(intRowCounter, intColumnCounter))
If strGetCellData = strCheckVariable(intVariable) Then
intImageCount = Browser(strBrowserName).Page(strPageName).We
bTable(strTableName).ChildItemCount(intRowCounter, intColumnCounter, "Image")
If intImageCount > 0 Then
For intImageCounter = 0 To intImageCount - 1
strName = Browser(strBrowserName).Page(strPageName).
WebTable(strTableName).ChildItem(intRowCounter, intColumnCounter, "Image", intIm
ageCounter).GetROProperty("alt")
If strName = "Approval Status:Pending Approval" Then
blnImageFlag = "
True"
Exit For
End If
Next
Select Case strCheckFlag
Case "Exist"
If blnImageFlag = "True"Then
Reporter.ReportEvent micPass, "Verifying for the Approval Image after changing t
he Details", "The Approval Image is Present next to the Field " & strCheckVariab
le(intVariable)
Else
Reporter.ReportEvent micFail, "Verifying for the Approval Image after changing t
he Details", "The Approval Image is NOT Present next to the Field" & strCheckVar
iable(intVariable)
'captureScreenshot
Environment.Value("Execution_Log") = "False"
Environment.Value("TestCase_Log") = "False"
End If
Case "Not Exist"
If blnImageFlag = "False" Then
Reporter.ReportEvent micPass, "Verifying for the Approval Image after changing t
he Details", "The Approval Image is NOT Present next to the Field " & strCheckVa
riable(intVariable)
Else
Reporter.ReportEvent micFail, "Verifying for the Approval Image after changing t
he Details", "The Approval Image is Present next to the Field " & strCheckVariab
le(intVariable)
'captureScreenshot
Environment.Value("Execution_Log") = "False"
Environment.Value("TestCase_Log") = "False"
End If
End Select
ElseIf intImageCount = 0 Then
Select Case strC
heckFlag
Case "Exist"
If blnImageFlag = "True"Then
Reporter.ReportEvent micPass, "Verifying for the Approval Image after changing t
he Details", "The Approval Image is Present next to the Field " & strCheckVariab
le(intVariable)
Else
Reporter.ReportEvent micFail, "Verifying for the Approval Image after changing t
he Details", "The Approval Image is NOT Present next to the Field" & strCheckVar
iable(intVariable)
'captureScreenshot
Environment.Value("Execution_Log") = "False"
Environment.Value("TestCase_Log") = "False"
End If
Case "Not Exist"
If blnImageFlag = "False" Then
Reporter.ReportEvent micPass, "Verifying for the Approval Image after changing t
he Details", "The Approval Image is NOT Present next to the Field " & strCheckVa
riable(intVariable)
Else
Reporter.ReportEvent micFail, "Verifying for the Approval Image after changing t
he Details", "The Approval Image is Present next to the Field " & strCheckVariab
le(intVariable)
'captureScreenshot
Environment.Value("Execution_Log") = "False"
Environment.Value("TestCase_Log") = "False"
End If
End Select
End If
Exit For
End If
Next
Next
Next
End Function

'===============================================================================
================================
' Function to Compare the Old values after clicking on the Audit Button
Public Function CompareDROldNewValue(strBrowserName,strPageName,intTableIndexRan
ge)
' Click on the Audit Button
Call click_Image(strBrowserName,strPageName,"Audit")
Wait(5)
For intTableIndexRangeCounter = 1 to intTableIndexRange
blnTestFlag = "False"
intRowCount = Browser("MasterFile").Page("DR Profile").F
rame("lookupFrame").WebTable("index:=" & intTableIndexRangeCounter).RowCount
For intRowCounter = 1 to intRowCount
intColumnCount = Browser("MasterFile").Page("DR
Profile").Frame("lookupFrame").WebTable("index:=" & intTableIndexRangeCounter).C
olumnCount(intRowCounter)
For intColumnCounter = 1 to intColumnCount
strValue = Browser("MasterFile")
.Page("DR Profile").Frame("lookupFrame").WebTable("index:=" & intTableIndexRange
Counter).GetCellData(intRowCounter,intColumnCounter)
If Instr(1,strValue,"CUSIP Chang
e") <> 0 Then
strTabName = "CUSIP Chan
ge"
ElseIf Instr(1,strValue,"Name Ch
ange") Then
strTabName = "Name Chang
e"
ElseIf Instr(1,strValue,"Name Ch
ange") Then
strTabName = "DR Status"
End If
Call chkDROldNewValue(strTabName
,intTableIndexRangeCounter)
blnTestFlag = "True"
Exit For
Next
If blnTestFlag = "True" Then
Exit For
End If
Next
Next
End Function
'===============================================================================
================================================
' Function to Check the Old and the Nedw Vlaue after clicking on Audit Button
Public Function chkDROldNewValue(strTabName,index)
Select Case strTabName
Case "CUSIP Change"
intRowCo
unt = Browser("MasterFile").Page("DR Profile").Frame("lookupFrame").WebTable("in
dex:= "& index).RowCount
For intR
owCounter = 1 to intRowCount
strFieldName = Browser("MasterFile").Page("DR Profile").Frame("lookupFrame").Web
Table("index:= "& index).GetCellData(intRowCounter,1)
If strFieldName = "Type" Then
strNewValue = Browser("MasterFile").Page("DR Profile").Frame("lookupFrame").WebT
able("index:= "& index).GetCellData(intRowCounter,2)
strOldValue = Browser("MasterFile").Page("DR Profile").Frame("lookupFrame").WebT
able("index:= "& index).GetCellData(intRowCounter,3)
If strOldValue = "Primary" And strNewValue = "Primary" Then
Reporter.ReportEvent micPass,"Verfiying the Old and New Values","The Old Value i
s 'Primary' and New Value is 'Primary' in the Field " & strFieldName
Else
Reporter.ReportEvent micFail,"Verfiying the Old and New Values","The Old Value i
s NOT 'Primary' OR New Value is NOT 'Primary' in the Field " & strFieldName
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
End If

If strFieldName = "CUSIP" Then


strNewValue = Browser("MasterFile").Page("DR Profile").Frame("lookupFrame").WebT
able("index:= "& index).GetCellData(intRowCounter,2)
strOldValue = Browser("MasterFile").Page("DR Profile").Frame("lookupFrame").WebT
able("index:= "& index).GetCellData(intRowCounter,3)
If strOldValue = Environment.Value("CUSIPChange_CUSIP") And strNewValue = DataTa
ble.Value("NewValue_CUSIP","DRLifeCycle") Then
Reporter.ReportEvent micPass,"Verfiying the Old and New Values","The Old Value i
s " & Environment.Value("CUSIPChange_CUSIP") & " and New Value is " & DataTable.
Value("NewValue_CUSIP","DRLifeCycle") & " in the Field " & strFieldName
Else
Reporter.ReportEvent micFail,"Verfiying the Old and New Values","The Old Value i
s NOT " & Environment.Value("CUSIPChange_CUSIP") & " OR New Value is NOT " & Dat
aTable.Value("NewValue_CUSIP","DRLifeCycle") & " in the Field " & strFieldName
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
End If

If strFieldName = "DR ISIN" Then


strNewValue = Browser("MasterFile").Page("DR Profile").Frame("lookupFrame").WebT
able("index:= "& index).GetCellData(intRowCounter,2)
strOldValue = Browser("MasterFile").Page("DR Profile").Frame("lookupFrame").WebT
able("index:= "& index).GetCellData(intRowCounter,3)
If strOldValue = Environment.Value("CUSIPChange_DRISIN") AND strNewValue = DataT
able.Value("NewValue_DRISIN","DRLifeCycle") Then
Reporter.ReportEvent micPass,"Verfiying the Old and New Values","The Old Value i
s " & Environment.Value("CUSIPChange_DRISIN") & " and New Value is " & DataTable
.Value("NewValue_DRISIN","DRLifeCycle") & " in the Field " & strFieldName
Else
Reporter.ReportEvent micFail,"Verfiying the Old and New Values","The Old Value i
s NOT " & Environment.Value("CUSIPChange_DRISIN") & " OR New Value is NOT " &Dat
aTable.Value("NewValue_DRISIN","DRLifeCycle") & " in the Field " & strFieldName
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
End If

If strFieldName = "DR Ticker Symbol" Then


strNewValue = Browser("MasterFile").Page("DR Profile").Frame("lookupFrame").WebT
able("index:= "& index).GetCellData(intRowCounter,2)
strOldValue = Browser("MasterFile").Page("DR Profile").Frame("lookupFrame").WebT
able("index:= "& index).GetCellData(intRowCounter,3)
If strOldValue = Environment.Value("CUSIPChange_DRTickerSymbol") And strNewValue
= DataTable.Value("NewValue_DRTickerSymbol","DRLifeCycle") Then
Reporter.ReportEvent micPass,"Verfiying the Old and New Values","The Old Value i
s " & Environment.Value("CUSIPChange_DRTickerSymbol") & " and New Value is " &
DataTable.Value("NewValue_DRTickerSymbol","DRLifeCycle") & " in the Field " & s
trFieldName
Else
Reporter.ReportEvent micFail,"Verfiying the Old and New Values","The Old Value i
s NOT " & Environment.Value("CUSIPChange_DRTickerSymbol") & " OR New Value is N
OT " & DataTable.Value("NewValue_DRTickerSymbol","DRLifeCycle") & " in the Fiel
d " & strFieldName
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
End If

If strFieldName = "Ratio DRs" Then


strNewValue = Browser("MasterFile").Page("DR Profile").Frame("lookupFrame").WebT
able("index:= "& index).GetCellData(intRowCounter,2)
strOldValue = Browser("MasterFile").Page("DR Profile").Frame("lookupFrame").WebT
able("index:= "& index).GetCellData(intRowCounter,3)
If CInt(strOldValue) = CInt(Environment.Value("CUSIPChange_RatioDRs")) And CInt(
strNewValue) = CInt(Environment.Value("CUSIP_NewRatioDRs")) Then
Reporter.ReportEvent micPass,"Verfiying the Old and New Values","The Old Value i
s " & Environment.Value("CUSIPChange_RatioDRs") & " and New Value is " & Enviro
nment.Value("CUSIP_NewRatioDRs") & " in the Field " & strFieldName
Else
Reporter.ReportEvent micFail,"Verfiying the Old and New Values","The Old Value i
s NOT " & Environment.Value("CUSIPChange_RatioDRs") & " OR New Value is NOT " &
Environment.Value("CUSIP_NewRatioDRs") & " in the Field " & strFieldName
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
End If

If strFieldName = "Ratio Underlying Shares" Then


strNewValue = Browser("MasterFile").Page("DR Profile").Frame("lookupFrame").WebT
able("index:= "& index).GetCellData(intRowCounter,2)
strOldValue = Browser("MasterFile").Page("DR Profile").Frame("lookupFrame").WebT
able("index:= "& index).GetCellData(intRowCounter,3)
If CInt(strOldValue) = CINT(Environment.Value("CUSIPChange_RatioUnderlyingShares
")) And Cint(strNewValue) = CInt(Environment.Value("CUSIP_NewRatioUnderlyingShar
es")) Then
Reporter.ReportEvent micPass,"Verfiying the Old and New Values","The Old Value i
s " & Environment.Value("CUSIPChange_RatioUnderlyingShares") & " and New Value
is " & Environment.Value("CUSIP_NewRatioUnderlyingShares") & " in the Field " &
strFieldName
Else
Reporter.ReportEvent micFail,"Verfiying the Old and New Values","The Old Value i
s NOT " & Environment.Value("CUSIPChange_RatioUnderlyingShares") & " OR New Val
ue is NOT " & Environment.Value("CUSIP_NewRatioUnderlyingShares") & " in the Fie
ld " & strFieldName
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
End If

If strFieldName = "DR Exchange" Then


strNewValue = Browser("MasterFile").Page("DR Profile").Frame("lookupFrame").WebT
able("index:= "& index).GetCellData(intRowCounter,2)
strOldValue = Browser("MasterFile").Page("DR Profile").Frame("lookupFrame").WebT
able("index:= "& index).GetCellData(intRowCounter,3)
If strOldValue = Environment.Value("CUSIPChange_DRExchange") And strNewValue = D
ataTable.Value("NewValue_DRExchange","DRLifeCycle") Then
Reporter.ReportEvent micPass,"Verfiying the Old and New Values","The Old Value i
s " & Environment.Value("CUSIPChange_DRExchange") & " and New Value is " & Data
Table.Value("NewValue_DRExchange","DRLifeCycle") & " in the Field " & strFieldNa
me
Else
Reporter.ReportEvent micFail,"Verfiying the Old and New Values","The Old Value i
s NOT " & Environment.Value("CUSIPChange_DRExchange") & " OR New Value is NOT "
& DataTable.Value("NewValue_DRExchange","DRLifeCycle") & " in the Field " & str
FieldName
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
End If
Next

Case "Name Change"


intRowC
ount = Browser("MasterFile").Page("DR Profile").Frame("lookupFrame").WebTable("i
ndex:= "& index).RowCount
For intR
owCounter = 1 to intRowCount
strFieldName = Browser("MasterFile").Page("DR Profile").Frame("lookupFrame").Web
Table("index:= "& index).GetCellData(intRowCounter,1)
If strFieldName = "Name" Then
strNewValue = Browser("MasterFile").Page("DR Profile").Frame("lookupFrame").WebT
able("index:= "& index).GetCellData(intRowCounter,2)
strOldValue = Browser("MasterFile").Page("DR Profile").Frame("lookupFrame").WebT
able("index:= "& index).GetCellData(intRowCounter,3)
If strOldValue = DataTable.Value("DRName","DRLifeCycle") AND strNewValue = Data
Table.Value("NewValue","DRLifeCycle") Then
Reporter.ReportEvent micPass,"Verfiying the Old and New Values","The Old Value
is " & Environment.Value("Name_OldValue") & " and New Value is " & DataTable.Va
lue("NewValue","DRLifeCycle") & " in the Field " & strFieldName
Else
Reporter.ReportEvent micFail,"Verfiying the Old and New Values","The Old Value i
s NOT " & Environment.Value("Name_OldValue") & " OR New Value is NOT " & DataTa
ble.Value("NewValue","DRLifeCycle") & " in the Field " & strFieldName
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
End If
Next
End Select
End Function

'===============================================================================
=============================================
Public Function DRFlagCheck()
' Select Detail tab
Call click_WebElement("MasterFile","DR Profile","Detail")
Call chkFlagImage("MasterFile","DR Profile","Details","Name","No
t Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is D
isplayed next to the Field 'Name'","The Modified Flag is Not Displayed Next to t
he Field 'Name'"
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is D
isplayed next to the Field 'Name'","The Modified Flag is Displayed Next to the F
ield 'Name'"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Select CUSIP Add / Summary Tab
Call click_WebElement("MasterFile","DR Profile","CUSIPSummary")
Call ModifiedFlagImageCheck("MasterFile","DR Profile","CUSIPSumm
ary","Not Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is d
isplayed in the CUSIP Summary tab or Not","The Flag is Not displayed in the CUSI
P Summary tab"
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is d
isplayed in the CUSIP Summary tab or Not","The Flag is Still displayed in the CU
SIP Summary tab"
'Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Clicking on the Corporate Action Link in DR Profile page -- Na
med Changed and CUSIP Changed Tab
Call click_WebElement("MasterFile","DR Profile","CorporateAction
")
Call chkFlagImageinTab("MasterFile","Corporate Action Data Fix",
"TabName","Name Change;CUSIP Change","Not Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is d
isplayed in the Name Change and CUSIP Change Tab or Not","The Flag is Not displa
yed in the Name Change and CUSIP Change Tab"
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is d
isplayed in the Name Change and CUSIP Change Tab or Not","The Flag is displayed
in the Name Change OR CUSIP Change Tab"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call chkFlagImage("MasterFile","Corporate Action Data Fix","NewV
alue","Name","Not Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is d
isplayed Next to the Fields in the Name Changed Tab","The Flag is Not displayed
in the Fields in the Name Changed Tab"
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is d
isplayed in the Fields in the Name Changed Tab","The Flag is displayed in the Fi
elds in the Name Changed Tab"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call click_WebElement("MasterFile","Corporate Action Data Fix","
CUSIPChange")
Call chkFlagImage("MasterFile","Corporate Action Data Fix","CUSI
P_NewValue","CUSIP;DR ISIN;DR Ticker Symbol;Ratio DRs;Ratio Underlying Shares;DR
Exchange","Not Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying if the Flag is d
isplayed Next to the Fields in the CUSIP Changed Tab","The Flag is Not displayed
in the Fields in the CUSIP Changed Tab"
Else
Reporter.ReportEvent micFail,"Verifying if the Flag is d
isplayed in the Fields in the CUSIP Changed Tab","The Flag is displayed in the F
ields in the CUSIP Changed Tab"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
strNameChangeValue = get_WebList_Value("MasterFile","Corporate A
ction Data Fix","NameChange")
If UCase(Trim(strNameChangeValue)) = UCase(Trim(DataTable.Value(
"IssuerName_Name","DRLifeCycle"))) Then
Reporter.ReportEvent micPass,"Verifying the Name in the
Name Change Field after Clicking on Corporate Action Link","The Name in the Name
Change Field is " & DataTable.Value("IssuerName_Name","DRLifeCycle")
Else
Reporter.ReportEvent micFail,"Verifying the Name in the
Name Change Field after Clicking on Corporate Action Link","The Name in the Name
Change Field is NOT " & DataTable.Value("IssuerName_Name","DRLifeCycle")
Environment.Value("Execution_Log") = "False"
End If
Wait(5)
If DataTable.Value("CheckCorporateActionIssuerFlag","DRLifeCycle
") = "Y" Then
' Click on DR Profile and click on Issuer Name
Call click_WebElement("MasterFile","Corporate Ac
tion Data Fix","DR Profile")
' Click on the Issuer Name
strIssuerName = Browser("MasterFile").Page("DR P
rofile").WebTable("Issuer").GetCellData(1,2)
Browser("MasterFile").Page("DR Profile").WebElem
ent("html tag:=TD","innertext:=" & strIssuerName).Click
If Browser("MasterFile").Dialog("Microsoft Inter
net Explorer").Exist(5) Then
Browser("MasterFile").Dialog("Microsoft
Internet Explorer").WinButton("Cancel").Click
End If
' Click on the Corporate Action link in Issuer
Profile
Call click_WebElement("MasterFile","Issuer Profi
le","CorporateAction")
Call chkFlagImageinTab("MasterFile","Corporate A
ction Data Fix","TabName","Name;Marketing Name","Not Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying
if the Flag is displayed in the Name and Marketing Name Tab or Not","The Flag is
Not displayed in the Name and Marketing Name"
Else
Reporter.ReportEvent micFail,"Verifying
if the Flag is displayed in the Name and Marketing Name Tab or Not","The Flag is
displayed in the Name and Marketing Name"
Environment.Value("TestCase_Log") = "Tru
e"
Environment.Value("Execution_Log") = "Fa
lse"
End If
Call chkFlagImage("MasterFile","Corporate Action
Data Fix","NewValue","Name","Not Exist")
If Environment.Value("TestCase_Log") = "True" Th
en
Reporter.ReportEvent micPass,"Verifying
if the Flag is displayed Next to the Fields in the Name Tab","The Flag is Not di
splayed in the Fields in the Name Tab"
Else
Reporter.ReportEvent micFail,"Verifying
if the Flag is displayed in the Fields in the Name Tab","The Flag is displayed i
n the Fields in the Name Tab"
Environment.Value("TestCase_Log") = "Tru
e"
Environment.Value("Execution_Log") = "Fa
lse"
End If
Wait(5)
' Changing back the Issuer name
'Call set_WebEdit_Value("MasterFile","Corporate
Action Data Fix","Name_NewValue",Environment.Value("Name_OldIssuerName"))
'Call click_Image("MasterFile","Corporate Action
Data Fix","Save")
Wait(2)
' Select Marketing Name Tab
Call click_WebElement("MasterFile","Corporate Ac
tion Data Fix","MarketingName")
Call chkFlagImage("MasterFile","Corporate Action
Data Fix","CUSIP_NewValue","Marketing Name","Not Exist")
If Environment.Value("TestCase_Log") = "True" Th
en
Reporter.ReportEvent micPass,"Verifying
if the Flag is displayed Next to the Fields in the Marketing Name Tab","The Flag
is Not displayed in the Fields in the Marketing Name Tab"
Else
Reporter.ReportEvent micFail,"Verifying
if the Flag is displayed in the Fields in the Marketing Name Tab","The Flag is d
isplayed in the Fields in the Marketing Name Tab"
Environment.Value("TestCase_Log") = "Tru
e"
Environment.Value("Execution_Log") = "Fa
lse"
End If
Wait(5)
'Call set_WebEdit_Value("MasterFile","Corporate
Action Data Fix","Market_NewValue",Environment.Value("Market_OldValue"))
'Call click_Image("MasterFile","Corporate Action
Data Fix","Save")
'Wait(5)
' Click on the Issuer to Navigate to Underlying
Security Profile
Call click_WebElement("MasterFile","Corporate Ac
tion Data Fix","Issuer")
' Click on Underlying Security Search
Call click_WebElement("MasterFile","Issuer Profi
le","UnderlyingSecuritySearch")
Wait(5)
intPos = Browser("MasterFile").Page("Profile - U
nderlying Security").WebTable("UnderlyingSecuritySearch").GetRowWithCellText(Dat
aTable.Value("MarketNewValue","DRLifeCycle"))
If intPos <> -1 Then
Reporter.ReportEvent micPass,"Verifying
if the Underlying Security Name","The Underlying Security Displayed is " & DataT
able("MarketNewValue","DRLifeCycle")
Else
Reporter.ReportEvent micPass,"Verifying
if the Underlying Security Name","The Underlying Security Displayed is NOT " &
DataTable("MarketNewValue","DRLifeCycle")
Environment.Value("Execution_Log") = "Fa
lse"
End If
' Clicking on the DR in Profile Underlying Seacu
rity Search Page
Browser("MasterFile").Page("Profile - Underlying
Security").WebElement("html tag:=TD","innertext:= " & DataTable.Value("MarketNe
wValue","DRLifeCycle"),"index:=1").Click
Wait(5)
' Click On Corporate Action Link in Underlying S
ecurity Profile Page
Call click_WebElement("MasterFile","Underlying S
ecurity Profile","CorporateAction")
' Checking for the Flag
Call chkFlagImageinTab("MasterFile","Corporate A
ction Data Fix","TabName","SEDOL","Not Exist")
If Environment.Value("TestCase_Log") = "True" T
hen
Reporter.ReportEvent micPass,"Verifying
if the Flag is displayed in the SEDOL tab or Not","The Flag is Not displayed in
the SEDOL Tab"
Else
Reporter.ReportEvent micFail, "Verifying
if the Flag is displayed in the SEDOL tab or Not","The Flag is Still Displayed
in the SEDOL Tab"
Environment.Value("TestCase_Log") = "Tru
e"
Environment.Value("Execution_Log") = "Fa
lse"
End If
Call chkFlagImage("MasterFile","Corporate Action
Data Fix","NewValue","Underlying SEDOL","Not Exist")
If Environment.Value("TestCase_Log") = "True" T
hen
Reporter.ReportEvent micPass,"Verifying
if the Flag is displayed Next to the Fields in the SEDOL Tab or NOT","The Flag i
s Not displayed Next to the Fields in the SEDOL Tab"
Else
Reporter.ReportEvent micFail,"Verifying
if the Flag is displayed Next to the Fields in the SEDOL Tab or NOT","The Flag i
s displayed Next to the Fields in the SEDOL Tab"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "Fa
lse"
End If
Wait(2)
' Select ISIN Tab
Call click_WebElement("MasterFile","Corporate Ac
tion Data Fix","ISIN")
Call chkFlagImageinTab("MasterFile","Corporate A
ction Data Fix","TabName","ISIN","Not Exist")
If Environment.Value("TestCase_Log") = "True" T
hen
Reporter.ReportEvent micPass,"Verifying
if the Flag is displayed in the ISIN tab or Not","The Flag is Not displayed in
the ISIN Tab"
Else
Reporter.ReportEvent micFail, "Verifying
if the Flag is displayed in the ISIN tab or Not","The Flag is Still Displayed
in the ISIN Tab"
Environment.Value("TestCase_Log") = "Tru
e"
Environment.Value("Execution_Log") = "Fa
lse"
End If
Call chkFlagImage("MasterFile","Corporate Action
Data Fix","CUSIP_NewValue","Underlying ISIN","Not Exist")
If Environment.Value("TestCase_Log") = "True" Th
en
Reporter.ReportEvent micPass,"Verifying
if the Flag is displayed Next to the Fields in the ISIN Tab or NOT","The Flag is
Not displayed Next to the Fields in the ISIN Tab"
Else
Reporter.ReportEvent micFail,"Verifying
if the Flag is displayed Next to the Fields in the ISIN Tab or NOT","The Flag is
displayed Next to the Fields in the ISIN Tab"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "Fa
lse"
End If
' Select Par/Value Currency tab
Call click_WebElement("MasterFile","Corporate Ac
tion Data Fix","ParValue")
Call chkFlagImageinTab("MasterFile","Corporate A
ction Data Fix","TabName","Par Value/Currency","Not Exist")
If Environment.Value("TestCase_Log") = "True" T
hen
Reporter.ReportEvent micPass,"Verifying
if the Flag is displayed in the Par Value Currency Tab or Not","The Flag is Not
displayed in the Par Value Currency Tab"
Else
Reporter.ReportEvent micFail, "Verifying
if the Flag is displayed in the Par Value Currency Tab or Not","The Flag is St
ill Displayed in the Par Value Currency Tab"
Environment.Value("TestCase_Log") = "Tru
e"
Environment.Value("Execution_Log") = "Fa
lse"
End If
Call chkFlagImage("MasterFile","Corporate Action
Data Fix","Ratio_NewValue","Par Value;Currency","Not Exist")
If Environment.Value("TestCase_Log") = "True" T
hen
Reporter.ReportEvent micPass,"Verifying
if the Flag is displayed Next to the Fields in the Par Value Currency Tab or NOT
","The Flag is Not displayed Next to the Fields in the IPar Value Currency Tab"
Else
Reporter.ReportEvent micFail,"Verifying
if the Flag is displayed Next to the Fields in the Par Value Currency Tab or NOT
","The Flag is displayed Next to the Fields in the Par Value Currency Tab"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "Fa
lse"
End If
End If
' If Environment.Value("TestCase_Log") = "True" Then
' Reporter.ReportEvent micPass,"Verifying if the Flag is d
isplayed in the SEDOL, ISIN and Par Valu/Currency tab or Not","The Flag is Not
displayed in the SEDOL, ISIN and Par Valu/Currency tab"
' Else
' Reporter.ReportEvent micFail,"Verifying if the Flag is d
isplayed in the Name and Marketing Name Tab or Not","The Flag is displayed in th
e SEDOL or ISIN or Par Valu/Currency tab"
' 'Environment.Value("TestCase_Log") = "True"
' Environment.Value("Execution_Log") = "False"
' End If
End Function

'===============================================================================
============================
' Function to Create a New DR with CUSIP
Public Function CreateNewDR(strBrowserName,strPageName,strDRPageName,strCUSIPPag
eName)
' Select Master File Application
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","DRLifeCycle"))
Call set_WebEdit_Value("MasterFile","Profile - DR Search","Issue
rName",DataTable.Value("IssuerName","DRLifeCycle"))
Call click_Image("MasterFile","Profile - DR Search","Search")
If Browser(strBrowserName).Page(strPageName).Image("NewDR").Exis
t(2) then
Call click_Image(strBrowserName,strPageName,"NewDR")
End if
'Fill the details of the new DR to be created
Call Select_Combo_Value("CreateNewDR","CreateNewDR","Sponsored",
DataTable.Value("Sponsored","DRLifeCycle"))
Call click_Image("CreateNewDR","CreateNewDR","Depositary")
Call operation_on_FrameObjects_WithName("CreateNewDR","CreateNew
DR","lookupFrame","WebCheckBox",DataTable.value("NewDRDepositary","DRLifeCycle")
,"")
Call operation_on_FrameObjects_WithName("CreateNewDR","CreateNew
DR","lookupFrame","WebButton"," Ok ","")
Call Select_Combo_Value("CreateNewDR","CreateNewDR","Type",DataT
able.Value("NewDRType","DRLifeCycle"))
Call click_WebButton("CreateNewDR","CreateNewDR","Ok")
strCurrentTime = Time
strTime = Split(strCurrentTime,":",-1,1)
strIndTime = Split(strTime(2)," ",-1,1)
strTimeStamp = strTime(0) & strTime(1) & strIndTime(0) &strIndTi
me(1)
CUSIPNo = "0" & strTimeStamp
If Len(CUSIPNo) = 8 Then
CUSIPNo = CUSIPNo & "0"
End If
DRName = "QTPDR_" & strTimeStamp
DRName= Replace(DRName," ","")
DataTable.Value("DRName","DRLifeCycle") = DRName
DataTable.Value("CUSIP", "DRLifeCycle") = CUSIPNo
strVar1 = Environment("TestDir")
strIndVar1 = Split(strVar1,"\",-1,1)
strBound = UBound(strIndVar1)
strAllPath1 =""
For intCounters = 0 to strBound - 1
strAllPath1 = strAllPath1 & strIndVar1(intCounte
rs) &"\"
Next
strPath1 = Trim(strPath1)
strDataPath1 = strAllPath1 & "DataTables\"
DataTable.ExportSheet strDataPath1 & "DRLifeCycle.xls","DRLifeCy
cle"
DataTable.ImportSheet strDataPath1 & "DRLifeCycle.xls","DRLifeCycle","DR
LifeCycle"
'Fill the details in the Details tab for DR
Call set_WebEdit_Value(strBrowserName,strDRPageName,"Details_Nam
e",DataTable.Value("DRName","DRLifeCycle"))
Call Select_Combo_Value(strBrowserName,strDRPageName,"SecurityDe
scription",DataTable.Value("SecurityDescription","DRLifeCycle"))
If DataTable.Value("NewDREffectiveDate","DRLifeCycle") <> "" Th
en
Call click_Image(strBrowserName,strDRPageName,"Details_E
ffectiveDate")
Call SetDate(strBrowserName,strDRPageName,DataTable.Valu
e("NewDREffectiveDate","DRLifeCycle"))
End If
If Browser(strBrowserName).Dialog("Microsoft Internet Explorer")
.Exist(2) Then
Browser(strBrowserName).Dialog("Microsoft Internet Explo
rer").WinButton("OK").click
End If
strFirstFilerValue = get_WebList_Value(strBrowserName,strDRPageN
ame,"FirstFiler")
If DataTable.Value("Sponsored","DRLifeCycle") = "U" Then
If strFirstFilerValue = "#0" Then
Call Select_Combo_Value(strBrowserName,strDRPage
Name,"FirstFiler",DataTable.Value("NewDRDepositary", "DRLifeCycle"))
End If
End If
Wait(5)
'Call set_WebEdit_Value(strBrowserName,strDRPageName,"Comments","This is
for a testing purpose. This has been created by the ADR Automation Team")
Call click_Image(strBrowserName,strDRPageName,"Save")
Wait(5)
'Select the CUSIP Add tab and Click on Add button for Creating a
New CUSIP
Call click_WebElement(strBrowserName,strDRPageName,"CUSIPSummary
")
Call click_WebButton(strBrowserName,strDRPageName,"Add")
'Set the CUSIP details
FinalRowCount = Browser("MasterFile").Page("DR Profile").WebTable("CUSIP
Summary").RowCount
Browser("MasterFile").Page("DR Profile").WebTable("CUSIPSummary"
).ChildItem(FinalRowCount,1,"WebList","0").Select DataTable.Value("CUSIP_Type","
DRLifeCycle")
If Browser("MasterFile").Page("DR Profile").Image("NewCUSIP").Ex
ist(5) Then
Browser("MasterFile").Page("DR Profile").Image("NewCUSIP
").Click
End If
strCurrentTime = Time
strCurrentDate = Date
strDate = Split(strCurrentDate,"/" ,-1,1)
strTime = Split(strCurrentTime,":",-1,1)
strDateTimeStamp = strDate(0) &strDate(1)&strDate(2) & " "& str
Time(0) & strTime(1) & strTime(2)
strCUSIPDefaultName = get_WebEdit_Value(strBrowserName,strCUSIPP
ageName,"CUSIPName")
strFirstChar = Mid(strCUSIPDefaultName,1,1)
If Asc(strFirstChar) = 94 or Asc(strFirstChar) = 38 Then
CUSIPNames = strFirstChar & "QTPCUSIP_" & strDateTimeSta
mp
SelectCUSIPNames = "\"& strFirstChar &"\"&"QTPCUSIP_" &
strDateTimeStamp
CUSIPName = Replace(CUSIPNames," ","")
SelectCUSIPName = Replace(SelectCUSIPNames," ","")
DataTable.Value("CUSIPName", "DRLifeCycle") = CUSIPName
DataTable.Value("SelectCUSIPName", "DRLifeCycle") = Sele
ctCUSIPName
Else
CUSIPNames = "QTPCUSIP_" & strDateTimeStamp
CUSIPName = Replace(CUSIPNames," ","")
SelectCUSIPName = Replace(SelectCUSIPNames," ","")
DataTable.Value("CUSIPName", "DRLifeCycle") = CUSIPName
DataTable.Value("SelectCUSIPName", "DRLifeCycle") = CUSI
PName
End If
DataTable.ExportSheet strDataPath1 & "DRLifeCycle.xls","DRLifeCycle"
DataTable.ImportSheet strDataPath1 & "MasterFileProfile.xls","DRLifeCycl
e","DRLifeCycle"
' Entering the NEW CUSIP Details
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"CUSIPNam
e",DataTable.Value("CUSIPName","DRLifeCycle"))
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"RatioDRs",DataTa
ble.Value("RatioDRs","DRLifeCycle"))
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"RatioUnd
erlyingShares",DataTable.Value("RatioUnderlyingShares","DRLifeCycle"))
' Selecting an Underlying Security
Call SelectImage(strBrowserName,strCUSIPPageName,"Detail","Under
lying Security","info.gif")
Call SelectValueinFrame(strBrowserName,strCUSIPPageName,"lookupF
rame","Exchange")
' Selecting Common Depository
If DataTable.Value("NewDRDepositary","DRLifeCycle") = "BNY" Then
Call SelectImage(strBrowserName,strCUSIPPageName,"Detail
","Common Depository","info.gif")
Call SelectValueinFrame(strBrowserName,strCUSIPPageName,
"lookupFrame","Name")
End If
' If Browser("MasterFile").Page("CUSIP Profile").Image("Underlyin
gSecurity").Exist(2) Then
' Call click_Image(strBrowserName,strCUSIPPageName,"Underl
yingSecurity")
' Call SelectValueinFrame(strBrowserName,strCUSIPPageName,
"lookupFrame","Exchange")
' Wait(2)
' Call click_Image(strBrowserName,strCUSIPPageName,"Warran
tAgent")
' Call SelectValueinFrame(strBrowserName,strCUSIPPageName,
"lookupFrame","Name")
' Else
' Call click_Image(strBrowserName,strCUSIPPageName,"Warran
tAgent")
' Call SelectValueinFrame(strBrowserName,strCUSIPPageName,
"lookupFrame","Exchange")
' End If
' Selecting the DR Exchange
Call SelectImage(strBrowserName,strCUSIPPageName,"Detail","DR Ex
change","info.gif")
'Call click_Image(strBrowserName,strCUSIPPageName,"DRExchange")
Call SelectDRExchange(strBrowserName,strCUSIPPageName,"Exchange"
,DataTable.Value("DRExchange","DRLifeCycle"))
' Entering the DR Ticker Symbol
strDRTickerSymbol =CreateAlphanumericString(5)
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"DRTicker
Symbol",strDRTickerSymbol)
' Entering DR SEDOL
If DataTable.Value("NewDRType","DRLifeCycle") = "Reg. S" Or Data
Table.Value("NewDRType","DRLifeCycle") = "144A" Then
strDRSEDOL =CreateAlphanumericString(7)
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"
DRSEDOL",strDRSEDOL)
End If
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"CUSIP",D
ataTable.Value("CUSIP","DRLifeCycle"))
If Browser(strBrowserName).Dialog("Microsoft Internet Explorer")
.Exist(2) Then
Browser(strBrowserName).Dialog("Microsoft Internet Explo
rer").WinButton("OK").Click
End If
Wait(5)
Call click_Image(strBrowserName,strCUSIPPageName,"Save")
Wait(10)
' Clicking on the DR and changing the DR Status to Effective
strValues = Browser(strBrowserName).Page(strCUSIPPageName).WebTa
ble("DR").GetCellData(1,2)
Browser(strBrowserName).Page(strCUSIPPageName).WebElement("html
tag:=TD","innertext:=" & strValues,"index:=0","class:=tabSelected").Click
Wait(5)
If Browser("MasterFile").Page("DR Profile").WebEdit("Details_SU"
).Exist(5) Then
strSUValue = Browser("MasterFile").Page("DR Profile").We
bEdit("Details_SU").GetROProperty("value")
Environment.Value("SponserUnsponser") = strSUValue
End If

If DataTable.Value("NewDRDepositary","DRLifeCycle") = "BNY" Then


If DataTable.Value("NewDRType","DRLifeCycle") = "Level I
" or DataTable.Value("NewDRType","DRLifeCycle") = "Level II" or DataTable.Value(
"NewDRType","DRLifeCycle") = "Level III" Then
Wait(5)
' Calling a Function to Fill the SECFiling Tab D
etails
Call DRFillSECFiling()
End If
End If
Wait(5)
' Calling a Function to Fill the DR Documentation Details
If DataTable.Value("NewDRDepositary", "DRLifeCycle") = "BNY" Th
en
Call DRDocumentation()
If Browser(strBrowserName).Dialog("Microsoft Internet Ex
plorer").Exist(2) Then
Browser(strBrowserName).Dialog("Microsoft Intern
et Explorer").WinButton("Cancel").Click
End If
End If
Wait(5)
If DataTable.Value("IssuerDocumentation","DRLifeCycle") = "Y" Th
en
Call DRIssuerDocumentation()
End If
Wait(5)
' Clicking on the DR and changing the DR Status to Effective
Call Select_Combo_Value(strBrowserName, strDRPageName, "Details_
Status","Effective")
Call click_Image(strBrowserName,strDRPageName,"Save")
If Browser(strBrowserName).Dialog("Microsoft Internet Explorer")
.Exist(2) Then
Browser(strBrowserName).Dialog("Microsoft Internet Explo
rer").WinButton("Cancel").Click
End If
Wait(5)
' Logout from Application and Approve the Newly Created CUSIP an
d DR Name
Call logoutfromApp(strBrowserName, strDRPageName)
' Login again with Approval ID
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call login("MasterFile","Login Page","Approver","MFLogin")
' Approving the Newly created CUSIP and DR.
Call ApprovalFunction_DR("MasterFile","CUSIP Profile","Name;CUSI
P;Last User Updated;Last Updated",DataTable.Value("CUSIPName","DRLifeCycle"),"Ap
proved the Changes Made","Approved","Pending Approval")
If DataTable.Value("NewDRDepositary","DRLifeCycle") = "BNY" Then
Call ApprovalFunction_DR("MasterFile","DR Documentation"
,"DR Name;DR Type;S/U;Origin;DR Structure;Last User Updated;Last Updated",DataTa
ble.Value("DRName","DRLifeCycle"),"Approved the Changes Made","Approved","Pendin
g Approval")
End If
Call ApprovalFunction_DR("MasterFile","DR Profile","Name;Type;De
positary;S/U;Origin;Structure;Last User Updated;Last Updated",DataTable.Value("D
RName","DRLifeCycle"),"Approved the Changes Made","Approved","Pending Approval")
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
End Function

'===============================================================================
===================================
Public Function SelectExistingCUSIP()
Call click_Image("MasterFile","DR Profile","CUSIPLookup")
Wait(5)
intRowCount = Browser("MasterFile").Page("DR Profile").Frame("lookupFram
e").WebTable("DR").RowCount
For intRowCounter = 2 to intRowCount
strDRFlag = Browser("MasterFile").Page("DR Profile").Frame("look
upFrame").WebTable("DR").GetCellData(intRowCounter,1)
If strDRFlag = "Y" Then
strCUSIP = Browser("MasterFile").Page("DR Profile").Fram
e("lookupFrame").WebTable("DR").GetCellData(intRowCounter,2)
If Trim(UCase(strCUSIP)) = Trim(UCase(DataTable.Value("CUSIPName","DR
LifeCycle"))) Then
Browser("MasterFile").Page("DR Profile").Frame("
lookupFrame").WebElement("html tag:=TD","innertext:=" & strDRFlag).Click
Wait(2)
Exit For
End If
End If
Next
End Function

'===============================================================================
===================================================
' Name of the Function : ApprovalFunction_DR
' Scope of the Function : Public
' Author : Shyam H D
' Description : This function is used to Approve or Reject the
Changes madescheck iif the WebList is a Mandatory Field or Not.
' Parameters accepted : Application Name, Module Name, Table Header Va
lues, Modified or Created Element Name, Approval Comment, Approval Condition
' Parameter returned : Nill
' Date and / or Version : 22-11-2008,version 1.0
'Function Call : Call ApprovalFunction("MasterFile","CUSIP Prof
ile","Name;CUSIP;Last User Updated;Last Updated",DataTable.Value("CUSIPName","CU
SIP"),"Approved")
'===============================================================================
===================================================

Public Function ApprovalFunction_DR(strAppElementName,strModuleName, strModuleTa


bleColumnName,strElementName,strApprovalComment,strApproveCondition,strApprovalS
tatus)
Browser("MasterFile").Page("Depositary Receipt Division's").WebE
lement("Approval Queue").Click
strAppName = Browser("MasterFile").Page("Approval Queue Item Sea
rch").WebTable("Application").GetCellData(1,1)
strActiveItemColumn = Browser("MasterFile").Page("Approval Queue
Item Search").WebTable("Application").GetCellData(1,2)
strAppName1 = Browser("MasterFile").Page("Approval Queue Item Se
arch").WebTable("Application").GetCellData(2,1)
strAppName2 = Browser("MasterFile").Page("Approval Queue Item Se
arch").WebTable("Application").GetCellData(3,1)
strAppValue1 = Browser("MasterFile").Page("Approval Queue Item S
earch").WebTable("Application").GetCellData(3,2)
If strAppName = "Application" AND strActiveItemColumn = "Number of Activ
e Items" AND strAppName1 = "Billing" AND strAppName2 ="MasterFile" Then
Reporter.ReportEvent micPass," Vefifying the Application
Name in the Approval Queue Item Search page","The Application Names "&strAppNam
e1 & "and" &strAppName2 & "are Displayed"
Else
Reporter.ReportEvent micFail," Vefifying the Application
Name in the Approval Queue Item Search page","The Application Names "&strAppNam
e1 & "and" &strAppName2 & "are Displayed"
'Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
' Clicking on the Master File Application
Browser("MasterFile").Page("Approval Queue Item Search").WebElement("htm
l tag:=TD","innertext:=" & strAppElementName).Click
intRowCount = Browser("MasterFile").Page("Approval Queue Item Search").W
ebTable("Type").RowCount
intColumnCount = Browser("MasterFile").Page("Approval Queue Item
Search").WebTable("Type").ColumnCount(1)
For iCounter = 1 to intColumnCount
strValue = Browser("MasterFile").Page("Approval Queue It
em Search").WebTable("Type").GetCellData(1,iCounter)
strAppTableValue = strAppTableValue & strValue & ";"
Next
intPos = Len(strAppTableValue)
strAppTableValue =Mid(strAppTableValue,1,intPos-1)
If intRowCount >1 Then
Reporter.ReportEvent micPass,"Verifying the Items Number
of Items in the Approval Queue Items","The Items are dispalyed in the Approval
Queue Items Table as the Row Count is Greate than 1"
Else
Reporter.ReportEvent micFail," Verifying the Items Numbe
r of Items in the Approval Queue Items","The Items are dispalyed in the Approval
Queue Items Table as the Row Count is Greate than 1"
'Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
If strAppTableValue = "Type;Number of Profiles;Number of Active
Items;Number of Rejected Items" Then
Reporter.ReportEvent micPass," Verifying the Header of t
he Result Table of Approval Queue Items","The Header of the Approval Queue Items
is dispalyed as "&strAppTableValue
Else
Reporter.ReportEvent micFail," Verifyng the Header of th
e Result Table of Approval Queue Items","The Header of the Approval Queue Items
is NOT dispalyed as "&strAppTableValue
'Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
Wait(3)
' Selecting the Module
If Browser("MasterFile").Page("Approval Queue Item Search").WebE
lement("html tag:=TD","innertext:= " & strModuleName).Exist(1) Then
Browser("MasterFile").Page("Approval Queue Item Search")
.WebElement("html tag:=TD","innertext:=" & strModuleName).Click
Reporter.ReportEvent micPass,"Verifying if Module " & st
rModuleName & " is Present or Not","The Module " & strModuleName & " is Present"
Else
Reporter.ReportEvent micFail,"Verifying if Module " & st
rModuleName & " is Present or Not","The Module " & strModuleName & " is NOT Pres
ent"
'Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
Exit Function
End If
Call pageCheck_ApprovalQueue(strModuleName,strApprovalStatus)
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Verifying the Field presen
t after selecting " & strModuleName,"The Required Fields are Present after Selec
ting the Module " & strModuleName
Else
Reporter.ReportEvent micFail,"Verifying the Field presen
t after selecting " & strModuleName,"The Required Fields are NOT Present after S
electing the Module " & strModuleName
'Environment.Value("Execution_Log") = "False"
Environment.Value("TestCase_Log") = "True"
End If
' Get the Columns of the Table
intColumnCount = Browser("MasterFile").Page("Approval Queue Item
Search").WebTable("Name").ColumnCount(1)
For intColumnCounter = 1 To intColumnCount
strAppValue = Browser("MasterFile").Page("Approval Queue
Item Search").WebTable("Name").GetCellData(1,intColumnCounter)
strAppFinalValue = strAppFinalValue & strAppValue & ";"
Next
strAppFinalValue = Trim(strAppFinalValue)
intPos = Len(strAppFinalValue)
strAppFinalValue = Mid(strAppFinalValue,1,intPos-1)
strModuleColumnName = Split(strModuleTableColumnName,";",-1,1)
For intCounter = 0 to UBound(strModuleColumnName)
If InStr(1,strAppFinalValue,strModuleColumnName(intCount
er)) <> 0 Then
Reporter.ReportEvent micPass,"Verifying the Colu
mn Names of "& strModuleName,"The Column Name "& strModuleColumnName(intCounter)
& "is Displayed successfully with the Items for Pending for Approval"
Else
Reporter.ReportEvent micFail,"Verifying the Colu
mn Names of "& strModuleName,"The Column Name "& strModuleColumnName(intCounter)
& "is NOT Displayed successfully with the Items for Pending for Approval"
'Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
Next
' Selecting the Required Element in the Table
If strModuleName = "CUSIP Profile" Then
If DataTable.Value("NewDRDepositary","DRLifeCycle") <> "BNY" OR Data
Table.Value("Depositary","DRLifeCycle") <> "BNY" Then
Browser("MasterFile").Page("Approval Queue Item
Search").WebElement("html tag:=TD","innertext:=" & DataTable.Value("SelectCUSIPN
ame","DRLifeCycle"),"index:=0").Click
Else
Call SelectValueinTable("MasterFile","Approval Q
ueue Item Search","Name",strElementName)
End If
Else
Call SelectValueinTable("MasterFile","Approval Queue Ite
m Search","Name",strElementName)
End If

' Select the Case based on the Approval or Reject Condition


Select Case strApproveCondition
Case "Approved"
' Gets t
he Count of Fields to be Approved
Set objD
esc = Description.Create()
objDesc(
"micclass").Value = "WebRadioGroup"
objDesc(
"html tag").Value = "INPUT"
Set strO
bject = Browser("MasterFile").Page("Approval Queue Item").ChildObjects(objDesc)
intObjCo
unt = strObject.Count()
' Enter
the Comments in the Comments Field
Call App
rovalQueue_Comments("MasterFile","Approval Queue Item",strApprovalComment)
Wait(1)
' Select
the Approve Radio button
Call App
rovalQueue_SelectRadioButton("MasterFile","Approval Queue Item","APP")
Wait(1)
' Click
on Save Image after Approving all the Pending Items
Call cli
ck_Image("MasterFile","Approval Queue Item","Save")
' Execut
batch
'If str
ModuleName = "DR Profile" or strModuleName = "DR Documentation" Then
If Browser("MasterFile").Page("Appro
val Queue Item").Image("Save").Exist(5) Then
Call ApprovalQueue_SelectRadioButton("MasterFile","Approval Queue Item","BTCE")
Call click_Image("MasterFile","Approval Queue Item","Save")
End If
'End If
' Verify
if we have Navigated back to Approval Queue Item Search page
If Brows
er("MasterFile").Page("Approval Queue Item Search").Exist(5) Then
Reporter.ReportEvent micPass,"Verifying if the page Approval Queue Item Search i
s Dispalyed or NOT","The page Approval Queue Item Search is Dispalyed"
Else
Reporter.ReportEvent micFail,"Verifying if the page Approval Queue Item Search i
s Dispalyed or NOT","The page Approval Queue Item Search is NOT Dispalyed"
blnApprTestFlag = "False"
'Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
'Call logoutfromApp("MasterFile","Approval Queue Item")
Call select_Menu("MasterFile","Approval Queue Item","Home;DR Home")
Exit Function
End If
' Verify
if the Approved CUSIP is Present or NOT
'Call chkAppRejElementName(strElementName,st
rApproveCondition,strApprovalStatus)
' Checki
ng for the Nubmber of Items
Browser("MasterFile").Page("Approval Queue I
tem Search").WebElement("Back").Click
Wait 2
Browser(
"MasterFile").Page("Approval Queue Item Search").WebElement("Back").Click
Wait 2
strAppNa
me = Browser("MasterFile").Page("Approval Queue Item Search").WebTable("Applicat
ion").GetCellData(1,1)
strActiv
eItemColumn = Browser("MasterFile").Page("Approval Queue Item Search").WebTable(
"Application").GetCellData(1,2)
strAppNa
me1 = Browser("MasterFile").Page("Approval Queue Item Search").WebTable("Applica
tion").GetCellData(2,1)
strAppNa
me2 = Browser("MasterFile").Page("Approval Queue Item Search").WebTable("Applica
tion").GetCellData(3,1)
If strAp
pName = "Application" AND strActiveItemColumn = "Number of Active Items" AND str
AppName1 = "Billing" AND strAppName2 ="MasterFile" Then
Reporter.ReportEvent micPass," Vefifying the Application Name in the Approval Qu
eue Item Search page","The Application Names "&strAppName1 & "and" &strAppName2
& "are Displayed"
Else
Reporter.ReportEvent micFail," Vefifying the Application Name in the Approval Qu
eue Item Search page","The Application Names "&strAppName1 & "and" &strAppName2
& "are Displayed"
'Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
strFinal
AppValue1 = Browser("MasterFile").Page("Approval Queue Item Search").WebTable("A
pplication").GetCellData(3,2)
strAppVa
lue1 = CInt(strAppValue1)
strFinal
AppValue1 = CInt(strFinalAppValue1)
If (strA
ppValue1 = strFinalAppValue1 + intObjCount) Then
Reporter.ReportEvent micPass,"Verifying the Number of Items","The Number of Item
s are in the Table is " & strFinalAppValue
Else
Reporter.ReportEvent micWarning,"Verifying the Number of Items","The Number of I
tems in the Table are NOT Matching"
'Environment.Value("TestCase_Log") = "False"
'Environment.Value("Execution_Log") = "False"
End If
Wait(5)
Call select_Menu("MasterFile","Approval Queu
e Item Search","Home;DR Home")
Case "Rejected"
Call App
rovalQueue_Comments("MasterFile","Approval Queue Item",strApprovalComment)
Wait(1)
Call App
rovalQueue_SelectRadioButton("MasterFile","Approval Queue Item","REJ")
Wait(1)
Call cli
ck_Image("MasterFile","Approval Queue Item","Save")
If Brows
er("MasterFile").Page("Approval Queue Item").Exist(5) Then
Reporter.ReportEvent micPass,"Verifying if the Page Approval Queue Item is Dispa
lyed or Not","The Page Approval Queue Item is Diaplayed without Navigating to ot
her Page"
Else
Reporter.ReportEvent micFail,"Verifying if the Page Approval Queue Item is Dispa
lyed or Not","The Page Approval Queue Item is NOT Diaplayed"
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
Call cli
ck_WebElement("MasterFile","Approval Queue Item","Search")
Call chk
AppRejElementName(strElementName,strApproveCondition,strApprovalStatus)
Wait(5)
Call sel
ect_Menu("MasterFile","Approval Queue Item Search","Home;DR Home")
End Select
End Function

'===============================================================================
===================================================
' Name of the Function : SelectValueinTable
' Scope of the Function : Public
' Author : Shyam H D
' Description : This function is used to Select a Val;ue from
the WebTable.
' Parameters accepted : BrowserName, PageName, Table Name and the Valu
e that has to be Selected from Table
' Parameter returned : Nill
' Date and / or Version : 22-11-2008,version 1.0
'===============================================================================
===================================================

Public Function SelectValueinTable_CUSIP(strBrowserName,strPageName,strTableName


,strSelectValue)
blnFlag= "False"
intRowCount = Browser(strBrowserName).Page(strPageName).WebTable(strTabl
eName).RowCount
For intRowCounter = 1 to intRowCount
intColumnCount = Browser(strBrowserName).Page(strPageNam
e).WebTable(strTableName).ColumnCount(intRowCount)
For intColumnCounter = 1 to intColumnCount
strGetCellData = Browser(strBrowserName).Page(st
rPageName).WebTable(strTableName).GetCellData(intRowCounter,intColumnCounter)
If InStr(1,(UCase(strGetCellData)),UCase(strSele
ctValue),1) <> 0 Then
strGetCellData = Trim(strGetCellData)
strFirstChar = Mid(strGetCellData,1,1)
strRemaingChar = Mid(strGetCellData,2)
strFinalValue = "\" &strFirsrChar&"\"&st
rRemaingChar
'If Trim(strGetCellData) = Trim(strSelectValue) Then
Browser(strBrowserName).Page(strPageName
).WebElement("html tag:=TD","innertext:= " & strGetCellData,"index:=0").Click
blnFlag= "True"
Exit For
End If
Next
If blnFlag= "True" Then
Exit For
End If
Next
End Function

'===============================================================================
=====================================================
Public Function CreateBifurcatedDR_DontDelete(strBrowserName,strPageName,strDRPa
geName,strCUSIPPageName)
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)
strDataPaths = strAllPath & "DataTables\"
' Select Master File Application
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","DRLifeCycle"))
Call set_WebEdit_Value("MasterFile","Profile - DR Search","Issue
rName",DataTable.Value("IssuerName","DRLifeCycle"))
Call click_Image("MasterFile","Profile - DR Search","Search")
If Browser(strBrowserName).Page(strPageName).Image("NewDR").Exis
t(2) then
Call click_Image(strBrowserName,strPageName,"NewDR")
End if
'Fill the details of the new DR to be created
Call Select_Combo_Value("CreateNewDR","CreateNewDR","Sponsored",
DataTable.Value("Sponsored","DRLifeCycle"))
Call click_Image("CreateNewDR","CreateNewDR","Depositary")
Call operation_on_FrameObjects_WithName("CreateNewDR","CreateNew
DR","lookupFrame","WebCheckBox",DataTable.value("NewDRDepositary","DRLifeCycle")
,"")
Call operation_on_FrameObjects_WithName("CreateNewDR","CreateNew
DR","lookupFrame","WebButton"," Ok ","")
Call Select_Combo_Value("CreateNewDR","CreateNewDR","Type",DataT
able.Value("NewDRType","DRLifeCycle"))
Call click_WebButton("CreateNewDR","CreateNewDR","Ok")
strCurrentTime = Time
strTime = Split(strCurrentTime,":",-1,1)
strIndTime = Split(strTime(2)," ",-1,1)
strTimeStamp = strTime(0) & strTime(1) & strIndTime(0) &strIndTi
me(1)
CUSIPNo = "0" & strTimeStamp
If Len(CUSIPNo) = 8 Then
CUSIPNo = CUSIPNo & "0"
End If
Environment.Value("CUSIPNum144A") = CUSIPNo
DRName1 = "QTPDR_" & strTimeStamp &"_144A"
DRName1= Replace(DRName1," ","")
DRName2 = "QTPDR_" & strTimeStamp &"_RegS"
DRName2= Replace(DRName2," ","")
Environment.Value("DR144A") = DRName1
Environment.Value("DRRegS") = DRName2
'Fill the details in the Details tab for DR
Call set_WebEdit_Value(strBrowserName,strDRPageName,"Details_Nam
e",Environment.Value("DR144A"))
Call Select_Combo_Value(strBrowserName,strDRPageName,"SecurityDe
scription",DataTable.Value("SecurityDescription","DRLifeCycle"))
If DataTable.Value("NewDREffectiveDate","DRLifeCycle") <> "" Th
en
Call click_Image(strBrowserName,strDRPageName,"Details_E
ffectiveDate")
Call SetDate(strBrowserName,strDRPageName,DataTable.Valu
e("NewDREffectiveDate","DRLifeCycle"))
End If
If Browser(strBrowserName).Dialog("Microsoft Internet Explorer")
.Exist(2) Then
Browser(strBrowserName).Dialog("Microsoft Internet Explo
rer").WinButton("OK").click
End If
If Browser(strBrowserName).Dialog("Microsoft Internet Explorer"
).Exist(2) Then
Browser(strBrowserName).Dialog("Microsoft Internet Explo
rer").WinButton("OK").click
End If
Call click_Image(strBrowserName,strDRPageName,"Save")
'Select the CUSIP Add tab and Click on Add button for Creating a
New CUSIP
Call click_WebElement(strBrowserName,strDRPageName,"CUSIPSummary
")
Call click_WebButton(strBrowserName,strDRPageName,"Add")
'Set the CUSIP details
FinalRowCount = Browser("MasterFile").Page("DR Profile").WebTable("CUSIP
Summary").RowCount
Browser("MasterFile").Page("DR Profile").WebTable("CUSIPSummary"
).ChildItem(FinalRowCount,1,"WebList","0").Select DataTable.Value("CUSIP_Type","
DRLifeCycle")
If Browser("MasterFile").Page("DR Profile").Image("NewCUSIP").Ex
ist(5) Then
Browser("MasterFile").Page("DR Profile").Image("NewCUSIP
").Click
End If
strCurrentTime = Time
strCurrentDate = Date
strDate = Split(strCurrentDate,"/" ,-1,1)
strTime = Split(strCurrentTime,":",-1,1)
strDateTimeStamp = strDate(0) &strDate(1)&strDate(2) & " "& str
Time(0) & strTime(1) & strTime(2)
strCUSIPDefaultName = get_WebEdit_Value(strBrowserName,strCUSIPP
ageName,"CUSIPName")
strFirstChar = Mid(strCUSIPDefaultName,1,1)
If Asc(strFirstChar) = 94 or Asc(strFirstChar) = 38 Then
strFirstChar = Replace(strFirstChar," ","")
CUSIPNames = strFirstChar & "QTPCUSIP_" & strDateTimeSta
mp
SelectCUSIPNames = "\"& strFirstChar &"\"&"QTPCUSIP_" &
strDateTimeStamp
CUSIPName = Replace(CUSIPNames," ","")
SelectCUSIPName = Replace(SelectCUSIPNames," ","")
Environment.Value("CUSIP144A") = CUSIPName
Environment.Value("SelectCUSIP144A") = SelectCUSIPName
DataTable.Value("SelectCUSIPName","DRLifeCycle") = Selec
tCUSIPName
Else
CUSIPNames = "QTPCUSIP_" & strDateTimeStamp
CUSIPName = Replace(CUSIPNames," ","")
Environment.Value("CUSIP144A") = CUSIPName
Environment.Value("SelectCUSIP144A") = CUSIPName
'DataTable.Value("SelectCUSIPName","DRLifeCycle") = CUSI
PName
End If
DataTable.ExportSheet strDataPaths & "DRLifeCycle.xls","DRLifeCy
cle"
DataTable.ImportSheet strDataPaths & "DRLifeCycle.xls","DRLifeCy
cle","DRLifeCycle"
' Entering the NEW CUSIP Details
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"CUSIPNam
e",Environment.Value("CUSIP144A"))
'Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"BriefNa
me",DataTable.Value("BriefName","DRLifeCycle"))
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"RatioDRs
",DataTable.Value("RatioDRs","DRLifeCycle"))
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"RatioUnd
erlyingShares",DataTable.Value("RatioUnderlyingShares","DRLifeCycle"))
Wait(5)
If Browser("MasterFile").Page("CUSIP Profile").Image("Underlyin
gSecurity").Exist(5) Then
Call click_Image(strBrowserName,strCUSIPPageName,"Under
lyingSecurity")
Call SelectValueinFrame(strBrowserName,strCUSIPPageName,
"lookupFrame","Exchange")
Wait(2)
Call click_Image(strBrowserName,strCUSIPPageName,"Warran
tAgent")
Call SelectValueinFrame(strBrowserName,strCUSIPPageName,
"lookupFrame","Name")
Else
Call click_Image(strBrowserName,strCUSIPPageName,"Warran
tAgent")
Call SelectValueinFrame(strBrowserName,strCUSIPPageName,
"lookupFrame","Exchange")
End If
' Call click_Image(strBrowserName,strCUSIPPageName,"WarrantAgent")
' Call SelectValueinFrame(strBrowserName,strCUSIPPageName,"lookupF
rame","Name")
' Need to Enter DR Exchange
Call click_Image(strBrowserName,strCUSIPPageName,"DRExchange")
Call SelectDRExchange(strBrowserName,strCUSIPPageName,"Exchange"
,DataTable.Value("DRExchange","DRLifeCycle"))
' ' Selecting an Underlying Security
' Call click_Image(strBrowserName,strCUSIPPageName,"UnderlyingSecu
rity")
' Call SelectValueinFrame(strBrowserName,strCUSIPPageName,"lookupF
rame","Exchange")
' Entering the CUSIP Number
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"CUSIP",E
nvironment.Value("CUSIPNum144A"))
If Browser(strBrowserName).Dialog("Microsoft Internet Explorer")
.Exist(2) Then
Browser(strBrowserName).Dialog("Microsoft Internet Explo
rer").WinButton("OK").Click
End If
' Entering DR Ticker Symbol
strDRTickerSymbol =CreateAlphanumericString(5)
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"DRTicker
Symbol",strDRTickerSymbol)
' Save the Changes made to the CUSIP.
Call click_Image(strBrowserName,strCUSIPPageName,"Save")
Wait(10)
strDRAppNames = Browser("MasterFile").Page("CUSIP Profile").WebT
able("DR").GetCellData(1,2)
Browser("MasterFile").Page("CUSIP Profile").WebElement("html tag
:=TD","innertext:="& strDRAppNames,"class:=tabselected").Click
' Filling the DR Documentation if the Flag is set to "Y"
If DataTable.Value("NewDRDepositary","DRLifeCycle") = "BNY" Then
' Filling the SECFiling Tab
Call DRFillSECFiling()
Wait(2)
Call DRDocumentation()
Wait(5)
End If
' Clicking on the DR and changing the DR Status to Effective
Call Select_Combo_Value(strBrowserName, strDRPageName, "Details_
Status","Effective")
Call click_Image(strBrowserName,strDRPageName,"Save")
' Logout from Application and Approve the Newly Created CUSIP a
nd DR Name
Call logoutfromApp(strBrowserName, strDRPageName)
' Login again with Approval ID
Call invoke_URL(strBrowserName,"Login Page",Environment.Value("A
ppURL"))
Call login(strBrowserName,"Login Page","Approver","MFLogin")
' Approving the Newly created CUSIP and DR Documentation and DR
Profile.
'Call ApprovalFunction_DR("MasterFile","CUSIP Profile","Name;CUS
IP;Last User Updated;Last Updated",Environment.Value("CUSIP144A"),"Approved the
Changes Made","Approved","Pending Approval")
' If DataTable.Value("NewDRDepositary","DRLifeCycle") = "BNY" The
n
' Call ApprovalFunction_DR("MasterFile","DR Documentation"
,"",Environment.Value("DR144A"),"Approved the Changes Made","Approved","Pending
Approval")
' End If
' Call ApprovalFunction_DR("MasterFile","DR Profile","",Environment.Value
("DR144A"),"Approved the Changes Made","Approved","Pending Approval")
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
' Login again with Approval ID
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call login("MasterFile","Login Page","User","MFLogin")
' Click on Master File Link and Select the Profile DR Menu
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","DRLifeCycle"))
'Search for the Newly Created DR
Call set_WebEdit_Value("MasterFile","Profile - DR Search","IssuerName",D
ataTable.Value("IssuerName","DRLifeCycle"))
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRNam
e",Environment.Value("DR144A"))
Call click_Image("MasterFile","Profile - DR Search","Search")
Wait(5)
Browser("MasterFile").Page("Profile - DR Search").WebElement("ht
ml tag:=TD","innertext:=" & Environment.Value("DR144A")).Click
Wait(5)
' Select the DR Life Cycle WebElement again and Select Bifurcate
d DR Radiobutton
Wait(5)
Call click_WebElement(strBrowserName,strDRPageName,"DRLifeCycle"
)
Wait(2)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").E
xist(5) Then
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("Cancel").Click
End If
' Selecting the Bifurcated Radiobutton
strBifurcatedRadioName = "bfrc"
Browser("DR Lifecycle").Page("DR Lifecycle").WebRadioGroup("Upgr
ade").Select strBifurcatedRadioName
Wait(2)
Call click_WebButton("DR Lifecycle","DR Lifecycle","CreateNewDR"
)
' strCurrentTime = Time
' strTime = Split(strCurrentTime,":",-1,1)
' strIndTime = Split(strTime(2)," ",-1,1)
' strTimeStamp = strTime(0) & strTime(1) & strIndTime(0) &strIndTi
me(1)
' CUSIPNo = "0" & strTimeStamp
' If Len(CUSIPNo) = 8 Then
' CUSIPNo = "CUSIPNo" & "0"
' End If
'
' Environment.Value("CUSIPNumRegS") = CUSIPNo
' Fill the details in the Details tab for DR
Call set_WebEdit_Value(strBrowserName,strDRPageName,"Details_Nam
e",Environment.Value("DRRegS"))
Call Select_Combo_Value(strBrowserName,strDRPageName,"SecurityDe
scription",DataTable.Value("SecurityDescription","DRLifeCycle"))
' If DataTable.Value("NewDREffectiveDate","DRLifeCycle") <> "" Th
en
' Call click_Image(strBrowserName,strDRPageName,"Details_E
ffectiveDate")
' Call SetDate(strBrowserName,strDRPageName,DataTable.Valu
e("NewDREffectiveDate","DRLifeCycle"))
' End If
Call click_Image(strBrowserName,strDRPageName,"Save")
'Select the CUSIP Add tab and Click on Add button for Creating a
New CUSIP
Call click_WebElement(strBrowserName,strDRPageName,"CUSIPSummary
")
Call click_WebButton(strBrowserName,strDRPageName,"Add")
'Set the CUSIP details
FinalRowCount = Browser("MasterFile").Page("DR Profile").WebTable("CUSIP
Summary").RowCount
Browser("MasterFile").Page("DR Profile").WebTable("CUSIPSummary"
).ChildItem(FinalRowCount,1,"WebList","0").Select DataTable.Value("CUSIP_Type","
DRLifeCycle")
If Browser("MasterFile").Page("DR Profile").Image("CUSIPLookup")
.Exist(5) Then
Browser("MasterFile").Page("DR Profile").Image("CUSIPLoo
kup").Click
End If
' Selecting an Existing CUSIP
Call SelectExistingCUSIP()
Call click_Image("MasterFile","DR Profile","Save")
' Filling the DR Documentation Details
If DataTable.Value("DRDocumentationRequired","DRLifeCycle") = "
Y" Then
' Filling the SEC Filing Tab
Call DRFillSECFiling()
Wait(5)
' Select Detail Tab
Call click_WebElement("MasterFile","DR Profile","Detail"
)
Wait(5)
Call DRDocumentation()
End If
' Clicking on Save
Call click_Image(strBrowserName,strDRPageName,"Save")
' If Browser("MasterFile").Page("DR Profile").Image("NewCUSIP").Ex
ist(5) Then
' Browser("MasterFile").Page("DR Profile").Image("NewCUSIP
").Click
' End If
'
' Wait(5)
' strCurrentTime = Time
' strCurrentDate = Date
' strDate = Split(strCurrentDate,"/" ,-1,1)
' strTime = Split(strCurrentTime,":",-1,1)
' strDateTimeStamp = strDate(0) &strDate(1)&strDate(2) & " "& str
Time(0) & strTime(1) & strTime(2)
'
' Wait(5)
' strCUSIPDefaultName = get_WebEdit_Value(strBrowserName,strCUSIPP
ageName,"CUSIPName")
' strFirstChar = Mid(strCUSIPDefaultName,1,1)
' If Asc(strFirstChar) = 94 or Asc(strFirstChar) = 38 Then
' CUSIPNames = strFirstChar & "QTPCUSIP_" & strDateTimeSta
mp
' SelectCUSIPNames = "\"& strFirstChar &"\"&"QTPCUSIP" & s
trDateTimeStamp
' CUSIPName = Replace(CUSIPNames," ","")
' SelectCUSIPName = Replace(SelectCUSIPNames," ","")
' Environment.Value("CUSIPRegS") = CUSIPName
' Environment.Value("SelectCUSIPRegS") = SelectCUSIPName
' 'DataTable.Value("SelectCUSIPName") = SelectCUSIPName
' Else
' CUSIPNames = "QTPCUSIP_" & strDateTimeStamp
' CUSIPName1 = Replace(CUSIPNames," ","")
' Environment.Value("CUSIPRegS") = CUSIPName1
' Environment.Value("SelectCUSIPRegS") = CUSIPName1
' End If
'
' DataTable.ExportSheet strDataPaths & "DRLifeCycle.xls","DRLifeCy
cle"
' DataTable.ImportSheet strDataPaths & "DRLifeCycle.xls","DRLifeCy
cle","DRLifeCycle"
'
' ' Entering the NEW CUSIP Details
' Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"CUSIPNam
e",Environment.Value("CUSIPRegS"))
' ==== Not requird
'Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"BriefNa
me",DataTable.Value("BriefName","DRLifeCycle"))
'Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"RatioDR
s",DataTable.Value("RatioDRs","DRLifeCycle"))
'Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"RatioUn
derlyingShares",DataTable.Value("RatioUnderlyingShares","DRLifeCycle"))
' Call click_Image(strBrowserName,strCUSIPPageName,"WarrantAgent")
' Call SelectValueinFrame(strBrowserName,strCUSIPPageName,"lookupF
rame","Exchange")
' Wait(5)
' If Browser("MasterFile").Page("CUSIP Profile").Image("Underlyin
gSecurity").Exist(5) Then
' Call click_Image(strBrowserName,strCUSIPPageName,"Under
lyingSecurity")
' Call SelectValueinFrame(strBrowserName,strCUSIPPageName,
"lookupFrame","Exchange")
' Wait(2)
' Call click_Image(strBrowserName,strCUSIPPageName,"Warran
tAgent")
' Call SelectValueinFrame(strBrowserName,strCUSIPPageName,
"lookupFrame","Name")
' Else
' Call click_Image(strBrowserName,strCUSIPPageName,"Warran
tAgent")
' Call SelectValueinFrame(strBrowserName,strCUSIPPageName,
"lookupFrame","Exchange")
' End If
' Selecting the DR Exchange
' Call click_Image(strBrowserName,strCUSIPPageName,"DRExchange")
' Call SelectDRExchange(strBrowserName,strCUSIPPageName,"Exchange"
,DataTable.Value("DRExchange","DRLifeCycle"))
'
' ' Selecting an Underlying Security
' Call click_Image(strBrowserName,strCUSIPPageName,"UnderlyingSecu
rity")
' Call SelectValueinFrame(strBrowserName,strCUSIPPageName,"lookupF
rame","Exchange")
' Wait(2)
' Entering the DR Ticker Symbol
' strDRTickerSymbol =CreateAlphanumericString(5)
' Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"DRTicker
Symbol",strDRTickerSymbol)
' Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"CUSIP",E
nvironment.Value("CUSIPNumRegS"))
' If Browser(strBrowserName).Dialog("Microsoft Internet Explorer")
.Exist(2) Then
' Browser(strBrowserName).Dialog("Microsoft Internet Explo
rer").WinButton("OK").Click
' End If
' Wait(5)
' Call click_Image(strBrowserName,strCUSIPPageName,"Save")
' Wait(10)
'
' ' Clicking on the DR
' strDRNames = Browser("MasterFile").Page("CUSIP Profile").WebTabl
e("DR").GetCellData(1,2)
' Browser("MasterFile").Page("CUSIP Profile").WebElement("html tag
:=TD","innertext=:="& strDRNames).Click
'
' ' Filling the DR Documentation Details
' If DataTable.Value("DRDocumentationRequired","DRLifeCycle") = "
Y" Then
' ' Filling the SEC Filing Tab
' Call DRFillSECFiling()
' Wait(5)
'
' ' Select Detail Tab
' Call click_WebElement("MasterFile","DR Profile","Detail"
)
' Wait(5)
' Call DRDocumentation()
' End If
'
' ' Clicking on the DR and changing the DR Status to Effective
'' Call Select_Combo_Value(strBrowserName, strDRPageName, "Details_
Status","Effective")
' Call click_Image(strBrowserName,strDRPageName,"Save")
' Logout from Application and Approve the Newly Created CUSIP and DR Nam
e
Call logoutfromApp(strBrowserName, strDRPageName)
' Login again with Approval ID
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call login("MasterFile","Login Page","Approver","MFLogin")
' Approving the Newly created CUSIP and DR.
'Approving the Newly created CUSIP and DR Documentation and DR
Profile.
' Call ApprovalFunction_DR("MasterFile","CUSIP Profile","Name;CUSI
P;Last User Updated;Last Updated",Environment.Value("CUSIP144A"),"Approved the C
hanges Made","Approved","Pending Approval")
If DataTable.Value("NewDRDepositary","DRLifeCycle") = "BNY" The
n
Call ApprovalFunction_DR("MasterFile","DR Documentation"
,"DR Name;DR Type;S/U;Origin;DR Structure;Last User Updated;Last Updated",Enviro
nment.Value("DR144A"),"Approved the Changes Made","Approved","Pending Approval")
End If
Call ApprovalFunction_DR("MasterFile","DR Profile","Name;Type;Depositary
;S/U;Origin;Structure;Last User Updated;Last Updated",Environment.Value("DR144A"
),"Approved the Changes Made","Approved","Pending Approval")
'Call ApprovalFunction_DR("MasterFile","CUSIP Profile","Name;CUSIP;Last
User Updated;Last Updated",Environment.Value("SelectCUSIPRegS"),"Approved the Ch
anges Made","Approved","Pending Approval")
If DataTable.Value("NewDRDepositary","DRLifeCycle") = "BNY" Then
Call ApprovalFunction_DR("MasterFile","DR Documentation"
,"DR Name;DR Type;S/U;Origin;DR Structure;Last User Updated;Last Updated",Enviro
nment.Value("DRRegS"),"Approved the Changes Made","Approved","Pending Approval")
End If
Call ApprovalFunction_DR("MasterFile","DR Profile","Name;Type;Depositary
;S/U;Origin;Structure;Last User Updated;Last Updated",Environment.Value("DRRegS"
),"Approved","Approved","Pending Approval")
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
End Function

'===============================================================================
=================================

Public Function DRFillSECFiling()


blnExistFlag = Browser("MasterFile").Page("DR Profile").WebEleme
nt("SECFiling").Exist(10)
If blnExistFlag = "True" Then
Call click_WebElement("MasterFile","DR Profile","SECFili
ng")
Wait(5)
strCurrentF6ADS = get_WebEdit_Value("MasterFile","DR Pro
file","CurrentF6ADS")
If strCurrentF6ADS = "" Then
Call set_WebEdit_Value("MasterFile","DR Profile"
,"CurrentF6ADS",DataTable.Value("CurrentF6ADS","DRLifeCycle"))
End If
strCurrentF6Number = get_WebEdit_Value("MasterFile","DR
Profile","CurrentF6Number")
If strCurrentF6Number = "" Then
Call set_WebEdit_Value("MasterFile","DR Profile"
,"CurrentF6Number",DataTable.Value("CurrentF6Number","DRLifeCycle"))
End If
strCurrentF6FileDate = get_WebEdit_Value("MasterFile","D
R Profile","CurrentF6FileDate")
If Trim(strCurrentF6FileDate) = "" Then
Call SelectImage("MasterFile","DR Profile","SECF
iling","Current F-6 File Date","show-calendar.gif")
'Call click_Image("MasterFile","DR Profile","Cur
rentF6FileDate")
Call SetDate("MasterFile","DR Profile",DataTable
.Value("CurrentF6FileDate","DRLifeCycle"))
End If
Call click_Image("MasterFile","DR Profile","Save")
End If
End Function

'===============================================================================
=================================================================
Public Function DRDocumentation()
Wait(10)
Call click_WebElement("MasterFile","DR Profile","DRDocum
entation")
If Browser("MasterFile").Dialog("Microsoft Internet Expl
orer").Exist(5) Then
strText = Browser("MasterFile").Dialog("Microsof
t Internet Explorer").Static("MessageText").GetROProperty("text")
strReqValue = "Please click OK to Save Changes (
if any) or click Cancel to Continue"
If strText = strReqValue Then
Reporter.ReportEvent micPass,"Step 21: V
erifying the Message in the Dialog","The Message displayed in the Dialog is " &
strText
Else
Reporter.ReportEvent micFail,"Step 21: V
erifying the Message in the Dialog","The Message displayed in the Dialog is NOT
" & strText
Environment.Value("Execution_Log") = "Fa
lse"
End If
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
If Browser("MasterFile").Page("DR Profile").Exist(5) The
n
Call click_WebElement("MasterFile","DR Profile",
"DRDocumentation")
If Browser("MasterFile").Dialog("Microsoft Inter
net Explorer").Exist(5) Then
strText = Browser("MasterFile").Dialog("
Microsoft Internet Explorer").Static("MessageText").GetROProperty("text")
strReqValue = "Please click OK to Save C
hanges (if any) or click Cancel to Continue"
If strText = strReqValue Then
Reporter.ReportEvent micPass,"St
ep 21: Verifying the Message in the Dialog","The Message displayed in the Dialog
is " & strText
Else
Reporter.ReportEvent micFail,"St
ep 21: Verifying the Message in the Dialog","The Message displayed in the Dialog
is NOT " & strText
Environment.Value("Execution_Log
") = "False"
End If
Browser("MasterFile").Dialog("Microsoft
Internet Explorer").WinButton("Cancel").Click
End If
End If
' Step 22
Call pageCheck_WebElementinTable("MasterFile","DR Documentation Deta
il","Deposit Agreement;Letter Agreement;Fees","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 22: Verifying
if the Required Tabs are Displayed in the Page ' DR Documentation Detail'","The
Required Tabs are Displayed in the Page 'DR Documentation Detail"
Else
Reporter.ReportEvent micFail,"Step 22: Verifying
if the Required Tabs are Displayed in the Page ' DR Documentation Detail'","The
Required Tabs are NOT Displayed in the Page 'DR Documentation Detail"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Step 23
Call FillDRDocumentation("MasterFile","DR Documentation
Detail")
Call chkFlagImage("MasterFile","DR Documentation Detail"
,"DepositAgreement","Law Governing Deposit Agreement;Termination Period;Blocking
Type","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 23: Verifying
if the Flags are displayed Next to the Field Modified","The Flags are Displayed
next to the Modified Field"
Else
Reporter.ReportEvent micFail,"Step 23: Verifying
if the Flags are displayed Next to the Field Modified","The Flags are NOT Displ
ayed next to the Modified Field"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call Select_Combo_Value("MasterFile","DR Documentation D
etail","DSFinDepositAgreement","No")
Call Select_Combo_Value("MasterFile","DR Documentation D
etail","ChargeDSF","No")
Call Select_Combo_Value("MasterFile","DR Documentation D
etail","NetDSFinCashDividend","No")
Call click_Image("MasterFile","DR Documentation Detail",
"Save")
Wait(5)
Call chkFlagImage("MasterFile","DR Documentation Detail"
,"DepositaryServiceFee","DSFinDepositAgreement;ChargeDSF;NetDSFinCashDividend","
Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 23: Verifying
if the Flags are displayed Next to the Field Modified in Depositary Service Fie
ld","The Flags are Displayed next to the Modified Field Depositary Service Field
"
Else
Reporter.ReportEvent micFail,"Step 23: Verifying
if the Flags are displayed Next to the Field Modified Depositary Service Field"
,"The Flags are NOT Displayed next to the Modified Field Depositary Service Fiel
d"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Step 24 -- Select Fee Tab
Call click_WebElement("MasterFile","DR Documentation Detail","Fees")
Wait(2)
Call click_WebButton("MasterFile","DR Documentation Deta
il","Add")
Wait(2)
intInitialRowCounts = Browser("MasterFile").Page("DR Doc
umentation Detail").WebTable("Fees").RowCount
Browser("MasterFile").Page("DR Documentation Detail").We
bTable("Fees").ChildItem(intInitialRowCounts,1,"Image","0").Click
'Call click_Image("MasterFile","DR Documentation Detail"
,"FeeType")
Wait(2)
intRowCount = Browser("MasterFile").Page("DR Documentati
on Detail").Frame("lookupFrame").WebTable("FeeDescription").RowCount
For intRowCounter = 2 to intRowCount
intRowCounts = Browser("MasterFile").Page("DR Do
cumentation Detail").WebTable("Fees").RowCount
Browser("MasterFile").Page("DR Documentation Det
ail").WebTable("Fees").ChildItem(intRowCounts,1,"Image","0").Click
intRowCount = Browser("MasterFile").Page("DR Doc
umentation Detail").Frame("lookupFrame").WebTable("FeeDescription").RowCount
If intRowCount = 2 Then
strGetCellData = Browser("MasterFile").P
age("DR Documentation Detail").Frame("lookupFrame").WebTable("FeeDescription").G
etCellData(2,1)
Browser("MasterFile").Page("DR Documenta
tion Detail").WebElement("html tag:=TD","innertext:="& strGetCellData).Click
Exit For
Else
strGetCellData = Browser("MasterFile").P
age("DR Documentation Detail").Frame("lookupFrame").WebTable("FeeDescription").G
etCellData(2,1)
Browser("MasterFile").Page("DR Documenta
tion Detail").WebElement("html tag:=TD","innertext:="& strGetCellData).Click
Call click_WebButton("MasterFile","DR Do
cumentation Detail","Add")
End If
Next
intFeeRC = Browser("MasterFile").Page("DR Documentation
Detail").WebTable("Fees").RowCount
For intCount =3 to intFeeRC
strCellData = Browser("MasterFile").Page("DR Doc
umentation Detail").WebTable("Fees").ChildItem(intCount,2,"WebEdit","0").GetROPr
operty("value")
If strCellData = "" Then
Browser("MasterFile").Page("DR Documenta
tion Detail").WebTable("Fees").ChildItem(intCount,2,"WebEdit","0").Set "0"
End If
Next
Call click_Image("MasterFile","DR Documentation Detail",
"Save")
Call FlagImageCheckAllRow("MasterFile","DR Documentation
Detail","Fees","Fee Type","Exist")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 24: Verifying
if the New and the Approval Flag is Present next to the Field Modified","The Ne
w and Approval Flag is Present Next to the Field Modified"
Else
Reporter.ReportEvent micFail,"Step 24: Verifying
if the New and the Approval Flag is Present next to the Field Modified","The Ne
w OR Approval Flag is NOT Present Next to the Field Modified"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Step 25 : DSF in Deposit Agreement is "No"
'DSF in Deposit Agreement is "Yes"
Call click_WebElement("MasterFile","DR Documentation Det
ail","DepositAgreement")
Wait(5)
blnFlag1 = "True"
Call Select_Combo_Value("MasterFile","DR Documentation D
etail","DSFinDepositAgreement","No")
Call Select_Combo_Value("MasterFile","DR Documentation D
etail","ChargeDSF","No")
Call Select_Combo_Value("MasterFile","DR Documentation D
etail","NetDSFinCashDividend","No")
Call click_Image("MasterFile","DR Documentation Detail",
"Save")
Wait(10)
If Browser( "MasterFile").Page("DR Documentation Detail"
).Image("ShowErrors").Exist(5) Then
blnFlag1 = "False"
End If
Wait(2)
If blnFlag1 = "True" Then
Reporter.ReportEvent micPass,"Step 25: Verfiying
the Functionality by changing the DSF in Deposit Agreement","The Functionality
is working as Required as No Validation Error Message is Displayed"
Else
Reporter.ReportEvent micFail, "Step 25: Verfiyin
g the Functionality by changing the DSF in Deposit Agreement","The Functionality
is NOT working as Required"
Environment.Value("Execution_Log") = "False"
End If
blnFlag2 = "False"
Call Select_Combo_Value("MasterFile","DR Documentation D
etail","DSFinDepositAgreement","No")
Call Select_Combo_Value("MasterFile","DR Documentation D
etail","ChargeDSF","No")
Call Select_Combo_Value("MasterFile","DR Documentation D
etail","NetDSFinCashDividend","Yes")
Call click_Image("MasterFile","DR Documentation Detail",
"Save")
Wait(10)
If Browser("MasterFile").Page("DR Documentation Detail")
.Image("ShowErrors").Exist(5) Then
strMessageText = Browser("MasterFile").Page("D
R Documentation Detail").WebTable("ValidationError").GetROProperty("innertext")
If Instr(1,strMessageText, "If DSF in Deposit A
greement is No, Charge DSF and Net DSF from Cash Dividend must be No.") <> 0 The
n
blnFlag2 = "True"
End If
End If
Wait(2)
If blnFlag2 = "True" Then
Reporter.ReportEvent micPass,"Step 25: Verfiying
the Functionality by changing the DSF in Deposit Agreement","The Functionality
is working as Required as Validation Error Message is Displayed"
Else
Reporter.ReportEvent micFail, "Step 25: Verfiyin
g the Functionality by changing the DSF in Deposit Agreement","The Functionality
is NOT working as Required as No Validation Error Message is Displayed"
Environment.Value("Execution_Log") = "False"
End If
' Step 26
Call Select_Combo_Value("MasterFile","DR Documentation D
etail","DSFinDepositAgreement","No")
Call Select_Combo_Value("MasterFile","DR Documentation D
etail","ChargeDSF","No")
Call Select_Combo_Value("MasterFile","DR Documentation D
etail","NetDSFinCashDividend","No")
Call click_Image("MasterFile","DR Documentation Detail",
"Save")
Wait(5)
strDSF = get_WebList_Value("MasterFile","DR Documentation Detail","D
SFinDepositAgreement")
strChargeDSF = get_WebList_Value("MasterFile","DR Docume
ntation Detail","ChargeDSF")
strNetDSF = get_WebList_Value("MasterFile","DR Documenta
tion Detail","NetDSFinCashDividend")
If strDSF = "No" AND strChargeDSF = "No" AND strNetDSF
= "No" Then
Reporter.ReportEvent micPass,"Step 26: Verifying
if the Changes are Saved","The Changes are Saved"
Else
Reporter.ReportEvent micFail,"Step 26: Verifying
if the Changes are Saved","The Changes are NOT Saved"
Environment.Value("Execution_Log") = "False"
End If
' Step 27: Letter Agreement Tab
If Environment.Value("SponserUnsponser") = "S" Then
Call click_WebElement("MasterFile","DR Documenta
tion Detail","LetterAgreement")
Wait(2)
blnLetterFlag = "True"
If DataTable.Value("BifurcatedDR","DRLifeCycle")
= "Y" Then
strDRAppName = Browser("MasterFile").Pag
e("DR Documentation Detail").WebTable("DR").GetCellData(1,2)
If InStr(1, strDRAppName,"RegS") <> 0 Th
en
blnLetterFlag = "False"
End If
End If
If blnLetterFlag = "True" Then
InitialRowCount = Browser("MasterFile").
Page("DR Documentation Detail").WebTable("LetterAgreement").RowCount
Call click_WebButton("MasterFile","DR Do
cumentation Detail","Add_LetterAgreement")
Call click_Image("MasterFile","DR Docume
ntation Detail","LetterAgreementDate")
Call SetDate("MasterFile","DR Documentat
ion Detail",DataTable.Value("LetterAgreementDate","DRLifeCycle"))
Call Select_Combo_Value("MasterFile","DR
Documentation Detail","LetterAgreementExpiration",DataTable.Value("LetterAgreem
entExpiration","DRLifeCycle"))
Call Select_Combo_Value("MasterFile","DR
Documentation Detail","LetterReimbursementExpiration",DataTable.Value("LetterRe
imbursementExpiration","DRLifeCycle"))
Call click_Image("MasterFile","DR Docume
ntation Detail","Save")
Wait(2)
FinalRowCount = Browser("MasterFile").Pa
ge("DR Documentation Detail").WebTable("LetterAgreement").RowCount
If FinalRowCount > InitialRowCount Then
Reporter.ReportEvent micPass,"Ve
rifying if a New Row is added or Not","A New row is Added successfully in the Le
tter Agreement tab"
Else
Reporter.ReportEvent micFail,"Ve
rifying if a New Row is added or Not","A New Row is added successfully in the Le
tter Agreement tab"
Environment.Value("Execution_Log
") = "False"
End If
' Checking for the New and Approval Flag
in the Newly added Row
Call FlagImageCheck("MasterFile","DR Doc
umentation Detail","LetterAgreement","Exist")
If Environment.Value("TestCase_Log") = "
True" And FinalRowCount > InitialRowCount Then
Reporter.ReportEvent micPass,"St
ep 27: Check for the Flag Existance in Letter Agreement tab","The New, Approval
Image is Displayed in the Newly added row in Letter Agreement tab"
Else
Reporter.ReportEvent micFail,"St
ep 27: Check for the Flag Existance in Letter Agreement tab","The New , Approva
l Flag is Not displayed in the Newly added row in the Letter Agreement tab"
Environment.Value("TestCase_Log"
) = "True"
Environment.Value("Execution_Log
") = "False"
End If
End If
End If
' Step 28 - Clicking on the DR
Wait(5)
strDRAppName = Browser("MasterFile").Page("DR Documentation Detail")
.WebTable("DR").GetCellData(1,2)
Browser("MasterFile").Page("DR Documentation Detail").We
bElement("html tag:=TD","innertext:=" & strDRAppName,"class:=tabSelected","index
:=0").Click
If Browser("MasterFile").Dialog("Microsoft Internet Expl
orer").Exist(5) Then
strMessageText = Browser("MasterFile").Dialog("M
icrosoft Internet Explorer").Static("MessageText").GetROProperty("text")
strReqtext = "Please click OK to Save Changes (i
f any) or click Cancel to Continue"
If Trim(strMessageText) = Trim(strReqText) Then
Reporter.ReportEvent micPass,"Step 28: V
erifying the Message in the Dialog","The text displayed in the Dialog is " & str
MessageText
Else
Reporter.ReportEvent micFail,"Step 28: V
erifying the Message in the Dialog","The text displayed in the Dialog is NOT " &
strMessageText
Environment.Value("Execution_Log") = "Fa
lse"
End If
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
Wait(5)
If Browser("MasterFile").Page("DR Documentation Detail")
.Exist(5) Then
strDRAppName = Browser("MasterFile").Page("DR Do
cumentation Detail").WebTable("DR").GetCellData(1,2)
Browser("MasterFile").Page("DR Documentation Det
ail").WebElement("html tag:=TD","innertext:=" & strDRAppName,"class:=tabSelected
","index:=0").Click
If Browser("MasterFile").Dialog("Microsoft Inter
net Explorer").Exist(5) Then
strMessageText = Browser("MasterFile").D
ialog("Microsoft Internet Explorer").Static("MessageText").GetROProperty("text")
strReqtext = "Please click OK to Save Ch
anges (if any) or click Cancel to Continue"
If Trim(strMessageText) = Trim(strReqTex
t) Then
Reporter.ReportEvent micPass,"St
ep 28: Verifying the Message in the Dialog","The text displayed in the Dialog is
" & strMessageText
Else
Reporter.ReportEvent micFail,"St
ep 28: Verifying the Message in the Dialog","The text displayed in the Dialog is
NOT " & strMessageText
Environment.Value("Execution_Log
") = "False"
End If
Browser("MasterFile").Dialog("Microsoft
Internet Explorer").WinButton("Cancel").Click
End If
End If
If Browser("MasterFile").Page("DR Profile").Exist(5) The
n
Reporter.ReportEvent micPass,"Step 29: Verifiyin
g if the DR Profile page is Dispalyed","The DR Profiel page is Dispalyed"
Else
Reporter.ReportEvent micFail,"Step 29: Verifiyin
g if the DR Profile page is Dispalyed","The DR Profiel page is NOTDispalyed"
Environment.Value("Execution_Log") = "False"
End If
' Step 30
' Call click_Image("MasterFile","DR Profile","Details_Effe
ctiveDate")
' Call SetDate("MasterFile","DR Profile",DataTable.Value("
Details_EffectiveDate","DRLifeCycle"))
' If Browser("MasterFile").Dialog("Microsoft Internet Expl
orer").Exist(2) Then
' Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("OK").Click
' End If
Call Select_Combo_Value("MasterFile","DR Profile","Detai
ls_Status",DataTable.Value("Details_Status","DRLifeCycle"))
Call click_Image("MasterFile","DR Profile","Save")
If Browser("MasterFile").Page("DR Profile").Image("ShowE
rrors").Exist(5) Then
strInnerText = Browser("MasterFile").Page("DR Profile").WebTable
("ErrorMessage").GetROProperty("innertext")
strRequiredText = "Issuer Documentation must hav
e MAL Flag set"
If Instr(1,strInnerText,strRequiredtext) <> 0 Th
en
Reporter.ReportEvent micPass,"Step 30: V
erifying if a Error Message is Displayed","An Error Message is Dispalyed with th
e Error " & strRequiredText
Else
Reporter.ReportEvent micFail,"Step 30: V
erifying if a Error Message is Displayed","An Error Message is NOT Dispalyed wit
h the Error " & strRequiredText
Environment.Value("Execution_Log") = "Fa
lse"
End If
End If
End Function

'===============================================================================
====================================================
Public Function DRIssuerDocumentation()
'Call click_WebElement("MasterFile","DR Profile","IssuerName")
Wait(2)
strIssuerName = Browser("MasterFile").Page("DR Profile").WebTabl
e("Issuer").GetCellData(1,2)
Browser("MasterFile").Page("DR Profile").WebElement("html tag:=T
D","innertext:="& strIssuerName,"index:=0").Click
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").E
xist(5) Then
strMessageText = Browser("MasterFile").Dialog("Microsoft
Internet Explorer").Static("MessageText").GetROProperty("text")
strReqtext = "Please click OK to Save Changes (if any) o
r click Cancel to Continue"
If Trim(strMessageText) = Trim(strReqText) Then
Reporter.ReportEvent micPass,"Step 31: Verifying
the Message in the Dialog","The text displayed in the Dialog is " & strMessageT
ext
Else
Reporter.ReportEvent micFail,"Step 31: Verifying
the Message in the Dialog","The text displayed in the Dialog is NOT " & strMess
ageText
Environment.Value("Execution_Log") = "False"
End If
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("Cancel").Click
End If
If Browser("MasterFile").Page("Issuer Profile").Exist(5) Then
Reporter.ReportEvent micPass,"Step 32: Verifying if the
Page ' Issuer Profile ' is Displayed or Not","The Page 'Issuer Profile' is Displ
ayed"
Else
Reporter.ReportEvent micFail,"Step 32: Verifying if the
Page ' Issuer Profile ' is Displayed or Not","The Page 'Issuer Profile' is NOT D
isplayed"
Environment.Value("Execution_Log") = "False"
End If
' Step 33 -- Clicking on Issuer Documentation
Wait(2)
Call click_WebElement("MasterFile","Issuer Profile","IssuerDocum
entation")
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").E
xist(5) Then
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("Cancel").Click
End If
If Browser("MasterFile").Page("Issuer Documentation").Exist(5) T
hen
If Browser("MasterFile").Page("Issuer Documentation").We
bElement("BCP_PAF").Exist(2) OR Browser("MasterFile").Page("Issuer Documentatio
n").WebElement("SECFilingandMALFOL").Exist(2) Then
Reporter.ReportEvent micPass,"Step 33: Verifying
the Required Tabs are Present or NOT","The Required Tab 'BCP_PAF' Or 'SECFiling
andMALFOL' or Both is Present "
Else
Reporter.ReportEvent micFail,"Step 33: Verifying
the Required Tabs are Present or NOT","The Required Tab 'BCP_PAF' Or 'SECFiling
andMALFOL' is NOT Present"
Environment.Value("Execution_Log") = "False"
End If
End If
' Step 34 - Selecting SECFilingandMALFOL Tab
Call click_WebElement("MasterFile","Issuer Documentation","SECFilingandM
ALFOL")
Call pageCheck_WebListOR("MasterFile","Issuer Documentation","12
gFiler;20FFiler;OnWebSite")
Call pageCheck_WebEditOR("MasterFile","Issuer Documentation","CC
CCode;MAL_FOL;NonUSGovernment")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 34: Verifying if the
Required Fields are Present in the Tab 'SECFilingandMALFOL'","The Required Field
s are Present in the Tab 'SECFilingandMALFOL'"
Else
Reporter.ReportEvent micFail,"Step 34: Verifying if the
Required Fields are Present in the Tab 'SECFilingandMALFOL'","The Required Field
s are NOT Present in the Tab 'SECFilingandMALFOL'"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Step 35
intVal = Browser("MasterFile").Page("Issuer Documentation").WebE
dit("MAL_FOL").GetROProperty("readonly")
If intVal <> 1 Then
Call set_WebEdit_Value("MasterFile","Issuer Documentatio
n","MAL_FOL",DataTable("Issuer_MAL","DRLifeCycle"))
strValue = get_WebEdit_Value("MasterFile","Issuer Docume
ntation","MAL_FOL")
If strValue = DataTable.Value("Issuer_MAL","DRLifeCycle"
) Then
Reporter.ReportEvent micPass,"Step 35: Verifying
if the Entered Value is Displayed or NOT","The Entered Value is " & DataTable.V
alue("Issuer_MAL","DRLifeCycle")
Else
Reporter.ReportEvent micFail,"Step 35: Verifying
if the Entered Value is Displayed or NOT","The Entered Value is NOT " & DataTab
le.Value("Issuer_MAL","DRLifeCycle")
Environment.Value("Execution_Log") = "False"
End If
Else
Call Select_Combo_Value("MasterFile","Issuer Documentati
on","OnWebsite",DataTable("Issuer_OnWebsite","DRLifeCycle"))
strValue = get_WebList_Value("MasterFile","Issuer Docum
entation","OnWebsite")
If strValue = DataTable.Value("Issuer_OnWebsite","DRLife
Cycle") Then
Reporter.ReportEvent micPass,"Step 35: Verifying
if the Selected Value is Displayed or NOT","The Selected Value is " & DataTable
.Value("Issuer_OnWebsite","DRLifeCycle")
Else
Reporter.ReportEvent micFail,"Step 35: Verifying
if the Selected Value is Displayed or NOT","The Selected Value is NOT " & DataT
able.Value("Issuer_OnWebsite","DRLifeCycle")
Environment.Value("Execution_Log") = "False"
End If
End If
' Step 36 : Fill SECFilingandMALFOL Tab
Call set_WebEdit_Value("MasterFile","Issuer Documentation","NonU
SGovernment",DataTable.Value("NonUSGovernment","DRLifeCycle"))
Call set_WebEdit_Value("MasterFile","Issuer Documentation","CCCC
ode",DataTable.Value("CCCCode","DRLifeCycle"))
Call set_WebEdit_Value("MasterFile","Issuer Documentation","CIKC
ode",DataTable.Value("CIKCode","DRLifeCycle"))
Call Select_Combo_Value("MasterFile","Issuer Documentation","20F
Filer",DataTable.Value("Issuer_20FFiler","DRLifeCycle"))
Call Select_Combo_Value("MasterFile","Issuer Documentation","12g
Filer",DataTable.Value("Issuer_12g3Filer","DRLifeCycle"))
blnFlag = "False"
blnExistFlag = Browser("MasterFile").Page("Issuer Documentation"
).WebElement("BCP_PAF").Exist(5)
If blnExistFlag = "False" Then
Call click_Image("MasterFile","Issuer Documentation","Sa
ve")
Else
blnFlag = "True"
End If
If blnFlag = "True" Then
Call click_WebElement("MasterFile","Issuer Documentation
","BCP_PAF")
Wait 2
Call Select_Combo_Value("MasterFile","Issuer Documentati
on","BCPPAF_Approval",DataTable.Value("BCPPAF_Approval","DRLifeCycle"))
Call Select_Combo_Value("MasterFile","Issuer Documentati
on","BCPPAF_Required",DataTable.Value("BCPPAF_Required","DRLifeCycle"))
Call click_Image("MasterFile","Issuer Documentation","Ap
provalDate")
Call SetDate("MasterFile","Issuer Documentation",DataTab
le.Value("BCPPAF_ApprovalDate","DRLifeCycle"))
Call click_Image("MasterFile","Issuer Documentation","Di
visionApproved")
intRowCount = Browser("MasterFile").Page("Issuer Documen
tation").Frame("lookupFrame").WebTable("Division Name").RowCount
For intRowCounter = 1 to intRowCount
strCellData = Browser("MasterFile").Page("Issuer
Documentation").Frame("lookupFrame").WebTable("Division Name").GetCellData(intR
owCounter,1)
If strCellData = DataTable.Value("BCPPAF_Divisio
nApproved","DRLifeCycle") Then
Browser("MasterFile").Page("Issuer Docum
entation").WebElement("html tag:=TD","innertext:="& strCellData).Click
Exit For
End If
Next
Call click_Image("MasterFile","Issuer Documentation","Sa
ve")
strApproval = get_WebList_Value("MasterFile","Issuer Doc
umentation","BCPPAF_Approval")
strRequired = get_WebList_Value("MasterFile","Issuer Doc
umentation","BCPPAF_Required")
strApprovalDate = get_WebEdit_Value("MasterFile","Issuer
Documentation","BCPPAF_ApprovalDate")
strDivisionApproved = get_WebEdit_Value("MasterFile","Is
suer Documentation","BCPPAF_DivisionApproved")
strDataTableDate = Replace(DataTable.Value("BCPPAF_Appro
valDate","DRLifeCycle"),";","-")
If strApproval = DataTable.Value("BCPPAF_Approval","DRLi
feCycle") AND strRequired = DataTable.Value("BCPPAF_Required","DRLifeCycle") AND
DateValue(strApprovalDate) = DateValue(strDataTableDate) AND strDivisionApprove
d = DataTable.Value("BCPPAF_DivisionApproved","DRLifeCycle") Then
Reporter.ReportEvent micPass,"Step 36, 37: Verfi
ying if the Values are Saved or NOT in the Issuer Documentation","The Values are
Saved in the Issuer Documentation"
Else
Reporter.ReportEvent micFail,"Step 36, 37: Verfi
ying if the Values are Saved or NOT in the Issuer Documentation","The Values are
NOT Saved in the Issuer Documentation"
Environment.Value("Execution_Log") = "False"
End If
End If
' Step 38
'Call click_WebElement("MasterFile","Issuer Documentation","Issu
erName")
strAppIssuerName = Browser("MasterFile").Page("Issuer Documentat
ion").WebTable("Issuer").GetCellData(1,2)
Browser("MasterFile").Page("Issuer Documentation").WebElement("html tag:
=TD","innertext:=" & strAppIssuerName,"class:=tabSelected").Click
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(5)
Then
strMessageText = Browser("MasterFile").Dialog("Microsoft
Internet Explorer").Static("MessageText").GetROProperty("text")
strReqtext = "Please click OK to Save Changes (if any) o
r click Cancel to Continue"
If Trim(strMessageText) = Trim(strReqText) Then
Reporter.ReportEvent micPass,"Step 38: Verifying
the Message in the Dialog","The text displayed in the Dialog is " & strMessageT
ext
Else
Reporter.ReportEvent micFail,"Step 38: Verifying
the Message in the Dialog","The text displayed in the Dialog is NOT " & strMess
ageText
Environment.Value("Execution_Log") = "False"
End If
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("Cancel").Click
If Browser("MasterFile").Dialog("Microsoft Internet Expl
orer").Exist(5) Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
Else
Reporter.ReportEvent micFail,"Step 38: Verifying if the
Dialog is Dispalyed or NOT","The Dialog is NOT Dispalyed"
End If
End Function
'++++++++++++++++++++== Add the Belo code in Line 5305
'===============================================================================
=====================
Public Function SelectDRExchange(strBrowserName,strPageName,strTableName,strRequ
iredValue)
blnFlag = "False"
While blnFlag = "False"
intRowCount = Browser(strBrowserName).Page(strP
ageName).Frame("lookupFrame").WebTable(strTableName).RowCount
For intRowCounter = 1 to intRowCount
intColumnCount = Browser(strBrow
serName).Page(strPageName).Frame("lookupFrame").WebTable(strTableName).ColumnCou
nt(intRowCounter)
For intColumnCounter = 1 to intC
olumnCount
strCellData = Br
owser(strBrowserName).Page(strPageName).Frame("lookupFrame").WebTable(strTableNa
me).GetCellData(intRowCounter,intColumnCounter)
'If Trim(strCell
Data) = DataTable.Value("DRExchange","DRLifeCycle") Then
If Trim(strCellD
ata) = Trim(strRequiredValue) then
Browser(
strBrowserName).Page(strPageName).WebElement("html tag:=TD","innertext:= " & str
CellData).Click
blnFlag
= "True"
Exit For
End If
Next
If blnFlag = "True" Then
Exit For
End If
Next
If blnFlag = "False" Then
Browser(strBrowserName).Page(str
PageName).Frame("lookupFrame").Image("file name:=nextbutton.gif").Click
End If
Wend
Wait(2)
End Function

'===============================================================================
===================================================
' Name of the Function : chkFlagImage
' Scope of the Function : Public
' Author : Shyam H D
' Description : This function checks for the Flag Image that will be dispa
lyed next to the Modified fields.
' Parameters accepted : BrowserName, PageName and Name of the Fields that ar
e modified.
' Parameter returned : Null
' Date and / or Version : 20-10-2008,version 1.0
' Call Statement : 'Call chkFlagImage("MasterFile","Profile - HOLDR
Profile","Detail","US Exchange;Price","Exist")
'===============================================================================
===================================================
Public Function chkFlagImage(strBrowserName, strPageName, strTableName, strAllCh
eckVariable, strCheckFlag)
blnImageFlag = "False"
strCheckVariable = Split(strAllCheckVariable, ";", -1, 1)
For intVariable = 0 To UBound(strCheckVariable)
intRowCount = Browser(strBrowserName).Page(strPageName).WebTable(strTabl
eName).RowCount
For intRowCounter = 1 To intRowCount
intColumnCount = Browser(strBrowserName).Page(strPageName).WebTable(
strTableName).ColumnCount(intRowCounter)
For intColumnCounter = 1 To intColumnCount
strGetCellData = Trim(Browser(strBrowserName).Page(strPageName).
WebTable(strTableName).GetCellData(intRowCounter, intColumnCounter))
If strGetCellData = strCheckVariable(intVariable) Then
intImageCount = Browser(strBrowserName).Page(strPageName).We
bTable(strTableName).ChildItemCount(intRowCounter, intColumnCounter + 1, "Image"
)
If intImageCount > 0 Then
For intImageCounter = 0 To intImageCount - 1
strName = Browser(strBrowserName).Page(strPageName).
WebTable(strTableName).ChildItem(intRowCounter, intColumnCounter + 1, "Image", i
ntImageCounter).GetROProperty("alt")
If strName = " Approval Status:Pending Approval" Or
strName = "Approval Status:Pending Approval" Or strName = "Corporate Action Appr
oval Status:Pending Approval" Then
blnImageFlag = "
True"
Exit For
End If
Next
Select Case strCheckFlag
Case "Exist"
If blnImageFlag = "True"Then
Reporter.ReportEvent micPass, "Verifying for the Approval Image after changing t
he Details", "The Approval Image is Present next to the Field " & strCheckVariab
le(intVariable)
Else
Reporter.ReportEvent micFail, "Verifying for the Approval Image after changing t
he Details", "The Approval Image is NOT Present next to the Field" & strCheckVar
iable(intVariable)
'captureScreenshot
Environment.Value("Execution_Log") = "False"
Environment.Value("TestCase_Log") = "False"
End If
Case "Not Exist"
If blnImageFlag = "False" Then
Reporter.ReportEvent micPass, "Verifying for the Approval Image after changing t
he Details", "The Approval Image is NOT Present next to the Field " & strCheckVa
riable(intVariable)
Else
Reporter.ReportEvent micFail, "Verifying for the Approval Image after changing t
he Details", "The Approval Image is Present next to the Field " & strCheckVariab
le(intVariable)
'captureScreenshot
Environment.Value("Execution_Log") = "False"
Environment.Value("TestCase_Log") = "False"
End If
End Select
ElseIf intImageCount = 0 Then
Select Case strC
heckFlag
Case "Exist"
If blnImageFlag = "True"Then
Reporter.ReportEvent micPass, "Verifying for the Approval Image after changing t
he Details", "The Approval Image is Present next to the Field " & strCheckVariab
le(intVariable)
Else
Reporter.ReportEvent micFail, "Verifying for the Approval Image after changing t
he Details", "The Approval Image is NOT Present next to the Field" & strCheckVar
iable(intVariable)
'captureScreenshot
Environment.Value("Execution_Log") = "False"
Environment.Value("TestCase_Log") = "False"
End If
Case "Not Exist"
If blnImageFlag = "False" Then
Reporter.ReportEvent micPass, "Verifying for the Approval Image after changing t
he Details", "The Approval Image is NOT Present next to the Field " & strCheckVa
riable(intVariable)
Else
Reporter.ReportEvent micFail, "Verifying for the Approval Image after changing t
he Details", "The Approval Image is Present next to the Field " & strCheckVariab
le(intVariable)
'captureScreenshot
Environment.Value("Execution_Log") = "False"
Environment.Value("TestCase_Log") = "False"
End If
End Select
End If
Exit For
End If
Next
Next
Next
End Function

'===============================================================================
==================================

'===============================================================================
============================
' Name of the Function : chkResultinTable
' Scope of the Function : Public
' Author : Shyam H D
' Description : This function is to Used to verfiy if the R
esults are displayed in the Table as per the Search Criteria
' Parameters accepted : BrowserName, PageName,Table Name, the Field
name and the Search Name
' Parameter returned : Null
' Date and / or Version : 26-11-2008,version 1.0
'===============================================================================
============================

Public Function chkResultinTable(strBrowserName, strPageName, strTableName, strC


olumnName, strColumnValue)
blnExistFlag = "True"
blnFlag = "False"
intRowCount = Browser(strBrowserName).Page(strPageName).WebTable(strTabl
eName).RowCount
For intRowCounter = 1 To intRowCount
intColumnCount = Browser(strBrowserName).Page(strPageName).WebTable(
strTableName).ColumnCount(intRowCounter)
For intColumnCounter = 1 To intColumnCount
strCellData = Browser(strBrowserName).Page(strPageName).WebTable
(strTableName).GetCellData(intRowCounter, intColumnCounter)
If strCellData = strColumnName Then
intColumn = intColumnCounter
intRow = intRowCounter
blnFlag = "True"
Exit For
End If
Next
If blnFlag = "True" Then
Exit For
End If
Next
If intRowCount > 10 Then
intRowCount = 10
End If
For intRC = intRow + 1 To intRowCount
strGetCellData = Browser(strBrowserName).Page(strPageName).WebTable(
strTableName).GetCellData(intRC, intColumn)
If Instr(1,strGetCellData, "ERROR: The specified cell do
es not exist.") = 0 Then
If InStr(1, UCase(Trim(strGetCellData)), UCase(T
rim(strColumnValue))) = 0 Then
blnExistFlag = "False"
End If
End If
Next
If blnExistFlag = "True" Then
Reporter.ReportEvent micPass, "Verifying if the Search Result are Di
spalyed based on the Search Criteria", "The Search Results are dispalyed based o
n the Search Criteria " & strEnteredData
Else
Reporter.ReportEvent micFail, "Verifying if the Search Result are Di
spalyed based on the Search Criteria", "The Search Results are NOT dispalyed bas
ed on the Search Criteria " & strEnteredData
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
End Function

'===============================================================================
=======================================================

Public Function CreateBifurcatedDR(strBrowserName,strPageName,strDRPageName,strC


USIPPageName)
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)
strDataPaths = strAllPath & "DataTables\"
' Select Master File Application
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","DRLifeCycle"))
Call set_WebEdit_Value("MasterFile","Profile - DR Search","Issue
rName",DataTable.Value("IssuerName","DRLifeCycle"))
Call click_Image("MasterFile","Profile - DR Search","Search")
If Browser(strBrowserName).Page(strPageName).Image("NewDR").Exis
t(2) then
Call click_Image(strBrowserName,strPageName,"NewDR")
End if
'Fill the details of the new DR to be created
Call Select_Combo_Value("CreateNewDR","CreateNewDR","Sponsored",
DataTable.Value("Sponsored","DRLifeCycle"))
Call click_Image("CreateNewDR","CreateNewDR","Depositary")
Call operation_on_FrameObjects_WithName("CreateNewDR","CreateNew
DR","lookupFrame","WebCheckBox",DataTable.value("NewDRDepositary","DRLifeCycle")
,"")
Call operation_on_FrameObjects_WithName("CreateNewDR","CreateNew
DR","lookupFrame","WebButton"," Ok ","")
Call Select_Combo_Value("CreateNewDR","CreateNewDR","Type","144A")
Call click_WebButton("CreateNewDR","CreateNewDR","Ok")
strCurrentTime = Time
strTime = Split(strCurrentTime,":",-1,1)
strIndTime = Split(strTime(2)," ",-1,1)
strTimeStamp = strTime(0) & strTime(1) & strIndTime(0) &strIndTi
me(1)
CUSIPNo = "0" & strTimeStamp
If Len(CUSIPNo) = 8 Then
CUSIPNo = CUSIPNo & "0"
End If
Environment.Value("CUSIPNum144A") = CUSIPNo
DRName1 = "QTPDR_" & strTimeStamp &"_144A"
DRName1= Replace(DRName1," ","")
DRName2 = "QTPDR_" & strTimeStamp &"_RegS"
DRName2= Replace(DRName2," ","")
Environment.Value("DR144A") = DRName1
Environment.Value("DRRegS") = DRName2
'Fill the details in the Details tab for DR
Call set_WebEdit_Value(strBrowserName,strDRPageName,"Details_Nam
e",Environment.Value("DR144A"))
Call Select_Combo_Value(strBrowserName,strDRPageName,"SecurityDe
scription",DataTable.Value("SecurityDescription","DRLifeCycle"))
If DataTable.Value("NewDREffectiveDate","DRLifeCycle") <> "" Th
en
Call click_Image(strBrowserName,strDRPageName,"Details_E
ffectiveDate")
Call SetDate(strBrowserName,strDRPageName,DataTable.Valu
e("NewDREffectiveDate","DRLifeCycle"))
End If
If Browser(strBrowserName).Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser(strBrowserName).Dialog("Microsoft Internet Explo
rer").WinButton("OK").click
End If
Wait(2)
If DataTable.Value("Sponsored","DRLifeCycle") = "U" Then
If strFirstFilerValue = "#0" Then
Call Select_Combo_Value(strBrowserName,strDRPage
Name,"FirstFiler",DataTable.Value("NewDRDepositary", "DRLifeCycle"))
End If
End If
Wait(5)
Call click_Image(strBrowserName,strDRPageName,"Save")
'Select the CUSIP Add tab and Click on Add button for Creating a
New CUSIP
Call click_WebElement(strBrowserName,strDRPageName,"CUSIPSummary
")
Call click_WebButton(strBrowserName,strDRPageName,"Add")
'Set the CUSIP details
FinalRowCount = Browser("MasterFile").Page("DR Profile").WebTable("CUSIP
Summary").RowCount
Browser("MasterFile").Page("DR Profile").WebTable("CUSIPSummary"
).ChildItem(FinalRowCount,1,"WebList","0").Select DataTable.Value("CUSIP_Type","
DRLifeCycle")
If Browser("MasterFile").Page("DR Profile").Image("NewCUSIP").Ex
ist(5) Then
Browser("MasterFile").Page("DR Profile").Image("NewCUSIP
").Click
End If
strCurrentTime = Time
strCurrentDate = Date
strDate = Split(strCurrentDate,"/" ,-1,1)
strTime = Split(strCurrentTime,":",-1,1)
strDateTimeStamp = strDate(0) &strDate(1)&strDate(2) & " "& str
Time(0) & strTime(1) & strTime(2)
strCUSIPDefaultName = get_WebEdit_Value(strBrowserName,strCUSIPP
ageName,"CUSIPName")
strFirstChar = Mid(strCUSIPDefaultName,1,1)
If Asc(strFirstChar) = 94 or Asc(strFirstChar) = 38 Then
strFirstChar = Replace(strFirstChar," ","")
CUSIPNames = strFirstChar & "QTPCUSIP_" & strDateTimeSta
mp
SelectCUSIPNames = "\"& strFirstChar &"\"&"QTPCUSIP_" &
strDateTimeStamp
CUSIPName = Replace(CUSIPNames," ","")
SelectCUSIPName = Replace(SelectCUSIPNames," ","")
Environment.Value("CUSIP144A") = CUSIPName
Environment.Value("SelectCUSIP144A") = SelectCUSIPName
DataTable.Value("SelectCUSIPName","DRLifeCycle") = Selec
tCUSIPName
Else
CUSIPNames = "QTPCUSIP_" & strDateTimeStamp
CUSIPName = Replace(CUSIPNames," ","")
Environment.Value("CUSIP144A") = CUSIPName
Environment.Value("SelectCUSIP144A") = CUSIPName
DataTable.Value("SelectCUSIPName","DRLifeCycle") = CUSIP
Name
End If
DataTable.ExportSheet strDataPaths & "DRLifeCycle.xls","DRLifeCy
cle"
DataTable.ImportSheet strDataPaths & "DRLifeCycle.xls","DRLifeCy
cle","DRLifeCycle"
' Entering the NEW CUSIP Details
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"CUSIPNam
e",Environment.Value("CUSIP144A"))
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"RatioDRs",DataTa
ble.Value("RatioDRs","DRLifeCycle"))
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"RatioUnd
erlyingShares",DataTable.Value("RatioUnderlyingShares","DRLifeCycle"))
Wait(5)
' Selecting the Underlying Security
Call SelectImage(strBrowserName,strCUSIPPageName,"Detail","Under
lying Security","info.gif")
Call SelectValueinFrame(strBrowserName,strCUSIPPageName,"lookupF
rame","Exchange")
' Selecting Common Depository
If DataTable.Value("NewDRDepositary","DRLifeCycle") = "BNY" Then
Call SelectImage(strBrowserName,strCUSIPPageName,"Detail
","Common Depository","info.gif")
Call SelectValueinFrame(strBrowserName,strCUSIPPageName,
"lookupFrame","Name")
End If
' Enter the DR Exchange Value
Call SelectImage(strBrowserName,strCUSIPPageName,"Detail","DR Ex
change","info.gif")
'Call click_Image(strBrowserName,strCUSIPPageName,"DRExchange")
Call SelectDRExchange(strBrowserName,strCUSIPPageName,"Exchange"
,DataTable.Value("DRExchange","DRLifeCycle"))
'Entering the DR Ticker Symbol
strDRTickerSymbol =CreateAlphanumericString(5)
intValue = Browser(strBrowserName).Page(strCUSIPPageName).WebEdi
t("DRTickerSymbol").GetROProperty("readonly")
If intValue = 0 Then
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"
DRTickerSymbol",strDRTickerSymbol)
Wait(2)
End If
' Entering DR SEDOL
If DataTable.Value("NewDRType","DRLifeCycle") = "Reg. S" Or Data
Table.Value("NewDRType","DRLifeCycle") = "144A" Then
strDRSEDOL =CreateAlphanumericString(7)
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"
DRSEDOL",strDRSEDOL)
End If
' Entering the CUSIP Number
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"CUSIP",E
nvironment.Value("CUSIPNum144A"))
If Browser(strBrowserName).Dialog("Microsoft Internet Explorer")
.Exist(5) Then
Browser(strBrowserName).Dialog("Microsoft Internet Explo
rer").WinButton("OK").Click
End If
Wait(5)
' Save the Changes made to the CUSIP.
Call click_Image(strBrowserName,strCUSIPPageName,"Save")
Wait(10)
strDRAppNames = Browser("MasterFile").Page("CUSIP Profile").WebT
able("DR").GetCellData(1,2)
Browser("MasterFile").Page("CUSIP Profile").WebElement("html tag
:=TD","innertext:="& strDRAppNames).Click
Wait(5)
If Browser("MasterFile").Page("DR Profile").WebEdit("Details_SU").Exist(
5) Then
strSUValue = Browser("MasterFile").Page("DR Profile").We
bEdit("Details_SU").GetROProperty("value")
Environment.Value("SponserUnsponser") = strSUValue
End If
' Filling the DR Documentation if the Flag is set to "Y"
If DataTable.Value("NewDRDepositary","DRLifeCycle") = "BNY" Then
Call DRDocumentation()
Wait(5)
End If
' If DataTable.Value("IssuerDocumentation","DRLifeCycle") = "Y" Then
' Call DRIssuerDocumentation()
' End If
' Clicking on the DR and changing the DR Status to Effective
Call Select_Combo_Value(strBrowserName, strDRPageName, "Details_Status",
"Effective")
Call click_Image(strBrowserName,strDRPageName,"Save")
Wait(5)
' Logout from Application and Approve the Newly Created CUSIP an
d DR Name
Call logoutfromApp(strBrowserName, strDRPageName)
' Login again with Approval ID
Call invoke_URL(strBrowserName,"Login Page",Environment.Value("A
ppURL"))
Call login(strBrowserName,"Login Page","Approver","MFLogin")
' Approving the Newly created CUSIP and DR Documentation and DR
Profile.
Call ApprovalFunction_DR("MasterFile","CUSIP Profile","Name;CUSI
P;Last User Updated;Last Updated",Environment.Value("CUSIP144A"),"Approved the C
hanges Made","Approved","Pending Approval")
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
' Login again with Approval ID
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call login("MasterFile","Login Page","User","MFLogin")
' Click on Master File Link and Select the Profile DR Menu
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","DRLifeCycle"))
'Search for the Newly Created DR
Call set_WebEdit_Value("MasterFile","Profile - DR Search","IssuerName",D
ataTable.Value("IssuerName","DRLifeCycle"))
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRNam
e",Environment.Value("DR144A"))
Call click_Image("MasterFile","Profile - DR Search","Search")
Wait(5)
Browser("MasterFile").Page("Profile - DR Search").WebElement("ht
ml tag:=TD","innertext:=" & Environment.Value("DR144A")).Click
Wait(10)
' Select the DR Life Cycle WebElement and Select Bifurcated DR R
adiobutton
Call click_WebElement(strBrowserName,strDRPageName,"DRLifeCycle"
)
Wait(2)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").E
xist(5) Then
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("Cancel").Click
End If
' Selecting the Bifurcated Radiobutton
strBifurcatedRadioName = "bfrc"
Browser("DR Lifecycle").Page("DR Lifecycle").WebRadioGroup("Upgr
ade").Select strBifurcatedRadioName
Wait(2)
Call click_WebButton("DR Lifecycle","DR Lifecycle","CreateNewDR"
)
strCurrentTime = Time
strTime = Split(strCurrentTime,":",-1,1)
strIndTime = Split(strTime(2)," ",-1,1)
strTimeStamp = strTime(0) & strTime(1) & strIndTime(0) &strIndTi
me(1)
CUSIPNos = "0" & strTimeStamp
If Len(CUSIPNos) = 8 Then
CUSIPNos = CUSIPNos & "0"
End If
Environment.Value("CUSIPNumRegS") = CUSIPNos
' Fill the details in the Details tab for DR
Call set_WebEdit_Value(strBrowserName,strDRPageName,"Details_Nam
e",Environment.Value("DRRegS"))
Call Select_Combo_Value(strBrowserName,strDRPageName,"SecurityDe
scription",DataTable.Value("SecurityDescription","DRLifeCycle"))
' If DataTable.Value("NewDREffectiveDate","DRLifeCycle") <> "" Th
en
' Call click_Image(strBrowserName,strDRPageName,"Details_E
ffectiveDate")
' Call SetDate(strBrowserName,strDRPageName,DataTable.Valu
e("NewDREffectiveDate","DRLifeCycle"))
' End If
Call click_Image(strBrowserName,strDRPageName,"Save")
'Select the CUSIP Add tab and Click on Add button for Creating a
New CUSIP
Call click_WebElement(strBrowserName,strDRPageName,"CUSIPSummary
")
Call click_WebButton(strBrowserName,strDRPageName,"Add")
'Set the CUSIP details
FinalRowCount = Browser("MasterFile").Page("DR Profile").WebTable("CUSIP
Summary").RowCount
Browser("MasterFile").Page("DR Profile").WebTable("CUSIPSummary"
).ChildItem(FinalRowCount,1,"WebList","0").Select DataTable.Value("CUSIP_Type","
DRLifeCycle")
If Browser("MasterFile").Page("DR Profile").Image("NewCUSIP").Ex
ist(5) Then
Browser("MasterFile").Page("DR Profile").Image("NewCUSIP
").Click
End If
Wait(5)
strCurrentTime = Time
strCurrentDate = Date
strDate = Split(strCurrentDate,"/" ,-1,1)
strTime = Split(strCurrentTime,":",-1,1)
strDateTimeStamp = strDate(0) &strDate(1)&strDate(2) & " "& str
Time(0) & strTime(1) & strTime(2)
Wait(5)
strCUSIPDefaultName = get_WebEdit_Value(strBrowserName,strCUSIPP
ageName,"CUSIPName")
strFirstChar = Mid(strCUSIPDefaultName,1,1)
strFirstChar = Replace(strFirstChar," ","")
If Asc(strFirstChar) = 94 or Asc(strFirstChar) = 38 Then
CUSIPNames = strFirstChar & "QTPCUSIP_" & strDateTimeSta
mp
SelectCUSIPNames = "\"& strFirstChar &"\"&"QTPCUSIP_" &
strDateTimeStamp
CUSIPName = Replace(CUSIPNames," ","")
SelectCUSIPName = Replace(SelectCUSIPNames," ","")
Environment.Value("CUSIPRegS") = CUSIPName
Environment.Value("SelectCUSIPRegS") = SelectCUSIPName
DataTable.Value("SelectCUSIPName","DRLifeCycle") = Selec
tCUSIPName
Else
CUSIPNames = "QTPCUSIP_" & strDateTimeStamp
CUSIPName1 = Replace(CUSIPNames," ","")
Environment.Value("CUSIPRegS") = CUSIPName1
Environment.Value("SelectCUSIPRegS") = CUSIPName1
End If
DataTable.ExportSheet strDataPaths & "DRLifeCycle.xls","DRLifeCy
cle"
DataTable.ImportSheet strDataPaths & "DRLifeCycle.xls","DRLifeCy
cle","DRLifeCycle"
' Entering the NEW CUSIP Details
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"CUSIPNam
e",Environment.Value("CUSIPRegS"))
Wait(5)
If DataTable.Value("NewDRDepositary","DRLifeCycle") = "BNY" Then
Call SelectImage(strBrowserName,strCUSIPPageName,"Detail
","Common Depository","info.gif")
Call SelectValueinFrame(strBrowserName,strCUSIPPageName,
"lookupFrame","Name")
End If
'Selecting the DR Exchange
Call SelectImage(strBrowserName,strCUSIPPageName,"Detail","DR Ex
change","info.gif")
'Call click_Image(strBrowserName,strCUSIPPageName,"DRExchange")
Call SelectDRExchange(strBrowserName,strCUSIPPageName,"Exchange"
,DataTable.Value("DRExchange","DRLifeCycle"))
'Entering the DR Ticker Symbol
strDRTickerSymbol =CreateAlphanumericString(5)
intValue = Browser(strBrowserName).Page(strCUSIPPageName).WebEdi
t("DRTickerSymbol").GetROProperty("readonly")
If intValue = 0 Then
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"
DRTickerSymbol",strDRTickerSymbol)
Wait(2)
End If
' Entering DR SEDOL
If DataTable.Value("NewDRType","DRLifeCycle") = "Reg. S" Or Data
Table.Value("NewDRType","DRLifeCycle") = "144A" Then
strDRSEDOL =CreateAlphanumericString(7)
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"
DRSEDOL",strDRSEDOL)
End If
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"CUSIP",E
nvironment.Value("CUSIPNumRegS"))
If Browser(strBrowserName).Dialog("Microsoft Internet Explorer")
.Exist(2) Then
Browser(strBrowserName).Dialog("Microsoft Internet Explo
rer").WinButton("OK").Click
End If
Wait(5)
Call click_Image(strBrowserName,strCUSIPPageName,"Save")
Wait(5)
' Clicking on the DR
strDRNames = Browser("MasterFile").Page("CUSIP Profile").WebTabl
e("DR").GetCellData(1,2)
Browser("MasterFile").Page("CUSIP Profile").WebElement("html tag:=TD","i
nnertext:="& strDRNames,"class:=tabselected").Click
Wait(5)
If Browser("MasterFile").Page("DR Profile").WebEdit("Details_SU").Exist(
5) Then
strSUValue = Browser("MasterFile").Page("DR Profile").We
bEdit("Details_SU").GetROProperty("value")
Environment.Value("SponserUnsponser") = strSUValue
End If
' Filling the DR Documentation Details
If DataTable.Value("DRDocumentationRequired","DRLifeCycle") = "
Y" Then
' Select Detail Tab
Call click_WebElement("MasterFile","DR Profile","Detail"
)
Wait(5)
Call DRDocumentation()
End If
' Clicking on the DR and changing the DR Status to Effective
' Call Select_Combo_Value(strBrowserName, strDRPageName, "Details_
Status","Effective")
Call click_Image(strBrowserName,strDRPageName,"Save")
' Logout from Application and Approve the Newly Created CUSIP and DR Nam
e
Call logoutfromApp(strBrowserName, strDRPageName)
' Login again with Approval ID
Call invoke_URL("MasterFile","Login Page",Environment.Value("App
URL"))
Call login("MasterFile","Login Page","Approver","MFLogin")
' Approving the Newly created CUSIP and DR of 144A
Call ApprovalFunction_DR("MasterFile","CUSIP Profile","Name;CUSIP;Last U
ser Updated;Last Updated",Environment.Value("CUSIPRegS"),"Approved the Changes M
ade","Approved","Pending Approval")
If DataTable.Value("IssuerDocumentation","DRLifeCycle") = "Y" Th
en
Call ApprovalFunction_DR("MasterFile","Issuer Documentat
ion","Issuer;Last User Updated;Last Updated",DataTable.Value("IssuerName","DRLif
eCycle"),"Approved the Changes Made","Approved","Pending Approval")
End If
If DataTable.Value("NewDRDepositary","DRLifeCycle") = "BNY" Then
Call ApprovalFunction_DR("MasterFile","DR Documentation"
,"DR Name;DR Type;S/U;Origin;DR Structure;Last User Updated;Last Updated",Enviro
nment.Value("DRRegS"),"Approved","Approved","Pending Approval")
End If
Call ApprovalFunction_DR("MasterFile","DR Profile","Name;Type;Depositary
;S/U;Origin;Structure;Last User Updated;Last Updated",Environment.Value("DRRegS"
),"Approved","Approved","Pending Approval")
If DataTable.Value("NewDRDepositary","DRLifeCycle") = "BNY" Then
Call ApprovalFunction_DR("MasterFile","DR Documentation"
,"DR Name;DR Type;S/U;Origin;DR Structure;Last User Updated;Last Updated",Enviro
nment.Value("DR144A"),"Approved","Approved","Pending Approval")
End If
Call ApprovalFunction_DR("MasterFile","DR Profile","Name;Type;Depositary
;S/U;Origin;Structure;Last User Updated;Last Updated",Environment.Value("DR144A"
),"Approved","Approved","Pending Approval")
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
End Function

'===============================================================================
=================================

Public Function FindRequiredDR(strRequiredDepositary,strDRType,strWarrentRequire


d)
intRowCount = Browser("MasterFile").Page("Profile - DR Search").
WebTable("DRSearchResults").RowCount
intColumnCount = Browser("MasterFile").Page("Profile - DR Search
").WebTable("DRSearchResults").ColumnCount(2)
For intColumnCounter = 1 to intColumnCount
strColumnName = Browser("MasterFile").Page("Profile - DR
Search").WebTable("DRSearchResults").GetCellData(2,intColumnCounter)
If strColumnName = "Structure" Then
intStructureColumn = intColumnCounter
End If
If strColumnName = "Depositary" Then
intDepositaryColumn = intColumnCounter
End If
If strColumnName = "Type" Then
intTypeColumn = intColumnCounter
End If
If strColumnName = "Origin" Then
intOriginColumn = intColumnCounter
End If
If strColumnName = "Status" Then
intStatusColumn = intColumnCounter
End If
Next
For intRowCounter = 1 to intRowCount
If strWarrentRequired = "" Then
strStructure = Browser("MasterFile").Page("Profi
le - DR Search").WebTable("DRSearchResults").GetCellData(intRowCounter,intStruct
ureColumn)
If strStructure = "Bifurcated" Then
strDepositary = Browser("MasterFile").Pa
ge("Profile - DR Search").WebTable("DRSearchResults").GetCellData(intRowCounter,
intDepositaryColumn)
If strDepositary = strRequiredDepositary
Then
strType = Browser("MasterFile").
Page("Profile - DR Search").WebTable("DRSearchResults").GetCellData(intRowCounte
r,intTypeColumn)
If strType = strDRType Then
strStatus = Browser("Mas
terFile").Page("Profile - DR Search").WebTable("DRSearchResults").GetCellData(in
tRowCounter,intStatusColumn)
If strStatus = "Effectiv
e" Then
intRequiredDRRow
= intRowCounter
End If
Exit For
End If
End If
End If
Else
strOrigin = Browser("MasterFile").Page("Profile
- DR Search").WebTable("DRSearchResults").GetCellData(intRowCounter,intStructure
Column)
If strOrigin = "Warrent" Then
strDepositary = Browser("MasterFile").Pa
ge("Profile - DR Search").WebTable("DRSearchResults").GetCellData(intRowCounter,
intDepositaryColumn)
If strDepositary = strRequiredDepositary
Then
strType = Browser("MasterFile").
Page("Profile - DR Search").WebTable("DRSearchResults").GetCellData(intRowCounte
r,intTypeColumn)
If strType = strDRType Then
intRequiredDRRow = intRo
wCounter
Exit For
End If
End If
End If
End If
Next
strDRName = Browser("MasterFile").Page("Profile - DR Search").We
bTable("DRSearchResults").GetCellData(intRequiredDRRow,1)
FindRequiredDR = strDRName
End Function

'===============================================================================
==========================

You might also like