You are on page 1of 239

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

==========================
' Name of the Script : MasterFile Profile DR
' Scope of the Script : This test script covers 13 te
st cases related to the MF Profile --> DR
' Author
: Ganesh Viswanathan
' Description : MasterFile Profile DR
' Date and / or Version : 9-12-2008,version 1.0
'===============================================================================
============================
Environment.Value("Failure")="False"
Sub MFProfileDR()
'****Declaration of Environmental Variable
Environment.Value("Execution_Log")="True"
'''''''''Test case count
const TC_COUNT = 15
strVar = Environment("TestDir")
strIndVar = Split(strVar,"\",-1,1)
strBound = UBound(strIndVar)
strAllPath =""
For intPathCounter = 0 to strBound - 1
strAllPath = strAllPath & strIndVar(intPathCount
er) &"\"
Next
strPath = Trim(strPath)
strDataPath = strAllPath & "DataTables\"
strLibPath = strAllPath & "Function_Library\"
Call LoadRepository("ObjectRepositoryForADRMFCreateNewDR.tsr;Mas
terFileReports.tsr")
Environment.Value("strSheetName")="DR"
'****Adding MFLogin sheet to the dataTable and Importing the Inp
ut DataTable
DataTable.AddSheet "MFLogin"
DataTable.ImportSheet strDataPath & "Login.xls","MFLogin","MFLog
in"
DataTable.AddSheet "DR"
DataTable.ImportSheet strDataPath & "MasterFileProfile.xls","DR"
,"DR"
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"), "
", "", "")
' Loading the Repository
'Call LoadRepository("ObjectRepositoryForADRMFCreateNewDR.tsr")
'****Invoking IE and navigating to the ADR Login page
DataTable.GetSheet("MFLogin").SetCurrentRow(1)
'Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL"
,"MFLogin"))
'****Checking the username, password and login objects in the lo
gin page
' Call pageCheck_WebEdit("MasterFile","Login Page","username;j_pas
sword","")
' Call pageCheck_WebButton("MasterFile","Login Page","Login","")
'****Entering username and password and login into the masterfil
e application
'Call login("MasterFile","Login Page","User","MFLogin")
Environment.Value("DATATABLE_ROW")=1
DataTable.GetSheet("DR").SetCurrentRow(Environment.Value("DATATA
BLE_ROW"))
'***************************************** TC Driver Strat *********************
**********************************
Environment.Value("ISSUERNAME")=""
For intTCCount = 1 to TC_COUNT
Environment.Value("TCCURCOUNT")=intTCCount
Environment.Value("Execution_Log") = "True"
If DataTable("TestRunFlag","DR")="Y" Then
''If run flag is Y in test data table
Reporter.ReportEvent micDone,"######## BEGIN TES
T CASE - '" & DataTable("TestCaseID","DR") & "' ########### ","Execution of Test
Case '" & DataTable("TestCaseDesc","DR") & "' Started"
strFuncName = "MFProfileDR_TC" & intTCCount & "(
)" ''Formation of function name
''Call Function
Execute "Call " & strFuncName
If Environment.Value("Execution_Log") = "True"
Then
Call Execution_log("",Datatable.
Value("TestCaseID", "DR"), Datatable.Value("TestCaseDesc", "DR"), "PASS")
Else
Call Execution_log("",Datatable.
Value("TestCaseID", "DR"), Datatable.Value("TestCaseDesc", "DR"), "FAIL")
End If
Reporter.ReportEvent micDone,"######### END OF T
EST CASE - '" & DataTable("TestCaseID","DR") & "###########","The Test Case Exec
ution Completed"
End If
'Checking AND incrementing the datatable
strPrevious=Trim(DataTable.Value("TestCaseID","D
R"))
''Increment the test data table row
Environment.Value("DATATABLE_ROW") = Environment.Valu
e("DATATABLE_ROW") + 1
DataTable.GetSheet("DR").SetCurrentRow(Environment.Va
lue("DATATABLE_ROW"))
strNext=Trim(DataTable.Value("TestCaseID","DR"))
While strPrevious = strNext And strPrevious<> ""
Environment.Value("DATATABLE_ROW") = Env
ironment.Value("DATATABLE_ROW") + 1
DataTable.GetSheet("DR").SetCurrentRow(E
nvironment.Value("DATATABLE_ROW"))
strNext=Trim(DataTable.Value("TestCaseID
","DR"))
Wend
Next
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
'Call UnLoadRepository("ObjectRepositoryForADRMFCreateNewDR.tsr;
MasterFileReports.tsr")
'***************************************** TC Driver End ***********************
********************************
End Sub

''**********************************************Test Case 1 to Test Case 15*****


*********************************************
Public Function MFProfileDR_TC1()
Environment.Value("TestCase_Log")="True"
Environment.Value("CUSIP_NAME")=""
Environment.Value("DRNAME")=""
Environment.Value("ISSUERNAME")=""
'Step1
'Log into the ADR home page
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL",
"MFLogin"))
Call pageCheck_WebEdit("MasterFile","Login Page","username;j_pas
sword","")
Call pageCheck_WebButton("MasterFile","Login Page","Login","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is Dispalyed successfully with th
e Required Field"
Else
Reporter.ReportEvent micFail,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is NOT Dispalyed successfully wit
h the Required Field"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Calling the login function
Call login("MasterFile","Login Page","Relationship Management","
MFLogin")
' Check the MasterFile Application for the 4 links, User Name and the last Login
Details
Call chkADRHomePage("MasterFile","Depositary Receipt Division's"
,DataTable.Value("HomePageLinks","HomePageVerification"),DataTable.Value("UserFu
llName","MFLogin" ))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass," Verifying the DR Home Pag
e","The DR Home Page is displayed successfully with Home Page Links and the User
Details"
Else
Reporter.ReportEvent micFail," Verifying the DR Home Pag
e","The DR Home Page is NOT displayed successfully with Home Page Links and the
User Details"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step2
'Click on the masterFile button
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
Call chkMFCAHomePage("MasterFile","MasterFile",DataTable.Value("
MenuName","HomePageVerification"),DataTable.Value("UserFullName","MFLogin" ))
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is disaplyed successfully with the required Menu Ite
ms and also displays the Current Version"
Else
Reporter.ReportEvent micFail,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is NOT displayed successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step3
'Click on the Profile Link
Call check_Menu("MasterFile","MasterFile","Profile")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 3: Verifying if the DR Menu
is Present in the Profile Menu or Not","The DR Menu is Present in the Profile Me
nu"
Else
Reporter.ReportEvent micPass, "Step 3: Verifying if the DR Menu
is Present in the Profile Menu or Not","The DR Menu is NOT Present in the Profil
e Menu"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step4
'Click on the DR Link
Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","DR"))
Call pageCheck_WebEditOR("MasterFile","Profile - DR Search","Iss
uerName;DRName")
Call pageCheck_WebListOR("MasterFile","Profile - DR Search","Cou
ntryOfManagement;DrOrigin;DRType;DRExchange;SorU;Status;SubStatus")
'Call pageCheck_WebElementinTable("MasterFile","Profile - DR Sea
rch","Name;Country of Management;Type;Status;Sub-Status;S/U;Effective Date;Termi
nation Date;Depository;Origin;Structure","")
intRC = Browser("MasterFile").Page("Profile - DR Search").WebTab
le("DR Search Results").RowCount
If intRC <3 Then
Reporter.ReportEvent micPass,"Verifying the Number of Rows befor
e entering the Search Criteria","There are No Results displayed"
Environment.Value("TestCase_Log")="True"
Else
Reporter.ReportEvent micFail,"Verifying the Number of Rows befor
e entering the Search Criteria","There are few Results displayed"
Call captureScreenshot()
Environment.Value("Execution_Log") = "False"
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 4 : Verifying the Fields pre
sent in the Page Profile CUSIP Search","The Required Fields are dispalyed"
Else
Reporter.ReportEvent micFail, "Step 4 : Verifying the Fields pre
sent in the Page Profile CUSIP Search","The Required Fields are NOT Present"
Environment.Value("TestCase_Log") = "True"
End If
'Step5
'Selecting a Search criteria
Call DRSearchCriteria("MasterFile","Profile - DR Search")
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass, "Step 5 :Click on search w
ith all default values","The Required Results are displayed"
Else
Reporter.ReportEvent micFail, "Step 5 :Click on search w
ith all default values","The required search results do not appear"
Environment.Value("TestCase_Log") = "True"
End If
'Step6 to 20
Call CreateNewDR("MasterFile","Profile - DR Search","DR Profile"
,"CUSIP Profile","","DR")
If Environment.Value("Failure")="True" Then
Call select_Menu("MasterFile","Profile - DR Search","Hom
e;DR Home")
Exit Function
End If
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step6 to 19:Create a New D
R and Attach a CUSIP to it","The New DR with name as "& Environment.Value("DRNAM
E") &" and CUSIP:"& Ucase(Environment.Value("CUSIP_NAME")) &" is created succes
sfully on saving which we get a Yellow Flag"
Else
Reporter.ReportEvent micFail,"Step6 to 19 :Create a New
DR and attach a CUSIP to it","The New DR is not created successfully"
Environment.Value("TestCase_Log")="True"
End If

'Step21
Call click_WebElement("MasterFile","DR Profile","Offerings")
If Browser("MasterFile").Page("DR Profile").WebTable("Offerings").Exist(
2) Then
Reporter.ReportEvent micPass,"Step20: Check for the offerings ta
b","The details in the offering tab is as required"
Else
Reporter.ReportEvent micFail,"Step20: Check for the offerings ta
b","The Details in the offerings tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

'Step22
Call click_WebElement("MasterFile","DR Profile","Additional DR Exchanges
")
If Browser("MasterFile").Page("DR Profile").WebTable("Additional DR Exch
ange").Exist(2) and Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step21: Check whether the Addition
al DR exchange Tab is as required","The Additional DR Exchanges Tab is as Requir
ed"
Else
Reporter.ReportEvent micFail,"Step21: Check whether the Addition
al exchange Tab is as required","The Additional DR exchanges tab is not present"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
' Call click_WebButton("MasterFile","DR Profile","Add_DRExchange")
' Call click_Image("MasterFile","DR Profile","ExchangeInfo")
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","WebEdit","searchString",dataTable.Value("DRExchangeForCUSIP","D
R"))
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","Image","Go","")
' Call SelectValueInsideFrame("MasterFile","DR Profile","lookupFra
me",dataTable.Value("DREXchangeForCUSIP","DR"))
' Call set_WebEdit_Value("MasterFile","DR Profile","SEDOL",SEDOL)
' Call set_WebEdit_Value("MasterFile","DR Profile","Ticker")
' Call click_Image("MasterFile","DR Profile","Save")
' If Environment.Value("TestCase_Log")=true Then
' Reporter.ReportEvent micPass,"Step22:Fill in the Additio
nal DR Exchanges Tab","The Additional DR exchanges tab gets filled"
' Else
' Reporter.ReportEvent micFail,"Step22: Fill in the Additi
onal DR exchanges tab","The additional DR Exchange tab is not filled as required
"
' Environment.Value("TestCase_Log")=true
' End If
'Step23 and 24
Call click_WebElement("MasterFile","DR Profile","Other DR Services")
If Browser("MasterFile").Page("DR Profile").WebTable("Other DR Services"
).Exist(2) Then
Reporter.ReportEvent micPass,"Step22 and 23: Check whether the A
dditional DR exchange Tab is as required","The Additional DR Exchanges Tab is as
Required"
Else
Reporter.ReportEvent micFail,"Step22 and 23: Check whether the A
dditional exchange Tab is as required","The Additional DR exchanges tab is not p
resent"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

'Step24

If Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation"
).Exist(2) Then
Reporter.ReportEvent micPass,"Step24: Check whether the DR Docum
entation link is present or not","The DR Documentation link is present as requir
ed"
Else
Reporter.ReportEvent micFail,"Step24: Check whether the DR Docum
entation link is present or not","The DR Documentation link is not present as re
quired"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

'Step26
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation").c
lick
If Browser("MasterFile").Page("DR Documentation Detail").Exist(2) Then
Reporter.ReportEvent micPass,"Step25: Click on the DR Documentat
ion link","The DR Documentation link is clicked as required"
Else
Reporter.ReportEvent micFail,"Step25: Click on the DR Documentat
ion link","The DR Documentation link is not clicked"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step27 to 31
'Filling in the DR documentation
call Fill_DR_Documentation("MasterFile","DR Documentation Detail")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step26 to28: Fill the DR Documenta
tion and click on save","The DR documentation is done and saved"
Else
Reporter.ReportEvent micFail,"Step26 to 28: Fill the DR Document
ation and click on save","The DR documentation is not done properly"
Environment.Value("TestCase_Log")="True"
End If
Call click_WebElement("MasterFile","DR Profile","Detail")
If dataTable.Value("Type","DR") <> "144A" And datatable.Value("Type","D
R") <> "RegS" And DataTable.Value("DepositoryName","DR") ="BNY" Then
Call click_WebElement("MasterFile","DR Profile","SEC Filing")
Call set_WebEdit_Value("MasterFile","DR Profile","CurrentF6ADS",
dataTable.Value("CurrentF6ADS","DR"))

Call set_WebEdit_Value("MasterFile","DR Profile","CurF6Number",d


ataTable.Value("CurF6Number","DR"))

Wait(2)
If DataTable.Value("F6FileDate","DR") <> "" Then
strDataTableValue = DataTable.Value("F6F
ileDate","DR")
strValue = Split(strDataTableValue,";",-
1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image("MasterFile","DR Profil
e","ShowCalendar_F6FileDate")
Call ClickIcon_SetDate("MasterFile","DR
Profile",strMonthValue,strYearValue,strDateValue)
End If
Call click_Image("MasterFile","DR Profile","Save")
End If
Wait(2)
Call click_WebElement("MasterFile","DR Profile","Detail")
Wait(2)
Call Select_Combo_Value("MasterFile","DR Profile","Status","Effective")
Wait(2)
Call click_Image("MasterFile","DR Profile","Save")
Wait(5)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
'Call logoutfromApp("MasterFile","DR Profile")
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
Call ClickonDRName("MasterFile","DR Profile",DataTable.Value("IssuerName
","DR"),"2")
Wait(4)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
'Step32
'Call pageCheck_WebElement("MasterFile","Issuer Profile","Advisers;BNY C
ontacts;Comments;Custodians;Detail;DR Services;Products;Und. Sec. Markets","")

If Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Ex
ist(2) and Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerDocume
ntation").Exist(2)Then
Reporter.ReportEvent micPass," Check whether the issuer profile
screen has been loaded or not","The issuer profile screen has been loaded as req
uired"
Else
Reporter.ReportEvent micFail," Check whether the issuer profile
screen has been loaded or not","The issuer profile screen has not been loaded"
Environment.Value("Execution_Log")="False"
Call captureScreenshot()
Environment.Value("TestCase_Log")="True"
End If
'Step33
Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Details")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step32: Check whether the required
fields are present in the issuer profile screen detail tab","The required field
s are present as required"
Else
Reporter.ReportEvent micFail,"Step32: Check whether the required
fields are present in the issuer profile screen detail tab","The required field
s are not present"
Environment.Value("TestCase_Log")="True"
End If
'Step34
'Checking for the BNY contact tab
Browser("MasterFile").Page("Issuer Profile").WebElement("BNY Contacts").
Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","BNY Contact
s")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("BNY Contacts").Exist(2) Then
Reporter.ReportEvent micPass,"Step33: Check for the details in t
he BNY contacts tab","The details under the BNY contact tab is as required"
Else
Reporter.ReportEvent micFail,"Step33: Check for the details in t
he BNY contacts tab","The details under the BNY contact tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step35
'Checking for the Underlying security markets tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Und. Sec. Marke
ts").Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Und. Sec. M
arkets")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Underlying Security Market").Exist(2) Then
Reporter.ReportEvent micPass,"Step34: Check for the Underlying E
vent Tab","The underlying event tab is as required"
Else
Reporter.ReportEvent micFail,"Step34: Check for the underlying E
vent tab","The details under the underlying event tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step36
'Checking for the Custodian Tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Custodians").Cl
ick
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Custodians"
)
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Issuers Preferred Custodian").Exist(2)Then
Reporter.ReportEvent micPass,"Step35: Check for the Issuer preff
ered tab","The details in the Issuer preffered tab is as required"
Else
Reporter.ReportEvent micFail,"Step35: Check for the issuer preff
ered tab","The details in the issuer preffered is not present as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step37
'Checking for the Advisors tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Advisers").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Advisers")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Issuers Advisers").Exist(2)Then
Reporter.ReportEvent micPass,"Step36: Check for the Advisors tab
","The advisers tab details are as required"
Else
Reporter.ReportEvent micFail,"Step36: Check for the Advisors Tab
","The advisors tab details are as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step38
'Checking for the Products tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Products").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Products")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Products").Exist(2)Then
Reporter.ReportEvent micPass,"Step37: Check for the presence of
the products web table","The products web table is present as required"
Else
Reporter.ReportEvent micFail,"Step37: Check for the presence of
the products web table","The products web table is not present as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If

'Step39
'Checking for the DR services tab
Browser("MasterFile").Page("Issuer Profile").WebElement("DR Services").C
lick
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","DR Services
")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("DR Services").Exist(2) Then
Reporter.ReportEvent micPass,"Step38: Check for the presence of
the DR Services web table","The DR services web table is present as required"
Else
Reporter.ReportEvent micFail,"Step38: Check for the presence of
the DR Services web table","The DR Services web table is not present as required
"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step40
'Checking for the Comments tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Comments").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Comments")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Comments").Exist(2) Then
Reporter.ReportEvent micPass,"Step39: Check for the presence of
the comments table","The comments table is present as required"
Else
Reporter.ReportEvent micFail,"Step39: Check for the presence of
the comments table","The comments table is not present"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
Call click_WebElement("MasterFile","Issuer Profile","Detail")
Environment.Value("ISSUERNAME")=trim(get_WebEdit_Value("MasterFile","Iss
uer Profile","Name"))
If Environment.Value("TCCURCOUNT")=2 Then
Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerD
ocumentation").Click
Call Fill_Issuer_Documentation("MasterFile","Issuer Documentatio
n","DR")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Fill in the issuer Documen
tation and click on save","The Issuer documentation is done and saved"
Else
Reporter.ReportEvent micFail,"Fill in the Issuer Documen
tation and click on save","The Issuer documentation is not filled properly"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
End If
'Call ClickonDRName("MasterFile","Issuer Documentation",ISSUERNAME,"2")
Call logoutfromApp("MasterFile","Issuer Documentation")
Reporter.ReportEvent micPass,"Step40: Change the status of the D
R as effective","The DR Status has already been changed to effective"
'Step 42
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Approver","MFLogin")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step41: Log into application using
Approver ID","We have successfully logged in as an approver"
Else
Reporter.ReportEvent micFail,"Step41: Log into the application u
sing Approver ID ","We have not successfully logged in as an approver"
Environment.Value("TestCase_Log")="True"
End If
'Step42 to 49
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","CUSIP Profile","CUSIP",E
nvironment.Value("CUSIP_NAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step42 to 49:Approve the CUSIP det
ails","The CUSIP details are approved as required"
Else
Reporter.ReportEvent micFail,"Step42 to 49: Approve the CUSIP de
tails","The CUSIP details are not approved as required"
Environment.Value("TestCase_Log")="True"
End If

'Step50 to 54
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","DR Documentation","DR Na
me",Environment.Value("DRNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step50 to 54: Approve the DR Docum
entation","The DR Documentation is filled in correctly as required"
Else
Reporter.ReportEvent micFail,"Step50 to 54: Approve the DR Docum
entation","The DR Documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
'Step 55 to 60
Environment.Value("TestCase_Log")="True"
If Environment.Value("TCCURCOUNT")=2 Then
Call ApprovalFunction_CreateNewDR("MasterFile","Issuer Documenta
tion","Issuer",Environment.value("ISSUERNAME"),"Approved","Approved","Pending Ap
proval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step55 to 60Approve the is
suer documentation","The issuer documentation is approved as required"
Else
Reporter.ReportEvent micFail,"Step 55 to 60 : Approve th
e issuer documentation","The issuer documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
Else
Reporter.ReportEvent micPass,"Step55 to 60 : Approve the issuer
documentation","The issuer documentation already is approved"
End if
'Call logoutfromApp("MasterFile","Depositary Receipt Division's")
'Step 61 to 66
Environment.Value("TestCase_Log")="True"
'Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogi
n"))
'Call login("MasterFile","Login Page","Approver","MFLogin")
Call ApprovalFunction_CreateNewDR("MasterFile","DR Profile","Name",Envir
onment.Value("DRNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step61 to 66: Approve and Batch th
e DR profile","The DR profile gets approved and batched successfully"
Else
Reporter.ReportEvent micFail,"Step61 to 66: Approve and Batch th
e DR Profile","The DR Profile gets approved and batched successfully"
Environment.Value("TestCase_Log")="True"
End If
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
'Step67 to 75
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Relationship Management","MFLogin"
)
Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","D
R"))
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
Call DRSearchCriteria("MasterFile","Profile - DR Search")
Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
OriginOfDR=Browser("MasterFile").Page("DR Profile").WebEdit("DROrigin").
GetROProperty("value")
StatusOfDR=Browser("MasterFile").Page("DR Profile").WebList("Status").Ge
tROProperty("value")
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If StatusOfDR="Effective" And OriginOfDR="New Program" And Environment.V
alue("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step67 to 74: Check whether the DR
has been made effective or not","The DR Has been made effective successfully"
Else
Reporter.ReportEvent micFail,"Step 67 to 74: Check whether the D
R has been made effective or not","The DR has not been made effective"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If

'Step 75
Browser("MasterFile").Page("DR Profile").WebElement("CUSIP Summary/Add")
.Click
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step75: Go to CUSIP Summary tab an
d look for Flag","The Flags are absent as required"
Else
Reporter.ReportEvent micFail,"Step75: Go to CUSIP Summary tab an
d look for Flag ","The flag is still present"
Environment.Value("TestCase_Log")="True"
End If

Call select_Menu("MasterFile","DR Profile","Home;DR Home")


End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Public Function MFProfileDR_TC2()
Environment.Value("TestCase_Log")="True"
Environment.Value("CUSIP_NAME")=""
Environment.Value("DRNAME")=""
Environment.Value("ISSUERNAME")=""
'Step1
'Log into the ADR home page
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL",
"MFLogin"))
Call pageCheck_WebEdit("MasterFile","Login Page","username;j_pas
sword","")
Call pageCheck_WebButton("MasterFile","Login Page","Login","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is Dispalyed successfully with th
e Required Field"
Else
Reporter.ReportEvent micFail,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is NOT Dispalyed successfully wit
h the Required Field"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Calling the login function
Call login("MasterFile","Login Page","Relationship Management","
MFLogin")
' Check the MasterFile Application for the 4 links, User Name an
d the last Login Details
Call chkADRHomePage("MasterFile","Depositary Receipt Division's"
,DataTable.Value("HomePageLinks","HomePageVerification"),DataTable.Value("UserFu
llName","MFLogin" ))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass," Verifying the DR Home Pag
e","The DR Home Page is displayed successfully with Home Page Links and the User
Details"
Else
Reporter.ReportEvent micFail," Verifying the DR Home Pag
e","The DR Home Page is NOT displayed successfully with Home Page Links and the
User Details"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step2
'Click on the masterFile button
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
Call chkMFCAHomePage("MasterFile","MasterFile",DataTable.Value("
MenuName","HomePageVerification"),DataTable.Value("UserFullName","MFLogin" ))
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is disaplyed successfully with the required Menu Ite
ms and also displays the Current Version"
Else
Reporter.ReportEvent micFail,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is NOT displayed successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step3
'Click on the Profile Link
Call check_Menu("MasterFile","MasterFile","Profile")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is Present in the Pr
ofile Menu"
Else
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is NOT Present in th
e Profile Menu"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step4
'Click on the DR Link
Call Select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","DR"))
Call pageCheck_WebEditOR("MasterFile","Profile - DR Search","Iss
uerName;DRName")
Call pageCheck_WebListOR("MasterFile","Profile - DR Search","Cou
ntryOfManagement;DrOrigin;DRType;DRExchange;SorU;Status;SubStatus")
'Call pageCheck_WebElementinTable("MasterFile","Profile - DR Sea
rch","Name;Country of Management;Type;Status;Sub-Status;S/U;Effective Date;Termi
nation Date;Depository;Origin;Structure","")
intRC = Browser("MasterFile").Page("Profile - DR Search").WebTab
le("DR Search Results").RowCount
If intRC <3 Then
Reporter.ReportEvent micPass,"Verifying the Number of Ro
ws before entering the Search Criteria","There are No Results displayed"
Environment.Value("TestCase_Log")="True"
Else
Reporter.ReportEvent micFail,"Verifying the Number of Ro
ws before entering the Search Criteria","There are few Results displayed"
Call captureScreenshot()
Environment.Value("Execution_Log") = "False"
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 4 : Verifying the Fi
elds present in the Page Profile DR Search","The Required Fields are dispalyed"
Else
Reporter.ReportEvent micFail, "Step 4 : Verifying the Fi
elds present in the Page Profile DR Search","The Required Fields are NOT Present
"
Environment.Value("TestCase_Log") = "True"
End If
'Step5
'Selecting a Search criteria
Call DRSearchCriteria("MasterFile","Profile - DR Search")
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass, "Step 5 :Click on search with all
default values","The Required Results are displayed"
Else
Reporter.ReportEvent micFail, "Step 5 :Click on search with all
default values","The required search results do not appear"
Environment.Value("TestCase_Log") = "True"
End If
'Step6 to 25
Call CreateNewDR("MasterFile","Profile - DR Search","DR Profile","CUSIP
Profile","","DR")
If Environment.Value("Failure")="True" Then
Call select_Menu("MasterFile","Profile - DR Search","Hom
e;DR Home")
Exit Function
End If
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step6 to 25:Create a New DR and At
tach a CUSIP to it","The New DR with name as "& Environment.Value("DRNAME") &" a
nd CUSIP:"& Ucase(Environment.Value("CUSIP_NAME")) &" is created successfully o
n saving which we get a Yellow Flag"
Else
Reporter.ReportEvent micFail,"Step6 to 25 :Create a New DR and a
ttach a CUSIP to it","The New DR is not created successfully"
Environment.Value("TestCase_Log")="True"
End If

'Step26
Call click_WebElement("MasterFile","DR Profile","Offerings")
If Browser("MasterFile").Page("DR Profile").WebTable("Offerings").Exist(
2) Then
Reporter.ReportEvent micPass,"Step26: Check for the offerings ta
b","The details in the offering tab is as required"
Else
Reporter.ReportEvent micFail,"Step26: Check for the offerings ta
b","The Details in the offerings tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

'Step27
Call click_WebElement("MasterFile","DR Profile","Additional DR Exchanges
")
If Browser("MasterFile").Page("DR Profile").WebTable("Additional DR Exch
ange").Exist(2) Then
Reporter.ReportEvent micPass,"Step27: Check whether the Addition
al DR exchange Tab is as required","The Additional DR Exchanges Tab is as Requir
ed"
Else
Reporter.ReportEvent micFail,"Step27: Check whether the Addition
al exchange Tab is as required","The Additional DR exchanges tab is not present"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
' Call click_WebButton("MasterFile","DR Profile","Add_DRExchange")
' Call click_Image("MasterFile","DR Profile","ExchangeInfo")
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","WebEdit","searchString",dataTable.Value("DRExchangeForCUSIP","D
R"))
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","Image","Go","")
' Call SelectValueInsideFrame("MasterFile","DR Profile","lookupFra
me",dataTable.Value("DREXchangeForCUSIP","DR"))
' Call set_WebEdit_Value("MasterFile","DR Profile","SEDOL",SEDOL)
' Call set_WebEdit_Value("MasterFile","DR Profile","Ticker")
' Call click_Image("MasterFile","DR Profile","Save")
' If Environment.Value("TestCase_Log")=true Then
' Reporter.ReportEvent micPass,"Step22:Fill in the Additio
nal DR Exchanges Tab","The Additional DR exchanges tab gets filled"
' Else
' Reporter.ReportEvent micFail,"Step22: Fill in the Additi
onal DR exchanges tab","The additional DR Exchange tab is not filled as required
"
' Environment.Value("TestCase_Log")=true
' End If
''Step28
' Call click_WebElement("MasterFile","DR Profile","Other DR Services")
' If Browser("MasterFile").Page("DR Profile").WebTable("Other DR Services"
).Exist(2) Then
' Reporter.ReportEvent micPass,"Step28: Check whether the Addition
al DR exchange Tab is as required","The Additional DR Exchanges Tab is as Requir
ed"
' Else
' Reporter.ReportEvent micFail,"Step28: Check whether the Addition
al exchange Tab is as required","The Additional DR exchanges tab is not present"
' End If

If (dataTable.Value("Type","DR") <> "144A" Or datatable.Value("Type","D


R") <> "RegS") And DataTable.Value("DepositoryName","DR") ="BNY" Then
Call click_WebElement("MasterFile","DR Profile","SEC Filing")
Call set_WebEdit_Value("MasterFile","DR Profile","CurrentF6ADS",dataTabl
e.Value("CurrentF6ADS","DR"))

Call set_WebEdit_Value("MasterFile","DR Profile","CurF6Number",dataTable


.Value("CurF6Number","DR"))
Wait(2)
If DataTable.Value("F6FileDate","DR") <> "" Then
strDataTableValue = DataTable.Value("F6FileDate"
,"DR")
strValue = Split(strDataTableValue,";",-1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image("MasterFile","DR Profile","Show
Calendar_F6FileDate")
Call ClickIcon_SetDate("MasterFile","DR Profile"
,strMonthValue,strYearValue,strDateValue)
End If

Call click_Image("MasterFile","DR Profile","Save")


End If
Call click_WebElement("MasterFile","DR Profile","Detail")
Call Select_Combo_Value("MasterFile","DR Profile","Status","Effective")
Call click_Image("MasterFile","DR Profile","Save")
Wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("Cancel").Click
End If

'Step29
Call ClickonDRName("MasterFile","DR Profile",DataTable.Value("IssuerName
","DR"),"2")
wait(2)
'Step30
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("Cancel").Click
End If
'Step31
If Browser("MasterFile").Page("Issuer Profile").Exist(2) Then
Reporter.ReportEvent micPass," Check whether the Issuer profile
link is available and works as required","The Issuer profile link is available a
nd works as required"
Else
Reporter.ReportEvent micFail," Check whether the Issuer profile
link is available and works as required","The Issuer profile link is not availab
le"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step31
Environment.Value("TestCase_Log")="True"
If Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Ex
ist(2) and Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerDocume
ntation").Exist(2)Then
Reporter.ReportEvent micPass,"Step31: Check whether the issuer p
rofile screen has been loaded or not","The issuer profile screen has been loaded
as required"
Else
Reporter.ReportEvent micFail,"Step31: Check whether the issuer p
rofile screen has been loaded or not","The issuer profile screen has not been lo
aded"
Environment.Value("TestCase_Log")="True"
End If
'Step32
Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Details")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step32: Check whether the required
fields are present in the issuer profile screen detail tab","The required field
s are present as required"
Else
Reporter.ReportEvent micFail,"Step32: Check whether the required
fields are present in the issuer profile screen detail tab","The required field
s are not present"
Environment.Value("TestCase_Log")="True"
End If
'Step33
'Checking for the BNY contact tab
Browser("MasterFile").Page("Issuer Profile").WebElement("BNY Contacts").
Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","BNY Contact
s")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("BNY Contacts").Exist(2) Then
Reporter.ReportEvent micPass,"Step33: Check for the details in t
he BNY contacts tab","The details under the BNY contact tab is as required"
Else
Reporter.ReportEvent micFail,"Step33: Check for the details in t
he BNY contacts tab","The details under the BNY contact tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step34
'Checking for the Underlying security markets tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Und. Sec. Marke
ts").Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Und. Sec. M
arkets")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Underlying Security Market").Exist(2) Then
Reporter.ReportEvent micPass,"Step34: Check for the Underlying E
vent Tab","The underlying event tab is as required"
Else
Reporter.ReportEvent micFail,"Step34: Check for the underlying E
vent tab","The details under the underlying event tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step35
'Checking for the Custodian Tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Custodians").Cl
ick
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Custodians"
)
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Issuers Preferred Custodian").Exist(2)Then
Reporter.ReportEvent micPass,"Step35: Check for the Issuer preff
ered tab","The details in the Issuer preffered tab is as required"
Else
Reporter.ReportEvent micFail,"Step35: Check for the issuer preff
ered tab","The details in the issuer preffered is not present as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step36
'Checking for the Advisors tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Advisers").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Advisers")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Issuers Advisers").Exist(2)Then
Reporter.ReportEvent micPass,"Step36: Check for the Advisors tab
","The advisers tab details are as required"
Else
Reporter.ReportEvent micFail,"Step36: Check for the Advisors Tab
","The advisors tab details are as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step37
'Checking for the Products tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Products").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Products")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Products").Exist(2)Then
Reporter.ReportEvent micPass,"Step37: Check for the presence of
the products web table","The products web table is present as required"
Else
Reporter.ReportEvent micFail,"Step37: Check for the presence of
the products web table","The products web table is not present as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If

'Step38
'Checking for the DR services tab
Browser("MasterFile").Page("Issuer Profile").WebElement("DR Services").C
lick
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","DR Services
")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("DR Services").Exist(2) Then
Reporter.ReportEvent micPass,"Step38: Check for the presence of
the DR Services web table","The DR services web table is present as required"
Else
Reporter.ReportEvent micFail,"Step38: Check for the presence of
the DR Services web table","The DR Services web table is not present as required
"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step39
'Checking for the Comments tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Comments").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Comments")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Comments").Exist(2) Then
Reporter.ReportEvent micPass,"Step39: Check for the presence of
the comments table","The comments table is present as required"
Else
Reporter.ReportEvent micFail,"Step39: Check for the presence of
the comments table","The comments table is not present"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
Call click_WebElement("MasterFile","Issuer Profile","Detail")
Environment.Value("ISSUERNAME")=trim(get_WebEdit_Value("MasterFile","Iss
uer Profile","Name"))
If Environment.Value("TCCURCOUNT")=1 Then
Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerD
ocumentation").Click
Call Fill_Issuer_Documentation("MasterFile","Issuer Documentatio
n","DR")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Fill in the issuer Documen
tation and click on save","The Issuer documentation is done and saved"
Else
Reporter.ReportEvent micFail,"Fill in the Issuer Documen
tation and click on save","The Issuer documentation is not filled properly"
Environment.Value("TestCase_Log")="True"
End If
End If
'Call ClickonDRName("MasterFile","Issuer Documentation",ISSUERNAME,"2")
Call logoutfromApp("MasterFile","Issuer Profile")
'Step40
Reporter.ReportEvent micDone,"Step40:Set the DR as effective","The DR has alread
y been set as effective"
'Step 41
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Approver","MFLogin")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step41: Log into application using
Approver ID","We have successfully logged in as an approver"
Else
Reporter.ReportEvent micFail,"Step41: Log into the application u
sing Approver ID ","We have not successfully logged in as an approver"
Environment.Value("TestCase_Log")="True"
End If
'Step42 to 49
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","CUSIP Profile","CUSIP",E
nvironment.Value("CUSIP_NAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step42 to 49:Approve the CUSIP det
ails","The CUSIP details are approved as required"
Else
Reporter.ReportEvent micFail,"Step42 to 49: Approve the CUSIP de
tails","The CUSIP details are not approved as required"
Environment.Value("TestCase_Log")="True"
End If
Environment.Value("TestCase_Log")="True"
If Environment.Value("TCCURCOUNT")=1 Then
Call ApprovalFunction_CreateNewDR("MasterFile","Issuer Documenta
tion","Issuer",Environment.value("ISSUERNAME"),"Approved","Approved","Pending Ap
proval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step50 to 55Approv
e the issuer documentation","The issuer documentation is approved as required"
Else
Reporter.ReportEvent micFail," Step50 to 55: Approve the
issuer documentation","The issuer documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
Else
Reporter.ReportEvent micPass," : Step50 to 55: Approve the issue
r documentation","The issuer documentation already is approved"
End if
Call ApprovalFunction_CreateNewDR("MasterFile","DR Profile","Name",Environment.V
alue("DRNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step56 to 60: Approve and Batch th
e DR profile","The DR profile gets approved and batched successfully"
Else
Reporter.ReportEvent micFail,"Step56 to 60: Approve and Batch th
e DR Profile","The DR Profile gets approved and batched successfully"
Environment.Value("TestCase_Log")="True"
End If

'Step61
Call logoutfromApp("MasterFile","Issuer Documentation")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step61:Logout from the approver ID
","The Approver logs out successfully"
Else
Reporter.ReportEvent micFail,"Step61: Logout from the approver I
D","The approver does not log out successfully"
Environment.Value("TestCase_Log")="True"
End If
Wait(3)
'Step61 to 69
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Relationship Management","MFLogin"
)
Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","D
R"))
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
Call DRSearchCriteria("MasterFile","Profile - DR Search")
Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
OriginOfDR=Browser("MasterFile").Page("DR Profile").WebEdit("DROrigin").
GetROProperty("value")
StatusOfDR=Browser("MasterFile").Page("DR Profile").WebList("Status").Ge
tROProperty("value")
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If StatusOfDR="Effective" and OriginOfDR="New Program" and Environment.V
alue("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step61 to 69: Check whether the DR
has been made effective or not","The DR Has been made effective successfully"
Else
Reporter.ReportEvent micFail,"Step61 to 69: Check whether the DR
has been made effective or not","The DR has not been made effective"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step 70
Browser("MasterFile").Page("DR Profile").WebElement("CUSIP Summary/Add")
.Click
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step70: Go to CUSIP Summary tab an
d look for Flag","The Flags are absent as required"
Else
Reporter.ReportEvent micFail,"Step70: Go to CUSIP Summary tab an
d look for Flag ","The flag is still present"
Environment.Value("TestCase_Log")="True"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Public Function MFProfileDR_TC3()
Environment.Value("TestCase_Log")="True"
Environment.Value("CUSIP_NAME")=""
Environment.Value("DRNAME")=""
Environment.Value("ISSUERNAME")=""
'Step1
'Log into the ADR home page
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL",
"MFLogin"))
Call pageCheck_WebEdit("MasterFile","Login Page","username;j_pas
sword","")
Call pageCheck_WebButton("MasterFile","Login Page","Login","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is Dispalyed successfully with th
e Required Field"
Else
Reporter.ReportEvent micFail,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is NOT Dispalyed successfully wit
h the Required Field"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Calling the login function
Call login("MasterFile","Login Page","Relationship Management","
MFLogin")
' Check the MasterFile Application for the 4 links, User Name an
d the last Login Details
Call chkADRHomePage("MasterFile","Depositary Receipt Division's"
,DataTable.Value("HomePageLinks","HomePageVerification"),DataTable.Value("UserFu
llName","MFLogin" ))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass," Verifying the DR Home Pag
e","The DR Home Page is displayed successfully with Home Page Links and the User
Details"
Else
Reporter.ReportEvent micFail," Verifying the DR Home Pag
e","The DR Home Page is NOT displayed successfully with Home Page Links and the
User Details"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
' Check the MasterFile Application for the 4 links, User Name and the last Login
Details

'Step2
'Click on the masterFile button
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
Call chkMFCAHomePage("MasterFile","MasterFile",DataTable.Value("
MenuName","HomePageVerification"),DataTable.Value("UserFullName","MFLogin" ))
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is disaplyed successfully with the required Menu Ite
ms and also displays the Current Version"
Else
Reporter.ReportEvent micFail,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is NOT displayed successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step3
'Click on the Profile Link
Call check_Menu("MasterFile","MasterFile","Profile")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is Present in the Pr
ofile Menu"
Else
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is NOT Present in th
e Profile Menu"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step4
'Click on the DR Link
Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","DR"))
Call pageCheck_WebEditOR("MasterFile","Profile - DR Search","Iss
uerName;DRName")
Call pageCheck_WebListOR("MasterFile","Profile - DR Search","Cou
ntryOfManagement;DrOrigin;DRType;DRExchange;SorU;Status;SubStatus")
'Call pageCheck_WebElementinTable("MasterFile","Profile - DR Sea
rch","Name;Country of Management;Type;Status;Sub-Status;S/U;Effective Date;Termi
nation Date;Depository;Origin;Structure","")
intRC = Browser("MasterFile").Page("Profile - DR Search").WebTab
le("DR Search Results").RowCount
If intRC <3 Then
Reporter.ReportEvent micPass,"Verifying the Number of Ro
ws before entering the Search Criteria","There are No Results displayed"
Environment.Value("TestCase_Log")="True"
Else
Reporter.ReportEvent micFail,"Verifying the Number of Ro
ws before entering the Search Criteria","There are few Results displayed"
Call captureScreenshot()
Environment.Value("Execution_Log") = "False"
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 4 : Verifying the Fi
elds present in the Page Profile CUSIP Search","The Required Fields are dispalye
d"
Else
Reporter.ReportEvent micFail, "Step 4 : Verifying the Fi
elds present in the Page Profile CUSIP Search","The Required Fields are NOT Pres
ent"
Environment.Value("TestCase_Log") = "True"
End If
'Step5
'Selecting a Search criteria
Call DRSearchCriteria("MasterFile","Profile - DR Search")
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass, "Step 5 :Click on search with all
default values","The Required Results are displayed"
Else
Reporter.ReportEvent micFail, "Step 5 :Click on search with all
default values","The required search results do not appear"
Environment.Value("TestCase_Log") = "True"
End If
'Step6 to 18
Call CreateNewDR("MasterFile","Profile - DR Search","DR Profile","CUSIP
Profile","","DR")
If Environment.Value("Failure")="True" Then
Call select_Menu("MasterFile","Profile - DR Search","Hom
e;DR Home")
Exit Function
End If
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step6 to 18:Create a New DR and At
tach a CUSIP to it","The New DR with name as "& Environment.Value("DRNAME") &" a
nd CUSIP:"& Ucase(Environment.Value("CUSIP_NAME")) &" is created successfully o
n saving which we get a Yellow Flag"
Else
Reporter.ReportEvent micFail,"Step6 to 18 :Create a New DR and a
ttach a CUSIP to it","The New DR is not created successfully"
Environment.Value("TestCase_Log")="True"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

'Step
Call click_WebElement("MasterFile","DR Profile","Offerings")
If Browser("MasterFile").Page("DR Profile").WebTable("Offerings").Exist(
2) Then
Reporter.ReportEvent micPass,"Check for the offerings tab","The
details in the offering tab is as required"
Else
Reporter.ReportEvent micFail,"Check for the offerings tab","The
Details in the offerings tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

''Step19
Call click_WebElement("MasterFile","DR Profile","Additional DR Exchanges
")
If Browser("MasterFile").Page("DR Profile").WebTable("Additional DR Exch
ange").Exist(2) Then
Reporter.ReportEvent micPass,"Step19: Check whether the Addition
al DR exchange Tab is as required","The Additional DR Exchanges Tab is as Requir
ed"
Else
Reporter.ReportEvent micFail,"Step19: Check whether the Addition
al exchange Tab is as required","The Additional DR exchanges tab is not present"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
' Call click_WebButton("MasterFile","DR Profile","Add_DRExchange")
' Call click_Image("MasterFile","DR Profile","ExchangeInfo")
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","WebEdit","searchString",dataTable.Value("DRExchangeForCUSIP","D
R"))
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","Image","Go","")
' Call SelectValueInsideFrame("MasterFile","DR Profile","lookupFra
me",dataTable.Value("DREXchangeForCUSIP","DR"))
' Call set_WebEdit_Value("MasterFile","DR Profile","SEDOL",SEDOL)
' Call set_WebEdit_Value("MasterFile","DR Profile","Ticker")
' Call click_Image("MasterFile","DR Profile","Save")
' If Environment.Value("TestCase_Log")=true Then
' Reporter.ReportEvent micPass,"Step22:Fill in the Additio
nal DR Exchanges Tab","The Additional DR exchanges tab gets filled"
' Else
' Reporter.ReportEvent micFail,"Step22: Fill in the Additi
onal DR exchanges tab","The additional DR Exchange tab is not filled as required
"
' Environment.Value("TestCase_Log")=true
' End If
'Step23 and 24
'Call click_WebElement("MasterFile","DR Profile","Other DR Services")
'If Browser("MasterFile").Page("DR Profile").WebTable("Other DR Services
").Exist(2) Then
' Reporter.ReportEvent micPass,"Step23 and 24: Check whether the A
dditional DR exchange Tab is as required","The Additional DR Exchanges Tab is as
Required"
'Else
' Reporter.ReportEvent micFail,"Step23 and 24: Check whether the A
dditional exchange Tab is as required","The Additional DR exchanges tab is not p
resent"
'End If

'Step20

If Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation"
).Exist(2) Then
Reporter.ReportEvent micPass,"Step20: Check whether the DR Docum
entation link is present or not","The DR Documentation link is present as requir
ed"
Else
Reporter.ReportEvent micFail,"Step20: Check whether the DR Docum
entation link is present or not","The DR Documentation link is not present as re
quired"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

'Step21
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation").c
lick
If Browser("MasterFile").Page("DR Documentation Detail").Exist(2) Then
Reporter.ReportEvent micPass,"Step21: Click on the DR Documentat
ion link","The DR Documentation link is clicked as required"
Else
Reporter.ReportEvent micFail,"Step21: Click on the DR Documentat
ion link","The DR Documentation link is not clicked"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step22 to 24
'Filling in the DR documentation
Call Fill_DR_Documentation("MasterFile","DR Documentation Detail")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step22 to 24: Fill the DR Document
ation and click on save","The DR documentation is done and saved andDR link is a
lso clicked"
Else
Reporter.ReportEvent micFail,"Step22 to 24: Fill the DR Document
ation and click on save","The DR documentation is not done properly"
Environment.Value("TestCase_Log")="True"
End If
Call click_WebElement("MasterFile","DR Profile","Detail")

If (dataTable.Value("Type","DR") <> "144A" And datatable.Value("Type","DR")


<> "RegS") And DataTable.Value("DepositoryName","DR") ="BNY" Then
Call click_WebElement("MasterFile","DR Profile","SEC Filing")
Call set_WebEdit_Value("MasterFile","DR Profile","CurrentF6ADS",
dataTable.Value("CurrentF6ADS","DR"))
Call set_WebEdit_Value("MasterFile","DR Profile","CurF6Number",d
ataTable.Value("CurF6Number","DR"))
Wait(2)
If DataTable.Value("F6FileDate","DR") <> "" Then
strDataTableValue = DataTable.Value("F6FileDate"
,"DR")
strValue = Split(strDataTableValue,";",-1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image("MasterFile","DR Profile","Show
Calendar_F6FileDate")
Call ClickIcon_SetDate("MasterFile","DR Profile"
,strMonthValue,strYearValue,strDateValue)
End If

Call click_Image("MasterFile","DR Profile","Save")


End If
Call click_WebElement("MasterFile","DR Profile","Detail")
Call Select_Combo_Value("MasterFile","DR Profile","Status","Effective")
Call click_Image("MasterFile","DR Profile","Save")
Wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If

If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)


Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
Call ClickonDRName("MasterFile","DR Profile",DataTable.Value("IssuerName
","DR"),"2")
Reporter.ReportEvent micDone,"Check whether the Issuer name has
been clicked or not","The Issuer name has been clicked as required"
Wait(4)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
'Step26
If Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Exist(
2) and Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerDocumentat
ion").Exist(2)Then
Reporter.ReportEvent micPass,"Step26: Check whether the issuer p
rofile screen has been loaded or not","The issuer profile screen has been loaded
as required"
Else
Reporter.ReportEvent micFail,"Step26: Check whether the issuer p
rofile screen has been loaded or not","The issuer profile screen has not been lo
aded"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step27
Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Details")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step27: Check whether the required
fields are present in the issuer profile screen detail tab","The required field
s are present as required"
Else
Reporter.ReportEvent micFail,"Step27: Check whether the required
fields are present in the issuer profile screen detail tab","The required field
s are not present"
Environment.Value("TestCase_Log")="True"
End If
'Step28
'Checking for the BNY contact tab
Browser("MasterFile").Page("Issuer Profile").WebElement("BNY Contacts").
Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","BNY Contact
s")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("BNY Contacts").Exist(2) Then
Reporter.ReportEvent micPass,"Step28: Check for the details in t
he BNY contacts tab","The details under the BNY contact tab is as required"
Else
Reporter.ReportEvent micFail,"Step28: Check for the details in t
he BNY contacts tab","The details under the BNY contact tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step29
'Checking for the Underlying security markets tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Und. Sec. Marke
ts").Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Und. Sec. M
arkets")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Underlying Security Market").Exist(2) Then
Reporter.ReportEvent micPass,"Step29: Check for the Underlying E
vent Tab","The underlying event tab is as required"
Else
Reporter.ReportEvent micFail,"Step29: Check for the underlying E
vent tab","The details under the underlying event tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step30
'Checking for the Custodian Tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Custodians").Cl
ick
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Custodians"
)
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Issuers Preferred Custodian").Exist(2)Then
Reporter.ReportEvent micPass,"Step30: Check for the Issuer preff
ered tab","The details in the Issuer preffered tab is as required"
Else
Reporter.ReportEvent micFail,"Step30: Check for the issuer preff
ered tab","The details in the issuer preffered is not present as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step31
'Checking for the Advisors tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Advisers").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Advisers")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Issuers Advisers").Exist(2)Then
Reporter.ReportEvent micPass,"Step31: Check for the Advisors tab
","The advisers tab details are as required"
Else
Reporter.ReportEvent micFail,"Step31: Check for the Advisors Tab
","The advisors tab details are as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step32
'Checking for the Products tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Products").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Products")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Products").Exist(2)Then
Reporter.ReportEvent micPass,"Step32: Check for the presence of
the products web table","The products web table is present as required"
Else
Reporter.ReportEvent micFail,"Step32: Check for the presence of
the products web table","The products web table is not present as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If

'Step33
'Checking for the DR services tab
Browser("MasterFile").Page("Issuer Profile").WebElement("DR Services").C
lick
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","DR Services
")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("DR Services").Exist(2) Then
Reporter.ReportEvent micPass,"Step33: Check for the presence of
the DR Services web table","The DR services web table is present as required"
Else
Reporter.ReportEvent micFail,"Step33: Check for the presence of
the DR Services web table","The DR Services web table is not present as required
"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step34
'Checking for the Comments tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Comments").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Comments")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Comments").Exist(2) Then
Reporter.ReportEvent micPass,"Step34: Check for the presence of
the comments table","The comments table is present as required"
Else
Reporter.ReportEvent micFail,"Step34: Check for the presence of
the comments table","The comments table is not present"
Environment.Value("Execution_Log")="False"
Call captureScreenshot()
Environment.Value("TestCase_Log")="True"
End If
Call click_WebElement("MasterFile","Issuer Profile","Detail")
Environment.Value("ISSUERNAME")=trim(get_WebEdit_Value("MasterFile","Iss
uer Profile","Name"))
If Environment.Value("TCCURCOUNT")=1 Then
Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerD
ocumentation").Click
Call Fill_Issuer_Documentation("MasterFile","Issuer Documentatio
n","DR")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Fill in the issuer Documen
tation and click on save","The Issuer documentation is done and saved"
Else
Reporter.ReportEvent micFail,"Fill in the Issuer Documen
tation and click on save","The Issuer documentation is not filled properly"
Environment.Value("TestCase_Log")="True"
End If
End If
'Call ClickonDRName("MasterFile","Issuer Documentation",ISSUERNAME,"2")
Call logoutfromApp("MasterFile","Issuer Profile")
'Step 36
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Approver","MFLogin")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step36: Log into application using
Approver ID","We have successfully logged in as an approver"
Else
Reporter.ReportEvent micFail,"Step36: Log into the application u
sing Approver ID ","We have not successfully logged in as an approver"
Environment.Value("TestCase_Log")="True"
End If
'Step37 to 44
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","CUSIP Profile","CUSIP",E
nvironment.Value("CUSIP_NAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step37 to 44:Approve the CUSIP det
ails","The CUSIP details are approved as required"
Else
Reporter.ReportEvent micFail,"Step37 to 44: Approve the CUSIP de
tails","The CUSIP details are not approved as required"
Environment.Value("TestCase_Log")="True"
End If

'Step45 to 49
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","DR Documentation","DR Na
me",Environment.Value("DRNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step45to 49: Approve the DR Docume
ntation","The DR Documentation is filled in correctly as required"
Else
Reporter.ReportEvent micFail,"Step45 to 49: Approve the DR Docum
entation","The DR Documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
'Step 50 to 55
Environment.Value("TestCase_Log")="True"
If Environment.Value("TCCURCOUNT")=1 Then
Call ApprovalFunction_CreateNewDR("MasterFile","Issuer Documenta
tion","Issuer",Environment.value("ISSUERNAME"),"Approved","Approved","Pending Ap
proval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step50 to 55: Approve the
issuer documentation","The issuer documentation is approved as required"
Else
Reporter.ReportEvent micFail,"Step 50 to 55 : Approve th
e issuer documentation","The issuer documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
Else
Reporter.ReportEvent micPass,"Step50 to 55 : Approve the issuer
documentation","The issuer documentation already is approved"
End if

'Step 56 to 60
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","DR Profile","Name",Environme
nt.Value("DRNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step56 to 60: Approve and Batch th
e DR profile","The DR profile gets approved and batched successfully"
Else
Reporter.ReportEvent micFail,"Step56 to 60: Approve and Batch th
e DR Profile","The DR Profile gets approved and batched successfully"
Environment.Value("TestCase_Log")="True"
End If
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
Reporter.ReportEvent micDone,"Click on the log out button","The approv
er logs out"
'Step62 to 69
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Relationship Management","MFLogin"
)
Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","D
R"))
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
Call DRSearchCriteria("MasterFile","Profile - DR Search")
Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
OriginOfDR=Browser("MasterFile").Page("DR Profile").WebEdit("DROrigin").
GetROProperty("value")
StatusOfDR=Browser("MasterFile").Page("DR Profile").WebList("Status").Ge
tROProperty("value")
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If StatusOfDR="Effective" and OriginOfDR="New Program" and Environment.V
alue("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step62 to 69: Check whether the DR
has been made effective or not","The DR Has been made effective successfully"
Else
Reporter.ReportEvent micFail,"Step 62 to 69: Check whether the D
R has been made effective or not","The DR has not been made effective"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step 70
Browser("MasterFile").Page("DR Profile").WebElement("CUSIP Summary/Add")
.Click
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step70: Go to CUSIP Summary tab an
d look for Flag","The Flags are absent as required"
Else
Reporter.ReportEvent micFail,"Step70: Go to CUSIP Summary tab an
d look for Flag ","The flag is still present"
Environment.Value("TestCase_Log")="True"
End If

Call select_Menu("MasterFile","DR Profile","Home;DR Home")


End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
Public Function MFProfileDR_TC4()
Environment.Value("TestCase_Log")="True"
Environment.Value("CUSIP_NAME")=""
Environment.Value("DRNAME")=""
Environment.Value("ISSUERNAME")=""
'Step1
'Log into the ADR home page
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL",
"MFLogin"))
Call pageCheck_WebEdit("MasterFile","Login Page","username;j_pas
sword","")
Call pageCheck_WebButton("MasterFile","Login Page","Login","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is Dispalyed successfully with th
e Required Field"
Else
Reporter.ReportEvent micFail,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is NOT Dispalyed successfully wit
h the Required Field"
Environment.Value("TestCase_Log") = "True"
End If
'Calling the login function
Call login("MasterFile","Login Page","Relationship Management","
MFLogin")
' Check the MasterFile Application for the 4 links, User Name an
d the last Login Details
Call chkADRHomePage("MasterFile","Depositary Receipt Division's"
,DataTable.Value("HomePageLinks","HomePageVerification"),DataTable.Value("UserFu
llName","MFLogin" ))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass," Verifying the DR Home Pag
e","The DR Home Page is displayed successfully with Home Page Links and the User
Details"
Else
Reporter.ReportEvent micFail," Verifying the DR Home Pag
e","The DR Home Page is NOT displayed successfully with Home Page Links and the
User Details"
Environment.Value("TestCase_Log") = "True"
End If
'Step2
'Click on the masterFile button
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
Call chkMFCAHomePage("MasterFile","MasterFile",DataTable.Value("
MenuName","HomePageVerification"),DataTable.Value("UserFullName","MFLogin" ))
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is disaplyed successfully with the required Menu Ite
ms and also displays the Current Version"
Else
Reporter.ReportEvent micFail,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is NOT displayed successfully"
Environment.Value("TestCase_Log") = "True"
End If

'Step3
'Click on the Profile Link
Call check_Menu("MasterFile","MasterFile","Profile")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is Present in the Pr
ofile Menu"
Else
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is NOT Present in th
e Profile Menu"
Environment.Value("TestCase_Log") = "True"
End If

'Step4
'Click on the DR Link
Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","DR"))
Call pageCheck_WebEditOR("MasterFile","Profile - DR Search","Iss
uerName;DRName")
Call pageCheck_WebListOR("MasterFile","Profile - DR Search","Cou
ntryOfManagement;DrOrigin;DRType;DRExchange;SorU;Status;SubStatus")
'Call pageCheck_WebElementinTable("MasterFile","Profile - DR Sea
rch","Name;Country of Management;Type;Status;Sub-Status;S/U;Effective Date;Termi
nation Date;Depository;Origin;Structure","")
intRC = Browser("MasterFile").Page("Profile - DR Search").WebTab
le("DR Search Results").RowCount
If intRC <3 Then
Reporter.ReportEvent micPass,"Verifying the Number of Ro
ws before entering the Search Criteria","There are No Results displayed"
Environment.Value("TestCase_Log")="True"
Else
Reporter.ReportEvent micFail,"Verifying the Number of Ro
ws before entering the Search Criteria","There are few Results displayed"
Call captureScreenshot()
Environment.Value("Execution_Log") = "False"
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 4 : Verifying the Fi
elds present in the Page Profile CUSIP Search","The Required Fields are dispalye
d"
Else
Reporter.ReportEvent micFail, "Step 4 : Verifying the Fi
elds present in the Page Profile CUSIP Search","The Required Fields are NOT Pres
ent"
Environment.Value("TestCase_Log") = "True"
End If
'Step5
'Selecting a Search criteria
Call DRSearchCriteria("MasterFile","Profile - DR Search")
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass, "Step 5 :Click on search w
ith all default values","The Required Results are displayed"
Else
Reporter.ReportEvent micFail, "Step 5 :Click on search w
ith all default values","The required search results do not appear"
Environment.Value("TestCase_Log") = "True"
End If
'Step6 to 20
Call CreateNewDR("MasterFile","Profile - DR Search","DR Profile"
,"CUSIP Profile","","DR")
If Environment.Value("Failure")="True" Then
Call select_Menu("MasterFile","Profile - DR Search","Hom
e;DR Home")
Exit Function
End If
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step6 to 20:Create a New D
R and Attach a CUSIP to it","The New DR with name as "& Environment.Value("DRNAM
E") &" and CUSIP:"& Ucase(Environment.Value("CUSIP_NAME")) &" is created succes
sfully on saving which we get a Yellow Flag"
Else
Reporter.ReportEvent micFail,"Step6 to 20 :Create a New
DR and attach a CUSIP to it","The New DR is not created successfully"
Environment.Value("TestCase_Log")="True"
End If

'Step21
Call click_WebElement("MasterFile","DR Profile","Offerings")
Call click_WebButton("MasterFile","DR Profile","Add_Offering")
If dataTable.Value("Type","DR")="Level I" Then
If Browser("MasterFile").Page("Offering Detail").Image("Save").E
xist(4) Then
Reporter.ReportEvent micFail,"Check whether the Level I
DR Offering details can be filled","The offering details for level I DR Can be f
illed"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Else
Reporter.ReportEvent micPass,"Check whether the Level I
DR Offering details can be filled","The offering details for level I DR Cannot
be filled as required"
End If
End If
Wait(4)
Call ClickonDRName("MasterFile","Offering Detail",Environment.Value("DRNAME"
),"2")
Wait(4)
If Browser("MasterFile").Page("DR Profile").WebTable("Offerings"
).Exist(2) Then
Reporter.ReportEvent micPass,"Step21: Check for the offe
rings tab","The details in the offering tab is as required"
Else
Reporter.ReportEvent micFail,"Step21: Check for the offe
rings tab","The Details in the offerings tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

'Step22
Call click_WebElement("MasterFile","DR Profile","Additional DR Exchanges
")
If Browser("MasterFile").Page("DR Profile").WebTable("Additional DR Exch
ange").Exist(2) Then
Reporter.ReportEvent micPass,"Step22: Check whether the Addition
al DR exchange Tab is as required","The Additional DR Exchanges Tab is as Requir
ed"
Else
Reporter.ReportEvent micFail,"Step22: Check whether the Addition
al exchange Tab is as required","The Additional DR exchanges tab is not present"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
' Call click_WebButton("MasterFile","DR Profile","Add_DRExchange")
' Call click_Image("MasterFile","DR Profile","ExchangeInfo")
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","WebEdit","searchString",dataTable.Value("DRExchangeForCUSIP","D
R"))
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","Image","Go","")
' Call SelectValueInsideFrame("MasterFile","DR Profile","lookupFra
me",dataTable.Value("DREXchangeForCUSIP","DR"))
' Call set_WebEdit_Value("MasterFile","DR Profile","SEDOL",SEDOL)
' Call set_WebEdit_Value("MasterFile","DR Profile","Ticker")
' Call click_Image("MasterFile","DR Profile","Save")
' If Environment.Value("TestCase_Log")=true Then
' Reporter.ReportEvent micPass,"Step22:Fill in the Additio
nal DR Exchanges Tab","The Additional DR exchanges tab gets filled"
' Else
' Reporter.ReportEvent micFail,"Step22: Fill in the Additi
onal DR exchanges tab","The additional DR Exchange tab is not filled as required
"
' Environment.Value("TestCase_Log")=true
' End If
'Step23 and 24
Call click_WebElement("MasterFile","DR Profile","Other DR Servic
es")
If Browser("MasterFile").Page("DR Profile").WebTable("Other DR Services"
).Exist(2) Then
Reporter.ReportEvent micPass,"Step 23 and 24: Check whether the
Other DR Services Tab is as required","The Additional DR Exchanges Tab is as Req
uired"
Else
Reporter.ReportEvent micFail,"Step23 and 24: Check whether theOt
her DR Services Tab is as required","The Additional DR exchanges tab is not pres
ent"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step25
If Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation"
).Exist(2) Then
Reporter.ReportEvent micPass,"Step25: Check whether the DR Docum
entation link is present or not","The DR Documentation link is present as requir
ed"
Else
Reporter.ReportEvent micFail,"Step25: Check whether the DR Docum
entation link is present or not","The DR Documentation link is not present as re
quired"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

'Step26
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation").c
lick
If Browser("MasterFile").Page("DR Documentation Detail").Exist(2) Then
Reporter.ReportEvent micPass,"Step26: Click on the DR Documentat
ion link","The DR Documentation link is clicked as required"
Else
Reporter.ReportEvent micFail,"Step26: Click on the DR Documentat
ion link","The DR Documentation link is not clicked"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step27 to 29
'Filling in the DR documentation
Call Fill_DR_Documentation("MasterFile","DR Documentation Detail")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step27 to 29: Fill the DR Document
ation and click on save","The DR documentation is done and saved and we navigate
d to the Issuer profile screen"
Else
Reporter.ReportEvent micFail,"Step27 to 29: Fill the DR Document
ation and click on save","The DR documentation is not done properly"
Environment.Value("TestCase_Log")="True"
End If
Wait(3)
Call click_WebElement("MasterFile","DR Profile","Detail")
If (dataTable.Value("Type","DR") <> "144A" Or datatable.Value("Type","D
R") <> "RegS") And DataTable.Value("DepositoryName","DR") ="BNY" Then
Call click_WebElement("MasterFile","DR Profile","SEC Filing")
Call set_WebEdit_Value("MasterFile","DR Profile","CurrentF6ADS",
dataTable.Value("CurrentF6ADS","DR"))
Call set_WebEdit_Value("MasterFile","DR Profile","CurF6Number",d
ataTable.Value("CurF6Number","DR"))
Wait(2)
If DataTable.Value("DepositoryName","DR")="BNY" And Datatable.Va
lue("Type","DR") <> "144A" And DataTable.Value("Type","DR") <> "Reg. S" Then
If DataTable.Value("F6FileDate","DR") <> "" Then
strDataTableValue = DataTable.Value("F6F
ileDate","DR")
strValue = Split(strDataTableValue,";",-
1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image("MasterFile","DR Profil
e","ShowCalenderF6FileDateBNY")
Call ClickIcon_SetDate("MasterFile","DR
Profile",strMonthValue,strYearValue,strDateValue)
End If
Else
If DataTable.Value("F6FileDate","DR") <> "" Then
strDataTableValue = DataTable.Value("F6F
ileDate","DR")
strValue = Split(strDataTableValue,";",-
1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image("MasterFile","DR Profil
e","ShowCalendar_F6FileDate")
Call ClickIcon_SetDate("MasterFile","DR
Profile",strMonthValue,strYearValue,strDateValue)
End If
End If
Call click_Image("MasterFile","DR Profile","Save")
End If
Call click_WebElement("MasterFile","DR Profile","Detail")
Call Select_Combo_Value("MasterFile","DR Profile","Status","Effective")
Call click_Image("MasterFile","DR Profile","Save")
Wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("Cancel").Click
End If
Call ClickonDRName("MasterFile","DR Profile",DataTable.Value("IssuerName
","DR"),"2")
Wait(4)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
'Step32
'Call pageCheck_WebElement("MasterFile","Issuer Profile","Advisers;BNY C
ontacts;Comments;Custodians;Detail;DR Services;Products;Und. Sec. Markets","")

If Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Ex
ist(2) and Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerDocume
ntation").Exist(2)Then
Reporter.ReportEvent micPass,"Step32: Check whether the issuer p
rofile screen has been loaded or not","The issuer profile screen has been loaded
as required"
Else
Reporter.ReportEvent micFail,"Step32: Check whether the issuer p
rofile screen has been loaded or not","The issuer profile screen has not been lo
aded"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step33
Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Details")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step33: Check whether the required
fields are present in the issuer profile screen detail tab","The required field
s are present as required"
Else
Reporter.ReportEvent micFail,"Step33: Check whether the required
fields are present in the issuer profile screen detail tab","The required field
s are not present"
Environment.Value("TestCase_Log")="True"
End If
'Step34
'Checking for the BNY contact tab
Browser("MasterFile").Page("Issuer Profile").WebElement("BNY Contacts").
Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","BNY Contact
s")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("BNY Contacts").Exist(2) Then
Reporter.ReportEvent micPass,"Step34: Check for the details in t
he BNY contacts tab","The details under the BNY contact tab is as required"
Else
Reporter.ReportEvent micFail,"Step34: Check for the details in t
he BNY contacts tab","The details under the BNY contact tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step35
'Checking for the Underlying security markets tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Und. Sec. Marke
ts").Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Und. Sec. M
arkets")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Underlying Security Market").Exist(2) Then
Reporter.ReportEvent micPass,"Step35: Check for the Underlying E
vent Tab","The underlying event tab is as required"
Else
Reporter.ReportEvent micFail,"Step35: Check for the underlying E
vent tab","The details under the underlying event tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step36
'Checking for the Custodian Tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Custodians").Cl
ick
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Custodians"
)
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Issuers Preferred Custodian").Exist(2)Then
Reporter.ReportEvent micPass,"Step36: Check for the Issuer preff
ered tab","The details in the Issuer preffered tab is as required"
Else
Reporter.ReportEvent micFail,"Step36: Check for the issuer preff
ered tab","The details in the issuer preffered is not present as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step37
'Checking for the Advisors tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Advisers").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Advisers")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Issuers Advisers").Exist(2)Then
Reporter.ReportEvent micPass,"Step37: Check for the Advisors tab
","The advisers tab details are as required"
Else
Reporter.ReportEvent micFail,"Step37: Check for the Advisors Tab
","The advisors tab details are as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step38
'Checking for the Products tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Products").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Products")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Products").Exist(2)Then
Reporter.ReportEvent micPass,"Step38: Check for the presence of
the products web table","The products web table is present as required"
Else
Reporter.ReportEvent micFail,"Step38: Check for the presence of
the products web table","The products web table is not present as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If

'Step39
'Checking for the DR services tab
Browser("MasterFile").Page("Issuer Profile").WebElement("DR Services").C
lick
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","DR Services
")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("DR Services").Exist(2) Then
Reporter.ReportEvent micPass,"Step39: Check for the presence of
the DR Services web table","The DR services web table is present as required"
Else
Reporter.ReportEvent micFail,"Step39: Check for the presence of
the DR Services web table","The DR Services web table is not present as required
"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step40
'Checking for the Comments tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Comments").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Comments")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Comments").Exist(2) Then
Reporter.ReportEvent micPass,"Step40: Check for the presence of
the comments table","The comments table is present as required"
Else
Reporter.ReportEvent micFail,"Step40: Check for the presence of
the comments table","The comments table is not present"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
Call click_WebElement("MasterFile","Issuer Profile","Detail")
Environment.Value("ISSUERNAME")=trim(get_WebEdit_Value("MasterFile","Iss
uer Profile","Name"))
If Environment.Value("TCCURCOUNT")=2 Then
Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerD
ocumentation").Click
Call Fill_Issuer_Documentation("MasterFile","Issuer Documentatio
n","DR")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Fill in the issuer Documen
tation and click on save","The Issuer documentation is done and saved"
Else
Reporter.ReportEvent micFail,"Fill in the Issuer Documen
tation and click on save","The Issuer documentation is not filled properly"
Environment.Value("TestCase_Log")="True"
End If
End If
'Call ClickonDRName("MasterFile","Issuer Documentation",ISSUERNAME,"2")
Call logoutfromApp("MasterFile","Issuer Documentation")
'Step 42
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Approver","MFLogin")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step42: Log into application using
Approver ID","We have successfully logged in as an approver"
Else
Reporter.ReportEvent micFail,"Step42: Log into the application u
sing Approver ID ","We have not successfully logged in as an approver"
Environment.Value("TestCase_Log")="True"
End If
'Step43 to 50
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","CUSIP Profile","CUSIP",E
nvironment.Value("CUSIP_NAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step43 to 50:Approve the CUSIP det
ails","The CUSIP details are approved as required"
Else
Reporter.ReportEvent micFail,"Step43 to 50: Approve the CUSIP de
tails","The CUSIP details are not approved as required"
Environment.Value("TestCase_Log")="True"
End If

'Step51 to 55
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","DR Documentation","DR Na
me",Environment.Value("DRNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step51 to 55: Approve the DR Docum
entation","The DR Documentation is filled in correctly as required"
Else
Reporter.ReportEvent micFail,"Step51 to 55: Approve the DR Docum
entation","The DR Documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
'Step 56 to 61
Environment.Value("TestCase_Log")="True"
If Environment.Value("TCCURCOUNT")=2 Then
Call ApprovalFunction_CreateNewDR("MasterFile","Issuer Documenta
tion","Issuer",Environment.value("ISSUERNAME"),"Approved","Approved","Pending Ap
proval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step56 to 61: Approve the
issuer documentation","The issuer documentation is approved as required"
Else
Reporter.ReportEvent micFail,"Step 56 to 61 : Approve th
e issuer documentation","The issuer documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
Else
Reporter.ReportEvent micPass,"Step56 to 61 : Approve the issuer
documentation","The issuer documentation already is approved"
End if
'Call logoutfromApp("MasterFile","Depositary Receipt Division's")
' Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
' Call login("MasterFile","Login Page","Relationship Management","MFLogin"
)
' Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
' Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","D
R"))
' Wait(3)
' Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
' Call click_Image("MasterFile","Profile - DR Search","Search")
' Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
'Step 62 to 67
Call ApprovalFunction_CreateNewDR("MasterFile","DR Profile","Name",Envir
onment.Value("DRNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step62 to 66: Approve and Batch th
e DR profile","The DR profile gets approved and batched successfully"
Else
Reporter.ReportEvent micFail,"Step62 to 66: Approve and Batch th
e DR Profile","The DR Profile gets approved and batched successfully"
Environment.Value("TestCase_Log")="True"
End If
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
'Step68 to 75
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Relationship Management","MFLogin"
)
Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","D
R"))
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
Call DRSearchCriteria("MasterFile","Profile - DR Search")
Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
OriginOfDR=Browser("MasterFile").Page("DR Profile").WebEdit("DROrigin").
GetROProperty("value")
StatusOfDR=Browser("MasterFile").Page("DR Profile").WebList("Status").Ge
tROProperty("value")
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If StatusOfDR="Effective" And OriginOfDR="New Program" And Environment.V
alue("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step68 to 75: Check whether the DR
has been made effective or not","The DR Has been made effective successfully"
Else
Reporter.ReportEvent micFail,"Step 68 to 76: Check whether the D
R has been made effective or not","The DR has not been made effective"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step 76
Browser("MasterFile").Page("DR Profile").WebElement("CUSIP Summary/Add")
.Click
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step76: Go to CUSIP Summary tab an
d look for Flag","The Flags are absent as required"
Else
Reporter.ReportEvent micFail,"Step76: Go to CUSIP Summary tab an
d look for Flag ","The flag is still present"
Environment.Value("TestCase_Log")="True"
End If

Call select_Menu("MasterFile","DR Profile","Home;DR Home")


End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++
Public Function MFProfileDR_TC5()
Environment.Value("TestCase_Log")="True"
Environment.Value("CUSIP_NAME")=""
Environment.Value("DRNAME")=""
Environment.Value("ISSUERNAME")=""
'Step1
'Log into the ADR home page
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL",
"MFLogin"))
Call pageCheck_WebEdit("MasterFile","Login Page","username;j_pas
sword","")
Call pageCheck_WebButton("MasterFile","Login Page","Login","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is Dispalyed successfully with th
e Required Field"
Else
Reporter.ReportEvent micFail,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is NOT Dispalyed successfully wit
h the Required Field"
Environment.Value("TestCase_Log") = "True"
End If
'Calling the login function
Call login("MasterFile","Login Page","Relationship Management","
MFLogin")
' Check the MasterFile Application for the 4 links, User Name an
d the last Login Details
Call chkADRHomePage("MasterFile","Depositary Receipt Division's",DataTable.Valu
e("HomePageLinks","HomePageVerification"),DataTable.Value("UserFullName","MFLogi
n" ))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass," Verifying the DR Home Pag
e","The DR Home Page is displayed successfully with Home Page Links and the User
Details"
Else
Reporter.ReportEvent micFail," Verifying the DR Home Pag
e","The DR Home Page is NOT displayed successfully with Home Page Links and the
User Details"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Step2
'Click on the masterFile button
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
Call chkMFCAHomePage("MasterFile","MasterFile",DataTable.Value("
MenuName","HomePageVerification"),DataTable.Value("UserFullName","MFLogin" ))
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is disaplyed successfully with the required Menu Ite
ms and also displays the Current Version"
Else
Reporter.ReportEvent micFail,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is NOT displayed successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step3
'Click on the Profile Link
Call check_Menu("MasterFile","MasterFile","Profile")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is Present in the Pr
ofile Menu"
Else
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is NOT Present in th
e Profile Menu"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step4
'Click on the DR Link
Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","DR"))
Call pageCheck_WebEditOR("MasterFile","Profile - DR Search","Iss
uerName;DRName")
Call pageCheck_WebListOR("MasterFile","Profile - DR Search","Cou
ntryOfManagement;DrOrigin;DRType;DRExchange;SorU;Status;SubStatus")
'Call pageCheck_WebElementinTable("MasterFile","Profile - DR Sea
rch","Name;Country of Management;Type;Status;Sub-Status;S/U;Effective Date;Termi
nation Date;Depository;Origin;Structure","")
intRC = Browser("MasterFile").Page("Profile - DR Search").WebTab
le("DR Search Results").RowCount
If intRC <3 Then
Reporter.ReportEvent micPass,"Verifying the Number of Ro
ws before entering the Search Criteria","There are No Results displayed"
Environment.Value("TestCase_Log")="True"
Else
Reporter.ReportEvent micFail,"Verifying the Number of Ro
ws before entering the Search Criteria","There are few Results displayed"
Call captureScreenshot()
Environment.Value("Execution_Log") = "False"
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 4 : Verifying the Fi
elds present in the Page Profile CUSIP Search","The Required Fields are dispalye
d"
Else
Reporter.ReportEvent micFail, "Step 4 : Verifying the Fi
elds present in the Page Profile CUSIP Search","The Required Fields are NOT Pres
ent"
Environment.Value("TestCase_Log") = "True"
End If
'Step5
'Selecting a Search criteria
Call DRSearchCriteria("MasterFile","Profile - DR Search")
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass, "Step 5 :Click on search with all
default values","The Required Results are displayed"
Else
Reporter.ReportEvent micFail, "Step 5 :Click on search with all
default values","The required search results do not appear"
Environment.Value("TestCase_Log") = "True"
End If
'Step6 to 20
Call CreateNewDR("MasterFile","Profile - DR Search","DR Profile","CUSIP
Profile","","DR")
If Environment.Value("Failure")="True" Then
Call select_Menu("MasterFile","Profile - DR Search","Home;DR Hom
e")
Exit Function
End If
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step6 to 20:Create a New DR and At
tach a CUSIP to it","The New DR with name as "& Environment.Value("DRNAME") &" a
nd CUSIP:"& Ucase(Environment.Value("CUSIP_NAME")) &" is created successfully o
n saving which we get a Yellow Flag"
Else
Reporter.ReportEvent micFail,"Step6 to 20 :Create a New DR and a
ttach a CUSIP to it","The New DR is not created successfully"
Environment.Value("TestCase_Log")="True"
End If

'Step21
Call click_WebElement("MasterFile","DR Profile","Offerings")
If Browser("MasterFile").Page("DR Profile").WebTable("Offerings").Exist(
2) Then
Reporter.ReportEvent micPass,"Step21: Check for the offerings ta
b","The details in the offering tab is as required"
Else
Reporter.ReportEvent micFail,"Step21: Check for the offerings ta
b","The Details in the offerings tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

'Step22
Call click_WebElement("MasterFile","DR Profile","Additional DR Exchanges
")
If Browser("MasterFile").Page("DR Profile").WebTable("Additional DR Exch
ange").Exist(2) Then
Reporter.ReportEvent micPass,"Step22: Check whether the Addition
al DR exchange Tab is as required","The Additional DR Exchanges Tab is as Requir
ed"
Else
Reporter.ReportEvent micFail,"Step22: Check whether the Addition
al exchange Tab is as required","The Additional DR exchanges tab is not present"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
' Call click_WebButton("MasterFile","DR Profile","Add_DRExchange")
' Call click_Image("MasterFile","DR Profile","ExchangeInfo")
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","WebEdit","searchString",dataTable.Value("DRExchangeForCUSIP","D
R"))
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","Image","Go","")
' Call SelectValueInsideFrame("MasterFile","DR Profile","lookupFra
me",dataTable.Value("DREXchangeForCUSIP","DR"))
' Call set_WebEdit_Value("MasterFile","DR Profile","SEDOL",SEDOL)
' Call set_WebEdit_Value("MasterFile","DR Profile","Ticker")
' Call click_Image("MasterFile","DR Profile","Save")
' If Environment.Value("TestCase_Log")=true Then
' Reporter.ReportEvent micPass,"Step22:Fill in the Additio
nal DR Exchanges Tab","The Additional DR exchanges tab gets filled"
' Else
' Reporter.ReportEvent micFail,"Step22: Fill in the Additi
onal DR exchanges tab","The additional DR Exchange tab is not filled as required
"
' Environment.Value("TestCase_Log")=true
' End If
'Step23 and 24
Call click_WebElement("MasterFile","DR Profile","Other DR Services")
If Browser("MasterFile").Page("DR Profile").WebTable("Other DR Services"
).Exist(2) Then
Reporter.ReportEvent micPass,"Step 23 and 24: Check whether the
Additional DR exchange Tab is as required","The Additional DR Exchanges Tab is a
s Required"
Else
Reporter.ReportEvent micFail,"Step23 and 24: Check whether the A
dditional exchange Tab is as required","The Additional DR exchanges tab is not p
resent"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step25
If Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation"
).Exist(2) Then
Reporter.ReportEvent micPass,"Step25: Check whether the DR Docum
entation link is present or not","The DR Documentation link is present as requir
ed"
Else
Reporter.ReportEvent micFail,"Step25: Check whether the DR Docum
entation link is present or not","The DR Documentation link is not present as re
quired"
Call captureScreenshot()
Environment.Value("Exection_Log")="False"
End If

'Step26
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation").c
lick
If Browser("MasterFile").Page("DR Documentation Detail").Exist(2) Then
Reporter.ReportEvent micPass,"Step26: Click on the DR Documentat
ion link","The DR Documentation link is clicked as required"
Else
Reporter.ReportEvent micFail,"Step26: Click on the DR Documentat
ion link","The DR Documentation link is not clicked"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step27 to 30
'Filling in the DR documentation
Call Fill_DR_Documentation("MasterFile","DR Documentation Detail")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step27 to 30: Fill the DR Document
ation and click on save","The DR documentation is done and saved and we navigate
d to the Issuer profile screen"
Else
Reporter.ReportEvent micFail,"Step27 to 30: Fill the DR Document
ation and click on save","The DR documentation is not done properly"
Environment.Value("TestCase_Log")="True"
End If
Wait(3)
Call click_WebElement("MasterFile","DR Profile","Detail")
If (dataTable.Value("Type","DR") <> "144A" Or datatable.Value("Type","D
R") <> "RegS") And DataTable.Value("DepositoryName","DR") ="BNY" Then
Call click_WebElement("MasterFile","DR Profile","SEC Filing")
Call set_WebEdit_Value("MasterFile","DR Profile","CurrentF6ADS",
dataTable.Value("CurrentF6ADS","DR"))
Call set_WebEdit_Value("MasterFile","DR Profile","CurF6Number",d
ataTable.Value("CurF6Number","DR"))
Wait(2)
If DataTable.Value("DepositoryName","DR")="BNY" And Datatable.Va
lue("Type","DR") <> "144A" And DataTable.Value("Type","DR") <> "Reg. S" Then
If DataTable.Value("F6FileDate","DR") <> "" Then
strDataTableValue = DataTable.Value("F6F
ileDate","DR")
strValue = Split(strDataTableValue,";",-
1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image("MasterFile","DR Profil
e","ShowCalenderF6FileDateBNY")
Call ClickIcon_SetDate("MasterFile","DR
Profile",strMonthValue,strYearValue,strDateValue)
End If
Else
If DataTable.Value("F6FileDate","DR") <> "" Then
strDataTableValue = DataTable.Value("F6F
ileDate","DR")
strValue = Split(strDataTableValue,";",-
1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image("MasterFile","DR Profil
e","ShowCalendar_F6FileDate")
Call ClickIcon_SetDate("MasterFile","DR
Profile",strMonthValue,strYearValue,strDateValue)
End If
End If
Call click_Image("MasterFile","DR Profile","Save")
End If
Call click_WebElement("MasterFile","DR Profile","Detail")
Call Select_Combo_Value("MasterFile","DR Profile","Status","Effective")
Call click_Image("MasterFile","DR Profile","Save")
Wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("Cancel").Click
End If
Call ClickonDRName("MasterFile","DR Profile",DataTable.Value("IssuerName
","DR"),"2")
Wait(4)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
'Step32
'Call pageCheck_WebElement("MasterFile","Issuer Profile","Advisers;BNY C
ontacts;Comments;Custodians;Detail;DR Services;Products;Und. Sec. Markets","")

If Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Ex
ist(2) and Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerDocume
ntation").Exist(2)Then
Reporter.ReportEvent micPass,"Step33: Check whether the issuer p
rofile screen has been loaded or not","The issuer profile screen has been loaded
as required"
Else
Reporter.ReportEvent micFail,"Step33: Check whether the issuer p
rofile screen has been loaded or not","The issuer profile screen has not been lo
aded"
Call captureScreenshot()
Environment.Value("Execution_log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step33
Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Details")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step33: Check whether the required
fields are present in the issuer profile screen detail tab","The required field
s are present as required"
Else
Reporter.ReportEvent micFail,"Step33: Check whether the required
fields are present in the issuer profile screen detail tab","The required field
s are not present"
Environment.Value("TestCase_Log")="True"
End If
'Step34
'Checking for the BNY contact tab
Browser("MasterFile").Page("Issuer Profile").WebElement("BNY Contacts").
Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","BNY Contact
s")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("BNY Contacts").Exist(2) Then
Reporter.ReportEvent micPass,"Step34: Check for the details in t
he BNY contacts tab","The details under the BNY contact tab is as required"
Else
Reporter.ReportEvent micFail,"Step34: Check for the details in t
he BNY contacts tab","The details under the BNY contact tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step35
'Checking for the Underlying security markets tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Und. Sec. Marke
ts").Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Und. Sec. M
arkets")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Underlying Security Market").Exist(2) Then
Reporter.ReportEvent micPass,"Step35: Check for the Underlying E
vent Tab","The underlying event tab is as required"
Else
Reporter.ReportEvent micFail,"Step35: Check for the underlying E
vent tab","The details under the underlying event tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step36
'Checking for the Custodian Tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Custodians").Cl
ick
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Custodians"
)
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Issuers Preferred Custodian").Exist(2)Then
Reporter.ReportEvent micPass,"Step36: Check for the Issuer preff
ered tab","The details in the Issuer preffered tab is as required"
Else
Reporter.ReportEvent micFail,"Step36: Check for the issuer preff
ered tab","The details in the issuer preffered is not present as required"
Call captureScreenshot()
Environment.Value("Execution_log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step37
'Checking for the Advisors tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Advisers").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Advisers")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Issuers Advisers").Exist(2)Then
Reporter.ReportEvent micPass,"Step37: Check for the Advisors tab
","The advisers tab details are as required"
Else
Reporter.ReportEvent micFail,"Step37: Check for the Advisors Tab
","The advisors tab details are as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step38
'Checking for the Products tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Products").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Products")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Products").Exist(2)Then
Reporter.ReportEvent micPass,"Step38: Check for the presence of
the products web table","The products web table is present as required"
Else
Reporter.ReportEvent micFail,"Step38: Check for the presence of
the products web table","The products web table is not present as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If

'Step39
'Checking for the DR services tab
Browser("MasterFile").Page("Issuer Profile").WebElement("DR Services").C
lick
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","DR Services
")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("DR Services").Exist(2) Then
Reporter.ReportEvent micPass,"Step39: Check for the presence of
the DR Services web table","The DR services web table is present as required"
Else
Reporter.ReportEvent micFail,"Step39: Check for the presence of
the DR Services web table","The DR Services web table is not present as required
"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step40
'Checking for the Comments tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Comments").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Comments")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Comments").Exist(2) Then
Reporter.ReportEvent micPass,"Step40: Check for the presence of
the comments table","The comments table is present as required"
Else
Reporter.ReportEvent micFail,"Step40: Check for the presence of
the comments table","The comments table is not present"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
Call click_WebElement("MasterFile","Issuer Profile","Detail")
Environment.Value("ISSUERNAME")=trim(get_WebEdit_Value("MasterFile","Iss
uer Profile","Name"))
If Environment.Value("TCCURCOUNT")=2 Then
Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerD
ocumentation").Click
Call Fill_Issuer_Documentation("MasterFile","Issuer Documentatio
n","DR")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Fill in the issuer Documen
tation and click on save","The Issuer documentation is done and saved"
Else
Reporter.ReportEvent micFail,"Fill in the Issuer Documen
tation and click on save","The Issuer documentation is not filled properly"
Environment.Value("TestCase_Log")="True"
End If
End If
'Call ClickonDRName("MasterFile","Issuer Documentation",ISSUERNAME,"2")
Call logoutfromApp("MasterFile","Issuer Documentation")
'Step 42
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Approver","MFLogin")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step42: Log into application using
Approver ID","We have successfully logged in as an approver"
Else
Reporter.ReportEvent micFail,"Step42: Log into the application u
sing Approver ID ","We have not successfully logged in as an approver"
Environment.Value("TestCase_Log")="True"
End If
'Step43 to 50
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","CUSIP Profile","CUSIP",E
nvironment.Value("CUSIP_NAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step43 to 50:Approve the CUSIP det
ails","The CUSIP details are approved as required"
Else
Reporter.ReportEvent micFail,"Step43 to 50: Approve the CUSIP de
tails","The CUSIP details are not approved as required"
Environment.Value("TestCase_Log")="True"
End If

'Step51 to 55
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","DR Documentation","DR Na
me",Environment.Value("DRNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step51 to 55: Approve the DR Docum
entation","The DR Documentation is filled in correctly as required"
Else
Reporter.ReportEvent micFail,"Step51 to 55: Approve the DR Docum
entation","The DR Documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
'Step 56 to 61
Environment.Value("TestCase_Log")="True"
If Environment.Value("TCCURCOUNT")=2 Then
Call ApprovalFunction_CreateNewDR("MasterFile","Issuer Documenta
tion","Issuer",Environment.value("ISSUERNAME"),"Approved","Approved","Pending Ap
proval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step56 to 61: Approve the
issuer documentation","The issuer documentation is approved as required"
Else
Reporter.ReportEvent micFail,"Step 56 to 61 : Approve th
e issuer documentation","The issuer documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
Else
Reporter.ReportEvent micPass,"Step56 to 61 : Approve the issuer
documentation","The issuer documentation already is approved"
End if
'Step 62 to 66
Call ApprovalFunction_CreateNewDR("MasterFile","DR Profile","Name",Envir
onment.Value("DRNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step62 to 66: Approve and Batch th
e DR profile","The DR profile gets approved and batched successfully"
Else
Reporter.ReportEvent micFail,"Step62 to 66: Approve and Batch th
e DR Profile","The DR Profile gets approved and batched successfully"
Environment.Value("TestCase_Log")="True"
End If
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
'Step67 to 75
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Relationship Management","MFLogin"
)
Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","DR"))
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Environme
nt.Value("DRNAME"))
Call DRSearchCriteria("MasterFile","Profile - DR Search")
Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:=" &
Environment.Value("DRNAME"),"html tag:=TD").Click
OriginOfDR=Browser("MasterFile").Page("DR Profile").WebEdit("DROrigin").
GetROProperty("value")
StatusOfDR=Browser("MasterFile").Page("DR Profile").WebList("Status").Ge
tROProperty("value")
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If StatusOfDR="Effective" and OriginOfDR="New Program" and Environment.V
alue("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step67 to 75: Check whether the DR
has been made effective or not","The DR Has been made effective successfully"
Else
Reporter.ReportEvent micFail,"Step 67 to 76: Check whether the D
R has been made effective or not","The DR has not been made effective"
Call captureScreenshot()
Environment.Value("Execution_log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step 76
Browser("MasterFile").Page("DR Profile").WebElement("CUSIP Summary/Add")
.Click
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step76: Go to CUSIP Summary tab an
d look for Flag","The Flags are absent as required"
Else
Reporter.ReportEvent micFail,"Step76: Go to CUSIP Summary tab an
d look for Flag ","The flag is still present"
Environment.Value("TestCase_log")="True"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++
Public Function MFProfileDR_TC6()
Environment.Value("TestCase_Log")="True"
Environment.Value("CUSIP_NAME")=""
Environment.Value("DRNAME")=""
Environment.Value("ISSUERNAME")=""
'Step1
'Log into the ADR home page
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL",
"MFLogin"))
Call pageCheck_WebEdit("MasterFile","Login Page","username;j_pas
sword","")
Call pageCheck_WebButton("MasterFile","Login Page","Login","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is Dispalyed successfully with th
e Required Field"
Else
Reporter.ReportEvent micFail,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is NOT Dispalyed successfully wit
h the Required Field"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Calling the login function
Call login("MasterFile","Login Page","Relationship Management","
MFLogin")
' Check the MasterFile Application for the 4 links, User Name an
d the last Login Details
Call chkADRHomePage("MasterFile","Depositary Receipt Division's"
,DataTable.Value("HomePageLinks","HomePageVerification"),DataTable.Value("UserFu
llName","MFLogin" ))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass," Verifying the DR Home Pag
e","The DR Home Page is displayed successfully with Home Page Links and the User
Details"
Else
Reporter.ReportEvent micFail," Verifying the DR Home Pag
e","The DR Home Page is NOT displayed successfully with Home Page Links and the
User Details"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Step2
'Click on the masterFile button
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
Call chkMFCAHomePage("MasterFile","MasterFile",DataTable.Value("
MenuName","HomePageVerification"),DataTable.Value("UserFullName","MFLogin" ))
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is disaplyed successfully with the required Menu Ite
ms and also displays the Current Version"
Else
Reporter.ReportEvent micFail,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is NOT displayed successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step3
'Click on the Profile Link
Call check_Menu("MasterFile","MasterFile","Profile")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is Present in the Pr
ofile Menu"
Else
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is NOT Present in th
e Profile Menu"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step4
'Click on the DR Link
Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","DR"))
Call pageCheck_WebEditOR("MasterFile","Profile - DR Search","Iss
uerName;DRName")
Call pageCheck_WebListOR("MasterFile","Profile - DR Search","Cou
ntryOfManagement;DrOrigin;DRType;DRExchange;SorU;Status;SubStatus")
'Call pageCheck_WebElementinTable("MasterFile","Profile - DR Sea
rch","Name;Country of Management;Type;Status;Sub-Status;S/U;Effective Date;Termi
nation Date;Depository;Origin;Structure","")
intRC = Browser("MasterFile").Page("Profile - DR Search").WebTab
le("DR Search Results").RowCount
If intRC <3 Then
Reporter.ReportEvent micPass,"Verifying the Number of Rows befor
e entering the Search Criteria","There are No Results displayed"
Environment.Value("TestCase_Log")="True"
Else
Reporter.ReportEvent micFail,"Verifying the Number of Rows befor
e entering the Search Criteria","There are few Results displayed"
Call captureScreenshot()
Environment.Value("Execution_Log") = "False"
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 4 : Verifying the Fields pre
sent in the Page Profile CUSIP Search","The Required Fields are dispalyed"
Else
Reporter.ReportEvent micFail, "Step 4 : Verifying the Fields pre
sent in the Page Profile CUSIP Search","The Required Fields are NOT Present"
Environment.Value("TestCase_Log") = "True"
End If
'Step5
'Selecting a Search criteria
Call DRSearchCriteria("MasterFile","Profile - DR Search")
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass, "Step 5 :Click on search with all
default values","The Required Results are displayed"
Else
Reporter.ReportEvent micFail, "Step 5 :Click on search with all
default values","The required search results do not appear"
Environment.Value("TestCase_Log") = "True"
End If
'Step6 to 20
Call CreateNewDR("MasterFile","Profile - DR Search","DR Profile","CUSIP
Profile","","DR")
If Environment.Value("Failure")="True" Then
Call select_Menu("MasterFile","Profile - DR Search","Hom
e;DR Home")
Exit Function
End If
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step6 to 20:Create a New DR and At
tach a CUSIP to it","The New DR with name as "& Environment.Value("DRNAME") &" a
nd CUSIP:"& Ucase(Environment.Value("CUSIP_NAME")) &" is created successfully o
n saving which we get a Yellow Flag"
Else
Reporter.ReportEvent micFail,"Step6 to 20:Create a New DR and at
tach a CUSIP to it","The New DR is not created successfully"
Environment.Value("TestCase_Log")="True"
End If

'Step21
Call click_WebElement("MasterFile","DR Profile","Offerings")
If Browser("MasterFile").Page("DR Profile").WebTable("Offerings").Exist(
2) Then
Reporter.ReportEvent micPass,"Step21: Check for the offerings ta
b","The details in the offering tab is as required"
Else
Reporter.ReportEvent micFail,"Step21: Check for the offerings ta
b","The Details in the offerings tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

'Step22
Call click_WebElement("MasterFile","DR Profile","Additional DR Exchanges
")
If Browser("MasterFile").Page("DR Profile").WebTable("Additional DR Exch
ange").Exist(2) Then
Reporter.ReportEvent micPass,"Step22: Check whether the Addition
al DR exchange Tab is as required","The Additional DR Exchanges Tab is as Requir
ed"
Else
Reporter.ReportEvent micFail,"Step22: Check whether the Addition
al exchange Tab is as required","The Additional DR exchanges tab is not present"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
' Call click_WebButton("MasterFile","DR Profile","Add_DRExchange")
' Call click_Image("MasterFile","DR Profile","ExchangeInfo")
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","WebEdit","searchString",dataTable.Value("DRExchangeForCUSIP","D
R"))
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","Image","Go","")
' Call SelectValueInsideFrame("MasterFile","DR Profile","lookupFra
me",dataTable.Value("DREXchangeForCUSIP","DR"))
' Call set_WebEdit_Value("MasterFile","DR Profile","SEDOL",SEDOL)
' Call set_WebEdit_Value("MasterFile","DR Profile","Ticker")
' Call click_Image("MasterFile","DR Profile","Save")
' If Environment.Value("TestCase_Log")=true Then
' Reporter.ReportEvent micPass,"Step22:Fill in the Additio
nal DR Exchanges Tab","The Additional DR exchanges tab gets filled"
' Else
' Reporter.ReportEvent micFail,"Step22: Fill in the Additi
onal DR exchanges tab","The additional DR Exchange tab is not filled as required
"
' Environment.Value("TestCase_Log")=true
' End If
'Step23 and 24
Call click_WebElement("MasterFile","DR Profile","Other DR Services")
If Browser("MasterFile").Page("DR Profile").WebTable("Other DR Services"
).Exist(2) Then
Reporter.ReportEvent micPass,"Step 23 and 24: Check whether the
Additional DR exchange Tab is as required","The Additional DR Exchanges Tab is a
s Required"
Else
Reporter.ReportEvent micFail,"Step23 and 24: Check whether the A
dditional exchange Tab is as required","The Additional DR exchanges tab is not p
resent"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

'Step25
If Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation"
).Exist(2) Then
Reporter.ReportEvent micPass,"Step25: Check whether the DR Docum
entation link is present or not","The DR Documentation link is present as requir
ed"
Else
Reporter.ReportEvent micFail,"Step25: Check whether the DR Docum
entation link is present or not","The DR Documentation link is not present as re
quired"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

'Step26
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation").c
lick
If Browser("MasterFile").Page("DR Documentation Detail").Exist(2) Then
Reporter.ReportEvent micPass,"Step26: Click on the DR Documentat
ion link","The DR Documentation link is clicked as required"
Else
Reporter.ReportEvent micFail,"Step26: Click on the DR Documentat
ion link","The DR Documentation link is not clicked"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step27 to 31
'Filling in the DR documentation
Call Fill_DR_Documentation("MasterFile","DR Documentation Detail")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step27 to 29: Fill the DR Document
ation and click on save","The DR documentation is done and saved and we navigate
d to the Issuer profile screen"
Else
Reporter.ReportEvent micFail,"Step27 to 29: Fill the DR Document
ation and click on save","The DR documentation is not done properly"
Environment.Value("TestCase_Log")="True"
End If
Wait(3)
Call click_WebElement("MasterFile","DR Profile","Detail")

If (dataTable.Value("Type","DR") <> "144A" And datatable.Value("Type","DR")


<> "RegS") And DataTable.Value("DepositoryName","DR") ="BNY" Then
Call click_WebElement("MasterFile","DR Profile","SEC Filing")
Call set_WebEdit_Value("MasterFile","DR Profile","CurrentF6ADS",
dataTable.Value("CurrentF6ADS","DR"))
Call set_WebEdit_Value("MasterFile","DR Profile","CurF6Number",d
ataTable.Value("CurF6Number","DR"))
Wait(2)
If DataTable.Value("F6FileDate","DR") <> "" Then
strDataTableValue = DataTable.Value("F6FileDate"
,"DR")
strValue = Split(strDataTableValue,";",-1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image("MasterFile","DR Profile","Show
CalenderF6FileDateBNY")
Call ClickIcon_SetDate("MasterFile","DR Profile"
,strMonthValue,strYearValue,strDateValue)
End If

Call click_Image("MasterFile","DR Profile","Save")


End If
Call click_WebElement("MasterFile","DR Profile","Detail")
Call Select_Combo_Value("MasterFile","DR Profile","Status","Effective")
Call click_Image("MasterFile","DR Profile","Save")
Wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If

If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)


Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
Call ClickonDRName("MasterFile","DR Profile",DataTable.Value("IssuerName
","DR"),"2")
Reporter.ReportEvent micDone,"Check whether the Issuer name has
been clicked or not","The Issuer name has been clicked as required"
Wait(4)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
'Step32
'Call pageCheck_WebElement("MasterFile","Issuer Profile","Advisers;BNY C
ontacts;Comments;Custodians;Detail;DR Services;Products;Und. Sec. Markets","")
If Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Ex
ist(2) and Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerDocume
ntation").Exist(2)Then
Reporter.ReportEvent micPass,"Step32: Check whether the issuer p
rofile screen has been loaded or not","The issuer profile screen has been loaded
as required"
Else
Reporter.ReportEvent micFail,"Step32: Check whether the issuer p
rofile screen has been loaded or not","The issuer profile screen has not been lo
aded"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step33
Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Details")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step33: Check whether the required
fields are present in the issuer profile screen detail tab","The required field
s are present as required"
Else
Reporter.ReportEvent micFail,"Step33: Check whether the required
fields are present in the issuer profile screen detail tab","The required field
s are not present"
Environment.Value("TestCase_Log")="True"
End If
'Step34
'Checking for the BNY contact tab
Browser("MasterFile").Page("Issuer Profile").WebElement("BNY Contacts").
Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","BNY Contact
s")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("BNY Contacts").Exist(2) Then
Reporter.ReportEvent micPass,"Step34: Check for the details in t
he BNY contacts tab","The details under the BNY contact tab is as required"
Else
Reporter.ReportEvent micFail,"Step34: Check for the details in t
he BNY contacts tab","The details under the BNY contact tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step35
'Checking for the Underlying security markets tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Und. Sec. Marke
ts").Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Und. Sec. M
arkets")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Underlying Security Market").Exist(2) Then
Reporter.ReportEvent micPass,"Step35: Check for the Underlying E
vent Tab","The underlying event tab is as required"
Else
Reporter.ReportEvent micFail,"Step35: Check for the underlying E
vent tab","The details under the underlying event tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step36
'Checking for the Custodian Tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Custodians").Cl
ick
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Custodians"
)
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Issuers Preferred Custodian").Exist(2)Then
Reporter.ReportEvent micPass,"Step36: Check for the Issuer preff
ered tab","The details in the Issuer preffered tab is as required"
Else
Reporter.ReportEvent micFail,"Step36: Check for the issuer preff
ered tab","The details in the issuer preffered is not present as required"
Call captureScreenshot()
Environment.Value("Execution_log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step37
'Checking for the Advisors tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Advisers").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Advisers")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Issuers Advisers").Exist(2)Then
Reporter.ReportEvent micPass,"Step37: Check for the Advisors tab
","The advisers tab details are as required"
Else
Reporter.ReportEvent micFail,"Step37: Check for the Advisors Tab
","The advisors tab details are as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step38
'Checking for the Products tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Products").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Products")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Products").Exist(2)Then
Reporter.ReportEvent micPass,"Step38: Check for the presence of
the products web table","The products web table is present as required"
Else
reporter.ReportEvent micFail,"Step38: Check for the presence of
the products web table","The products web table is not present as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If

'Step39
'Checking for the DR services tab
Browser("MasterFile").Page("Issuer Profile").WebElement("DR Services").C
lick
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","DR Services
")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("DR Services").Exist(2) Then
Reporter.ReportEvent micPass,"Step39: Check for the presence of
the DR Services web table","The DR services web table is present as required"
Else
Reporter.ReportEvent micFail,"Step39: Check for the presence of
the DR Services web table","The DR Services web table is not present as required
"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step40
'Checking for the Comments tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Comments").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Comments")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Comments").Exist(2) Then
Reporter.ReportEvent micPass,"Step40: Check for the presence of
the comments table","The comments table is present as required"
Else
reporter.ReportEvent micFail,"Step40: Check for the presence of
the comments table","The comments table is not present"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
Call click_WebElement("MasterFile","Issuer Profile","Detail")
Environment.Value("ISSUERNAME")=trim(get_WebEdit_Value("MasterFile","Iss
uer Profile","Name"))
If Environment.Value("TCCURCOUNT")=2 Then
Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerD
ocumentation").Click
Call Fill_Issuer_Documentation("MasterFile","Issuer Documentatio
n","DR")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Fill in the issuer Documen
tation and click on save","The Issuer documentation is done and saved"
Else
Reporter.ReportEvent micFail,"Fill in the Issuer Documen
tation and click on save","The Issuer documentation is not filled properly"
Environment.Value("TestCase_Log")="True"
End If
End If
'Call ClickonDRName("MasterFile","Issuer Documentation",ISSUERNAME,"2")
Call logoutfromApp("MasterFile","Issuer Documentation")
'Step 42
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Approver","MFLogin")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step42: Log into application using
Approver ID","We have successfully logged in as an approver"
Else
Reporter.ReportEvent micFail,"Step42: Log into the application u
sing Approver ID ","We have not successfully logged in as an approver"
Environment.Value("TestCase_Log")="True"
End If
'Step43 to 50
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","CUSIP Profile","CUSIP",E
nvironment.Value("CUSIP_NAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step43 to 50:Approve the CUSIP det
ails","The CUSIP details are approved as required"
Else
Reporter.ReportEvent micFail,"Step43 to 50: Approve the CUSIP de
tails","The CUSIP details are not approved as required"
Environment.Value("TestCase_Log")="True"
End If

'Step51 to 55
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","DR Documentation","DR Na
me",Environment.Value("DRNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step51 to 55: Approve the DR Docum
entation","The DR Documentation is filled in correctly as required"
Else
Reporter.ReportEvent micFail,"Step51 to 55: Approve the DR Docum
entation","The DR Documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
'Step 56 to 61
Environment.Value("TestCase_Log")="True"
If Environment.Value("TCCURCOUNT")=2 Then
Call ApprovalFunction_CreateNewDR("MasterFile","Issuer Documentation","I
ssuer",Environment.value("ISSUERNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step56 to 61: Approve the
issuer documentation","The issuer documentation is approved as required"
Else
Reporter.ReportEvent micFail,"Step 56 to 61 : Approve th
e issuer documentation","The issuer documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
Else
Reporter.ReportEvent micPass,"Step56 to 61 : Approve the issuer
documentation","The issuer documentation already is approved"
End if

'Step 62 to 66
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","DR Profile","Name",Environme
nt.Value("DRNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step62 to 66: Approve and Batch th
e DR profile","The DR profile gets approved and batched successfully"
Else
Reporter.ReportEvent micFail,"Step62 to 66: Approve and Batch th
e DR Profile","The DR Profile gets approved and batched successfully"
Environment.Value("TestCase_Log")="True"
End If
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
Reporter.ReportEvent micDone,"Step67: Click on the Log out butto
n","The approver logs out successfully"
'Step68 to 75
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Relationship Management","MFLogin"
)
Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","D
R"))
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
Call DRSearchCriteria("MasterFile","Profile - DR Search")
Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
OriginOfDR=Browser("MasterFile").Page("DR Profile").WebEdit("DROrigin").
GetROProperty("value")
StatusOfDR=Browser("MasterFile").Page("DR Profile").WebList("Status").Ge
tROProperty("value")
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If StatusOfDR="Effective" and OriginOfDR="New Program" and Environment.Value
("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step67 to 74: Check whether the DR
has been made effective or not","The DR Has been made effective successfully"
Else
Reporter.ReportEvent micFail,"Step 67 to 75: Check whether the D
R has been made effective or not","The DR has not been made effective"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step 76
Browser("MasterFile").Page("DR Profile").WebElement("CUSIP Summary/Add")
.Click
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step76: Go to CUSIP Summary tab an
d look for Flag","The Flags are absent as required"
Else
Reporter.ReportEvent micFail,"Step76: Go to CUSIP Summary tab an
d look for Flag ","The flag is still present"
Environment.Value("TestCase_log")="True"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++
Public Function MFProfileDR_TC7()
Environment.Value("TestCase_Log")="True"
Environment.Value("CUSIP_NAME")=""
Environment.Value("DRNAME")=""
Environment.Value("ISSUERNAME")=""
'Step1
'Log into the ADR home page
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL",
"MFLogin"))
Call pageCheck_WebEdit("MasterFile","Login Page","username;j_pas
sword","")
Call pageCheck_WebButton("MasterFile","Login Page","Login","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is Dispalyed successfully with th
e Required Field"
Else
Reporter.ReportEvent micFail,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is NOT Dispalyed successfully wit
h the Required Field"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Calling the login function
Call login("MasterFile","Login Page","Relationship Management","
MFLogin")
' Check the MasterFile Application for the 4 links, User Name an
d the last Login Details
Call chkADRHomePage("MasterFile","Depositary Receipt Division's",Data
Table.Value("HomePageLinks","HomePageVerification"),DataTable.Value("UserFullNam
e","MFLogin" ))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass," Verifying the DR Home Pag
e","The DR Home Page is displayed successfully with Home Page Links and the User
Details"
Else
Reporter.ReportEvent micFail," Verifying the DR Home Pag
e","The DR Home Page is NOT displayed successfully with Home Page Links and the
User Details"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Step2
'Click on the masterFile button
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
Call chkMFCAHomePage("MasterFile","MasterFile",DataTable.Value("
MenuName","HomePageVerification"),DataTable.Value("UserFullName","MFLogin" ))
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is disaplyed successfully with the required Menu Ite
ms and also displays the Current Version"
Else
Reporter.ReportEvent micFail,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is NOT displayed successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step3
'Click on the Profile Link
Call check_Menu("MasterFile","MasterFile","Profile")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is Present in the Pr
ofile Menu"
Else
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is NOT Present in th
e Profile Menu"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step4
'Click on the DR Link
Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","DR"))
Call pageCheck_WebEditOR("MasterFile","Profile - DR Search","Iss
uerName;DRName")
Call pageCheck_WebListOR("MasterFile","Profile - DR Search","Cou
ntryOfManagement;DrOrigin;DRType;DRExchange;SorU;Status;SubStatus")
'Call pageCheck_WebElementinTable("MasterFile","Profile - DR Sea
rch","Name;Country of Management;Type;Status;Sub-Status;S/U;Effective Date;Termi
nation Date;Depository;Origin;Structure","")
intRC = Browser("MasterFile").Page("Profile - DR Search").WebTab
le("DR Search Results").RowCount
If intRC <3 Then
Reporter.ReportEvent micPass,"Verifying the Number of Ro
ws before entering the Search Criteria","There are No Results displayed"
Environment.Value("TestCase_Log")="True"
Else
Reporter.ReportEvent micFail,"Verifying the Number of Ro
ws before entering the Search Criteria","There are few Results displayed"
Call captureScreenshot()
Environment.Value("Execution_Log") = "False"
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 4 : Verifying the Fi
elds present in the Page Profile DR Search","The Required Fields are dispalyed"
Else
Reporter.ReportEvent micFail, "Step 4 : Verifying the Fi
elds present in the Page Profile DR Search","The Required Fields are NOT Present
"
Environment.Value("TestCase_Log") = "True"
End If
'Step5
'Selecting a Search criteria
Call DRSearchCriteria("MasterFile","Profile - DR Search")
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass, "Step 5 :Click on search with all
default values","The Required Results are displayed"
Else
Reporter.ReportEvent micFail, "Step 5 :Click on search with all
default values","The required search results do not appear"
Environment.Value("TestCase_Log") = "True"
End If
'Step6 to 19
Call CreateNewDR("MasterFile","Profile - DR Search","DR Profile","CUSIP
Profile","","DR")
If Environment.Value("Failure")="True" Then
Call select_Menu("MasterFile","Profile - DR Search","Hom
e;DR Home")
Exit Function
End If
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step6 to 19:Create a New DR and At
tach a CUSIP to it","The New DR with name as "& Environment.Value("DRNAME") &" a
nd CUSIP:"& Ucase(Environment.Value("CUSIP_NAME")) &" is created successfully o
n saving which we get a Yellow Flag"
Else
Reporter.ReportEvent micFail,"Step6 to 19 :Create a New DR and a
ttach a CUSIP to it","The New DR is not created successfully"
Environment.Value("TestCase_Log")="True"
End If

'Step20
Call click_WebElement("MasterFile","DR Profile","Offerings")
If Browser("MasterFile").Page("DR Profile").WebTable("Offerings").Exist(
2) Then
Reporter.ReportEvent micPass,"Step20: Check for the offerings ta
b","The details in the offering tab is as required"
Else
Reporter.ReportEvent micFail,"Step20: Check for the offerings ta
b","The Details in the offerings tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

'Step21
Call click_WebElement("MasterFile","DR Profile","Additional DR Exchanges
")
If Browser("MasterFile").Page("DR Profile").WebTable("Additional DR Exch
ange").Exist(2) Then
Reporter.ReportEvent micPass,"Step21: Check whether the Addition
al DR exchange Tab is as required","The Additional DR Exchanges Tab is as Requir
ed"
Else
Reporter.ReportEvent micFail,"Step21: Check whether the Addition
al exchange Tab is as required","The Additional DR exchanges tab is not present"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
' Call click_WebButton("MasterFile","DR Profile","Add_DREx
change")
' Call click_Image("MasterFile","DR Profile","ExchangeInfo
")
' Call operation_on_FrameObjects_WithName("MasterFile","DR
Profile","lookupFrame","WebEdit","searchString",dataTable.Value("DRExchangeForC
USIP","DR"))
' Call operation_on_FrameObjects_WithName("MasterFile","DR
Profile","lookupFrame","Image","Go","")
' Call SelectValueInsideFrame("MasterFile","DR Profile","l
ookupFrame",dataTable.Value("DREXchangeForCUSIP","DR"))
' Call set_WebEdit_Value("MasterFile","DR Profile","SEDOL"
,SEDOL)
' Call set_WebEdit_Value("MasterFile","DR Profile","Ticker
")
' Call click_Image("MasterFile","DR Profile","Save")
' If Environment.Value("TestCase_Log")=true Then
' Reporter.ReportEvent micPass,"Step22:Fill in the
Additional DR Exchanges Tab","The Additional DR exchanges tab gets filled"
' Else
' Reporter.ReportEvent micFail,"Step22: Fill in th
e Additional DR exchanges tab","The additional DR Exchange tab is not filled as
required"
' Environment.Value("TestCase_Log")=true
' End If
''Step23 and 24
'Call click_WebElement("MasterFile","DR Profile","Other DR Servi
ces")
'If Browser("MasterFile").Page("DR Profile").WebTable("Other DR
Services").Exist(2) Then
' Reporter.ReportEvent micPass,"Step23 and 24: Check wheth
er the Additional DR exchange Tab is as required","The Additional DR Exchanges T
ab is as Required"
'Else
' Reporter.ReportEvent micFail,"Step23 and 24: Check wheth
er the Additional exchange Tab is as required","The Additional DR exchanges tab
is not present"
'End If

If (dataTable.Value("Type","DR") <> "144A" And datatable.Value("Type","


DR") <> "RegS") And DataTable.Value("DepositoryName","DR") ="BNY" Then
Call click_WebElement("MasterFile","DR Profile","SEC Filing")
Call set_WebEdit_Value("MasterFile","DR Profile","CurrentF6ADS",
dataTable.Value("CurrentF6ADS","DR"))
Call set_WebEdit_Value("MasterFile","DR Profile","CurF6Number",d
ataTable.Value("CurF6Number","DR"))
Wait(2)
If DataTable.Value("F6FileDate","DR") <> "" Then
strDataTableValue = DataTable.Value("F6F
ileDate","DR")
strValue = Split(strDataTableValue,";",-
1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image("MasterFile","DR Profil
e","ShowCalendar_F6FileDate")
Call ClickIcon_SetDate("MasterFile","DR
Profile",strMonthValue,strYearValue,strDateValue)
End If
Call click_Image("MasterFile","DR Profile","Save")
End If
Call click_WebElement("MasterFile","DR Profile","Detail")
Call Select_Combo_Value("MasterFile","DR Profile","Status","Effective")
Call click_Image("MasterFile","DR Profile","Save")
Wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("Cancel").Click
End If
wait(3)
Call ClickonDRName("MasterFile","DR Profile",DataTable.Value("IssuerName
","DR"),"2")
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("Cancel").Click
End If
If Browser("MasterFile").Page("Issuer Profile").Exist(2) Then
Reporter.ReportEvent micPass," Check whether the Issuer profile
link is available and works as required","The Issuer profile link is available a
nd works as required"
Else
Reporter.ReportEvent micFail," Check whether the Issuer profile
link is available and works as required","The Issuer profile link is not availab
le"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step37
Call pageCheck_WebElement("MasterFile","Issuer Profile","Advisers;BNY Co
ntacts;Comments;Custodians;Detail;DR Services;Products;Und. Sec. Markets","")
If Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Ex
ist(2) and Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerDocume
ntation").Exist(2)Then
Reporter.ReportEvent micPass,"Check whether the issuer profile s
creen has been loaded or not","The issuer profile screen has been loaded as requ
ired"
Else
Reporter.ReportEvent micFail,"Check whether the issuer profile s
creen has been loaded or not","The issuer profile screen has not been loaded"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
Call click_WebElement("MasterFile","Issuer Profile","Detail")
Environment.Value("ISSUERNAME")=trim(get_WebEdit_Value("MasterFile","Iss
uer Profile","Name"))
If Environment.Value("TCCURCOUNT")=1 Then
Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerD
ocumentation").Click
Call Fill_Issuer_Documentation("MasterFile","Issuer Documentatio
n","DR")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Fill in the issuer Documen
tation and click on save","The Issuer documentation is done and saved"
Call ClickonDRName("MasterFile","Issuer Documentation",I
SSUERNAME,"2")
Else
Reporter.ReportEvent micFail,"Fill in the Issuer Documen
tation and click on save","The Issuer documentation is not filled properly"
Environment.Value("TestCase_Log")="True"
End If
End If
Call logoutfromApp("MasterFile","Issuer Profile")
'Step 23
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Approver","MFLogin")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass," Step23: Log into application usi
ng Approver ID","We have successfully logged in as an approver"
Else
Reporter.ReportEvent micFail," Step23: Log into the application
using Approver ID ","We have not successfully logged in as an approver"
Environment.Value("TestCase_Log")="True"
End If
'Step24 to 31
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","CUSIP Profile","CUSIP",E
nvironment.Value("CUSIP_NAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step24 to 31:Approve the CUSIP det
ails","The CUSIP details are approved as required"
Else
Reporter.ReportEvent micFail,"Step24 to 31: Approve the CUSIP de
tails","The CUSIP details are not approved as required"
Environment.Value("TestCase_Log")="True"
End If

Environment.Value("TestCase_Log")="True"
If Environment.Value("TCCURCOUNT")=1 Then
Call ApprovalFunction_CreateNewDR("MasterFile","Issuer Documenta
tion","Issuer",Environment.value("ISSUERNAME"),"Approved","Approved","Pending Ap
proval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Approve the issuer documen
tation","The issuer documentation is approved as required"
Else
Reporter.ReportEvent micFail," Approve the issuer docume
ntation","The issuer documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
Else
Reporter.ReportEvent micPass," : Approve the issuer documentatio
n","The issuer documentation already is approved"
End if
'
Wait(3)
'Step 32 to 37
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","DR Profile","Name",Environme
nt.Value("DRNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step32 to 37: Approve and Batch th
e DR profile","The DR profile gets approved and batched successfully"
Else
Reporter.ReportEvent micFail,"Step32 to 37: Approve and Batch th
e DR Profile","The DR Profile gets approved and batched successfully"
Environment.Value("TestCase_Log")="True"
End If
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
'Step38 to 45
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Relationship Management","MFLogin"
)
Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","D
R"))
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
Call DRSearchCriteria("MasterFile","Profile - DR Search")
Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
OriginOfDR=Browser("MasterFile").Page("DR Profile").WebEdit("DROrigin").
GetROProperty("value")
StatusOfDR=Browser("MasterFile").Page("DR Profile").WebList("Status").Ge
tROProperty("value")
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If StatusOfDR="Effective" and OriginOfDR="New Program" and Environment.V
alue("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step38 to 45: Check whether the DR
has been made effective or not","The DR Has been made effective successfully"
Else
Reporter.ReportEvent micFail,"Step 38 to 45: Check whether the D
R has been made effective or not","The DR has not been made effective"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step 46
Browser("MasterFile").Page("DR Profile").WebElement("CUSIP Summary/Add")
.Click
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step46: Go to CUSIP Summary tab an
d look for Flag","The Flags are absent as required"
Else
Reporter.ReportEvent micFail,"Step46: Go to CUSIP Summary tab an
d look for Flag ","The flag is still present"
Environment.Value("TestCase_Log")="True"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++
Public Function MFProfileDR_TC8()
Environment.Value("TestCase_Log")="True"
Environment.Value("CUSIP_NAME")=""
Environment.Value("DRNAME")=""
Environment.Value("ISSUERNAME")=""
'Step1
'Log into the ADR home page
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL",
"MFLogin"))
Call pageCheck_WebEdit("MasterFile","Login Page","username;j_pas
sword","")
Call pageCheck_WebButton("MasterFile","Login Page","Login","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is Dispalyed successfully with th
e Required Field"
Else
Reporter.ReportEvent micFail,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is NOT Dispalyed successfully wit
h the Required Field"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Calling the login function
Call login("MasterFile","Login Page","Relationship Management","
MFLogin")
' Check the MasterFile Application for the 4 links, User Name an
d the last Login Details
Call chkADRHomePage("MasterFile","Depositary Receipt Division's"
,DataTable.Value("HomePageLinks","HomePageVerification"),DataTable.Value("UserFu
llName","MFLogin" ))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass," Verifying the DR Home Pag
e","The DR Home Page is displayed successfully with Home Page Links and the User
Details"
Else
Reporter.ReportEvent micFail," Verifying the DR Home Pag
e","The DR Home Page is NOT displayed successfully with Home Page Links and the
User Details"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Step2
'Click on the masterFile button
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
Call chkMFCAHomePage("MasterFile","MasterFile",DataTable.Value("
MenuName","HomePageVerification"),DataTable.Value("UserFullName","MFLogin" ))
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is disaplyed successfully with the required Menu Ite
ms and also displays the Current Version"
Else
Reporter.ReportEvent micFail,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is NOT displayed successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step3
'Click on the Profile Link
Call check_Menu("MasterFile","MasterFile","Profile")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is Present in the Pr
ofile Menu"
Else
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is NOT Present in th
e Profile Menu"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step4
'Click on the DR Link
Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","DR"))
Call pageCheck_WebEditOR("MasterFile","Profile - DR Search","Iss
uerName;DRName")
Call pageCheck_WebListOR("MasterFile","Profile - DR Search","Cou
ntryOfManagement;DrOrigin;DRType;DRExchange;SorU;Status;SubStatus")
'Call pageCheck_WebElementinTable("MasterFile","Profile - DR Sea
rch","Name;Country of Management;Type;Status;Sub-Status;S/U;Effective Date;Termi
nation Date;Depository;Origin;Structure","")
intRC = Browser("MasterFile").Page("Profile - DR Search").WebTab
le("DR Search Results").RowCount
If intRC <3 Then
Reporter.ReportEvent micPass,"Verifying the Number of Ro
ws before entering the Search Criteria","There are No Results displayed"
Environment.Value("TestCase_Log")="True"
Else
Reporter.ReportEvent micFail,"Verifying the Number of Ro
ws before entering the Search Criteria","There are few Results displayed"
Call captureScreenshot()
Environment.Value("Execution_Log") = "False"
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 4 : Verifying the Fi
elds present in the Page Profile CUSIP Search","The Required Fields are dispalye
d"
Else
Reporter.ReportEvent micFail, "Step 4 : Verifying the Fi
elds present in the Page Profile CUSIP Search","The Required Fields are NOT Pres
ent"
Environment.Value("TestCase_Log") = "True"
End If
'Step5
'Selecting a Search criteria
Call DRSearchCriteria("MasterFile","Profile - DR Search")
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass, "Step 5 :Click on search w
ith all default values","The Required Results are displayed"
Else
Reporter.ReportEvent micFail, "Step 5 :Click on search w
ith all default values","The required search results do not appear"
Environment.Value("TestCase_Log") = "True"
End If
'Step6 to 20
Call CreateNewDR("MasterFile","Profile - DR Search","DR Profile"
,"CUSIP Profile","","DR")
If Environment.Value("Failure")="True" Then
Call select_Menu("MasterFile","Profile - DR Search","Hom
e;DR Home")
Exit Function
End If
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step6 to 20:Create a New D
R and Attach a CUSIP to it","The New DR with name as "& Environment.Value("DRNAM
E") &" and CUSIP:"& Ucase(Environment.Value("CUSIP_NAME")) &" is created succes
sfully on saving which we get a Yellow Flag"
Else
Reporter.ReportEvent micFail,"Step6 to 20 :Create a New
DR and attach a CUSIP to it","The New DR is not created successfully"
Environment.Value("TestCase_Log")="True"
End If

'Step21
Call click_WebElement("MasterFile","DR Profile","Offerings")
If Browser("MasterFile").Page("DR Profile").WebTable("Offerings"
).Exist(2) Then
Reporter.ReportEvent micPass,"Step21: Check for the offe
rings tab","The details in the offering tab is as required"
Else
Reporter.ReportEvent micFail,"Step21: Check for the offe
rings tab","The Details in the offerings tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

'Step22
Call click_WebElement("MasterFile","DR Profile","Additional DR Exchanges
")
If Browser("MasterFile").Page("DR Profile").WebTable("Additional DR Exch
ange").Exist(2) Then
Reporter.ReportEvent micPass,"Step22: Check whether the Addition
al DR exchange Tab is as required","The Additional DR Exchanges Tab is as Requir
ed"
Else
Reporter.ReportEvent micFail,"Step22: Check whether the Addition
al exchange Tab is as required","The Additional DR exchanges tab is not present"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
' Call click_WebButton("MasterFile","DR Profile","Add_DRExchange")
' Call click_Image("MasterFile","DR Profile","ExchangeInfo")
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","WebEdit","searchString",dataTable.Value("DRExchangeForCUSIP","D
R"))
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","Image","Go","")
' Call SelectValueInsideFrame("MasterFile","DR Profile","lookupFra
me",dataTable.Value("DREXchangeForCUSIP","DR"))
' Call set_WebEdit_Value("MasterFile","DR Profile","SEDOL",SEDOL)
' Call set_WebEdit_Value("MasterFile","DR Profile","Ticker")
' Call click_Image("MasterFile","DR Profile","Save")
' If Environment.Value("TestCase_Log")=true Then
' Reporter.ReportEvent micPass,"Step22:Fill in the Additio
nal DR Exchanges Tab","The Additional DR exchanges tab gets filled"
' Else
' Reporter.ReportEvent micFail,"Step22: Fill in the Additi
onal DR exchanges tab","The additional DR Exchange tab is not filled as required
"
' Environment.Value("TestCase_Log")=true
' End If
''Step23 and 24
' Call click_WebElement("MasterFile","DR Profile","Other DR Servic
es")
' If Browser("MasterFile").Page("DR Profile").WebTable("Other DR Services"
).Exist(2) Then
' Reporter.ReportEvent micPass,"Step 23 and 24: Check whether the
Additional DR exchange Tab is as required","The Additional DR Exchanges Tab is a
s Required"
' Else
' Reporter.ReportEvent micFail,"Step23 and 24: Check whether the A
dditional exchange Tab is as required","The Additional DR exchanges tab is not p
resent"
' End If
'Step25
If Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation"
).Exist(2) Then
Reporter.ReportEvent micPass,"Step25: Check whether the DR Docum
entation link is present or not","The DR Documentation link is present as requir
ed"
Else
Reporter.ReportEvent micFail,"Step25: Check whether the DR Docum
entation link is present or not","The DR Documentation link is not present as re
quired"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

'Step26
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation").c
lick
If Browser("MasterFile").Page("DR Documentation Detail").Exist(2) Then
Reporter.ReportEvent micPass,"Step26: Click on the DR Documentat
ion link","The DR Documentation link is clicked as required"
Else
Reporter.ReportEvent micFail,"Step26: Click on the DR Documentat
ion link","The DR Documentation link is not clicked"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step27 to 29
'Filling in the DR documentation
Call Fill_DR_Documentation("MasterFile","DR Documentation Detail")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step27 to 29: Fill the DR Document
ation and click on save","The DR documentation is done and saved and we navigate
d to the Issuer profile screen"
Else
Reporter.ReportEvent micFail,"Step27 to 29: Fill the DR Document
ation and click on save","The DR documentation is not done properly"
Environment.Value("TestCase_Log")="True"
End If
Wait(3)
Call click_WebElement("MasterFile","DR Profile","Detail")
If (dataTable.Value("Type","DR") <> "144A" Or datatable.Value("Type","D
R") <> "RegS") And DataTable.Value("DepositoryName","DR") ="BNY" Then
Call click_WebElement("MasterFile","DR Profile","SEC Filing")
Call set_WebEdit_Value("MasterFile","DR Profile","CurrentF6ADS",
dataTable.Value("CurrentF6ADS","DR"))
Call set_WebEdit_Value("MasterFile","DR Profile","CurF6Number",d
ataTable.Value("CurF6Number","DR"))
Wait(2)
If DataTable.Value("DepositoryName","DR")="BNY" And Datatable.Va
lue("Type","DR") <> "144A" And DataTable.Value("Type","DR") <> "Reg. S" Then
If DataTable.Value("F6FileDate","DR") <> "" Then
strDataTableValue = DataTable.Value("F6F
ileDate","DR")
strValue = Split(strDataTableValue,";",-
1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image("MasterFile","DR Profil
e","ShowCalendar_F6FileDate")
Call ClickIcon_SetDate("MasterFile","DR
Profile",strMonthValue,strYearValue,strDateValue)
End If
Else
If DataTable.Value("F6FileDate","DR") <> "" Then
strDataTableValue = DataTable.Value("F6F
ileDate","DR")
strValue = Split(strDataTableValue,";",-
1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image("MasterFile","DR Profil
e","ShowCalendar_F6FileDate")
Call ClickIcon_SetDate("MasterFile","DR
Profile",strMonthValue,strYearValue,strDateValue)
End If
End If
Call click_Image("MasterFile","DR Profile","Save")
End If
Call click_WebElement("MasterFile","DR Profile","Detail")
Call Select_Combo_Value("MasterFile","DR Profile","Status","Effective")
Call click_Image("MasterFile","DR Profile","Save")
Wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("Cancel").Click
End If
Call ClickonDRName("MasterFile","DR Profile",DataTable.Value("IssuerName
","DR"),"2")
Wait(4)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
'Step32
'Call pageCheck_WebElement("MasterFile","Issuer Profile","Advisers;BNY C
ontacts;Comments;Custodians;Detail;DR Services;Products;Und. Sec. Markets","")

If Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Ex
ist(2) and Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerDocume
ntation").Exist(2)Then
Reporter.ReportEvent micPass,"Step32: Check whether the issuer p
rofile screen has been loaded or not","The issuer profile screen has been loaded
as required"
Else
Reporter.ReportEvent micFail,"Step32: Check whether the issuer p
rofile screen has been loaded or not","The issuer profile screen has not been lo
aded"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step33
Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Details")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step33: Check whether the required
fields are present in the issuer profile screen detail tab","The required field
s are present as required"
Else
Reporter.ReportEvent micFail,"Step33: Check whether the required
fields are present in the issuer profile screen detail tab","The required field
s are not present"
Environment.Value("TestCase_Log")="True"
End If
'Step34
'Checking for the BNY contact tab
Browser("MasterFile").Page("Issuer Profile").WebElement("BNY Contacts").
Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","BNY Contact
s")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("BNY Contacts").Exist(2) Then
Reporter.ReportEvent micPass,"Step34: Check for the details in t
he BNY contacts tab","The details under the BNY contact tab is as required"
Else
Reporter.ReportEvent micFail,"Step34: Check for the details in t
he BNY contacts tab","The details under the BNY contact tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step35
'Checking for the Underlying security markets tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Und. Sec. Marke
ts").Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Und. Sec. M
arkets")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Underlying Security Market").Exist(2) Then
Reporter.ReportEvent micPass,"Step35: Check for the Underlying E
vent Tab","The underlying event tab is as required"
Else
Reporter.ReportEvent micFail,"Step35: Check for the underlying E
vent tab","The details under the underlying event tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step36
'Checking for the Custodian Tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Custodians").Cl
ick
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Custodians"
)
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Issuers Preferred Custodian").Exist(2)Then
Reporter.ReportEvent micPass,"Step36: Check for the Issuer preff
ered tab","The details in the Issuer preffered tab is as required"
Else
Reporter.ReportEvent micFail,"Step36: Check for the issuer preff
ered tab","The details in the issuer preffered is not present as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step37
'Checking for the Advisors tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Advisers").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Advisers")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Issuers Advisers").Exist(2)Then
Reporter.ReportEvent micPass,"Step37: Check for the Advisors tab
","The advisers tab details are as required"
Else
Reporter.ReportEvent micFail,"Step37: Check for the Advisors Tab
","The advisors tab details are as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step38
'Checking for the Products tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Products").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Products")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Products").Exist(2)Then
Reporter.ReportEvent micPass,"Step38: Check for the presence of
the products web table","The products web table is present as required"
Else
Reporter.ReportEvent micFail,"Step38: Check for the presence of
the products web table","The products web table is not present as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If

'Step39
'Checking for the DR services tab
Browser("MasterFile").Page("Issuer Profile").WebElement("DR Services").C
lick
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","DR Services
")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("DR Services").Exist(2) Then
Reporter.ReportEvent micPass,"Step39: Check for the presence of
the DR Services web table","The DR services web table is present as required"
Else
Reporter.ReportEvent micFail,"Step39: Check for the presence of
the DR Services web table","The DR Services web table is not present as required
"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step40
'Checking for the Comments tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Comments").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Comments")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Comments").Exist(2) Then
Reporter.ReportEvent micPass,"Step40: Check for the presence of
the comments table","The comments table is present as required"
Else
Reporter.ReportEvent micFail,"Step40: Check for the presence of
the comments table","The comments table is not present"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
Call click_WebElement("MasterFile","Issuer Profile","Detail")
Environment.Value("ISSUERNAME")=trim(get_WebEdit_Value("MasterFile","Iss
uer Profile","Name"))
If Environment.Value("TCCURCOUNT")=2 Then
Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerD
ocumentation").Click
Call Fill_Issuer_Documentation("MasterFile","Issuer Documentatio
n","DR")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Fill in the issuer Documen
tation and click on save","The Issuer documentation is done and saved"
Else
Reporter.ReportEvent micFail,"Fill in the Issuer Documen
tation and click on save","The Issuer documentation is not filled properly"
Environment.Value("TestCase_Log")="True"
End If
End If
'Call ClickonDRName("MasterFile","Issuer Documentation",ISSUERNAME,"2")
Call logoutfromApp("MasterFile","Issuer Documentation")
'Step 42
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Approver","MFLogin")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step42: Log into application using
Approver ID","We have successfully logged in as an approver"
Else
Reporter.ReportEvent micFail,"Step42: Log into the application u
sing Approver ID ","We have not successfully logged in as an approver"
Call captureScreenshot()
Environment.Value("Execution_log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step43 to 50
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","CUSIP Profile","CUSIP",E
nvironment.Value("CUSIP_NAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step43 to 50:Approve the CUSIP det
ails","The CUSIP details are approved as required"
Else
Reporter.ReportEvent micFail,"Step43 to 50: Approve the CUSIP de
tails","The CUSIP details are not approved as required"
Environment.Value("TestCase_Log")="True"
End If

'Step51 to 55
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","DR Documentation","DR Na
me",Environment.Value("DRNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step51 to 55: Approve the DR Docum
entation","The DR Documentation is filled in correctly as required"
Else
Reporter.ReportEvent micFail,"Step51 to 55: Approve the DR Docum
entation","The DR Documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
'Step 56 to 61
Environment.Value("TestCase_Log")="True"
If Environment.Value("TCCURCOUNT")=2 Then
Call ApprovalFunction_CreateNewDR("MasterFile","Issuer Documenta
tion","Issuer",Environment.value("ISSUERNAME"),"Approved","Approved","Pending Ap
proval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step56 to 61: Approve the
issuer documentation","The issuer documentation is approved as required"
Else
Reporter.ReportEvent micFail,"Step 56 to 61 : Approve th
e issuer documentation","The issuer documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
Else
Reporter.ReportEvent micPass,"Step56 to 61 : Approve the issuer
documentation","The issuer documentation already is approved"
End if
'Call logoutfromApp("MasterFile","Depositary Receipt Division's")
' Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
' Call login("MasterFile","Login Page","Relationship Management","MFLogin"
)
' Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
' Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","D
R"))
' Wait(3)
' Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
' Call click_Image("MasterFile","Profile - DR Search","Search")
' Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
'Step 62 to 67
Call ApprovalFunction_CreateNewDR("MasterFile","DR Profile","Name",Envir
onment.Value("DRNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step62 to 66: Approve and Batch th
e DR profile","The DR profile gets approved and batched successfully"
Else
Reporter.ReportEvent micFail,"Step62 to 66: Approve and Batch th
e DR Profile","The DR Profile gets approved and batched successfully"
Environment.Value("TestCase_Log")="True"
End If
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
'Step68 to 75
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Relationship Management","MFLogin"
)
Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","D
R"))
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
Call DRSearchCriteria("MasterFile","Profile - DR Search")
Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
OriginOfDR=Browser("MasterFile").Page("DR Profile").WebEdit("DROrigin").
GetROProperty("value")
StatusOfDR=Browser("MasterFile").Page("DR Profile").WebList("Status").Ge
tROProperty("value")
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If StatusOfDR="Effective" And OriginOfDR="New Program" And Environment.V
alue("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step68 to 75: Check whether the DR
has been made effective or not","The DR Has been made effective successfully"
Else
Reporter.ReportEvent micFail,"Step 68 to 76: Check whether the D
R has been made effective or not","The DR has not been made effective"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step 76
Browser("MasterFile").Page("DR Profile").WebElement("CUSIP Summary/Add")
.Click
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step76: Go to CUSIP Summary tab an
d look for Flag","The Flags are absent as required"
Else
Reporter.ReportEvent micFail,"Step76: Go to CUSIP Summary tab an
d look for Flag ","The flag is still present"
Environment.Value("TestCase_Log")="True"
End If

Call select_Menu("MasterFile","DR Profile","Home;DR Home")


End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++
Public Function MFProfileDR_TC9()
Environment.Value("TestCase_Log")="True"
Environment.Value("CUSIP_NAME")=""
Environment.Value("DRNAME")=""
Environment.Value("ISSUERNAME")=""
'Step1
'Log into the ADR home page+
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL",
"MFLogin"))
Call pageCheck_WebEdit("MasterFile","Login Page","username;j_pas
sword","")
Call pageCheck_WebButton("MasterFile","Login Page","Login","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is Dispalyed successfully with th
e Required Field"
Else
Reporter.ReportEvent micFail,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is NOT Dispalyed successfully wit
h the Required Field"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Calling the login function
Call login("MasterFile","Login Page","Relationship Management","
MFLogin")
' Check the MasterFile Application for the 4 links, User Name an
d the last Login Details
Call chkADRHomePage("MasterFile","Depositary Receipt Division's"
,DataTable.Value("HomePageLinks","HomePageVerification"),DataTable.Value("UserFu
llName","MFLogin" ))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass," Verifying the DR Home Pag
e","The DR Home Page is displayed successfully with Home Page Links and the User
Details"
Else
Reporter.ReportEvent micFail," Verifying the DR Home Pag
e","The DR Home Page is NOT displayed successfully with Home Page Links and the
User Details"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Step2
'Click on the masterFile button
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
Call chkMFCAHomePage("MasterFile","MasterFile",DataTable.Value("
MenuName","HomePageVerification"),DataTable.Value("UserFullName","MFLogin" ))
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is disaplyed successfully with the required Menu Ite
ms and also displays the Current Version"
Else
Reporter.ReportEvent micFail,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is NOT displayed successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step3
'Click on the Profile Link
Call check_Menu("MasterFile","MasterFile","Profile")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is Present in the Pr
ofile Menu"
Else
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is NOT Present in th
e Profile Menu"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Step4
'Click on the DR Link
Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","DR"))
Call pageCheck_WebEditOR("MasterFile","Profile - DR Search","Iss
uerName;DRName")
Call pageCheck_WebListOR("MasterFile","Profile - DR Search","Cou
ntryOfManagement;DrOrigin;DRType;DRExchange;SorU;Status;SubStatus")
'Call pageCheck_WebElementinTable("MasterFile","Profile - DR Sea
rch","Name;Country of Management;Type;Status;Sub-Status;S/U;Effective Date;Termi
nation Date;Depository;Origin;Structure","")
intRC = Browser("MasterFile").Page("Profile - DR Search").WebTab
le("DR Search Results").RowCount
If intRC <3 Then
Reporter.ReportEvent micPass,"Verifying the Number of Ro
ws before entering the Search Criteria","There are No Results displayed"
Environment.Value("TestCase_Log")="True"
Else
Reporter.ReportEvent micFail,"Verifying the Number of Ro
ws before entering the Search Criteria","There are few Results displayed"
Call captureScreenshot()
Environment.Value("Execution_Log") = "False"
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 4 : Verifying the Fi
elds present in the Page Profile CUSIP Search","The Required Fields are dispalye
d"
Else
Reporter.ReportEvent micFail, "Step 4 : Verifying the Fi
elds present in the Page Profile CUSIP Search","The Required Fields are NOT Pres
ent"
Environment.Value("TestCase_Log") = "True"
End If
'Step5
'Selecting a Search criteria
Call DRSearchCriteria("MasterFile","Profile - DR Search")
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass, "Step 5 :Click on search with all
default values","The Required Results are displayed"
Else
Reporter.ReportEvent micFail, "Step 5 :Click on search with all
default values","The required search results do not appear"
Environment.Value("TestCase_Log") = "True"
End If
'Step6 to 19
Call CreateNewDR("MasterFile","Profile - DR Search","DR Profile","CUSIP
Profile","","DR")
If Environment.Value("Failure")="True" Then
Call select_Menu("MasterFile","Profile - DR Search","Hom
e;DR Home")
Exit Function
End If
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step6 to 19:Create a New DR and At
tach a CUSIP to it","The New DR with name as "& Environment.Value("DRNAME") &" a
nd CUSIP:"& Ucase(Environment.Value("CUSIP_NAME")) &" is created successfully o
n saving which we get a Yellow Flag"
Else
Reporter.ReportEvent micFail,"Step6 to 19 :Create a New DR and a
ttach a CUSIP to it","The New DR is not created successfully"
Environment.Value("TestCase_Log")="True"
End If

'Step20
Call click_WebElement("MasterFile","DR Profile","Offerings")
If Browser("MasterFile").Page("DR Profile").WebTable("Offerings").Exist(
2) Then
Reporter.ReportEvent micPass,"Step20: Check for the offerings ta
b","The details in the offering tab is as required"
Else
Reporter.ReportEvent micFail,"Step20: Check for the offerings ta
b","The Details in the offerings tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

'Step21
Call click_WebElement("MasterFile","DR Profile","Additional DR Exchanges
")
If Browser("MasterFile").Page("DR Profile").WebTable("Additional DR Exch
ange").Exist(2) Then
Reporter.ReportEvent micPass,"Step21: Check whether the Addition
al DR exchange Tab is as required","The Additional DR Exchanges Tab is as Requir
ed"
Else
Reporter.ReportEvent micFail,"Step21: Check whether the Addition
al exchange Tab is as required","The Additional DR exchanges tab is not present"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
' Call click_WebButton("MasterFile","DR Profile","Add_DRExchange")
' Call click_Image("MasterFile","DR Profile","ExchangeInfo")
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","WebEdit","searchString",dataTable.Value("DRExchangeForCUSIP","D
R"))
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","Image","Go","")
' Call SelectValueInsideFrame("MasterFile","DR Profile","lookupFra
me",dataTable.Value("DREXchangeForCUSIP","DR"))
' Call set_WebEdit_Value("MasterFile","DR Profile","SEDOL",SEDOL)
' Call set_WebEdit_Value("MasterFile","DR Profile","Ticker")
' Call click_Image("MasterFile","DR Profile","Save")
' If Environment.Value("TestCase_Log")=true Then
' Reporter.ReportEvent micPass,"Step22:Fill in the Additio
nal DR Exchanges Tab","The Additional DR exchanges tab gets filled"
' Else
' Reporter.ReportEvent micFail,"Step22: Fill in the Additi
onal DR exchanges tab","The additional DR Exchange tab is not filled as required
"
' Environment.Value("TestCase_Log")=true
' End If
''Step23 and 24
'Call click_WebElement("MasterFile","DR Profile","Other DR Services")
'If Browser("MasterFile").Page("DR Profile").WebTable("Other DR Services
").Exist(2) Then
' Reporter.ReportEvent micPass,"Step23 and 24: Check whether the A
dditional DR exchange Tab is as required","The Additional DR Exchanges Tab is as
Required"
'Else
' Reporter.ReportEvent micFail,"Step23 and 24: Check whether the A
dditional exchange Tab is as required","The Additional DR exchanges tab is not p
resent"
'End If
If (dataTable.Value("Type","DR") <> "144A" And datatable.Value("Type","
DR") <> "RegS") And DataTable.Value("DepositoryName","DR") ="BNY" Then
Call click_WebElement("MasterFile","DR Profile","SEC Filing")
Call set_WebEdit_Value("MasterFile","DR Profile","CurrentF6ADS",
dataTable.Value("CurrentF6ADS","DR"))
Call set_WebEdit_Value("MasterFile","DR Profile","CurF6Number",d
ataTable.Value("CurF6Number","DR"))
Wait(2)
If DataTable.Value("F6FileDate","DR") <> "" Then
strDataTableValue = DataTable.Value("F6F
ileDate","DR")
strValue = Split(strDataTableValue,";",-
1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image("MasterFile","DR Profil
e","ShowCalendar_F6FileDate")
Call ClickIcon_SetDate("MasterFile","DR
Profile",strMonthValue,strYearValue,strDateValue)
End If
Call click_Image("MasterFile","DR Profile","Save")
End If
Call click_WebElement("MasterFile","DR Profile","Detail")
Call Select_Combo_Value("MasterFile","DR Profile","Status","Effective")
Call click_Image("MasterFile","DR Profile","Save")
Wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("Cancel").Click
End If
Call ClickonDRName("MasterFile","DR Profile",DataTable.Value("IssuerName","D
R"),"2")
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("Cancel").Click
End If

If Browser("MasterFile").Page("Issuer Profile").Exist(2) Then


Reporter.ReportEvent micPass," Check whether the Issuer profile
link is available and works as required","The Issuer profile link is available a
nd works as required"
Else
Reporter.ReportEvent micFail," Check whether the Issuer profile
link is available and works as required","The Issuer profile link is not availab
le"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
Call logoutfromApp("MasterFile","Issuer Profile")
'Step 23
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Approver","MFLogin")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass," Step23: Log into application usi
ng Approver ID","We have successfully logged in as an approver"
Else
Reporter.ReportEvent micFail," Step23: Log into the application
using Approver ID ","We have not successfully logged in as an approver"
Environment.Value("TestCase_Log")="True"
End If
'Step24 to 31
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","CUSIP Profile","CUSIP",E
nvironment.Value("CUSIP_NAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step24 to 31:Approve the CUSIP det
ails","The CUSIP details are approved as required"
Else
Reporter.ReportEvent micFail,"Step24 to 31: Approve the CUSIP de
tails","The CUSIP details are not approved as required"
Environment.Value("TestCase_Log")="True"
End If
Environment.Value("TestCase_Log")="True"
If Environment.Value("TCCURCOUNT")=1 Then
Call ApprovalFunction_CreateNewDR("MasterFile","Issuer Documenta
tion","Issuer",Environment.value("ISSUERNAME"),"Approved","Approved","Pending Ap
proval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Approve the issuer documen
tation","The issuer documentation is approved as required"
Else
Reporter.ReportEvent micFail,"Approve the issuer documen
tation","The issuer documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
Else
Reporter.ReportEvent micPass," : Approve the issuer documentatio
n","The issuer documentation already is approved"
End if
Call logoutfromApp("MasterFile","Issuer Documentation")
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Relationship Management","MFLogin"
)
Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","D
R"))
Wait(3)
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
Call click_Image("MasterFile","Profile - DR Search","Search")
Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
'Step 32 to 37
Environment.Value("TestCase_Log")="True"
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Approver","MFLogin")
Call ApprovalFunction_CreateNewDR("MasterFile","DR Profile","Name",Envir
onment.Value("DRNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step32 to 37: Approve and Batch th
e DR profile","The DR profile gets approved and batched successfully"
Else
Reporter.ReportEvent micFail,"Step32 to 37: Approve and Batch th
e DR Profile","The DR Profile gets approved and batched successfully"
Environment.Value("TestCase_Log")="True"
End If
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
'Step38 to 45
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Relationship Management","MFLogin"
)
Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","D
R"))
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
Call DRSearchCriteria("MasterFile","Profile - DR Search")
Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
OriginOfDR=Browser("MasterFile").Page("DR Profile").WebEdit("DROrigin").
GetROProperty("value")
StatusOfDR=Browser("MasterFile").Page("DR Profile").WebList("Status").Ge
tROProperty("value")
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If StatusOfDR="Effective" and OriginOfDR="New Program" and Environment.V
alue("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step38 to 45: Check whether the DR
has been made effective or not","The DR Has been made effective successfully"
Else
Reporter.ReportEvent micFail,"Step 38 to 45: Check whether the D
R has been made effective or not","The DR has not been made effective"
Call captureScreenshot()
Environment.Value("Execution_log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step 46
Browser("MasterFile").Page("DR Profile").WebElement("CUSIP Summary/Add")
.Click
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step46: Go to CUSIP Summary tab an
d look for Flag","The Flags are absent as required"
Else
Reporter.ReportEvent micFail,"Step46: Go to CUSIP Summary tab an
d look for Flag ","The flag is still present"
Environment.Value("TestCase_log")="True"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++
Public Function MFProfileDR_TC10()
Environment.Value("TestCase_Log")="True"
Environment.Value("CUSIP_NAME")=""
Environment.Value("DRNAME")=""
Environment.Value("ISSUERNAME")=""
'Step1
'Log into the ADR home page
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL",
"MFLogin"))
Call pageCheck_WebEdit("MasterFile","Login Page","username;j_pas
sword","")
Call pageCheck_WebButton("MasterFile","Login Page","Login","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is Dispalyed successfully with th
e Required Field"
Else
Reporter.ReportEvent micFail,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is NOT Dispalyed successfully wit
h the Required Field"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Calling the login function
Call login("MasterFile","Login Page","Relationship Management","
MFLogin")
' Check the MasterFile Application for the 4 links, User Name an
d the last Login Details
Call chkADRHomePage("MasterFile","Depositary Receipt Division's"
,DataTable.Value("HomePageLinks","HomePageVerification"),DataTable.Value("UserFu
llName","MFLogin" ))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass," Verifying the DR Home Pag
e","The DR Home Page is displayed successfully with Home Page Links and the User
Details"
Else
Reporter.ReportEvent micFail," Verifying the DR Home Pag
e","The DR Home Page is NOT displayed successfully with Home Page Links and the
User Details"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Step2
'Click on the masterFile button
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
Call chkMFCAHomePage("MasterFile","MasterFile",DataTable.Value("
MenuName","HomePageVerification"),DataTable.Value("UserFullName","MFLogin" ))
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is disaplyed successfully with the required Menu Ite
ms and also displays the Current Version"
Else
Reporter.ReportEvent micFail,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is NOT displayed successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step3
'Click on the Profile Link
Call check_Menu("MasterFile","MasterFile","Profile")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is Present in the Pr
ofile Menu"
Else
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is NOT Present in th
e Profile Menu"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Step4
'Click on the DR Link
Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","DR"))
Call pageCheck_WebEditOR("MasterFile","Profile - DR Search","Iss
uerName;DRName")
Call pageCheck_WebListOR("MasterFile","Profile - DR Search","Cou
ntryOfManagement;DrOrigin;DRType;DRExchange;SorU;Status;SubStatus")
'Call pageCheck_WebElementinTable("MasterFile","Profile - DR Sea
rch","Name;Country of Management;Type;Status;Sub-Status;S/U;Effective Date;Termi
nation Date;Depository;Origin;Structure","")
intRC = Browser("MasterFile").Page("Profile - DR Search").WebTable("DR S
earch Results").RowCount
If intRC <3 Then
Reporter.ReportEvent micPass,"Verifying the Number of Ro
ws before entering the Search Criteria","There are No Results displayed"
Environment.Value("TestCase_Log")="True"
Else
Reporter.ReportEvent micFail,"Verifying the Number of Ro
ws before entering the Search Criteria","There are few Results displayed"
Call captureScreenshot()
Environment.Value("Execution_Log") = "False"
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 4 : Verifying the Fi
elds present in the Page Profile CUSIP Search","The Required Fields are dispalye
d"
Else
Reporter.ReportEvent micFail, "Step 4 : Verifying the Fi
elds present in the Page Profile CUSIP Search","The Required Fields are NOT Pres
ent"
Environment.Value("TestCase_Log") = "True"
End If
'Step5
'Selecting a Search criteria
Call DRSearchCriteria("MasterFile","Profile - DR Search")
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass, "Step 5 :Click on search with all
default values","The Required Results are displayed"
Else
Reporter.ReportEvent micFail, "Step 5 :Click on search with all
default values","The required search results do not appear"
Environment.Value("TestCase_Log") = "True"
End If
Environment.Value("Failure")="False"
'Step6 to 19
Call CreateNewDR("MasterFile","Profile - DR Search","DR Profile","CUSIP
Profile","","DR")
If Environment.Value("Failure")="True" Then
Call select_Menu("MasterFile","Profile - DR Search","Home;DR Hom
e")
Exit Function
End If
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step6 to 19:Create a New DR and At
tach a CUSIP to it","The New DR with name as "& Environment.Value("DRNAME") &" a
nd CUSIP:"& Ucase(Environment.Value("CUSIP_NAME")) &" is created successfully o
n saving which we get a Yellow Flag"
Else
Reporter.ReportEvent micFail,"Step6 to 19 :Create a New DR and a
ttach a CUSIP to it","The New DR is not created successfully"
Environment.Value("TestCase_Log")="True"
End If

'Step20
Call click_WebElement("MasterFile","DR Profile","Offerings")
If Browser("MasterFile").Page("DR Profile").WebTable("Offerings").Exist(
2) Then
Reporter.ReportEvent micPass,"Step20: Check for the offerings ta
b","The details in the offering tab is as required"
Else
Reporter.ReportEvent micFail,"Step20: Check for the offerings ta
b","The Details in the offerings tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_log")="False"
End If

'Step21
Call click_WebElement("MasterFile","DR Profile","Additional DR Exchanges
")
If Browser("MasterFile").Page("DR Profile").WebTable("Additional DR Exch
ange").Exist(2) Then
Reporter.ReportEvent micPass,"Step21: Check whether the Addition
al DR exchange Tab is as required","The Additional DR Exchanges Tab is as Requir
ed"
Else
Reporter.ReportEvent micFail,"Step21: Check whether the Addition
al exchange Tab is as required","The Additional DR exchanges tab is not present"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
' Call click_WebButton("MasterFile","DR Profile","Add_DRExchange")
' Call click_Image("MasterFile","DR Profile","ExchangeInfo")
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","WebEdit","searchString",dataTable.Value("DRExchangeForCUSIP","D
R"))
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","Image","Go","")
' Call SelectValueInsideFrame("MasterFile","DR Profile","lookupFra
me",dataTable.Value("DREXchangeForCUSIP","DR"))
' Call set_WebEdit_Value("MasterFile","DR Profile","SEDOL",SEDOL)
' Call set_WebEdit_Value("MasterFile","DR Profile","Ticker")
' Call click_Image("MasterFile","DR Profile","Save")
' If Environment.Value("TestCase_Log")=true Then
' Reporter.ReportEvent micPass,"Step22:Fill in the Additio
nal DR Exchanges Tab","The Additional DR exchanges tab gets filled"
' Else
' Reporter.ReportEvent micFail,"Step22: Fill in the Additi
onal DR exchanges tab","The additional DR Exchange tab is not filled as required
"
' Environment.Value("TestCase_Log")=true
' End If
''Step23 and 24
'Call click_WebElement("MasterFile","DR Profile","Other DR Services")
'If Browser("MasterFile").Page("DR Profile").WebTable("Other DR Services
").Exist(2) Then
' Reporter.ReportEvent micPass,"Step23 and 24: Check whether the A
dditional DR exchange Tab is as required","The Additional DR Exchanges Tab is as
Required"
'Else
' Reporter.ReportEvent micFail,"Step23 and 24: Check whether the A
dditional exchange Tab is as required","The Additional DR exchanges tab is not p
resent"
'End If
If (dataTable.Value("Type","DR") <> "144A" And datatable.Value("Type",
"DR") <> "RegS") And DataTable.Value("DepositoryName","DR") ="BNY" Then
Call click_WebElement("MasterFile","DR Profile","SEC Filing")
Call set_WebEdit_Value("MasterFile","DR Profile","CurrentF6ADS",
dataTable.Value("CurrentF6ADS","DR"))
Call set_WebEdit_Value("MasterFile","DR Profile","CurF6Number",d
ataTable.Value("CurF6Number","DR"))
Wait(2)
If DataTable.Value("F6FileDate","DR") <> "" Then
strDataTableValue = DataTable.Value("F6F
ileDate","DR")
strValue = Split(strDataTableValue,";",-
1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image("MasterFile","DR Profil
e","ShowCalendar_F6FileDate")
Call ClickIcon_SetDate("MasterFile","DR
Profile",strMonthValue,strYearValue,strDateValue)
End If
Call click_Image("MasterFile","DR Profile","Save")
Wait(4)
End If
Call click_WebElement("MasterFile","DR Profile","Detail")
Call Select_Combo_Value("MasterFile","DR Profile","Status","Effective")
Call click_Image("MasterFile","DR Profile","Save")
Wait(3)
Wait(4)
Wait(4)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If

Call ClickonDRName("MasterFile","DR Profile",DataTable.Value("IssuerName


","DR"),"2")
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").E
xist(2) Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
If Browser("MasterFile").Page("Issuer Profile").Exist(2) Then
Reporter.ReportEvent micPass," Check whether the Issuer profile
link is available and works as required","The Issuer profile link is available a
nd works as required"
Else
Reporter.ReportEvent micFail," Check whether the Issuer profile
link is available and works as required","The Issuer profile link is not availab
le"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step37
'Call pageCheck_WebElement("MasterFile","Issuer Profile","Advisers;BNY C
ontacts;Comments;Custodians;Detail;DR Services;Products;Und. Sec. Markets","")
If Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Ex
ist(2) and Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerDocume
ntation").Exist(2)Then
Reporter.ReportEvent micPass,"Check whether the issuer profile s
creen has been loaded or not","The issuer profile screen has been loaded as requ
ired"
Else
Reporter.ReportEvent micFail,"Check whether the issuer profile s
creen has been loaded or not","The issuer profile screen has not been loaded"
Call captureScreenshot()
Environment.Value("Execution_log")="False"
Environment.Value("TestCase_Log")="True"
End If
Call click_WebElement("MasterFile","Issuer Profile","Detail")
Environment.Value("ISSUERNAME")=trim(get_WebEdit_Value("MasterFile","Iss
uer Profile","Name"))
If Environment.Value("TCCURCOUNT")=1 Then
Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerD
ocumentation").Click
Call Fill_Issuer_Documentation("MasterFile","Issuer Documentatio
n","DR")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Fill in the issuer Documen
tation and click on save","The Issuer documentation is done and saved"
Call ClickonDRName("MasterFile","Issuer Documentation",I
SSUERNAME,"2")
Else
Reporter.ReportEvent micFail,"Fill in the Issuer Documen
tation and click on save","The Issuer documentation is not filled properly"
Environment.Value("TestCase_Log")="True"
End If
End If
Call logoutfromApp("MasterFile","Issuer Profile")
'Step 23
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Approver","MFLogin")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass," Step23: Log into application usi
ng Approver ID","We have successfully logged in as an approver"
Else
Reporter.ReportEvent micFail," Step23: Log into the application
using Approver ID ","We have not successfully logged in as an approver"
Environment.Value("TestCase_Log")="True"
End If
'Step24 to 31
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","CUSIP Profile","CUSIP",E
nvironment.Value("CUSIP_NAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step24 to 31:Approve the CUSIP det
ails","The CUSIP details are approved as required"
Else
Reporter.ReportEvent micFail,"Step24 to 31: Approve the CUSIP de
tails","The CUSIP details are not approved as required"
Environment.Value("TestCase_Log")="True"
End If

Environment.Value("TestCase_Log")="True"
If Environment.Value("TCCURCOUNT")=1 Then
Call ApprovalFunction_CreateNewDR("MasterFile","Issuer Documenta
tion","Issuer",Environment.value("ISSUERNAME"),"Approved","Approved","Pending Ap
proval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Approve the issuer documen
tation","The issuer documentation is approved as required"
Else
Reporter.ReportEvent micFail," Approve the issuer docume
ntation","The issuer documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
Else
Reporter.ReportEvent micPass," : Approve the issuer documentatio
n","The issuer documentation already is approved"
End if

'Step 32 to 37
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","DR Profile","Name",Envir
onment.Value("DRNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step32 to 37: Approve and Batch th
e DR profile","The DR profile gets approved and batched successfully"
Else
Reporter.ReportEvent micFail,"Step32 to 37: Approve and Batch th
e DR Profile","The DR Profile gets approved and batched successfully"
Environment.Value("TestCase_Log")="True"
End If
Call logoutfromApp("MasterFile","Issuer Profile")
'Step38 to 45
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Relationship Management","MFLogin"
)
Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","D
R"))
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
Call DRSearchCriteria("MasterFile","Profile - DR Search")
Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
OriginOfDR=Browser("MasterFile").Page("DR Profile").WebEdit("DROrigin").
GetROProperty("value")
StatusOfDR=Browser("MasterFile").Page("DR Profile").WebList("Status").Ge
tROProperty("value")
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If StatusOfDR="Effective" and OriginOfDR="New Program" and Environment.Value
("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step38 to 45: Check whether the DR
has been made effective or not","The DR Has been made effective successfully"
Else
Reporter.ReportEvent micFail,"Step 38 to 45: Check whether the D
R has been made effective or not","The DR has not been made effective"
Call captureScreenshot()
Environment.Value("Execution_log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step 46
Browser("MasterFile").Page("DR Profile").WebElement("CUSIP Summary/Add")
.Click
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step46: Go to CUSIP Summar
y tab and look for Flag","The Flags are absent as required"
Else
Reporter.ReportEvent micFail,"Step46: Go to CUSIP Summar
y tab and look for Flag ","The flag is still present"
Environment.Value("TestCase_log")="True"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++
Public Function MFProfileDR_TC11()
Environment.Value("TestCase_Log")="True"
Environment.Value("CUSIP_NAME")=""
Environment.Value("DRNAME")=""
Environment.Value("ISSUERNAME")=""
'Step1
'Log into the ADR home page
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL",
"MFLogin"))
Call pageCheck_WebEdit("MasterFile","Login Page","username;j_pas
sword","")
Call pageCheck_WebButton("MasterFile","Login Page","Login","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is Dispalyed successfully with th
e Required Field"
Else
Reporter.ReportEvent micFail,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is NOT Dispalyed successfully wit
h the Required Field"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Calling the login function
Call login("MasterFile","Login Page","Relationship Management","
MFLogin")
' Check the MasterFile Application for the 4 links, User Name an
d the last Login Details
Call chkADRHomePage("MasterFile","Depositary Receipt Division's"
,DataTable.Value("HomePageLinks","HomePageVerification"),DataTable.Value("UserFu
llName","MFLogin" ))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass," Verifying the DR Home Pag
e","The DR Home Page is displayed successfully with Home Page Links and the User
Details"
Else
Reporter.ReportEvent micFail," Verifying the DR Home Pag
e","The DR Home Page is NOT displayed successfully with Home Page Links and the
User Details"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Step2
'Click on the masterFile button
Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
Call chkMFCAHomePage("MasterFile","MasterFile",DataTable.Value("MenuName
","HomePageVerification"),DataTable.Value("UserFullName","MFLogin" ))
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass,"Step 2: Verfiying the MF Home Page
","The MF Home Page is disaplyed successfully with the required Menu Items and a
lso displays the Current Version"
Else
Reporter.ReportEvent micFail,"Step 2: Verfiying the MF Home Page
","The MF Home Page is NOT displayed successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step3
'Click on the Profile Link
Call check_Menu("MasterFile","MasterFile","Profile")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is Present in the Pr
ofile Menu"
Else
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is NOT Present in th
e Profile Menu"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step4
'Click on the DR Link
Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","DR"))
Call pageCheck_WebEditOR("MasterFile","Profile - DR Search","Iss
uerName;DRName")
Call pageCheck_WebListOR("MasterFile","Profile - DR Search","Cou
ntryOfManagement;DrOrigin;DRType;DRExchange;SorU;Status;SubStatus")
'Call pageCheck_WebElementinTable("MasterFile","Profile - DR Sea
rch","Name;Country of Management;Type;Status;Sub-Status;S/U;Effective Date;Termi
nation Date;Depository;Origin;Structure","")
intRC = Browser("MasterFile").Page("Profile - DR Search").WebTab
le("DR Search Results").RowCount
If intRC <3 Then
Reporter.ReportEvent micPass,"Verifying the Number of Ro
ws before entering the Search Criteria","There are No Results displayed"
Environment.Value("TestCase_Log")="True"
Else
Reporter.ReportEvent micFail,"Verifying the Number of Ro
ws before entering the Search Criteria","There are few Results displayed"
Call captureScreenshot()
Environment.Value("Execution_Log") = "False"
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 4 : Verifying the Fi
elds present in the Page Profile CUSIP Search","The Required Fields are dispalye
d"
Else
Reporter.ReportEvent micFail, "Step 4 : Verifying the Fi
elds present in the Page Profile CUSIP Search","The Required Fields are NOT Pres
ent"
Environment.Value("TestCase_Log") = "True"
End If
'Step5
'Selecting a Search criteria
Call DRSearchCriteria("MasterFile","Profile - DR Search")
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass, "Step 5 :Click on search with all
default values","The Required Results are displayed"
Else
Reporter.ReportEvent micFail, "Step 5 :Click on search with all
default values","The required search results do not appear"
Environment.Value("TestCase_Log") = "True"
End If
'Step6 to 24
Call CreateNewDR("MasterFile","Profile - DR Search","DR Profile","CUSIP
Profile","","DR")
If Environment.Value("Failure")="True" Then
Call select_Menu("MasterFile","Profile - DR Search","Hom
e;DR Home")
Exit Function
End If
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step6 to 24:Create a New DR and At
tach a CUSIP to it","The New DR with name as "& Environment.Value("DRNAME") &" a
nd CUSIP:"& Ucase(Environment.Value("CUSIP_NAME")) &" is created successfully o
n saving which we get a Yellow Flag"
Else
Reporter.ReportEvent micFail,"Step6 to 24 :Create a New DR and a
ttach a CUSIP to it","The New DR is not created successfully"
Environment.Value("TestCase_Log")="True"
End If
Call Select_Combo_Value("MasterFile","DR Profile","Status","Effective")
Call click_Image("MasterFile","DR Profile","Save")
Wait(4)
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Change the status of the DR from c
ommited to effective and save","The DR gets saved as required"
Else
Reporter.ReportEvent micFail,"Change the status of the DR from c
ommitted to effective and save","The DR does not get saved as required"
Environment.Value("TestCase_Log")="True"
Environment.Value("Execution_Log")="False"
End If
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("Cancel").Click
End If
Wait(4)
Wait(4)
If DataTable.Value("DepositoryName","DR") <> "BNY" And DataTable.Value(
"Sponsored","DR") <> "S" And DataTable.Value("Type","DR")<>"Reg. S" Then
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile","Valida
tion Error NonBNY2","DR Documentation has not been entered")
Browser(strBrowserName).Page("DR Profile").Image("Close").Click
ElseIf DataTable.Value("DepositoryName","DR") = "BNY" And DataTable.Valu
e("Sponsored","DR") <> "S" Or DataTable.Value("Type","DR")="Reg. S"Then
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile","Valida
tion Error NonBNY","DR Documentation has not been entered")
Browser(strBrowserName).Page("DR Profile").Image("Close").Click
Else
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile","Valida
tion Error","DR Documentation has not been entered")
Browser("MasterFile").Page("DR Profile").Image("Close").Click
End If
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step25: Check for the Validation m
essage in the DR profile screen","The validation message appears as required"
Else
Reporter.ReportEvent micFail,"Step25: Check for the Validation m
essage in the DR profile screen","The validation message does not appear as requ
ired"
Environment.Value("TestCase_Log")="True"
Environment.Value("Execution_Log")="False"
End If
Call Select_Combo_Value("MasterFile","DR Profile","Status","Committed")
Call click_Image("MasterFile","DR Profile","Save")
Wait(5)
'Step20
Call click_WebElement("MasterFile","DR Profile","Offerings")
If Browser("MasterFile").Page("DR Profile").WebTable("Offerings").Exist(
2) Then
Reporter.ReportEvent micPass,"Check for the offerings tab","The
details in the offering tab is as required"
Else
Reporter.ReportEvent micFail," Check for the offerings tab","The
Details in the offerings tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

Call Fill_AdditionalDRExchangesTab("MasterFile","DR Profile")


If Environment.Value ("TestCase_Log")="True" Then
Reporter.ReportEvent micPass ,"Fill in the offering and Additio
nal DR Exchanges tab","The Offerings and Additional DR Exchanges tab are filled
as required"
Else
Reporter.ReportEvent micFail ,"Fill in the offering and additio
nal DR exchanges tab as required","The required tAbs are not filled in correctly
"
Environment.Value("TestCase_Log")="True"
End If
Wait(4)
Wait(4)

'Step26
If Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation"
).Exist(2) Then
Reporter.ReportEvent micPass,"Step26: Check whether the DR Docum
entation link is present or not","The DR Documentation link is present as requir
ed"
Else
Reporter.ReportEvent micFail,"Step26: Check whether the DR Docum
entation link is present or not","The DR Documentation link is not present as re
quired"
Call captureScreenshot()
Environment.Value("Execution_log")="False"
End If
'Step27
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation").C
lick
If Browser("MasterFile").Page("DR Profile").Exist(3) Then
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumenta
tion").Click
End If
Wait(3)
If Browser("MasterFile").Page("DR Documentation Detail").Exist(2
) Then
Reporter.ReportEvent micPass,"Step27: Click on the DR Do
cumentation link","The DR Documentation link is clicked as required"
Else
Reporter.ReportEvent micFail,"Step27: Click on the DR Do
cumentation link","The DR Documentation link is not clicked"
Call captureScreenshot()
Environment.Value("Execution_log")="False"
End If
'Step27 to 31
'Filling in the DR documentation
' Call Fill_DR_Documentation("MasterFile","DR Documentation Detail")
' If Environment.Value("TestCase_Log")="True" Then
' Reporter.ReportEvent micPass,"Step27 to 31: Fill the DR Document
ation and click on save","The DR documentation is done and saved"
' Else
' Reporter.ReportEvent micFail,"Step27 to 31: Fill the DR Document
ation and click on save","The DR documentation is not done properly"
' Environment.Value("TestCase_Log")="True"
' End If
'Step28
'Filling the deposit agreement date
Call Select_Combo_Value("MasterFile","DR Documentation Detail" ,"Law Gov
erning Deposit Agreement",dataTable.Value("LawGoverningDepositAgreement","DR"))
Call Click_Image("MasterFile","DR Documentation Detail","Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step28: Fill in the Law governing
deposit agreement tab and click on save","The details gets saved as required"
Else
Reporter.ReportEvent micFail,"Step28: Fill in the Law governing
deposit agreement tab and click on save","The details does not get saved as requ
ired"
Environment.Value("TestCase_Log")="True"
Environment.Value("Execution_Log")="False"
End If
Wait(4)
Wait(5)
Call ClickonDRName("MasterFile","DR Documentation Detail",Environment.Va
lue("DRNAME"),"2")
Wait(3)

Call Select_Combo_Value("MasterFile","DR Profile","Status","Effective")


Call click_Image("MasterFile","DR Profile","Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Change the status of the DR from c
ommited to effective and save","The DR gets saved as required"
Else
Reporter.ReportEvent micFail,"Change the status of the DR from c
ommitted to effective and save","The DR does not get saved as required"
Environment.Value("TestCase_Log")="True"
Environment.Value("Execution_Log")="False"
End If
wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("Cancel").Click
End If
Wait(4)
Wait(4)
If DataTable.Value("DepositoryName","DR") <> "BNY" And DataTable.Value(
"Sponsored","DR") <> "S" And DataTable.Value("Type","DR")<>"Reg. S" Then
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error NonBNY2","DR documentation has not been entered")
Browser(strBrowserName).Page("DR Profile").Image("Close").Click
ElseIf DataTable.Value("DepositoryName","DR") = "BNY" And DataTable.Valu
e("Sponsored","DR") <> "S" Or DataTable.Value("Type","DR")="Reg. S"Then
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error NonBNY","DR documentation has not been entered")
Browser(strBrowserName).Page("DR Profile").Image("Close").Click
Else
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Termination Period must be entered for Effective DR")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Voting Type must be entered for Effective DR")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Blocking Type must be entered for Effective DR")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","One or more required Fees")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Law Firm - BNY has not been entered")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Law Firm - Issuer has not been entered")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Pre-Release Side Letter Flag has not been entered.")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Letter Agreement Date has not been entered.")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile","Valida
tion Error","Letter Agreement Expiration and/or Reimbursement Expiration have no
t been entered")
Browser("MasterFile").Page("DR Profile").Image("Close").Click
End If
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step29: Check for the Validation m
essage in the DR profile screen","The validation message appears as required"
Else
Reporter.ReportEvent micFail,"Step29: Check for the Validation m
essage in the DR profile screen","The validation message does not appear as requ
ired"
Environment.Value("TestCase_Log")="True"
Environment.Value("Execution_Log")="False"
End If
Call Select_Combo_Value("MasterFile","DR Profile","Status","Committed")
Call click_Image("MasterFile","DR Profile","Save")
Wait(3)
Wait(4)

If Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation"
).Exist(2) Then
Reporter.ReportEvent micPass,"Step30: Check whether the DR Docum
entation link is present or not","The DR Documentation link is present as requir
ed"
Else
Reporter.ReportEvent micFail,"Step30: Check whether the DR Docum
entation link is present or not","The DR Documentation link is not present as re
quired"
Call captureScreenshot()
Environment.Value("Execution_log")="False"
End If
'Step27
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation").c
lick
If Browser("MasterFile").Page("DR Profile").Exist(3) Then
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumenta
tion").Click
End If
Wait(3)
Wait(4)
If Browser("MasterFile").Page("DR Documentation Detail").Exist(2
) Then
Reporter.ReportEvent micPass,"Step31: Click on the DR Do
cumentation link","The DR Documentation link is clicked as required"
Else
Reporter.ReportEvent micFail,"Step31: Click on the DR Do
cumentation link","The DR Documentation link is not clicked"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
Call Select_Combo_Value("MasterFile","DR Documentation Detail","
TerminationPeriod",dataTable.Value("TerminationPeriod","DR"))
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step32: Select the termina
tion drop down and fill in the required details","The required details are fille
d as required"
Else
Reporter.ReportEvent micFail,"Step32: Select the termina
tion drop down and fill in the required details","The required details are not f
illed"
Environment.Value("TestCase_Log")="True"
End If
Call click_Image("MasterFile","DR Documentation Detail","Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Click on save in the DR Do
cumentation","The DR documentation gets saved"
Else
Reporter.ReportEvent micFail,"Click on save in DR docume
ntation","The DR Documentation does not get saved as required"
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
Wait(4)
Wait(4)
Wait(2)
Call ClickonDRName("MasterFile","DR Documentation Detail",Enviro
nment.Value("DRNAME"),"2")
Call Select_Combo_Value("MasterFile","DR Profile","Status","Effe
ctive")
Call click_Image("MasterFile","DR Profile","Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass," Change the status of the DR from
commited to effective and save","The DR gets saved as required"
Else
Reporter.ReportEvent micFail,"Change the status of the DR from c
ommitted to effective and save","The DR does not get saved as required"
Environment.Value("TestCase_Log")="True"
Environment.Value("Execution_Log")="False"
End If
wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("Cancel").Click
End If
Wait(4)
Wait(4)
If DataTable.Value("DepositoryName","DR") <> "BNY" And DataTable.Value(
"Sponsored","DR") <> "S" And DataTable.Value("Type","DR")<>"Reg. S" Then
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error NonBNY2","DR documentation has not been entered")
Browser(strBrowserName).Page("DR Profile").Image("Close").Click
ElseIf DataTable.Value("DepositoryName","DR") = "BNY" And DataTable.Valu
e("Sponsored","DR") <> "S" Or DataTable.Value("Type","DR")="Reg. S"Then
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error NonBNY","DR documentation has not been entered")
Browser(strBrowserName).Page("DR Profile").Image("Close").Click
Else
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Voting Type must be entered for Effective DR")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Blocking Type must be entered for Effective DR")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","One or more required Fees")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Law Firm - BNY has not been entered")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Law Firm - Issuer has not been entered")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Pre-Release Side Letter Flag has not been entered.")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Letter Agreement Date has not been entered.")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile","Valida
tion Error","Letter Agreement Expiration and/or Reimbursement Expiration have no
t been entered")
Browser("MasterFile").Page("DR Profile").Image("Close").Click
End If
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step33: Check for the Validation m
essage in the DR profile screen","The validation message appears as required"
Else
Reporter.ReportEvent micFail,"Step33: Check for the Validation m
essage in the DR profile screen","The validation message does not appear as requ
ired"
Environment.Value("TestCase_Log")="True"
Environment.Value("Execution_Log")="False"
End If
Call Select_Combo_Value("MasterFile","DR Profile","Status","Committed")
Call click_Image("MasterFile","DR Profile","Save")
Wait(2)
Wait(4)
Wait(4)
If Browser("MasterFile").Page("DR Profile").WebElement("DRDocume
ntation").Exist(2) Then
Reporter.ReportEvent micPass,"Step34: Check whether the DR Docum
entation link is present or not","The DR Documentation link is present as requir
ed"
Else
Reporter.ReportEvent micFail,"Step34: Check whether the DR Docum
entation link is present or not","The DR Documentation link is not present as re
quired"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step35
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation").c
lick
If Browser("MasterFile").Page("DR Profile").Exist(3) Then
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumenta
tion").Click
End If
Wait(2)
Wait(4)
Wait(4)
If Browser("MasterFile").Page("DR Documentation Detail").Exist(2
) Then
Reporter.ReportEvent micPass,"Step35: Click on the DR Do
cumentation link","The DR Documentation link is clicked as required"
Else
Reporter.ReportEvent micFail,"Step35: Click on the DR Do
cumentation link","The DR Documentation link is not clicked"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step36
Call Select_Combo_Value("MasterFile","DR Documentation Detail","VotingTy
pe",DataTable.Value("VotingType","DR"))
Call Click_Image("MasterFile","DR Documentation Detail","Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step 36: The voting type is set an
d save button is clicked","The DR documentation gets saved as required"
Else
Reporter.ReportEvent micFail,"Step36: The voting type is set and
the save button is clicked","The DR documentation is not saved properly"
Environment.Value("TestCase_Log")="True"
Environment.Value("Execution_Log")="False"
End If
Wait(4)
Wait(4)
Call ClickonDRName("MasterFile","DR Documentation Detail",Environment.Va
lue("DRNAME"),"2")
Call Select_Combo_Value("MasterFile","DR Profile","Status","Effe
ctive")
Call click_Image("MasterFile","DR Profile","Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass," Change the status of the DR from
commited to effective and save","The DR gets saved as required"
Else
Reporter.ReportEvent micFail,"Change the status of the DR from c
ommitted to effective and save","The DR does not get saved as required"
Environment.Value("TestCase_Log")="True"
Environment.Value("Execution_Log")="False"
End If
wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("Cancel").Click
End If
Wait(4)
Wait(4)
If DataTable.Value("DepositoryName","DR") <> "BNY" And DataTable.Value(
"Sponsored","DR") <> "S" And DataTable.Value("Type","DR")<>"Reg. S" Then
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error NonBNY2","DR documentation has not been entered")
Browser("MasterFile").Page("DR Profile" ).Image("Close").Click
ElseIf DataTable.Value("DepositoryName","DR") = "BNY" And DataTable.Valu
e("Sponsored","DR") <> "S" Or DataTable.Value("Type","DR")="Reg. S"Then
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error NonBNY","DR documentation has not been entered")
Browser(strBrowserName).Page("DR Profile").Image("Close").Click
Else
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile","Valida
tion Error","Blocking Type must be entered for Effective DR")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","One or more required Fees")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Law Firm - BNY has not been entered")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Law Firm - Issuer has not been entered")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Pre-Release Side Letter Flag has not been entered.")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Letter Agreement Date has not been entered.")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile","Valida
tion Error","Letter Agreement Expiration and/or Reimbursement Expiration have no
t been entered")
Browser("MasterFile").Page("DR Profile").Image("Close").Click
End If
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step37: Check for the Validation m
essage in the DR profile screen","The validation message appears as required"
Else
Reporter.ReportEvent micFail,"Step37: Check for the Validation m
essage in the DR profile screen","The validation message does not appear as requ
ired"
Environment.Value("TestCase_Log")="True"
Environment.Value("Execution_Log")="False"
End If
Call Select_Combo_Value("MasterFile","DR Profile","Status","Committed")
Call click_Image("MasterFile","DR Profile","Save")
Wait(2)
If Browser("MasterFile").Page("DR Profile").WebElement("DRDocume
ntation").Exist(2) Then
Reporter.ReportEvent micPass,"Step38: Check whether the DR Docum
entation link is present or not","The DR Documentation link is present as requir
ed"
Else
Reporter.ReportEvent micFail,"Step38: Check whether the DR Docum
entation link is present or not","The DR Documentation link is not present as re
quired"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
Wait(4)
Wait(4)
'Step39
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation").c
lick
If Browser("MasterFile").Page("DR Profile").Exist(3) Then
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumenta
tion").Click
End If
Wait(2)
If Browser("MasterFile").Page("DR Documentation Detail").Exist(2
) Then
Reporter.ReportEvent micPass,"Step39: Click on the DR Do
cumentation link","The DR Documentation link is clicked as required"
Else
Reporter.ReportEvent micFail,"Step39: Click on the DR Do
cumentation link","The DR Documentation link is not clicked"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step40
Call Select_Combo_Value("MasterFile","DR Documentation Detail","Blocking
Type",DataTable.Value("BlockingType","DR"))
Call Click_Image("MasterFile","DR Documentation Detail","Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step 40: The BlockingType is set a
nd save button is clicked","The DR documentation gets saved as required"
Else
Reporter.ReportEvent micFail,"Step40: The BlockingType is set an
d the save button is clicked","The DR documentation is not saved properly"
Environment.Value("TestCase_Log")="True"
Environment.Value("Execution_Log")="False"
End If
Wait(4)
Wait(4)
Call ClickonDRName("MasterFile","DR Documentation Detail",Environment.Va
lue("DRNAME"),"2")
Call Select_Combo_Value("MasterFile","DR Profile","Status","Effe
ctive")
Call click_Image("MasterFile","DR Profile","Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass," Change the status of the DR from
commited to effective and save","The DR gets saved as required"
Else
Reporter.ReportEvent micFail,"Change the status of the DR from c
ommitted to effective and save","The DR does not get saved as required"
Environment.Value("TestCase_Log")="True"
Environment.Value("Execution_Log")="False"
End If
wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("Cancel").Click
End If
Wait(4)
Wait(4)
If DataTable.Value("DepositoryName","DR") <> "BNY" And DataTable.Value(
"Sponsored","DR") <> "S" And DataTable.Value("Type","DR")<>"Reg. S" Then
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error NonBNY2","DR documentation has not been entered")
Browser("MasterFile").Page("DR Profile").Image("Close").Click
ElseIf DataTable.Value("DepositoryName","DR") = "BNY" And DataTable.Valu
e("Sponsored","DR") <> "S" Or DataTable.Value("Type","DR")="Reg. S"Then
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error NonBNY","DR documentation has not been entered")
Browser("MasterFile").Page("DR Profile").Image("Close").Click
Else

Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"


,"Validation Error","One or more required Fees")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Law Firm - BNY has not been entered")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Law Firm - Issuer has not been entered")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Pre-Release Side Letter Flag has not been entered.")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Letter Agreement Date has not been entered.")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile","Valida
tion Error","Letter Agreement Expiration and/or Reimbursement Expiration have no
t been entered")
Browser("MasterFile").Page("DR Profile").Image("Close").Click
End If
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step41: Check for the Validation m
essage in the DR profile screen","The validation message appears as required"
Else
Reporter.ReportEvent micFail,"Step41: Check for the Validation m
essage in the DR profile screen","The validation message does not appear as requ
ired"
Environment.Value("TestCase_Log")="True"
Environment.Value("Execution_Log")="False"
End If
Call Select_Combo_Value("MasterFile","DR Profile","Status","Committed")
Call click_Image("MasterFile","DR Profile","Save")
Wait(2)
Wait(4)
Wait(4)
If Browser("MasterFile").Page("DR Profile").WebElement("DRDocume
ntation").Exist(2) Then
Reporter.ReportEvent micPass,"Step42: Check whether the DR Docum
entation link is present or not","The DR Documentation link is present as requir
ed"
Else
Reporter.ReportEvent micFail,"Step42: Check whether the DR Docum
entation link is present or not","The DR Documentation link is not present as re
quired"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step43
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation").c
lick
If Browser("MasterFile").Page("DR Profile").Exist(3) Then
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumenta
tion").Click
End If
Wait(4)
Wait(4)
Wait(2)
If Browser("MasterFile").Page("DR Documentation Detail").Exist(2
) Then
Reporter.ReportEvent micPass,"Step43: Click on the DR Do
cumentation link","The DR Documentation link is clicked as required"
Else
Reporter.ReportEvent micFail,"Step43: Click on the DR Do
cumentation link","The DR Documentation link is not clicked"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
If DataTable.Value("DepositAgreementDate","DR") <> "" Then
strDataTableValue = DataTable.Value("Dep
ositAgreementDate","DR")
strValue = Split(strDataTableValue,";",-
1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image("MasterFile","DR Docume
ntation Detail","ShowCalendar")
Call ClickIcon_SetDate("MasterFile","DR
Documentation Detail",strMonthValue,strYearValue,strDateValue)
End If

If DataTable.Value("DepositAgreementAmendedDate","DR") <> "" Then


strDataTableValue = DataTable.Value("Dep
ositAgreementAmendedDate","DR")
strValue = Split(strDataTableValue,";",-
1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image("MasterFile","DR Docume
ntation Detail","ShowCalendar_2")
Call ClickIcon_SetDate("MasterFile","DR
Documentation Detail",strMonthValue,strYearValue,strDateValue)
End If
Call Select_Combo_Value("MasterFile","DR Documentation Detail","DSF in
Deposit agreement",dataTable.Value("DSFinDepositAgreement","DR"))
Call Select_Combo_Value("MasterFile","DR Documentation Detail","ChargeDS
F",dataTable.Value("ChargeDSF","DR"))
Call Select_Combo_Value("MasterFile","DR Documentation Detail","NetDSFCa
shDivident",dataTable.Value("NetDSFCashDivident","DR"))
Call Click_Image("MasterFile","DR Documentation Detail",
"Save")
Wait(3)
'Step44 to 88
'Fill in the fees tab
''Setting the values for the Fees tab
Call click_WebElement("MasterFile","DR Documentation Detail","Fees")
Wait(3)
Call click_WebElement("MasterFile","DR Documentation Detail","Fees")
Wait(3)
' Click on Add Button and click on the Image ' info'
Call browser("MasterFile").Page("DR Documentation Detail").WebTable("Fe
es_Table").WaitProperty("Visible","True",5)
Call click_WebButton("MasterFile","DR Documentation Detail","Add_Fees")
Wait(3)
If DataTable.Value("Sponsored","DR") = "U" Then
Call click_Image("MasterFile","DR Documentation Detail",
"FeeTypeUnsponsored")
Else
Call click_Image("MasterFile","DR Documentation Detail",
"FeeType")
End If
Wait(3)
' Select all the Fees present in the Fee Frame
intRowCount = Browser("MasterFile").Page("DR Documentation Detail").Fr
ame("lookupFrame").WebTable("FeeDescription").RowCount
'MsgBox intRowCount
For intRowCounter = 2 to intRowCount
intRowCounts = Browser("MasterFile").Page("DR Documentation D
etail").WebTable("Fees_Table").RowCount
Browser("MasterFile").Page("DR Documentation Detail").WebTabl
e("Fees_Table").ChildItem(intRowCounts,1,"Image","0").Click
intRowCount = Browser("MasterFile").Page("DR Documentation De
tail").Frame("lookupFrame").WebTable("FeeDescription").RowCount
If intRowCount = 2 Then
strGetCellData = Browser("MasterFile").Page("DR Document
ation Detail").Frame("lookupFrame").WebTable("FeeDescription").GetCellData(2,1)
Browser("MasterFile").Page("DR Documentation Detail").We
bElement("html tag:=TD","innertext:="& strGetCellData).Click
'Call click_WebButton(strBrowserName,strPageName,"Add_Fe
es")
Exit For
Else
strGetCellData = Browser("MasterFile").Page("DR Document
ation Detail").Frame("lookupFrame").WebTable("FeeDescription").GetCellData(2,1)
Browser("MasterFile").Page("DR Documentation Detail").We
bElement("html tag:=TD","innertext:="& strGetCellData).Click
Call click_WebButton("MasterFile","DR Documentation Deta
il","Add_Fees")
End If
Next
' If the Fee Amount is "NULL", set 0 as the Value in the Field
intFeeRC = Browser("MasterFile").Page("DR Documentation Detail
").WebTable("Fees_Table").RowCount
For intCount =3 to intFeeRC
strCellData = Browser("MasterFile").Page("DR Document
ation Detail").WebTable("Fees_Table").ChildItem(intCount,2,"WebEdit","0").GetROP
roperty("value")
If strCellData = "" Then
Browser("MasterFile").Page("DR Documentation Det
ail").WebTable("Fees_Table").ChildItem(intCount,2,"WebEdit","0").Set "0"
End If
Next
Environment.Value("TestCase_Log")="True"
Call click_Image("MasterFile","DR Documentation Detail","Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step44 to 88: Click on the
Fees tab and fill in the details and click on save","The details of the fees ar
e filled and saved as required"
Else
Reporter.ReportEvent micFail,"Step44 to 88: Click on the
Fees tab and fill in the details and click on save","The details are not filled
properly"
'Environment.Value("TestCase_Log")="False"
Environment.Value("Execution_Log")="False"
End If
Wait(2)
If browser("MasterFile").Dialog("Microsoft Internet Explorer").E
xist(2) Then
Reporter.ReportEvent micPass,"Check whether the microsof
t internet explorer pop-up comes up or not","The pop-up appears as required"
browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("Cancel").Click
End if
wait(5)
' If browser(strBrowserName).Page(strPageName).WebElement("IssuerProfile"
).Exist(2) Then
' browser(strBrowserName).page(strPageName).WebElement("IssuerProf
ile").click
' End If
'Click on the DR NAME
Call ClickonDRName("MasterFile","DR Documentation Detail",Enviro
nment.Value("DRNAME"),"2")
Call Select_Combo_Value("MasterFile","DR Profile","Status","Effe
ctive")
Call click_Image("MasterFile","DR Profile","Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass," Change the status of the DR from
commited to effective and save","The DR gets saved as required"
Else
Reporter.ReportEvent micFail,"Change the status of the DR from c
ommitted to effective and save","The DR does not get saved as required"
Environment.Value("TestCase_Log")="True"
Environment.Value("Execution_Log")="False"
End If
wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("Cancel").Click
End If
Wait(4)
Wait(4)
If DataTable.Value("DepositoryName","DR") <> "BNY" And DataTable.Value(
"Sponsored","DR") <> "S" And DataTable.Value("Type","DR")<>"Reg. S" Then
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error NonBNY2","DR documentation has not been entered")
Browser("MasterFile").Page("DR Profile").Image("Close").Click
ElseIf DataTable.Value("DepositoryName","DR") = "BNY" And DataTable.Valu
e("Sponsored","DR") <> "S" Or DataTable.Value("Type","DR")="Reg. S"Then
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error NonBNY","DR documentation has not been entered")
Browser("MasterFile").Page("DR Profile").Image("Close").Click
Else
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile","Valida
tion Error","Law Firm - BNY has not been entered")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Law Firm - Issuer has not been entered")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Pre-Release Side Letter Flag has not been entered.")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Letter Agreement Date has not been entered.")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile","Valida
tion Error","Letter Agreement Expiration and/or Reimbursement Expiration have no
t been entered")
Browser("MasterFile").Page("DR Profile").Image("Close").Click
End If
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step89: Check for the Validation m
essage in the DR profile screen","The validation message appears as required"
Else
Reporter.ReportEvent micFail,"Step89: Check for the Validation m
essage in the DR profile screen","The validation message does not appear as requ
ired"
Environment.Value("TestCase_Log")="True"
Environment.Value("Execution_Log")="False"
End If
Call Select_Combo_Value("MasterFile","DR Profile","Status","Committed")
Call click_Image("MasterFile","DR Profile","Save")
Wait(2)
Wait(4)
Wait(4)
If Browser("MasterFile").Page("DR Profile").WebElement("DRDocume
ntation").Exist(2) Then
Reporter.ReportEvent micPass,"Step90: Check whether the DR Docum
entation link is present or not","The DR Documentation link is present as requir
ed"
Else
Reporter.ReportEvent micFail,"Step90: Check whether the DR Docum
entation link is present or not","The DR Documentation link is not present as re
quired"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step91
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation").c
lick
If Browser("MasterFile").Page("DR Profile").Exist(3) Then
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumenta
tion").Click
End If
If Browser("MasterFile").Page("DR Documentation Detail").Exist(2
) Then
Reporter.ReportEvent micPass,"Step91: Click on the DR Do
cumentation link","The DR Documentation link is clicked as required"
Else
Reporter.ReportEvent micFail,"Step91: Click on the DR Do
cumentation link","The DR Documentation link is not clicked"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step92 to 100
Call Select_Combo_Value("MasterFile","DR Documentation Detail","PreReleaseSi
deLetter",dataTable.Value("PreReleaseSideLetter","DR"))
If trim( DataTable.Value("Sponsored","DR")) <> "U" Then
Call Select_Combo_Value("MasterFile","DR Documentation Detail","Operatio
nalChecklist",dataTable.Value("OperationalChecklist","DR"))
End If
If trim( DataTable.Value("Sponsored","DR")) ="U" Then
Call click_Image("MasterFile","DR Documentation Detail","LawFirm
BNYInfoUnsponsored")
Else
Call click_Image("MasterFile","DR Documentation Detail","LawFirm
BNYInfo")
End If
Call operation_on_FrameObjects_WithName("MasterFile","DR Documentation D
etail","lookupFrame","WebEdit","searchString",dataTable.Value("LawFirmBNY","DR")
)
Call operation_on_FrameObjects_WithName("MasterFile","DR Documentation D
etail","lookupFrame","Image","Go","")
Call SelectValueinFrame("MasterFile","DR Documentation Detail","lookupFr
ame","Name")
If trim( DataTable.Value("Sponsored","DR")) ="U" Then
Call click_Image("MasterFile","DR Documentation Detail","LawFirm
IssuerInfoUnsponsored")
Else
Call click_Image("MasterFile","DR Documentation Detail","LawFirm
IssuerInfo")
End If
Call operation_on_FrameObjects_WithName("MasterFile","DR Documentation D
etail","lookupFrame","WebEdit","searchString",dataTable.Value("LawFirmIssuer","D
R"))
Call operation_on_FrameObjects_WithName("MasterFile","DR Documentation D
etail","lookupFrame","Image","Go","")
Call SelectValueinFrame("MasterFile","DR Documentation Detail","lookupFr
ame","Name")
If trim( DataTable.Value("Sponsored","DR")) ="U" Then
Call click_Image("MasterFile","DR Documentation Detail","LawFirm
InvestmentBankInfoUnsponsored")
Else
Call click_Image("MasterFile","DR Documentation Detail","LawFirmInvestme
ntBankInfo")
End If
Call operation_on_FrameObjects_WithName("MasterFile","DR Documentation D
etail","lookupFrame","WebEdit","searchString",dataTable.Value("LawFirmInvestment
Bank","DR"))
Call operation_on_FrameObjects_WithName("MasterFile","DR Documentation D
etail","lookupFrame","Image","Go","")
Call SelectValueinFrame("MasterFile","DR Documentation Detail","lookupFr
ame","Name")
If trim( DataTable.Value("Sponsored","DR")) ="U" Then
Call click_Image("MasterFile","DR Documentation Detail","Investm
entBankInfoUnsponsored")
Else
Call click_Image("MasterFile","DR Documentation Detail","InvestmentBankI
nfo")
End If
Call operation_on_FrameObjects_WithName("MasterFile","DR Documentation D
etail","lookupFrame","WebEdit","searchString",dataTable.Value("InvestmentBank","
DR"))
Call operation_on_FrameObjects_WithName("MasterFile","DR Documentation D
etail","lookupFrame","Image","Go","")
Call SelectValueinFrame("MasterFile","DR Documentation Detail","lookupFr
ame","Name")
Wait(3)
Call click_Image("MasterFile","DR Documentation Detail","Save")
Wait(2)
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step 92 to 100: Check whether the
DR documentation deposit agreement details have been filled or not","The DR Docu
mentation Deposit agreement details have been filled as required"
Else
Reporter.ReportEvent micFail,"Step 92 to 100: Check whether the
DR Documentation deposit agreement details have been filled or not","The DR docu
mentation deposit agreement details have been filled as required"
Environment.Value("TestCase_Log")="True"
Environment.Value("Execution_Log")="False"
End If
'Step101
Call ClickonDRName("MasterFile","DR Documentation Detail",Environment.Va
lue("DRNAME"),"2")
Wait(2)
Call Select_Combo_Value("MasterFile","DR Profile","Status","Effective")
Call click_Image("MasterFile","DR Profile","Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass," Change the status of the DR from
commited to effective and save","The DR gets saved as required"
Else
Reporter.ReportEvent micFail,"Change the status of the DR from c
ommitted to effective and save","The DR does not get saved as required"
Environment.Value("TestCase_Log")="True"
Environment.Value("Execution_Log")="False"
End If
wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("Cancel").Click
End If
If DataTable.Value("DepositoryName","DR") <> "BNY" And DataTable.Value(
"Sponsored","DR") <> "S" And DataTable.Value("Type","DR")<>"Reg. S" Then
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error NonBNY2","DR documentation has not been entered")
Browser("MasterFile").Page("DR Profile").Image("Close").Click
ElseIf DataTable.Value("DepositoryName","DR") = "BNY" And DataTable.Valu
e("Sponsored","DR") <> "S" Or DataTable.Value("Type","DR")="Reg. S"Then
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error NonBNY","DR documentation has not been entered")
Browser("MasterFile").Page("DR Profile").Image("Close").Click
Else
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile","Valida
tion Error","Letter Agreement Date has not been entered.")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile","Valida
tion Error","Letter Agreement Expiration and/or Reimbursement Expiration have no
t been entered")
Browser("MasterFile").Page("DR Profile").Image("Close").Click
End If
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step101: Check for the Validation
message in the DR profile screen","The validation message appears as required"
Else
Reporter.ReportEvent micFail,"Step101: Check for the Validation
message in the DR profile screen","The validation message does not appear as req
uired"
Environment.Value("TestCase_Log")="True"
Environment.Value("Execution_Log")="False"
End If
Call Select_Combo_Value("MasterFile","DR Profile","Status","Committed")
Call click_Image("MasterFile","DR Profile","Save")
Wait(2)
If Browser("MasterFile").Page("DR Profile").WebElement("DRDocume
ntation").Exist(2) Then
Reporter.ReportEvent micPass,"Step102: Check whether the DR Docu
mentation link is present or not","The DR Documentation link is present as requi
red"
Else
Reporter.ReportEvent micFail,"Step102: Check whether the DR Docu
mentation link is present or not","The DR Documentation link is not present as r
equired"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step103
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation").c
lick
While Browser("MasterFile").Page("DR Profile").Exist(5)
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumenta
tion").Click
Wend

If Browser("MasterFile").Page("DR Documentation Detail").Exist(2


) Then
Reporter.ReportEvent micPass,"Step103: Click on the DR D
ocumentation link","The DR Documentation link is clicked as required"
Else
Reporter.ReportEvent micFail,"Step103: Click on the DR D
ocumentation link","The DR Documentation link is not clicked"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

'Step104 to 109
If trim( DataTable.Value("Sponsored","DR")) <> "U" Then
Wait(3)
'Select the letter agreement tab
Call click_WebElement("MasterFile","DR Documentation Detail","Letter Agr
eement")
'Select the radio button
If browser("MasterFile").Page("DR Documentation Detail").WebRadioGroup("
LetterAgreement").Exist(2) Then
Call select_Radiobutton("MasterFile","DR Documentation Detail","
LetterAgreement","0")
Else
'Select the add button
Call click_WebButton("MasterFile","DR Documentation Detail","Add")
If Page("Page").WebElement("NewLetterAgreement").Exist(2) Then
Page("Page").WebElement("NewLetterAgreement").Click
End If
'Call select_Radiobutton(strBrowserName,"DR Document Detail","Le
tterAgreement")
End if
Wait(2)
Call pageCheck_WebListOR("MasterFile","DR Documentation Detail","LetterA
greementExpiration;Reimbursement Expiration")
If browser("MasterFile").page("DR Documentation Detail").WebTable("Letter A
greement").Exist(2) and browser("MasterFile").page("DR Documentation Detail").Im
age("ShowCalendar_LetterAgreementDate").Exist(2) Then
Reporter.ReportEvent micPass,"Click on the letter agreement tab"
,"The letter agreement tab opens up as required"
Else
Reporter.ReportEvent micFail,"Click on the letter agreement tab"
,"The letter agreement tab does not appear as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
If dataTable.Value("LetterAgreementDate","DR") <> "" Then
strDataTableValue = DataTable.Value("LetterAgreementDate","DR")
strValue = Split(strDataTableValue,";",-1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image("MasterFile","DR Documentation Detail","ShowCal
endar_LetterAgreementDate")
Call ClickIcon_SetDate("MasterFile","DR Documentation Detail",st
rMonthValue,strYearValue,strDateValue)
End If
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(4)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("OK").Click
End If
Call Select_Combo_Value("MasterFile","DR Documentation Detail","LetterAg
reementExpiration",dataTable.Value("LetterAgreementExpiration","DR"))
If dataTable.Value("LetterAgreementExpiration","DR") = "Yes" Then
strDataTableValue = DataTable.Value("LetterAgreementExpirationDa
te","DR")
strValue = Split(strDataTableValue,";",-1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image("MasterFile","DR Documentation Detail","ShowCal
endar_LetterExpirationDate")
Call ClickIcon_SetDate("MasterFile","DR Documentation Detail",st
rMonthValue,strYearValue,strDateValue)
End If
Call Select_Combo_Value("MasterFile","DR Documentation Detail","Reimburs
ement Expiration",dataTable.Value("ReimbursementExpiration","DR"))
If dataTable.Value("ReimbursementExpiration","DR") ="Yes" Then
strDataTableValue = DataTable.Value("ReimbursementExpirationDate
","DR")
strValue = Split(strDataTableValue,";",-1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image("MasterFile","DR Documentation Detail","ShowCal
endar_ReimbursementExpiration")
Call ClickIcon_SetDate("MasterFile","DR Documentation Detail",st
rMonthValue,strYearValue,strDateValue)
End If
Wait(3)
Environment.Value("TestCase_Log")="True"
Call click_Image("MasterFile","DR Documentation Detail","Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step104 to 109: Fill in the detail
s for the letter agreement tab in DR documentation","The letter agreement tab va
lues are filled up as required"
Else
Reporter.ReportEvent micFail,"Step104 to 109: Fill in the detail
s for the letter agreement tab in DR documentation","The letter agreement tab va
lues are filled in as required"
Environment.Value("TestCase_Log")="True"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
Wait(3)
Wait(4)
Wait(4)
End If
Call ClickonDRName("MasterFile","DR Documentation Detail",Environment.Va
lue("DRNAME"),"2")
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("Cancel").Click
End If
If Browser("MasterFile").Page("DR Profile").Exist(2) Then
Reporter.ReportEvent micPass,"Step110: Click on the DR link","Th
e DR profile is displayed as required"
Else
Reporter.ReportEvent micFail,"Step110: Click on the DR link","Th
e DR profile page is not displayed"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
Wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2
) Then
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("Cancel").Click
End If

Call click_Image("MasterFile","DR Profile","Save")


If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step111: Change the status of the
DR from commited to effective and save","The DR gets saved as required"
Else
Reporter.ReportEvent micFail,"Step111: Change the status of the
DR from committed to effective and save","The DR does not get saved as required"
Environment.Value("TestCase_Log")="True"
Environment.Value("Execution_Log")="False"
End If
wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("Cancel").Click
End If

Reporter.ReportEvent micDone,"Steps 112 to 115: Add a underlying securit


y to the CUSIP","This has already been done while creating a CUSIP itself"
'Step132
Call ClickonDRName("MasterFile","DR Profile",DataTable.Value("IssuerName
","DR"),"2")
wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("Cancel").Click
End If

'Step132 to 134
'Call pageCheck_WebElement("MasterFile","Issuer Profile","Advisers;BNY C
ontacts;Comments;Custodians;Detail;DR Services;Products;Und. Sec. Markets","")
If Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Ex
ist(2) and Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerDocume
ntation").Exist(2)Then
Reporter.ReportEvent micPass,"Step132 to 134: Check whether the
issuer profile screen has been loaded or not","The issuer profile screen has bee
n loaded as required"
Else
Reporter.ReportEvent micFail,"Step132 to 134: Check whether the
issuer profile screen has been loaded or not","The issuer profile screen has not
been loaded"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step135
Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Details")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step135: Check whether the require
d fields are present in the issuer profile screen detail tab","The required fiel
ds are present as required"
Else
Reporter.ReportEvent micFail,"Step135: Check whether the require
d fields are present in the issuer profile screen detail tab","The required fiel
ds are not present"
Environment.Value("TestCase_Log")="True"
End If
'Step136
'Checking for the BNY contact tab
Browser("MasterFile").Page("Issuer Profile").WebElement("BNY Contacts").
Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","BNY Contact
s")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("BNY Contacts").Exist(2) Then
Reporter.ReportEvent micPass,"Step136: Check for the details in
the BNY contacts tab","The details under the BNY contact tab is as required"
Else
Reporter.ReportEvent micFail,"Step136: Check for the details in
the BNY contacts tab","The details under the BNY contact tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step137
'Checking for the Underlying security markets tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Und. Sec. Marke
ts").Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Und. Sec. M
arkets")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Underlying Security Market").Exist(2) Then
reporter.ReportEvent micPass,"Step137: Check for the Underlying
Event Tab","The underlying event tab is as required"
Else
Reporter.ReportEvent micFail,"Step137: Check for the underlying
Event tab","The details under the underlying event tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step138
'Checking for the Custodian Tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Custodians").Cl
ick
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Custodians"
)
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Issuers Preferred Custodian").Exist(2)Then
Reporter.ReportEvent micPass,"Step138: Check for the Issuer pref
fered tab","The details in the Issuer preffered tab is as required"
Else
Reporter.ReportEvent micFail,"Step138: Check for the issuer pref
fered tab","The details in the issuer preffered is not present as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step139
'Checking for the Advisors tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Advisers").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Advisers")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Issuers Advisers").Exist(2)Then
Reporter.ReportEvent micPass,"Step139: Check for the Advisors ta
b","The advisers tab details are as required"
Else
Reporter.ReportEvent micFail,"Step139: Check for the Advisors Ta
b","The advisors tab details are as required"
Call captureScreenshot()
Environment.Value("Execution_log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step140
'Checking for the Products tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Products").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Products")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Products").Exist(2)Then
reporter.ReportEvent micPass,"Step140: Check for the presence of
the products web table","The products web table is present as required"
Else
reporter.ReportEvent micFail,"Step140: Check for the presence of
the products web table","The products web table is not present as required"
Call captureScreenshot()
Environment.Value("Execution_log")="False"
Environment.Value("TestCase_Log")="True"
End If

'Step141
'Checking for the DR services tab
Browser("MasterFile").Page("Issuer Profile").WebElement("DR Services").C
lick
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","DR Services
")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("DR Services").Exist(2) Then
reporter.ReportEvent micPass,"Step141: Check for the presence of
the DR Services web table","The DR services web table is present as required"
Else
reporter.ReportEvent micFail,"Step141: Check for the presence of
the DR Services web table","The DR Services web table is not present as require
d"
Call captureScreenshot()
Environment.Value("Execution_log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step142
'Checking for the Comments tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Comments").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Comments")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Comments").Exist(2) Then
reporter.ReportEvent micPass,"Step142: Check for the presence of
the comments table","The comments table is present as required"
Else
reporter.ReportEvent micFail,"Step142: Check for the presence of
the comments table","The comments table is not present"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
Call click_WebElement("MasterFile","Issuer Profile","Detail")
Environment.Value("ISSUERNAME")=trim(get_WebEdit_Value("MasterFile","Iss
uer Profile","Name"))
If Environment.Value("TCCURCOUNT")=2 Then
Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerD
ocumentation").Click
Call Fill_Issuer_Documentation("MasterFile","Issuer Documentation","DR")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Fill in the issuer Documen
tation and click on save","The Issuer documentation is done and saved"
Call ClickonDRName("MasterFile","Issuer Documentation",D
ataTable.Value("IssuerName","DR"),"2")
Else
Reporter.ReportEvent micFail,"Fill in the Issuer Documen
tation and click on save","The Issuer documentation is not filled properly"
Environment.Value("TestCase_Log")="True"
End If
End If
'Call logoutfromApp("MasterFile","Issuer Profile")
Call select_Menu("MasterFile","Issuer Profile",DataTable.Value("MenuPath
","DR"))
Wait(3)
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
Call click_Image("MasterFile","Profile - DR Search","Search")
Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
strDRnameinProfile=get_WebEdit_Value ("MasterFile","DR Profile","DRName"
)
If Browser("MasterFile").Page("DR Profile").Exist(3) And strDRnameinPr
ofile=Environment.Value("DRNAME")Then
Reporter.ReportEvent micPass,"Step143:Open the DR that we have c
reated","The newly created DR opens up"
Else
Reporter.ReportEvent micFail,"Step143:Open the DR that we have c
reated","The newly created DR does not open up"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
If dataTable.Value("Type","DR") <> "144A" And datatable.Value("Type","D
R") <> "RegS" And DataTable.Value("DepositoryName","DR") ="BNY" Then
Call click_WebElement("MasterFile","DR Profile","SEC Filing")
Call set_WebEdit_Value("MasterFile","DR Profile","CurrentF6ADS",
dataTable.Value("CurrentF6ADS","DR"))
Call set_WebEdit_Value("MasterFile","DR Profile","CurF6Number",d
ataTable.Value("CurF6Number","DR"))
Wait(2)
If DataTable.Value("F6FileDate","DR") <> "" Then
strDataTableValue = DataTable.Value("F6F
ileDate","DR")
strValue = Split(strDataTableValue,";",-
1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image("MasterFile","DR Profil
e","ShowCalendar_F6FileDate")
Call ClickIcon_SetDate("MasterFile","DR
Profile",strMonthValue,strYearValue,strDateValue)
End If
Call click_Image("MasterFile","DR Profile","Save")
End If
Call click_WebElement("MasterFile","DR Profile","Detail")
Call Select_Combo_Value("MasterFile","DR Profile","Status","Effective")
Call click_Image("MasterFile","DR Profile","Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step144: Change the status of the
DR to effective and save","The status of the newly created DR is changed to effe
ctive and saved"
Else
Reporter.ReportEvent micFail,"Step144:Change the status of the D
R to effective and save","The status of the newly created DR is not saved as eff
ective"
Environment.Value("TestCase_Log")="True"
Environment.Value("Execution_Log")="False"
End If
Wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
Call logoutfromApp("MasterFile","DR Profile")
'Step 145
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Approver","MFLogin")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step145: Log into application usin
g Approver ID","We have successfully logged in as an approver"
Else
Reporter.ReportEvent micFail,"Step145: Log into the application
using Approver ID ","We have not successfully logged in as an approver"
Environment.Value("TestCase_Log")="True"
End If
'Step146 to 153
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","CUSIP Profile","CUSIP",E
nvironment.Value("CUSIP_NAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step146 to 153:Approve the CUSIP d
etails","The CUSIP details are approved as required"
Else
Reporter.ReportEvent micFail,"Step146 to 153: Approve the CUSIP
details","The CUSIP details are not approved as required"
Environment.Value("TestCase_Log")="True"
End If

'Step154 to 158
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","DR Documentation","DR Na
me",Environment.Value("DRNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step154 to 158: Approve the DR Do
cumentation","The DR Documentation is filled in correctly as required"
Else
Reporter.ReportEvent micFail,"Step154 to 158: Approve the DR Doc
umentation","The DR Documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
'Step 159 to 164
Environment.Value("TestCase_Log")="True"
If Environment.Value("TCCURCOUNT")=2 Then
Call ApprovalFunction_CreateNewDR("MasterFile","Issuer Documenta
tion","Issuer",Environment.value("ISSUERNAME"),"Approved","Approved","Pending Ap
proval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step159 to 164: Approve th
e issuer documentation","The issuer documentation is approved as required"
Else
Reporter.ReportEvent micFail,"Step 159 to 164 : Approve
the issuer documentation","The issuer documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
Else
Reporter.ReportEvent micPass,"Step159 to 164 : Approve the issue
r documentation","The issuer documentation already is approved"
End if

'Approve the DR Profile details


Call ApprovalFunction_CreateNewDR("MasterFile","DR Profile","Name",Envir
onment.Value("DRNAME"),"Approved","Approved","Pending Approval")
If Environment.Value ("TestCase_Log")="True" Then
Reporter.ReportEvent micPass ,"Step165 to 169: Check whether th
e DR Profile Details are approved and batched successfully","The DR Profile Deta
ils are approved and batched as required"
Else
Reporter.ReportEvent micFail ,"Step165 to 169: Check whether th
e DR Profile Details are approved and batched successfully","The DR Details are
not approved"
Environment.Value("TestCase_Log")="True"
End If

'Call logoutfromApp("MasterFile","Issuer Documentation")


'Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogi
n"))
'Call login("MasterFile","Login Page","Relationship Management","MFLogin
")
'Call click_WebElement("MasterFile","Depositary Receipt Division's","Mas
terFile")
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Relationship Management","MFLogin"
)
Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","D
R"))
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
Call DRSearchCriteria("MasterFile","Profile - DR Search")
Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
Wait(4)
Wait(4)
Call Fill_OfferingsTab("MasterFile","DR Profile","Offering Detail")
Wait(4)
Wait(4)
Call logoutfromApp("MasterFile","DR Profile")
'Step 165 to 169
Environment.Value("TestCase_Log")="True"
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Approver","MFLogin")
Call ApprovalFunction_CreateNewDR("MasterFile","Offering Detail","Name",
Environment.Value("DRNAME"),"Approved","Approved","Pending Approval")
'Call ApprovalFunction_CreateNewDR("MasterFile","DR Profile","Name",Envi
ronment.Value("DRNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Approve the DR profile Offering",
"The DR Offering gets approved successfully"
Else
Reporter.ReportEvent micFail," Approve the DR Profile Offering"
,"The DR Offering does not get approved successfully"
Environment.Value("TestCase_Log")="True"
End If
Call logoutfromApp("MasterFile","Depositary Receipt Division's")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step170: Click on logout link","Th
e Application logs out of the approver ID"
Else
Reporter.ReportEvent micFail,"Step170: Click on the logout link"
,"The Application does not log out of the approvers ID"
Environment.Value("TestCase_Log")="True"
Environment.Value("execution_Log")="False"
End If
'Step171 to 178
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Relationship Management","MFLogin"
)
Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","D
R"))
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
Call DRSearchCriteria("MasterFile","Profile - DR Search")
Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
OriginOfDR=Browser("MasterFile").Page("DR Profile").WebEdit("DROrigin").
GetROProperty("value")
StatusOfDR=Browser("MasterFile").Page("DR Profile").WebList("Status").Ge
tROProperty("value")
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")

If StatusOfDR="Effective" And OriginOfDR="New Program" And Environment.V


alue("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step171 to 178: Check whether the
DR has been made effective or not","The DR Has been made effective successfully"
Else
Reporter.ReportEvent micFail,"Step 171 to 178: Check whether the
DR has been made effective or not","The DR has not been made effective"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
Browser("MasterFile").Page("DR Profile").WebElement("Offerings").Click
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DR TableOffering","Not Ex
ist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass ,"Go to the offerings tab and look
out for flags","There are no flags as required"
Else
Reporter.ReportEvent micFail ,"Go to the offerings tab and look
out for flags","There are flags still existing"
Environment.Value ("TestCase_Log")="True"
End If

'Step 179
Browser("MasterFile").Page("DR Profile").WebElement("CUSIP Summary/Add")
.Click
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step179: Go to CUSIP Summary tab a
nd look for Flag","The Flags are absent as required"
Else
Reporter.ReportEvent micFail,"Step179: Go to CUSIP Summary tab a
nd look for Flag ","The flag is still present"
Environment.Value("TestCase_Log")="True"
End If

Call select_Menu("MasterFile","DR Profile","Home;DR Home")


End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++
Public Function MFProfileDR_TC12()
Environment.Value("TestCase_Log")="True"
Environment.Value("CUSIP_NAME")=""
Environment.Value("DRNAME")=""
Environment.Value("ISSUERNAME")=""
'Step1
'Log into the ADR home page
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL",
"MFLogin"))
Call pageCheck_WebEdit("MasterFile","Login Page","username;j_password","
")
Call pageCheck_WebButton("MasterFile","Login Page","Login","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is Dispalyed successfully with th
e Required Field"
Else
Reporter.ReportEvent micFail,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is NOT Dispalyed successfully wit
h the Required Field"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Calling the login function
Call login("MasterFile","Login Page","Relationship Management","
MFLogin")
' Check the MasterFile Application for the 4 links, User Name an
d the last Login Details
Call chkADRHomePage("MasterFile","Depositary Receipt Division's"
,DataTable.Value("HomePageLinks","HomePageVerification"),DataTable.Value("UserFu
llName","MFLogin" ))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass," Verifying the DR Home Pag
e","The DR Home Page is displayed successfully with Home Page Links and the User
Details"
Else
Reporter.ReportEvent micFail," Verifying the DR Home Pag
e","The DR Home Page is NOT displayed successfully with Home Page Links and the
User Details"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Step2
'Click on the masterFile button
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
Call chkMFCAHomePage("MasterFile","MasterFile",DataTable.Value("
MenuName","HomePageVerification"),DataTable.Value("UserFullName","MFLogin" ))
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is disaplyed successfully with the required Menu Ite
ms and also displays the Current Version"
Else
Reporter.ReportEvent micFail,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is NOT displayed successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step3
'Click on the Profile Link
Call check_Menu("MasterFile","MasterFile","Profile")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is Present in the Pr
ofile Menu"
Else
Reporter.ReportEvent micFail, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is NOT Present in th
e Profile Menu"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Step4
'Click on the DR Link
Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","DR"))
Call pageCheck_WebEditOR("MasterFile","Profile - DR Search","Iss
uerName;DRName")
Call pageCheck_WebListOR("MasterFile","Profile - DR Search","Cou
ntryOfManagement;DrOrigin;DRType;DRExchange;SorU;Status;SubStatus")
'Call pageCheck_WebElementinTable("MasterFile","Profile - DR Sea
rch","Name;Country of Management;Type;Status;Sub-Status;S/U;Effective Date;Termi
nation Date;Depository;Origin;Structure","")
intRC = Browser("MasterFile").Page("Profile - DR Search").WebTab
le("DR Search Results").RowCount
If intRC <3 Then
Reporter.ReportEvent micPass,"Verifying the Number of Ro
ws before entering the Search Criteria","There are No Results displayed"
Environment.Value("TestCase_Log")="True"
Else
Reporter.ReportEvent micFail,"Verifying the Number of Ro
ws before entering the Search Criteria","There are few Results displayed"
Call captureScreenshot()
Environment.Value("Execution_Log") = "False"
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 4 : Verifying the Fi
elds present in the Page Profile CUSIP Search","The Required Fields are dispalye
d"
Else
Reporter.ReportEvent micFail, "Step 4 : Verifying the Fi
elds present in the Page Profile CUSIP Search","The Required Fields are NOT Pres
ent"
Environment.Value("TestCase_Log") = "True"
End If
'Step5
'Selecting a Search criteria
Call DRSearchCriteria("MasterFile","Profile - DR Search")
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass, "Step 5 :Click on search with all
default values","The Required Results are displayed"
Else
Reporter.ReportEvent micFail, "Step 5 :Click on search with all
default values","The required search results do not appear"
Environment.Value("TestCase_Log") = "True"
End If
'Step6 to 19
Call CreateNewDR("MasterFile","Profile - DR Search","DR Profile","CUSIP
Profile","","DR")
If Environment.Value("Failure")="True" Then
Call select_Menu("MasterFile","Profile - DR Search","Hom
e;DR Home")
Exit Function
End If
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step6 to 19:Create a New DR and At
tach a CUSIP to it","The New DR with name as "& Environment.Value("DRNAME") &" a
nd CUSIP:"& Ucase(Environment.Value("CUSIP_NAME")) &" is created successfully o
n saving which we get a Yellow Flag"
Else
Reporter.ReportEvent micFail,"Step6 to 19 :Create a New DR and a
ttach a CUSIP to it","The New DR is not created successfully"
Environment.Value("TestCase_Log")="True"
End If

'Step21
Call click_WebElement("MasterFile","DR Profile","Offerings")
If Browser("MasterFile").Page("DR Profile").WebTable("Offerings").Exist(
2) Then
Reporter.ReportEvent micPass,"Step21: Check for the offerings ta
b","The details in the offering tab is as required"
Else
Reporter.ReportEvent micFail,"Step21: Check for the offerings ta
b","The Details in the offerings tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

'Step28
Call click_WebElement("MasterFile","DR Profile","Additional DR Exchanges
")
If Browser("MasterFile").Page("DR Profile").WebTable("Additional DR Exch
ange").Exist(2) Then
Reporter.ReportEvent micPass,"Step28: Check whether the Addition
al DR exchange Tab is as required","The Additional DR Exchanges Tab is as Requir
ed"
Else
Reporter.ReportEvent micFail,"Step28: Check whether the Addition
al exchange Tab is as required","The Additional DR exchanges tab is not present"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
' Call click_WebButton("MasterFile","DR Profile","Add_DRExchange")
' Call click_Image("MasterFile","DR Profile","ExchangeInfo")
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","WebEdit","searchString",dataTable.Value("DRExchangeForCUSIP","D
R"))
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","Image","Go","")
' Call SelectValueInsideFrame("MasterFile","DR Profile","lookupFra
me",dataTable.Value("DREXchangeForCUSIP","DR"))
' Call set_WebEdit_Value("MasterFile","DR Profile","SEDOL",SEDOL)
' Call set_WebEdit_Value("MasterFile","DR Profile","Ticker")
' Call click_Image("MasterFile","DR Profile","Save")
' If Environment.Value("TestCase_Log")=true Then
' Reporter.ReportEvent micPass,"Step22:Fill in the Additio
nal DR Exchanges Tab","The Additional DR exchanges tab gets filled"
' Else
' Reporter.ReportEvent micFail,"Step22: Fill in the Additi
onal DR exchanges tab","The additional DR Exchange tab is not filled as required
"
' Environment.Value("TestCase_Log")=true
' End If
'Step29 and 30
Call click_WebElement("MasterFile","DR Profile","Other DR Services")
If Browser("MasterFile").Page("DR Profile").WebTable("Other DR Services"
).Exist(2) Then
Reporter.ReportEvent micPass,"Step29 and 30: Check whether the A
dditional DR exchange Tab is as required","The Additional DR Exchanges Tab is as
Required"
Else
Reporter.ReportEvent micFail,"Step29 and 30: Check whether the A
dditional exchange Tab is as required","The Additional DR exchanges tab is not p
resent"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step31
If Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation"
).Exist(2) Then
Reporter.ReportEvent micPass,"Step31: Check whether the DR Docum
entation link is present or not","The DR Documentation link is present as requir
ed"
Else
Reporter.ReportEvent micFail,"Step31: Check whether the DR Docum
entation link is present or not","The DR Documentation link is not present as re
quired"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step32
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation").c
lick
If Browser("MasterFile").Page("DR Profile").Exist(3) Then
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumenta
tion").Click
End If
If Browser("MasterFile").Page("DR Documentation Detail").Exist(2) Then
Reporter.ReportEvent micPass,"Step32: Click on the DR Documentat
ion link","The DR Documentation link is clicked as required"
Else
Reporter.ReportEvent micFail,"Step32: Click on the DR Documentat
ion link","The DR Documentation link is not clicked"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step33 to 35
'Filling in the DR documentation
Call Fill_DR_Documentation("MasterFile","DR Documentation Detail")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step33to 35: Fill the DR Documenta
tion and click on save","The DR documentation is done and saved"
Else
Reporter.ReportEvent micFail,"Step33 to 35: Fill the DR Document
ation and click on save","The DR documentation is not done properly"
Environment.Value("TestCase_Log")="True"
End If
If (dataTable.Value("Type","DR") <> "144A" And DataTable.Value("Deposito
ryName","DR") ="BNY") AND (Datatable.Value("Type","DR") <> "Reg. S" And DataTab
le.Value("DepositoryName","DR") ="BNY") Then
Call click_WebElement("MasterFile","DR Profile","SEC Filing")
Call set_WebEdit_Value("MasterFile","DR Profile","CurrentF6ADS",
dataTable.Value("CurrentF6ADS","DR"))
Call set_WebEdit_Value("MasterFile","DR Profile","CurF6Number",d
ataTable.Value("CurF6Number","DR"))
Wait(2)
If DataTable.Value("F6FileDate","DR") <> "" Then
strDataTableValue = DataTable.Value("F6FileDate"
,"DR")
strValue = Split(strDataTableValue,";",-1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image("MasterFile","DR Profile","Show
Calendar_F6FileDate")
Call ClickIcon_SetDate("MasterFile","DR Profile"
,strMonthValue,strYearValue,strDateValue)
End If
Call click_Image("MasterFile","DR Profile","Save")
End If
Call click_WebElement("MasterFile","DR Profile","Detail")
Call Select_Combo_Value("MasterFile","DR Profile","Status","Effective")
Call click_Image("MasterFile","DR Profile","Save")
Wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("Cancel").Click
End If

Call ClickonDRName("MasterFile","DR Profile",DataTable.Value("IssuerName


","DR"),"2")
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").E
xist(2) Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If

''Step39
' 'Call pageCheck_WebElement("MasterFile","Issuer Profile","Advisers;BNY C
ontacts;Comments;Custodians;Detail;DR Services;Products;Und. Sec. Markets","")
' If Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Ex
ist(2) and Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerDocume
ntation").Exist(2)Then
' Reporter.ReportEvent micPass,"Step32: Check whether the issuer p
rofile screen has been loaded or not","The issuer profile screen has been loaded
as required"
' Else
' Reporter.ReportEvent micFail,"Step32: Check whether the issuer p
rofile screen has been loaded or not","The issuer profile screen has not been lo
aded"
' Environment.Value("TestCase_Log")="True"
' End If
'
''Step41
' Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Click
' Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Details")
' If Environment.Value("TestCase_Log")="True" Then
' Reporter.ReportEvent micPass,"Step33: Check whether the required
fields are present in the issuer profile screen detail tab","The required field
s are present as required"
' Else
' Reporter.ReportEvent micFail,"Step33: Check whether the required
fields are present in the issuer profile screen detail tab","The required field
s are not present"
' Environment.Value("TestCase_Log")="True"
' End If
'
''Step34
''Checking for the BNY contact tab
' Browser("MasterFile").Page("Issuer Profile").WebElement("BNY Contacts").
Click
' Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","BNY Contact
s")
'
' If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("BNY Contacts").Exist(2) Then
' Reporter.ReportEvent micPass,"Step34: Check for the details in t
he BNY contacts tab","The details under the BNY contact tab is as required"
' Else
' Reporter.ReportEvent micFail,"Step34: Check for the details in t
he BNY contacts tab","The details under the BNY contact tab is not as required"
' Environment.Value("TestCase_Log")="True"
' End If
'
''Step35
''Checking for the Underlying security markets tab
' Browser("MasterFile").Page("Issuer Profile").WebElement("Und. Sec. Marke
ts").Click
' Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Und. Sec. M
arkets")
' If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Underlying Security Market").Exist(2) Then
' reporter.ReportEvent micPass,"Step35: Check for the Underlying E
vent Tab","The underlying event tab is as required"
' Else
' Reporter.ReportEvent micFail,"Step35: Check for the underlying E
vent tab","The details under the underlying event tab is not as required"
' Environment.Value("TestCase_Log")="True"
' End If
'
''Step36
''Checking for the Custodian Tab
' Browser("MasterFile").Page("Issuer Profile").WebElement("Custodians").Cl
ick
' Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Custodians"
)
' If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Issuers Preferred Custodian").Exist(2)Then
' Reporter.ReportEvent micPass,"Step36: Check for the Issuer preff
ered tab","The details in the Issuer preffered tab is as required"
' Else
' Reporter.ReportEvent micFail,"Step36: Check for the issuer preff
ered tab","The details in the issuer preffered is not present as required"
' Environment.Value("TestCase_Log")="True"
' End If
'
''Step37
''Checking for the Advisors tab
' Browser("MasterFile").Page("Issuer Profile").WebElement("Advisers").Clic
k
' Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Advisers")
' If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Issuers Advisers").Exist(2)Then
' Reporter.ReportEvent micPass,"Step37: Check for the Advisors tab
","The advisers tab details are as required"
' Else
' Reporter.ReportEvent micFail,"Step37: Check for the Advisors Tab
","The advisors tab details are as required"
' Environment.Value("TestCase_Log")="True"
' End If
'
''Step38
''Checking for the Products tab
' Browser("MasterFile").Page("Issuer Profile").WebElement("Products").Clic
k
' Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Products")
' If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Products").Exist(2)Then
' reporter.ReportEvent micPass,"Step38: Check for the presence of
the products web table","The products web table is present as required"
' Else
' reporter.ReportEvent micFail,"Step38: Check for the presence of
the products web table","The products web table is not present as required"
' Environment.Value("TestCase_Log")="True"
' End If
'
'
'
''Step39
''Checking for the DR services tab
' Browser("MasterFile").Page("Issuer Profile").WebElement("DR Services").C
lick
' Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","DR Services
")
' If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("DR Services").Exist(2) Then
' reporter.ReportEvent micPass,"Step39: Check for the presence of
the DR Services web table","The DR services web table is present as required"
' Else
' reporter.ReportEvent micFail,"Step39: Check for the presence of
the DR Services web table","The DR Services web table is not present as required
"
' Environment.Value("TestCase_Log")="True"
' End If
'
''Step40
''Checking for the Comments tab
' Browser("MasterFile").Page("Issuer Profile").WebElement("Comments").Clic
k
' Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Comments")
' If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Comments").Exist(2) Then
' reporter.ReportEvent micPass,"Step40: Check for the presence of
the comments table","The comments table is present as required"
' Else
' reporter.ReportEvent micFail,"Step40: Check for the presence of
the comments table","The comments table is not present"
' Environment.Value("TestCase_Log")="True"
' End If
Call click_WebElement("MasterFile","Issuer Profile","Detail")
Environment.Value("ISSUERNAME")=trim(get_WebEdit_Value("MasterFile","Iss
uer Profile","Name"))
If Environment.Value("TCCURCOUNT")=2 Then
Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerD
ocumentation").Click
Call Fill_Issuer_Documentation("MasterFile","Issuer Documentatio
n","DR")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Fill in the issuer Documen
tation and click on save","The Issuer documentation is done and saved"
Call ClickonDRName("MasterFile","Issuer Documentation",D
ataTable.Value("IssuerName","DR"),"2")
Else
Reporter.ReportEvent micFail,"Fill in the Issuer Documen
tation and click on save","The Issuer documentation is not filled properly"
Environment.Value("TestCase_Log")="True"
End If
End If
Call logoutfromApp("MasterFile","Issuer Profile")
'Step 55
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Approver","MFLogin")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step55: Log into application using
Approver ID","We have successfully logged in as an approver"
Else
Reporter.ReportEvent micFail,"Step55: Log into the application u
sing Approver ID ","We have not successfully logged in as an approver"
Environment.Value("TestCase_Log")="True"
End If
'Step56 to 63
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","CUSIP Profile","CUSIP",E
nvironment.Value("CUSIP_NAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step56 to 63:Approve the CUSIP det
ails","The CUSIP details are approved as required"
Else
Reporter.ReportEvent micFail,"Step56 to 63 : Approve the CUSIP d
etails","The CUSIP details are not approved as required"
Environment.Value("TestCase_Log")="True"
End If

'Step64to 68
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","DR Documentation","DR Na
me",Environment.Value("DRNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step64 to 68: Approve the DR Docum
entation","The DR Documentation is filled in correctly as required"
Else
Reporter.ReportEvent micFail,"Step64 to 68: Approve the DR Docum
entation","The DR Documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
'Step 69 to 74
Environment.Value("TestCase_Log")="True"
If Environment.Value("TCCURCOUNT")=2 Then
Call ApprovalFunction_CreateNewDR("MasterFile","Issuer Documenta
tion","Issuer",Environment.value("ISSUERNAME"),"Approved","Approved","Pending Ap
proval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step69 to 74Approve the is
suer documentation","The issuer documentation is approved as required"
Else
Reporter.ReportEvent micFail,"Step 69 to 74 : Approve th
e issuer documentation","The issuer documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
Else
Reporter.ReportEvent micPass,"Step69 to 74 : Approve the issuer
documentation","The issuer documentation already is approved"
End if
'Step 80 to 84
Environment.Value("TestCase_Log")="True"
Call ApprovalFunction_CreateNewDR("MasterFile","DR Profile","Name",Environme
nt.Value("DRNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step80 to 84: Approve and Batch th
e DR profile","The DR profile gets approved and batched successfully"
Else
Reporter.ReportEvent micFail,"Step80 to 84: Approve and Batch th
e DR Profile","The DR Profile gets approved and batched successfully"
Environment.Value("TestCase_Log")="True"
End If
Call logoutfromApp("MasterFile","Issuer Profile")
'Step86 to 93
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Relationship Management","MFLogin"
)
Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","D
R"))
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
Call DRSearchCriteria("MasterFile","Profile - DR Search")
Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
OriginOfDR=Browser("MasterFile").Page("DR Profile").WebEdit("DROrigin").
GetROProperty("value")
StatusOfDR=Browser("MasterFile").Page("DR Profile").WebList("Status").Ge
tROProperty("value")
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If StatusOfDR="Effective" and OriginOfDR="New Program" and Environment.V
alue("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step67 to 74: Check whether the DR
has been made effective or not","The DR Has been made effective successfully"
Else
Reporter.ReportEvent micFail,"Step 67 to 75: Check whether the D
R has been made effective or not","The DR has not been made effective"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If

'Step 94
Browser("MasterFile").Page("DR Profile").WebElement("CUSIP Summary/Add")
.Click
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step94: Go to CUSIP Summary tab an
d look for Flag","The Flags are absent as required"
Else
Reporter.ReportEvent micFail,"Step94: Go to CUSIP Summary tab an
d look for Flag ","The flag is still present"
Environment.Value("TestCase_Log")="False"
End If
Call select_Menu("MasterFile","DR Profile","Home;DR Home")
End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++
Public Function MFProfileDR_TC13()

Environment.Value("TestCase_Log")="True"
Environment.Value("CUSIP_NAME")=""
Environment.Value("DRNAME")=""
Environment.Value("ISSUERNAME")=""
'Step1
'Log into the ADR home page
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL",
"MFLogin"))
Call pageCheck_WebEdit("MasterFile","Login Page","username;j_pas
sword","")
Call pageCheck_WebButton("MasterFile","Login Page","Login","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is Dispalyed successfully with th
e Required Field"
Else
Reporter.ReportEvent micFail,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is NOT Dispalyed successfully wit
h the Required Field"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Calling the login function
Call login("MasterFile","Login Page","Relationship Management","
MFLogin")
' Check the MasterFile Application for the 4 links, User Name an
d the last Login Details
Call chkADRHomePage("MasterFile","Depositary Receipt Division's"
,DataTable.Value("HomePageLinks","HomePageVerification"),DataTable.Value("UserFu
llName","MFLogin" ))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass," Verifying the DR Home Pag
e","The DR Home Page is displayed successfully with Home Page Links and the User
Details"
Else
Reporter.ReportEvent micFail," Verifying the DR Home Pag
e","The DR Home Page is NOT displayed successfully with Home Page Links and the
User Details"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Step2
'Click on the masterFile button
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
Call chkMFCAHomePage("MasterFile","MasterFile",DataTable.Value("MenuName
","HomePageVerification"),DataTable.Value("UserFullName","MFLogin" ))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is disaplyed successfully with the required Menu Ite
ms and also displays the Current Version"
Else
Reporter.ReportEvent micFail,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is NOT displayed successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step3
'Click on the Profile Link
Call check_Menu("MasterFile","MasterFile","Profile")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is Present in the Pr
ofile Menu"
Else
Reporter.ReportEvent micFail, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is NOT Present in th
e Profile Menu"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step4
'Click on the DR Link
Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","DR"))
Call pageCheck_WebEditOR("MasterFile","Profile - DR Search","Iss
uerName;DRName")
Call pageCheck_WebListOR("MasterFile","Profile - DR Search","Cou
ntryOfManagement;DrOrigin;DRType;DRExchange;SorU;Status;SubStatus")
'Call pageCheck_WebElementinTable("MasterFile","Profile - DR Sea
rch","Name;Country of Management;Type;Status;Sub-Status;S/U;Effective Date;Termi
nation Date;Depository;Origin;Structure","")
intRC = Browser("MasterFile").Page("Profile - DR Search").WebTab
le("DR Search Results").RowCount
If intRC <3 Then
Reporter.ReportEvent micPass,"Verifying the Number of R
ows before entering the Search Criteria","There are No Results displayed"
Else
Reporter.ReportEvent micFail,"Verifying the Number of Ro
ws before entering the Search Criteria","There are few Results displayed"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log") = "True"
End If
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass, "Step 4 : Verifying the Fi
elds present in the Page Profile CUSIP Search","The Required Fields are dispalye
d"
Else
Reporter.ReportEvent micFail, "Step 4 : Verifying the Fi
elds present in the Page Profile CUSIP Search","The Required Fields are NOT Pres
ent"
Environment.Value("TestCase_Log") = "True"
End If
'Step5
'Selecting a Search criteria
Call DRSearchCriteria("MasterFile","Profile - DR Search")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 5 :Click on search with all
default values","The Required Results are displayed"
Else
Reporter.ReportEvent micFail, "Step 5 :Click on search with all
default values","The required search results do not appear"
Environment.Value("TestCase_Log") = "True"
End If
'Step6 to 20
Call CreateNewDR("MasterFile","Profile - DR Search","DR Profile","CUSIP
Profile","","DR")
If Environment.Value("Failure")="True" Then
Call select_Menu("MasterFile","Profile - DR Search","Hom
e;DR Home")
Exit Function
End If
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step6 to 20:Create a New DR and At
tach a CUSIP to it","The New DR with name as "& Environment.Value("DRNAME") &" a
nd CUSIP:"& Ucase(Environment.Value("CUSIP_NAME")) &" is created successfully o
n saving which we get a Yellow Flag"
Else
Reporter.ReportEvent micFail,"Step6 to 20 :Create a New DR and a
ttach a CUSIP to it","The New DR is not created successfully"
Environment.Value("TestCase_Log")="True"
End If
'Get the value of the CUSIP for the 144A DR
Environment.Value("CUSIPNAME144A")=Environment.Value("CUSIP_NAME")
'Step20
Call click_WebElement("MasterFile","DR Profile","Offerings")
If Browser("MasterFile").Page("DR Profile").WebTable("Offerings").Exist(
2) Then
Reporter.ReportEvent micPass,"Step21: Check for the offerings ta
b","The details in the offering tab is as required"
Else
Reporter.ReportEvent micFail,"Step21: Check for the offerings ta
b","The Details in the offerings tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step22
' Call click_WebElement("MasterFile","DR Profile","Additional DR E
xchanges")
' Call click_WebButton("MasterFile","DR Profile","Add_DRExchange")
' Call click_Image("MasterFile","DR Profile","ExchangeInfo")
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","WebEdit","searchString",dataTable.Value("DRExchangeForCUSIP","D
R"))
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","Image","Go","")
' Call SelectValueInsideFrame("MasterFile","DR Profile","lookupFra
me",dataTable.Value("DREXchangeForCUSIP","DR"))
' Call set_WebEdit_Value("MasterFile","DR Profile","SEDOL",SEDOL)
' Call set_WebEdit_Value("MasterFile","DR Profile","Ticker")
' Call click_Image("MasterFile","DR Profile","Save")
' If Environment.Value("TestCase_Log")=true Then
' Reporter.ReportEvent micPass,"Step22:Fill in the Additio
nal DR Exchanges Tab","The Additional DR exchanges tab gets filled"
' Else
' Reporter.ReportEvent micFail,"Step22: Fill in the Additi
onal DR exchanges tab","The additional DR Exchange tab is not filled as required
"
' Environment.Value("TestCase_Log")=true
' End If

'Step31

If Browser("MasterFile").Page("DR Profile").WebElement("DRDocume
ntation").Exist(2) Then
Reporter.ReportEvent micPass,"Check whether the DR Docum
entation link is present or not","The DR Documentation link is present as requir
ed"
Else
Reporter.ReportEvent micFail,"Check whether the DR Docum
entation link is present or not","The DR Documentation link is not present as re
quired"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

'Step32
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation").c
lick
If Browser("MasterFile").Page("DR Profile").Exist(3) Then
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumenta
tion").Click
End If
If Browser("MasterFile").Page("DR Documentation Detail").Exist(2) Then
Reporter.ReportEvent micPass,"Step32: Click on the DR Documentat
ion link","The DR Documentation link is clicked as required"
Else
Reporter.ReportEvent micFail,"Step32: Click on the DR Documentat
ion link","The DR Documentation link is not clicked"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step33 to 35
'Filling in the DR documentation
Call Fill_DR_Documentation("MasterFile","DR Documentation Detail")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step33 to 35: Fill the DR Document
ation and click on save","The DR documentation is done and saved"
Else
Reporter.ReportEvent micFail,"Step33 to 35: Fill the DR Document
ation and click on save","The DR documentation is not done properly"
Environment.Value("TestCase_Log")="True"
End If

Call ClickonDRName("MasterFile","DR Profile",DataTable.Value("IssuerName","D


R"),"2")
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").E
xist(2) Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").E
xist(2) Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If

'Step36
'Call pageCheck_WebElement("MasterFile","Issuer Profile","Advisers;BNY C
ontacts;Comments;Custodians;Detail;DR Services;Products;Und. Sec. Markets","")
If Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Ex
ist(2) and Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerDocume
ntation").Exist(2)Then
Reporter.ReportEvent micPass,"Step36: Check whether the issuer p
rofile screen has been loaded or not","The issuer profile screen has been loaded
as required"
Else
Reporter.ReportEvent micFail,"Step36: Check whether the issuer p
rofile screen has been loaded or not","The issuer profile screen has not been lo
aded"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
If Browser("MasterFile").Page("Issuer Profile").Exist(2) Then
Reporter.ReportEvent micPass,"Step37 and 38: Check whether the I
ssuer Profile Screen has loaded ","The Issuer profile screen has loaded properly
"
Else
Reporter.ReportEvent micFail,"Step 37 and 38: Check whether the
Issuer profile screen has loaded","The issuer profile screen has not loaded prop
erly"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
''Step39
' Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Click
' Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Details")
' If Environment.Value("TestCase_Log")="True" Then
' Reporter.ReportEvent micPass,"Step39: Check whether the required
fields are present in the issuer profile screen detail tab","The required field
s are present as required"
' Else
' Reporter.ReportEvent micFail,"Step39: Check whether the required
fields are present in the issuer profile screen detail tab","The required field
s are not present"
' Environment.Value("TestCase_Log")="True"
' End If
'
''Step41
''Checking for the BNY contact tab
' Browser("MasterFile").Page("Issuer Profile").WebElement("BNY Contacts").
Click
' Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","BNY Contact
s")
'
' If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("BNY Contacts").Exist(2) Then
' Reporter.ReportEvent micPass,"Step41: Check for the details in t
he BNY contacts tab","The details under the BNY contact tab is as required"
' Else
' Reporter.ReportEvent micFail,"Step41: Check for the details in t
he BNY contacts tab","The details under the BNY contact tab is not as required"
' Environment.Value("TestCase_Log")="True"
' End If
'
''Step43
''Checking for the Underlying security markets tab
' Browser("MasterFile").Page("Issuer Profile").WebElement("Und. Sec. Marke
ts").Click
' Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Und. Sec. M
arkets")
' If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Underlying Security Market").Exist(2) Then
' reporter.ReportEvent micPass,"Step43: Check for the Underlying E
vent Tab","The underlying event tab is as required"
' Else
' Reporter.ReportEvent micFail,"Step43: Check for the underlying E
vent tab","The details under the underlying event tab is not as required"
' Environment.Value("TestCase_Log")="True"
' End If
'
''Step44
''Checking for the Custodian Tab
' Browser("MasterFile").Page("Issuer Profile").WebElement("Custodians").Cl
ick
' Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Custodians"
)
' If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Issuers Preferred Custodian").Exist(2)Then
' Reporter.ReportEvent micPass,"Step44: Check for the Issuer preff
ered tab","The details in the Issuer preffered tab is as required"
' Else
' Reporter.ReportEvent micFail,"Step44: Check for the issuer preff
ered tab","The details in the issuer preffered is not present as required"
' Environment.Value("TestCase_Log")="True"
' End If
'
''Step45
''Checking for the Advisors tab
' Browser("MasterFile").Page("Issuer Profile").WebElement("Advisers").Clic
k
' Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Advisers")
' If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Issuers Advisers").Exist(2)Then
' Reporter.ReportEvent micPass,"Step45: Check for the Advisors tab
","The advisers tab details are as required"
' Else
' Reporter.ReportEvent micFail,"Step45: Check for the Advisors Tab
","The advisors tab details are as required"
' Environment.Value("TestCase_Log")="True"
' End If
'
''Step46
''Checking for the Products tab
' Browser("MasterFile").Page("Issuer Profile").WebElement("Products").Clic
k
' Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Products")
' If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Products").Exist(2)Then
' reporter.ReportEvent micPass,"Step46: Check for the presence of
the products web table","The products web table is present as required"
' Else
' reporter.ReportEvent micFail,"Step46: Check for the presence of
the products web table","The products web table is not present as required"
' Environment.Value("TestCase_Log")="True"
' End If
'
'
'
''Step47
''Checking for the DR services tab
' Browser("MasterFile").Page("Issuer Profile").WebElement("DR Services").C
lick
' Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","DR Services
")
' If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("DR Services").Exist(2) Then
' reporter.ReportEvent micPass,"Step47: Check for the presence of
the DR Services web table","The DR services web table is present as required"
' Else
' reporter.ReportEvent micFail,"Step47: Check for the presence of
the DR Services web table","The DR Services web table is not present as required
"
' Environment.Value("TestCase_Log")="True"
' End If
'
''Step48
''Checking for the Comments tab
' Browser("MasterFile").Page("Issuer Profile").WebElement("Comments").Clic
k
' Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Comments")
' If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Comments").Exist(2) Then
' reporter.ReportEvent micPass,"Step48: Check for the presence of
the comments table","The comments table is present as required"
' Else
' reporter.ReportEvent micFail,"Step48: Check for the presence of
the comments table","The comments table is not present"
' Environment.Value("TestCase_Log")="True"
' End If
Call click_WebElement("MasterFile","Issuer Profile","Detail")
Environment.Value("ISSUERNAME")=trim(get_WebEdit_Value("MasterFile","Iss
uer Profile","Name"))
If Environment.Value("TCCURCOUNT")=1 Then
Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerD
ocumentation").Click
Call Fill_Issuer_Documentation("MasterFile","Issuer Documentatio
n","DR")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Fill in the issuer Documen
tation and click on save","The Issuer documentation is done and saved"
Call ClickonDRName("MasterFile","Issuer Documentation",I
SSUERNAME,"2")
Else
Reporter.ReportEvent micFail,"Fill in the Issuer Documen
tation and click on save","The Issuer documentation is not filled properly"
Environment.Value("TestCase_Log")="True"
End If
End If
Call logoutfromApp("MasterFile","Issuer Profile")
'Edited
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Relationship Management","MFLogin"
)
Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","D
R"))
Wait(3)
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
Call click_Image("MasterFile","Profile - DR Search","Search")
Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
If dataTable.Value("Type","DR") <> "144A" and datatable.Value("Type","D
R") <> "RegS" and DataTable.Value("Sponsored","DR") <>"U" Then
Call click_WebElement("MasterFile","DR Profile","SEC Filing")
Call set_WebEdit_Value("MasterFile","DR Profile","CurrentF6ADS",
dataTable.Value("CurrentF6ADS","DR"))
Call set_WebEdit_Value("MasterFile","DR Profile","CurF6Number",d
ataTable.Value("CurF6Number","DR"))
Wait(2)
If DataTable.Value("F6FileDate","DR") <> "" Then
strDataTableValue = DataTable.Value("F6FileDate"
,"DR")
strValue = Split(strDataTableValue,";",-1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image("MasterFile","DR Profile","Show
Calendar_F6FileDate")
Call ClickIcon_SetDate("MasterFile","DR Profile"
,strMonthValue,strYearValue,strDateValue)
End If
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").E
xist(2) Then
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("OK").Click
End If
Call click_Image("MasterFile","DR Profile","Save")
End If
Wait(4)
Wait(4)
Call click_WebElement("MasterFile","DR Profile","Detail")
Call click_WebElement("MasterFile","DR Profile","Detail")
'Creating a Bifurcated DR
Browser("MasterFile").Page("DR Profile").WebElement("DRLifeCycle").Click
If Browser("DR Lifecycle / Relation").Page("DR Lifecycle / Relation").Ex
ist(2) Then
Reporter.ReportEvent micPass,"Step55: Check if the DR life Cycle
screen has opened","The DR Life Cycle Screen has opened successfully"
Else
Reporter.ReportEvent micFail,"Step55: Check if the DR Life Cycle
Screen has opened","The DR Life Cycle Screen has not opened successfully"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
Call select_Radiobutton("DR Lifecycle / Relation","DR Lifecycle / Relati
on","slc","0")
Call click_WebButton("DR Lifecycle / Relation","DR Lifecycle / Relation"
,"Create new DR")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Select the Bifurcated radio link a
nd click on create new DR","The Bifurcated DR button and the Create new DR butt
on is clicked correctly"
Else
Reporter.ReportEvent micPass,"Select the Bifurcated radio link a
nd click on create new DR","The Bifurcated DR button and the Create new DR butt
on is not clicked correctly"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Create a New CUSIP for the RegS DR
Wait(5)
Environment.Value("RegDRNAME")=get_WebEdit_Value("MasterFile","DR Profil
e","DRName")
Environment.Value("RegDRNAME")=Environment.Value("RegDRNAME") &"_Automat
ion_" &Time&Date
Wait(5)
Call set_WebEdit_Value("MasterFile","DR Profile","DRName",Environment.Va
lue("RegDRNAME"))
Call set_WebEdit_Value("MasterFile","DR Profile","Comments","This is for a t
esting purpose. This has been created by the ADR Automation Team")
If DataTable.Value("FirstFiler","DR") <> "" Then
Call Select_Combo_Value("MasterFile","DR Profile","FirstFiler",
DataTable.Value("FirstFilerReg","DR"))
End If
Environment.Value("TestCase_Log")="True"
Call click_Image("MasterFile","DR Profile","Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step 56: Creating a new DR ","The
new DR is created as per requirement"
Else
Reporter.ReportEvent micFail,"Step56: Creating a new DR","The Ne
w DR is not created as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log") = "True"
End If
'step57
'Select the CUSIP ADD Tab
Call click_WebElement("MasterFile","DR Profile","CUSIP Summary/Add")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass," Step57:Select the CUSIP Summary/A
DD tab","The CUSIP Summary/Add tab is selected as required"
Else
Reporter.ReportEvent micFail,"Step57: Select the CUSIP Summary/A
dd tab","The CUSIP Summary/Add tab is not selected as required"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log")="False"
End If
'Click on the ADD button
Call click_WebButton("MasterFile","DR Profile","ADD")
'Call pageCheck_WebElementinTable(strBrowserName,strPageName,"Type;CUSIP
,DR Exchange,DR Ticker Symbol,Ratio DRs,Ratio Underlying Shares,Current CUSIP","
")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass," Step58: Click on the ADD button i
n the CUSIP summary screen","The required fields under the CUSIP summary is pres
ent as required"
Else
Reporter.ReportEvent micFail,"Step58: Click on ADD button in the
CUSIP summary screen","The required fields under the CUSIP summary is not prese
nt as required"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log")="False"
End If
'Set the CUSIP details
Call Select_Combo_Value("MasterFile","DR Profile","CUSIP Type","Primary"
)
Wait(2)
If Browser("MasterFile").Page("DR Profile").WebTable("CUSIP Summary/Add"
).Image("New CUSIP").Exist(2) Then
Browser("MasterFile").Page("DR Profile").WebTable("CUSIP Summary
/Add").Image("New CUSIP").Click
Reporter.ReportEvent micPass,"Step59: Click on the new CUSIP but
ton","The new CUSIP button is clicked as required"
Else
Reporter.ReportEvent micFail,"Step59: Click on the new CUSIP bu
tton","The new CUSIP button is not present as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log") = "True"
End If

'On clicking the New CUSIP buton the New CUSIP screen opens up
'call pageCheck_WebEdit(strBrowserName,strCUSIPPageName,"Name;Br
iefName;DisplaycusCountryCode_0;cusQspAdrs_0;cusQspShares_0;cusTsymNm_0;cusDrIsi
nNo_0;DisplaycusExchangeCode_0;cusDrCmnCd_0;cusDrSedolNo_0;cusPrcShrBaseRt_0;cus
QspUnderlyingIsin_0","")
'Call pageCheck_WebList("MasterFile","CUSIP Profile","cusQspActi
veFlag_0","")
' If Environment.Value("TestCase_Log")="True" Then
' Reporter.ReportEvent micPass,"Click on the New CUSIP but
ton","The CUSIP profile screen opens up as required"
' Else
' Reporter.ReportEvent micFail,"Click on the New CUSIP but
ton","The CUSIP profile screen does not open up as required"
' Environment.Value("TestCase_Log") = "True"
' Environment.Value("Execution_Log")="False"
' End If

'Entering the details for the CUSIP screen


' Call set_WebEdit_Value("MasterFile","CUSIP Profile","Ratio DRs",
dataTable.Value("RatioDR","DR"))
' Call set_WebEdit_Value("MasterFile","CUSIP Profile","RatioUnderl
yingShares",dataTable.Value("RatioUnderlyingShares","DR"))
Environment.Value("RegCUSIP_NAME")="A"& createAlphanumericStrin
g(8)
Call set_WebEdit_Value("MasterFile","CUSIP Profile","CUSIP",Envi
ronment.Value("RegCUSIP_NAME"))
' Call Browser("MasterFile").Dialog("Microsoft Internet Explorer
").WaitProperty("Visible","True",5)
Wait(4)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").E
xist(2) Then
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("OK").Click
End If
DRSEDOL_VALUE=createAlphanumericString(7)
Call set_WebEdit_Value("MasterFile","CUSIP Profile","DRSEDOL",DR
SEDOL_VALUE)
Call click_Image("MasterFile","CUSIP Profile","DRExchangeInfo")
Call SelectValueInsideFrame("MasterFile","CUSIP Profile","lookup
Frame",DataTable.Value("DRExchangeName","DR"))
'wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").E
xist(2) Then
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("OK").Click
End If
DRTICKER_SYMBOL=createAlphanumericString(5)
Call set_WebEdit_Value("MasterFile","CUSIP Profile","DR Ticker S
ymbol",DRTICKER_SYMBOL)

'If DataTable.Value("Sponsored",strDatasheetName) = "U" and DataTable.Va


lue("DepositoryName",strDatasheetName)="BNY" Then
' Call click_Image(strBrowserName,strCUSIPPageName,"UnderlyingSecu
rityInfoUnsponsored")
'ElseIf DataTable.Value("Sponsored",strDatasheetName) ="S" and DataTable
.Value("DepositoryName",strDatasheetName)="BNY" Then
' Call click_Image(strBrowserName,strCUSIPPageName,"UnderlyingSec
urityInfoSponsored")
'Else
' Call click_Image(strBrowserName,strCUSIPPageName,"UnderlyingSecu
rityInfoNonBNY")
'End If
'
' call SelectValueInsideFrame(strBrowserName,strCUSIPPageName,"lookup
Frame",dataTable.Value("UnderlyingSecurity",strDatasheetName))
'
If DataTable("DepositoryName","DR") ="BNY" Then
Call click_Image("MasterFile","CUSIP Profile","CommonDepositoryI
nfo")
Call SelectValueInsideFrame("MasterFile","CUSIP Profile","lookup
Frame",DataTable.Value("CommonDepository","DR"))
End If
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step61 to 63: Fill in the details
required for the new CUSIP","The Details for the new CUSIP are filled as require
d"
Else
Reporter.ReportEvent micFail,"Step 61 to 63: Fill in the details
required for the new CUSIP","The details for the new CUSIP are not filled as re
quired"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log")="False"
End If
Wait(2)
Wait(5)
'Call Browser("MasterFile").Page("CUSIP Profile").Image("Save").WaitProp
erty("visible","True",5)
'Click on save
Call click_Image("MasterFile","CUSIP Profile","Save")
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("OK").Click
End If
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step 64: Click on the save button
after filling in the required details","The CUSIP gets saved as required"
Else
Reporter.ReportEvent micFail,"Step64: Click on the save button a
fter filling in the required details","The CUSIP does not get saved as required"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log")="False"
End If
Wait(3)
Wait(4)
'Click on the DR name
Call Browser("MasterFile").Page("CUSIP Profile").Image("Save").WaitPrope
rty("Visible","True",5)
Call ClickonDRName("MasterFile","CUSIP Profile",Environment.Value("RegDR
NAME"),"2")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("DR Profile").Exist(2) Then
Reporter.ReportEvent micPass,"Step65: Click on the DR Name","The
DR name is clicked as required"
Else
Reporter.ReportEvent micFail,"Step65: Click on the DR Name","The
DR Name is not clicked as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log") = "True"
End If
wait(3)
''Open the Required Reg S DR
'Call click_WebButton("MasterFile","DR Profile","Related DR")
Browser("MasterFile").Page("DR Profile").WebElement("CUSIP Summary/Add")
.Click
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step66: Go to CUSIP Summary tab an
d look for Flag","The Flags are present as required"
Else
Reporter.ReportEvent micFail,"Step66: Go to CUSIP Summary tab an
d look for Flag ","The flag is not present"
Environment.Value("TestCase_Log")="True"
End If
Browser("Masterfile").Page("DR Profile").WebElement("Detail").Click
'Filling the DR Documentation for the Reg-S DR
Call click_WebElement("MasterFile","DR Profile","DRDocumentation")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Click on the DR documentation link
","The DR Documentation link is clicked as required"
Else
Reporter.ReportEvent micFail,"Click on the DR documentation link
","The DR Documentation link is not clicked as required"
Environment.Value("TestCase_Log")="True"
End If
Wait(3)
Wait(4)
''Setting the values for the Fees tab
Call click_WebElement("MasterFile","DR Documentation Detail","Fees")
Wait(3)
' Click on Add Button and click on the Image ' info'
Call Browser("MasterFile").Page("DR Documentation Detail").WebTable("Fee
s_Table").WaitProperty("Visible","True",5)
Call click_WebButton("MasterFile","DR Documentation Detail","Add_Fees")
Wait(3)
Call click_Image("MasterFile","DR Documentation Detail","FeeType")
Wait(3)
' Select all the Fees present in the Fee Frame
intRowCount = Browser("MasterFile").Page("DR Documentation Detail").Fram
e("lookupFrame").WebTable("FeeDescription").RowCount
'MsgBox intRowCount
For intRowCounter = 2 to intRowCount
intRowCounts = Browser("MasterFile").Page("DR Documentation Deta
il").WebTable("Fees_Table").RowCount
Browser("MasterFile").Page("DR Documentation Detail").WebTable("
Fees_Table").ChildItem(intRowCounts,1,"Image","0").Click
intRowCount = Browser("MasterFile").Page("DR Documentation Detai
l").Frame("lookupFrame").WebTable("FeeDescription").RowCount
If intRowCount = 2 Then
strGetCellData = Browser("MasterFile").Page("DR Documentation De
tail").Frame("lookupFrame").WebTable("FeeDescription").GetCellData(2,1)
Browser("MasterFile").Page("DR Documentation Detail").WebElement
("html tag:=TD","innertext:="& strGetCellData).Click
'Call click_WebButton(strBrowserName,strPageName,"Add_Fees")
Exit For
Else
strGetCellData = Browser("MasterFile").Page("DR Documentation De
tail").Frame("lookupFrame").WebTable("FeeDescription").GetCellData(2,1)
Browser("MasterFile").Page("DR Documentation Detail").WebElement
("html tag:=TD","innertext:="& strGetCellData).Click
Call click_WebButton("MasterFile","DR Documentation Detail","Add
_Fees")
End If
Next
' If the Fee Amount is "NULL", set 0 as the Value in the Field
intFeeRC = Browser("MasterFile").Page("DR Documentation Detail").WebTa
ble("Fees_Table").RowCount
For intCount =3 to intFeeRC
strCellData = Browser("MasterFile").Page("DR Documentation De
tail").WebTable("Fees_Table").ChildItem(intCount,2,"WebEdit","0").GetROProperty(
"value")
If strCellData = "" Then
Browser("MasterFile").Page("DR Documentation Detail").We
bTable("Fees_Table").ChildItem(intCount,2,"WebEdit","0").Set "0"
End If
Next
Environment.Value("TestCase_Log")="True"
Call click_Image("MasterFile","DR Documentation Detail","Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step75: Click on the Fees tab and
fill in the details and click on save","The details of the fees are filled and s
aved as required"
Else
Reporter.ReportEvent micFail,"Step75: Click on the Fees tab and
fill in the details and click on save","The details are not filled properly"
Environment.Value("TestCase_Log")="True"
End If
Wait(2)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Reporter.ReportEvent micPass,"Check whether the microsoft intern
et explorer pop-up comes up or not","The pop-up appears as required"
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("Cancel").Click
End if
Wait(2)
' If Browser("MasterFile").Page("DR Documentation Detail").WebElement("Is
suerProfile").Exist(2) Then
' Browser("MasterFile").Page("DR Documentation Detail").WebElement
("IssuerProfile").click
' End If
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Reporter.ReportEvent micPass,"Check whether the microsoft intern
et explorer pop-up comes up or not","The pop-up appears as required"
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("Cancel").Click
End if
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step76: Fill in the DR documentati
on details and click on save","The DR documentation details are filled as requir
ed"
Else
Reporter.ReportEvent micFail,"Step76: Fill in the DR documentati
on details and click on save","The DR documentation details are filled as requir
ed"
Environment.Value("TestCase_Log")="True"
End If
Wait(4)
'Call logoutfromApp("MasterFile","DR Documentation Detail")
'Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogi
n"))
'Call login("MasterFile","Login Page","Relationship Management","MFLogin
")
'Call click_WebElement("MasterFile","Depositary Receipt Division's","Mas
terFile")
Call select_Menu("MasterFile","DR Documentation Detail",DataTable.Value(
"MenuPath","DR"))
Wait(3)
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
Call click_Image("MasterFile","Profile - DR Search","Search")
Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
'Call ClickonDRName("MasterFile","DR Documentation Detail",Environment.V
alue("RegDRNAME"),"2")
'Call click_WebButton("MasterFile","DR Profile","Related DR")
Wait(3)
Call Select_Combo_Value("MasterFile","DR Profile","Status","Effective")
Call click_Image("MasterFile","DR Profile","Save")
Wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("Cancel").Click
End If
Call logoutfromApp("MasterFile","DR Profile")
'Step 77
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Approver","MFLogin")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step77: Log into application using
Approver ID","We have successfully logged in as an approver"
Else
Reporter.ReportEvent micFail,"Step77: Log into the application u
sing Approver ID ","We have not successfully logged in as an approver"
Environment.Value("TestCase_Log")="True"
End If
'Step74 to 85
Call ApprovalFunction_CreateNewDR("MasterFile","CUSIP Profile","CUSIP",E
nvironment.Value("CUSIPNAME144A"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step74 to 85:Approve the CUSIP det
ails","The CUSIP details are approved as required"
Else
Reporter.ReportEvent micFail,"Step74 to 85: Approve the CUSIP de
tails","The CUSIP details are not approved as required"
Environment.Value("TestCase_Log")="True"
End If

'Step86 to 90
Call ApprovalFunction_CreateNewDR("MasterFile","DR Documentation","DR Na
me",Environment.Value("DRNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step86 to 90: Approve the DR Docum
entation","The DR Documentation is filled in correctly as required"
Else
Reporter.ReportEvent micFail,"Step86 to 90: Approve the DR Docum
entation","The DR Documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
'Step 91 to 96
If Environment.Value("TCCURCOUNT")=1 Then
Call ApprovalFunction_CreateNewDR("MasterFile","Issuer Documentation","I
ssuer",Environment.value("ISSUERNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step91 to 96: Approve the issuer d
ocumentation","The issuer documentation is approved as required"
Else
Reporter.ReportEvent micFail,"Step 91 to 96 : Approve the issuer
documentation","The issuer documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
Reporter.ReportEvent micPass,"Step91 to 96 : Approve the issuer document
ation","The issuer documentation already is approved"
End if
'Call logoutfromApp("MasterFile","Approval Queue Item Search")

'Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogi


n"))
'Call login("MasterFile","Login Page","Approver","MFLogin")
Call ApprovalFunction_CreateNewDR("MasterFile","CUSIP Profile","CUSIP",E
nvironment.Value("RegCUSIP_NAME"),"Approved","Approved","Pending Approval")
Call ApprovalFunction_CreateNewDR("MasterFile","DR Documentation","DR Na
me",Environment.Value("RegDRNAME"),"Approved","Approved","Pending Approval")
Call ApprovalFunction_CreateNewDR("MasterFile","DR Profile","Name",Envir
onment.Value("RegDRNAME"),"Approved","Approved","Pending Approval")
' Call logoutfromApp("MasterFile","Approval Queue Item Search")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Approve the details of the Bifurc
ated Reg. S DR","The details of the bifurcated Reg. S DR is approved as required
"
Else
Reporter.ReportEvent micFail,"Approve the details of the Bifurc
ated Reg. S DR","The details of the bifurcated Reg. S DR is not approved as requ
ired"
End If
'Step 61 to 66
Call ApprovalFunction_CreateNewDR("MasterFile","DR Profile","Name",Environme
nt.Value("DRNAME"),"Approved","Approved","Pending Approval")
Call logoutfromApp("MasterFile","Approval Queue Item Search")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step 102 to 107: Approve the 144A
DR","The 144A DR is approved as required"
Else
Reporter.ReportEvent micFail,"Step102 to 107: Approve the 144A D
R ","The 144A DR is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
'Step108
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step108 :Log into the ADR
home page","The user logs into the ADR home page as required"
Else
Reporter.ReportEvent micFail,"Step 108: Log into the ADR
home page","The user does not log into the ADR home page as required"
End If
'Step109
Call login("MasterFile","Login Page","Relationship Management","MFLogin"
)
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step109: User enters a valid user
name and password","The username and password are accepted and the application h
ome page is displayed"
Else
Reporter.ReportEvent micFail,"Step109: User enters a valid usern
ame and password","The username and password are not accepted"
Environment.Value("TestCase_Log")="True"
End If
Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Click on the masterfile link as re
quired","The user clicks on the masterfile on which the masterfile opens as requ
ired"
Else
Reporter.ReportEvent micFail,"Click on the masterfile link as re
quired","The user clicks on the masterfile on which the masterfile does not open
"
Environment.Value("TestCase_Log")="True"
End If
'Step111 and 112
Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","D
R"))
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"User selects the Profile DR link",
"The DR Search page opens up as required"
Else
Reporter.ReportEvent micFail,"User selects the profile DR link",
"The DR search page does not open up"
Environment.Value("TestCase_Log")="True"
End If
'Step113
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
Call DRSearchCriteria("MasterFile","Profile - DR Search")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"User enters the required DR detail
s and clicks on search","The DR gets displayed successfully"
Else
Reporter.ReportEvent micFail,"User enters the required DR detail
s and clicks on search","The DR is not displayed successfully"
End If
'Step114
Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
StatusOfDR=Browser("MasterFile").Page("DR Profile").WebList("Status").GetROP
roperty("value")
If StatusOfDR="Effective" Then
Reporter.ReportEvent micPass,"Step114: Check whether the DR has
been made effective or not","The DR Has been made effective successfully"
Else
Reporter.ReportEvent micFail,"Step 114: Check whether th
e DR has been made effective or not","The DR has not been made effective"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step116
Browser("MasterFile").Page("DR Profile").WebElement("CUSIP Summary/Add")
.Click
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step116: Go to CUSIP Summary tab a
nd look for Flag","The Flags are absent as required"
Else
Reporter.ReportEvent micFail,"Step116: Go to CUSIP Summary tab a
nd look for Flag ","The flag is still present"
End If
Browser("MasterFile").Page("DR Profile").WebElement("Detail").Click
'Click on the Related DR Button
Call click_WebButton("MasterFile","DR Profile","Related DR")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Click on the related DR button","T
he Related DR button is present as required"
Else
Reporter.ReportEvent micFail,"Click on the related DR button","T
he related DR button is not present as required"
Environment.Value("TestCase_Log")="True"
End If
strDRnameinEdit=get_WebEdit_Value("MasterFile","DR Profile","DRName")
If strDRnameinEdit=Environment.Value("RegDRNAME") Then
Reporter.ReportEvent micPass,"Step117: Check whether the created
REG S DR name: " &Environment.Value("RegDRNAME")&" is present as a related DR",
"The required REG S DR is present as a related DR"
Else
Reporter.ReportEvent micFail,"Step117: Check whether the created
REG S DR name: " &Environment.Value("RegDRNAME")&" is present as a related DR",
"The requuired REG S DR is not present as a related DR"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

Wait(4)
Wait(4)
'Navigate to the CUSIP summary /ADD tab
Browser("MasterFile").Page("DR Profile").WebElement("CUSIP Summary/Add")
.Click
Browser("MasterFile").Page("DR Profile").WebElement("CUSIP Summary/Add")
.Click
Browser("MasterFile").Page("DR Profile").WebTable("CUSIP Summary/Add").W
ebEdit("CUSIPvalue").Click
CUSIPValueinEdit=get_WebEdit_Value ("MasterFile","CUSIP Profile","CUSIP"
)
Call click_WebButton ("MasterFile","CUSIP Profile","Related CUSIP")
BifurcatedCUSIPValue=get_WebEdit_Value ("MasterFile","CUSIP Profile","Bi
furcatedCusipValue")
If CUSIPValueinEdit=BifurcatedCUSIPValue Then
Reporter.ReportEvent micPass,"Step118 and 123: Check whether the
CUSIP's of the bifurcated are correctly related","The CUSIP's of the Bifurcated
DR 's are correctly related"
Else
Reporter.ReportEvent micFail,"Step118 and 123: Check whether th
e CUSIP's of the bifurcated DR's are correctly related","The CUSIP's are not cor
rectly related"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
Reporter.ReportEvent micDone,"Step124: Check for the absense of the flag
s in the DR profile screen","The Step has been already done"
Call select_Menu("MasterFile","CUSIP Profile","Home;DR Home")
End function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++
Public Function MFProfileDR_TC14()

Environment.Value("TestCase_Log")="True"
Environment.Value("CUSIP_NAME")=""
Environment.Value("DRNAME")=""
Environment.Value("ISSUERNAME")=""
'Step1
'Log into the ADR home page
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL",
"MFLogin"))
Call pageCheck_WebEdit("MasterFile","Login Page","username;j_pas
sword","")
Call pageCheck_WebButton("MasterFile","Login Page","Login","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is Dispalyed successfully with th
e Required Field"
Else
Reporter.ReportEvent micFail,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is NOT Dispalyed successfully wit
h the Required Field"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Calling the login function
Call login("MasterFile","Login Page","Relationship Management","
MFLogin")
' Check the MasterFile Application for the 4 links, User Name an
d the last Login Details
Call chkADRHomePage("MasterFile","Depositary Receipt Division's"
,DataTable.Value("HomePageLinks","HomePageVerification"),DataTable.Value("UserFu
llName","MFLogin" ))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass," Verifying the DR Home Pag
e","The DR Home Page is displayed successfully with Home Page Links and the User
Details"
Else
Reporter.ReportEvent micFail," Verifying the DR Home Pag
e","The DR Home Page is NOT displayed successfully with Home Page Links and the
User Details"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Step2
'Click on the masterFile button
Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
Call chkMFCAHomePage("MasterFile","MasterFile",DataTable.Value("MenuName
","HomePageVerification"),DataTable.Value("UserFullName","MFLogin" ))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is disaplyed successfully with the required Menu Ite
ms and also displays the Current Version"
Else
Reporter.ReportEvent micFail,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is NOT displayed successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Step3
'Click on the Profile Link
Call check_Menu("MasterFile","MasterFile","Profile")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is Present in the Pr
ofile Menu"
Else
Reporter.ReportEvent micFail, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is NOT Present in th
e Profile Menu"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step4
'Click on the DR Link
Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","DR"))
Call pageCheck_WebEditOR("MasterFile","Profile - DR Search","Iss
uerName;DRName")
Call pageCheck_WebListOR("MasterFile","Profile - DR Search","Cou
ntryOfManagement;DrOrigin;DRType;DRExchange;SorU;Status;SubStatus")
'Call pageCheck_WebElementinTable("MasterFile","Profile - DR Sea
rch","Name;Country of Management;Type;Status;Sub-Status;S/U;Effective Date;Termi
nation Date;Depository;Origin;Structure","")
intRC = Browser("MasterFile").Page("Profile - DR Search").WebTab
le("DR Search Results").RowCount
If intRC <3 Then
Reporter.ReportEvent micPass,"Verifying the Number of Rows befor
e entering the Search Criteria","There are No Results displayed"
Else
Reporter.ReportEvent micFail,"Verifying the Number of Rows befor
e entering the Search Criteria","There are few Results displayed"
Call captureScreenshot()
Environment.Value("Execution_Log") = "False"
Environment.Value("TestCase_Log") = "True"
End If
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass, "Step 4 : Verifying the Fields pre
sent in the Page Profile CUSIP Search","The Required Fields are dispalyed"
Else
Reporter.ReportEvent micFail, "Step 4 : Verifying the Fields pre
sent in the Page Profile CUSIP Search","The Required Fields are NOT Present"
Environment.Value("TestCase_Log") = "True"
End If
'Step5
'Selecting a Search criteria
Call DRSearchCriteria("MasterFile","Profile - DR Search")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 5 :Click on search with all
default values","The Required Results are displayed"
Else
Reporter.ReportEvent micFail, "Step 5 :Click on search with all
default values","The required search results do not appear"
Environment.Value("TestCase_Log") = "True"
End If
'Step6 to 20
Call CreateNewDR("MasterFile","Profile - DR Search","DR Profile","CUSIP
Profile","","DR")
If Environment.Value("Failure")="True" Then
Call select_Menu("MasterFile","Profile - DR Search","Hom
e;DR Home")
Exit Function
End If
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step6 to 20:Create a New DR and At
tach a CUSIP to it","The New DR with name as "& Environment.Value("DRNAME") &" a
nd CUSIP:" & Ucase(Environment.Value("CUSIP_NAME")) &" is created successfully
on saving which we get a Yellow Flag"
Else
Reporter.ReportEvent micFail,"Step6 to 20 :Create a New DR and a
ttach a CUSIP to it","The New DR is not created successfully"
Environment.Value("TestCase_Log")="True"
End If
Environment.Value("CUSIPNAME144A")=Environment.Value("CUSIP_NAME")
'Step21
Call click_WebElement("MasterFile","DR Profile","Offerings")
If Browser("MasterFile").Page("DR Profile").WebTable("Offerings").Exist(
2) Then
Reporter.ReportEvent micPass,"Step21: Check for the offerings ta
b","The details in the offering tab is as required"
Else
Reporter.ReportEvent micFail,"Step21: Check for the offerings ta
b","The Details in the offerings tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

'Step22
' Call click_WebElement("MasterFile","DR Profile","Additional DR E
xchanges")
' Call click_WebButton("MasterFile","DR Profile","Add_DRExchange")
' Call click_Image("MasterFile","DR Profile","ExchangeInfo")
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","WebEdit","searchString",dataTable.Value("DRExchangeForCUSIP","D
R"))
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","Image","Go","")
' Call SelectValueInsideFrame("MasterFile","DR Profile","lookupFra
me",dataTable.Value("DREXchangeForCUSIP","DR"))
' Call set_WebEdit_Value("MasterFile","DR Profile","SEDOL",SEDOL)
' Call set_WebEdit_Value("MasterFile","DR Profile","Ticker")
' Call click_Image("MasterFile","DR Profile","Save")
' If Environment.Value("TestCase_Log")=true Then
' Reporter.ReportEvent micPass,"Step22:Fill in the Additio
nal DR Exchanges Tab","The Additional DR exchanges tab gets filled"
' Else
' Reporter.ReportEvent micFail,"Step22: Fill in the Additi
onal DR exchanges tab","The additional DR Exchange tab is not filled as required
"
' Environment.Value("TestCase_Log")=true
' End If
'Step24
If Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation"
).Exist(2) Then
Reporter.ReportEvent micPass,"Check whether the DR Documentation
link is present or not","The DR Documentation link is present as required"
Else
Reporter.ReportEvent micFail,"Check whether the DR Documentation
link is present or not","The DR Documentation link is not present as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

'Step29
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation").c
lick
If Browser("MasterFile").Page("DR Profile").Exist(3) Then
Browser("MasterFile").Page("DR Profile").WebElement("DRDocumenta
tion").Click
End If
If Browser("MasterFile").Page("DR Documentation Detail").Exist(2) Then
Reporter.ReportEvent micPass,"Step29: Click on the DR Documentat
ion link","The DR Documentation link is clicked as required"
Else
Reporter.ReportEvent micFail,"Step29: Click on the DR Documentat
ion link","The DR Documentation link is not clicked"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Step30 to 33
'Filling in the DR documentation
Call Fill_DR_Documentation("MasterFile","DR Documentation Detail")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step30 to 33: Fill the DR Document
ation and click on save","The DR documentation is done and saved"
Else
Reporter.ReportEvent micFail,"Step30 to 33: Fill the DR Document
ation and click on save","The DR documentation is not done properly"
Environment.Value("TestCase_Log")="True"
End If
Call ClickonDRName("MasterFile","DR Profile",DataTable.Value("IssuerNam
e","DR"),"2")
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").E
xist(2) Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").E
xist(2) Then
Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
End If
'Call pageCheck_WebElement("MasterFile","Issuer Profile","Advisers;BNY C
ontacts;Comments;Custodians;Detail;DR Services;Products;Und. Sec. Markets","")
If Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Ex
ist(2) and Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerDocume
ntation").Exist(2)Then
Reporter.ReportEvent micPass,"Step36: Check whether the issuer p
rofile screen has been loaded or not","The issuer profile screen has been loaded
as required"
Else
Reporter.ReportEvent micFail,"Step36: Check whether the issuer p
rofile screen has been loaded or not","The issuer profile screen has not been lo
aded"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step32
Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Details")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step37: Check whether the required
fields are present in the issuer profile screen detail tab","The required field
s are present as required"
Else
Reporter.ReportEvent micFail,"Step37: Check whether the required
fields are present in the issuer profile screen detail tab","The required field
s are not present"
Environment.Value("TestCase_Log")="True"
End If
'Step33
'Checking for the BNY contact tab
Browser("MasterFile").Page("Issuer Profile").WebElement("BNY Contacts").
Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","BNY Contact
s")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("BNY Contacts").Exist(2) Then
Reporter.ReportEvent micPass,"Step39: Check for the details in t
he BNY contacts tab","The details under the BNY contact tab is as required"
Else
Reporter.ReportEvent micFail,"Step39: Check for the details in t
he BNY contacts tab","The details under the BNY contact tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step34
'Checking for the Underlying security markets tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Und. Sec. Marke
ts").Click
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Und. Sec. M
arkets")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Underlying Security Market").Exist(2) Then
reporter.ReportEvent micPass,"Step41: Check for the Underlying E
vent Tab","The underlying event tab is as required"
Else
Reporter.ReportEvent micFail,"Step41: Check for the underlying E
vent tab","The details under the underlying event tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step35
'Checking for the Custodian Tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Custodians").Cl
ick
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Custodians"
)
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Issuers Preferred Custodian").Exist(2)Then
Reporter.ReportEvent micPass,"Step43: Check for the Issuer preff
ered tab","The details in the Issuer preffered tab is as required"
Else
Reporter.ReportEvent micFail,"Step43: Check for the issuer preff
ered tab","The details in the issuer preffered is not present as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step36
'Checking for the Advisors tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Advisers").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Advisers")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Issuers Advisers").Exist(2)Then
Reporter.ReportEvent micPass,"Step45: Check for the Advisors tab
","The advisers tab details are as required"
Else
Reporter.ReportEvent micFail,"Step45: Check for the Advisors Tab
","The advisors tab details are as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step37
'Checking for the Products tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Products").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Products")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Products").Exist(2)Then
reporter.ReportEvent micPass,"Step47: Check for the presence of
the products web table","The products web table is present as required"
Else
reporter.ReportEvent micFail,"Step47: Check for the presence of
the products web table","The products web table is not present as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step38
'Checking for the DR services tab
Browser("MasterFile").Page("Issuer Profile").WebElement("DR Services").C
lick
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","DR Services
")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("DR Services").Exist(2) Then
reporter.ReportEvent micPass,"Step49: Check for the presence of
the DR Services web table","The DR services web table is present as required"
Else
reporter.ReportEvent micFail,"Step49: Check for the presence of
the DR Services web table","The DR Services web table is not present as required
"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step39
'Checking for the Comments tab
Browser("MasterFile").Page("Issuer Profile").WebElement("Comments").Clic
k
Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Comments")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Comments").Exist(2) Then
reporter.ReportEvent micPass," Check for the presence of the com
ments table","The comments table is present as required"
Else
reporter.ReportEvent micFail,"Check for the presence of the comm
ents table","The comments table is not present"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
Call click_WebElement("MasterFile","Issuer Profile","Detail")
Environment.Value("ISSUERNAME")=trim(get_WebEdit_Value("MasterFile","Iss
uer Profile","Name"))
If Environment.Value("TCCURCOUNT")=1 Then
Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerD
ocumentation").Click
Call Fill_Issuer_Documentation("MasterFile","Issuer Documentatio
n","DR")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Fill in the issuer Documen
tation and click on save","The Issuer documentation is done and saved"
Call ClickonDRName("MasterFile","Issuer Documentation",I
SSUERNAME,"2")
Else
Reporter.ReportEvent micFail,"Fill in the Issuer Documen
tation and click on save","The Issuer documentation is not filled properly"
Environment.Value("TestCase_Log")="True"
End If
End If
'Call logoutfromApp("MasterFile","Issuer Profile")
' Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
' Call login("MasterFile","Login Page","Relationship Management","MFLogin"
)
' Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
Call select_Menu("MasterFile","Issuer Profile",DataTable.Value("MenuPath
","DR"))
Wait(3)
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
Call click_Image("MasterFile","Profile - DR Search","Search")
Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
If dataTable.Value("Type","DR") <> "144A" and datatable.Value("Type","D
R") <> "RegS" and DataTable.Value("Sponsored","DR") <>"U" Then
Call click_WebElement("MasterFile","DR Profile","SEC Filing")
Call set_WebEdit_Value("MasterFile","DR Profile","CurrentF6ADS",
dataTable.Value("CurrentF6ADS","DR"))
Call set_WebEdit_Value("MasterFile","DR Profile","CurF6Number",d
ataTable.Value("CurF6Number","DR"))
Wait(2)
If DataTable.Value("F6FileDate","DR") <> "" Then
strDataTableValue = DataTable.Value("F6FileDate"
,"DR")
strValue = Split(strDataTableValue,";",-1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image("MasterFile","DR Profile","Show
Calendar_F6FileDate")
Call ClickIcon_SetDate("MasterFile","DR Profile"
,strMonthValue,strYearValue,strDateValue)
End If
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").E
xist(2) Then
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("OK").Click
End If
Call click_Image("MasterFile","DR Profile","Save")
End If
Wait(4)
Wait(4)
Call click_WebElement("MasterFile","DR Profile","Detail")
Call click_WebElement("MasterFile","DR Profile","Detail")
'Creating a Bifurcated DR
Browser("MasterFile").Page("DR Profile").WebElement("DRLifeCycle").Click
If Browser("DR Lifecycle / Relation").Page("DR Lifecycle / Relation").Ex
ist(2) Then
Reporter.ReportEvent micPass,"Step51: Check if the DR life Cycle
screen has opened","The DR Life Cycle Screen has opened successfully"
Else
Reporter.ReportEvent micFail,"Step51: Check if the DR Life Cycle
Screen has opened","The DR Life Cycle Screen has not opened successfully"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
Wait(4)
Call select_Radiobutton("DR Lifecycle / Relation","DR Lifecycle / Relati
on","slc","0")
Call click_WebButton("DR Lifecycle / Relation","DR Lifecycle / Relation"
,"Create new DR")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step52:Click on the Bifurcated rad
io button and click on Create new DR ","The Create new button is clicked as requ
ired"
Else
Reporter.ReportEvent micFail,"Step52:Click on the Bifurcated rad
io button and click on Create new DR ","The Create new button is not clicked as
required"
Environment.Value("TestCase_Log")="True"
End If
'Create a New CUSIP for the RegS DR
Wait(5)
Environment.Value("RegDRNAME")=get_WebEdit_Value("MasterFile","DR Profil
e","DRName")
Environment.Value("RegDRNAME")=Environment.Value("RegDRNAME") &"_Automat
ion_" &Time&Date
Wait(5)
Call set_WebEdit_Value("MasterFile","DR Profile","DRName",Environment.Va
lue("RegDRNAME"))

Call set_WebEdit_Value("MasterFile","DR Profile","Comments","This is for


a testing purpose. This has been created by the ADR Automation Team")
If DataTable.Value("FirstFiler","DR") <> "" Then
Call Select_Combo_Value("MasterFile","DR Profile","FirstFiler",
DataTable.Value("FirstFilerReg","DR"))
End If
Environment.Value("TestCase_Log")="True"
Call click_Image("MasterFile","DR Profile","Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass," Creating a new DR ","The
new DR is created as per requirement"
Else
Reporter.ReportEvent micFail,": Creating a new DR","The
New DR is not created as required"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log")="False"
End If

'Select the CUSIP ADD Tab


Call click_WebElement("MasterFile","DR Profile","CUSIP Summary/Add")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass," Step53: Select the Details tab","
The details tab is selected as required"
Else
Reporter.ReportEvent micFail,"Step53: Select the Details tab","T
he details tab is not selected as required"
Environment.Value("TestCase_Log") = "True"
End If
'Click on the ADD button
Call click_WebButton("MasterFile","DR Profile","ADD")
'Call pageCheck_WebElementinTable(strBrowserName,strPageName,"Type;CUSIP
,DR Exchange,DR Ticker Symbol,Ratio DRs,Ratio Underlying Shares,Current CUSIP","
")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass," Step54: Click on the ADD button i
n the CUSIP summary screen","The required fields under the CUSIP summary is pres
ent as required"
Else
Reporter.ReportEvent micFail,"Step54: Click on ADD button in the
CUSIP summary screen","The required fields under the CUSIP summary is not prese
nt as required"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log")="False"
End If
'Set the CUSIP details
Call Select_Combo_Value("MasterFile","DR Profile","CUSIP Type","Primary"
)
wait(2)
If Browser("MasterFile").Page("DR Profile").WebTable("CUSIP Summary/Add"
).Image("New CUSIP").Exist(2) Then
Browser("MasterFile").Page("DR Profile").WebTable("CUSIP Summary
/Add").Image("New CUSIP").Click
Reporter.ReportEvent micPass,"Step55: Click on the new CUSIP but
ton","The new CUSIP button is present as required"
Else
Reporter.ReportEvent micFail,"Step55: Click on the new CUSIP bu
tton","The new CUSIP button is not present as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log") = "True"
End If

'On clicking the New CUSIP buton the New CUSIP screen opens up
'call pageCheck_WebEdit(strBrowserName,strCUSIPPageName,"Name;Br
iefName;DisplaycusCountryCode_0;cusQspAdrs_0;cusQspShares_0;cusTsymNm_0;cusDrIsi
nNo_0;DisplaycusExchangeCode_0;cusDrCmnCd_0;cusDrSedolNo_0;cusPrcShrBaseRt_0;cus
QspUnderlyingIsin_0","")
'Call pageCheck_WebList("MasterFile","CUSIP Profile","cusQspActi
veFlag_0","")
' If Environment.Value("TestCase_Log")="True" Then
' Reporter.ReportEvent micPass,"Click on the New CUSIP but
ton","The CUSIP profile screen opens up as required"
' Else
' Reporter.ReportEvent micFail,"Click on the New CUSIP but
ton","The CUSIP profile screen does not open up as required"
' Environment.Value("TestCase_Log") = "True"
' Environment.Value("Execution_Log")="False"
' End If

'Entering the details for the CUSIP screen


' Call set_WebEdit_Value("MasterFile","CUSIP Profile","Ratio DRs",
dataTable.Value("RatioDR","DR"))
' Call set_WebEdit_Value("MasterFile","CUSIP Profile","RatioUnderl
yingShares",dataTable.Value("RatioUnderlyingShares","DR"))
Environment.Value("RegCUSIP_NAME")="A"& createAlphanumericString(8)
Call set_WebEdit_Value("MasterFile","CUSIP Profile","CUSIP",Environment.
Value("RegCUSIP_NAME"))
' Call Browser("MasterFile").Dialog("Microsoft Internet Explorer").WaitProper
ty("Visible","True",5)
Wait(4)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("OK").Click
End If
DRSEDOL_VALUE=createAlphanumericString(7)
Call set_WebEdit_Value("MasterFile","CUSIP Profile","DRSEDOL",DRSEDOL_VA
LUE)
Call click_Image("MasterFile","CUSIP Profile","DRExchange InfoNonBNY")
Call SelectValueInsideFrame("MasterFile","CUSIP Profile","lookupFrame",DataT
able.Value("DRExchangeName","DR"))
'wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("OK").Click
End If
DRTICKER_SYMBOL=createAlphanumericString(5)
Call set_WebEdit_Value("MasterFile","CUSIP Profile","DR Ticker Symbol",D
RTICKER_SYMBOL)
'If DataTable.Value("Sponsored",strDatasheetName) = "U" and DataTable.Va
lue("DepositoryName",strDatasheetName)="BNY" Then
' Call click_Image(strBrowserName,strCUSIPPageName,"UnderlyingSecu
rityInfoUnsponsored")
'ElseIf DataTable.Value("Sponsored",strDatasheetName) ="S" and DataTable
.Value("DepositoryName",strDatasheetName)="BNY" Then
' Call click_Image(strBrowserName,strCUSIPPageName,"UnderlyingSec
urityInfoSponsored")
'Else
' Call click_Image(strBrowserName,strCUSIPPageName,"UnderlyingSecu
rityInfoNonBNY")
'End If
'
' call SelectValueInsideFrame(strBrowserName,strCUSIPPageName,"lookup
Frame",dataTable.Value("UnderlyingSecurity",strDatasheetName))
'
If DataTable("DepositoryName","DR") ="BNY" Then
Call click_Image("MasterFile","CUSIP Profile","CommonDepositoryU
nsponsored")
Call SelectValueInsideFrame("MasterFile","CUSIP Profile","lookup
Frame",DataTable.Value("CommonDepository","DR"))
End If
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step55 to 59: Fill in the details
required for the new CUSIP","The Details for the new CUSIP are filled as require
d"
Else
Reporter.ReportEvent micFail,"Step55 to 59: Fill in the details
required for the new CUSIP","The details for the new CUSIP are not filled as req
uired"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log")="False"
End If
Wait(2)
Wait(5)
'Call Browser("MasterFile").Page("CUSIP Profile").Image("Save").WaitProp
erty("visible","True",5)
'Click on save
Call click_Image("MasterFile","CUSIP Profile","Save")
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("OK").Click
End If
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step60: Click on the save button a
fter filling in the required details","The CUSIP gets saved as required"
Else
Reporter.ReportEvent micFail,"Step60: Click on the save button a
fter filling in the required details","The CUSIP does not get saved as required"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log")="False"
End If
Wait(3)
'Click on the DR name
Call Browser("MasterFile").Page("CUSIP Profile").Image("Save").WaitPrope
rty("Visible","True",5)
Call ClickonDRName("MasterFile","CUSIP Profile",Environment.Value("RegDR
NAME"),"2")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("DR Profile").Exist(2) Then
Reporter.ReportEvent micPass,"Step61: Click on the DR Name","The
DR name is clicked as required"
Else
Reporter.ReportEvent micFail,"Step61: Click on the DR Name","The
DR Name is not clicked as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log") = "True"
End If
''Open the Required Reg S DR
'Call click_WebButton("MasterFile","DR Profile","Related DR")

'Filling the DR Documentation for the Reg-S DR


Call click_WebElement("MasterFile","DR Profile","DRDocumentation")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step 65: Check for the DR document
ation link","The DR documentation link is present as required"
Else
Reporter.ReportEvent micFail,"Step65: Check for the DR documenta
tion link","The DR documentation link is not present as required:"
Environment.Value("TestCase_Log")="True"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
Wait(4)
Wait(4)
''Setting the values for the Fees tab
Call click_WebElement("MasterFile","DR Documentation Detail","Fees")
Wait(3)
' Click on Add Button and click on the Image ' info'
Call Browser("MasterFile").Page("DR Documentation Detail").WebTable("Fee
s_Table").WaitProperty("Visible","True",5)
Call click_WebButton("MasterFile","DR Documentation Detail","Add_Fees")
Wait(3)
Call click_Image("MasterFile","DR Documentation Detail","FeeTypeUnsponsored"
)
Wait(3)
' Select all the Fees present in the Fee Frame
intRowCount = Browser("MasterFile").Page("DR Documentation Detail").Frame("loo
kupFrame").WebTable("FeeDescription").RowCount
'MsgBox intRowCount
For intRowCounter = 2 to intRowCount
intRowCounts = Browser("MasterFile").Page("DR Documentation Detail").WebTable
("Fees_Table").RowCount
Browser("MasterFile").Page("DR Documentation Detail").WebTable("Fees_Table").
ChildItem(intRowCounts,1,"Image","0").Click
intRowCount = Browser("MasterFile").Page("DR Documentation Detail").Frame("lo
okupFrame").WebTable("FeeDescription").RowCount
If intRowCount = 2 Then
strGetCellData = Browser("MasterFile").Page("DR Documentation Detail").Frame
("lookupFrame").WebTable("FeeDescription").GetCellData(2,1)
Browser("MasterFile").Page("DR Documentation Detail").WebElement("html tag:=
TD","innertext:="& strGetCellData).Click
'Call click_WebButton(strBrowserName,strPageName,"Add_Fees")
Exit For
Else
strGetCellData = Browser("MasterFile").Page("DR Documentation Detail").Frame
("lookupFrame").WebTable("FeeDescription").GetCellData(2,1)
Browser("MasterFile").Page("DR Documentation Detail").WebElement("html tag:=
TD","innertext:="& strGetCellData).Click
Call click_WebButton("MasterFile","DR Documentation Detail","Add_Fees")
End If
Next

' If the Fee Amount is "NULL", set 0 as the Value in the Field
intFeeRC = Browser("MasterFile").Page("DR Documentation Detail").WebTable("Fee
s_Table").RowCount
For intCount =3 to intFeeRC
strCellData = Browser("MasterFile").Page("DR Documentation Detail").We
bTable("Fees_Table").ChildItem(intCount,2,"WebEdit","0").GetROProperty("value")
If strCellData = "" Then
Browser("MasterFile").Page("DR Documentation Detail").WebTable("
Fees_Table").ChildItem(intCount,2,"WebEdit","0").Set "0"
End If
Next
Environment.Value("TestCase_Log")="True"
Call click_Image("MasterFile","DR Documentation Detail","Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step69: Click on the Fees tab and
fill in the details and click on save","The details of the fees are filled and s
aved as required"
Else
Reporter.ReportEvent micFail,"Step69: Click on the Fees tab and
fill in the details and click on save","The details are not filled properly"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
Wait(2)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Reporter.ReportEvent micPass,"Check whether the microsoft intern
et explorer pop-up comes up or not","The pop-up appears as required"
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("Cancel").Click
End if
Wait(2)
If Browser("MasterFile").Page("DR Documentation Detail").WebElement("Is
suerProfile").Exist(2) Then
Browser("MasterFile").Page("DR Documentation Detail").WebElement
("IssuerProfile").click
End If
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Reporter.ReportEvent micPass,"Check whether the microsoft intern
et explorer pop-up comes up or not","The pop-up appears as required"
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("Cancel").Click
End if
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Fill in the DR documentation detai
ls and click on save","The DR documentation details are filled as required"
Else
Reporter.ReportEvent micFail,"Fill in the DR documentation detai
ls and click on save","The DR documentation details are filled as required"
Environment.Value("TestCase_Log")="True"
End If
Call select_Menu("MasterFile","Issuer Profile",DataTable.Value("MenuPat
h","DR"))
Wait(3)
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
Call click_Image("MasterFile","Profile - DR Search","Search")
Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
'Call ClickonDRName("MasterFile","DR Documentation Detail",Environment.V
alue("RegDRNAME"),"2")
'Call click_WebButton("MasterFile","DR Profile","Related DR")
Wait(3)
Call Select_Combo_Value("MasterFile","DR Profile","Status","Effective")
Call click_Image("MasterFile","DR Profile","Save")
Wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("Cancel").Click
End If
Call logoutfromApp("MasterFile","DR Profile")
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin"))
Call login("MasterFile","Login Page","Approver","MFLogin")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step71: Log into application using
Approver ID","We have successfully logged in as an approver"
Else
Reporter.ReportEvent micFail,"Step71: Log into the application u
sing Approver ID ","We have not successfully logged in as an approver"
Environment.Value("TestCase_Log")="True"
End If
'Step72 to 79
Call ApprovalFunction_CreateNewDR("MasterFile","CUSIP Profile","CUSIP",E
nvironment.Value("CUSIPNAME144A"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step72 to 79:Approve the CUSIP det
ails","The CUSIP details are approved as required"
Else
Reporter.ReportEvent micFail,"Step72 to 79: Approve the CUSIP de
tails","The CUSIP details are not approved as required"
Environment.Value("TestCase_Log")="True"
End If

'Step80 to 84
Call ApprovalFunction_CreateNewDR("MasterFile","DR Documentation","DR Na
me",Environment.Value("DRNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step80 to 84: Approve the DR Docum
entation","The DR Documentation is filled in correctly as required"
Else
Reporter.ReportEvent micFail,"Step80 to 84: Approve the DR Docum
entation","The DR Documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
'Step 85 to 90
If Environment.Value("TCCURCOUNT")=1 Then
Call ApprovalFunction_CreateNewDR("MasterFile","Issuer Documenta
tion","Issuer",Environment.value("ISSUERNAME"),"Approved","Approved","Pending Ap
proval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step85 to 90Approve the is
suer documentation","The issuer documentation is approved as required"
Else
Reporter.ReportEvent micFail,"Step 85 to 90 : Approve th
e issuer documentation","The issuer documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
Reporter.ReportEvent micPass,"Step85 to 90 : Approve the issuer
documentation","The issuer documentation already is approved"
End if
'Call logoutfromApp("MasterFile","Approval Queue Item Search")

Call ApprovalFunction_CreateNewDR("MasterFile","CUSIP Profile","CUSIP",E


nvironment.Value("RegCUSIP_NAME"),"Approved","Approved","Pending Approval")
Call ApprovalFunction_CreateNewDR("MasterFile","DR Documentation","DR Na
me",Environment.Value("RegDRNAME"),"Approved","Approved","Pending Approval")
Call ApprovalFunction_CreateNewDR("MasterFile","DR Profile","Name",Envir
onment.Value("RegDRNAME"),"Approved","Approved","Pending Approval")
Call logoutfromApp("MasterFile","Approval Queue Item Search")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Approve the Details for the Reg S
DR","The Details of the Reg.S DR are approved as required"
Else
Reporter.ReportEvent micFail,"Approve the details for the Reg S
DR ","The details of the Reg S DR are not approved as required"
Environment.Value("TestCase_Log")="True"
Environment.Value("Execution_Log")="False"
End If
' Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
' Call login("MasterFile","Login Page","Relationship Management","MFLogin"
)
' Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
' Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","D
R"))
' Wait(3)
' Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
' Call click_Image("MasterFile","Profile - DR Search","Search")
' Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
' 'Call ClickonDRName("MasterFile","DR Documentation Detail",Environment.V
alue("RegDRNAME"),"2")
' 'Call click_WebButton("MasterFile","DR Profile","Related DR")
' Wait(3)
' Call Select_Combo_Value("MasterFile","DR Profile","Status","Effective")
' Call click_Image("MasterFile","DR Profile","Save")
' Wait(3)
' If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
' Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
' End If
' Call logoutfromApp("MasterFile","DR Profile")
'Step 61 to 66
'Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogi
n"))
'Call login("MasterFile","Login Page","Approver","MFLogin")
Call ApprovalFunction_CreateNewDR("MasterFile","DR Profile","Name",Envir
onment.Value("DRNAME"),"Approved","Approved","Pending Approval")
Call logoutfromApp("MasterFile","Approval Queue Item Search")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step96 to 101:Approve the DR and c
lick on save","The DR gets approved and saved as required"
Else
Reporter.ReportEvent micFail,"Step96 to 101:Approve the DR and c
lick on save","The DR soes not get approved"
Environment.Value("TestCase_Log")="True"
Environment.Value("Execution_Log")="False"
End If
'Step67 to 75
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL",
"MFLogin"))
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step102 :Log into the ADR
home page","The user logs into the ADR home page as required"
Else
Reporter.ReportEvent micFail,"Step 102: Log into the ADR
home page","The user does not log into the ADR home page as required"
End If
'Step109
Call login("MasterFile","Login Page","Relationship Management","MFLogin"
)
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step103: User enters a valid user
name and password","The username and password are accepted and the application h
ome page is displayed"
Else
Reporter.ReportEvent micFail,"Step103: User enters a valid usern
ame and password","The username and password are not accepted"
Environment.Value("TestCase_Log")="True"
End If
Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step104:Click on the masterfile li
nk as required","The user clicks on the masterfile on which the masterfile opens
as required"
Else
Reporter.ReportEvent micFail,"Step104:Click on the masterfile li
nk as required","The user clicks on the masterfile on which the masterfile does
not open"
Environment.Value("TestCase_Log")="True"
End If
'Step115 and 106
Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","D
R"))
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step105 and 106:User selects the P
rofile DR link","The DR Search page opens up as required"
Else
Reporter.ReportEvent micFail,"Step105 and 106:User selects the p
rofile DR link","The DR search page does not open up"
Environment.Value("TestCase_Log")="True"
End If
'Step107
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
Call DRSearchCriteria("MasterFile","Profile - DR Search")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step 107:User enters the required
DR details and clicks on search","The DR gets displayed successfully"
Else
Reporter.ReportEvent micFail,"Step107:User enters the required D
R details and clicks on search","The DR is not displayed successfully"
End If
'Step108 and 109
Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
StatusOfDR=Browser("MasterFile").Page("DR Profile").WebList("Status").GetROP
roperty("value")
If StatusOfDR="Effective" Then
Reporter.ReportEvent micPass,"Step108 and 109: Check whether the
DR has been made effective or not","The DR Has been made effective successfully
"
Else
Reporter.ReportEvent micFail,"Step 108 and 109: Check wh
ether the DR has been made effective or not","The DR has not been made effective
"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step110 to 118
Browser("MasterFile").Page("DR Profile").WebElement("CUSIP Summary/Add")
.Click
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass," Go to CUSIP Summary tab and look
for Flag","The Flags are absent as required"
Else
Reporter.ReportEvent micFail," Go to CUSIP Summary tab and look
for Flag ","The flag is still present"
Environment.Value("TestCase_Log")="True"
End If
Browser("MasterFile").Page("DR Profile").WebElement("Detail").Click
'Click on the Related DR Button
Call click_WebButton("MasterFile","DR Profile","Related DR")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Click on the related DR button","T
he Related DR button is present as required"
Else
Reporter.ReportEvent micFail,"Click on the related DR button","T
he related DR button is not present as required"
Environment.Value("TestCase_Log")="True"
End If
strDRnameinEdit=get_WebEdit_Value("MasterFile","DR Profile","DRName")
If strDRnameinEdit=Environment.Value("RegDRNAME") Then
Reporter.ReportEvent micPass," Check whether the created REG S D
R name: " &Environment.Value("RegDRNAME")&" is present as a related DR","The req
uired REG S DR is present as a related DR"
Else
Reporter.ReportEvent micFail," Check whether the created REG S D
R name: " &Environment.Value("RegDRNAME")&" is present as a related DR","The req
uuired REG S DR is not present as a related DR"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Navigate to the CUSIP summary /ADD tab
Browser("MasterFile").Page("DR Profile").WebElement("CUSIP Summary/Add")
.Click
Browser("MasterFile").Page("DR Profile").WebTable("CUSIP Summary/Add").W
ebEdit("CUSIPvalue").Click
CUSIPValueinEdit=get_WebEdit_Value ("MasterFile","CUSIP Profile","CUSIP"
)
Call click_WebButton ("MasterFile","CUSIP Profile","Related CUSIP")
BifurcatedCUSIPValue=get_WebEdit_Value ("MasterFile","CUSIP Profile","Bi
furcatedCusipValue")
If CUSIPValueinEdit=BifurcatedCUSIPValue Then
Reporter.ReportEvent micPass,"Step110 and 117: Check whether the
CUSIP's of the bifurcated are correctly related","The CUSIP's of the Bifurcated
DR 's are correctly related"
Else
Reporter.ReportEvent micFail,"Step110 and 117: Check whether th
e CUSIP's of the bifurcated DR's are correctly related","The CUSIP's are not cor
rectly related"
Call captureScreenshot()
Environment.Value("TestCase_Log")="False"
End If
Reporter.ReportEvent micDone," Step118:Check for the absense of the flag
s in the DR profile screen","The Step has been already done"
Call select_Menu("MasterFile","CUSIP Profile","Home;DR Home")
End function

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++
Public Function MFProfileDR_TC15()
Environment.Value("TestCase_Log")="True"
Environment.Value("CUSIP_NAME")=""
Environment.Value("DRNAME")=""
Environment.Value("ISSUERNAME")=""
'Step1
'Log into the ADR home page
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL",
"MFLogin"))
Call pageCheck_WebEdit("MasterFile","Login Page","username;j_pas
sword","")
Call pageCheck_WebButton("MasterFile","Login Page","Login","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is Dispalyed successfully with th
e Required Field"
Else
Reporter.ReportEvent micFail,"Step 1: Verfiying if the L
ogin Page is Dispalyed or NOT","The Login Page is NOT Dispalyed successfully wit
h the Required Field"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Calling the login function
Call login("MasterFile","Login Page","Relationship Management","
MFLogin")
' Check the MasterFile Application for the 4 links, User Name an
d the last Login Details
Call chkADRHomePage("MasterFile","Depositary Receipt Division's"
,DataTable.Value("HomePageLinks","HomePageVerification"),DataTable.Value("UserFu
llName","MFLogin" ))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass," Verifying the DR Home Pag
e","The DR Home Page is displayed successfully with Home Page Links and the User
Details"
Else
Reporter.ReportEvent micFail," Verifying the DR Home Pag
e","The DR Home Page is NOT displayed successfully with Home Page Links and the
User Details"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
'Step2
'Click on the masterFile button
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
Call chkMFCAHomePage("MasterFile","MasterFile",DataTable.Value("
MenuName","HomePageVerification"),DataTable.Value("UserFullName","MFLogin" ))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is disaplyed successfully with the required Menu Ite
ms and also displays the Current Version"
Else
Reporter.ReportEvent micFail,"Step 2: Verfiying the MF H
ome Page","The MF Home Page is NOT displayed successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step3
'Click on the Profile Link
Call check_Menu("MasterFile","MasterFile","Profile")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is Present in the Pr
ofile Menu"
Else
Reporter.ReportEvent micPass, "Step 3: Verifying if the
DR Menu is Present in the Profile Menu or Not","The DR Menu is NOT Present in th
e Profile Menu"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If

'Step4
'Click on the DR Link
Call select_Menu("MasterFile","MasterFile",DataTable.Value("Menu
Path","DR"))
Call pageCheck_WebEditOR("MasterFile","Profile - DR Search","Iss
uerName;DRName")
Call pageCheck_WebListOR("MasterFile","Profile - DR Search","Cou
ntryOfManagement;DrOrigin;DRType;DRExchange;SorU;Status;SubStatus")
'Call pageCheck_WebElementinTable("MasterFile","Profile - DR Sea
rch","Name;Country of Management;Type;Status;Sub-Status;S/U;Effective Date;Termi
nation Date;Depository;Origin;Structure","")
intRC = Browser("MasterFile").Page("Profile - DR Search").WebTab
le("DR Search Results").RowCount
If intRC <3 Then
Reporter.ReportEvent micPass,"Verifying the Number of R
ows before entering the Search Criteria","There are No Results displayed"
Else
Reporter.ReportEvent micFail,"Verifying the Number of Ro
ws before entering the Search Criteria","There are few Results displayed"
Environment.Value("Execution_Log") = "False"
Environment.Value("TestCase_Log") = "True"
End If
If Environment.Value("TestCase_Log") ="True" Then
Reporter.ReportEvent micPass, "Step 4 : Verifying the Fi
elds present in the Page Profile CUSIP Search","The Required Fields are dispalye
d"
Else
Reporter.ReportEvent micFail, "Step 4 : Verifying the Fi
elds present in the Page Profile CUSIP Search","The Required Fields are NOT Pres
ent"
Environment.Value("TestCase_Log") = "True"
End If
'Step5
'Selecting a Search criteria
Call DRSearchCriteria("MasterFile","Profile - DR Search")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Step 5 :Click on search with all
default values","The Required Results are displayed"
Else
Reporter.ReportEvent micFail, "Step 5 :Click on search with all
default values","The required search results do not appear"
Environment.Value("TestCase_Log") = "True"
End If
'Step6 to 20
Call CreateNewDR("MasterFile","Profile - DR Search","DR Profile","CUSIP
Profile","","DR")
If Environment.Value("Failure")="True" Then
Call select_Menu("MasterFile","Profile - DR Search","Hom
e;DR Home")
Exit Function
End If
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step6 to 20:Create a New DR and At
tach a CUSIP to it","The New DR with name as "& Environment.Value("DRNAME") &" a
nd CUSIP:"& Ucase(Environment.Value("CUSIP_NAME")) &" is created successfully o
n saving which we get a Yellow Flag"
Else
Reporter.ReportEvent micFail,"Step6 to 20 :Create a New DR and a
ttach a CUSIP to it","The New DR is not created successfully"
Environment.Value("TestCase_Log")="True"
End If
'Get the value of the CUSIP for the 144A DR
Environment.Value("CUSIPNAME144A")=Environment.Value("CUSIP_NAME")
'Step20
Call click_WebElement("MasterFile","DR Profile","Offerings")
If Browser("MasterFile").Page("DR Profile").WebTable("Offerings").Exist(
2) Then
Reporter.ReportEvent micPass,"Step20: Check for the offerings ta
b","The details in the offering tab is as required"
Else
Reporter.ReportEvent micFail,"Step20: Check for the offerings ta
b","The Details in the offerings tab is not as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
Call ClickonDRName("MasterFile","DR Profile",Datatable.Value("IssuerName
","DR"),"2")
'Step22
' Call click_WebElement("MasterFile","DR Profile","Additional DR E
xchanges")
' Call click_WebButton("MasterFile","DR Profile","Add_DRExchange")
' Call click_Image("MasterFile","DR Profile","ExchangeInfo")
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","WebEdit","searchString",dataTable.Value("DRExchangeForCUSIP","D
R"))
' Call operation_on_FrameObjects_WithName("MasterFile","DR Profile
","lookupFrame","Image","Go","")
' Call SelectValueInsideFrame("MasterFile","DR Profile","lookupFra
me",dataTable.Value("DREXchangeForCUSIP","DR"))
' Call set_WebEdit_Value("MasterFile","DR Profile","SEDOL",SEDOL)
' Call set_WebEdit_Value("MasterFile","DR Profile","Ticker")
' Call click_Image("MasterFile","DR Profile","Save")
' If Environment.Value("TestCase_Log")=true Then
' Reporter.ReportEvent micPass,"Step22:Fill in the Additio
nal DR Exchanges Tab","The Additional DR exchanges tab gets filled"
' Else
' Reporter.ReportEvent micFail,"Step22: Fill in the Additi
onal DR exchanges tab","The additional DR Exchange tab is not filled as required
"
' Environment.Value("TestCase_Log")=true
' End If

'Step31

' If Browser("MasterFile").Page("DR Profile").WebElement("DRDocume


ntation").Exist(2) Then
' Reporter.ReportEvent micPass,"Check whether the DR Docum
entation link is present or not","The DR Documentation link is present as requir
ed"
' Else
' Reporter.ReportEvent micFail,"Check whether the DR Docum
entation link is present or not","The DR Documentation link is not present as re
quired"
' End If
'
'
''Step32
' Browser("MasterFile").Page("DR Profile").WebElement("DRDocumentation").c
lick
' If Browser("MasterFile").Page("DR Documentation Detail").Exist(2) Then
' Reporter.ReportEvent micPass,"Step32: Click on the DR Documentat
ion link","The DR Documentation link is clicked as required"
' Else
' Reporter.ReportEvent micFail,"Step32: Click on the DR Documentat
ion link","The DR Documentation link is not clicked"
' End If
'
''Step33 to 35
''Filling in the DR documentation
' Call Fill_DR_Documentation("MasterFile","DR Documentation Detail")
' If Environment.Value("TestCase_Log")="True" Then
' Reporter.ReportEvent micPass,"Step33 to 35: Fill the DR Document
ation and click on save","The DR documentation is done and saved"
' Else
' Reporter.ReportEvent micFail,"Step33 to 35: Fill the DR Document
ation and click on save","The DR documentation is not done properly"
' Environment.Value("TestCase_Log")="True"
' End If
'
'
' Call ClickonDRName("MasterFile","DR Profile",DataTable.Value("IssuerName","
DR"),"2")
' If Browser("MasterFile").Dialog("Microsoft Internet Explorer").E
xist(2) Then
' Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
' End If
'
' If Browser("MasterFile").Dialog("Microsoft Internet Explorer").E
xist(2) Then
' Browser("MasterFile").Dialog("Microsoft Internet
Explorer").WinButton("Cancel").Click
' End If
'
'
'
''Step36
' 'Call pageCheck_WebElement("MasterFile","Issuer Profile","Advisers;BNY C
ontacts;Comments;Custodians;Detail;DR Services;Products;Und. Sec. Markets","")
' If Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Ex
ist(2) and Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerDocume
ntation").Exist(2)Then
' Reporter.ReportEvent micPass,"Step36: Check whether the issuer p
rofile screen has been loaded or not","The issuer profile screen has been loaded
as required"
' Else
' Reporter.ReportEvent micFail,"Step36: Check whether the issuer p
rofile screen has been loaded or not","The issuer profile screen has not been lo
aded"
' Environment.Value("TestCase_Log")="True"
' End If
'
' If Browser("MasterFile").Page("Issuer Profile").Exist(2) Then
' Reporter.ReportEvent micPass,"Step37 and 38: Check whether the I
ssuer Profile Screen has loaded ","The Issuer profile screen has loaded properly
"
' Else
' Reporter.ReportEvent micFail,"Step 37 and 38: Check whether the
Issuer profile screen has loaded","The issuer profile screen has not loaded prop
erly"
' Environment.Value("Execution_Log")="False"
' End If
'
'''Step39
'' Browser("MasterFile").Page("Issuer Profile").WebElement("Detail").Click
'' Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Details")
'' If Environment.Value("TestCase_Log")="True" Then
'' Reporter.ReportEvent micPass,"Step39: Check whether the required
fields are present in the issuer profile screen detail tab","The required field
s are present as required"
'' Else
'' Reporter.ReportEvent micFail,"Step39: Check whether the required
fields are present in the issuer profile screen detail tab","The required field
s are not present"
'' Environment.Value("TestCase_Log")="True"
'' End If
''
'''Step41
'''Checking for the BNY contact tab
'' Browser("MasterFile").Page("Issuer Profile").WebElement("BNY Contacts").
Click
'' Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","BNY Contact
s")
''
'' If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("BNY Contacts").Exist(2) Then
'' Reporter.ReportEvent micPass,"Step41: Check for the details in t
he BNY contacts tab","The details under the BNY contact tab is as required"
'' Else
'' Reporter.ReportEvent micFail,"Step41: Check for the details in t
he BNY contacts tab","The details under the BNY contact tab is not as required"
'' Environment.Value("TestCase_Log")="True"
'' End If
''
'''Step43
'''Checking for the Underlying security markets tab
'' Browser("MasterFile").Page("Issuer Profile").WebElement("Und. Sec. Marke
ts").Click
'' Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Und. Sec. M
arkets")
'' If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Underlying Security Market").Exist(2) Then
'' reporter.ReportEvent micPass,"Step43: Check for the Underlying E
vent Tab","The underlying event tab is as required"
'' Else
'' Reporter.ReportEvent micFail,"Step43: Check for the underlying E
vent tab","The details under the underlying event tab is not as required"
'' Environment.Value("TestCase_Log")="True"
'' End If
''
'''Step44
'''Checking for the Custodian Tab
'' Browser("MasterFile").Page("Issuer Profile").WebElement("Custodians").Cl
ick
'' Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Custodians"
)
'' If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Issuers Preferred Custodian").Exist(2)Then
'' Reporter.ReportEvent micPass,"Step44: Check for the Issuer preff
ered tab","The details in the Issuer preffered tab is as required"
'' Else
'' Reporter.ReportEvent micFail,"Step44: Check for the issuer preff
ered tab","The details in the issuer preffered is not present as required"
'' Environment.Value("TestCase_Log")="True"
'' End If
''
'''Step45
'''Checking for the Advisors tab
'' Browser("MasterFile").Page("Issuer Profile").WebElement("Advisers").Clic
k
'' Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Advisers")
'' If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Issuers Advisers").Exist(2)Then
'' Reporter.ReportEvent micPass,"Step45: Check for the Advisors tab
","The advisers tab details are as required"
'' Else
'' Reporter.ReportEvent micFail,"Step45: Check for the Advisors Tab
","The advisors tab details are as required"
'' Environment.Value("TestCase_Log")="True"
'' End If
''
'''Step46
'''Checking for the Products tab
'' Browser("MasterFile").Page("Issuer Profile").WebElement("Products").Clic
k
'' Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Products")
'' If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Products").Exist(2)Then
'' reporter.ReportEvent micPass,"Step46: Check for the presence of
the products web table","The products web table is present as required"
'' Else
'' reporter.ReportEvent micFail,"Step46: Check for the presence of
the products web table","The products web table is not present as required"
'' Environment.Value("TestCase_Log")="True"
'' End If
''
''
''
'''Step47
'''Checking for the DR services tab
'' Browser("MasterFile").Page("Issuer Profile").WebElement("DR Services").C
lick
'' Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","DR Services
")
'' If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("DR Services").Exist(2) Then
'' reporter.ReportEvent micPass,"Step47: Check for the presence of
the DR Services web table","The DR services web table is present as required"
'' Else
'' reporter.ReportEvent micFail,"Step47: Check for the presence of
the DR Services web table","The DR Services web table is not present as required
"
'' Environment.Value("TestCase_Log")="True"
'' End If
''
'''Step48
'''Checking for the Comments tab
'' Browser("MasterFile").Page("Issuer Profile").WebElement("Comments").Clic
k
'' Call pageCheck_CompanyProfile("MasterFile","Issuer Profile","Comments")
'' If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("Issuer Profile").WebTable("Comments").Exist(2) Then
'' reporter.ReportEvent micPass,"Step48: Check for the presence of
the comments table","The comments table is present as required"
'' Else
'' reporter.ReportEvent micFail,"Step48: Check for the presence of
the comments table","The comments table is not present"
'' Environment.Value("TestCase_Log")="True"
'' End If
Wait(4)
Wait(4)
Call click_WebElement("MasterFile","Issuer Profile","Detail")
Environment.Value("ISSUERNAME")=trim(get_WebEdit_Value("MasterFile","Iss
uer Profile","Name"))
If Environment.Value("TCCURCOUNT")=1 Then
Browser("MasterFile").Page("Issuer Profile").WebElement("IssuerD
ocumentation").Click
Call Fill_Issuer_Documentation("MasterFile","Issuer Documentatio
n","DR")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Fill in the issuer Documen
tation and click on save","The Issuer documentation is done and saved"
Call ClickonDRName("MasterFile","Issuer Documentation",D
ataTable.Value("IssuerName","DR"),"2")
Else
Reporter.ReportEvent micFail,"Fill in the Issuer Documen
tation and click on save","The Issuer documentation is not filled properly"
Environment.Value("TestCase_Log")="True"
End If
End If
'Call logoutfromApp("MasterFile","Issuer Profile")
'Edited
' Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
' Call login("MasterFile","Login Page","Relationship Management","MFLogin"
)
'Call click_WebElement("MasterFile","Depositary Receipt Division's","Mas
terFile")
Call select_Menu("MasterFile","Issuer Profile",DataTable.Value("MenuPath
","DR"))
Wait(3)
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
Call click_Image("MasterFile","Profile - DR Search","Search")
Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
If dataTable.Value("Type","DR") <> "144A" and datatable.Value("Type","D
R") <> "RegS" and DataTable.Value("Sponsored","DR") <>"U" Then
Call click_WebElement("MasterFile","DR Profile","SEC Filing")
Call set_WebEdit_Value("MasterFile","DR Profile","CurrentF6ADS",
dataTable.Value("CurrentF6ADS","DR"))
Call set_WebEdit_Value("MasterFile","DR Profile","CurF6Number",d
ataTable.Value("CurF6Number","DR"))
Wait(2)
If DataTable.Value("F6FileDate","DR") <> "" Then
strDataTableValue = DataTable.Value("F6FileDate"
,"DR")
strValue = Split(strDataTableValue,";",-1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image("MasterFile","DR Profile","Show
Calendar_F6FileDate")
Call ClickIcon_SetDate("MasterFile","DR Profile"
,strMonthValue,strYearValue,strDateValue)
End If
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").E
xist(2) Then
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("OK").Click
End If
Call click_Image("MasterFile","DR Profile","Save")
End If
Wait(4)
Wait(4)
Call click_WebElement("MasterFile","DR Profile","Detail")
Call click_WebElement("MasterFile","DR Profile","Detail")
'Creating a Bifurcated DR
Browser("MasterFile").Page("DR Profile").WebElement("DRLifeCycle").Click
If Browser("DR Lifecycle / Relation").Page("DR Lifecycle / Relation").Ex
ist(2) Then
Reporter.ReportEvent micPass,"Step45: Check if the DR life Cycle
screen has opened","The DR Life Cycle Screen has opened successfully"
Else
Reporter.ReportEvent micFail,"Step45: Check if the DR Life Cycle
Screen has opened","The DR Life Cycle Screen has not opened successfully"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
Call select_Radiobutton("DR Lifecycle / Relation","DR Lifecycle / Relati
on","slc","0")
Call click_WebButton("DR Lifecycle / Relation","DR Lifecycle / Relation"
,"Create new DR")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step46:Select the Bifurcated radio
link and click on create new DR","The Bifurcated DR button and the Create new
DR button is clicked correctly"
Else
Reporter.ReportEvent micPass,"Step46:Select the Bifurcated radio
link and click on create new DR","The Bifurcated DR button and the Create new
DR button is not clicked correctly"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
'Create a New CUSIP for the RegS DR
Wait(5)
Environment.Value("RegDRNAME")=get_WebEdit_Value("MasterFile","DR Profil
e","DRName")
Environment.Value("RegDRNAME")=Environment.Value("RegDRNAME") &"_Automat
ion_" &Time&Date
Wait(5)
Call set_WebEdit_Value("MasterFile","DR Profile","DRName",Environment.Va
lue("RegDRNAME"))
Call set_WebEdit_Value("MasterFile","DR Profile","Comments","This is for a t
esting purpose. This has been created by the ADR Automation Team")
If DataTable.Value("FirstFiler","DR") <> "" Then
Call Select_Combo_Value("MasterFile","DR Profile","FirstFiler",
DataTable.Value("FirstFilerReg","DR"))
End If
Environment.Value("TestCase_Log")="True"
Call click_Image("MasterFile","DR Profile","Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,": Creating a new DR ","The new DR
is created as per requirement"
Else
Reporter.ReportEvent micFail," Creating a new DR","The New DR is
not created as required"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log")="False"
End If
'step57
'Select the CUSIP ADD Tab
Call click_WebElement("MasterFile","DR Profile","CUSIP Summary/Add")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass," Step47:Select the CUSIP Summary/A
DD tab","The CUSIP Summary/Add tab is selected as required"
Else
Reporter.ReportEvent micFail,"Step47: Select the CUSIP Summary/A
dd tab","The CUSIP Summary/Add tab is not selected as required"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log")="False"
End If
'Click on the ADD button
Call click_WebButton("MasterFile","DR Profile","ADD")
'Call pageCheck_WebElementinTable(strBrowserName,strPageName,"Type;CUSIP
,DR Exchange,DR Ticker Symbol,Ratio DRs,Ratio Underlying Shares,Current CUSIP","
")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass," Step48: Click on the ADD button i
n the CUSIP summary screen","The required fields under the CUSIP summary is pres
ent as required"
Else
Reporter.ReportEvent micFail,"Step48: Click on ADD button in the
CUSIP summary screen","The required fields under the CUSIP summary is not prese
nt as required"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log")="False"
End If
'Set the CUSIP details
Call Select_Combo_Value("MasterFile","DR Profile","CUSIP Type","Primary"
)
Wait(2)
If Browser("MasterFile").Page("DR Profile").WebTable("CUSIP Summary/Add"
).Image("New CUSIP").Exist(2) Then
Browser("MasterFile").Page("DR Profile").WebTable("CUSIP Summary
/Add").Image("New CUSIP").Click
Reporter.ReportEvent micPass,"Step49: Click on the new CUSIP but
ton","The new CUSIP button is clicked as required"
Else
Reporter.ReportEvent micFail,"Step49: Click on the new CUSIP bu
tton","The new CUSIP button is not present as required"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log")="False"
End If

'On clicking the New CUSIP buton the New CUSIP screen opens up
'call pageCheck_WebEdit(strBrowserName,strCUSIPPageName,"Name;Br
iefName;DisplaycusCountryCode_0;cusQspAdrs_0;cusQspShares_0;cusTsymNm_0;cusDrIsi
nNo_0;DisplaycusExchangeCode_0;cusDrCmnCd_0;cusDrSedolNo_0;cusPrcShrBaseRt_0;cus
QspUnderlyingIsin_0","")
'Call pageCheck_WebList("MasterFile","CUSIP Profile","cusQspActi
veFlag_0","")
' If Environment.Value("TestCase_Log")="True" Then
' Reporter.ReportEvent micPass,"Click on the New CUSIP but
ton","The CUSIP profile screen opens up as required"
' Else
' Reporter.ReportEvent micFail,"Click on the New CUSIP but
ton","The CUSIP profile screen does not open up as required"
' Environment.Value("TestCase_Log") = "True"
' Environment.Value("Execution_Log")="False"
' End If

'Entering the details for the CUSIP screen


' Call set_WebEdit_Value("MasterFile","CUSIP Profile","Ratio DRs",
dataTable.Value("RatioDR","DR"))
' Call set_WebEdit_Value("MasterFile","CUSIP Profile","RatioUnderl
yingShares",dataTable.Value("RatioUnderlyingShares","DR"))
Environment.Value("RegCUSIP_NAME")="A"& createAlphanumericStrin
g(8)
Call set_WebEdit_Value("MasterFile","CUSIP Profile","CUSIP",Envi
ronment.Value("RegCUSIP_NAME"))
' Call Browser("MasterFile").Dialog("Microsoft Internet Explorer
").WaitProperty("Visible","True",5)
Wait(4)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").E
xist(2) Then
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("OK").Click
End If
DRSEDOL_VALUE=createAlphanumericString(7)
Call set_WebEdit_Value("MasterFile","CUSIP Profile","DRSEDOL",DR
SEDOL_VALUE)
Call click_Image("MasterFile","CUSIP Profile","DRExchange InfoNo
nBNY")
Call SelectValueInsideFrame("MasterFile","CUSIP Profile","lookup
Frame",DataTable.Value("DRExchangeName","DR"))
'wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").E
xist(2) Then
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("OK").Click
End If
DRTICKER_SYMBOL=createAlphanumericString(5)
Call set_WebEdit_Value("MasterFile","CUSIP Profile","DR Ticker S
ymbol",DRTICKER_SYMBOL)

'If DataTable.Value("Sponsored",strDatasheetName) = "U" and DataTable.Va


lue("DepositoryName",strDatasheetName)="BNY" Then
' Call click_Image(strBrowserName,strCUSIPPageName,"UnderlyingSecu
rityInfoUnsponsored")
'ElseIf DataTable.Value("Sponsored",strDatasheetName) ="S" and DataTable
.Value("DepositoryName",strDatasheetName)="BNY" Then
' Call click_Image(strBrowserName,strCUSIPPageName,"UnderlyingSec
urityInfoSponsored")
'Else
' Call click_Image(strBrowserName,strCUSIPPageName,"UnderlyingSecu
rityInfoNonBNY")
'End If
'
' call SelectValueInsideFrame(strBrowserName,strCUSIPPageName,"lookup
Frame",dataTable.Value("UnderlyingSecurity",strDatasheetName))
'
If DataTable("DepositoryName","DR") ="BNY" Then
Call click_Image("MasterFile","CUSIP Profile","CommonDepositoryI
nfo")
Call SelectValueInsideFrame("MasterFile","CUSIP Profile","lookup
Frame",DataTable.Value("CommonDepository","DR"))
End If
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step50 to 51: Fill in the details
required for the new CUSIP","The Details for the new CUSIP are filled as require
d"
Else
Reporter.ReportEvent micFail,"Step 50 to 51: Fill in the details
required for the new CUSIP","The details for the new CUSIP are not filled as re
quired"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log")="False"
End If
Wait(2)
Wait(5)
'Call Browser("MasterFile").Page("CUSIP Profile").Image("Save").WaitProp
erty("visible","True",5)
'Click on save
Call click_Image("MasterFile","CUSIP Profile","Save")
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("OK").Click
End If
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step 52: Click on the save button
after filling in the required details","The CUSIP gets saved as required"
Else
Reporter.ReportEvent micFail,"Step52: Click on the save button a
fter filling in the required details","The CUSIP does not get saved as required"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log")="False"
End If
Wait(3)
'Click on the DR name
Call Browser("MasterFile").Page("CUSIP Profile").Image("Save").WaitPrope
rty("Visible","True",5)
Call ClickonDRName("MasterFile","CUSIP Profile",Environment.Value("RegDR
NAME"),"2")
If Environment.Value("TestCase_Log")="True" and Browser("MasterFile").Pa
ge("DR Profile").Exist(2) Then
Reporter.ReportEvent micPass,"Step53: Click on the DR Name","The
DR name is clicked as required"
Else
Reporter.ReportEvent micFail,"Step53: Click on the DR Name","The
DR Name is not clicked as required"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log")="False"
End If
wait(3)
''Open the Required Reg S DR
'Call click_WebButton("MasterFile","DR Profile","Related DR")
Browser("MasterFile").Page("DR Profile").WebElement("CUSIP Summary/Add")
.Click
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step54: Go to CUSIP Summary tab an
d look for Flag","The Flags are present as required"
Else
Reporter.ReportEvent micFail,"Step54: Go to CUSIP Summary tab an
d look for Flag ","The flag is not present"
Environment.Value("TestCase_Log")="True"
End If
' Browser("Masterfile").Page("DR Profile").WebElement("Detail").Click
''Filling the DR Documentation for the Reg-S DR
' Call click_WebElement("MasterFile","DR Profile","DRDocumentation")
' If Environment.Value("TestCase_Log")="True" Then
' Reporter.ReportEvent micPass,"Click on the DR documentation link
","The DR Documentation link is clicked as required"
' Else
' Reporter.ReportEvent micFail,"Click on the DR documentation link
","The DR Documentation link is not clicked as required"
' Environment.Value("TestCase_Log")="True"
' End If
'''Setting the values for the Fees tab
' Call click_WebElement("MasterFile","DR Documentation Detail","Fees")
' Wait(3)
'
' ' Click on Add Button and click on the Image ' info'
' Call Browser("MasterFile").Page("DR Documentation Detail").WebTable("Fee
s_Table").WaitProperty("Visible","True",5)
' Call click_WebButton("MasterFile","DR Documentation Detail","Add_Fees")
' Wait(3)
' Call click_Image("MasterFile","DR Documentation Detail","FeeType")
' Wait(3)
' ' Select all the Fees present in the Fee Frame
' intRowCount = Browser("MasterFile").Page("DR Documentation Detail").Fram
e("lookupFrame").WebTable("FeeDescription").RowCount
' 'MsgBox intRowCount
' For intRowCounter = 2 to intRowCount
' intRowCounts = Browser("MasterFile").Page("DR Documentation Deta
il").WebTable("Fees_Table").RowCount
' Browser("MasterFile").Page("DR Documentation Detail").WebTable("
Fees_Table").ChildItem(intRowCounts,1,"Image","0").Click
' intRowCount = Browser("MasterFile").Page("DR Documentation Detai
l").Frame("lookupFrame").WebTable("FeeDescription").RowCount
' If intRowCount = 2 Then
' strGetCellData = Browser("MasterFile").Page("DR Documentation De
tail").Frame("lookupFrame").WebTable("FeeDescription").GetCellData(2,1)
' Browser("MasterFile").Page("DR Documentation Detail").WebElement
("html tag:=TD","innertext:="& strGetCellData).Click
' 'Call click_WebButton(strBrowserName,strPageName,"Add_Fees")
' Exit For
' Else
' strGetCellData = Browser("MasterFile").Page("DR Documentation De
tail").Frame("lookupFrame").WebTable("FeeDescription").GetCellData(2,1)
' Browser("MasterFile").Page("DR Documentation Detail").WebElement
("html tag:=TD","innertext:="& strGetCellData).Click
' Call click_WebButton("MasterFile","DR Documentation Detail","Add
_Fees")
' End If
' Next
'
' ' If the Fee Amount is "NULL", set 0 as the Value in the Field
' intFeeRC = Browser("MasterFile").Page("DR Documentation Detail").WebTa
ble("Fees_Table").RowCount
' For intCount =3 to intFeeRC
' strCellData = Browser("MasterFile").Page("DR Documentation De
tail").WebTable("Fees_Table").ChildItem(intCount,2,"WebEdit","0").GetROProperty(
"value")
' If strCellData = "" Then
' Browser("MasterFile").Page("DR Documentation Detail").We
bTable("Fees_Table").ChildItem(intCount,2,"WebEdit","0").Set "0"
' End If
' Next
'
' Environment.Value("TestCase_Log")="True"
' Call click_Image("MasterFile","DR Documentation Detail","Save")
'
' If Environment.Value("TestCase_Log")="True" Then
' Reporter.ReportEvent micPass,"Step75: Click on the Fees tab and
fill in the details and click on save","The details of the fees are filled and s
aved as required"
' Else
' Reporter.ReportEvent micFail,"Step75: Click on the Fees tab and
fill in the details and click on save","The details are not filled properly"
' Environment.Value("TestCase_Log")="True"
' End If
' Wait(2)
' If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
' Reporter.ReportEvent micPass,"Check whether the microsoft intern
et explorer pop-up comes up or not","The pop-up appears as required"
' Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("Cancel").Click
' End if
'
' Wait(2)
' If Browser("MasterFile").Page("DR Documentation Detail").WebElement("Is
suerProfile").Exist(2) Then
' Browser("MasterFile").Page("DR Documentation Detail").WebElement
("IssuerProfile").click
' End If
'
' If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
' Reporter.ReportEvent micPass,"Check whether the microsoft intern
et explorer pop-up comes up or not","The pop-up appears as required"
' Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("Cancel").Click
' End if
'
' If Environment.Value("TestCase_Log")="True" Then
' Reporter.ReportEvent micPass,"Step76: Fill in the DR documentati
on details and click on save","The DR documentation details are filled as requir
ed"
' Else
' Reporter.ReportEvent micFail,"Step76: Fill in the DR documentati
on details and click on save","The DR documentation details are filled as requir
ed"
' Environment.Value("TestCase_Log")="True"
' End If
'
' 'Call logoutfromApp("MasterFile","DR Documentation Detail")
'
' 'Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogi
n"))
' 'Call login("MasterFile","Login Page","Relationship Management","MFLogin
")
' 'Call click_WebElement("MasterFile","Depositary Receipt Division's","Mas
terFile")
Call select_Menu("MasterFile","DR Profile",DataTable.Value("MenuPath","D
R"))
Wait(3)
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
Call click_Image("MasterFile","Profile - DR Search","Search")
Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
'Call ClickonDRName("MasterFile","DR Documentation Detail",Environment.V
alue("RegDRNAME"),"2")
'Call click_WebButton("MasterFile","DR Profile","Related DR")
Wait(3)
Call Select_Combo_Value("MasterFile","DR Profile","Status","Effective")
Call click_Image("MasterFile","DR Profile","Save")
Wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explore
r").WinButton("Cancel").Click
End If
Call logoutfromApp("MasterFile","DR Profile")
'Step 77
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
Call login("MasterFile","Login Page","Approver","MFLogin")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step58: Log into application using
Approver ID","We have successfully logged in as an approver"
Else
Reporter.ReportEvent micFail,"Step58: Log into the application u
sing Approver ID ","We have not successfully logged in as an approver"
Environment.Value("TestCase_Log")="True"
End If
'Step59 to 66
Call ApprovalFunction_CreateNewDR("MasterFile","CUSIP Profile","CUSIP",E
nvironment.Value("CUSIPNAME144A"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step59 to 66:Approve the CUSIP det
ails","The CUSIP details are approved as required"
Else
Reporter.ReportEvent micFail,"Step59 to 66: Approve the CUSIP de
tails","The CUSIP details are not approved as required"
Environment.Value("TestCase_Log")="True"
End If

'Step86 to 90
' Call ApprovalFunction_CreateNewDR("MasterFile","DR Documentation","DR Na
me",Environment.Value("DRNAME"),"Approved","Approved","Pending Approval")
' If Environment.Value("TestCase_Log")="True" Then
' Reporter.ReportEvent micPass,"Step86 to 90: Approve the DR Docum
entation","The DR Documentation is filled in correctly as required"
' Else
' Reporter.ReportEvent micFail,"Step86 to 90: Approve the DR Docum
entation","The DR Documentation is not approved as required"
' Environment.Value("TestCase_Log")="True"
' End If
'Step 67 to 72
If Environment.Value("TCCURCOUNT")=1 Then
Call ApprovalFunction_CreateNewDR("MasterFile","Issuer Documentation","I
ssuer",Environment.value("ISSUERNAME"),"Approved","Approved","Pending Approval")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step67 to 72: Approve the issuer d
ocumentation","The issuer documentation is approved as required"
Else
Reporter.ReportEvent micFail,"Step 67 to 72 : Approve the issuer
documentation","The issuer documentation is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
Reporter.ReportEvent micPass,"Step67 to 72 : Approve the issuer document
ation","The issuer documentation already is approved"
End if
'Call logoutfromApp("MasterFile","Approval Queue Item Search")

'Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogi


n"))
'Call login("MasterFile","Login Page","Approver","MFLogin")
Call ApprovalFunction_CreateNewDR("MasterFile","CUSIP Profile","CUSIP",E
nvironment.Value("RegCUSIP_NAME"),"Approved","Approved","Pending Approval")
'Call ApprovalFunction_CreateNewDR("MasterFile","DR Documentation","DR N
ame",Environment.Value("RegDRNAME"),"Approved","Approved","Pending Approval")
Call ApprovalFunction_CreateNewDR("MasterFile","DR Profile","Name",Envir
onment.Value("RegDRNAME"),"Approved","Approved","Pending Approval")
Call logoutfromApp("MasterFile","Approval Queue Item Search")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Approve the details of the Bifurc
ated Reg. S DR","The details of the bifurcated Reg. S DR is approved as required
"
Else
Reporter.ReportEvent micFail,"Approve the details of the Bifurc
ated Reg. S DR","The details of the bifurcated Reg. S DR is not approved as requ
ired"
End If
'Step 78 to 82
Call ApprovalFunction_CreateNewDR("MasterFile","DR Profile","Name",Environme
nt.Value("DRNAME"),"Approved","Approved","Pending Approval")
Call logoutfromApp("MasterFile","Approval Queue Item Search")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step 78 to 82: Approve the 144A D
R","The 144A DR is approved as required"
Else
Reporter.ReportEvent micFail,"Step78 to 82: Approve the 144A DR
","The 144A DR is not approved as required"
Environment.Value("TestCase_Log")="True"
End If
'Step84
Call invoke_URL("MasterFile","Login Page",DataTable.Value("URL","MFLogin
"))
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step84 :Log into the ADR h
ome page","The user logs into the ADR home page as required"
Else
Reporter.ReportEvent micFail,"Step 84: Log into the ADR
home page","The user does not log into the ADR home page as required"
End If
'Step85
Call login("MasterFile","Login Page","Relationship Management","MFLogin"
)
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step85: User enters a valid usern
ame and password","The username and password are accepted and the application ho
me page is displayed"
Else
Reporter.ReportEvent micFail,"Step85: User enters a valid userna
me and password","The username and password are not accepted"
Environment.Value("TestCase_Log")="True"
End If
Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step86: Click on the masterfile li
nk as required","The user clicks on the masterfile on which the masterfile opens
as required"
Else
Reporter.ReportEvent micFail,"Step86: Click on the masterfile li
nk as required","The user clicks on the masterfile on which the masterfile does
not open"
Environment.Value("TestCase_Log")="True"
End If
'Step111 and 112
Call select_Menu("MasterFile","MasterFile",DataTable.Value("MenuPath","D
R"))
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step87 and 88: User selects the Pr
ofile DR link","The DR Search page opens up as required"
Else
Reporter.ReportEvent micFail,"Step87and 88: User selects the pro
file DR link","The DR search page does not open up"
Environment.Value("TestCase_Log")="True"
End If
'Step89
Call set_WebEdit_Value("MasterFile","Profile - DR Search","DRName",Envir
onment.Value("DRNAME"))
Call DRSearchCriteria("MasterFile","Profile - DR Search")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Step89 and 90: User enters the req
uired DR details and clicks on search","The DR gets displayed successfully"
Else
Reporter.ReportEvent micFail,"Step89and 90 : User enters the req
uired DR details and clicks on search","The DR is not displayed successfully"
End If
'Step114
Browser("MasterFile").Page("Profile - DR Search").WebElement("Innertext:
=" & Environment.Value("DRNAME"),"html tag:=TD").Click
StatusOfDR=Browser("MasterFile").Page("DR Profile").WebList("Status").GetROP
roperty("value")
If StatusOfDR="Effective" Then
Reporter.ReportEvent micPass,"Step91: Check whether the DR has b
een made effective or not","The DR Has been made effective successfully"
Else
Reporter.ReportEvent micFail,"Step 91: Check whether the
DR has been made effective or not","The DR has not been made effective"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="True"
End If
'Step116
Browser("MasterFile").Page("DR Profile").WebElement("CUSIP Summary/Add")
.Click
Environment.Value("TestCase_Log")="True"
Call FlagImageCheck("MasterFile","DR Profile","DRTable","Not Exist")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass," Go to CUSIP Summary tab and look
for Flag","The Flags are absent as required"
Else
Reporter.ReportEvent micFail," Go to CUSIP Summary tab and look
for Flag ","The flag is still present"
Environment.Value("TestCase_Log")="True"
End If
Browser("MasterFile").Page("DR Profile").WebElement("Detail").Click
'Click on the Related DR Button
Call click_WebButton("MasterFile","DR Profile","Related DR")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Click on the related DR button","T
he Related DR button is present as required"
Else
Reporter.ReportEvent micFail,"Click on the related DR button","T
he related DR button is not present as required"
Environment.Value("TestCase_Log")="True"
End If
strDRnameinEdit=get_WebEdit_Value("MasterFile","DR Profile","DRName")
If strDRnameinEdit=Environment.Value("RegDRNAME") Then
Reporter.ReportEvent micPass,"Check whether the created REG S DR
name: " &Environment.Value("RegDRNAME")&" is present as a related DR","The requ
ired REG S DR is present as a related DR"
Else
Reporter.ReportEvent micFail," Check whether the created REG S D
R name: " &Environment.Value("RegDRNAME")&" is present as a related DR","The req
uuired REG S DR is not present as a related DR"
Environment.Value("Execution_Log")="False"
End If
'Navigate to the CUSIP summary /ADD tab
Browser("MasterFile").Page("DR Profile").WebElement("CUSIP Summary/Add")
.Click
Browser("MasterFile").Page("DR Profile").WebTable("CUSIP Summary/Add").W
ebEdit("CUSIPvalue").Click
CUSIPValueinEdit=get_WebEdit_Value ("MasterFile","CUSIP Profile","CUSIP"
)
Call click_WebButton ("MasterFile","CUSIP Profile","Related CUSIP")
BifurcatedCUSIPValue=get_WebEdit_Value ("MasterFile","CUSIP Profile","Bi
furcatedCusipValue")
If CUSIPValueinEdit=BifurcatedCUSIPValue Then
Reporter.ReportEvent micPass,"Step92 to 99: Check whether the CU
SIP's of the bifurcated are correctly related","The CUSIP's of the Bifurcated DR
's are correctly related"
Else
Reporter.ReportEvent micFail,"Step92 to 99: Check whether the C
USIP's of the bifurcated DR's are correctly related","The CUSIP's are not correc
tly related"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="False"
End If
Reporter.ReportEvent micDone,"Step100: Check for the absense of the flag
s in the DR profile screen","The Step has been already done"
Call select_Menu("MasterFile","CUSIP Profile","Home;DR Home")
End function

'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++My Functions+++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++

'===============================================================================
==========================
' Name of the Function : DRSearchCriteria()
' Scope of the Function : Public
' Author : Ganesh Viswanathan
' Description : This function is to enter the DR Se
arch criteria.
' Parameters accepted : BrowserName, PageName.
' Parameter returned : Null
' Date and / or Version : 10-12-2008,version 1.0
'===============================================================================
============================
Public Function DRSearchCriteria(strBrowserName,strPageName)

If DataTable.Value("IssuerName","DR") <> "" Then


Call set_WebEdit_Value(strBrowserName,strPageName,"IssuerName",D
ataTable.Value("IssuerName","DR"))
End If
If DataTable.Value("DRName","DR") <> "" Then
Call set_WebEdit_Value(strBrowserName,strPageName,"DRName",DataT
able.Value("DRName","DR"))
End If
If DataTable.Value("DRType","DR") <> "" Then
Call select_Combo_Value(strBrowserName,strPageName,"DRType",Data
Table.Value("DRType","DR"))
End If
If DataTable.Value("DROrigin","DR") <> "" Then
Call select_Combo_Value(strBrowserName,strPageName,"DROrigin",Da
taTable.Value("DROrigin","DR"))
End If
If DataTable.Value("CountryOfManagement","DR") <> "" Then
Call select_Combo_Value(strBrowserName,strPageName,"CountryOfMan
agement", DataTable.Value("CountryOfManagement","DR"))
End If

If DataTable.Value("Status","DR") <> "" Then


Call select_Combo_Value(strBrowserName,strPageName,"Status",Data
Table.Value("Status","DR"))
End If
If DataTable.Value("CUSIPHomeMarketCountry","DR") <> "" Then
Call select_Combo_Value(strBrowserName,strPageName,"HomeCountry"
,DataTable.Value("CUSIPHomeMarketCountry","DR"))
End If
If DataTable.Value("SubStatus","DR") <> "" Then
Call select_Combo_Value(strBrowserName,strPageName,"SubStatus",D
ataTable.Value("SubStatus","DR"))
End If
If DataTable.Value("SorU","DR") <> "" Then
Call select_Combo_Value(strBrowserName,strPageName,"SorU", DataT
able.Value("SorU","DR"))
End If
If DataTable.Value("DRExchange","DR") <> "" Then
Call select_Combo_Value(strBrowserName,strPageName,"DRExchange",
DataTable.Value("DRExchange","DR"))
End If
wait(3)
Call click_Image(strBrowserName,strPageName,"Search")
End Function

''******************************************************************************
********************************************************************************
**********************************************************************

'===============================================================================
==========================
' Name of the Function : CreateNewDR()
' Scope of the Function : Public
' Author : Ganesh Viswanathan
' Description : This function is to create a new DR
.
' Parameters accepted : BrowserName, PageName,strIssuerName
,strDatasheetName
' Parameter returned : Null
' Date and / or Version : 11-12-2008,version 1.0
'===============================================================================
============================

Public Function CreateNewDR(strBrowserName,strPageName,strDRPageName,strCUSIPPag


eName,strIssuerName,strDatasheetName)
Environment.Value("TestCase_Log")="True"
Wait(3)
Environment.Value("Failure")="False"
' Call dataTable.AddSheet("DR")
' Environment.Value("Execution_Log")="True"
'call dataTable.ImportSheet("E:\Ganesh Documents do not delete\DataTable
s\MasterFileProfile.xls","DR","DR")
If Browser(strBrowserName).Page(strPageName).Image("New DR").Exist(2) t
hen
Call click_Image(strBrowserName,strPageName,"New DR")
Browser(strBrowserName).Page(strPageName).Image("New DR").Click
End if
Call pageCheck_ImageOR("CreateNewDR","CreateNewDR","Depositoryinfo")
Call pageCheck_WebListOR("CreateNewDR","CreateNewDR","Sponsored;Type")
Call pageCheck_WebButton("CreateNewDR","CreateNewDR","Ok;Cancel","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass, "Click on The New DR paper pencil
icon","The New DR button is clicked as required and the Create new DR pop-up app
ears as required"
Else
Reporter.ReportEvent micFail, "Click on The New DR paper pencil
icon","The New DR button does not appear as required"
Call captureScreenshot()
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log")="False"
End If
'Fill the details of the new DR to be created
'Check whether the validation message appears on saving without entering any det
ails
Call click_WebButton("CreateNewDR","CreateNewDR","Ok")
text=Browser("CreateNewDR").Dialog("Microsoft Internet Explorer").Stati
c("Unsponsored Level 3 program").GetROProperty("text")
If text=" Please enter following information : Sponsored , Depositary ,
DR Type " Then
Reporter.ReportEvent micPass,"Check for the validation error mes
sage that appears when we click on OK button without selecting any details in th
e Create new DR screen","The validation error message appears as required"
Browser("CreateNewDR").Dialog("Microsoft Internet Explorer").Win
Button("OK").Click
Else
Reporter.ReportEvent micFail,"Check for the validation error mes
sage that appears when we click on OK button without selecting any details in th
e Create new DR screen","The validation error message does not appear as require
d"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
Call Select_Combo_Value("CreateNewDR","CreateNewDR","Sponsored",dataTabl
e.Value("Sponsored",strDatasheetName))
Call click_Image("CreateNewDR","CreateNewDR","Depositoryinfo")
Call operation_on_FrameObjects_WithName("CreateNewDR","CreateNewDR","loo
kupFrame","WebCheckBox",dataTable.value("DepositoryName",strDatasheetName),"")
Call operation_on_FrameObjects_WithName("CreateNewDR","CreateNewDR","loo
kupFrame","WebButton"," Ok ","")
Call Select_Combo_Value("CreateNewDR","CreateNewDR","Type",DataTable.Val
ue("Type",strDatasheetName))
Call click_WebButton("CreateNewDR","CreateNewDR","Ok")
If Browser("DR Lifecycle / Relation").Dialog("Microsoft Internet Explorer").
Static("Unsponsored Level 3 program").Exist(3) Then
text=Browser("DR Lifecycle / Relation").Dialog("Microsoft Intern
et Explorer").Static("Unsponsored Level 3 program").GetROProperty ("text")
Reporter.ReportEvent micFail,"Check whether the New DR can be c
reated"," DR cannot be created because "&text
Browser("DR Lifecycle / Relation").Dialog("Microsoft Internet Ex
plorer").WinButton("OK").Click
Browser("DR Lifecycle / Relation").Close
Environment.Value("Failure")="True"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Exit Function
End If

If Environment.Value("TestCase_Log") = "True" Then


Reporter.ReportEvent micPass, "Fill in the details of the new DR
to be created","The details gets filled properly and the new DR gets created"
Else
Reporter.ReportEvent micFail, "Fill in the details of the new DR
to be created","The new DR is not created successfully"
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log")="False"
End If
'Checking the landing screen
Call pageCheck_WebElement(strBrowserName,strDRPageName,"CUSIP Summary/Ad
d;Detail;Offerings","")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass," Check whether the Profile DR page
has been loaded with all the required details","The DR profile page has been lo
aded successfully"
Else
Reporter.ReportEvent micFail,"Check whether the profile DR page
has been loaded with all the required details","The DR profile page has not been
loaded successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log")="False"
End If

'Select the details tab


Call click_WebElement(strBrowserName,strDRPageName,"Detail")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass," Select the Details tab","The deta
ils tab is selected as required"
Else
Reporter.ReportEvent micFail,"Select the Details tab","The detai
ls tab is not selected as required"
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log")="False"
End If

Environment.Value("DRNAME")=get_WebEdit_Value(strBrowserName,strDRPageNa
me,"DRName")
'Environment.Value("DRNAME")=Environment.Value("DRNAME") &"_QTPDR_" &Tim
e&Date &"_"&trim(DataTable.Value("DepositoryName",strDatasheetName))
Environment.Value("DRNAME")=Environment.Value("DRNAME") &"_QTP_DR_Demo_"
&Time&Date
Wait(5)
Call set_WebEdit_Value(strBrowserName,strDRPageName,"DRName",Environment
.Value("DRNAME"))
'Call Select_Combo_Value("MasterFile","DR Profile","Status","Effective")
Call click_Image("MasterFile","DR Profile","Save")
Wait(4)
Wait(4)
Wait(4)
If (DataTable.Value("DepositoryName",strDatasheetName) <> "BNY" And Dat
aTable.Value("Sponsored",strDatasheetName) <> "S" And DataTable.Value("Type","DR
")<>"Reg. S") Or (DataTable.Value("DepositoryName",strDatasheetName) <> "BNY" An
d DataTable.Value("Sponsored",strDatasheetName) = "U" And DataTable.Value("Type"
,"DR")="Level II") Then
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error NonBNY2","Security Description")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error NonBNY2","Field is required")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error NonBNY2","Effective Date")
Browser(strBrowserName).Page(strDRPageName).Image("Close").Click
'Enter this below if u face problems-- Or (DataTable.Value("Type
","DR")="144A" And DataTable.Value("Bifurcated","DR")="Yes")
ElseIf (DataTable.Value("DepositoryName",strDatasheetName) = "BNY" And
DataTable.Value("Sponsored",strDatasheetName) = "U" And DataTable.Value("Type","
DR")="144A") Or (DataTable.Value("DepositoryName",strDatasheetName) <> "BNY" An
d DataTable.Value("Sponsored",strDatasheetName) = "S" And DataTable.Value("Type"
,"DR")="144A") Or (DataTable.Value("DepositoryName",strDatasheetName)="BNY" And
DataTable.Value("Type","DR")="Level I" And DataTable.Value("Sponsored",strDatas
heetName) = "U") Or (DataTable.Value("DepositoryName",strDatasheetName) <> "BNY"
And DataTable.Value("Sponsored",strDatasheetName) = "U" And DataTable.Value("Ty
pe","DR")="Reg. S")Then
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error NonBNY","Security Description")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error NonBNY","Field is required")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error NonBNY","Effective Date")
Browser(strBrowserName).Page(strDRPageName).Image("Close").Click
ElseIf (DataTable.Value("DepositoryName",strDatasheetName) = "BNY" And DataTa
ble.Value("Sponsored",strDatasheetName) = "S" And DataTable.Value("Type","DR")="
144A") Or (DataTable.Value("DepositoryName",strDatasheetName) = "BNY" And DataTa
ble.Value("Sponsored",strDatasheetName) = "S" And DataTable.Value("Type","DR")="
Level I") Or (DataTable.Value("DepositoryName",strDatasheetName) = "BNY" And Dat
aTable.Value("Sponsored",strDatasheetName) = "S" And DataTable.Value("Type","DR"
)="Level II") Or (DataTable.Value("DepositoryName",strDatasheetName) = "BNY" And
DataTable.Value("Sponsored",strDatasheetName) = "S" And DataTable.Value("Type",
"DR")="Level III") Or (DataTable.Value("DepositoryName",strDatasheetName) = "BNY
" And DataTable.Value("Sponsored",strDatasheetName) = "S" And DataTable.Value("T
ype","DR")="Reg. S") Then
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Security Description")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Field is required")
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Effective Date")
Browser(strBrowserName).Page(strDRPageName).Image("Close").Click
Else
Reporter.ReportEvent micWarning,"Check for validation error mess
age","The validation error message box does not fall into any such category"
End If
Wait(3)
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Check for the validation error mes
sage when clicking on the save button without selecting any details in the new D
R profile screen","The error message appears as required"
Else
Reporter.ReportEvent micFail,"Check for the validation error me
ssage when clicking on the save button without selecting any details in the new
DR profile screen","The error message does not appear as required"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_log")="False"
End If
'Fill the details in the Details tab
Call Select_Combo_Value(strBrowserName,strDRPageName,"SecurityDescriptio
n","ADR")

If DataTable.Value("DepositoryName",strDatasheetName)<>"BNY" or DataTabl
e.Value("Sponsored",strDatasheetName)<> "S" Then
If DataTable.Value("EffectiveDate",strDatasheetName) <> "" Then
strDataTableValue = DataTable.Value("EffectiveDa
te",strDatasheetName)
strValue = Split(strDataTableValue,";",-1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image(strBrowserName,strDRPageName,"S
howCalendarNonBNY")
Call ClickIcon_SetDate(strBrowserName,strDRPageN
ame,strMonthValue,strYearValue,strDateValue)
End If
Else
If DataTable.Value("EffectiveDate",strDatasheetName) <> "" Then
strDataTableValue = DataTable.Value("EffectiveDa
te",strDatasheetName)
strValue = Split(strDataTableValue,";",-1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image(strBrowserName,strDRPageName,"S
howCalendar")
Call ClickIcon_SetDate(strBrowserName,strDRPageN
ame,strMonthValue,strYearValue,strDateValue)
End If
End If
If browser(strBrowserName).Dialog("Microsoft Internet Explorer").Exist(2
) Then
browser(strBrowserName).Dialog("Microsoft Internet Explorer").Wi
nButton("OK").click
End If
If browser(strBrowserName).Dialog("Microsoft Internet Explorer").Exist(2
) Then
browser(strBrowserName).Dialog("Microsoft Internet Explorer").Wi
nButton("OK").click
End If
Call set_WebEdit_Value(strBrowserName,strDRPageName,"Comments","This is
for a testing purpose. This has been created by the ADR Automation Team")
If DataTable.Value("FirstFiler",strDatasheetName) <> "" Then
Call Select_Combo_Value(strBrowserName,strDRPageName,"FirstFiler
", DataTable.Value("FirstFiler",strDatasheetName))
End If
Call click_Image(strBrowserName,strDRPageName,"Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Creating a new DR ","The new DR is
created as per requirement"
Else
Reporter.ReportEvent micFail,"Creating a new DR","The New DR is
not created as required"
Call captureScreenshot()
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log")="False"
End If
Wait(3)
Call Select_Combo_Value("MasterFile","DR Profile","Status","Effective")
Call click_Image("MasterFile","DR Profile","Save")
If browser(strBrowserName).Dialog("Microsoft Internet Explorer").Exist(
2) Then
browser(strBrowserName).Dialog("Microsoft Internet Explorer").Wi
nButton("Cancel").click
End If
Wait(4)
Wait(4)
If (DataTable.Value("DepositoryName",strDatasheetName) <> "BNY" And Dat
aTable.Value("Sponsored",strDatasheetName) <> "S" And DataTable.Value("Type","DR
")<>"Reg. S") Or (DataTable.Value("DepositoryName",strDatasheetName) <> "BNY" An
d DataTable.Value("Sponsored",strDatasheetName) = "U" And DataTable.Value("Type"
,"DR")="Level II") Then
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error NonBNY2","Primary CUSIP has not been assigned for this DR")
Browser(strBrowserName).Page(strDRPageName).Image("Close").Click
'Enter this if u face problems -- 'Or (DataTable.Value("Type","D
R")="144A" And DataTable.Value("Bifurcated","DR")="Yes")
ElseIf (DataTable.Value("DepositoryName",strDatasheetName) = "BNY" And
DataTable.Value("Sponsored",strDatasheetName) = "U" And DataTable.Value("Type","
DR")="144A") Or (DataTable.Value("DepositoryName",strDatasheetName) <> "BNY" An
d DataTable.Value("Sponsored",strDatasheetName) = "S" And DataTable.Value("Type"
,"DR")="144A") Or (DataTable.Value("DepositoryName",strDatasheetName)="BNY" And
DataTable.Value("Type","DR")="Level I" And DataTable.Value("Sponsored",strDatas
heetName) = "U") Or (DataTable.Value("DepositoryName",strDatasheetName) <> "BNY"
And DataTable.Value("Sponsored",strDatasheetName) = "U" And DataTable.Value("Ty
pe","DR")="Reg. S")Then
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error NonBNY","Primary CUSIP has not been assigned for this DR")
Browser(strBrowserName).Page(strDRPageName).Image("Close").Click
ElseIf (DataTable.Value("DepositoryName",strDatasheetName) = "BNY" And
DataTable.Value("Sponsored",strDatasheetName) = "S" And DataTable.Value("Type","
DR")="144A") Or (DataTable.Value("DepositoryName",strDatasheetName) = "BNY" And
DataTable.Value("Sponsored",strDatasheetName) = "S" And DataTable.Value("Type","
DR")="Level I") Or (DataTable.Value("DepositoryName",strDatasheetName) = "BNY" A
nd DataTable.Value("Sponsored",strDatasheetName) = "S" And DataTable.Value("Type
","DR")="Level II") Or (DataTable.Value("DepositoryName",strDatasheetName) = "BN
Y" And DataTable.Value("Sponsored",strDatasheetName) = "S" And DataTable.Value("
Type","DR")="Level III") Or (DataTable.Value("DepositoryName",strDatasheetName)
= "BNY" And DataTable.Value("Sponsored",strDatasheetName) = "S" And DataTable.Va
lue("Type","DR")="Reg. S") Then
Call verify_WebTable_ValidationMessage("MasterFile","DR Profile"
,"Validation Error","Primary CUSIP has not been assigned for this DR")
Browser(strBrowserName).Page(strDRPageName).Image("Close").Click
Else
Browser(strBrowserName).Page(strDRPageName).Image("Close
").Click
Reporter.ReportEvent micWarning,"Check for validation error mess
age","The validation error message box does not fall into any such category"
End If
Wait(3)
Call Select_Combo_Value("MasterFile","DR Profile","Status","Committed")
Call click_Image("MasterFile","DR Profile","Save")
Wait(3)

'Select the CUSIP ADD Tab


Call click_WebElement(strBrowserName,strDRPageName,"CUSIP Summary/Add")
If Browser(strBrowserName).Page(strDRPageName).WebElement("Detail").Exist(2)
Then
Reporter.ReportEvent micPass," Select the Details tab","The deta
ils tab is selected as required"
Else
Reporter.ReportEvent micFail,"Select the Details tab","The detai
ls tab is not selected as required"
Call captureScreenshot()
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log")="False"
End If
'Click on the ADD button
Environment.Value("TestCase_Log")="True"
Call click_WebButton(strBrowserName,strDRPageName,"Add")
'Call pageCheck_WebElementinTable(strBrowserName,strPageName,"Type;CUSIP
,DR Exchange,DR Ticker Symbol,Ratio DRs,Ratio Underlying Shares,Current CUSIP","
")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass," Click on the ADD button in the CU
SIP summary screen","The required fields under the CUSIP summary is present as r
equired"
Else
Reporter.ReportEvent micFail,"Click on ADD button in the CUSIP s
ummary screen","The required fields under the CUSIP summary is not present as re
quired"
Call captureScreenshot()
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log")="False"
End If
'Set the CUSIP details
Call Select_Combo_Value(strBrowserName,strDRPageName,"CUSIP Type","Prima
ry")
intRowCount = Browser("MasterFile").Page("DR Profile").WebTable("CUSIP
Summary/Add").RowCount
intColumnCount = Browser("MasterFile").Page("DR Profile").WebTable("CUSI
P Summary/Add").ColumnCount(intRowCount)
For intColumnCounter = 1 to intColumnCount
intImageCount = Browser("MasterFile").Page("DR Profile").WebTable("CUSIP Sum
mary/Add").ChildItemCount(intRowCount,intColumnCounter,"Image")
If intImageCount > 0 Then
strFileName = Browser("MasterFile").Page("DR Profile").WebTable
("CUSIP Summary/Add").ChildItem(intRowCount,intColumnCounter,"Image","0").GetROP
roperty("file name")
If strFileName = "editbutton.gif" Then
Browser("MasterFile").Page("DR Profile").WebTable("CUSIP Summary
/Add").ChildItem(intRowCount,intColumnCounter,"Image","0").Click
Environment.Value("TestCase_Log")="True"
Wait(5)
Exit For
End If
End If
Next
' If browser(strBrowserName).page(strDRPageName).WebTable("CUSIP S
ummary/Add").Image("New CUSIP").Exist(2) Then
' browser(strBrowserName).page(strDRPageName).WebTable("CU
SIP Summary/Add").image("New CUSIP").Click
' Else
' Reporter.ReportEvent micFail,"Click on the new CUSIP bu
tton","The new CUSIP button is not present as required"
' Environment.Value("TestCase_Log") = "False"
' Environment.Value("Execution_Log")="False"
' End If

'On clicking the New CUSIP buton the New CUSIP screen opens up
'call pageCheck_WebEdit(strBrowserName,strCUSIPPageName,"Name;Br
iefName;DisplaycusCountryCode_0;cusQspAdrs_0;cusQspShares_0;cusTsymNm_0;cusDrIsi
nNo_0;DisplaycusExchangeCode_0;cusDrCmnCd_0;cusDrSedolNo_0;cusPrcShrBaseRt_0;cus
QspUnderlyingIsin_0","")
'Call pageCheck_WebList(strBrowserName,strPageName,"cusQspActive
Flag_0","")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Click on the New CUSIP button","Th
e CUSIP profile screen opens up as required"
Else
Reporter.ReportEvent micFail,"Click on the New CUSIP button","Th
e CUSIP profile screen does not open up as required"
Call captureScreenshot()
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log")="False"
End If
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("Cancel").Click
End If

Browser("MasterFile").Page("CUSIP Profile").Image("Save").Click
wait(3)
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("Cancel").Click
End If
Wait(6)
If Datatable.Value("DepositoryName",strDatasheetName)= "BNY" and Datata
ble.Value("Sponsored",strDatasheetName)= "S" Then
Call clkValidationErrorElement(strBrowserName,strCUSIPPageName,"
Validation Error","Ratio Underlying Shares;CUSIP;Ratio DRs","RatioUnderlyingShar
es;CUSIP;Ratio DRs" )
Browser(strBrowserName).Page(strCUSIPPageName).Image("Close").Cl
ick
Else
Call clkValidationErrorElement(strBrowserName,strCUSIPPageName,"
Validation ErrorNonBNYUnsponsored","Ratio Underlying Shares;CUSIP;Ratio DRs","Ra
tioUnderlyingShares;CUSIP;Ratio DRs" )
Browser(strBrowserName).Page(strCUSIPPageName).Image("Close").Cl
ick
End If
'Entering the details for the CUSIP screen
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"Ratio DRs",dataT
able.Value("RatioDR",strDatasheetName))
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"RatioUnderlyingS
hares",dataTable.Value("RatioUnderlyingShares",strDatasheetName))
Environment.Value("CUSIP_NAME")="A"& createAlphanumericString(8)
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"CUSIP",Environme
nt.Value("CUSIP_NAME"))
'Call browser(strBrowserName).dialog("Microsoft Internet Explorer").Wait
Property("Visible","True",5)
Wait(4)
If browser(strBrowserName).dialog("Microsoft Internet Explorer").Exist(2
) Then
browser(strBrowserName).dialog("Microsoft Internet Explorer").Wi
nButton("OK").Click
End If
DRSEDOL_VALUE=createAlphanumericString(7)
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"DRSEDOL",DRSEDOL
_VALUE)
Wait(3)
If DataTable.Value("DepositoryName",strDatasheetName) ="BNY" and DataTab
le.Value("Sponsored",strDatasheetName)="S" Then
If DataTable.Value("Type","DR")="144A" Then
DRExchangeValue=get_WebEdit_Value(strBrowserName,strCUSI
PPageName,"CUSIPDetails_DRExchange")
If DRExchangeValue ="None" Then
Reporter.ReportEvent micPass,"Check whe
ther the DR name is defaulted to None or not","The DR name is defaulted to None
as required"
Else
Reporter.ReportEvent micFail,"Check whet
her the DR name is defaulted to None or not","The DR Name is not defaulted to No
ne as required"
Call captureScreenshot()
Environment.Value("TestCase_Log")="False
"
Environment.Value("Execution_Log")="Fals
e"
End If
End If
Call click_Image(strBrowserName,strCUSIPPageName,"DRExchangeInfo
")
Call SelectValueInsideFrame(strBrowserName,strCUSIPPageName,"loo
kupFrame",dataTable.Value("DRExchangeName",strDatasheetName))
Else
Call click_Image(strBrowserName,strCUSIPPageName,"DRExchange Inf
oNonBNY")
Call SelectValueInsideFrame(strBrowserName,strCUSIPPageName,"loo
kupFrame",dataTable.Value("DRExchangeName",strDatasheetName))
End If
Wait(3)
If Browser(strBrowserName).Dialog("Microsoft Internet Explorer").Exist(2
) Then
Browser(strBrowserName).Dialog("Microsoft Internet Explorer").Wi
nButton("OK").Click
End If
DRTICKER_SYMBOL=createAlphanumericString(5)
Call set_WebEdit_Value(strBrowserName,strCUSIPPageName,"DR Ticker Symbol
",DRTICKER_SYMBOL)
If DataTable.Value("Sponsored",strDatasheetName) = "U" and DataTable.Val
ue("DepositoryName",strDatasheetName)="BNY" Then
Call click_Image(strBrowserName,strCUSIPPageName,"UnderlyingSecu
rityInfoUnsponsored")
ElseIf DataTable.Value("Sponsored",strDatasheetName) ="S" and DataTable.
Value("DepositoryName",strDatasheetName)="BNY" Then
Call click_Image(strBrowserName,strCUSIPPageName,"UnderlyingSec
urityInfoSponsored")
Else
Call click_Image(strBrowserName,strCUSIPPageName,"UnderlyingSecu
rityInfoNonBNY")
End If
Call SelectValueInsideFrame(strBrowserName,strCUSIPPageName,"lookupFrame",da
taTable.Value("UnderlyingSecurity",strDatasheetName))
If DataTable("DepositoryName",strDatasheetName) ="BNY" and DataTable("Sp
onsored",strDatasheetName)="S"Then
Call click_Image(strBrowserName,strCUSIPPageName,"CommonDeposito
ryInfo")
Call SelectValueInsideFrame(strBrowserName,strCUSIPPageName,"loo
kupFrame",dataTable.Value("CommonDepository",strDatasheetName))
End If
If DataTable("DepositoryName",strDatasheetName)="BNY" and DataTable("Spo
nsored",strDatasheetName)="U" Then
Call click_Image(strBrowserName,strCUSIPPageName,"CommonDeposito
ryUnsponsored")
Call SelectValueInsideFrame(strBrowserName,strCUSIPPageName,"loo
kupFrame",dataTable.Value("CommonDepository",strDatasheetName))
End If
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Fill in the details requir
ed for the new CUSIP","The Details for the new CUSIP are filled as required"
Else
Reporter.ReportEvent micFail,"Fill in the details requir
ed for the new CUSIP","The details for the new CUSIP are not filled as required"
Call captureScreenshot()
' Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log")="False"
End If
Wait(2)
Call Browser("MasterFile").Page("CUSIP Profile").Image("Save").W
aitProperty("visible","True",5)
'Click on save
Environment.Value("TestCase_Log")="True"
Call click_Image(strBrowserName,strCUSIPPageName,"Save")
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(2)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("OK").Click
End If
FlagCUSIP="False"
If Browser("MasterFile").Page("CUSIP Profile").Image("Error").Exist(2) T
hen
FlagCUSIP="True"
End If
If Environment.Value("TestCase_Log")="True" and FlagCUSIP="False" Then
Reporter.ReportEvent micPass,"Click on the save button after fil
ling in the required details","The CUSIP gets saved as required"
Else
Reporter.ReportEvent micFail,"Click on the save button after fil
ling in the required details","The CUSIP does not get saved as required"
Call captureScreenshot()
'Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log")="False"
End If
If DataTable.Value("Type",strDatasheetName) ="BNY" Then
Browser("MasterFile").Page("CUSIP Profile").WebElement("Mgmt Rep
ort").Click
strReportStartDate=get_WebEdit_Value ("MasterFile","CUSIP Profil
e","ReportStartDate")
strShowPreRelease=Browser("MasterFile").Page("CUSIP Profile").Weblist("S
howPreRelease").GetROProperty("Value")
strShowinstitutionalHolders=Browser("MasterFile").Page("CUSIP Profile").
Weblist("ShowinstitutionalHolders").GetROProperty("Value")
If strReportStartDate="Dec 01, 1996" And strShowPreRelease="No"And strSh
owinstitutionalHolders="Yes" Then
Reporter.ReportEvent micPass,"Check whether the Manageme
nt tab in the CUSIP profile screen is working as required","The CUSIP profile ma
nagement tab is working as required"
Else
Reporter.ReportEvent micFail,"Check whether the Manageme
nt tab in the CUSIP profile screen is working as required","The Management tab i
s not correct"
Environment.Value("Execution_Log")="False"
End If
End If

'Click on the DR name


Call Browser("MasterFile").Page("CUSIP Profile").Image("Save").WaitPrope
rty("Visible","True",5)
Environment.Value("TestCase_Log")="True"
Call ClickonDRName("MasterFile","CUSIP Profile",Environment.Value("DRNAM
E"),"2")
If Environment.Value("TestCase_Log")="True" and browser(strBrowserName).
page(strDRPageName).Exist(2) Then
Reporter.ReportEvent micPass,"Click on the DR Name","The DR name
is clicked as required"
Else
Reporter.ReportEvent micFail,"Click on the DR Name","The DR Name
is not clicked as required"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log")="False"
End If
End Function
'===============================================================================
==========================
' Name of the Function : Fill_DR_Documentation()
' Scope of the Function : Public
' Author : Ganesh Viswanathan
' Description : This function is to enter the DR do
cumentation
' Parameters accepted : BrowserName, PageName.
' Parameter returned : Null
' Date and / or Version : 19-1-2009,version 1.0
'===============================================================================
============================
Public Function Fill_DR_Documentation(strBrowserName,strPageName)
Environment.Value("TestCase_Log")="True"

If browser(strBrowserName).page(strPageName).WebElement("Deposit Agreem
ent").Exist(2) and browser(strBrowserName).page(strPageName).WebElement("Letter
Agreement").Exist(2) and browser(strBrowserName).page(strPageName).WebElement("F
ees").exist(2) then
Reporter.ReportEvent micPass,"Check for the DR Documenta
tion page","The DR Documentation page appears as required"
Else
Reporter.ReportEvent micFail,"Check for the DR Documentation pag
e","The DR Documentation page does not appear as required"
Call captureScreenshot()
Environment.Value("TestCase_Log")="False"
Environment.Value("Execution_Log")="False"
End If
'Step27
'Call pageCheck_WebListOR(strBrowserName,strPageName,"voteTypeCd_0;blkTypeCd_0;t
rmnPerdNo_0;dpsvcFeeEffFl_0;depaLglTypeCd_0;dpsvcFeeNetFl_0")
'Call pageCheck_ImageOR(strBrowserName,strPageName,"InvestmentBankInfo;LawFirmBN
YInfo;LawFirmInvestmentBankInfo;LawFirmIssuerInfo;show-calendar;show-calendar_2"
)
Call Select_Combo_Value(strBrowserName,strPageName,"Law Governing Deposi
t Agreement",dataTable.Value("LawGoverningDepositAgreement","DR"))
If DataTable.Value("DepositAgreementDate","DR") <> "" Then
strDataTableValue = DataTable.Value("Dep
ositAgreementDate","DR")
strValue = Split(strDataTableValue,";",-
1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image(strBrowserName,strPageN
ame,"ShowCalendar")
Call ClickIcon_SetDate(strBrowserName,st
rPageName,strMonthValue,strYearValue,strDateValue)
End If

If DataTable.Value("DepositAgreementAmendedDate","DR") <> "" Then


strDataTableValue = DataTable.Value("Dep
ositAgreementAmendedDate","DR")
strValue = Split(strDataTableValue,";",-
1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image(strBrowserName,strPageN
ame,"ShowCalendar_2")
Call ClickIcon_SetDate(strBrowserName,st
rPageName,strMonthValue,strYearValue,strDateValue)
End If

Call Select_Combo_Value(strBrowserName,strPageName,"VotingType",dataTabl
e.Value("VotingType","DR"))
Call Select_Combo_Value(strBrowserName,strPageName,"TerminationPeriod",d
ataTable.Value("TerminationPeriod","DR"))
Call Select_Combo_Value(strBrowserName,strPageName,"BlockingType",dataTa
ble.Value("BlockingType","DR"))
Call Select_Combo_Value(strBrowserName,strPageName,"PreReleaseSideLetter
",dataTable.Value("PreReleaseSideLetter","DR"))
If trim( DataTable.Value("Sponsored","DR")) <> "U" Then
Call Select_Combo_Value(strBrowserName,strPageName,"OperationalChecklist
",dataTable.Value("OperationalChecklist","DR"))
End If
If trim( DataTable.Value("Sponsored","DR")) ="U" Then
Call click_Image(strBrowserName,strPageName,"LawFirmBNYInfoUnspo
nsored")
Else
Call click_Image(strBrowserName,strPageName,"LawFirmBNYInfo")
End If
Call operation_on_FrameObjects_WithName(strBrowserName,strPageName,"look
upFrame","WebEdit","searchString",dataTable.Value("LawFirmBNY","DR"))
Call operation_on_FrameObjects_WithName(strBrowserName,strPageName,"look
upFrame","Image","Go","")
Call SelectValueinFrame(strBrowserName,strPageName,"lookupFrame","Name")
If trim( DataTable.Value("Sponsored","DR")) ="U" Then
Call click_Image(strBrowserName,strPageName,"LawFirmIssuerInfoUn
sponsored")
Else
Call click_Image(strBrowserName,strPageName,"LawFirmIssuerInfo")
End If
Call operation_on_FrameObjects_WithName(strBrowserName,strPageName,"look
upFrame","WebEdit","searchString",dataTable.Value("LawFirmIssuer","DR"))
Call operation_on_FrameObjects_WithName(strBrowserName,strPageName,"look
upFrame","Image","Go","")
Call SelectValueinFrame(strBrowserName,strPageName,"lookupFrame","Name")
If trim( DataTable.Value("Sponsored","DR")) ="U" Then
Call click_Image(strBrowserName,strPageName,"LawFirmInvestmentBa
nkInfoUnsponsored")
Else
Call click_Image(strBrowserName,strPageName,"LawFirmInvestmentBankInfo")
End If
Call operation_on_FrameObjects_WithName(strBrowserName,strPageName,"look
upFrame","WebEdit","searchString",dataTable.Value("LawFirmInvestmentBank","DR"))
Call operation_on_FrameObjects_WithName(strBrowserName,strPageName,"look
upFrame","Image","Go","")
Call SelectValueinFrame(strBrowserName,strPageName,"lookupFrame","Name")
If trim( DataTable.Value("Sponsored","DR")) ="U" Then
Call click_Image(strBrowserName,strPageName,"InvestmentBankInfoU
nsponsored")
Else
Call click_Image(strBrowserName,strPageName,"InvestmentBankInfo")
End If
Call operation_on_FrameObjects_WithName(strBrowserName,strPageName,"look
upFrame","WebEdit","searchString",dataTable.Value("InvestmentBank","DR"))
Call operation_on_FrameObjects_WithName(strBrowserName,strPageName,"look
upFrame","Image","Go","")
Call SelectValueinFrame(strBrowserName,strPageName,"lookupFrame","Name")
Call Select_Combo_Value(strBrowserName,strPageName,"DSF in Deposit agree
ment",dataTable.Value("DSFinDepositAgreement","DR"))
Call Select_Combo_Value(strBrowserName,strPageName,"ChargeDSF",dataTable
.Value("ChargeDSF","DR"))
Call Select_Combo_Value(strBrowserName,strPageName,"NetDSFCashDivident",
dataTable.Value("NetDSFCashDivident","DR"))
Wait(3)
Call click_Image(strBrowserName,strPageName,"Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Check whether the DR documentation
deposit agreement details have been filled or not","The DR Documentation Deposi
t agreement details have been filled as required"
Else
Reporter.ReportEvent micFail,"Check whether the DR Documentation
deposit agreement details have been filled or not","The DR documentation deposi
t agreement details have been filled as required"
'Environment.Value("TestCase_Log")="False"
Environment.Value("Execution_Log")="False"
End If
If trim( DataTable.Value("Sponsored","DR")) <> "U" Then
Wait(3)
'Select the letter agreement tab
Call click_WebElement(strBrowserName,strPageName,"Letter Agreement")
'Select the radio button
If browser(strBrowserName).Page(strPageName).WebRadioGroup("LetterAgreem
ent").Exist(2) Then
Call select_Radiobutton(strBrowserName,strPageName,"LetterAgreem
ent","0")
Else
'Select the add button
Call click_WebButton(strBrowserName,strPageName,"Add")
If Page("Page").WebElement("NewLetterAgreement").Exist(2) Then
Page("Page").WebElement("NewLetterAgreement").Click
End If
'Call select_Radiobutton(strBrowserName,"DR Document Detail","Le
tterAgreement")
End if
Wait(2)
Call pageCheck_WebListOR(strBrowserName,strPageName,"LetterAgreementExpi
ration;Reimbursement Expiration")
If browser(strBrowserName).page(strPageName).WebTable("Letter Agreement").E
xist(2) and browser(strBrowserName).page(strPageName).Image("ShowCalendar_Letter
AgreementDate").Exist(2) Then
Reporter.ReportEvent micPass,"Click on the letter agreement tab"
,"The letter agreement tab opens up as required"
Else
Reporter.ReportEvent micFail,"Click on the letter agreement tab"
,"The letter agreement tab does not appear as required"
' Environment.Value("TestCase_Log")="False"
Environment.Value("Execution_Log")="False"
End If
If dataTable.Value("LetterAgreementDate","DR") <> "" Then
strDataTableValue = DataTable.Value("LetterAgreementDate","DR")
strValue = Split(strDataTableValue,";",-1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image(strBrowserName,strPageName,"ShowCalendar_Letter
AgreementDate")
Call ClickIcon_SetDate(strBrowserName,strPageName,strMonthValue,
strYearValue,strDateValue)
End If
If Browser("MasterFile").Dialog("Microsoft Internet Explorer").Exist(4)
Then
Browser("MasterFile").Dialog("Microsoft Internet Explorer").WinB
utton("OK").Click
End If
Call Select_Combo_Value(strBrowserName,strPageName,"LetterAgreementExpir
ation",dataTable.Value("LetterAgreementExpiration","DR"))
If dataTable.Value("LetterAgreementExpiration","DR") = "Yes" Then
strDataTableValue = DataTable.Value("LetterAgreementExpirationDa
te","DR")
strValue = Split(strDataTableValue,";",-1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image(strBrowserName,strPageName,"ShowCalendar_Letter
ExpirationDate")
Call ClickIcon_SetDate(strBrowserName,strPageName,strMonthValue,
strYearValue,strDateValue)
End If
Call Select_Combo_Value(strBrowserName,strPageName,"Reimbursement Expira
tion",dataTable.Value("ReimbursementExpiration","DR"))
If dataTable.Value("ReimbursementExpiration","DR") ="Yes" Then
strDataTableValue = DataTable.Value("ReimbursementExpirationDate
","DR")
strValue = Split(strDataTableValue,";",-1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image(strBrowserName,strPageName,"ShowCalendar_Reimbu
rsementExpiration")
Call ClickIcon_SetDate(strBrowserName,strPageName,strMonthValue,
strYearValue,strDateValue)
End If
Wait(3)
Environment.Value("TestCase_Log")="True"
Call click_Image(strBrowserName,strPageName,"Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Fill in the details for the letter
agreement tab in DR documentation","The letter agreement tab values are filled
up as required"
Else
Reporter.ReportEvent micFail,"Fill in the details for the letter
agreement tab in DR documentation","The letter agreement tab values are filled
in as required"
Call captureScreenshot()
Environment.Value("TestCase_Log")="False"
Environment.Value("Execution_Log")="False"
End If
Wait(3)
End If
''Setting the values for the Fees tab
Call click_WebElement(strBrowserName,strPageName,"Fees")
Wait(3)
Call click_WebElement(strBrowserName,strPageName,"Fees")
Wait(3)
' Click on Add Button and click on the Image ' info'
Call browser(strBrowserName).Page(strPageName).WebTable("Fees_Table").W
aitProperty("Visible","True",5)
Call click_WebButton(strBrowserName,strPageName,"Add_Fees")
Wait(3)
If DataTable.Value("Sponsored","DR") = "U" Then
Call click_Image(strBrowserName,strPageName,"FeeTypeUnsp
onsored")
Else
Call click_Image(strBrowserName,strPageName,"FeeType")
End If
Wait(3)
'Call Fill_OfferingsTab("MasterFile","DR Profile","Offering Detail")
' Select all the Fees present in the Fee Frame
intRowCount = Browser(strBrowserName).Page(strPageName).Frame("lookupF
rame").WebTable("FeeDescription").RowCount
'MsgBox intRowCount
For intRowCounter = 2 to intRowCount
intRowCounts = Browser(strBrowserName).Page(strPageName).WebT
able("Fees_Table").RowCount
Browser(strBrowserName).Page(strPageName).WebTable("Fees_Tabl
e").ChildItem(intRowCounts,1,"Image","0").Click
intRowCount = Browser(strBrowserName).Page(strPageName).Frame
("lookupFrame").WebTable("FeeDescription").RowCount
If intRowCount = 2 Then
strGetCellData = Browser(strBrowserName).Page(strPageNam
e).Frame("lookupFrame").WebTable("FeeDescription").GetCellData(2,1)
Browser(strBrowserName).Page(strPageName).WebElement("ht
ml tag:=TD","innertext:="& strGetCellData).Click
'Call click_WebButton(strBrowserName,strPageName,"Add_Fe
es")
Exit For
Else
strGetCellData = Browser(strBrowserName).Page(strPageNam
e).Frame("lookupFrame").WebTable("FeeDescription").GetCellData(2,1)
Browser(strBrowserName).Page(strPageName).WebElement("ht
ml tag:=TD","innertext:="& strGetCellData).Click
Call click_WebButton(strBrowserName,strPageName,"Add_Fee
s")
End If
Next
' If the Fee Amount is "NULL", set 0 as the Value in the Field
intFeeRC = Browser(strBrowserName).Page(strPageName).WebTable(
"Fees_Table").RowCount
For intCount =3 to intFeeRC
strCellData = Browser(strBrowserName).Page(strPageNam
e).WebTable("Fees_Table").ChildItem(intCount,2,"WebEdit","0").GetROProperty("val
ue")
If strCellData = "" Then
Browser(strBrowserName).Page(strPageName).WebTab
le("Fees_Table").ChildItem(intCount,2,"WebEdit","0").Set "0"
End If
Next
Environment.Value("TestCase_Log")="True"
Call click_Image(strBrowserName,strPageName,"Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Click on the Fees tab and
fill in the details and click on save","The details of the fees are filled and s
aved as required"
Else
Reporter.ReportEvent micFail,"Click on the Fees tab and
fill in the details and click on save","The details are not filled properly"
Call captureScreenshot()
Environment.Value("TestCase_Log")="False"
Environment.Value("Execution_Log")="False"
End If
Wait(2)
If browser(strBrowserName).Dialog("Microsoft Internet Explorer")
.Exist(2) Then
Reporter.ReportEvent micPass,"Check whether the microsof
t internet explorer pop-up comes up or not","The pop-up appears as required"
browser(strBrowserName).Dialog("Microsoft Internet Explo
rer").WinButton("Cancel").Click
End if
wait(5)
' If browser(strBrowserName).Page(strPageName).WebElement("IssuerProfile"
).Exist(2) Then
' browser(strBrowserName).page(strPageName).WebElement("IssuerProf
ile").click
' End If
'Click on the DR NAME
Call ClickonDRName(strBrowserName,strPageName,Environment.Value("DRNAME"
),"2")

If browser(strBrowserName).Dialog("Microsoft Internet Explorer").Exist(2


) Then
Reporter.ReportEvent micPass,"Check whether the microsoft intern
et explorer pop-up comes up or not","The pop-up appears as required"
browser(strBrowserName).Dialog("Microsoft Internet Explorer").Wi
nButton("Cancel").Click
end if
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Fill in the DR documentation detai
ls and click on save","The DR documentation details are filled as required"
Else
Reporter.ReportEvent micFail,"Fill in the DR documentation detai
ls and click on save","The DR documentation details are filled as required"
Call captureScreenshot()
Environment.Value("TestCase_Log")="False"
Environment.Value("Execution_Log")="False"
End If
End function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++
'===============================================================================
==========================
' Name of the Function : ClickonDRName()
' Scope of the Function : Public
' Author : Ganesh Viswanathan
' Description : This function is to eclick on the r
equired DR link in the screen
' Parameters accepted : BrowserName, PageName.
' Parameter returned : Null
' Date and / or Version : 19-1-2009,version 1.0
'===============================================================================
============================

Public function ClickonDRName(strBrowserName,strPageName,strDrName,intPos)


Dim intCount
intCount=0
Wait(4)
Set oDesc = Description.Create()
oDesc("micclass").Value = "WebElement"
oDesc("html tag").Value = "TD"
oDesc("class").Value = "tabSelected"
set x=Browser(strBrowserName).Page(strPageName).ChildObjects(oDesc)
For i=0 to x.count -1
intCount=intCount+1
y= x(i).GetROProperty("innertext")
'msgbox y
If trim(y)=trim(strDrName) Then
x(i).Click
End If
Next
Set oDesc=nothing
Wait(3)
End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++
'===============================================================================
==========================
' Name of the Function : Fill_Issuer_Documentation()
' Scope of the Function : Public
' Author : Ganesh Viswanathan
' Description : This function is to enter the issue
r documentation
' Parameters accepted : BrowserName, PageName,datasheetname
' Parameter returned : Null
' Date and / or Version : 19-1-2009,version 1.0
'===============================================================================
============================

Public Function Fill_Issuer_Documentation(strBrowserName,strPageName,strDatashee


tName)
Call click_WebElement(strBrowserName,strPageName,"BCP/PAF")
If Browser(strBrowserName).Page(strPageName).Exist(2) then
Reporter.ReportEvent micPass," Issuer Documentation screen should
be displayed.","The Issuer Documentation screen is displayed."
Else
Reporter.ReportEvent micFail," Issuer Documentat
ion screen should be displayed.","The Issuer Documentation screen is not display
ed."
Environment.Value("TestCase_Log")="False"
Environment.Value("Execution_Log")="False"
End If
'Filling the details of the BCP/PAF tab
Call Select_Combo_Value(strBrowserName,strPageName,"Approved",dataTable.Value("A
pproved",strDatasheetName))

If DataTable.Value("ApprovalDate",strDatasheetName) <> "" Then


strDataTableValue = DataTable.Value("ApprovalDat
e",strDatasheetName)
strValue = Split(strDataTableValue,";",-1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image(strBrowserName,strPageName,"ShowCalendar_Approv
alDate")
Call ClickIcon_SetDate(strBrowserName,strPageNam
e,strMonthValue,strYearValue,strDateValue)
End If
If DataTable.Value( "PeriodicReviewDate",strDatasheetName)<> "" Then
strDataTableValue = DataTable.Value("PeriodicRev
iewDate",strDatasheetName)
strValue = Split(strDataTableValue,";",-1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image(strBrowserName,strPageName,"ShowCalendar_Period
icReviewDate")
Call ClickIcon_SetDate(strBrowserName,strPageNam
e,strMonthValue,strYearValue,strDateValue)
End If

Call click_Image(strBrowserName,strPageName,"infoDivisionApprovedBy")
Call SelectValueInsideFrame(strBrowserName,strPageName,"lookupFrame",dataTable.V
alue("DivisionName",strDatasheetName))
Call Select_Combo_Value(strBrowserName,strPageName,"CAP Required",dataTable.Valu
e("CAPRequired",strDatasheetName))

'Step #17
'Call selectTab("MasterFile","Issuer Documentation"," SEC Filin
g and MAL/FOL")
Call click_WebElement(strBrowserName,strPageName,"SEC Filing and
MAL/FOL")
If DataTable("RestrictionType",strDatasheetName) <> "" Then
Environment.Value("TestCase_Log")="True"
Call click_WebButton(strBrowserName,strPageName,"Add")
End if
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Checking the Field
s in SEC Filing and MAL/FOL Tab.","Expected Fields in SEC Filing and MAL/FOL Tab
are displayed"
Else
Reporter.ReportEvent micFail,"Checking the Field
s in SEC Filing and MAL/FOL Tab.","Expected Fields in SEC Filing and MAL/FOL Tab
are not displayed"
'Environment.Value("TestCase_Log")="False"
Environment.Value("Execution_Log")="False"
End If
'Step #18
Call FillSECFilingAndMAL_FOLTab(strBrowserName,strPageName,strDa
tasheetName)
Call click_Image(strBrowserName,strPageName,"Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass," Entering the Issu
er Documentation and Saving it.","Details in SECFilingAndMAL_FOL Tab has been En
tered"
Else
Reporter.ReportEvent micFail,": Entering the Iss
uer Documentation and Saving it.","Details in SECFilingAndMAL_FOL Tab has not be
en Entered"
Environment.Value("TestCase_Log")="False"
Environment.Value("Execution_Log")="False"
End If
wait(2)
call browser(strBrowserName).Dialog("Microsoft Internet Explorer
").WaitProperty("Visible","True","5")
If browser(strBrowserName).Dialog("Microsoft Internet Explorer")
.Exist(2) Then
browser(strBrowserName).Dialog("Microsoft Internet Explo
rer").WinButton("Cancel").Click
End If
'Call ClickonDRName(strBrowserName,strPageName,Environment.Value("DRNAME"),"")

End function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++
'===============================================================================
==========================
' Name of the Function : FillSECFilingAndMAL_FOLTab()
' Scope of the Function : Public
' Author : Ganesh Viswanathan
' Description : Check and fill the fileds available
in the FillSECFilingAndMAL_FOLTab
' Parameters accepted : BrowserName, PageName.
' Parameter returned : Null
' Date and / or Version : 19-1-2009,version 1.0
'===============================================================================
============================

Public Function FillSECFilingAndMAL_FOLTab(strBrowserName,strPageName,strDatashe


etName)
If DataTable("NonUSGovernment",strDatasheetName) <> "" Then
Call set_WebEdit_Value(strBrowserName,strPageNam
e,"Non-US govtID",DataTable("NonUSGovernment",strDatasheetName))
End If
If DataTable("SECFiling_20FFiler",strDatasheetName) <> "" Then
Call select_Combo_Value(strBrowserName,strPageNa
me,"20F Filer",DataTable("SECFiling_20FFiler",strDatasheetName))
End If
If DataTable("SECFiling_12gFiler",strDatasheetName) <> "" Then
Call select_Combo_Value(strBrowserName,strPageNa
me,"sec12g3 Filer",DataTable("SECFiling_12gFiler",strDatasheetName))
End If
If DataTable("SEC12g_FilerValue",strDatasheetName)<> "" and Data
Table("SECFiling_12gFiler",strDatasheetName) ="Yes" Then
Call set_WebEdit_Value(strBrowserName,strPageName,"12g3"
,dataTable.Value("SEC12g_FilerValue",strDatasheetName))
Else
Call set_WebEdit_Value(strBrowserName,strPageName,"12g3"
,"")
End If
If DataTable("CCCCode",strDatasheetName) <> "" Then
Call set_WebEdit_Value(strBrowserName,strPageNam
e,"CCCCode",DataTable("CCCCode",strDatasheetName))
End If
If DataTable("OnWebsite",strDatasheetName) <> "" Then
Call select_Combo_Value(strBrowserName,strPageNa
me,"OnWebsite",DataTable("OnWebsite",strDatasheetName))
End If
If DataTable("RestrictionType",strDatasheetName) <> "" Then
Call select_Combo_Value(strBrowserName,strPageNa
me,"RestrictionType",DataTable("RestrictionType",strDatasheetName))
End If
If DataTable("Limit",strDatasheetName) <> "" Then
Call set_WebEdit_Value(strBrowserName,strPageNam
e,"Limit",DataTable("Limit",strDatasheetName))
End If
If DataTable("Comments",strDatasheetName) <> "" Then
Call set_WebEdit_Value(strBrowserName,strPageNam
e,"Comments",DataTable("Comments",strDatasheetName))
End If
If DataTable("AmendedDate",strDatasheetName) <> "" Then
strDataTableValue = DataTable.Value("AmendedDate
",strDatasheetName)
strValue = Split(strDataTableValue,";",-1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image(strBrowserName,strPageName,"Ame
ndedDate")
Call ClickIcon_SetDate(strBrowserName,strPageNam
e,strMonthValue,strYearValue,strDateValue)
strFinalValue = Browser(strBrowserName).Page(str
PageName).WebEdit("AmendedDate").GetROProperty("value")
If strIntialValue <> strFinalValue Then
Reporter.ReportEvent micPass,"Ve
rifying the Date Field is Editable or not ", "The Date Feild AmendedDate is Edit
able"
Else
Reporter.ReportEvent micFail,"Ve
rifying the Date Field is Editable or not ", "The Date Feild AmendedDate is not
Editable"
'CaptureScreenshot
Environment.Value("Execution_Log
")="False"
Environment.Value("TestCase_Log"
)="False"
End If
End If
'Call click_Image(strBrowserName,strPageName,"Save")
End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++

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

'===============================================================================
===================================================
' Name of the Function : ApprovalFunction_CreateNewDR
' Scope of the Function : Public
' Author : Shyam H D(Modified by ganesh Viswanathan
' 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_CreateNewDR("MasterFile"
,"CUSIP Profile","Name;CUSIP;Last User Updated;Last Updated",DataTable.Value("CU
SIPName","CUSIP"),"Approved")
'===============================================================================
===================================================

Public Function ApprovalFunction_CreateNewDR(strAppElementName,strModuleName, st


rModuleTableColumnName,strElementName,strApprovalComment,strApproveCondition,str
ApprovalStatus)
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"
Call captureScreenshot()
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
Call captureScreenshot()
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"
Call captureScreenshot()
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
Exit Function
End If
Environment.Value("TestCase_Log")="True"
Wait(5)
'Browser("MasterFile").Page("Approval Queue Item Search").Image(
"LastUpdatedFrom").Click
'Wait(2)
LastUpdatedFromDate= IncrementDate("-2",date)
If LastUpdatedFromDate <> "" Then
strDataTableValue = LastUpdatedFromDate
strValue = Split(strDataTableValue,";",-1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image("MasterFile","Approval Queue It
em Search","LastUpdatedFrom")
Call ClickIcon_SetDate("MasterFile","Approval Qu
eue Item Search",strMonthValue,strYearValue,strDateValue)
End If
'Browser("MasterFile").Page("Approval Queue Item Search").Frame(
"PopCalFrame").WebElement("Today").Click
Wait(2)
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"
Call captureScreenshot()
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
Next
' Selecting the Required Element in the Table
Call SelectValueinTable("MasterFile","Approval Queue Item Search
","Name",strElementName)
' 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 Brow
ser("MasterFile").Page("Approval Queue Item").Image("Save").Exist(3) And (strMod
uleName = "DR Profile" or strModuleName = "DR Documentation") Then
Call ApprovalQueue_SelectRadioButton("MasterFile","Approval Queue Item","BTCE")
Call click_Image("MasterFile","Approval Queue Item","Save")
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"
Call captureScreenshot()
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
Call logoutfromApp("MasterFile","Approval Queue Item")
Exit Function
End If
' Verify
if the Approved CUSIP is Present or NOT
'Call ch
kAppRejElementName(strElementName,strApproveCondition,strApprovalStatus)
' Checki
ng for the Nubmber of Items
Browser(
"MasterFile").Page("Approval Queue Item 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"
Call captureScreenshot()
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"
Call captureScreenshot()
'Environment.Value("TestCase_Log") = "False"
'Environment.Value("Execution_Log") = "False"
End If
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"
Call captureScreenshot()
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)
End Select
Call Select_Menu("MasterFile","Approval Queue Item Search","Home
;DR Home")
End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++
'===============================================================================
===================================================
' Name of the Function : pageCheck_ApprovalQueue
' Scope of the Function : Public
' Author : Shyam H D(Modified by Ganesh Viswanathan)
' Description : This function is Used to Check check for the F
ields present in the Approval Queue Item Search after selecting the Module
' Parameters accepted : Module name
' Parameter returned : Null
' Date and / or Version : 20-10-2008,version 1.0
' Call Statement : 'Call pageCheck_ApprovalQueue("CUSIP Profile"
)
'===============================================================================
===================================================
Public Function pageCheck_ApprovalQueue(strModuleName,strApprovalStatus)
Select Case strModuleName
Case "Books Closed/Open"
Call pageCheck_W
ebEditOR("MasterFile","Approval Queue Item Search","LastUpdatedTo;LastUpdatedFro
m")
Call pageCheck_W
ebListOR("MasterFile","Approval Queue Item Search","ApprovalType;ApprovalReason;
LastUserUpdated;ApprovalStatus;Books_CUSIP;Books_CUSIPName")
Call select_Comb
o_Value("MasterFile","Approval Queue Item Search","ApprovalStatus","Pending Appr
oval")
Call Click_Image
("MasterFile","Approval Queue Item Search","Search")
'Wait till the T
able Loads
Call ReportLoadW
ait("MasterFile","Approval Queue Item Search","Name","CUSIP Name")
Case "CUSIP Profile"
' Call pageCheck_W
ebEditOR("MasterFile","Approval Queue Item Search","LastUpdatedTo;LastUpdatedFro
m")
' Call pageCheck_W
ebListOR("MasterFile","Approval Queue Item Search","ApprovalType;ApprovalReason;
LastUserUpdated;ApprovalStatus;CUSIP_CUSIP;CUSIP_Name")
Call select_Comb
o_Value("MasterFile","Approval Queue Item Search","ApprovalStatus","Pending Appr
oval")
Call Click_Image
("MasterFile","Approval Queue Item Search","Search")
'Wait till the T
able Loads
Call ReportLoadW
ait("MasterFile","Approval Queue Item Search","Name","Name")
Case "Issuer Billing Profile"
Call pageCheck_W
ebEditOR("MasterFile","Approval Queue Item Search","LastUpdatedTo;LastUpdatedFro
m")
Call pageCheck_W
ebListOR("MasterFile","Approval Queue Item Search","ApprovalType;ApprovalReason;
LastUserUpdated;ProfileName;ApprovalStatus;NameExt")
Call BillingAppr
ovalSearch("MasterFile","Approval Queue Item Search",DataTable.Value("IssuerName
","Billing"))
Case "DR Profile"
'Call pageCheck_
WebEditOR("MasterFile","Approval Queue Item Search","LastUpdatedTo;LastUpdatedFr
om")
'Call pageCheck_
WebListOR("MasterFile","Approval Queue Item Search","ApprovalType;ApprovalReason
;LastUserUpdated;S/U;DRName;Structure;ApprovalStatus;Type;Origin;Depositary")
Call select_Comb
o_Value("MasterFile","Approval Queue Item Search","ApprovalStatus","Pending Appr
oval")
Call Click_Image
("MasterFile","Approval Queue Item Search","Search")
'Wait till the T
able Loads
Call ReportLoadW
ait("MasterFile","Approval Queue Item Search","Name","Name")
Case "Issuer"
Call pageCheck_W
ebEditOR("MasterFile","Approval Queue Item Search","LastUpdatedTo;LastUpdatedFro
m")
Call pageCheck_W
ebListOR("MasterFile","Approval Queue Item Search","ApprovalType;ApprovalReason;
LastUserUpdated;IssuerName;ApprovalStatus")
Call select_Comb
o_Value("MasterFile","Approval Queue Item Search","ApprovalStatus","Pending Appr
oval")
Call Click_Image
("MasterFile","Approval Queue Item Search","Search")
'Wait till the T
able Loads
Call ReportLoadW
ait("MasterFile","Approval Queue Item Search","Name","Name")
Case "Issuer Documentation"
' Call pageCheck_W
ebEditOR("MasterFile","Approval Queue Item Search","LastUpdatedTo;LastUpdatedFro
m")
' Call pageCheck_W
ebListOR("MasterFile","Approval Queue Item Search","ApprovalType;ApprovalReason;
LastUserUpdated;Issuer;ApprovalStatus")
Call select_Comb
o_Value("MasterFile","Approval Queue Item Search","ApprovalStatus","Pending Appr
oval")
Call Click_Image
("MasterFile","Approval Queue Item Search","Search")
'Wait till the T
able Loads
Call ReportLoadW
ait("MasterFile","Approval Queue Item Search","Name","Issuer")
Case "DR Documentation"
'Call pageCheck_
WebEditOR("MasterFile","Approval Queue Item Search","LastUpdatedTo;LastUpdatedFr
om")
'Call pageCheck
_WebListOR("MasterFile","Approval Queue Item Search","ApprovalType;ApprovalReaso
n;LastUserUpdated;Issuer;ApprovalStatus")
Call select_Com
bo_Value("MasterFile","Approval Queue Item Search","ApprovalStatus","Pending App
roval")
Call Click_Imag
e("MasterFile","Approval Queue Item Search","Search")
Case "Offering Detail"
Call select_Comb
o_Value("MasterFile","Approval Queue Item Search","ApprovalStatus","Pending Appr
oval")
Call Click_Image
("MasterFile","Approval Queue Item Search","Search")
Call ReportLoadW
ait("MasterFile","Approval Queue Item Search","Name","DR Name")
End Select
End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
'===============================================================================
==========================
' Name of the Function : pageCheck_CompanyProfile()
' Scope of the Function : Public
' Author : Bhagya Rekha(Modified by Ganesh Viswanathan)
' Description : This function is to Check Fields in different Tabs and
in different Pages in Company.
' Parameters accepted : BrowserName,PageName,
' Parameter returned : Null
' Date and / or Version : 28-10-2008,version 1.0
' Call Statement : Call pageCheck_CompanyProfile("MasterFile", "Adviser Profi
le","Details")
'===============================================================================
============================
Public Function pageCheck_CompanyProfile(strBrowserName, strPageName, strTabName
)
Select Case strPageName
Case "Adviser Profile"
Select Case strTabName
Case "Details"
Call pageCheck_WebEditORCompany(strBrowserName,strPageName,"Details_Na
me;Details_MarketingName;Details_GroupEmailAddress;Details_WebAddress")
Call pageCheck_WebListORCompany(strBrowserName,strPageName,"Details_St
atus;Details_CountryOfIncorporation")
Case "Roles"
Call pageCheck_WebListORCompany(strBrows
erName,strPageName,"Roles_Role;Roles_Status")
Call pageCheck_WebButton(strBrowserName,strPageName,"Add","")
Case "Products"
Call pageCheck_WebEditORCompany(strBrows
erName,strPageName,"Products_SubscriptionID")
Call pageCheck_WebListORCompany(strBrowserName,strPageName,"Products_P
roduct")
Call pageCheck_WebButton(strBrowserName,strPageName,"Add","")
Call pageCheck_ImageOR(strBrowserName,strPageName,"Related Profiles;Co
ntact Roles;Preview Profile;Delete Profile;Save Profile")
Case "Comments"
Call pageCheck_WebEditORCompany(strBrowserName,strPageName,"Comments_C
omment")
Call pageCheck_ImageOR(strBrowserName,strPageName,"Related Profiles;Co
ntact Roles;Preview Profile;Delete Profile;Save Profile")
End Select
Case "Broker Profile"
Select Case strTabName
Case "Details"
Call pageCheck_WebEditORCompany(strBrowserName,strPageName,"Details_Na
me;Details_MarketingName;Details_GroupEmailAddress;Details_WebAddress")
Call pageCheck_WebEditOR(strBrowserName,strPageName,"Details_Branch;De
tails_FeePaymentMethod;Details_Mnemonic;Details_StandingInstructions;Details_SWI
FT(BIC)")
Call pageCheck_WebListORCompany(strBrowserName,strPageName,"Details_St
atus;Details_CountryOfIncorporation")
Case "BNY Contact"
Call pageCheck_WebButton(strBrowserName,
strPageName,"Add","")
Call pageCheck_WebEditOR(strBrowserName,strPageName,"BNYContacts_NonUS
Location")
Call click_Image(strBrowserName,strPageName,"i_Button")
Call chkI_ButtonHeader(strBrowserName,strPageName,"lookupFrame","Email
Address","ChkI_ButtonFrame")
Case "Roles"
Call pageCheck_WebListORCompany(strBrows
erName,strPageName,"Roles_Role;Roles_Status")
Call select_Combo_Value(strBrowserName,strPageName,"Roles_Role","Settl
ement")
Call pageCheck_WebEditOR(strBrowserName,strPageName,"Role_DTC Reason;R
ole_ContractExpDate")
Call select_Combo_Value(strBrowserName,strPageName,"Roles_Role","Pre-R
elease")
Call pageCheck_WebEditOR(strBrowserName,strPageName,"Role_DTC Reason;R
ole_ContractExpDate;Role_MarkCollateralMethod;Role_CollateralBoxRate")
Call pageCheck_WebCheckbox(strBrowserName,strPageName,"brkCollReqFl","
")
Call pageCheck_WebButton(strBrowserName,strPageName,"Add","")
Case "Products"
Call pageCheck_WebEditORCompany(strBrows
erName,strPageName,"Products_SubscriptionID")
Call pageCheck_WebListORCompany(strBrowserName,strPageName,"Products_P
roduct")
Call pageCheck_WebButton(strBrowserName,strPageName,"Add","")
Call pageCheck_ImageOR(strBrowserName,strPageName,"Related Profiles;Co
ntact Roles;Preview Profile;Delete Profile;Save Profile")
Case "Comments"
Call pageCheck_WebEditORCompany(strBrowserName,strPageName,"Comments_C
omment")
Call pageCheck_ImageOR(strBrowserName,strPageName,"Related Profiles;Co
ntact Roles;Preview Profile;Delete Profile;Save Profile")
End Select
Case "Custodian Profile"
Select Case strTabName
Case "Details"
Call pageCheck_WebEditORCompany(strBrowserName,strPageName,"Details_Na
me;Details_MarketingName;Details_GroupEmailAddress;Details_WebAddress")
Call pageCheck_WebListORCompany(strBrowserName,strPageName,"Details_St
atus;Details_CountryOfIncorporation")
Case "Roles"
Call pageCheck_WebListORCompany(strBrows
erName,strPageName,"Roles_Role;Roles_Status")
Call pageCheck_WebButton(strBrowserName,strPageName,"Add","")
Case "Products"
Call pageCheck_WebEditORCompany(strBrows
erName,strPageName,"Products_SubscriptionID")
Call pageCheck_WebListORCompany(strBrowserName,strPageName,"Products_P
roduct")
Call pageCheck_WebButton(strBrowserName,strPageName,"Add","")
Call pageCheck_ImageOR(strBrowserName,strPageName,"Related Profiles;Co
ntact Roles;Preview Profile;Delete Profile;Save Profile")
Case "Comments"
Call pageCheck_WebEditORCompany(strBrowserName,strPageName,"Comments_C
omment")
Call pageCheck_ImageOR(strBrowserName,strPageName,"Related Profiles;Co
ntact Roles;Preview Profile;Delete Profile;Save Profile")
End Select
Case "Depositary Profile"
Select Case strTabName
Case "Details"
Call pageCheck_WebEditORCompany(strBrowserName,strPageName,"Details_Na
me;Details_MarketingName;Details_GroupEmailAddress;Details_WebAddress;Details_Co
mpanyCode")
Call pageCheck_WebListORCompany(strBrowserName,strPageName,"Details_St
atus;Details_CountryOfIncorporation")
Case "Roles"
Call pageCheck_WebListORCompany(strBrows
erName,strPageName,"Roles_Role;Roles_Status;Roles_ReconciliationFrequency")
Call pageCheck_WebEditORCompany(strBrowserName,strPageName,"Roles_Depa
rtmentName")
Call pageCheck_WebButton(strBrowserName,strPageName,"Add","")
Case "Products"
Call pageCheck_WebEditORCompany(strBrows
erName,strPageName,"Products_SubscriptionID")
Call pageCheck_WebListORCompany(strBrowserName,strPageName,"Products_P
roduct")
Call pageCheck_WebButton(strBrowserName,strPageName,"Add","")
Call pageCheck_ImageOR(strBrowserName,strPageName,"Related Profiles;Co
ntact Roles;Preview Profile;Delete Profile;Save Profile")
Case "Comments"
Call pageCheck_WebEditORCompany(strBrowserName,strPageName,"Comments_C
omment")
Call pageCheck_ImageOR(strBrowserName,strPageName,"Related Profiles;Co
ntact Roles;Preview Profile;Delete Profile;Save Profile")
End Select
Case "Issuer Profile"
Select Case strTabName
Case "Details"
Call pageCheck_WebEditORCompany(strBrowserName,strPageName,"Details_Na
me;Details_MarketingName;Details_GroupEmailAddress;Details_WebAddress;Details_Go
vernmentOwned;Details_MarketCapitalization")
Call pageCheck_WebEditOR(strBrowserName,strPageName,"Details_Status;De
tails_EffectiveDate;Details_TerminationDate;Details_EffectiveDepositaries;Detail
s_EffectiveS/U")
Call pageCheck_WebListORCompany(strBrowserName,strPageName,"Details_Co
untryOfManagement;Details_CountryOfIncorporation;Details_DividendCurrency;Detail
s_Industry;Details_StandingCashInstructions")
Case "BNY Contact"
Call pageCheck_WebButton(strBrowserName,
strPageName,"Add","")
Call pageCheck_WebEditOR(strBrowserName,strPageName,"BNYContacts_NonUS
Location")
Call click_Image(strBrowserName,strPageName,"i_Button")
Call chkI_ButtonHeader(strBrowserName,strPageName,"lookupFrame","Email
Address","ChkI_ButtonFrame")
Call pageCheck_ImageOR(strBrowserName,strPageName,"Save Profile")
Case "UnderlyingSecurityMarket"
Call pageCheck_WebListORCompany(strBrows
erName,strPageName,"UnderlyingSecurityMarket_Country;UnderlyingSecurityMarket_Ma
rketStatus")
Call pageCheck_WebRadioGroupOR("MasterFile","Issuer Profile","Underlyi
ngSecurityMarket_HomeMarket")
Call pageCheck_WebButton(strBrowserName,strPageName,"Add","")
Case "Custodians"
Call pageCheck_WebEditOR(strBrowserName,
strPageName,"Custodians_Country;Custodians_Mnemonic")
Case "Advisers"
'Call pageCheck_WebListORCompany(strBrow
serName,strPageName,"Advisers_Type")
Call pageCheck_WebButton(strBrowserName,strPageName,"Add","")
Call pageCheck_ImageOR(strBrowserName,strPageName,"Save Profile")
Case "Products"
Call pageCheck_WebEditORCompany(strBrows
erName,strPageName,"Products_SubscriptionID")
Call pageCheck_WebListORCompany(strBrowserName,strPageName,"Products_P
roduct")
Call pageCheck_WebButton(strBrowserName,strPageName,"Add","")
Call pageCheck_ImageOR(strBrowserName,strPageName,"Related Profiles;Co
ntact Roles;Preview Profile;Delete Profile;Save Profile")
Case "DR Services"
'Call pageCheck_WebListORCompany(strBrow
serName,strPageName,"DRServices_DRService")
'Call pageCheck_WebButton(strBrowserName,strPageName,"Add","")
Call pageCheck_ImageOR(strBrowserName,strPageName,"Save Profile")
Case "Comments"
Call pageCheck_WebEditORCompany(strBrowserName,strPageName,"Comments_C
omment;Comments_AppointmentsSignificance")
Call pageCheck_WebEditOR(strBrowserName,strPageName,"Comments_Business
ProfileMergent")
Call pageCheck_ImageOR(strBrowserName,strPageName,"Related Profiles;Co
ntact Roles;Preview Profile;Delete Profile;Save Profile")
End Select
Case "Subcompany Profile"
Select Case strTabName
Case "Subcompany"
Call pageCheck_WebEditORCompany(strBrowserName,strPageName,"Subcompany
_Name;Subcompany_MarketingName;Subcompany_GroupEmailAddress;Subcompany_WebAddres
s")
Call pageCheck_WebListORCompany(strBrowserName,strPageName,"Subcompany
_Status;Subcompany_CountryOfIncorporation")
Call pageCheck_WebEditOR(strBrowserName,strPageName,"Subcompany_Parent
Company")
Case "Products"
Call pageCheck_WebEditORCompany(strBrows
erName,strPageName,"Products_SubscriptionID")
Call pageCheck_WebListORCompany(strBrowserName,strPageName,"Products_P
roduct")
Call pageCheck_WebButton(strBrowserName,strPageName,"Add","")
Call pageCheck_ImageOR(strBrowserName,strPageName,"Related Profiles;Co
ntact Roles;Preview Profile;Delete Profile;Save Profile")
Case "Comments"
Call pageCheck_WebEditORCompany(strBrowserName,strPageName,"Comments_C
omment")
Call pageCheck_ImageOR(strBrowserName,strPageName,"Related Profiles;Co
ntact Roles;Preview Profile;Delete Profile;Save Profile")
End Select
Case "Vendor Profile"
Select Case strTabName
Case "Details"
Call pageCheck_WebEditORCompany(strBrowserName,strPageName,"Details_Na
me;Details_MarketingName;Details_GroupEmailAddress;Details_WebAddress;Details_Se
rviceDescription;Details_BudgetAmount($);Details_AlternativeVendor")
Call pageCheck_WebListORCompany(strBrows
erName,strPageName,"Details_Status;Details_CountryOfIncorporation;Details_Type")

Case "BNY Contact"


Call pageCheck_WebButton(strBrowserName,
strPageName,"Add","")
Call pageCheck_WebEditOR(strBrowserName,strPageName,"BNYContacts_NonUS
Location")
Call click_Image(strBrowserName,strPageName,"i_Button")
Call chkI_ButtonHeader(strBrowserName,strPageName,"lookupFrame","Email
Address","ChkI_ButtonFrame")
Case "Products"
Call pageCheck_WebEditORCompany(strBrows
erName,strPageName,"Products_SubscriptionID")
Call pageCheck_WebListORCompany(strBrowserName,strPageName,"Products_P
roduct")
Call pageCheck_WebButton(strBrowserName,strPageName,"Add","")
Call pageCheck_ImageOR(strBrowserName,strPageName,"Related Profiles;Co
ntact Roles;Preview Profile;Delete Profile;Save Profile")
Case "Comments"
Call pageCheck_WebEditORCompany(strBrowserName,strPageName,"Comments_C
omment")
Call pageCheck_ImageOR(strBrowserName,strPageName,"Related Profiles;Co
ntact Roles;Preview Profile;Delete Profile;Save Profile")
End Select
Case "Initial Depositor Profile"
Select Case strTabName
Case "Details"
Call pageCheck_WebEditORCompany(strBrowserName,strPageName,"Details_Na
me;Details_MarketingName;Details_GroupEmailAddress;Details_WebAddress")
Call pageCheck_WebEditOR(strBrowserName,strPageName,"Details_Status;De
tails_CountryOfIncorporation;Details_TerminationDate;Details_EffectiveDate")
Call GetMultipleValue_WebEdit(strBrowserName,strPageName,"Details_Stat
us;Details_CountryOfIncorporation;Details_EffectiveDate")
Case "BNY Contact"
Call pageCheck_WebButton(strBrowserName,
strPageName,"Add","")
Call pageCheck_WebEditOR(strBrowserName,strPageName,"BNYContacts_Role;
BNYContacts_NonUSLocation")
Call click_Image(strBrowserName,strPageName,"i_Button")
Call chkI_ButtonHeader(strBrowserName,strPageName,"lookupFrame","Custo
dians","ChkI_ButtonFrame")
Call pageCheck_FilledValues(strBrowserName,strPageName,"BNY Contacts",
"WebEdit",1)
Call pageCheck_FilledValues(strBrowserName,strPageName,"BNY Contacts",
"WebEdit",6)
Case "Custodians"
Call pageCheck_WebButton(strBrowserName,
strPageName,"Add","")
Call pageCheck_WebEditOR(strBrowserName,strPageName,"Custodians_Countr
y;Custodians_Mnemonic;Custodians_Custodian")
Call pageCheck_FilledValues(strBrowserName,strPageName,"Custodians","W
ebEdit",1)
Call pageCheck_FilledValues(strBrowserName,strPageName,"Custodians","W
ebEdit",2)
Call pageCheck_FilledValues(strBrowserName,strPageName,"Custodians","W
ebEdit",3)
Call pageCheck_ImageOR(strBrowserName,strPageName,"Related Profiles;Co
ntact Roles;Preview Profile;Save Profile;Profile Audit")
Case "Advisers"
Call pageCheck_FilledValues(strBrowserNa
me,strPageName,"Advisers","WebEdit",1)
Call pageCheck_FilledValues(strBrowserName,strPageName,"Advisers","Web
Edit",2)
Call pageCheck_WebEditOR(strBrowserName,strPageName,"Advisers_Type;Adv
isers_Name")
Call pageCheck_WebButton(strBrowserName,strPageName,"Add","")
Call pageCheck_ImageOR(strBrowserName,strPageName,"Save Profile")
Case "Comments"
Call pageCheck_WebEditORCompany(strBrowserName,strPageName,"Comments_C
omment")
Call pageCheck_ImageOR(strBrowserName,strPageName,"Related Profiles;Co
ntact Roles;Preview Profile;Save Profile")
End Select
Case "Issuer Documentation"
Select Case strTabName
Case "BCP/PAF"
Call pageCheck_WebEditOR(strBrowserName,strPageName,"BCPPAF_ApprovalDa
te;BCP_PeriodicReviewDate;PAF_Date;BCPPAF_DivisionApproved;CAP_Date;ACAP_Date")
Call pageCheck_WebListOR(strBrowserName,strPageName,"BCPPAF_Approval;B
CPPAF_Required;CAP_Type;ACAP_Type")
Case "SEC Filing and MAL/FOL"
Call pageCheck_WebEditOR(strBrowserName,
strPageName,"NonUSGovernment;12g_#;CCCCode;CIKCode;MAL_FOL;DRsAllowed;LastDateAm
ended;RestrictionType;ReportableMAL_FOLPercentUsed;ReportableMAL_FOLAvailable;Cu
rrentMAL_FOLPercentUsed;CurrentMAL_FOLAvailable;Limit;AmendedDate;Comments")
Call pageCheck_WebListOR(strBrowserName,strPageName,"20FFiler;12gFiler
;OnWebSite;RestrictionType")
End Select
End Select
End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++
'===============================================================================
==========================
' Name of the Function : IncrementDate()
' Scope of the Function : Public
' Author : Ganesh Viswanathan
' Description : This function is to increment the d
ate
' Parameters accepted : Days and Date
' Parameter returned : Incremented date
' Date and / or Version : 27-2-2009,version 1.0
'===============================================================================
============================
Public Function IncrementDate(intDays,strAppDate)
strIncDate = DateAdd("d",intDays,strAppDate)
strRequiredDate = Split(strIncDate,"/",-1,1)
Select Case strRequiredDate(0)
Case "1"
strRequiredDate(0) = "Jan"
Case "2"
strRequiredDate(0) = "Feb"
Case "3"
strRequiredDate(0) = "Mar"
Case "4"
strRequiredDate(0) = "Apr"
Case "5"
strRequiredDate(0) = "May"
Case "6"
strRequiredDate(0) = "Jun"
Case "7"
strRequiredDate(0) = "Jul"
Case "8"
strRequiredDate(0) = "Aug"
Case "9"
strRequiredDate(0) = "Sep"
Case "10"
strRequiredDate(0) = "Oct"
Case "11"
strRequiredDate(0) = "Nov"
Case "12"
strRequiredDate(0) = "Dec"
End Select
strFinalDate = strRequiredDate(1) & ";" & strRequiredDate(0) & ";" & strRequir
edDate(2)
'MsgBox strFinalDate
IncrementDate = strFinalDate
End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++
'===============================================================================
==========================
' Name of the Function : Fill_OfferingsTab()
' Scope of the Function : Public
' Author : Ganesh Viswanathan
' Description : This function is to fill the offeri
ngs tab
' Parameters accepted : BrowserName,PageName,OfferingPage N
ame
' Parameter returned :
' Date and / or Version : 27-2-2009,version 1.0
'===============================================================================
============================
Public Function Fill_OfferingsTab(strBrowserName,strPageName,strOfferingPageName
)
Environment.Value("TestCase_Log")="True"
Call click_WebElement(strBrowserName,strPageName,"Offerings")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Click on the Offerings tab","The o
fferings tab is clicked successfully"
Else
Reporter.ReportEvent micPass,"Click on the Offerings tab","The o
fferings tab is not clicked successfully"
Environment.Value("TestCase_Log")="True"
End If
strTableText= Browser("MasterFile").Page(strPageName).WebTable("Offering
s").GetROProperty("Text")
If instr(1,strTableText,"NamePrice DateClose DatePriceDR Total IssuedDR
Total Amount" ) Or Instr(1,"NamePrice DateClose DatePriceDR Total IssuedDR Tota
l Amount",strTableText) Then
Reporter.ReportEvent micPass,"Check whether the offerings tab co
ntains the required details","The offering tab contains the required details"
Else
Reporter.ReportEvent micFail,"Check whether the offering tab con
tains the required details","The offering tab does not contain the required deta
ils"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
Call click_WebButton(strBrowserName,strPageName,"Add_Offering")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Click on the ADD button in the off
erings page","The Add button gets clicked as required"
Else
Reporter.ReportEvent micFail,"Click on the ADD button in the off
erings page","The Add button does not get clicked as required"
Environment.Value("TestCase_Log"="True")
End If
Wait(4)
Wait(4)
strOfferingTabFields=Browser(strBrowserName).Page(strOfferingPageName).W
ebTable("Offering Detail").GetROProperty("innertext")
If trim(strOfferingTabFields)="Offering DetailNameProgram FormInstallmen
t PaymentUnitaryF-1NoYesLaw Firm - BNYLaw Firm - IssuerF-3NoYesInvestment BankLa
w Firm Investment BankUnderwriter Spread %DR Price (USD)Underlying Price (USD)Pr
ivatizationNoYesPrice DateClose DateGreen Shoe Close DateOffering CUSIPOffering
Secondary CUSIPDR US IssuedDR Non US IssuedDR Total IssuedDR US Capital RaisedDR
Non US Capital RaisedDR Total Capital RaisedDR US Green Shoe IssuedDR Non US Gr
een Shoe IssuedDR Total Green Shoe IssuedDR US Green Shoe Capital RaisedDR Non U
S Green Shoe Capital RaisedDR Total Green Shoe Capital RaisedDR US Total IssuedD
R Non US Total IssuedDR Total - Total IssuedDR US Total Capital RaisedDR Non US
Total Capital RaisedDR Total - Total Capital Raised" Then
Reporter.ReportEvent micPass,"Check for the fields present in th
e offering detail Page","The offering detail page has all the required fields"
Else
Reporter.ReportEvent micFail,"Check for the fields present in th
e offering detail Page","The offering detail page does not have all the required
fields"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
Call click_Image(strBrowserName,strOfferingPageName,"Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Click on the save button","The Off
ering details are saved"
Else
Reporter.ReportEvent micFail,"Click on the save button","The off
ering details are not saved"
Environment.Value("TestCase_Log")="True"
End If
Wait(3)
Call clkValidationErrorElement(strBrowserName,strOfferingPageName,"Valid
ation Error","DR US Issued;Close Date;Offering CUSIP;DR US Green Shoe Issued;Pri
ce Date;","DRUSIssued;CloseDate;OfferingCUSIP;DRUSGreenShoeIssued;PriceDate" )
Browser(strBrowserName).Page(strOfferingPageName).Image("Close").Click
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Check for the validation error mes
sages","All the validation error messages are as required"
Else
Reporter.ReportEvent micFail,"Check for the validation error mes
sages","All the validation error messages are not as required"
Environment.Value("TestCase_Log")="True"
End If

If Datatable.Value("F3","DR") <> "" Then


Call Select_Combo_Value(strBrowserName,strOfferingPageName,"F3",
Datatable.Value("F3","DR"))
End If
If Datatable.Value("F1","DR") <> "" Then
Call Select_Combo_Value(strBrowserName,strOfferingPageName,"F1",
Datatable.Value("F1","DR"))
End If
If DataTable.Value("CloseDate","DR") <> "" Then
strDataTableValue = DataTable.Value("CloseDate",
"DR")
strValue = Split(strDataTableValue,";",-1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image(strBrowserName,strOfferingPageN
ame,"ShowCalendarCloseDate")
Call ClickIcon_SetDate(strBrowserName,strOfferin
gPageName,strMonthValue,strYearValue,strDateValue)
End If
If DataTable.Value("GreenShoeCloseDate","DR") <> "" Then
strDataTableValue = DataTable.Value("GreenShoeCl
oseDate","DR")
strValue = Split(strDataTableValue,";",-1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image(strBrowserName,strOfferingPageN
ame,"ShowCalendarGreenShoeCloseDate")
Call ClickIcon_SetDate(strBrowserName,strOfferin
gPageName,strMonthValue,strYearValue,strDateValue)
End If
Call click_Image(strBrowserName,strOfferingPageName,"OfferingCUSIPInfo")
Wait(4)
Call SelectValueInsideFrame(strBrowserName,strOfferingPageName,"lookupFrame"
,Ucase(Environment.Value("CUSIP_NAME")))
If DataTable.Value("DRPrice","DR") Then
Call set_WebEdit_Value (strBrowserName,strOfferingPageName,"DRPr
ice",DataTable.Value("DRPrice","DR"))
End If
If DataTable.Value("DRUSGreenShoeIssued","DR") Then
Call set_WebEdit_Value(strBrowserName,strOfferingPageName,"DRUSG
reenShoeIssued",DataTable.Value("DRUSGreenShoeIssued","DR"))
End If
If DataTable.Value("PriceDate","DR") <> "" Then
strDataTableValue = DataTable.Value("PriceDate",
"DR")
strValue = Split(strDataTableValue,";",-1,1)
strDateValue = strValue(0)
strMonthValue = strValue(1)
strYearValue = strValue(2)
Call click_Image(strBrowserName,strOfferingPageN
ame,"ShowCalendarPriceDate")
Call ClickIcon_SetDate(strBrowserName,strOfferin
gPageName,strMonthValue,strYearValue,strDateValue)
End If
If Datatable.Value("DRUSIssued","DR") <> "" Then
Call set_WebEdit_Value(strBrowserName,strOfferingPageName,"DRUSI
ssued",Datatable.Value("DRUSIssued","DR"))
End If
If Datatable.Value("NonDRUSIssued","DR") <> "" Then
Call set_WebEdit_Value(strBrowserName,strOfferingPageName,"DRUSI
ssued",Datatable.Value("NonDRUSIssued","DR"))
End If
If Datatable.Value("DRNonUSGreenShoeIssued","DR") <> "" Then
Call set_WebEdit_Value(strBrowserName,strOfferingPageName,"DRUSI
ssued",Datatable.Value("DRNonUSGreenShoeIssued","DR"))
End If
Call click_Image(strBrowserName,strOfferingPageName,"Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Click on the save button","The Off
erings get saved as required"
Else
Reporter.ReportEvent micFail,"Click on the save button","The off
erings do not get saved as required"
Environment.Value("TestCase_Log")="True"
End If
Call ClickonDRName(strBrowserName,strOfferingPageName,Environment.Value(
"DRNAME"),"2")
If Browser("MasterFile").Page("DR Profile").Exist(2) Then
Reporter.ReportEvent micPass,"Check if we have navigated to the
DR Profile Page","The DR Profile page has opened up correctly"
Else
Reporter.ReportEvent micFail,"Check if we have navigated to the
DR profile page","The DR profile page has not opened up correctly"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If

End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
'===============================================================================
==========================
' Name of the Function : Fill_AdditionalDRExchangesTab()
' Scope of the Function : Public
' Author : Ganesh Viswanathan
' Description : This function is to fill the additi
onal DR Exchanges tab
' Parameters accepted : BrowserName,Page name
' Parameter returned :
' Date and / or Version : 27-2-2009,version 1.0
'===============================================================================
============================
Public Function Fill_AdditionalDRExchangesTab(strBrowserName,strPageName)
Environment.Value("TestCase_Log")="True"
Call click_WebElement(strBrowserName,strPageName,"Additional DR Exchange
s")
If Browser(strBrowserName).Page(strPageName).WebTable("Additional DR Exc
hange").Exist(2) Then
Reporter.ReportEvent micPass," Check whether the Additional DR e
xchange Tab is as required","The Additional DR Exchanges Tab is as Required"
Else
Reporter.ReportEvent micFail," Check whether the Additional exch
ange Tab is as required","The Additional DR exchanges tab is not present"
Call captureScreenshot()
End If
Call click_WebButton(strBrowserName,strPageName,"Add_DRExchange"
)
Call click_Image(strBrowserName,strPageName,"ExchangeInfo")
Call operation_on_FrameObjects_WithName(strBrowserName,strPageNa
me,"lookupFrame","WebEdit","searchString",DataTable.Value("CountryOfAdditionalDR
Exchange","DR"))
Call operation_on_FrameObjects_WithName(strBrowserName,strPageNa
me,"lookupFrame","Image","Go","")
Call SelectValueInsideFrame(strBrowserName,strPageName,"lookupFr
ame",DataTable.Value("CountryOfAdditionalDRExchange","DR"))
SEDOLVALUE=createAlphanumericString(7)
Call set_WebEdit_Value(strBrowserName,strPageName,"SEDOL",SEDOLV
ALUE)
TICKERVALUE=createAlphanumericString(10)
Call set_WebEdit_Value(strBrowserName,strPageName,"Ticker",TICKE
RVALUE)
Call click_Image(strBrowserName,"DR Profile","Save")
If Environment.Value("TestCase_Log")="True" Then
Reporter.ReportEvent micPass,"Fill in the Additional DR
Exchanges Tab","The Additional DR exchanges tab gets filled"
Else
Reporter.ReportEvent micFail,"Fill in the Additional DR
exchanges tab","The additional DR Exchange tab is not filled as required"
Environment.Value("TestCase_Log")="True"
End If
Wait(3)
End Function
'===============================================================================
==========================
' Name of the Function : createAlphanumericString()
' Scope of the Function : Public
' Author : Ganesh Viswanathan
' Description : This function is to create a random
alphanumeric string of required size
' Parameters accepted : Size of the string required
' Parameter returned : Random string
' Date and / or Version : 19-1-2009,version 1.0
'===============================================================================
============================

Public function createAlphanumericString(Byref intsSize)


Randomize
Alpha=Array("a","b","c","d","e","f","g","h","i","j","k","l","m",
"n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6",
"7","8","9")
createAlphanumericString=""
For i=1 to intsSize
aRand = Int((35 * Rnd) + 0)
createAlphanumericString=createAlphanumericStrin
g& Alpha(aRand)
Next
End Function

'+++++++++++++++++++++++++++++++++++++++++++Workspace+++++++++++++++++++++++++++
+++++++++++++++++++++++++++

'===============================================================================
===================================================
' Name of the Function : SelectValueinTablefrom frame
' Scope of the Function : Public
' Author : Ganesh Viswanathan
' Description : This function is used to Select a Value from t
he WebTable which is inside a Frame
' Parameters accepted : BrowserName, PageName, ,frame name ,Table Name
and the Value that has to be Selected from Table
' Parameter returned : Nill
' Date and / or Version : 22-11-2008,version 1.0
'===============================================================================
===================================================

Public Function SelectValueInsideFrame(strBrowserName,strPageName,strFrameName,s


trSelectValue)
Environment.Value("TestCase_Log")="True"
blnFlag="False"
Set objDesc = Description.Create()
objDesc("micclass").Value = "WebElement"
objDesc("html tag").Value = "TD"
Set strChildObject = Browser(strBrowserName).Page(strPag
eName).Frame(strFrameName).ChildObjects(objDesc)
For intCounter = 0 to strChildObject.Count -1
strElementName = strChildObject(intCount
er).GetROProperty("innertext")
If Instr(1,strElementName,strSelectValue) Then
strChild
Object(intCounter).click
Reporter
.ReportEvent micPass,"Clicking on WebElement", strObjName & "' is clicked succes
sfully"
blnFlag=
"True"
Exit for
End If
Next
If blnFlag="False" Then
Reporter.ReportEvent micFail,"Cl
ick on the Value in frame","The value inside the frame is not clicked successful
ly"
Call captureScreenshot()
Environment.Value("Execution_Log")="False"
End If
Set objDesc=nothing
End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++

You might also like