Professional Documents
Culture Documents
ADRCA ReportsUnderlyingSourceComparision
ADRCA ReportsUnderlyingSourceComparision
ADRCA ReportsUnderlyingSourceComparision
==========================
' Name of the Script : CA Reports Underlying Source
Comaprision
' Scope of the Script : This test script covers 15 te
st cases related to the UnderlyingSourceComparison in Corporate Action Applicati
on
' Author : Shyam H D
' Description : CA Reports UnderlyingSourceCo
mparison
' Date and / or Version : 05-03-2009,version 1.0
'===============================================================================
============================
Sub CAReportsUnderlyingSourComparision()
'****Declaration of Environmental Variable
Environment.Value("strSheetName")= "UnderlyingSourceComparison"
'''''''''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\"
' Including the Library files where all the Scripts are saved
'ExecuteFile strLibPath & "CAReportsUnderlyingSourceComparisonTC
.vbs"
'****Adding MFLogin sheet to the dataTable and Importing the Inp
ut DataTable
DataTable.AddSheet "CALogin"
DataTable.ImportSheet strDataPath & "Login.xls","CALogin","CALog
in"
DataTable.AddSheet "UnderlyingSourceComparison"
DataTable.ImportSheet strDataPath & "CorporateActionsReports.xls
","UnderlyingSourceComparison","UnderlyingSourceComparison"
DataTable.AddSheet "ReportHeader"
DataTable.ImportSheet strDataPath & "CorporateActionsReports.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"), "
", "", "")
'****Invoking IE and navigating to the ADR Login page
DataTable.GetSheet("CALogin").SetCurrentRow(1)
Call invoke_URL("CorporateActions","Login Page",DataTable.Value(
"URL","CALogin"))
'****Checking the username, password and login objects in the lo
gin 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 masterfil
e application
Call login("CorporateActions","Login Page","User","CALogin")
Environment.Value("DATATABLE_ROW")=1
DataTable.GetSheet("UnderlyingSourceComparison").SetCurrentRow(E
nvironment.Value("DATATABLE_ROW"))
'***************************************** TC Driver Strat *****
**************************************************
For intTCCount = 1 to TC_COUNT
Environment.Value("Execution_Log") = "True"
Environment.Value("TestCase_Log") = "True"
If DataTable("TestRunFlag","UnderlyingSourceComparison")
="Y" Then ''If run flag is Y in test data table
Reporter.ReportEvent micDone,"######## BEGIN TES
T CASE - '" & DataTable("TestCaseID","UnderlyingSourceComparison") & "' ########
### ","Execution of Test Case '" & DataTable("TestCaseDesc","UnderlyingSourceCom
parison") & "' Started"
strFuncName = "CAReportsUSC_TC" & intTCCount & "
()" ''Formation of function name
''Call Function
Execute "Call " & strFuncName
If Environment.Value("Execution_Log") = "True"
Then
Call Execution_log("",Datatable.
Value("TestCaseID", "UnderlyingSourceComparison"), Datatable.Value("TestCaseDesc
", "UnderlyingSourceComparison"), "PASS")
Else
Call Execution_log("",Datatable.
Value("TestCaseID", "UnderlyingSourceComparison"), Datatable.Value("TestCaseDesc
", "UnderlyingSourceComparison"), "FAIL")
End If
Reporter.ReportEvent micDone,"######### END OF T
EST CASE - '" & DataTable("TestCaseID","UnderlyingSourceComparison") & "########
###","The Test Case Execution Completed"
End If
strPrevious=Trim(DataTable.Value("TestCaseID","Underlyin
gSourceComparison"))
''Increment the test data table row
Environment.Value("DATATABLE_ROW") = Environment.Value("
DATATABLE_ROW") + 1
DataTable.GetSheet("UnderlyingSourceComparison").SetCurr
entRow(Environment.Value("DATATABLE_ROW"))
strNext=Trim(DataTable.Value("TestCaseID","UnderlyingSou
rceComparison"))
While strPrevious = strNext
Environment.Value("DATATABLE_ROW") = Environment
.Value("DATATABLE_ROW") + 1
DataTable.GetSheet("UnderlyingSourceComparison")
.SetCurrentRow(Environment.Value("DATATABLE_ROW"))
strNext=Trim(DataTable.Value("TestCaseID","Under
lyingSourceComparison"))
Wend
Next
Call logoutfromApp("CorporateActions","Depositary Receipt Divisi
on's")
'***************************************** TC Driver End *******
************************************************
End Sub
'********************************************** Test Case 1 to Test Case 15 ****
**********************************************
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++
Public Function CAReportsUSC_TC2()
Environment.Value("TestCase_Log") = "True"
'Selecting the UnderlyingSourceComparison Sub Menu from Reports
Menu and Waits for the Search Image to be Visible
Call click_WebElement("CorporateActions","Depositary Receipt Div
ision's","CorporateActions")
Call Select_Menu("CorporateActions","CorporateActions",DataTable
.Value("MenuPath","UnderlyingSourceComparison"))
Browser("CorporateActions").Page("Reports - Underlying Source Co
mparison Search Page").Image("Search").WaitProperty "Visible","True",100000
blnFlag = Browser("CorporateActions").Page("Reports - Underlying
Source Comparison Search Page").Exist(1)
If blnFlag = "False" Then
Environment.Value("TestCase_Log") = "False"
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1: Verifying
the Reports Underlying Source Comparison page","The Page Reports Underlying Sou
rce Comparison is Displayed"
Else
Reporter.ReportEvent micFail,"Step 1: Verifying
the Reports Underlying Source Comparison page","The Page Reports Underlying Sou
rce Comparison is NOT Displayed"
Environment.Value("Execution_Log") = "False"
Environment.Value("TestCase_Log") = "True"
End If
strEventName = get_WebEdit_Value("CorporateActions","Reports - U
nderlying Source Comparison Search Page","EventName")
strEventDate = get_WebEdit_Value("CorporateActions","Reports - U
nderlying Source Comparison Search Page","EventDate")
strCAType = get_WebEdit_Value("CorporateActions","Reports - Unde
rlying Source Comparison Search Page","CorporateActionType")
strISIN = get_WebEdit_Value("CorporateActions","Reports - Underl
ying Source Comparison Search Page","ISIN")
If strEventName = "" AND strEventDate = "" AND strCAType ="" AND
strISIN = "" Then
Reporter.ReportEvent micPass,"Step 2: Verifying
the Default Values of the Field Present", "The Default Value of the Field Presen
t is NULL"
Else
Reporter.ReportEvent micFail,"Step 2: Verifying
the Default Values of the Field Present", "The Default Value of the Field Presen
t are NOT NULL"
Environment.Value("Execution_Log") = "False"
Call captureScreenShot()
End If
'Entering the Event Name as the Search Criteria , checking for S
earch Criteria and the Report Header
Call USCchkReportsDetails("CorporateActions","Reports - Underlyi
ng Source Comparison Search Page",DataTable.Value("SelectEventName","UnderlyingS
ourceComparison"),"EventName")
'Logs the Status of the Test Case Execution in a .csv file
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 3, 4, 5 ,6: V
erifying the Results are Displayed according to the Search Criteria Entered","Th
e Results are Generated according to the Search Criteria Entered"
Else
Reporter.ReportEvent micFail,"Step 3, 4, 5 ,6: V
erifying the Results are Displayed according to the Search Criteria Entered","Th
e Results are NOT Generated according to the Search Criteria Entered"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call Select_Menu("CorporateActions","Reports - Underlying Source
Comparison Search Report","Home;DR Home")
End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++
Public Function CAReportsUSC_TC4()
Environment.Value("TestCase_Log") = "True"
'Selecting the UnderlyingSourceComparison Sub Menu from Reports
Menu and Waits for the Search Image to be Visible
Call click_WebElement("CorporateActions","Depositary Receipt Div
ision's","CorporateActions")
Call Select_Menu("CorporateActions","CorporateActions",DataTable
.Value("MenuPath","UnderlyingSourceComparison"))
Browser("CorporateActions").Page("Reports - Underlying Source Co
mparison Search Page").Image("Search").WaitProperty "Visible","True",100000
blnFlag = Browser("CorporateActions").Page("Reports - Underlying
Source Comparison Search Page").Exist(1)
If blnFlag = "False" Then
Environment.Value("TestCase_Log") = "False"
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1: Verifying
the Reports Underlying Source Comparison page","The Page Reports Underlying Sou
rce Comparison is Displayed"
Else
Reporter.ReportEvent micFail,"Step 1: Verifying
the Reports Underlying Source Comparison page","The Page Reports Underlying Sou
rce Comparison is NOT Displayed"
Environment.Value("Execution_Log") = "False"
Environment.Value("TestCase_Log") = "True"
End If
' Entering the Event Date as the Search Criteria , checking for
Search Criteria and the Report Header
Wait(2)
Call USCchkReportsDetails("CorporateActions","Reports - Underlyi
ng Source Comparison Search Page",DataTable.Value("SelectEventNameinEventDate","
UnderlyingSourceComparison"),"EventDate")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 2,3,4,5,6,7:
Verifying the Selected Event Name, checking for the Search Criteria and the resp
ective Results ","The Results are Dispalyed according to the Search Criteria"
Else
Reporter.ReportEvent micFail,"Step 2,3,4,5,6,7:
Verifying the Selected Event Name, checking for the Search Criteria and the resp
ective Results ","The Results are NOT Dispalyed according to the Search Criteria
"
Environment.Value("Execution_Log") = "False"
Environment.Value("TestCase_Log") = "True"
End If
Call Select_Menu("CorporateActions","Reports - Underlying Source
Comparison Search Report","Home;DR Home")
End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++
Public Function CAReportsUSC_TC7()
Environment.Value("TestCase_Log") = "True"
'Selecting the UnderlyingSourceComparison Sub Menu from Reports
Menu and Waits for the Search Image to be Visible
Call click_WebElement("CorporateActions","Depositary Receipt Div
ision's","CorporateActions")
Call Select_Menu("CorporateActions","CorporateActions",DataTable
.Value("MenuPath","UnderlyingSourceComparison"))
Browser("CorporateActions").Page("Reports - Underlying Source Co
mparison Search Page").Image("Search").WaitProperty "Visible","True",100000
blnFlag = Browser("CorporateActions").Page("Reports - Underlyin
g Source Comparison Search Page").Exist(1)
If blnFlag = "False" Then
Environment.Value("TestCase_Log") = "False"
End If
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1: Verifying
the Reports Underlying Source Comparison page","The Page Reports Underlying Sou
rce Comparison is Displayed"
Else
Reporter.ReportEvent micFail,"Step 1: Verifying
the Reports Underlying Source Comparison page","The Page Reports Underlying Sou
rce Comparison is NOT Displayed"
Environment.Value("Execution_Log") = "False"
Environment.Value("TestCase_Log") = "True"
End If
Call USCchkReportsDetails("CorporateActions","Reports - Underlying Sou
rce Comparison Search Page",DataTable.Value("SelectEventNameinISIN","UnderlyingS
ourceComparison"),"ISIN")
If Environment.Value("TestCase_Log")= "True" Then
Reporter.ReportEvent micPass,"Step 2,3,4: Verify
ing the Data filled in the Fields in the UnderlyingSourceComparison","The Entere
d Values are Displayed successfully in the Page"
Else
Reporter.ReportEvent micFail,"Step 2,3,4: Verify
ing the Data filled in the Fields in the UnderlyingSourceComparison","The Entere
d Values are NOT Displayed successfully in the Page"
Environment.Value("Execution_Log") = "False"
Environment.Value("TestCase_Log")= "True"
End If
Call click_Image("CorporateActions","Reports - Underlying Source
Comparison Search Page","Clear")
Wait(5)
strEventName = get_WebEdit_Value("CorporateActions","Reports -
Underlying Source Comparison Search Page","EventName")
strEventDate = get_WebEdit_Value("CorporateActions","Reports - U
nderlying Source Comparison Search Page","EventDate")
strCAType = get_WebEdit_Value("CorporateActions","Reports - Unde
rlying Source Comparison Search Page","CorporateActionType")
strISIN = get_WebEdit_Value("CorporateActions","Reports - Underl
ying Source Comparison Search Page","ISIN")
If strEventName = "" AND strEventDate = "" AND strCAType ="" AND
strISIN = "" Then
Reporter.ReportEvent micPass,"Step 5: Verifying
if the Displayed Results are Cleared or NOT","The Displayed Results are Cleared"
Else
Reporter.ReportEvent micFail,"Step 5: Verifying
if the Displayed Results are Cleared or NOT","The Displayed Results are NOT Clea
red"
Environment.Value("Execution_Log")= "False"
Call captureScreenShot()
End If
Call Select_Menu("CorporateActions","Reports - Underlying Source
Comparison Search Page","Home;DR Home")
End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++
Public Function CAReportsUSC_TC13()
Environment.Value("TestCase_Log") = "True"
'Selecting the UnderlyingSourceComparison Sub Menu from Reports
Menu and Waits for the Search Image to be Visible
Call click_WebElement("CorporateActions","Depositary Receipt Div
ision's","CorporateActions")
Call Select_Menu("CorporateActions","CorporateActions",DataTable
.Value("MenuPath","UnderlyingSourceComparison"))
Browser("CorporateActions").Page("Reports - Underlying Source Co
mparison Search Page").Image("Search").WaitProperty "Visible","True",100000
'Entering the Event Name as the Search Criteria , checking for Search Crit
eria and the Report Header
Call USCchkReportsDetails("CorporateActions","Reports - Underlyi
ng Source Comparison Search Page",DataTable.Value("SelectEventName","UnderlyingS
ourceComparison"),"EventName")
' Clicks on the Sort Element and fills the Sort Criteria
Call SortCriteria("CorporateActions","Reports - Underlying Sourc
e Comparison Search Report","Sort",DataTable.Value("SortColumn","UnderlyingSourc
eComparison"),DataTable.Value("SortOrder","UnderlyingSourceComparison"))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1,2: Verifyin
g the Sort functionality","The Fields are Sorted according to the Sorted Criteri
a"
Else
Reporter.ReportEvent micFail,"Step 1,2: Verifyin
g the Sort functionality","The Fields are NOT Sorted according to the Sorted Cri
teria"
Environment.Value("Execution_Log") = "False"
Environment.Value("TestCase_Log") = "True"
End If
Call Select_Menu("CorporateActions","Reports - Underlying Source
Comparison Search Report","Home;DR Home")
End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++
Public Function CAReportsUSC_TC14()
Environment.Value("TestCase_Log") = "True"
'Selecting the UnderlyingSourceComparison Sub Menu from Reports
Menu and Waits for the Search Image to be Visible
Call click_WebElement("CorporateActions","Depositary Receipt Div
ision's","CorporateActions")
Call Select_Menu("CorporateActions","CorporateActions",DataTable
.Value("MenuPath","UnderlyingSourceComparison"))
Browser("CorporateActions").Page("Reports - Underlying Source Co
mparison Search Page").Image("Search").WaitProperty "Visible","True",100000
'Entering the Event Name as the Search Criteria , checking for Search Crit
eria and the Report Header
Call USCchkReportsDetails("CorporateActions","Reports - Underlyi
ng Source Comparison Search Page",DataTable.Value("SelectEventName","UnderlyingS
ourceComparison"),"EventName")
' Clicks on the Sort Element and fills the Sort Criteria
Call MultipleSortCriteria("CorporateActions","Reports - Underlying Sourc
e Comparison Search Report","Sort",DataTable.Value("SortColumn","UnderlyingSourc
eComparison"),DataTable.Value("SortOrder","UnderlyingSourceComparison"))
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 1,2,3,4,5: Ve
rifying the Sort functionality by entering the Sort Criteria by clicking on Add
button","The Fields are Sorted according to the Sorted Criteria"
Else
Reporter.ReportEvent micFail,"Step 1,2,3,4,5: Ve
rifying the Sort functionality by entering the Sort Criteria by clicking on Add
button","The Fields are NOT Sorted according to the Sorted Criteria"
Environment.Value("Execution_Log") = "False"
Environment.Value("TestCase_Log") = "True"
End If
Call Select_Menu("CorporateActions","Reports - Underlying Source
Comparison Search Report","Home;DR Home")
End Function
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++
Public Function CAReportsUSC_TC15()
Environment.Value("TestCase_Log") = "True"
'Selecting the UnderlyingSourceComparison Sub Menu from Reports
Menu and Waits for the Search Image to be Visible
Call click_WebElement("CorporateActions","Depositary Receipt Div
ision's","CorporateActions")
Call Select_Menu("CorporateActions","CorporateActions",DataTable
.Value("MenuPath","UnderlyingSourceComparison"))
Browser("CorporateActions").Page("Reports - Underlying Source Co
mparison Search Page").Image("Search").WaitProperty "Visible","True",100000
'Entering the Event Name as the Search Criteria , checking for S
earch Criteria and the Report Header
Call USCchkReportsDetails("CorporateActions","Reports - Underlyi
ng Source Comparison Search Page",DataTable.Value("SelectEventName","UnderlyingS
ourceComparison"),"EventName")
Wait(5)
var_X = Browser("CorporateActions").Page("Reports - Underlying S
ource Comparison Search Report").WebElement("SaveAsExcel").GetROProperty("x")
var_Y = Browser("CorporateActions").Page("Reports - Underlying S
ource Comparison Search Report").WebElement("SaveAsExcel").GetROProperty("y")
Window("regexpwndtitle:=Microsoft Internet Explorer", "regexpwnd
class:=IEFrame").WinObject("regexpwndclass:=Internet Explorer_Server").Click var
_X+10, var_Y+10
Wait(10)
If Dialog("text:=File Download").Exist(2) Then
blnSaveFlag = Dialog("text:=File Download").WinB
utton("text:=&Save").Exist(1)
blnOpenFlag = Dialog("text:=File Download").WinB
utton("text:=&Open").Exist(1)
blnCancelFlag = Dialog("text:=File Download").Wi
nButton("text:=Cancel").Exist(1)
If blnSaveFlag = "True" AND blnOpenFlag ="True"
AND blnCancelFlag = "True" Then
Reporter.ReportEvent micPass,"Step 1: Ve
rifying for the Dialog and respective buttons","The Dialog is displayed with Sav
e, Open and Cancel button"
Else
Reporter.ReportEvent micFail,"Step 1: Ve
rifying for the Dialog and respective buttons","The Dialog is NOT displayed with
Save, Open and Cancel button"
Call captureScreenShot()
Environment.Value("TestCase_Log") = "Fal
se"
Environment.Value("Execution_Log") = "Fa
lse"
End If
Else
Reporter.ReportEvent micFail,"Step 1: Verifying
if the Save Dialog is Displayed or NOT","The Save Dialog is NOT displayed"
Call captureScreenShot()
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
' Clicking on Save As Excel and Opening the Excel Sheet
Call SaveASExcel_USC("CorporateActions","Reports - Underlying So
urce Comparison Search Report","UnderlyingSourceComparison","Open")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 2: Verifying
if the Excel Sheet is Opened Successfully","The Excel Sheet is Opened Successful
ly dispalying the Result details"
Else
Reporter.ReportEvent micFail,"Step 2: Verifying
if the Excel Sheet is Opened Successfully","The Excel Sheet is NOT Opened Succe
ssfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call Click_WebElement("CorporateActions","Reports - Underlying S
ource Comparison Search Report","Search")
'Call Select_Menu("CorporateActions","Reports - Underlying Sourc
e Comparison Search Report",DataTable.Value("MenuPath","UnderlyingSourceComparis
on"))
Browser("CorporateActions").Page("Reports - Underlying Source Co
mparison Search Page").Image("Search").WaitProperty "Visible","True",100000
'Entering the Event Name as the Search Criteria , checking for S
earch Criteria and the Report Header
Call USCchkReportsDetails("CorporateActions","Reports - Underlyi
ng Source Comparison Search Page",DataTable.Value("SelectEventName","UnderlyingS
ourceComparison"),"EventName")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 3: Verifying
the generated Report Result","The Report is generated as per the Search Criteria
"
Else
Reporter.ReportEvent micFail,"Step 3: Verifying
the generated Report Result","The Report is NOT generated as per the Search Crit
eria"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
var_X = Browser("CorporateActions").Page("Reports - Underlying S
ource Comparison Search Report").WebElement("SaveAsExcel").GetROProperty("x")
var_Y = Browser("CorporateActions").Page("Reports - Underlying S
ource Comparison Search Report").WebElement("SaveAsExcel").GetROProperty("y")
Window("regexpwndtitle:=Microsoft Internet Explorer", "regexpwnd
class:=IEFrame").WinObject("regexpwndclass:=Internet Explorer_Server").Click var
_X+10, var_Y+10
If Dialog("text:=File Download").Exist(2) Then
blnSaveFlag = Dialog("text:=File Download").WinB
utton("text:=&Save").Exist(1)
blnOpenFlag = Dialog("text:=File Download").WinB
utton("text:=&Open").Exist(1)
blnCancelFlag = Dialog("text:=File Download").Wi
nButton("text:=Cancel").Exist(1)
If blnSaveFlag = "True" AND blnOpenFlag ="True"
AND blnCancelFlag = "True" Then
Reporter.ReportEvent micPass,"Step 4: Ve
rifying for the Dialog and respective buttons","The Dialog is displayed with Sav
e, Open and Cancel button"
Else
Reporter.ReportEvent micFail,"Step 4: Ve
rifying for the Dialog and respective buttons","The Dialog is NOT displayed with
Save, Open and Cancel button"
Call captureScreenShot()
Environment.Value("TestCase_Log") = "Fal
se"
Environment.Value("Execution_Log") = "Fa
lse"
End If
Else
Reporter.ReportEvent micFail,"Step 4: Verifying
if the Save Dialog is Displayed or NOT","The Save Dialog is NOT displayed"
Call captureScreenShot()
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
' Clicking on the Field Name field for Sorting
Browser("CorporateActions").Page("Reports - Underlying Source Co
mparison Search Report").WebElement("html tag:=TH","innertext:=Field Name").Clic
k
' Saving the Result in a Excel sheet.
Call SaveASExcel("CorporateActions","Reports - Underlying Source
Comparison Search Report","UnderlyingSourceComparison","Save")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 5: Verifying
if the File is Saved Successfully or Not","The File is saved Successfully"
Else
Reporter.ReportEvent micFail,"Step 5: Verifying
if the File is Saved Successfully or Not","The File is NOT saved Successfully"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call Click_WebElement("CorporateActions","Reports - Underlying S
ource Comparison Search Report","Search")
'Call Select_Menu("CorporateActions","Reports - Underlying Sourc
e Comparison Search Report",DataTable.Value("MenuPath","UnderlyingSourceComparis
on"))
Browser("CorporateActions").Page("Reports - Underlying Source Co
mparison Search Page").Image("Search").WaitProperty "Visible","True",100000
'Entering the Event Name as the Search Criteria , checking for S
earch Criteria and the Report Header
Call USCchkReportsDetails("CorporateActions","Reports - Underlyi
ng Source Comparison Search Page",DataTable.Value("SelectEventName","UnderlyingS
ourceComparison"),"EventName")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 6: Verifying
the generated Report Result","The Report is generated as per the Search Criteria
"
Else
Reporter.ReportEvent micFail,"Step 6: Verifying
the generated Report Result","The Report is NOT generated as per the Search Crit
eria"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
var_X = Browser("CorporateActions").Page("Reports - Underlying S
ource Comparison Search Report").WebElement("SaveAsExcel").GetROProperty("x")
var_Y = Browser("CorporateActions").Page("Reports - Underlying S
ource Comparison Search Report").WebElement("SaveAsExcel").GetROProperty("y")
Window("regexpwndtitle:=Microsoft Internet Explorer", "regexpwnd
class:=IEFrame").WinObject("regexpwndclass:=Internet Explorer_Server").Click var
_X+10, var_Y+10
If Dialog("text:=File Download").Exist(2) Then
blnSaveFlag = Dialog("text:=File Download").WinB
utton("text:=&Save").Exist(1)
blnOpenFlag = Dialog("text:=File Download").WinB
utton("text:=&Open").Exist(1)
blnCancelFlag = Dialog("text:=File Download").Wi
nButton("text:=Cancel").Exist(1)
If blnSaveFlag = "True" AND blnOpenFlag ="True"
AND blnCancelFlag = "True" Then
Reporter.ReportEvent micPass,"Step 7: Ve
rifying for the Dialog and respective buttons","The Dialog is displayed with Sav
e, Open and Cancel button"
Else
Reporter.ReportEvent micFail,"Step 7: Ve
rifying for the Dialog and respective buttons","The Dialog is NOT displayed with
Save, Open and Cancel button"
Call captureScreenShot()
Environment.Value("TestCase_Log") = "Fal
se"
Environment.Value("Execution_Log") = "Fa
lse"
End If
Else
Reporter.ReportEvent micFail,"Step 7: Verifying
if the Save Dialog is Displayed or NOT","The Save Dialog is NOT displayed"
Call captureScreenShot()
Environment.Value("TestCase_Log") = "False"
Environment.Value("Execution_Log") = "False"
End If
' Saving the Result in a Excel sheet.
Call SaveASExcel("CorporateActions","Reports - Underlying Source
Comparison Search Report","UnderlyingSourceComparison","Cancel")
If Environment.Value("TestCase_Log") = "True" Then
Reporter.ReportEvent micPass,"Step 8: Verifying
if the Save Dialog is Closed or NOT","The Saved Dialog is Closed Successfully"
Else
Reporter.ReportEvent micFail,"Step 8: Verifying
if the Save Dialog is Closed or NOT","The Saved Dialog is NOT Closed Successfull
y"
Environment.Value("TestCase_Log") = "True"
Environment.Value("Execution_Log") = "False"
End If
Call Select_Menu("CorporateActions","Reports - Underlying Source
Comparison Search Report","Home;DR Home")
End Function