ADRCA Profile Upload Notification Old

  • Upload
    imaarha

  • View
    213

  • Download
    0

Embed Size (px)

Citation preview

  • 8/7/2019 ADRCA Profile Upload Notification Old

    1/20

    '=========================================================================================================' Name of the Script : Corporate Actions Profile Upload Notification' Scope of the Script : This test script covers 6 test cases related to the CA Profile Upload Notification

    ' Author: Shyam H D' Description : Corporate Actions Profile Upload Notification' Date and / or Version : 04-12-2008,version 1.0'===========================================================================================================

    Sub CAProfileUploadNotification()

    '****Declaration of Environmental VariableEnvironment.Value("Execution_Log")=True

    '''''''''Test case countConst TC_COUNT = 6

    strVar = Environment("TestDir")strIndVar = Split(strVar,"\",-1,1)strBound = UBound(strIndVar)strAllPath =""

    For intCounter = 0 to strBound - 1strAllPath = strAllPath & strIndVar(intCounter)

    &"\"Next

    strPath = Trim(strPath)strDataPath = strAllPath & "DataTables\"strLibPath = strAllPath & "Function_Library\"

    ' Including the Library files where all the Scripts are saved'ExecuteFile strLibPath & "CAReportsBulkMoveUnderlyingEventTC.vb

    s"

    '****Adding MFLogin sheet to the dataTable and Importing the Input DataTable

    DataTable.AddSheet "CALogin"

    DataTable.ImportSheet strDataPath & "Login.xls","CALogin","CALogin"DataTable.AddSheet "UploadNotification"DataTable.ImportSheet strDataPath & "CorporateActionsProfile.xls

    ","UploadNotification","UploadNotification"DataTable.AddSheet "ReportHeader"DataTable.ImportSheet strDataPath & "CorporateActionsProfile.xls

    ","ReportHeader","ReportHeader"DataTable.AddSheet "HomePageVerification"DataTable.ImportSheet strDataPath & "CorporateActionsReports.xls

    ","HomePageVerification","HomePageVerification"

    ' Logs the Scenario name Execution in a .csv file

    Call Execution_log(DataTable.Value("Scenario_Name", "Master"), "", "", "")

  • 8/7/2019 ADRCA Profile Upload Notification Old

    2/20

    '****Invoking IE and navigating to the ADR Login pageCall invoke_URL("CorporateActions","Login Page",DataTable.Value(

    "URL","CALogin"))

    '****Checking the username, password and login objects in the login page

    Call pageCheck_WebEdit("CorporateActions","Login Page","username

    ;j_password","")Call pageCheck_WebButton("CorporateActions","Login Page","Login"

    ,"")

    '****Entering username and password and login into the masterfile application

    Call login("CorporateActions","Login Page","User","CALogin")

    Environment.Value("DATATABLE_ROW")=1DataTable.GetSheet("UploadNotification").SetCurrentRow(Environme

    nt.Value("DATATABLE_ROW"))

    '***************************************** TC Driver Strat *******************************************************

    For intTCCount = 1 to TC_COUNT

    Environment.Value("Execution_Log") = "True"If DataTable("TestRunFlag","UploadNotification")="Y" The

    n ''If run flag is Y in test data tableReporter.ReportEvent micDone,"######## BEGIN TES

    T CASE - '" & DataTable("TestCaseID","UploadNotification") & "' ########### ","Execution of Test Case '" & DataTable("TestCaseDesc","UploadNotification") & "' Started"

    strFuncName = "CAProfileUploadNotification_TC" & intTCCount & "(

    )" ''Formation of function name''Call FunctionExecute "Call " & strFuncName

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

    Call Execution_log("",Datatable.Value("TestCaseID", "UploadNotification"), Datatable.Value("TestCaseDesc", "UploadNotification"), "PASS")

    ElseCall Execution_log("",Datatable.

    Value("TestCaseID", "UploadNotification"), Datatable.Value("TestCaseDesc", "UploadNotification"), "FAIL")

    End IfReporter.ReportEvent micDone,"######### END OF T

    EST CASE - '" & DataTable("TestCaseID","UploadNotification") & "###########","The Test Case Execution Completed"

    End If

    strPrevious=Trim(DataTable.Value("TestCaseID","UploadNotification"))

    ''Increment the test data table rowEnvironment.Value("DATATABLE_ROW") = Environment.Value("

    DATATABLE_ROW") + 1

    DataTable.GetSheet("UploadNotification").SetCurrentRow(Environment.Value("DATATABLE_ROW"))

    strNext=Trim(DataTable.Value("TestCaseID","UploadNotific

  • 8/7/2019 ADRCA Profile Upload Notification Old

    3/20

    ation"))While strPrevious = strNext

    Environment.Value("DATATABLE_ROW") = Environment.Value("DATATABLE_ROW") + 1

    DataTable.GetSheet("UploadNotification").SetCurrentRow(Environment.Value("DATATABLE_ROW"))

    strNext=Trim(DataTable.Value("TestCaseID","Uploa

    dNotification"))Wend

    Next

    Call logoutfromApp("CorporateActions","Depositary Receipt Division's")

    '***************************************** TC Driver End *******************************************************

    End Sub

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

    Public Function CAProfileUploadNotification_TC1()

    Call chkCAHomePage("CorporateActions","Depositary Receipt Division's",DataTable.Value("HomePageLinks","HomePageVerification"),DataTable.Value("UserName","HomePageVerification"))

    If Environment.Value("TestCase_Log") = "True"ThenReporter.ReportEvent micPass,"Step 1: Check for DR Hom

    e Page","The Required Links and the User Details are displayed Successfully"

    ElseReporter.ReportEvent micFail,"Step 1: Check for DR Home

    Page","The Required Links and the User Details are NOT displayed Successfully"Environment.Value("TestCase_Log") = "True"

    End If

    ' Clicking on the Corporate Action ElementCall click_WebElement("CorporateActions","Depositary Receipt Div

    ision's","CorporateActions")

    ' Step 2Call chkCAPage("CorporateActions","CorporateActions",DataTable.Value("Me

    nuName","HomePageVerification"))

    If Environment.Value("TestCase_Log") = "True"ThenReporter.ReportEvent micPass,"Step 2: Click on Corporat

    e Action Element and Check for CA Home Page","The Required Menu Items are Displayed Successfully"

    ElseReporter.ReportEvent micFail,"Step 2: Click on Corporate

    Action Element and Check for CA Home Page","The Required Menu Items are Displayed Successfully"

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

    ' Step 3Call Select_Menu("CorporateActions","CorporateActions",DataTable.Value("

    MenuPath","UploadNotification"))

  • 8/7/2019 ADRCA Profile Upload Notification Old

    4/20

    Call Select_Combo_Value("CorporateActions","Profile - Upload Notification","TargetDocument",DataTable.Value("TargetDocument","UploadNotification"))

    blnFlag = "False"If Browser("CorporateActions").Page("Profile - Upload Notificati

    on").WebFile("UploadFile").Exist(2) ThenblnFlag = "True"

    End IfCall pageCheck_WebEditOR("CorporateActions","Profile - Upload Notificati

    on","IssuerName;UnderlyingSecurity;ISIN;SEDOL;Source;ProcessingStatus;SenderName;CorporateActionType;LocalRecordDate;MeetingDate;PaymentDate;EffectiveDate")

    Call pageCheck_WebListOR("CorporateActions","Profile - Upload Notification","TargetDocument;Comparison;SenderType")

    Call pageCheck_ImageOR("CorporateActions","Profile - Upload Notification","Save;Cancel;UnderlyingSecurity;ISIN;SEDOL;CorporateActionType;LocalRecordDate;MeetingDate;PaymentDate;EffectiveDate")

    Call pageCheck_WebEditTextArea("CorporateActions","Profile - Upload Notification","userCmntTxN_0","")

    If Environment.Value("TestCase_Log") = True AND blnFlag = "True"ThenReporter.ReportEvent micPass,"Step 3: Verifying if the R

    equired Fields are Present in the Page ' Profile - Upload Notification '","The Required Fields are Present in the page 'Profile - Uplaod Notification'"

    ElseReporter.ReportEvent micFail,"Step 3: Verifying if the R

    equired Fields are Present in the Page ' Profile - Upload Notification '","The Required Fields are NOT Present in the page 'Profile - Uplaod Notification'"

    Environment.Value("TestCase_Log") = TrueEnvironment.Value("Execution_Log") = False

    End If

    Call select_Menu("CorporateActions","Profile - Upload Notification","Home;DR Home")End Function

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

    Public Function CAProfileUploadNotification_TC2()

    Call click_WebElement("CorporateActions","Depositary Receipt Division's","CorporateActions")

    Call select_Menu("CorporateActions","CorporateActions",DataTable.Value("MenuPath","UploadNotification"))

    blnFlag = Browser("CorporateActions").Page("Profile - Upload Notification").Exist(5)

    If blnFlag = "True" ThenReporter.ReportEvent micPass,"Step 1: Verfiying if the Page ' Pr

    ofile Upload Notification ' is displayed or NOT","The Page ' Profile Upload Notification ' is displayed successfully"

    ElseReporter.ReportEvent micFail,"Step 1: Verfiying if the Page ' Pr

    ofile Upload Notification ' is displayed or NOT","The Page ' Profile Upload Notification ' is NOT displayed successfully"

    Environment.Value("Execution_Log") = FalseEnd If

  • 8/7/2019 ADRCA Profile Upload Notification Old

    5/20

    Call Select_Combo_Value("CorporateActions","Profile - Upload Notification","TargetDocument",DataTable.Value("TargetDocument","UploadNotification"))

    Call click_Image("CorporateActions","Profile - Upload Notification","Save")

    strRequiredDetails = "Uploaded file should be PDF, Doc, Text or HTML file.;F

    ield is Required."Call ValidationErrorDetails_AllDetails("CorporateActions","Profile - Upl

    oad Notification","Validation Error",DataTable.Value("RequiredFields","UploadNotification"),strRequiredDetails,"Validation Error")

    If Environment.Value("TestCase_Log") = True ThenReporter.ReportEvent micPass,"Step 2 : Verfiying if the Mandator

    y fields are displayed in the Validation Error or Not with the details","The Mandatory Fields are displayed in the Validation Error"

    ElseReporter.ReportEvent micPass,"Step 2 : Verfiying if the Mandator

    y fields are displayed in the Validation Error or Not with the details","The Man

    datory Fields are displayed in the Validation Error"Environment.Value("TestCase_Log") = TrueEnvironment.Value("Execution_Log") = False

    End If

    strRequired = "ISIN;Corporate Action Type;Sender Name"Call clkValidationErrorElement("CorporateActions","Profile - Upload Noti

    fication","Validation Error",strRequired,"ISIN;CorporateActionType;SenderName")

    blnColorFlag = "False"Browser("CorporateActions").Page("Profile - Upload Notification").WebEle

    ment("html tag:=TD","innertext:= Uploaded File").ClickstrOuterhtml = Browser("CorporateActions").Page("Profile - Upload Notifi

    cation").WebFile("UploadFile").GetROProperty("outerhtml")If Instr(1,strOuterhtml,"BORDER-TOP-COLOR: red") 0 Then

    blnColorFlag = "True"End If

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

    Reporter.ReportEvent micPass,"Step 3: Verfiying if the Fields are highlighted in Red when clicked on the Fields in Validation Error","The Corresponding Fields are Highlighted in Red"

    ElseReporter.ReportEvent micFail,"Step 3: Verfiying if the Fields ar

    e highlighted in Red when clicked on the Fields in Validation Error","The Corresponding Fields are NOT Highlighted in Red"

    Environment.Value("TestCase_Log") = TrueEnvironment.Value("Execution_Log") = False

    End If

    Call click_Image("CorporateActions","Profile - Upload Notification","Close")

    If Browser("CorporateActions").Page("Profile - Upload Notification").Image("Error").Exist(2) Then

    Reporter.ReportEvent micPass,"Step 4: Verifying if the Error Button exists after closing the Validation Error Table","The Error Button exists af

    ter closing the Validation Error without entering the Mandatory details"Else

    Reporter.ReportEvent micFail,"Step 4: Verifying if the Error But

  • 8/7/2019 ADRCA Profile Upload Notification Old

    6/20

    ton exists after closing the Validation Error Table","The Error Button does NOTexists after closing the Validation Error without entering the Mandatory details"

    Environment.Value("Execution_Log") = FalseEnd If

    Call click_Image("CorporateActions","Profile - Upload Notification","Err

    or")

    If Browser("CorporateActions").Page("Profile - Upload Notification").WebTable("Validation Error").Exist(2) Then

    Reporter.ReportEvent micPass,"Step 5: Verifying if the Validation Error Table is Displayed or NOT","The Validation Error Table is Displayed"

    ElseReporter.ReportEvent micPass,"Step 5: Verifying if the Validatio

    n Error Table is Displayed or NOT","The Validation Error Table is Displayed"Environment.Value("Execution_Log") = False

    End If

    Call select_Menu("CorporateActions","Profile - Upload Notification","Home;DR Home")End Function

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

    Public Function CAProfileUploadNotification_TC3()

    Call click_WebElement("CorporateActions","Depositary Receipt Division's","CorporateActions")

    Call select_Menu("CorporateActions","CorporateActions",DataTable.Value("MenuPath","UploadNotification"))

    blnFlag = Browser("CorporateActions").Page("Profile - Upload Notification").Exist(5)

    If blnFlag = "True" ThenReporter.ReportEvent micPass,"Step 1: Verfiying if the Page ' Pr

    ofile Upload Notification ' is displayed or NOT","The Page ' Profile Upload Notification ' is displayed successfully"

    ElseReporter.ReportEvent micFail,"Step 1: Verfiying if the Page ' Pr

    ofile Upload Notification ' is displayed or NOT","The Page ' Profile Upload Notification ' is NOT displayed successfully"

    Environment.Value("Execution_Log") = FalseEnd If

    Call CreateNewFolder("UploadFiles")

    strFilePath = CreateFile("UploadFiles",DataTable.Value("TestCaseID","UploadNotification"),"txt")

    Call Select_Combo_Value("CorporateActions","Profile - Upload Notification","TargetDocument",DataTable.Value("TargetDocument","UploadNotification"))

    Browser("CorporateActions").Page("Profile - Upload Notification").WebFile("UploadFile").Click

    If Browser("CorporateActions").Dialog("Choose file").Exist(5) ThenReporter.ReportEvent micPass,"Step 2: Verifying if the Dialog Ch

  • 8/7/2019 ADRCA Profile Upload Notification Old

    7/20

    oose File exists or NOT","The Dialog 'Choose File' is Dispalyed successfully"Else

    Reporter.ReportEvent micFail,"Step 2: Verifying if the Dialog Choose File exists or NOT","The Dialog 'Choose File' is NOT Dispalyed successfully"

    Environment.Value("Execution_Log") = FalseEnd If

    Browser("CorporateActions").Dialog("Choose file").WinEdit("File name:").Set strFilePath

    Browser("CorporateActions").Dialog("Choose file").WinButton("Open").Click

    strAppFileName = Browser("CorporateActions").Page("Profile - Upload Notification").WebFile("UploadFile").GetROProperty("value")

    If strAppFileName = strFilePath ThenReporter.ReportEvent micPass,"Step 3: Verifying if the Selected

    file is displayed in the Field or Not","The Selected File " & strAppFileName &" is displayed in the Field"

    Else Reporter.ReportEvent micFail,"Step 3: Verifying if the Selectedfile is displayed in the Field or Not","The Selected File " & strAppFileName &" is NOT displayed in the Field"

    Environment.Value("Execution_Log") = FalseEnd If

    Call select_Menu("CorporateActions","Profile - Upload Notification","Home;DR Home")

    End Function

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

    Public Function CAProfileUploadNotification_TC4()

    Call click_WebElement("CorporateActions","Depositary Receipt Division's","CorporateActions")

    Call select_Menu("CorporateActions","CorporateActions",DataTable.Value("MenuPath","UploadNotification"))

    blnFlag = Browser("CorporateActions").Page("Profile - Upload Notification").Exist(5)

    If blnFlag = "True" ThenReporter.ReportEvent micPass,"Step 1: Verfiying if the Page ' Pr

    ofile Upload Notification ' is displayed or NOT","The Page ' Profile Upload Notification ' is displayed successfully"

    ElseReporter.ReportEvent micFail,"Step 1: Verfiying if the Page ' Pr

    ofile Upload Notification ' is displayed or NOT","The Page ' Profile Upload Notification ' is NOT displayed successfully"

    Environment.Value("Execution_Log") = FalseEnd If

    Call CreateNewFolder("UploadFiles")

    strFilePath = CreateFile("UploadFiles",DataTable.Value("TestCaseID","Upl

  • 8/7/2019 ADRCA Profile Upload Notification Old

    8/20

    oadNotification"),"txt")

    Call Select_Combo_Value("CorporateActions","Profile - Upload Notification","TargetDocument",DataTable.Value("TargetDocument","UploadNotification"))

    ' Entering the path of the File and clicking on SaveBrowser("CorporateActions").Page("Profile - Upload Notification").WebFil

    e("UploadFile").ClickBrowser("CorporateActions").Dialog("Choose file").WinEdit("File name:").

    Set strFilePathBrowser("CorporateActions").Dialog("Choose file").WinButton("Open").Click

    Call click_Image("CorporateActions","Profile - Upload Notification","Save")

    'strRequiredField = "Field is Required."Call ValidationErrorDetails_AllDetails("CorporateActions","Profile - Upl

    oad Notification","Validation Error",DataTable.Value("RequiredFields","UploadNotification"),DataTable.Value("ValidationMessage","UploadNotification"),"Validation Error")

    If Environment.Value("TestCase_Log") = True ThenReporter.ReportEvent micPass,"Step 2: Verifying if the Mandatory

    Fields are displayed in the Validation Error Table","The Mandatory Fields are displayed in the Validation Error Table"

    ElseReporter.ReportEvent micFail,"Step 2: Verifying if the Mandatory

    Fields are displayed in the Validation Error Table","The Mandatory Fields are NOT displayed in the Validation Error Table"

    Environment.Value("TestCase_Log") = TrueEnvironment.Value("Execution_Log") = False

    End If

    ' Step 3: Entering the Underlying SecurityCall click_Image("CorporateActions","Profile - Upload Notification","Und

    erlyingSecurity")Call operation_on_FrameObjects_WithName("CorporateActions","Profile - Up

    load Notification","lookupFrame","WebEdit","divNm",DataTable.Value("UnderlyingSecurity","UploadNotification"))

    Call operation_on_FrameObjects_WithName("CorporateActions","Profile - Upload Notification","lookupFrame","Image","Go","")

    Call chkResultinFrame("CorporateActions","Profile - Upload Notification","lookupFrame","FrameTable","Und. Security Name",DataTable.Value("UnderlyingSecurity","UploadNotification"))

    Call SelectValueinFrame("CorporateActions","Profile - Upload Notification","lookupFrame","FrameTable")

    ' Verifiyng the Filled of ISN , SEDOL and Sender NamestrISINValue = get_WebEdit_Value("CorporateActions","Profile - Upload No

    tification","ISIN")strSEDOLValue = get_WebEdit_Value("CorporateActions","Profile - Upload N

    otification","SEDOL")strSenderName = get_WebEdit_Value("CorporateActions","Profile - Upload N

    otification","SenderName")

    If Environment.Value("TestCase_Log") = True AND strISINValue "" AND strSEDOLValue "" AND strSenderName "" Then

    Reporter.ReportEvent micPass,"Step 3: Verifiyng if the Values in

    the Fields are filled or NOT","The Values in the Fields ' ISIN, SEDOL and Sender Name' are automatically filled after entering the Underlying Security"

    Else

  • 8/7/2019 ADRCA Profile Upload Notification Old

    9/20

    Reporter.ReportEvent micFail,"Step 3: Verifiyng if the Values inthe Fields are filled or NOT","The Values in the Fields ' ISIN , SEDOL and Sender Name' are NOT filled automatically after entering the Underlying Security"

    Environment.Value("TestCase_Log") = TrueEnvironment.Value("Execution_Log") = False

    End If

    ' Step 4: Verifying all the Items in Comparison FieldstrComparisonValues = Browser("CorporateActions").Page("Profile - Upload Not

    ification").WebList("Comparison").GetROProperty("all items")strRequiredValues = "No;Yes"If Trim(UCase(strComparisonValues)) = Trim(UCase(strRequiredValues)) The

    nReporter.ReportEvent micPass,"Step 4: Verifying the Values prese

    nt in the Comparsion Field","The Items Present in the Comparison Field are " & strComparisonValues

    ElseReporter.ReportEvent micFail,"Step 4: Verifying the Values prese

    nt in the Comparsion Field","The Items " & strComparisonValues& " are NOT Prese

    nt in the Comparison Field are "Environment.Value("Execution_Log") = FalseEnd If

    ' Step 5: Verifiyng the Default Value of Comparsion FieldstrSelectedValue = get_WebList_Value("CorporateActions","Profile - Uploa

    d Notification","Comparison")If strSelectedValue = "Yes" Then

    Reporter.ReportEvent micPass,"Step 5: Verifying the Default Value of the Comparsion Field","The Default Value of Comparsion Field is " & strSelectedValue

    ElseReporter.ReportEvent micFail,"Step 5: Verifying the Default Valu

    e of the Comparsion Field","The Default Value of Comparsion Field is NOT " & strSelectedValue

    Environment.Value("Execution_Log") = FalseEnd If

    ' Step 6:Call click_Image("CorporateActions","Profile - Upload Notification","Cor

    porateActionType")

    Call pageCheck_Frame("CorporateActions","Profile - Upload Notification","lookupFrame","CorporateActionType","Clear;Go","CorporateActionType")

    strDataValue = ""intDataRowCount = DataTable.GetSheet("ReportHeader").GetRowCountFor intCounter = 1 to intDataRowCount

    DataTable.GetSheet("ReportHeader").SetCurrentRow(intCounter)strDataValues = Trim(DataTable.Value("UploadNotification","Repor

    tHeader"))strDataValue = strDataValue & strDataValues & ";"

    NextintRowCount = Browser("CorporateActions").Page("Profile - Upload Notific

    ation").Frame("lookupFrame").WebTable("FrameTable").RowCountstrAppValue = ""For intRowCounter = 2 to intRowCount

    strAppValues = Browser("CorporateActions").Page("Profile - Upload Notification").Frame("lookupFrame").WebTable("FrameTable").GetCellData(intRowC

    ounter,1)strAppValue = strAppValue & strAppValues & ";"

    Next

  • 8/7/2019 ADRCA Profile Upload Notification Old

    10/20

    If UCase(strDataValue) = UCase(strAppValue) And Environment.Value("TestCase_Log") = True Then' If UCase(strDataValue) = UCase(strAppValue) Then

    Reporter.ReportEvent micPass,"Step 6: Verifying if the requiredFields are Present and the Required Items are Present in the Table","The Required Fields are Present and the Items Present in the Table are " & strAppValue

    ElseReporter.ReportEvent micFail,"Step 6: Verifying if the required

    Fields are Present and the Required Items are Present in the Table","The Required Fields are NOT Present"

    Environment.Value("TestCase_Log") = TrueEnvironment.Value("Execution_Log") = False

    End If

    ' Step 7:Browser("CorporateActions").Page("Profile - Upload Notification").Frame(

    "lookupFrame").WebEdit("CorporateActionType").Set DataTable.Value("CorporateActionType","UploadNotification")

    Call operation_on_FrameObjects_WithName("CorporateActions","Profile - Upload Notification","lookupFrame","Image","Go","")

    Call ReportLoadWaitinFrame("CorporateActions","Profile - Upload Notification","lookupFrame","FrameTable","Corporate Action Type")

    blnFlag = "True"intRowCount = Browser("CorporateActions").Page("Profile - Upload Notific

    ation").Frame("lookupFrame").WebTable("FrameTable").RowCountFor intRowCounter = 2 to intRowCount

    strAppValue = Browser("CorporateActions").Page("Profile - UploadNotification").Frame("lookupFrame").WebTable("FrameTable").GetCellData(intRowCounter,1)

    intPos = InStr(1,UCase(Trim(strAppValue)),UCase(Trim(DataTable.V

    alue("CorporateActionType","UploadNotification"))))If intPos = 0 Then

    blnFlag = "False"Exit For

    End IfNext

    If blnFlag = "True" ThenReporter.ReportEvent micPass,"Step 7: Verifying if the Results a

    re displayed as per the Search Criteria","The Results are Displayed as per the Search Criteria"

    ElseReporter.ReportEvent micFail,"Step 7: Verifying if the Results a

    re displayed as per the Search Criteria","The Results are NOT Displayed as per the Search Criteria"

    Environment.Value("Execution_Log") = FalseEnd If

    ' Step 8intRowCount = Browser("CorporateActions").Page("Profile - Upload Notific

    ation").Frame("lookupFrame").WebTable("FrameTable").RowCountFor intRowCounter = 2 to intRowCount

    strSelectAppValue = Browser("CorporateActions").Page("Profile -Upload Notification").Frame("lookupFrame").WebTable("FrameTable").GetCellData(intRowCounter,1)

    If strSelectAppValue = "Cash Dividend" ThenBrowser("CorporateActions").Page("Profile - Upload Notif

    ication").Frame("lookupFrame").WebElement("html tag:= TD","innertext:= " & strSe

  • 8/7/2019 ADRCA Profile Upload Notification Old

    11/20

    lectAppValue).ClickExit For

    End IfNext

    strCorporateActionType = get_WebEdit_Value("CorporateActions","Profile -Upload Notification","CorporateActionType")

    If strCorporateActionType = strSelectAppValue ThenReporter.ReportEvent micPass,"Step 8: Verifying if the Selected

    Value is displayed in the Corporate Action Type Field or NOT","The Selected Value " & strSelectAppValue & "is displayed in the Corporate Action Field"

    ElseReporter.ReportEvent micFail,"Step 8: Verifying if the Selected

    Value is displayed in the Corporate Action Type Field or NOT","The Selected Value " & strSelectAppValue & "is NOT displayed in the Corporate Action Field"

    Environment.Value("Execution_Log") = FalseEnd If

    ' Step 9

    Call click_Image("CorporateActions","Profile - Upload Notification","Save")

    Call ValidationErrorDetails("CorporateActions","Profile - Upload Notification","Validation Error","Local Record Date","Validation Error")

    If Environment.Value("TestCase_Log") = True ThenReporter.ReportEvent micPass,"Step 10: Verifiyng if the Mandator

    y Field are displayed in the Validation Error or NOT","The Mandatory Field is displayed in the validation Error Table"

    ElseReporter.ReportEvent micFail,"Step 10: Verifiyng if the Mandator

    y Field are displayed in the Validation Error or NOT","The Mandatory Field is NO

    T displayed in the validation Error Table"Environment.Value("TestCase_Log") = TrueEnvironment.Value("Execution_Log") = False

    End If

    'Step 10Call clkValidationErrorElement("CorporateActions","Profile - Upload Noti

    fication","Validation Error","Local Record Date","LocalRecordDate")If Environment.Value("TestCase_Log") = True Then

    Reporter.ReportEvent micPass,"Step 10: Verifying if the Field ishighligted in Red Color or NOT","The Required Field is Highlighted in Red"

    ElseReporter.ReportEvent micFail,"Step 10: Verifying if the Field is

    highligted in Red Color or NOT","The Required Field is NOT Highlighted in Red"Environment.Value("TestCase_Log") = TrueEnvironment.Value("Execution_Log") = False

    End If

    Call click_image("CorporateActions","Profile - Upload Notification","LocalRecordDate")

    strDate=split(DataTable.Value("LocalRecordDate","UploadNotification"),";",-1,1)

    strMonth=strDate(1)strYear=strDate(2)strDateValue =strDate(0)

    Call ClickIcon_SetDate("CorporateActions","Profile - Upload Notification",strMonth,strYear,strDateValue)

  • 8/7/2019 ADRCA Profile Upload Notification Old

    12/20

    intLen = Len(strDateValue)If intLen

  • 8/7/2019 ADRCA Profile Upload Notification Old

    13/20

    Public Function CAProfileUploadNotification_TC5()

    Call click_WebElement("CorporateActions","Depositary Receipt Division's","CorporateActions")

    Call select_Menu("CorporateActions","CorporateActions",DataTable.Value("Menu

    Path","UploadNotification"))

    blnFlag = Browser("CorporateActions").Page("Profile - Upload Notification").Exist(5)

    If blnFlag = "True" ThenReporter.ReportEvent micPass,"Step 1: Verfiying if the Page ' Pr

    ofile Upload Notification ' is displayed or NOT","The Page ' Profile Upload Notification ' is displayed successfully"

    ElseReporter.ReportEvent micFail,"Step 1: Verfiying if the Page ' Pr

    ofile Upload Notification ' is displayed or NOT","The Page ' Profile Upload Noti

    fication ' is NOT displayed successfully"Environment.Value("Execution_Log") = FalseEnd If

    Call CreateNewFolder("UploadFiles")

    strFilePath = CreateFile("UploadFiles",DataTable.Value("TestCaseID","UploadNotification"),"txt")

    Call Select_Combo_Value("CorporateActions","Profile - Upload Notification","TargetDocument",DataTable.Value("TargetDocument","UploadNotification"))

    ' Entering the path of the File and clicking on Save

    Browser("CorporateActions").Page("Profile - Upload Notification").WebFile("UploadFile").Click

    Browser("CorporateActions").Dialog("Choose file").WinEdit("File name:").Set strFilePath

    Browser("CorporateActions").Dialog("Choose file").WinButton("Open").ClickCall click_Image("CorporateActions","Profile - Upload Notification","Sav

    e")Call ValidationErrorDetails_AllDetails("CorporateActions","Profile - Upl

    oad Notification","Validation Error",DataTable.Value("RequiredFields","UploadNotification"),DataTable.Value("ValidationMessage","UploadNotification"),"Validation Error")

    If Environment.Value("TestCase_Log") = True ThenReporter.ReportEvent micPass,"Step 2: Verifying if the Mandatory

    Fields are displayed in the Validation Error Table","The Mandatory Fields are displayed in the Validation Error Table"

    ElseReporter.ReportEvent micFail,"Step 2: Verifying if the Mandatory

    Fields are displayed in the Validation Error Table","The Mandatory Fields are NOT displayed in the Validation Error Table"

    Environment.Value("TestCase_Log") = TrueEnvironment.Value("Execution_Log") = False

    End If

    ' Step 3: Entering the Underlying Security

    Call click_Image("CorporateActions","Profile - Upload Notification","UnderlyingSecurity")

    Call operation_on_FrameObjects_WithName("CorporateActions","Profile - Up

  • 8/7/2019 ADRCA Profile Upload Notification Old

    14/20

    load Notification","lookupFrame","WebEdit","divNm",DataTable.Value("UnderlyingSecurity","UploadNotification"))

    Call operation_on_FrameObjects_WithName("CorporateActions","Profile - Upload Notification","lookupFrame","Image","Go","")

    Call chkResultinFrame("CorporateActions","Profile - Upload Notification","lookupFrame","FrameTable","Und. Security Name",DataTable.Value("UnderlyingSecurity","UploadNotification"))

    Call SelectValueinFrame("CorporateActions","Profile - Upload Notification","lookupFrame","FrameTable")

    ' Verifiyng the Filled of ISN , SEDOL and Sender NamestrISINValue = get_WebEdit_Value("CorporateActions","Profile - Upload No

    tification","ISIN")strSEDOLValue = get_WebEdit_Value("CorporateActions","Profile - Upload N

    otification","SEDOL")strSenderName = get_WebEdit_Value("CorporateActions","Profile - Upload N

    otification","SenderName")

    If Environment.Value("TestCase_Log") = True AND strISINValue "" AND s

    trSEDOLValue "" AND strSenderName "" ThenReporter.ReportEvent micPass,"Step 3,4: Verifiyng if the Valuesin the Fields are filled or NOT","The Values in the Fields ' ISIN, SEDOL and Sender Name' are automatically filled after entering the Underlying Security"

    ElseReporter.ReportEvent micFail,"Step 3, 4: Verifiyng if the Values

    in the Fields are filled or NOT","The Values in the Fields ' ISIN , SEDOL and Sender Name' are NOT filled automatically after entering the Underlying Security"

    Environment.Value("TestCase_Log") = TrueEnvironment.Value("Execution_Log") = False

    End If

    'Call Select_Combo_Value("CorporateActions","Profile - Upload Notificati

    on","Comparison",DataTable.Value("Comparison","UploadNotification"))

    ' strData = get_WebList_Value("CorporateActions","Profile - Upload Notification","Comparison")'' If Trim(strData) = Trim(DataTable.Value("Comparison","UploadNotification")) Then' Reporter.ReportEvent micPass,"Step 5: Verifying the Value in Comparison Field","The Value in the Comparison FIeld is : " & strData' Else' Reporter.ReportEvent micFail,"Step 5: Verifying the Value in Comparison Field","The Value in the Comparison FIeld is NOT : " & strData' Environment.Value("Execution_Log") = False' End If

    'Step 6Call Select_Combo_Value("CorporateActions","Profile - Upload Notificatio

    n","SenderType",DataTable.Value("SenderType","UploadNotification"))

    strSenderName = get_WebEdit_Value("CorporateActions","Profile - Upload Notification","SenderName")

    If strSenderName = "" ThenReporter.ReportEvent micPass,"Step 5: Verifying if the Sender Na

    me Field is Cleared or NOT","The Sender Name Field is Cleared"Else

    Reporter.ReportEvent micFail,"Step 5: Verifying if the Sender Name Field is Cleared or NOT","The Sender Name Field is NOT Cleared"

    Environment.Value("Execution_Log")= False

  • 8/7/2019 ADRCA Profile Upload Notification Old

    15/20

    End If

    ' Step 7Call click_Image("CorporateActions","Profile - Upload Notification","Sen

    derName")Browser("CorporateActions").Page("Profile - Upload Notification").Frame(

    "lookupFrame").WebEdit("CustodianName").Set DataTable.Value("CustodianName","Upl

    oadNotification")Call operation_on_FrameObjects_WithName("CorporateActions","Profile - Upload

    Notification","lookupFrame","Image","Go","")

    Call ReportLoadWaitinFrame("CorporateActions","Profile - Upload Notification","lookupFrame","FrameTable","Custodian")

    intRowCount = Browser("CorporateActions").Page("Profile - Upload Notification").Frame("lookupFrame").WebTable("FrameTable").RowCount

    For intRowCounter = 2 to intRowCountstrSelectAppValue = Browser("CorporateActions").Page("Profile -

    Upload Notification").Frame("lookupFrame").WebTable("FrameTable").GetCellData(in

    tRowCounter,1) If InStr(1,strSelectAppValue,DataTable.Value("CustodianName","UploadNotification")) 0 Then

    Browser("CorporateActions").Page("Profile - Upload Notification").Frame("lookupFrame").WebElement("html tag:= TD","innertext:= " & strSelectAppValue).Click

    Exit ForEnd If

    Next

    strSenderName = get_WebEdit_Value("CorporateActions","Profile - Upload Notification","SenderName")

    If Instr(strSenderName,DataTable.Value("CustodianName","UploadNotification")) 0 Then

    Reporter.ReportEvent micPass,"Step 6: Verfiying if the SelectedCustodian Name is displayed in the Sender Name Field or NOT","The Selected Custodian Name " & strSelectAppValue & " is Displayed in the Sender Name Field"

    ElseReporter.ReportEvent micFail,"Step 6: Verfiying if the Selected

    Custodian Name is displayed in the Sender Name Field or NOT","The Selected Custodian Name " & strSelectAppValue & " is NOT Displayed in the Sender Name Field"

    Environment.Value("Execution_Log") = FalseEnd If

    ' Step 8strCATypeValue = "Annual General Meeting (AGM)"Call click_Image("CorporateActions","Profile - Upload Notification","Cor

    porateActionType")Browser("CorporateActions").Page("Profile - Upload Notification").Frame(

    "lookupFrame").WebEdit("CorporateActionType").Set strCATypeValueCall operation_on_FrameObjects_WithName("CorporateActions","Profile - Up

    load Notification","lookupFrame","Image","Go","")

    Call ReportLoadWaitinFrame("CorporateActions","Profile - Upload Notification","lookupFrame","FrameTable","Corporate Action Type")

    strValue = DataTable("CorporateActionType","UploadNotification")Browser("CorporateActions").Page("Profile - Upload Notification").Frame("loo

    kupFrame").WebElement("html tag:= TD","innertext:= " & strValue).Click

  • 8/7/2019 ADRCA Profile Upload Notification Old

    16/20

    ' intRowCount = Browser("CorporateActions").Page("Profile - Upload Notification").Frame("lookupFrame").WebTable("FrameTable").RowCount' For intRowCounter = 2 to intRowCount' strSelectAppValue = Browser("CorporateActions").Page("Profile -Upload Notification").Frame("lookupFrame").WebTable("FrameTable").GetCellData(intRowCounter,1)

    ' If InStr(1,strSelectAppValue,strCATypeValue) 0 Then' strValue = DataTable("CorporateActionType","UploadNotification")' Browser("CorporateActions").Page("Profile - Upload Notification").Frame("lookupFrame").WebElement("html tag:= TD","innertext:= " & strValue).Click' Exit For' End If' Next

    strCorporateActionType = get_WebEdit_Value("CorporateActions","Profile -Upload Notification","CorporateActionType")

    If Trim(strCorporateActionType) = Trim(strCATypeValue) Then

    Reporter.ReportEvent micPass,"Step 7: Verifying if the SelectedValue is displayed in the Corporate Action Type Field or NOT","The Selected Value " & strSelectAppValue & "is displayed in the Corporate Action Field"

    ElseReporter.ReportEvent micFail,"Step 7: Verifying if the Selected

    Value is displayed in the Corporate Action Type Field or NOT","The Selected Value " & strSelectAppValue & "is NOT displayed in the Corporate Action Field"

    Environment.Value("Execution_Log") = FalseEnd If

    ' Step 8Call click_Image("CorporateActions","Profile - Upload Notification","Sav

    e")

    Call ValidationErrorDetails("CorporateActions","Profile - Upload Notification","Validation Error","Meeting Date","Validation Error")

    If Environment.Value("TestCase_Log") = True ThenReporter.ReportEvent micPass,"Step 8: Verifiyng if the Mandatory

    Field are displayed in the Validation Error or NOT","The Mandatory Field is displayed in the validation Error Table"

    ElseReporter.ReportEvent micFail,"Step 8: Verifiyng if the Mandatory

    Field are displayed in the Validation Error or NOT","The Mandatory Field is NOTdisplayed in the validation Error Table"

    Environment.Value("TestCase_Log") = TrueEnvironment.Value("Execution_Log") = False

    End If

    'Step 9Call click_image("CorporateActions","Profile - Upload Notification","Mee

    tingDate")strDate=split(DataTable.Value("MeetingDate","UploadNotification"),";",-1

    ,1)strMonth=strDate(1)strYear=strDate(2)strDateValue =strDate(0)Call ClickIcon_SetDate("CorporateActions","Profile - Upload Notification

    ",strMonth,strYear,strDateValue)

    intLen = Len(strDateValue)

  • 8/7/2019 ADRCA Profile Upload Notification Old

    17/20

    If intLen

  • 8/7/2019 ADRCA Profile Upload Notification Old

    18/20

    End If

    Call select_Menu("CorporateActions","Underlying Upload Notification","Home;DR Home")

    ElseReporter.ReportEvent micFail,"Step 11: Verifying if the Page ' U

    nderlying Notification' is displayed or NOT","The Page ' Underlying Notification

    is NOT displayed"Environment.Value("Execution_Log") = FalseCall select_Menu("CorporateActions","Profile - Upload Notificati

    on","Home;DR Home")End If

    End Function

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

    Public Function CAProfileUploadNotification_TC6()

    DataTable.GetSheet("UploadNotification").SetCurrentRow(6)Environment.Value("TestCase_Log") = TrueEnvironment.Value("Execution_Log") = TrueCall click_WebElement("CorporateActions","Depositary Receipt Division's"

    ,"CorporateActions")Call select_Menu("CorporateActions","CorporateActions",DataTable.Value("Menu

    Path","UploadNotification"))

    blnFlag = Browser("CorporateActions").Page("Profile - Upload Notification").Exist(5)

    If blnFlag = "True" Then

    Reporter.ReportEvent micPass,"Step 1: Verfiying if the Page ' Profile Upload Notification ' is displayed or NOT","The Page ' Profile Upload Notification ' is displayed successfully"

    ElseReporter.ReportEvent micFail,"Step 1: Verfiying if the Page ' Pr

    ofile Upload Notification ' is displayed or NOT","The Page ' Profile Upload Notification ' is NOT displayed successfully"

    Environment.Value("Execution_Log") = FalseEnd If

    Call CreateNewFolder("UploadFiles")strFilePath = CreateFile("UploadFiles",DataTable.Value("TestCaseID","Upl

    oadNotification"),"txt")

    intCount = Environment.Value("DATATABLE_ROW")intCounter = DataTable.GetSheet("UploadNotification").GetRowCountFor intRowCount = intCount to intCounter

    DataTable.GetSheet("UploadNotification").SetCurrentRow(intRowCount)

    If DataTable.Value("UnderlyingSecurity","UploadNotification") "" Then

    Call EnterRequiredDetails_UploadNotification("CorporateActions","Profile - Upload Notification",strFilePath)

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

    Reporter.ReportEvent micPass,"Verifiyng if the Values in the Fields are filled or NOT","The Values in the Fields ' ISIN, SEDOL and Sender Name' are automatically filled after entering the Underlying Security

  • 8/7/2019 ADRCA Profile Upload Notification Old

    19/20

    and Corporate Action Type Field is Null"Else

    Reporter.ReportEvent micFail,"Verifiyng if the Values in the Fields are filled or NOT","The Values in the Fields ' ISIN , SEDOLand Sender Name' are NOT filled automatically after entering the Underlying Security and Corporate Action Type Field is Null"

    Environment.Value("TestCase_Log") = True

    Environment.Value("Execution_Log") = FalseEnd If

    End If

    If DataTable.Value("RequiredFields","UploadNotification") ""Then

    strSelectValue = DataTable.Value("CorporateActionType","UploadNotification")

    strMandatoryField = DataTable.Value("RequiredFields","UploadNotification")

    Call SelectCorporateActionType("CorporateActions","Profi

    le - Upload Notification","CorporateActionType",strSelectValue)Call click_Image("CorporateActions","Profile - Upload Notification","Save")

    Call ValidationErrorDetails("CorporateActions","Profile- Upload Notification","Validation Error",strMandatoryField,"Validation Error")

    If Environment.Value("TestCase_Log") = True ThenReporter.ReportEvent micPass,"Verifying if the M

    andatory Field '" & strMandatoryField & " 'is Displayed in the Validation ErrorTable","The Mandatory Field'" & strMandatoryField & " 'is dispalyed in the Validation Error table"

    Else

    Reporter.ReportEvent micPass,"Verifying if the Mandatory Field '" & strMandatoryField & " 'is Displayed in the Validation ErrorTable","The Mandatory Field '" & strMandatoryField & " 'is NOT dispalyed in theValidation Error table"

    Environment.Value("TestCase_Log") = TrueEnvironment.Value("Execution_Log") = False

    End If

    End If

    If DataTable.Value("RequiredFields","UploadNotification") = "" Then

    strSelectValue = DataTable.Value("CorporateActionType","UploadNotification")

    Call SelectCorporateActionType("CorporateActions","Profile - Upload Notification","CorporateActionType",strSelectValue)

    Call click_Image("CorporateActions","Profile - Upload Notification","Save")

    If Browser("CorporateActions").Page("Underlying Upload Notification").Exist(5) Then

    Reporter.ReportEvent micPass,"Verify if the Fileis Uploaded successfully or NOT","The File is Uploaded Successfully"

    Call select_Menu("CorporateActions","Underlying

    Upload Notification",DataTable.Value("MenuPath","UploadNotification"))Else

    Reporter.ReportEvent micFail,"Verify if the File

  • 8/7/2019 ADRCA Profile Upload Notification Old

    20/20

    is Uploaded successfully or NOT","The File is NOT Uploaded Successfully"Call select_Menu("CorporateActions","Profile - U

    pload Notification",DataTable.Value("MenuPath","UploadNotification"))Environment.Value("Execution_Log") = False

    End If

    End If

    Next

    Call select_Menu("CorporateActions","Profile - Upload Notification","Home;DR Home")

    End Function

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