You are on page 1of 16

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

==========================
' Name of the Script : MFProfileEnterprise
' Scope of the Script : This test script covers 7
test cases related to MasterFile Profile Enterprise
' Author : Satish Dupati
' Description : MFReportsBNYContactS
earch
' Date and / or Version : 05-11-2008,version 1.0
' Information
: Need to Remove RamCharanThej Entrerprise
'===============================================================================
============================
Sub MFProfileEnterprise()
'****Declaration of Environmental Variable
Environment.Value("Execution_Log")="True"
'''''''''Test case count
Const TC_COUNT =7
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 & "CAReportsAgingItemsTC.vbs"
'****Adding MFLogin sheet to the dataTable and Importing the In
put DataTable
DataTable.AddSheet "MFLogin"
DataTable.ImportSheet strDataPath & "Login.xls","MFLogin","MFLog
in"
DataTable.AddSheet "HomePageVerification"
DataTable.ImportSheet strDataPath & "MasterFileProfile.xls","Hom
ePageVerification","HomePageVerification"
DataTable.AddSheet "Enterprise"
DataTable.ImportSheet strDataPath & "MasterFileProfile.xls","Ent
erprise","Enterprise"
'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("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("Enterprise").SetCurrentRow(Environment.Value
("DATATABLE_ROW"))
'***************************************** TC Driver Strat *****
**************************************************
For intTCCount = 1 to TC_COUNT
Environment.Value("Execution_Log") = "True"
If DataTable("TestRunFlag","Enterprise") = "Y" Then
''If run flag is Y in test data table
Reporter.ReportEvent micDone,"######## BEGIN TES
T CASE - '" & DataTable("TestCaseID","Enterprise") & "' ########### ","Execution
of Test Case '" & DataTable("TestCaseDesc","Enterprise") & "' Started"
strFuncName = "MFProfileEnterprise_TC" & intTCCount & "()"
''Formation of function name
Execute "Call " & strFuncName
If Environment.Value("Execution_Log") = "True"
Then
Call Execution_log("",Datatable.
Value("TestCaseID", "Enterprise"), Datatable.Value("TestCaseDesc", "Enterprise")
, "PASS")
Else
Call Execution_log("",Datatable.
Value("TestCaseID", "Enterprise"), Datatable.Value("TestCaseDesc", "Enterprise")
, "FAIL")
End If
Reporter.ReportEvent micDone,"######### END OF T
EST CASE - '" & DataTable("TestCaseID","Enterprise") & "###########","The Test C
ase Execution Completed"
End If
strPrevious=Trim(DataTable.Value("TestCaseID","Enterpris
e"))
''Increment the test data table row
Environment.Value("DATATABLE_ROW") = Environment.Value("
DATATABLE_ROW") + 1
DataTable.GetSheet("Enterprise").SetCurrentRow(Environme
nt.Value("DATATABLE_ROW"))
strNext=Trim(DataTable.Value("TestCaseID","Enterprise"))
While strPrevious = strNext
Environment.Value("DATATABLE_ROW") = Environment
.Value("DATATABLE_ROW") + 1
DataTable.GetSheet("Enterprise").SetCurrentRow(E
nvironment.Value("DATATABLE_ROW"))
strNext=Trim(DataTable.Value("TestCaseID","Enter
prise"))
Wend
Next
Call logoutfromApp("MasterFile","Depositary Receipt Division's"
)
'***************************************** TC Driver End *******
************************************************

End Sub
'**********************************************Test Case 1 to Test Case 7*******
*******************************************
'===============================================================================
======================================================
Public Function MFProfileEnterprise_TC1()
'Step 1
Call chkADRHomePage("MasterFile","Depositary Receipt Division's"
,DataTable.Value("HomePageLinks","HomePageVerification"),Environment.Value("Norm
alUser"))
' Call chkHomePage("MasterFile","Depositary Receipt Division's",DataTable.
Value("HomePageLinks","Enterprise"))
Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
Call chkMFCAHomePage("MasterFile","MasterFile",DataTable.Value("
MenuName","HomePageVerification"),Environment.Value("NormalUser"))
Wait(3)
Call check_Menu("MasterFile","MasterFile",DataTable.Value("Check
Menu","Enterprise"))
Call select_Menu("MasterFile","MasterFile","Profile;Enterprise")
Call click_Image("MasterFile","Profile - Enterprise Search","New
")
Wait(5)
Call pageCheck_WebEdit("MasterFile","Enterprise Profile","leNm_0
;custIdNo_0","")
If Browser("MasterFile").Page("Enterprise Profile").WebEdit("Com
ments").Exist Then
Reporter.ReportEvent micPass,"Comment field is Editable to creat
e new Enterprise","Passed"
Else
Reporter.ReportEvent micFail,"Comment field is not present to c
reate new Enterprise","Failed"
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="False"
End If
Call pageCheck_WebList("MasterFile","Enterprise Profile","incCtr
yCd_0","")
'Developing New Enterprise
If DataTable.Value("Name","Enterprise") <> "" Then
Call set_WebEdit_Value ("MasterFile","Enterprise
Profile","Name",datatable.Value("Name","Enterprise"))
End If
If DataTable.Value("CID","Enterprise") <> "" Then
Call click_Image("MasterFile","Enterprise Profile","info(?)")
cid=datatable.Value("CID","Enterprise")
Call operation_on_FrameObjects_WithName("MasterFile","Enterprise
Profile", "lookupFrame","WebEdit","custCidNumber",cid)
'Call operation_on_FrameObjects_WithName(strBrowserName,strPageN
ame, "lookupFrame","WebEdit","cusipName",strCUSIPNameValue)
Call operation_on_FrameObjects_WithName("MasterFile","Enterprise
Profile", "lookupFrame","Image","Go","")
Browser("MasterFile").Page("Enterprise Profile").Frame("lookupFr
ame").WebElement("innertext:="&cid).click
End If
If DataTable.Value("CountryOfIncorporation","Enterprise") <> ""
Then
Call select_Combo_Value ("MasterFile","Enterpris
e Profile","CountryOfIncorporation",datatable.Value("CountryOfIncorporation","En
terprise"))
End If
If DataTable.Value("Comments","Enterprise") <> "" Then
Call set_WebEdit_Value ("MasterFile","Enterprise
Profile","Comments",datatable.Value("Comments","Enterprise"))
End If
'Reporter.ReportEvent micDone,"##### TestCase 1 ######","End of
Test Case"
'End of TestCase 1
End Function
'===============================================================
======================================================
'Start of Testcase 2
'***************************************************************
********************************************************************************
*****************************************
Public Function MFProfileEnterprise_TC2()
'Reporter.ReportEvent micDone,"### TestCase 2 ###","Begin of Tes
t case"
'Step 2
Browser("MasterFile").Page("Enterprise Profile").WebElement("Add
ress").Click
Browser("MasterFile").Page("Enterprise Profile").WebButton("Add"
).Click
If DataTable.Value("AddressLine1","Enterprise") <> "" Then
Call set_WebEdit_Value ("MasterFile","Enterprise
Profile","AddressLine1",datatable.Value("AddressLine1","Enterprise"))
End If
If DataTable.Value("Headquarters","Enterprise") <> "" Then
Call select_checkBox("MasterFile","Enterprise Pr
ofile","Headquarters")
End If
If DataTable.Value("AddressLine2","Enterprise") <> "" Then
Call set_WebEdit_Value ("MasterFile","Enterprise
Profile","AddressLine2",datatable.Value("AddressLine2","Enterprise"))
End If
If DataTable.Value("AddressLine3","Enterprise") <> "" Then
Call set_WebEdit_Value ("MasterFile","Enterprise
Profile","AddressLine3",datatable.Value("AddressLine3","Enterprise"))
End If
If DataTable.Value("City","Enterprise") <> "" Then
Call set_WebEdit_Value ("MasterFile","Enterprise
Profile","City",datatable.Value("City","Enterprise"))
End If
If DataTable.Value("StateProvince","Enterprise") <> "" Then
Call set_WebEdit_Value ("MasterFile","Enterprise
Profile","State/Province",datatable.Value("StateProvince","Enterprise"))
End If
If DataTable.Value("ZipPostalCode","Enterprise") <> "" Then
Call set_WebEdit_Value ("MasterFile","Enterprise
Profile","Zip/PostalCode",datatable.Value("ZipPostalCode","Enterprise"))
End If
If DataTable.Value("Country","Enterprise") <> "" Then
Call select_Combo_Value ("MasterFile","Enterpris
e Profile","Country",datatable.Value("Country","Enterprise"))
End If
Call click_Image("MasterFile","Enterprise Profile","Save")
Wait(10)
Browser("MasterFile").Page("Enterprise Profile").WebElement("Rel
ationship").Click
Browser("MasterFile").Page("Enterprise Profile").WebButton("AddR
elation").Click
If DataTable.Value("Enterprise","Enterprise") <> "" Then
Call click_Image("MasterFile","Enterprise Profil
e","info_Relation")
Call operation_on_FrameObjects_WithName("MasterF
ile","Enterprise Profile", "lookupFrame","WebEdit","searchString",DataTable.Valu
e("Enterprise","Enterprise"))
Call operation_on_FrameObjects_WithName("MasterF
ile","Enterprise Profile", "lookupFrame","Image","Go","")
If ( Browser("MasterFile").Page("Enterprise Prof
ile").Frame("lookupFrame").WebElement("innertext:="&DataTable.Value("Enterprise"
,"Enterprise")).Exist )= 1 then
Browser("MasterFile").Page("Ente
rprise Profile").Frame("lookupFrame").WebElement("innertext:="&DataTable.Value("
Enterprise","Enterprise")).click
Else
Reporter.ReportEvent micFail,"Se
lection of CID","Not present In the WebTable"
'captureScreenshot
Environment.Value("Execution_Log
")="False"
Environment.Value("TestCase_Log"
)="False"
End If
End If
If DataTable.Value("RelationshipType","Enterprise") <> "" Then
Call select_Combo_Value ("MasterFile","Enterpris
e Profile","RelationshipType",datatable.Value("RelationshipType","Enterprise"))
End If
If DataTable.Value("Start","Enterprise") <> "" Then
Call click_image("MasterFile","Enterprise Profil
e","StartCalendar")
totaldate=split(DataTable.Value("Start","Enterpr
ise"),";")
strMonth=totaldate(1)
strYear=totaldate(2)
strDate=totaldate(0)
Call ClickIcon_SetDate("MasterFile","Enterprise
Profile",strMonth,strYear,strDate)
End If
If DataTable.Value("End","Enterprise") <> "" Then
Call click_image("MasterFile","Enterprise Profil
e","EndCalendar")
totaldate=split(DataTable.Value("End","Enterpris
e"),";")
strMonth=totaldate(1)
strYear=totaldate(2)
strDate=totaldate(0)
Call ClickIcon_SetDate("MasterFile","Enterprise
Profile",strMonth,strYear,strDate)
End If
Call click_Image("MasterFile","Enterprise Profile","Save")
Wait(10)
Browser("MasterFile").Page("Enterprise Profile").WebElement("Add
ress").Click
If Browser("MasterFile").Page("Enterprise Profile").Image("View
Address Related Contacts").Exist Then
Reporter.ReportEvent micPass,"View Address Relat
ed Contacts i icon is Appearing","Passed"
Browser("MasterFile").Page("Enterprise Profile")
.Image("View Address Related Contacts").Click
If Browser("MasterFile").Page("Enterprise Profi
le").Frame("lookupFrame").Exist(5) Then
Reporter.ReportEvent micPass,"Ad
dress Related Contacts window is Appearing","Passed"
Else
Reporter.ReportEvent micFail,"Ad
dress Related Contacts Window is not Appearing","Failed"
'captureScreenshot
Environment.Value("Execution_Log
")="False"
Environment.Value("TestCase_Log"
)="False"
End If
Else
Reporter.ReportEvent micFail,"View Address Relat
ed Contacts i icon is not Appearing","Failed"
'captureScreenshot
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="False"
End If
Wait(5)
Browser("MasterFile").Page("Enterprise Profile").WebRadioGroup("
select").Select("#0")
Call pageCheck_WebEdit("MasterFile","Enterprise Profile","adln1T
x;adln2Tx;adln3Tx;cityNm;stNm;zipCd","")
Call pageCheck_WebList("MasterFile","Enterprise Profile","ctryCd
","")
If Browser("MasterFile").Page("Enterprise Profile").WebCheckBox(
"Headquarters").Exist Then
Reporter.ReportEvent micPass,"HeadQuarters Check
box ","Present"
Else
Reporter.ReportEvent micFail,"HeadQuarters Check
box ","Absent"
'captureScreenshot
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="False"
End If
If (get_WebEdit_Value ("MasterFile","Enterprise Profile","Addres
sLine1")=datatable.Value("AddressLine1","Enterprise")) Then
Reporter.ReportEvent micPass,"AddressLine1 Edit
box contains "&get_WebEdit_Value ("MasterFile","Enterprise Profile","AddressLine
1")&" which is same as the value of selected radio button", "Passed"
Else
Reporter.ReportEvent micFail,"AddressLine1 Edit
box contains "&get_WebEdit_Value ("MasterFile","Enterprise Profile","AddressLine
1")&" which is not same as he value of selected radio button - "&datatable.Value
("AddressLine1","Enterprise"),"Failed"
'captureScreenshot
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="False"
End If
If (get_WebEdit_Value ("MasterFile","Enterprise Profile","Addres
sLine2")=datatable.Value("AddressLine2","Enterprise")) Then
Reporter.ReportEvent micPass,"AddressLine2 Edit
box Contains"&get_WebEdit_Value ("MasterFile","Enterprise Profile","AddressLine2
")&" which is same as the value of selected radio button", "Passed"
Else
Reporter.ReportEvent micFail,"AddressLine2 Edit
box Contains"&get_WebEdit_Value ("MasterFile","Enterprise Profile","AddressLine2
")&" which is not same as he value of selected radio button - "&datatable.Value(
"AddressLine2","Enterprise"),"Failed"
'captureScreenshot
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="False"
End If
If (get_WebEdit_Value ("MasterFile","Enterprise Profile","Addres
sLine3")=datatable.Value("AddressLine3","Enterprise")) Then
Reporter.ReportEvent micPass,"AddressLine3 Edit
box Contains"&get_WebEdit_Value ("MasterFile","Enterprise Profile","AddressLine3
")&" which is same as the value of selected radio button", "Passed"
Else
Reporter.ReportEvent micFail,"AddressLine3 Edit
box Contains"&get_WebEdit_Value ("MasterFile","Enterprise Profile","AddressLine3
")&" which is not same as he value of selected radio button - "&datatable.Value(
"AddressLine3","Enterprise"),"Failed"
'captureScreenshot
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="False"
End If
If (get_WebEdit_Value ("MasterFile","Enterprise Profile","City")
=datatable.Value("City","Enterprise")) Then
Reporter.ReportEvent micPass,"City Edit box Cont
ains"&get_WebEdit_Value ("MasterFile","Enterprise Profile","City")&"which is sam
e as the value of selected radio button", "Passed"
Else
Reporter.ReportEvent micFail,"City Edit box Cont
ains"&get_WebEdit_Value ("MasterFile","Enterprise Profile","City")&"which is not
same as he value of selected radio button - e"&datatable.Value("City","Enterpri
se"),"Failed"
'captureScreenshot
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="False"
End If
If (get_WebEdit_Value ("MasterFile","Enterprise Profile","State/
Province")=datatable.Value("StateProvince","Enterprise")) Then
Reporter.ReportEvent micPass,"State/Province Edi
t box Contains"&get_WebEdit_Value ("MasterFile","Enterprise Profile","State/Prov
ince")&"which is same as the value of selected radio button", "Passed"
Else
Reporter.ReportEvent micFail,"State/Province Edi
t box Contains"&get_WebEdit_Value ("MasterFile","Enterprise Profile","State/Prov
ince")&" which is not same as he value of selected radio button - "&datatable.Va
lue("State/Province","Enterprise"),"Failed"
'captureScreenshot
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="False"
End If
If (get_WebEdit_Value ("MasterFile","Enterprise Profile","Zip/Po
stalCode")=datatable.Value("ZipPostalCode","Enterprise")) Then
Reporter.ReportEvent micPass,"Zip/PostalCode Edi
t box Contains"&get_WebEdit_Value ("MasterFile","Enterprise Profile","Zip/Postal
Code")&"which is same as the value of selected radio button", "Passed"
Else
Reporter.ReportEvent micFail,"Zip/PostalCode Edi
t box Contains"&get_WebEdit_Value ("MasterFile","Enterprise Profile","Zip/Postal
Code")&" which is not same as he value of selected radio button - "&datatable.Va
lue("Zip/PostalCode","Enterprise"),"Failed"
'captureScreenshot
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="False"
End If
rsltHq=Browser("MasterFile").Page("Enterprise Profile").WebCheck
Box("Headquarters").GetROProperty("Value")
inptHq=DataTable.Value("Headquarters","Enterprise")
If rsltHq=inptHq Then
Reporter.ReportEvent micPass,"Headquarters check
box with"&rsltHq&" which is same as the value of selected radio button", "Passed
"
Else
Reporter.ReportEvent micFail,"Headquarters check
box with"&rsltHq&"which is not same as he value of selected radio button - "&inp
tHq,"Failed"
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="False"
End If
rsltCountry=Browser("MasterFile").Page("Enterprise Profile").Web
List("Country").GetROProperty("Value")
inptCountry=DataTable.Value("Country","Enterprise")
If rsltCountry=inptCountry Then
Reporter.ReportEvent micPass,"Country list Conta
ins"&rsltCountry&" which is same as the value of selected radio button", "Passed
"
Else
Reporter.ReportEvent micFail,"Country list Conta
ins"&rsltCountry&" which is not same as he value of selected radio button - "&in
ptCountry,"Failed"
'captureScreenshot
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="False"
End If
Call select_Menu("MasterFile","Enterprise Profile","Home;DR Home
")
'Reporter.ReportEvent micDone,"##### TestCase 2 ######","End of
Test Case"
'Wait(5)
'End of TC 2
End Function
'*******************************************************************************
********************************************************************************
*************************
Public Function MFProfileEnterprise_TC3()
'Step 1
'Without giving Enterprise Details Saving the Profile
Call click_WebElement("MasterFile","Depositary Receipt Division's","Mast
erFile")
Wait(3)
Call check_Menu("MasterFile","MasterFile",DataTable.Value("Check
Menu","Enterprise"))
Call select_Menu("MasterFile","MasterFile","Profile;Enterprise")
Call click_Image("MasterFile","Profile - Enterprise Search","New
")
Wait(3)
Call click_Image("MasterFile","Enterprise Profile","Save")
Wait(7)
If Browser("MasterFile").Page("Enterprise Profile").WebTable("V
alidation Error").Exist(2) then
If (Browser("MasterFile").Page("Enterprise Profi
le").WebTable("Validation Error").GetCellData(4,1) = "Enterprise") And (Browser(
"MasterFile").Page("Enterprise Profile").WebTable("Validation Error").GetCellDat
a(8,1) = "Address") Then
Reporter.ReportEvent micPass,"Va
lidation Error Msg Is Present","with "&Browser("MasterFile").Page("Enterprise
Profile").WebTable("Validation Error").GetCellData(4,1)&" , "&Browser("MasterFil
e").Page("Enterprise Profile").WebTable("Validation Error").GetCellData(8,1)&"
Tabs"
Reporter.ReportEvent micPass,"Un
der Enterprise Tab"," "&Browser("MasterFile").Page("Enterprise Profile").WebTabl
e("Validation Error").GetCellData(5,2)&" ,"&Browser("MasterFile").Page("Enterpri
se Profile").WebTable("Validation Error").GetCellData(6,2)&"are present"
Reporter.ReportEvent micPass,"Un
der Address Tab"," "&Browser("MasterFile").Page("Enterprise Profile").WebTable("
Validation Error").GetCellData(9,2)&"is present"
Else
Reporter.ReportEvent micFail,"Va
lidation Error Msg Is Present","with "&Browser("MasterFile").Page("Enterprise
Profile").WebTable("Validation Error").GetCellData(4,1)&" , "&Browser("MasterFil
e").Page("Enterprise Profile").WebTable("Validation Error").GetCellData(8,1)&"
Tabs"
Environment.Value("Execution_Lo
g")="False"
Environment.Value("TestCase_Log"
)="False"
End If
Else
Reporter.ReportEvent micFail,"Validation Error M
sg","Is Not present Even we didn't give any data"
'captureScreenshot
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="False"
End If
Call select_Menu("MasterFile","Enterprise Profile","Home;DR Home
")
End function
'*******************************************************************************
********************************************************************************
*************************
Public Function MFProfileEnterprise_TC4()
'Step 1
'Verifying the Errors
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
Wait(3)
Call check_Menu("MasterFile","MasterFile",DataTable.Value("Check
Menu","Enterprise"))
Call select_Menu("MasterFile","MasterFile","Profile;Enterprise")
Call click_Image("MasterFile","Profile - Enterprise Search","New
")
Wait(3)
Call click_Image("MasterFile","Enterprise Profile","Save")
Wait(5)
If Browser("MasterFile").Page("Enterprise Profile").WebTable("V
alidation Error").Exist(2) then
If (Browser("MasterFile").Page("Enterprise Profi
le").WebTable("Validation Error").GetCellData(4,1) = "Enterprise") And (Browser(
"MasterFile").Page("Enterprise Profile").WebTable("Validation Error").GetCellDat
a(8,1) = "Address") Then
Reporter.ReportEvent micPass,"Va
lidation Error Msg Is Present","with "&Browser("MasterFile").Page("Enterprise
Profile").WebTable("Validation Error").GetCellData(4,1)&" , "&Browser("MasterFil
e").Page("Enterprise Profile").WebTable("Validation Error").GetCellData(8,1)&"
Tabs"
Reporter.ReportEvent micPass,"Un
der Enterprise Tab"," "&Browser("MasterFile").Page("Enterprise Profile").WebTabl
e("Validation Error").GetCellData(5,2)&" ,"&Browser("MasterFile").Page("Enterpri
se Profile").WebTable("Validation Error").GetCellData(6,2)&"are present"
Reporter.ReportEvent micPass,"Un
der Address Tab"," "&Browser("MasterFile").Page("Enterprise Profile").WebTable("
Validation Error").GetCellData(9,2)&"is present"
Else
Reporter.ReportEvent micFail,"Va
lidation Error Msg Is Present","with "&Browser("MasterFile").Page("Enterprise
Profile").WebTable("Validation Error").GetCellData(4,1)&" , "&Browser("MasterFil
e").Page("Enterprise Profile").WebTable("Validation Error").GetCellData(8,1)&"
Tabs"
Environment.Value("Execution_Lo
g")="False"
Environment.Value("TestCase_Log
")="False"
End If
Else
Reporter.ReportEvent micFail,"Validation Error M
sg","Is Not present Even we didn't give any data"
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="False"
End If
propName=Browser("MasterFile").Page("Enterprise Profile"
).WebElement("NameLink").GetROProperty("innertext")
If propName="Name" Then
Browser("MasterFile").Page("Enterprise Profile")
.WebElement("NameLink").click
borderColor=Browser("MasterFile").Page("Enterpri
se Profile").WebEdit("Name").GetROProperty("outerhtml")
val = instr(1,borderColor, "BORDER-LEFT-COLOR:
red")
If val <> 0 Then
Reporter.ReportEvent micPass,"Th
e WebEdit is High Lighted or not " , "WebEdit is High Lighted "
Else
Reporter.ReportEvent micFail,"T
he WebEdit is High Lighted or not " , "WebEdit is not High Lighted "
'captureScreenshot
Environment.Value("Execution_Lo
g")="False"
Environment.Value("TestCase_Log
")="False"
End If
Call set_webEdit_Value("MasterFile","Enterprise
Profile","Name",datatable.Value("Name","Enterprise"))
End If
propCountry=Browser("MasterFile").Page("Enterprise Profile").Web
Element("CountryofIncLink").GetROProperty("innertext")
If propCountry = "Country of Incorporation" Then
Browser("MasterFile").Page("Enterprise Profile")
.WebElement("CountryofIncLink").click
Call select_Combo_Value ("MasterFile","Enterpris
e Profile","CountryOfIncorporation",datatable.Value("CountryOfIncorporation","En
terprise"))
End If
Call click_Image("MasterFile","Enterprise Profile","Save")
If Browser("MasterFile").Page("Enterprise Profile").WebTable("Va
lidation Error").Exist(3) then
Reporter.ReportEvent micPass,"Validation Error M
sg Is Present","After entering Name and Country of Incorporation, validation er
ror is present with "&Browser("MasterFile").Page("Enterprise Profile").WebTable
("Validation Error").GetCellData(4,1)&" Tab"
Reporter.ReportEvent micPass,"Under Address Tab"
," "&Browser("MasterFile").Page("Enterprise Profile").WebTable("Validation Error
").GetCellData(5,2)&"is present"
Else
Reporter.ReportEvent micFail,"Validation Error M
sg","Is Not present Even we didn't give any data"
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="False"
End If
propAddress=Browser("MasterFile").Page("Enterprise Profile").Web
Element("AddressLink").GetROProperty("innertext")
If propAddress = "Address" Then
Browser("MasterFile").Page("Enterprise Profile")
.WebElement("AddressLink").click
Wait(3)
Browser("MasterFile").Page("Enterprise Profile")
.WebButton("Add").Click
Call set_WebEdit_Value ("MasterFile","Enterprise
Profile","AddressLine1",datatable.Value("AddressLine1","Enterprise"))
Call click_Image("MasterFile","Enterprise Profil
e","Save")
End If
If Browser("MasterFile").Page("Enterprise Profile").WebTable("Va
lidation Error").Exist(3) then
Reporter.ReportEvent micPass,"Validation Error M
sg Is Present","After entering only Address line1 with "&Browser("MasterFile")
.Page("Enterprise Profile").WebTable("Validation Error").GetCellData(4,1)&" Tab
"
Reporter.ReportEvent micPass,"Under Address Tab"
," "&Browser("MasterFile").Page("Enterprise Profile").WebTable("Validation Error
").GetCellData(5,2)&" ,"&Browser("MasterFile").Page("Enterprise Profile").WebTab
le("Validation Error").GetCellData(6,2)&" ,"&Browser("MasterFile").Page("Enterpr
ise Profile").WebTable("Validation Error").GetCellData(7,2)&" are present"
Else
Reporter.ReportEvent micFail,"Validation Error
Msg","Is Not present Even we didn't give any data"
'captureScreenshot
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="False"
End If
Browser("MasterFile").Page("Enterprise Profile").WebRadioGroup("
select").Select("#0")
Call select_checkBox("MasterFile","Enterprise Profile","Headquar
ters")
Call set_WebEdit_Value ("MasterFile","Enterprise Profile","City"
,datatable.Value("City","Enterprise"))
Call select_Combo_Value ("MasterFile","Enterprise Profile","Coun
try",datatable.Value("Country","Enterprise"))
Call click_Image("MasterFile","Enterprise Profile","Save")
Wait(5)
If Browser("MasterFile").Page("Enterprise Profile").Image("Show
Errors").Exist Then
Reporter.ReportEvent micFail,"Validation Error M
sg","Is Still Present"
'captureScreenshot
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="False"
Else
Reporter.ReportEvent micPass,"Validation Error M
sg","Is Not present Now After Entering all the Missed fields"
End If
Call select_Menu("MasterFile","Enterprise Profile","Home;DR Home")
End Function
'*******************************************************************************
********************************************************************************
*************************
Public Function MFProfileEnterprise_TC5()
'Step1
Call click_WebElement("MasterFile","Depositary Receipt Division'
s","MasterFile")
Wait(3)
Call check_Menu("MasterFile","MasterFile",DataTable.Value("Check
Menu","Enterprise"))
Call select_Menu("MasterFile","MasterFile","Profile;Enterprise")
'Searching for the developed Enterprise
'Browser("MasterFile").Page("Enterprise Profile").WebElement("gr
een-arrow_left").Click
Wait(4)
Call ProfileEnterpriseSearch("MasterFile","Profile - Enterprise
Search")
Wait(4)
Call PrEnterpriseSearchResultVerification("MasterFile","Profile
- Enterprise Search")
Call select_Menu("MasterFile","Profile - Enterprise Search","Hom
e;DR Home")
End Function
'*******************************************************************************
********************************************************************************
*************************
Public Function MFProfileEnterprise_TC6()
'Step 1
Call click_WebElement("MasterFile","Depositary Receipt Division
's","MasterFile")
Wait(3)
Call check_Menu("MasterFile","MasterFile",DataTable.Value("Check
Menu","Enterprise"))
Call select_Menu("MasterFile","MasterFile","Profile;Enterprise")
Wait(4)
Call ProfileEnterpriseSearch("MasterFile","Profile - Enterprise
Search")
Call fnc_wait(Browser("MasterFile").Page("Profile - Enterprise S
earch").WebTable("ResultTable"))
Call PrEnterpriseSearchResultVerification("MasterFile","Profile
- Enterprise Search")
'step 2
strVal=Browser("MasterFile").Page("Profile - Enterprise Search")
.WebTable("ResultTable").GetCellData(1,1)
Browser("MasterFile").Page("Profile - Enterprise Search").webele
ment("html tag:=TD","innertext:="&strVal).click
Call click_Image("MasterFile","Enterprise Profile","PreviewProfi
le")
If Browser("MasterFile").Page("Enterprise Profile").Frame("Privi
ewFrame").exist Then
Call chkPriviewProfileframe("MasterFile","Enterp
rise Profile","PriviewFrame")
'step 3
Browser("MasterFile").Page("Enterprise Profile")
.Frame("PriviewFrame").Image("Print Profile").Click
If Dialog("Print").Exist Then
Reporter.ReportEvent micPass,"Ve
rification of print button Function","Print Dialog Box appeared"
Reporter.ReportEvent micDone,"PR
INT VERIFICATION","PRINT VERIFICATION DONE MANUALLY"
Else
Reporter.ReportEvent micFail,"Ve
rification of print button Function","Print Dialog Box is Not appeared"
'captureScreenshot
Environment.Value("Execution_Log
")="False"
Environment.Value("TestCase_Log"
)="False"
End If
Dialog("Print").WinButton("Cancel").Click
'step 4
Browser("MasterFile").Page("Enterprise Profile")
.Frame("PriviewFrame").Image("Back").Click
If Browser("MasterFile").Page("Enterprise Profi
le").Frame("PriviewFrame").webEdit("name:=leNm_0").Exist Then
Reporter.ReportEvent micFail,"Ve
rification of Return Button Function","Enterprise profile screen is not taken ba
ck"
Else
Reporter.ReportEvent micPass,"Ve
rification of Return Button Function","Enterprise profile screen is taken back"
End If
Else
Reporter.ReportEvent micFail,"Verification of Pr
iview Profile","Priview Button is not working and Frame is not Displayed"
'captureScreenshot
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="False"
End If
'step 5
Call click_Image("MasterFile","Enterprise Profile","RelatedProfi
les")
If Browser("MasterFile").Page("Enterprise Profile").Frame("Rela
tedProfilesFrame").Exist Then
Reporter.ReportEvent micPass,"Verification of Re
lated Button Function","Related Profiles sub screen is appearing"
Else
Reporter.ReportEvent micFail,"Verification of Re
lated Button Function","Related Profiles sub screen is not appearing"
'captureScreenshot
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="False"
End If
'Step 6
Call click_Image("MasterFile","Enterprise Profile","DeleteProfil
e")
If Browser("MasterFile").Dialog("DeleteRowConformation").Exist T
hen
Reporter.ReportEvent micPass,"Verification of De
lete Button Function","Dialog asking for confirmation is displaying"
Browser("MasterFile").Dialog("DeleteRowConformat
ion").WinButton("OK").Click
Wait(3)
If Browser("MasterFile").Page("Profile - Enterp
rise Search").webelement("html tag:=TD","innertext:="&strVal).exist Then
Reporter.ReportEvent micFail,"Ve
rification of Delete Button Function","Result page is still displaying the Delet
ed Enterprise"
'captureScreenshot
Environment.Value("Execution_Log
")="False"
Environment.Value("TestCase_Log"
)="False"
Else
Reporter.ReportEvent micPass,"Ve
rification of Delete Button Function","Result page is not displaying the Deleted
Enterprise"
End If
Else
Reporter.ReportEvent micFail,"Verification of De
lete Button Function","Dialog asking for confirmation is not displaying"
Environment.Value("Execution_Log")="False"
Environment.Value("TestCase_Log")="False"
End If
Call select_Menu("MasterFile","Profile - Enterprise Search","Hom
e;DR Home")
End Function
'*******************************************************************************
********************************************************************************
*************************
Public Function MFProfileEnterprise_TC7()
'Step 1
Call click_WebElement("MasterFile","Depositary Receipt Division's","
MasterFile")
Wait(3)
Call check_Menu("MasterFile","MasterFile",DataTable.Value("Check
Menu","Enterprise"))
For intchkRc=0 to 1
Call select_Menu("MasterFile","MasterFile","Prof
ile;Enterprise")
Call fnc_wait(Browser("MasterFile").Page("Profil
e - Enterprise Search").Image("Search"))
Call ProfileEnterpriseSearch("MasterFile","Profi
le - Enterprise Search")
strPrResultValues=""
Wait(5)
intPrResultRowCount=Browser("MasterFile").Page("
Profile - Enterprise Search").WebTable("ResultTable").RowCount
For intPrRC=0 To intPrResultRowCount-1
strPrResultValues=strPrResultVal
ues & Browser("MasterFile").Page("Profile - Enterprise Search").WebTable("Result
Table").GetCellData(intPrRC+1,1)
Next
Call select_Menu("MasterFile","Profile - Enterpr
ise Search","Reports;Enterprise")
Call ProfileReportsEnterpriseSearchCriteria("Mas
terFile","Reports - Enterprise Search")
'Call EnterpriseSearchCriteria("MasterFile","Rep
orts - Enterprise Search")
Call fnc_wait(Browser("MasterFile").Page("Report
s - Enterprise Search Results").WebTable("Item"))
strRpResultValues=""
intRpResultRowCount=Browser("MasterFile").Page("
Reports - Enterprise Search Results").WebTable("Item").RowCount
For intRpRC=1 To intRpResultRowCount-1
strRpResultValues=strRpResultVal
ues & Browser("MasterFile").Page("Reports - Enterprise Search Results").WebTable
("Item").GetCellData(intRpRC+1,2)
Next
If strPrResultValues= strRpResultValues Then
Reporter.ReportEvent micPass,"Ve
rification of Records in Profile and Reports Enterprise pages with same search c
riteria","Number of records and the details are matching with the results displ
ayed in the Profile -->Enterprise Search,Reports -->Enterprise Search results Sc
reens "
Else
Reporter.ReportEvent micFail,"Ve
rification of Records in Profile and Reports Enterprise pages with same search c
riteria","Number of records and the details are NOT matching with the results d
isplayed in the Profile -->Enterprise Search,Reports -->Enterprise Search result
s Screens "
'captureScreenshot
Environment.Value("Execution_Log
")="False"
Environment.Value("TestCase_Log"
)="False"
End If
Call select_Menu("MasterFile","Reports - Enterpr
ise Search Results","Home")
Datatable.SetNextRow
Next
Datatable.SetPrevRow
Call select_Menu("MasterFile","MasterFile","Home;DR Home")
End Function
'*******************************************************************************
********************************************************************************
*************************

You might also like