ADRCA_ProfileHome

download ADRCA_ProfileHome

of 6

Transcript of ADRCA_ProfileHome

  • 8/7/2019 ADRCA_ProfileHome

    1/6

    '=========================================================================================================' Name of the Script : Corporate Actions Home' Scope of the Script : This test script covers 4 test cases related to the CA Home page' Author: Renuka

    ' Description : Corporate Actions Home' Date and / or Version : 10-12-2008,version 1.0'===========================================================================================================

    Sub CA_Home()

    '****Declaration of Environmental Variable

    Environment.Value("Execution_Log")="true"

    '''''''''Test case countConst TC_COUNT = 4

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

    1)strBound = UBound(strIndVar)strAllPath =""

    For intPathCounter = 0 to strBound - 1

    strAllPath = strAllPath & strIndVar(intPathCounter) &"\"

    Next

    strPath = Trim(strPath)strDataPath = strAllPath & "Data

    Tables\"strLibPath = strAllPath & "Funct

    ion_Library\"

    '****Adding CA Login sheet to the dataTable and Importing the Input DataTable**************

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

    DataTable.AddSheet "CAHome"DataTable.ImportSheet strDataPat

    h & "CorporateActionsProfile.xls","CAHome","CAHome"DataTable.AddSheet "HomePageVeri

    fication"DataTable.ImportSheet strDataPat

    h & "CorporateActionsProfile.xls","HomePageVerification","HomePageVerification"Environment.Value("strSheetName"

    ) = "CAHome"

    ' Logs the Scenario name Execution in a .csv file

    Call Execution_log(DataTable.Val

  • 8/7/2019 ADRCA_ProfileHome

    2/6

  • 8/7/2019 ADRCA_ProfileHome

    3/6

    TestCaseDesc", "CAHome"), "FAIL")

    End If

    Reporter.ReportEvent micDone,"######### END OF TEST CASE - '" & DataTable("TestCaseID","CAHome") & "###########","The Test Case Execution Completed"

    End If

    'Checking AND incrementing the datatable

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

    ''Increment the test data table row

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

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

    strNext=Trim(DataTable.Value("TestCaseID","CAHome"))

    While strPrevious = strNext

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

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

    strNext=Trim(DataTable.Value("TestCaseID","CAHome"))

    Wend

    Next

    Call logoutfromApp("CorporateActions","Depositary Receipt Division's")''***************************************** TC Driver End *******************************************************

    End Sub

    '**********************************************Test Case 1 **************************************************Public Function CAHome_TC1()

    Environment.Value("TestCase_Log") = "true"

    '#Step1'Navigate to DR Home page after successful login

    .Call chkCAHomePage("CorporateActions","Deposita

    ry Receipt Division's",DataTable.Value("HomePageLinks","HomePageVerification"),DataTable.Value("UserName","HomePageVerification"))

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

  • 8/7/2019 ADRCA_ProfileHome

    4/6

    Reporter.ReportEvent micPass,"Step1: Check for DR Home Page","The Required Links and the User Details are displayed Successfully"

    ElseReporter

    .ReportEvent micFail,"Step1: Check for DR Home Page","The Required Links and theUser Details are NOT displayed Successfully"

    Environment.Value("TestCase_Log") = "false"

    End If

    End Function

    '**********************************************Test Case 2 **************************************************Public Function CAHome_TC3()

    Environment.value("TestCase_log")="true"

    ' Step#1 --> login -- covered in TC 1Reporter.ReportEvent micDone,"Step1: Navigate tothe DR home page after successful log in","This Step is performed in TC 1 itself"'' Step#2'' Clicks on Corporate Actions in DR Home page and verifying the menu items are displayed

    Browser("CorporateActions").Page("Depositary ReceiptDivision's").WebElement("CorporateActions").Click

    Call chkCAPage("CorporateActions","Depositary ReceiptDivision's",DataTable.Value("MenuName","HomePageVerification"))

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

    Reporter.ReportEvent micPass,"Step2: Check for the menu items in CA Home Page","The Required Menu items are displayed Successfully"

    ElseReporter

    .ReportEvent micFail,"Step2: Check for the menu items in CA Home Page","The Required Menu items are NOT displayed "

    Environment.Value("TestCase_Log") = "false"

    End If' Step#3' Move mouse over any menu and select item from Menu.Ex:- Profile -> Underlying Event

    Call select_Menu("CorporateActions","CORPORATE ACTIONS",DataTable.Value("MenuPath1","CAHome"))

    ' Verifying the required menu items are present in the screen

    Call chkCAPage("CorporateActions","Depositary Receipt Division's",DataTable.Value("MenuName","HomePageVerification"))

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

  • 8/7/2019 ADRCA_ProfileHome

    5/6

    Reporter.ReportEvent micPass,"Step3: Check for the menu items in the selected search screen","The Required Menu items are displayed Successfully"

    ElseReporter

    .ReportEvent micFail,"Step3: Check for the menu items in the selected search screen","The Required Menu items are NOT displayed "

    Environment.Value("TestCase_Log") = "false"

    End If

    'step#4' Select 'DR Home' under 'Home'.

    Call select_Menu("CorporateActions","CORPORATE ACTIONS",DataTable.Value("MenuPath2","CAHome"))

    If Browser("CorporateActions").Page("Depositary Receipt Division's").Exist(2) Then

    Reporter.ReportEvent micPass,"Step4:Check for the presense of the ADR home page","The ADR Home page appe

    ars as required" ElseReporter.ReportEvent mic

    Fail,"Step4: Check for the presense of the ADR home page","The ADR home page does not appear as required"

    Environment.Value("Execution_Log")="false"

    End IfEnd Function'************************************************* Test Case 4 ******************Public Function CAHome_TC4()

    'step#1' Navigate to DR Home page after successful login.

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

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

    Reporter.ReportEvent micPass,"Step1: Check for DR Home Page","The Required Links and the User Details are displayed Successfully"

    ElseRepo

    rter.ReportEvent micFail," Step1:Check for DR Home Page","The Required Links and the User Details are NOT displayed Successfully"

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

    ' step#2' Click on Corporate Actions in DR Home page.

    Browser("CorporateActions").Page("Depositary Receipt Division's").WebElement("CorporateActions").Click

    If Browser("CorporateActions").Page("CORPORATE ACTIONS").Exist(2) Then

    Reporter.ReportEvent micPass,"Step2: Check whether the Corporate actions page appears or not","The Corporate actions page appears as required"

  • 8/7/2019 ADRCA_ProfileHome

    6/6

    ElseReporter.ReportEvent mi

    cFail,"Step2: Check whether the corporate actions page appears or not","The Corporate actions page does not appear as required"

    Environment.Value("Execution_Log")="false"

    End If

    ' step#3' Move mouse over any menu and select item from Menu. Ex:- Profile -> Underlying Notification Search

    Call select_Menu("CorporateActions","CORPORATE ACTIONS",DataTable.Value("MenuPath1","CAHome"))

    Call chkCAPage("CorporateActions","Depositary Receipt Division's",DataTable.Value("MenuName","HomePageVerification"))

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

    Reporter.ReportEvent micPass,"Step3: Check for the menu items in the selected search screen","The Required Menu items are displayed Successfully"

    Else

    Step3: Reporter.ReportEvent micFail,"Step3: Check for the menu items in the selected search screen","The Required Menu items are NOT displayed "

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

    'step #4' Click on 'Home' in any of the search screens.

    Browser("CorporateActions").Page("CORPORATE ACTIONS").WebElement("HOME").Click

    If Browser("CorporateActions").Page("Depositary Receipt Division's").Exist(2) Then

    Reporter.ReportEvent micPass,"Step4:Check for the presense of the ADR home page","The ADR Home page appears as required"

    ElseReporter.ReportEvent mic

    Fail,"Step4: Check for the presense of the ADR home page","The ADR home page does not appear as required"

    Environment.Value("Execution_Log")="false"

    End IfEnd Function

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