Action_Init
Option Explicit
'=====================================================
Dim fso,file,filename,objTestLib,objmsgbox
'=====================================================
'create a new file system object to output information
Set objTestLib = createobject("TestLib.CLib")
'create a new sqamsgbox object
Set objmsgbox = CreateObject("SQAMsgbox.CMsgbox")
'=====================================================
'add global varibles to global sheet
DataTable.GlobalSheet.AddParameter "filename", ""
DataTable.GlobalSheet.AddParameter "UI_Flag",""
DataTable.GlobalSheet.AddParameter "Appno1", ""
DataTable.GlobalSheet.AddParameter "Appno2", ""
DataTable.GlobalSheet.AddParameter "Appno3", ""
'=====================================================
'define a global file name variable
filename = "c:/log/log" & mid(date,1,2) & mid(date,4,2) & "_GenericScript_Presidio.txt"
DataTable("filename",dtGlobalSheet) = filename
Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.OpenTextFile(filename,2,True)
'=====================================================
Call objTestLib.printfile(file,3,"The beginning of all the scripts!")
objmsgbox.SQAMsgbox "We will start demo for Presidio" ,"AA Auto Test",3,0
'===========================================
Set objTestLib = nothing
Set objmsgbox = nothing
Set fso = nothing
Set file = nothing
Login As Admin
Option Explicit
'=================================================================
Dim fso,file,filename,objTestLib,objmsgbox
Dim UI_Flag,TrueOrFlase
'fetch filename form the global sheet
'filename = "c:/log.txt"
filename = DataTable.RawValue("filename",dtGlobalSheet)
'=================================================================
'create a new file system object to output information
Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.OpenTextFile(filename,8,True)
Set objTestLib = createobject("TestLib.CLib")
'create a new sqamsgbox object
Set objmsgbox = CreateObject("SQAMsgbox.CMsgbox")
'=================================================================
Call objTestLib.printfile(file,2,"1 -- Script: Log in AA system ")
objmsgbox.SQAMsgbox "Part 1 -- Script: Log in AA system","AA Auto Test",3,0
Do while("True")
TrueOrFlase = Browser("index:=0").Exist
If(TrueOrFlase = "False") then
Exit do
Else
Browser("index:=0").close
End if
Loop
Call objTestLib.printfile(file,3,"1. log in AA system by using admin account")
'SystemUtil.Run "iexplore.exe","http://aa.achievo.com"
SystemUtil.Run "iexplore.exe","http://aa.beta.accela.com"
If Browser("Browser").Dialog("Security Alert").WinButton("Yes").Exist(15) Then
Browser("Browser").Dialog("Security Alert").WinButton("Yes").Click
End if
Browser("Accela - Accela").Page("Accela - Accela").WebEdit("servProvCode").Set "Presidio"
Browser("Accela - Accela").Page("Accela - Accela").WebEdit("username").Set "admin"
Browser("Accela - Accela").Page("Accela - Accela").WebEdit("password").Set "testok"
Browser("Accela - Accela").Page("Accela - Accela").WebButton("Login").Click
Browser("Accela Automation:").Page("Accela Automation:").Sync
If Browser("Accela Automation:").Page("Accela Automation:").Link("Logout").Exist(35) Then
UI_Flag = 1
Call objTestLib.printfile(file,4)
ElseIf Browser("Accela Automation:").Page("Accela Automation:").Image("tab_logout").Exist(10) Then
UI_Flag = 0
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find AA home page!")
ExitRun(0)
End If
DataTable("UI_Flag",dtGlobalSheet) = UI_Flag
Call objTestLib.printfile(file,3,"2. Verify the back button after log in AA system")
Browser("Browser").Back
Browser("Accela Automation:").Page("Accela Automation:").Sync
If Browser("Accela Automation:").Page("Accela Automation:").Link("New App").Exist(10) then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find AA home page")
End If
Call objTestLib.printfile(file,3,"3. Verify the back button after log out AA system")
If UI_Flag=1 Then
Browser("Accela Automation:").Page("Accela Automation:").Link("Logout").Click
Else
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_logout").Click
End if
wait(5)
Browser("Browser").Back
If Browser("Accela Automation:").Page("Accela Automation:").Link("New App").Exist(10)=False then
Call objTestLib.printfile(file,4)
Browser("Accela - Accela").Page("Accela - Accela").WebEdit("servProvCode").Set "Presidio"
Browser("Accela - Accela").Page("Accela - Accela").WebEdit("username").Set "admin"
Browser("Accela - Accela").Page("Accela - Accela").WebEdit("password").Set "testok"
Browser("Accela - Accela").Page("Accela - Accela").WebButton("Login").Click
Else
Call objTestLib.printfile(file,5,"cannot find AA login page")
End if
Browser("Accela Automation:").Page("Accela Automation:").Sync
'===========================================
Call objTestLib.printfile(file,6)
Set objmsgbox = nothing
Set objTestLib = nothing
Set fso = nothing
Set file = nothing
Admin_Side_Script_0
Option Explicit
'=================================================================
Dim fso,file,filename,objTestLib,objmsgbox,oDesc,Edits,WebCheckBoxs
Dim strMessage,strTemp,strValue,strEditValue,strEditName,NumberOfEdits
Dim strInnertext,intLoop,intFlag,Err_Flag,arrLink
Dim arrExpectValue,arrOriginalValue(5),arrTempValue(5),strOriginalValue
'=================================================================
'fetch filename form the global sheet
'filename = "c:/log.txt"
filename = DataTable.RawValue("filename",dtGlobalSheet)
'create a new file system object to output information
Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.OpenTextFile(filename,8,True)
Set objTestLib = createobject("TestLib.CLib")
'create a new sqamsgbox object
Set objmsgbox = CreateObject("SQAMsgbox.CMsgbox")
'=================================================================
Err_Flag = True
'=================================================================
'On Error Resume Next
Call objTestLib.printfile(file,2,"2 -- Script: Administrator Tools")
objmsgbox.SQAMsgbox "Part 2 -- Script: Administrator Tools","AA Auto Test",3,0
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'###############################Section 1: AGENCY PROFILE #####################
Call objTestLib.printfile(file,3,"Section 1: AGENCY PROFILE ")
objmsgbox.SQAMsgbox "Section 1: AGENCY PROFILE ","AA Auto Test",3,0
'===============1. Standard Choices
If Browser("Accela Automation:").Page("Accela Automation:").Link("Standard Choices").Exist Then
Call objTestLib.printfile(file,3," 1. Standard Choices")
Browser("Accela Automation:").Page("Accela Automation:").Link("Standard Choices").Click
Call SearchStandChoices()
If Err_Flag=False Then
call UpdateStandChoices()
If Err_Flag=False Then
call RevertStandChoices()
End If
End If
If Err_Flag=False And Browser("Accela Automation:_4").Page("Accela Automation:_2").Image("Delete").Exist Then
call AddSCValue()
If Err_Flag=False Then
call DeleteSCValue()
End If
End If
Else
Call objTestLib.printfile(file,3," 1. Standard Choices -- cannot find this link, SKIP")
End If
Function SearchStandChoices ()
Err_Flag = True
'a. Search an existing standard choices
Call objTestLib.printfile(file,3," a. Search an existing standard choices")
Browser("Accela Automation:_2").Page("Accela Automation:").Image("Search").Click
If Browser("Accela Automation:_3").Page("Accela Automation:").Image("Edit").Exist(10) Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,3," ---None, no record exists in system, please add first!")
End If
End Function
Function UpdateStandChoices ()
Err_Flag = True
'b.update the first standard choice by different data
Call objTestLib.printfile(file,3," b.update the first standard choice by different data")
Browser("Accela Automation:_3").Page("Accela Automation:").Image("Edit").Click
arrOriginalValue(1) = Browser("Accela Automation:_4").Page("Accela Automation:").WebEdit("txtBIZDOMAIN_DESC").GetROProperty("value")
arrOriginalValue(2) = Browser("Accela Automation:_4").Page("Accela Automation:").WebRadioGroup("txtREC_STATUS").GetROProperty("value")
arrExpectValue = Array("","Agency Testing","I")
Call UpdateSCValue(arrExpectValue)
If Err_Flag=True Then
Call objTestLib.printfile(file,5,"Updated standard choice failed" & strMessage)
Else
Call VerifySCValue(arrExpectValue)
End If
End Function
Function UpdateSCValue (arrUpdateValue)
Err_Flag = True
Browser("Accela Automation:_4").Page("Accela Automation:").WebEdit("txtBIZDOMAIN_DESC").Set arrUpdateValue(1)
Browser("Accela Automation:_4").Page("Accela Automation:").WebRadioGroup("txtREC_STATUS").Select arrUpdateValue(2)
Browser("Accela Automation:_4").Page("Accela Automation:").Image("Update Value").Click
If Browser("Accela Automation:_4").Page("Accela Automation:").WebRadioGroup("txtREC_STATUS").Exist(5) Then
Err_Flag = False
Elseif Browser("Accela Automation:_4").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_4").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_4").Dialog("Microsoft Internet").WinButton("OK").Click
Else
strMessage = "there occurs an unexpected error!"
End If
End Function
Function VerifySCValue (arrUpdateValue)
Dim arrTempValue(2),intLoop,intLength
arrTempValue(1) = Browser("Accela Automation:_4").Page("Accela Automation:").WebEdit("txtBIZDOMAIN_DESC").GetROProperty("value")
arrTempValue(2) = Browser("Accela Automation:_4").Page("Accela Automation:").WebRadioGroup("txtREC_STATUS").GetROProperty("value")
If arrTempValue(1)=arrUpdateValue(1) And arrTempValue(2)=arrUpdateValue(2) Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"Updated standard choice failed")
End If
End Function
Function RevertStandChoices ()
'c.revert the first standard choice by original data
Call objTestLib.printfile(file,3," c.revert the first standard choice by original data")
Call UpdateSCValue(arrOriginalValue)
End Function
Function AddSCValue ()
Err_Flag = True
'd.add a new Standard Choices Value
Call objTestLib.printfile(file,3," d.add a new Standard Choices Value")
Browser("Accela Automation:_4").Page("Accela Automation:").Image("Add Value").Click
wait(5)
Browser("Accela Automation:_95").Page("Accela Automation:").WebEdit("txtBIZDOMAIN_VALUE").Set "Agency Testing"
Browser("Accela Automation:_95").Page("Accela Automation:").Image("Submit").Click
If Browser("Accela Automation:_4").Page("Accela Automation:_2").Image("Delete").Exist(5) Then
If SearchEditValue("Agency Testing",4)=1 Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"added new value failed!")
End If
Elseif Browser("Browser").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Browser").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Browser").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function SearchEditValue (strValue,intPageNo)
Dim oDesc,Edits,WebCheckBoxs
wait(5)
Set oDesc = Description.Create()
oDesc("micclass").Value = "WebEdit"
Set Edits = Browser("Accela Automation:_" & intPageNo).Page("Accela Automation:").ChildObjects(oDesc)
NumberOfEdits = Edits.Count()
SearchEditValue = 0
For intLoop = 0 To NumberOfEdits-1
strEditValue = Edits(intLoop).GetROProperty("value")
If strEditValue=strValue Then
strEditName = Edits(intLoop).GetROProperty("name")
SearchEditValue = 1
Exit For
End If
Next
End Function
Function DeleteSCValue ()
Err_Flag = True
'e.delete the new Standard Choices Value
Call objTestLib.printfile(file,3," e.delete the new Standard Choices Value")
Browser("Accela Automation:_4").Page("Accela Automation:_2").Image("Delete").Click
Browser("Accela Automation:_4").Dialog("Microsoft Internet").WinButton("OK").Click
If Browser("Accela Automation:_4").Page("Accela Automation:").WebRadioGroup("txtREC_STATUS").Exist(5) Then
Err_Flag = False
If SearchEditValue("Agency Testing",4)=0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"the [Agency Testing] value still exists!")
End If
Elseif Browser("Accela Automation:_4").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_4").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_4").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"cannot delete the added value, the error message is " & strMessage)
Else
strMessage = "there occurs an unexpected error!"
Call objTestLib.printfile(file,5,"cannot delete the added value, the error message is " & strMessage)
End If
End Function
'Browser("Accela Automation:_4").Page("Accela Automation:_3").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'###############################Section 2: USER PROFILE #####################
Call objTestLib.printfile(file,3,"Section 2: USER PROFILE ")
objmsgbox.SQAMsgbox "Section 2: USER PROFILE ","AA Auto Test",3,0
'=====1 . Organizations
If Browser("Accela Automation:").Page("Accela Automation:").Link("Organizations").Exist Then
Call objTestLib.printfile(file,3," 1. Organizations")
Browser("Accela Automation:").Page("Accela Automation:").Link("Organizations").Click
Call UpdateOrg()
If Err_Flag=False Then
call RevertOrg()
End If
Else
Call objTestLib.printfile(file,3," 1. Organizations -- cannot find this link, SKIP")
End If
Function UpdateOrg ()
Err_Flag = True
'a.update the first branch
Call objTestLib.printfile(file,3," a.update the first branch")
Browser("Accela Automation:_5").Page("Accela Automation:").Image("select").Click
Wait(5)
strTemp = Mid(Browser("Accela Automation:_96").Page("Accela Automation:").WebTable("Structure:").GetCellData(1,2),12)
arrOriginalValue(1) = Browser("Accela Automation:_96").Page("Accela Automation:").WebEdit("desc").GetROProperty("value")
arrOriginalValue(2) = Browser("Accela Automation:_96").Page("Accela Automation:").WebRadioGroup("status").GetROProperty("value")
Browser("Accela Automation:_96").Page("Accela Automation:").WebEdit("desc").Set "Agency Tesing"
Browser("Accela Automation:_96").Page("Accela Automation:").WebRadioGroup("status").Select "I"
Browser("Accela Automation:_96").Page("Accela Automation:").Image("Submit").Click 35,8
wait(10)
strInnerText = Browser("Accela Automation:_5").Page("Accela Automation:").WebTable("Edit").GetROProperty("innertext")
If instr(strInnerText,strTemp & "Disable") <> 0 Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"updated the first branch failed!")
End If
End Function
Function RevertOrg ()
'b.revert the first branch with original data
Call objTestLib.printfile(file,3," b.revert the first branch with original data")
Browser("Accela Automation:_5").Page("Accela Automation:").Image("select").Click
Wait(5)
Browser("Accela Automation:_96").Page("Accela Automation:").WebEdit("desc").Set arrOriginalValue(1)
Browser("Accela Automation:_96").Page("Accela Automation:").WebRadioGroup("status").Select arrOriginalValue(2)
Browser("Accela Automation:_96").Page("Accela Automation:").Image("Submit").Click 13,8
Wait(5)
End Function
'Browser("Accela Automation:_5").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====2.Group
If Browser("Accela Automation:").Page("Accela Automation:").Link("Groups").Exist Then
Call objTestLib.printfile(file,3," 2. Group")
Browser("Accela Automation:").Page("Accela Automation:").Link("Groups").Click
Call SearchGroup()
If Err_Flag=False Then
Call ViewGroup()
End If
Else
Call objTestLib.printfile(file,3," 2. Group -- cannot find this link, SKIP")
End If
Function SearchGroup ()
Err_Flag = True
'a.search all groups
Call objTestLib.printfile(file,3," a.search all groups")
Browser("Accela Automation:_6").Page("Accela Automation:").Image("Submit").Click 22,12
If Browser("Accela Automation:_7").Page("Accela Automation:").Image("Edit").Exist(5) Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,3," ---None, no record exists in system, please add first!")
End If
End Function
Function ViewGroup ()
'b.view the first group
Call objTestLib.printfile(file,3," b.view the first group")
Browser("Accela Automation:_7").Page("Accela Automation:").Image("Edit").Click
If Browser("Accela Automation:_8").Page("Accela Automation:").WebEdit("txtGroupName").Exist(20) Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the group name box!")
End If
If Browser("Accela Automation:_8").Page("Accela Automation:").Image("cnclBtn").Exist Then
Browser("Accela Automation:_8").Page("Accela Automation:").Image("cnclBtn").Click
Else
Browser("Accela Automation:_91").Page("Accela Automation:").Image("Cancel").Click
End If
End Function
'Browser("Accela Automation:_7").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====3.User
If Browser("Accela Automation:").Page("Accela Automation:").Link("Users").Exist Then
Call objTestLib.printfile(file,3," 3. User")
Browser("Accela Automation:").Page("Accela Automation:").Link("Users").Click
Call SearchUsers()
If Err_Flag=False Then
call UpdateUser()
If Err_Flag=False Then
call RevertUser()
End If
End If
Else
Call objTestLib.printfile(file,3," 3. User -- cannot find this link, SKIP")
End If
Function SearchUsers ()
Err_Flag = True
'a.search all users
Call objTestLib.printfile(file,3," a.search all users")
Browser("Accela Automation:_9").Page("Accela Automation:").Image("Submit").Click 25,5
If Browser("Accela Automation:_10").Page("Accela Automation:").Image("Edit").Exist(10) Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,3," ---None, no record exists in system, please add first!")
End If
End Function
Function UpdateUser ()
Err_Flag = True
'b.update the first user
Call objTestLib.printfile(file,3," b.update the first user")
Browser("Accela Automation:_10").Page("Accela Automation:").Image("Edit").Click
arrOriginalValue(1) = Browser("Accela Automation:_11").Page("Accela Automation:").WebEdit("GA_EMAIL").GetROProperty("value")
arrOriginalValue(2) = Browser("Accela Automation:_11").Page("Accela Automation:").WebEdit("GA_TITLE").GetROProperty("value")
arrExpectValue = Array("","[email protected]","Kiki","Zhao")
Call UpdateUserValue(arrExpectValue)
If Err_Flag=True Then
Call objTestLib.printfile(file,5,"Updated standard choice failed" & strMessage)
Else
Browser("Accela Automation:_10").Page("Accela Automation:").Image("Edit").Click
Call VerifyUserValue(arrExpectValue)
End If
End Function
Function UpdateUserValue (arrUpdateValue)
Err_Flag = True
Browser("Accela Automation:_11").Page("Accela Automation:").WebEdit("GA_EMAIL").Set arrUpdateValue(1)
Browser("Accela Automation:_11").Page("Accela Automation:").WebEdit("GA_TITLE").Set arrUpdateValue(2)
Browser("Accela Automation:_11").Page("Accela Automation:").Image("Save").Click 31,6
If Browser("Accela Automation:_10").Page("Accela Automation:").Image("New Search").Exist(10) Then
Err_Flag = False
Elseif Browser("Accela Automation:_11").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_11").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_11").Dialog("Microsoft Internet").WinButton("OK").Click
Else
strMessage = "there occurs an unexpected error!"
Browser("Accela Automation:").Back
End If
End Function
Function VerifyUserValue (arrExpectValue)
arrTempValue(1) = Browser("Accela Automation:_11").Page("Accela Automation:").WebEdit("GA_EMAIL").GetROProperty("value")
arrTempValue(2) = Browser("Accela Automation:_11").Page("Accela Automation:").WebEdit("GA_TITLE").GetROProperty("value")
If arrTempValue(1)=arrExpectValue(1) And arrTempValue(2)=arrExpectValue(2) Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"Updated user failed")
End If
End Function
Function RevertUser ()
'c.revert the first standard choice by original data
Call objTestLib.printfile(file,3," c.revert the first user by original data")
Call UpdateUserValue(arrOriginalValue)
End Function
'Browser("Accela Automation:_10").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'###############################Section 3: Application #####################
Call objTestLib.printfile(file,3,"Section 3: Application")
objmsgbox.SQAMsgbox "Section 3: Application","AA Auto Test",3,0
'=====1.App Type
If Browser("Accela Automation:").Page("Accela Automation:").Link("App Type").Exist Then
Call objTestLib.printfile(file,3," 1. App Type ")
Browser("Accela Automation:").Page("Accela Automation:").Link("App Type").Click
'a.Select an app type
Call objTestLib.printfile(file,3," a.Select an app type")
Call SelectAppType()
Call UpdateAppType()
If Err_Flag=False Then
call RevertAppType()
End If
Else
Call objTestLib.printfile(file,3," 1. App Type -- cannot find this link, SKIP")
End If
If Browser("Accela Automation:_12").Page("Accela Automation:").Frame("content").Image("Edit").Exist(15) Then
'Browser("Accela Automation:_12").Page("Accela Automation:").Sync
Browser("Accela Automation:_12").Close
End If
Function UpdateAppType ()
'b.Modify the app type by changing the drop-down items
Call objTestLib.printfile(file,3," b.Modify the app type by changing the drop-down items")
arrOriginalValue(1) = Browser("Accela Automation:_13").Page("Accela Automation:").WebRadioGroup("rbStatus").GetROProperty("value")
arrOriginalValue(2) = Browser("Accela Automation:_13").Page("Accela Automation:").WebList("txtGroupCode").GetROProperty("value")
arrExpectValue = Array("","DISABLE","PRESIDIO BLDG")
Call UpdateAppValue(arrExpectValue)
If Err_Flag=True Then
Call objTestLib.printfile(file,5,"Updated app type failed" & strMessage)
Else
Call SelectAppType()
Call VerifyAppValue(arrExpectValue)
End If
End Function
Function SelectAppType ()
arrLink = Array("Building","Repairs","Cultural","Main Post")
If Browser("Accela Automation:_12").Page("Accela Automation:").Frame("content").Image("Edit").Exist(10)=False then
wait(5)
End if
Browser("Accela Automation:_12").Page("Accela Automation:").Frame("toc").Link("First_Link").SetTOProperty "text",arrLink(0)
Browser("Accela Automation:_12").Page("Accela Automation:").Frame("toc").Link("First_Link").Click
Browser("Accela Automation:_12").Page("Accela Automation:").Frame("toc").Link("Second_Link").SetTOProperty "text",arrLink(1)
Browser("Accela Automation:_12").Page("Accela Automation:").Frame("toc").Link("Second_Link").Click
Browser("Accela Automation:_12").Page("Accela Automation:").Frame("toc").Link("Third_Link").SetTOProperty "text",arrLink(2)
Browser("Accela Automation:_12").Page("Accela Automation:").Frame("toc").Link("Third_Link").Click
Browser("Accela Automation:_12").Page("Accela Automation:").Frame("toc").Link("Fourth_Link").SetTOProperty "text",arrLink(3)
Browser("Accela Automation:_12").Page("Accela Automation:").Frame("toc").Link("Fourth_Link").Click
Browser("Accela Automation:_12").Page("Accela Automation:").Frame("content").Image("Edit").Click
Wait(5)
End Function
Function UpdateAppValue (arrExpectValue)
Err_Flag = True
Browser("Accela Automation:_13").Page("Accela Automation:").WebList("txtGroupCode").Select arrExpectValue(2)
Browser("Accela Automation:_13").Page("Accela Automation:").WebRadioGroup("rbStatus").Select arrExpectValue(1)
Browser("Accela Automation:_13").Page("Accela Automation:").Image("Save").Click
If Browser("Accela Automation:_12").Page("Accela Automation:").Frame("content").Image("Edit").Exist(5) Then
Err_Flag = False
Elseif Browser("Accela Automation:_13").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_13").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_13").Dialog("Microsoft Internet").WinButton("OK").Click
Else
strMessage = "there occurs an unexpected error!"
Browser("Accela Automation:").Back
End If
End Function
Function VerifyAppValue (arrExpectValue)
Dim arrVerifyValue(2)
arrVerifyValue(1) = Browser("Accela Automation:_13").Page("Accela Automation:").WebRadioGroup("rbStatus").GetROProperty("value")
arrVerifyValue(2) = Browser("Accela Automation:_13").Page("Accela Automation:").WebList("txtGroupCode").GetROProperty("value")
If arrVerifyValue(1)=arrExpectValue(1) And arrVerifyValue(2)=arrExpectValue(2) Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"Updated app type failed")
End If
End Function
Function RevertAppType ()
'c.revert the app type with original data
Call objTestLib.printfile(file,3," c.revert the app type with original data")
Call UpdateAppValue(arrOriginalValue)
End Function
'Browser("Accela Automation:_14").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====2.Inspection
If Browser("Accela Automation:").Page("Accela Automation:").Link("Inspection").Exist Then
Call objTestLib.printfile(file,3," 2. Inspection ")
Browser("Accela Automation:").Page("Accela Automation:").Link("Inspection").Click
Call SearchInspections ()
If Err_Flag=False Then
Call ViewInspection()
End If
Else
Call objTestLib.printfile(file,3," 2. Inspection -- cannot find this link, SKIP ")
End If
Function SearchInspections ()
Err_Flag = True
'a.Search all inspection Groups
Call objTestLib.printfile(file,3," a.Search all inspection Groups")
Browser("Accela Automation:_15").Page("Accela Automation:").Image("Search").Click
If Browser("Accela Automation:_16").Page("Accela Automation:").Image("Edit").Exist(10) Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,3," ---None, no records found, please add inspection groups!")
End If
End Function
Function ViewInspection ()
'b.view the first inspection group
Call objTestLib.printfile(file,3," b. view the first inspection group")
Browser("Accela Automation:_16").Page("Accela Automation:").Image("Edit").Click
If Browser("Accela Automation:_17").Page("Accela Automation:").Exist(10) Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the inspection - Edit page!")
End If
End Function
'Browser("Accela Automation:_17").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====3. Fee Items
If Browser("Accela Automation:").Page("Accela Automation:").Link("Fee Items").Exist Then
Call objTestLib.printfile(file,3," 3. Fee Items")
Browser("Accela Automation:").Page("Accela Automation:").Link("Fee Items").Click
Call SearchFeeItems()
If Err_Flag=False Then
call UpdateFeeItem()
If Err_Flag=False Then
call RevertFeeItem()
End If
End If
Else
Call objTestLib.printfile(file,3," 3. Fee Items -- cannot this link, SKIP")
End If
Function SearchFeeItems ()
Err_Flag = True
'a. Search all fee items
Call objTestLib.printfile(file,3," a. Search all fee items")
Browser("Accela Automation:_18").Page("Accela Automation:").Image("Submit").Click 16,10
If Browser("Accela Automation:_19").Page("Accela Automation:").Image("Edit").Exist(10) Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,3," ---None, no records found, please add fee item!")
End If
End Function
Function UpdateFeeItem ()
Err_Flag = True
'b. update the first fee item
Call objTestLib.printfile(file,3," b.update the first fee item")
Browser("Accela Automation:_19").Page("Accela Automation:").Image("Edit").Click
arrOriginalValue(1) = Browser("Accela Automation:_20").Page("Accela Automation:").WebRadioGroup("txtR1GFDEFAULTFLAG").GetROProperty("value")
arrOriginalValue(2) = Browser("Accela Automation:_20").Page("Accela Automation:").WebRadioGroup("txtRecStatus").GetROProperty("value")
arrExpectValue = Array("","N","D")
Call UpdateFeeItemValue(arrExpectValue)
If Err_Flag=True Then
Call objTestLib.printfile(file,5,"Updated fee item failed" & strMessage)
Else
Browser("Accela Automation:_19").Page("Accela Automation:_2").Image("Edit").Click
Call VerifyFeeItemValue(arrExpectValue)
End If
End Function
Function UpdateFeeItemValue (arrExpectValue)
Err_Flag = True
Browser("Accela Automation:_20").Page("Accela Automation:").WebRadioGroup("txtR1GFDEFAULTFLAG").Select arrExpectValue(1)
Browser("Accela Automation:_20").Page("Accela Automation:").WebRadioGroup("txtRecStatus").Select arrExpectValue(2)
Browser("Accela Automation:_20").Page("Accela Automation:").Image("Save").Click 17,9
If Browser("Accela Automation:_19").Page("Accela Automation:_2").Image("Edit").Exist(10) Then
Err_Flag = False
Elseif Browser("Accela Automation:_20").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_20").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_20").Dialog("Microsoft Internet").WinButton("OK").Click
Else
strMessage = "there occurs an unexpected error!"
Browser("Accela Automation:").Back
End If
End Function
Function VerifyFeeItemValue (arrExpectValue)
wait(5)
arrTempValue(1) = Browser("Accela Automation:_20").Page("Accela Automation:").WebRadioGroup("txtR1GFDEFAULTFLAG").GetROProperty("value")
arrTempValue(2) = Browser("Accela Automation:_20").Page("Accela Automation:").WebRadioGroup("txtRecStatus").GetROProperty("value")
If arrTempValue(1)=arrExpectValue(1) And arrTempValue(2)=arrExpectValue(2) Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"update the first fee item failed, the error message is " & strMessage)
End If
End Function
Function RevertFeeItem ()
'c.revert the first fee item with original data
Call objTestLib.printfile(file,3," c.revert the first fee item with original data")
Call UpdateFeeItemValue(arrOriginalValue)
End Function
'Browser("Accela Automation:_19").Page("Accela Automation:_3").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====4.App Specific Info
If Browser("Accela Automation:").Page("Accela Automation:").Link("App Specific").Exist Then
Call objTestLib.printfile(file,3," 4. App Specific Info")
Browser("Accela Automation:").Page("Accela Automation:").Link("App Specific").Click
Call SearchSpecInfo()
If Err_Flag=False Then
call UpdateSpecInfo()
End If
Else
Call objTestLib.printfile(file,3," 4. App Specific Info -- cannot find this link, SKIP")
End If
Function SearchSpecInfo ()
Err_Flag = True
'a. Search all specific info
Call objTestLib.printfile(file,3," a. Search all specific info")
Browser("Accela Automation:_21").Page("Accela Automation:").Image("Submit").Click 25,12
If Browser("Accela Automation:_22").Page("Accela Automation:").Image("Edit").Exist(10) Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,3," ---None, no records found, please add fee item!")
End If
End Function
Function UpdateSpecInfo ()
'b. update the first specific info
Call objTestLib.printfile(file,3," b.update the first specific info")
Browser("Accela Automation:_22").Page("Accela Automation:").Image("Edit").Click
'(1). Add a new field
Call objTestLib.printfile(file,3," (1). Add a new field")
Browser("Accela Automation:_23").Page("Accela Automation:").Image("Add new Field").Click
wait(5)
Browser("Browser_3").Page("Page").WebList("txtR1_CHECKBOX_IND").Select "DropdownList"
Browser("Browser_3").Page("Page").WebEdit("txtR1_CHECKBOX_DESC").Set "Agency Testing"
Browser("Browser_3").Page("Page").WebEdit("txtR1_DISPLAY_ORDER").Set "0"
Browser("Browser_3").Page("Page").Image("Submit").Click 36,1
wait(5)
strInnerText = Browser("Accela Automation:_23").Page("Accela Automation:").WebTable("Edit").GetROProperty("innertext")
If instr(strInnerText,"Agency Testing") <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the new field")
End If
'(2). Edit the new added field and add a new item value
Call objTestLib.printfile(file,3," (2). Edit the new added field and add a new item value")
Browser("Accela Automation:_23").Page("Accela Automation:").Image("Edit dropdownlist").Click
wait(5)
Browser("Browser_3").Page("Page").Image("Add new Field").Click
Browser("Browser_3").Page("Page_2").WebEdit("txtR1_CHECKBOX_VALUE").Set "Hello"
Browser("Browser_3").Page("Page_2").Image("Submit").Click
wait(5)
strTemp = Browser("Browser_4").Page("Page").WebEdit("ab1").GetROProperty("value")
If strTemp="Hello" Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the new field item")
End If
'(3). Edit the new added field and modify the new item value
Call objTestLib.printfile(file,3," (3). Edit the new added field and modify the new item value")
Browser("Browser_4").Page("Page").WebEdit("ab1").Set "Hello World"
Browser("Browser_4").Page("Page").Image("Update with").Click
wait(5)
strTemp = Browser("Browser_4").Page("Page").WebEdit("ab1").GetROProperty("value")
If strTemp="Hello World" Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the new field item")
End If
'(4). Edit the new added field and delete the new item value
Call objTestLib.printfile(file,3," (4). Edit the new added field and delete the new item value")
Browser("Browser_3").Page("Page_3").Image("Delete this").Click
Browser("Browser_3").Dialog("Microsoft Internet").WinButton("OK").Click
If Browser("Browser_4").Page("Page").WebEdit("ab1").Exist(5)=False Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"the new field item still exists!")
End If
Browser("Browser_3").Page("Page_4").Image("Cancel").Click
'(5). update the new added field
Call objTestLib.printfile(file,3," (5). update the new added field ")
Browser("Accela Automation:_23").Page("Accela Automation:").WebList("cd1").Select "Text"
Browser("Accela Automation:_23").Page("Accela Automation:").Image("Update with").Click
strTemp = Browser("Accela Automation:_23").Page("Accela Automation:").WebList("cd1").GetROProperty("value")
If strTemp="Text" Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the updated field type")
End If
'(6). delete the new added field
Call objTestLib.printfile(file,3," (6). delete the new added field ")
Browser("Accela Automation:_23").Page("Accela Automation:").Image("Delete Field").Click
Browser("Accela Automation:_23").Dialog("Microsoft Internet").WinButton("OK").Click
wait(5)
strInnerText = Browser("Accela Automation:_23").Page("Accela Automation:").WebTable("Edit").GetROProperty("innertext")
If instr(strInnerText,"Agency Testing")=0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"the new field still exists!")
End If
End Function
'Browser("Accela Automation:_23").Page("Accela Automation:_2").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====SmartChoice Group
If Browser("Accela Automation:").Page("Accela Automation:").Link("SmartChoice").Exist Then
Call objTestLib.printfile(file,3," 5. SmartChoice Group")
Browser("Accela Automation:").Page("Accela Automation:").Link("SmartChoice").Click
Call SearchSmartChoice()
If Err_Flag=False Then
call UpdateSmartChoice()
If Err_Flag=False Then
call RevertSmartChoice()
End If
End If
Else
Call objTestLib.printfile(file,3," 5. SmartChoice Group -- cannot find this link, SKIP")
End If
Function SearchSmartChoice ()
Err_Flag = True
'a. Search all smartchoice groups
Call objTestLib.printfile(file,3," a. Search all smartchoice groups")
Browser("Accela Automation:_24").Page("Accela Automation:").Image("Submit").Click 22,4
If Browser("Accela Automation:_25").Page("Accela Automation:").Image("Select").Exist(10) Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,3," ---None, no records found, please add smartchoice group!")
End If
End Function
Function UpdateSmartChoice ()
Err_Flag = True
'b. select the first smartchoice group and update
Call objTestLib.printfile(file,3," b. select the first smartchoice group and update")
Browser("Accela Automation:_25").Page("Accela Automation:").Image("Select").Click
arrOriginalValue(1) = Browser("Accela Automation:_26").Page("Accela Automation:").WebRadioGroup("GStrDisplayFlg").GetROProperty("value")
arrOriginalValue(2) = Browser("Accela Automation:_26").Page("Accela Automation:").WebRadioGroup("EventDisplayFlg").GetROProperty("value")
arrExpectValue = Array("","Y","Y")
Call UpdateSmartChoiceValue(arrExpectValue)
If Err_Flag=True Then
Call objTestLib.printfile(file,5,"Updated SmartChoice failed" & strMessage)
Else
Browser("Accela Automation:_25").Page("Accela Automation:").Image("Select").Click
Call VerifySmartChoiceValue(arrExpectValue)
End If
End Function
Function UpdateSmartChoiceValue (arrExpectValue)
Err_Flag = True
Browser("Accela Automation:_26").Page("Accela Automation:").WebRadioGroup("GStrDisplayFlg").Select arrExpectValue(1)
Browser("Accela Automation:_26").Page("Accela Automation:").WebRadioGroup("EventDisplayFlg").Select arrExpectValue(2)
Browser("Accela Automation:_26").Page("Accela Automation:").Image("Save changes").Click
If Browser("Accela Automation:_25").Page("Accela Automation:").Image("Select").Exist(10) Then
Err_Flag = False
' Elseif Browser("Accela Automation:_26").Dialog("Microsoft Internet").WinButton("OK").Exist Then
' strMessage= Browser("Accela Automation:_26").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
' Browser("Accela Automation:_26").Dialog("Microsoft Internet").WinButton("OK").Click
Else
strMessage = "there occurs an unexpected error!"
Browser("Accela Automation:").Back
End If
End Function
Function VerifySmartChoiceValue (arrExpectValue)
wait(5)
arrTempValue(1) = Browser("Accela Automation:_26").Page("Accela Automation:").WebRadioGroup("EventDisplayFlg").GetROProperty("value")
arrTempValue(2) = Browser("Accela Automation:_26").Page("Accela Automation:").WebRadioGroup("GStrDisplayFlg").GetROProperty("value")
If arrTempValue(1)=arrExpectValue(1) And arrTempValue(2)=arrExpectValue(2) Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"Update the first smartchoice group failed")
End If
End Function
Function RevertSmartChoice ()
'c. revert the first smartchoice group with original data
Call objTestLib.printfile(file,3," c. revert the first smartchoice group with original data")
Call UpdateSmartChoiceValue(arrOriginalValue)
End Function
'Browser("Accela Automation:_25").Page("Accela Automation:_2").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'###############################Section 4: WorkFlow #####################
Call objTestLib.printfile(file,3,"Section 4: WorkFlow")
objmsgbox.SQAMsgbox "Section 4: WorkFlow","AA Auto Test",3,0
'=====Process
If Browser("Accela Automation:").Page("Accela Automation:").Link("Process").Exist Then
Call objTestLib.printfile(file,3," 1. Process ")
Browser("Accela Automation:").Page("Accela Automation:").Link("Process").Click
Call SearchProcess()
If Err_Flag=False Then
Call SwitchView()
Call AddTask()
If Err_Flag=False Then
Call AddDeptToTask()
Call AddStaffToTask()
Call UpdateTask()
Call DeleteTask()
End If
End If
Else
Call objTestLib.printfile(file,3," 1. Process --cannot find this link, SKIP")
End If
Function SearchProcess ()
Err_Flag = True
'a. Search all Processes
Call objTestLib.printfile(file,3," a. Search all Processes")
Browser("Accela Automation:_27").Page("Accela Automation:").Image("Submit").Click 35,14
If Browser("Accela Automation:_28").Page("Accela Automation:").Image("Edit").Exist(10) Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,3," ---None, no records found, please add process!")
End If
End Function
Function SwitchView ()
'b. select the first process, click on the process status view and diagram view
Call objTestLib.printfile(file,3," b. select the first process, click on the process status view and diagram view")
Browser("Accela Automation:_28").Page("Accela Automation:").Image("Edit").Click
wait(5)
Browser("Accela Automation:_29").Page("Accela Automation:").Link("Process Status").Click
wait(5)
Browser("Accela Automation:_30").Page("Accela Automation:").Link("Diagram View").Click
wait(5)
Browser("Accela Automation:_31").Page("Accela Automation:").Image("Close Window").Click
wait(5)
Browser("Accela Automation:_30").Page("Accela Automation:").Link("Process View").Click
wait(5)
End Function
Function AddTask ()
Err_Flag = True
'c. add a new task
Call objTestLib.printfile(file,3," c. add a new task")
'Browser("Accela Automation:_29").Page("Accela Automation:_2").Image("Add new Task").Click
wait(5)
Browser("Accela Automation:_29").Page("Accela Automation:_5").Image("Add new Task").Click
Browser("Accela Automation:_92").Page("Accela Automation:").WebEdit("txtSD_PRO_DES").Set "Agency Testing"
Browser("Accela Automation:_92").Page("Accela Automation:").Image("Submit").Click
wait(10)
If Browser("Browser_14").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Browser_14").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Call objTestLib.printfile(file,5,"Add a new task failed,the error message is " & strMessage)
Browser("Browser_14").Dialog("Microsoft Internet").WinButton("OK").Click
Browser("Accela Automation:_92").Page("Accela Automation:").Image("Cancel").Click
Else if Browser("Accela Automation:_29").Page("Accela Automation:_2").WebEdit("SD_PRO_DES1").Exist Then
Err_Flag = False
strTemp = Browser("Accela Automation:_29").Page("Accela Automation:_2").WebEdit("SD_PRO_DES1").GetROProperty("value")
If strTemp="Agency Testing" Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"Add a new task failed!")
End If
else
Call objTestLib.printfile(file,5,"Add a new task failed,there occurs an unexpected error!")
end if
End If
End Function
Function AddDeptToTask ()
'd. add a department to this new task
Call objTestLib.printfile(file,3," d. add a department to this new task")
Browser("Accela Automation:_29").Page("Accela Automation:_5").Image("Search for Departmen").Click
Browser("Accela Automation:_32").Page("Accela Automation:_3").Frame("toc").Link("Organization.").Click
Browser("Accela Automation:_32").Page("Accela Automation:_3").Frame("toc").Link("Organization.").Click
Browser("Accela Automation:_32").Page("Accela Automation:_3").Frame("toc").Link("BUILDING").Click
Browser("Accela Automation:_32").Page("Accela Automation:_3").Frame("toc").Link("CONTRACT").Click
Browser("Accela Automation:_32").Page("Accela Automation:_3").Frame("toc").Link("NA").Click
Browser("Accela Automation:_32").Page("Accela Automation:_3").Frame("toc").Link("NA_2").Click
Browser("Accela Automation:_32").Page("Accela Automation:_3").Frame("toc").Link("NA_3").Click
Browser("Accela Automation:_32").Page("Accela Automation:_3").Frame("toc").Link("NA_4").Click
Browser("Accela Automation:_32").Page("Accela Automation:_3").Frame("toc2").Image("Submit").Click 24,9
wait(5)
If len(Browser("Accela Automation:_29").Page("Accela Automation:_2").WebEdit("deptdisp1").GetROProperty("value")) > 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"Add a department to this new task failed!")
End If
End Function
Function AddStaffToTask ()
'e. add a staff to this new task
Call objTestLib.printfile(file,3," e. add a staff to this new task")
Browser("Accela Automation:_29").Page("Accela Automation:_5").Image("Select Department").Click
Browser("Accela Automation:_32").Page("Accela Automation:_3").Frame("toc").Link("Organization.").Click
Browser("Accela Automation:_32").Page("Accela Automation:_3").Frame("toc2").Image("Submit").Click 25,7
Browser("Accela Automation:_32").Page("Accela Automation:_4").Frame("toc3").Link("SOHA ENGINEERS").Click
wait(6)
If len(Browser("Accela Automation:_29").Page("Accela Automation:_2").WebEdit("StaffFName1").GetROProperty("value")) > 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"Add a staff to this new task failed!")
End If
End Function
Function UpdateTask ()
'e. change the label on that task and click on update
Call objTestLib.printfile(file,3," e.change the label on that task and click on update ")
Browser("Accela Automation:_29").Page("Accela Automation:_2").WebEdit("SD_PRO_ID11").Set "000000000000001"
Browser("Accela Automation:_29").Page("Accela Automation:_2").WebEdit("SD_NXT_ID11").Set "000000000000001"
Browser("Accela Automation:_29").Page("Accela Automation:_2").Image("Update with").Click
If Browser("Accela Automation:_29").Dialog("Microsoft Internet").WinButton("OK").Exist(5)=False Then
Call objTestLib.printfile(file,4)
Else
strMessage = Browser("Accela Automation:_29").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_29").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"Update the task failed!The error message is " & strMessage)
End If
End Function
Function DeleteTask ()
'f. Delete the task just created
Call objTestLib.printfile(file,3," f.Delete the task just created")
Browser("Accela Automation:_29").Page("Accela Automation:_3").Image("Delete this").Click
Browser("Accela Automation:_29").Dialog("Microsoft Internet").WinButton("OK").Click
wait(5)
If Browser("Accela Automation:_29").Page("Accela Automation:_2").WebEdit("deptdisp1").GetROProperty("value") <> "Agency Testing" Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"can find the [Agency Testing] tasl")
End If
End Function
'Browser("Accela Automation:_29").Page("Accela Automation:_4").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====2.Task Status
If Browser("Accela Automation:").Page("Accela Automation:").Link("Task Status").Exist Then
Call objTestLib.printfile(file,3," 2. Task Status ")
Browser("Accela Automation:").Page("Accela Automation:").Link("Task Status").Click
Call SearchStatus()
If Err_Flag=False Then
call UpdateStatus()
If Err_Flag=False Then
call RevertStatus()
End If
End If
Else
Call objTestLib.printfile(file,3," 2. Task Status -- cannot find this link, SKIP")
End If
Function SearchStatus ()
Err_Flag = True
'a. Search all task status
Call objTestLib.printfile(file,3," a. Search all task status")
Browser("Accela Automation:_33").Page("Accela Automation:").Image("Submit").Click 20,0
If Browser("Accela Automation:_34").Page("Accela Automation:").Image("Select").Exist(10) Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,3," ---None, no records found, please add smartchoice group!")
End If
End Function
Function UpdateStatus ()
'b. select the first task status and update it
Call objTestLib.printfile(file,3," b. select the first task statu and update it")
Browser("Accela Automation:_34").Page("Accela Automation:").Image("Select").Click
arrOriginalValue(1) = Browser("Accela Automation:_35").Page("Accela Automation:_2").WebRadioGroup("rbActStatFlg").GetROProperty("value")
arrOriginalValue(2) = Browser("Accela Automation:_35").Page("Accela Automation:_2").WebRadioGroup("txtRecStatus").GetROProperty("value")
arrExpectValue = Array("","U","I")
Call UpdateStatusValue(arrExpectValue)
If Err_Flag=True Then
Call objTestLib.printfile(file,5,"Updated SmartChoice failed" & strMessage)
Else
Call VerifyStatusValue(arrExpectValue)
End If
End Function
Function UpdateStatusValue (arrExpectValue)
Err_Flag = True
Browser("Accela Automation:_35").Page("Accela Automation:").WebRadioGroup("rbActStatFlg").Select arrExpectValue(1)
Browser("Accela Automation:_35").Page("Accela Automation:").WebRadioGroup("txtRecStatus").Select arrExpectValue(2)
Browser("Accela Automation:_35").Page("Accela Automation:_2").Image("SaveBtn").Click
If Browser("Accela Automation:_33").Page("Accela Automation:_2").WebRadioGroup("txtActStatFlg").Exist(10) Then
Err_Flag = False
Browser("Accela Automation:_33").Page("Accela Automation:_2").Image("Submit").Click 26,4
Browser("Accela Automation:_34").Page("Accela Automation:").Image("Select").Click
wait(5)
Elseif Browser("Accela Automation:_35").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_35").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_35").Dialog("Microsoft Internet").WinButton("OK").Click
Else
strMessage = "there occurs an unexpected error!"
End If
End Function
Function VerifyStatusValue (arrExpectValue)
wait(5)
arrTempValue(1) = Browser("Accela Automation:_35").Page("Accela Automation:").WebRadioGroup("rbActStatFlg").GetROProperty("value")
arrTempValue(2) = Browser("Accela Automation:_35").Page("Accela Automation:").WebRadioGroup("txtRecStatus").GetROProperty("value")
If arrTempValue(1)=arrExpectValue(1) And arrTempValue(2)=arrExpectValue(2) Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"update the first task status failed!")
End If
End Function
Function RevertStatus ()
'c. revert the first task status with original data
Call objTestLib.printfile(file,3," revert the first task status with original data")
Call UpdateStatusValue(arrOriginalValue)
End Function
'Browser("Accela Automation:_33").Page("Accela Automation:_2").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====3.Messages
If Browser("Accela Automation:").Page("Accela Automation:").Link("Messages").Exist Then
Call objTestLib.printfile(file,3," 3. Messages")
Browser("Accela Automation:").Page("Accela Automation:").Link("Messages").Click
Call SearchMessage()
If Err_Flag=False Then
call UpdateMessage()
If Err_Flag=False Then
call RevertMessage()
End If
End If
Else
Call objTestLib.printfile(file,3," 3. Messages -- cannot find this link, SKIP")
End If
Function SearchMessage ()
Err_Flag = True
'a. Search all messages
Call objTestLib.printfile(file,3," a. Search all messages")
Browser("Accela Automation:_36").Page("Accela Automation:").Image("Submit").Click 15,6
If Browser("Accela Automation:_37").Page("Accela Automation:").Image("Edit").Exist(10) Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,3," ---None, no records found, please add message!")
End If
End Function
Function UpdateMessage ()
'b. select the first message and update it
Call objTestLib.printfile(file,3," b. select the first message and update it")
Browser("Accela Automation:_37").Page("Accela Automation:").Image("Edit").Click
arrOriginalValue(1) = Browser("Accela Automation:_38").Page("Accela Automation:").WebEdit("txtCONTENTS_BODY").GetROProperty("value")
arrOriginalValue(2) = Browser("Accela Automation:_38").Page("Accela Automation:").WebRadioGroup("rbREC_STATUS").GetROProperty("value")
arrExpectValue = Array("","Agency Tesing","I")
Call UpdateMessageValue(arrExpectValue)
If Err_Flag=True Then
Call objTestLib.printfile(file,5,"Updated message failed, the error message is " & strMessage)
Else
Browser("Accela Automation:_37").Page("Accela Automation:").Image("Edit").Click
Call VerifyMessageValue(arrExpectValue)
End If
End Function
Function UpdateMessageValue (arrExpectValue)
Err_Flag = True
Browser("Accela Automation:_38").Page("Accela Automation:").WebEdit("txtCONTENTS_BODY").Set arrExpectValue(1)
Browser("Accela Automation:_38").Page("Accela Automation:").WebRadioGroup("rbREC_STATUS").Select arrExpectValue(2)
Browser("Accela Automation:_38").Page("Accela Automation:").Image("Save").Click 35,7
If Browser("Accela Automation:_37").Page("Accela Automation:").Image("Edit").Exist(10) Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Elseif Browser("Accela Automation:_38").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_38").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_38").Dialog("Microsoft Internet").WinButton("OK").Click
Else
strMessage = "there occurs an unexpected error!"
Browser("Accela Automation:").back
End If
End Function
Function VerifyMessageValue (arrExpectValue)
wait(5)
arrTempValue(1) = Browser("Accela Automation:_38").Page("Accela Automation:").WebEdit("txtCONTENTS_BODY").GetROProperty("value")
arrTempValue(2) = Browser("Accela Automation:_38").Page("Accela Automation:").WebRadioGroup("rbREC_STATUS").GetROProperty("value")
If arrTempValue(1)=arrExpectValue(1) And arrTempValue(2)=arrExpectValue(2) Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"Update the first smartchoice group failed")
End If
End Function
Function RevertMessage ()
'c. revert the first message with original data
Call objTestLib.printfile(file,3," c. revert the first message with original data")
Call UpdateMessageValue(arrOriginalValue)
End Function
'Browser("Accela Automation:_37").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====4.EMail Setting
If Browser("Accela Automation:").Page("Accela Automation:").Link("eMail Setting").Exist Then
Call objTestLib.printfile(file,3," 4.EMail Setting")
Browser("Accela Automation:").Page("Accela Automation:").Link("eMail Setting").Click
Call SearchEmailSetting()
If Err_Flag=False Then
call AddEmailSetting()
If Err_Flag=False Then
call UpdateEmailSetting()
Call DeleteEmailSetting()
End If
End If
Else
Call objTestLib.printfile(file,3," 4.EMail Setting -- cannot find this link, SKIP")
End If
Function SearchEmailSetting ()
Err_Flag = True
'a. Search all processes and all email settings attached with the first process
Call objTestLib.printfile(file,3," a. Search all processes and all email settings attached with the first process")
Browser("Accela Automation:_39").Page("Accela Automation:").Image("Submit").Click 21,9
If Browser("Accela Automation:_40").Page("Accela Automation:").WebTable("Process").Exist(10) Then
strInnertext = Browser("Accela Automation:_40").Page("Accela Automation:").WebTable("Process").GetROProperty("innertext")
If instr(strInnertext,"No eMail Settings have been created for this process")=0 Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,3," ---None, no records found, please add email setting")
End If
Else
Call objTestLib.printfile(file,5,"cannot find any email setting")
End If
End Function
Function AddEmailSetting ()
Err_Flag = True
'b. Add a new email setting
Call objTestLib.printfile(file,3," b. Add a new email setting")
Browser("Accela Automation:_40").Page("Accela Automation:").Image("Edit").Click
Browser("Accela Automation:_41").Page("Accela Automation:").Image("Add new eMail").Click
wait(5)
Browser("Accela Automation:_93").Page("Accela Automation:").WebEdit("fname").Set "KIKI"
Browser("Accela Automation:_93").Page("Accela Automation:").WebEdit("lname").Set "ZHAO"
Browser("Accela Automation:_93").Page("Accela Automation:").WebEdit("email").Set "[email protected]"
Browser("Accela Automation:_93").Page("Accela Automation:").Image("Submit").Click
If Browser("Browser_7").Dialog("Microsoft Internet").WinButton("OK").Exist(5) Then
strMessage = Browser("Browser_7").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Call objTestLib.printfile(file,5,"Add a new task failed,the error message is " & strMessage)
Browser("Browser_7").Dialog("Microsoft Internet").WinButton("OK").Click
Elseif Browser("Accela Automation:_41").Page("Accela Automation:").Image("Update with").Exist Then
Err_Flag = False
Set oDesc = Description.Create()
oDesc("micclass").Value = "WebEdit"
Set Edits = Browser("Accela Automation:_41").Page("Accela Automation:").ChildObjects(oDesc)
NumberOfEdits = Edits.Count()
intFlag = 0
For intLoop = 0 To NumberOfEdits-1
strEditValue = Edits(intLoop).GetROProperty("value")
If strEditValue="KIKI" Then
strEditName = Edits(intLoop).GetROProperty("name")
Call objTestLib.printfile(file,4)
intFlag = 1
Exit For
End If
Next
If intFlag=0 Then
Call objTestLib.printfile(file,5,"added new email setting failed!")
End If
Else
Call objTestLib.printfile(file,5,"Add a new task failed,there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function UpdateEmailSetting ()
'c. update the just created email setting
Call objTestLib.printfile(file,3," c. update the just created email setting")
'=============AA5.1 UI has been changed==============================================================
'Browser("Accela Automation:_41").Page("Accela Automation:").WebRadioGroup("rbB3CONTACT_FLAG104").SetTOProperty "name","rbB3CONTACT_FLAG" & Mid(strEditName,Instr(strEditName,"FNAME")+5)
'Browser("Accela Automation:_41").Page("Accela Automation:").WebRadioGroup("rbB3CONTACT_FLAG104").Select "Y"
'Browser("Accela Automation:_41").Page("Accela Automation:").WebRadioGroup("rbDISTRIBUTION_FLAG1").SetTOProperty "name","rbDISTRIBUTION_FLAG" & Mid(strEditName,Instr(strEditName,"FNAME")+5)
'Browser("Accela Automation:_41").Page("Accela Automation:").WebRadioGroup("rbDISTRIBUTION_FLAG1").Select "Y"
'===================================================================================================
Browser("Accela Automation:_41").Page("Accela Automation:").WebCheckBox("cbB3CONTACT_FLAG51").SetTOProperty "name","cbB3CONTACT_FLAG" & Mid(strEditName,Instr(strEditName,"FNAME")+5)
Browser("Accela Automation:_41").Page("Accela Automation:").WebCheckBox("cbB3CONTACT_FLAG51").Set "ON"
Browser("Accela Automation:_41").Page("Accela Automation:").WebCheckBox("cbDISTRIBUTION_FLAG51").SetTOProperty "name","cbDISTRIBUTION_FLAG" & Mid(strEditName,Instr(strEditName,"FNAME")+5)
Browser("Accela Automation:_41").Page("Accela Automation:").WebCheckBox("cbDISTRIBUTION_FLAG51").Set "ON"
Browser("Accela Automation:_41").Page("Accela Automation:").Image("Update with").Click
If Browser("Accela Automation:_41").Dialog("Microsoft Internet").WinButton("OK").Exist(5) Then
Browser("Accela Automation:_41").Dialog("Microsoft Internet").WinButton("OK").Click
End If
strTemp = Browser("Accela Automation:_41").Page("Accela Automation:").WebCheckBox("cbB3CONTACT_FLAG51").GetROProperty("value")
If strTemp="Y" Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"updated the email setting failed!")
End If
End Function
Function DeleteEmailSetting ()
'd. delete the just created email setting
Call objTestLib.printfile(file,3," d. delete the just created email setting")
Browser("Accela Automation:_41").Page("Accela Automation:").Image("Delete").Click
Browser("Accela Automation:_41").Dialog("Microsoft Internet").WinButton("OK").Click
If Browser("Accela Automation:_41").Page("Accela Automation:").Image("Add new eMail").Exist(5) Then
strInnerText = Browser("Accela Automation:_41").Page("Accela Automation:_2").WebTable("Task").GetROProperty("innerhtml")
If instr(strInnerText,"[email protected]")=0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"The just created email setting still exists!")
End If
Elseif Browser("Accela Automation:_41").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_41").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_41").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"cannot delete the added email setting, the error message is " & strMessage)
Else
strMessage = "there occurs an unexpected error!"
Call objTestLib.printfile(file,5,"cannot delete the added email setting, the error message is " & strMessage)
Browser("Accela Automation:").back
End If
End Function
'Browser("Accela Automation:_41").Page("Accela Automation:_2").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'###############################Section 5: REVIEW #####################
Call objTestLib.printfile(file,3,"Section 5: REVIEW")
objmsgbox.SQAMsgbox "Section 5: REVIEW","AA Auto Test",3,0
'=====1.Activities
If Browser("Accela Automation:").Page("Accela Automation:").Link("Activities").Exist Then
Call objTestLib.printfile(file,3," 1. Activities")
Browser("Accela Automation:").Page("Accela Automation:").Link("Activities").Click
'a. Search all processes, all Taskes attached with first processes and all activities attached with the first task
Call objTestLib.printfile(file,3," a. Search all processes, all Taskes attached with first processes and all activities attached with the first task")
If Browser("Accela Automation:_42").Page("Accela Automation:").Link("(browse different").Exist(10) Then
Browser("Accela Automation:_42").Page("Accela Automation:").Link("(browse different").Click
End If
Browser("Accela Automation:_43").Page("Accela Automation:").Image("select").Click
Browser("Accela Automation:_42").Page("Accela Automation:").Image("select").Click
Call AddActivity()
If Err_Flag=False Then
Call DeleteActivity()
End If
Else
Call objTestLib.printfile(file,3," 1. Activities --cannot find this link, SKIP")
End If
Function AddActivity ()
Err_Flag = True
'b. add a new activity attached to the first workflow processes
Call objTestLib.printfile(file,3," b. add a new activity attached to the first workflow processes")
Browser("Accela Automation:_44").Page("Accela Automation:").Image("Add New Activity").Click
Browser("Accela Automation:_45").Page("Accela Automation:").WebEdit("ActivityCode").Set "001"
Browser("Accela Automation:_45").Page("Accela Automation:").WebEdit("ActivityDescription").Set "Agency Testing"
Browser("Accela Automation:_45").Page("Accela Automation:").Image("Submit").Click
If Browser("Accela Automation:_44").Page("Accela Automation:").Image("Add New Activity").Exist(10) Then
Err_Flag = False
strInnerText = Browser("Accela Automation:_44").Page("Accela Automation:_2").WebTable("Process").GetROProperty("innertext")
If instr(strInnerText,"AGENCY TESTING") <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the new added activity")
End If
Elseif Browser("Accela Automation:_45").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_45").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_45").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"add activity failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"There occurs an unexpected error!")
Browser("Accela Automation:").Back
End If
End Function
Function DeleteActivity ()
'c. delete the new activity attached to the first workflow processes
Call objTestLib.printfile(file,3," c. delete the new activity attached to the first workflow processes")
Browser("Accela Automation:_44").Page("Accela Automation:_2").Image("Delete").Click
Browser("Accela Automation:_44").Dialog("Microsoft Internet").WinButton("OK").Click
wait(5)
strInnerText = Browser("Accela Automation:_44").Page("Accela Automation:_3").WebTable("Process").GetROProperty("innertext")
If instr(strInnerText,"Agency Testing")=0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"the new added activity still exists!")
End If
End Function
'Browser("Accela Automation:_44").Page("Accela Automation:_3").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====2.Standard Comments
If Browser("Accela Automation:").Page("Accela Automation:").Link("Standard Comments").Exist Then
Call objTestLib.printfile(file,3," 2. Standard Comments")
Browser("Accela Automation:").Page("Accela Automation:").Link("Standard Comments").Click
Call SearchComments ()
Call AddComment()
If Err_Flag=False Then
Call DeleteComment()
End If
Else
Call objTestLib.printfile(file,3," 2. Standard Comments --cannot find this link, SKIP")
End If
Function SearchComments ()
Err_Flag = True
'a. Search all comment types
Call objTestLib.printfile(file,3," a. Search all comment types")
If Browser("Accela Automation:_46").Page("Accela Automation:").WebTable("Edit").Exist(10) Then
Err_Flag = False
strInnertext = Browser("Accela Automation:_46").Page("Accela Automation:").WebTable("Edit").GetROProperty("innertext")
If instr(strInnertext,"No Records Found")=0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,3," None:No Records exists in system!")
End If
Else
Call objTestLib.printfile(file,5,"Search all comment types failes!")
End If
End Function
Function AddComment ()
Err_Flag = True
'b. Add a new comment
Call objTestLib.printfile(file,3," b. Add a new comment")
Browser("Accela Automation:_46").Page("Accela Automation:").Image("Add New Comment").Click
Browser("Accela Automation:_47").Page("Accela Automation:").WebEdit("StdCommentType").Set "Agency Testing"
Browser("Accela Automation:_47").Page("Accela Automation:").WebEdit("StdCommentID").Set "Agency Testing"
Browser("Accela Automation:_47").Page("Accela Automation:").WebEdit("StdComment").Set "Agency Testing"
Browser("Accela Automation:_47").Page("Accela Automation:").Image("Submit").Click
If Browser("Accela Automation:_46").Page("Accela Automation:").Image("Add New Comment").Exist(10) Then
strInnerText = Browser("Accela Automation:_48").Page("Accela Automation:").WebTable("Comment Type:").GetROProperty("innertext")
If instr(strInnerText,"AGENCY TESTING") <> 0 Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"Adding new comment failed!")
End If
Elseif Browser("Accela Automation:_47").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_47").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_47").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"Adding new comment failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function DeleteComment ()
'c. delete the new comment
Call objTestLib.printfile(file,3," c. delete the new comment")
Browser("Accela Automation:_48").Page("Accela Automation:").Image("Delete").Click
Browser("Accela Automation:_48").Dialog("Microsoft Internet").WinButton("OK").Click
If Browser("Accela Automation:_46").Page("Accela Automation:").Image("Add New Comment").Exist(10) Then
strInnerText = Browser("Accela Automation:_46").Page("Accela Automation:_2").WebTable("Edit").GetROProperty("innertext")
If instr(strInnerText,"Agency Testing")=0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"the new comment type still exists!")
End If
Elseif Browser("Accela Automation:_48").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_48").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_48").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"deleting new comment failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
'Browser("Accela Automation:_46").Page("Accela Automation:_2").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====3.Document
If Browser("Accela Automation:").Page("Accela Automation:").Link("Standard Comments").Exist Then
Call objTestLib.printfile(file,3," 3. Document")
Browser("Accela Automation:_83").Page("Accela Automation:").Link("Documents").Click
Call SearchDocument ()
Call AddDocument()
If Err_Flag=False Then
Call DeleteDocument()
End If
Else
Call objTestLib.printfile(file,3," 2. Standard Comments --cannot find this link, SKIP")
End If
Function SearchDocument ()
'a. Search all Documents
Call objTestLib.printfile(file,3," a. Search all Documents")
Browser("Accela Automation:_84").Page("Accela Automation:").Image("Search").Click
'Browser("Accela Automation:_85").Page("Accela Automation:_2").Image("Select").Click
If Browser("Accela Automation:_85").Page("Accela Automation:_2").Image("Select").Exist(10) Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,3," ---None:No Records exists in system!")
End If
End Function
Function AddDocument ()
Err_Flag = True
'b. Add a new document
Call objTestLib.printfile(file,3," b. Add a new document")
Browser("Accela Automation:_85").Page("Accela Automation:").Image("Add New Document").Click
Browser("Accela Automation:_86").Page("Accela Automation:").WebEdit("DocumntCode").Set "Agency Testing"
Browser("Accela Automation:_86").Page("Accela Automation:").WebEdit("DocumentType").Set "Agency Testing"
Browser("Accela Automation:_86").Page("Accela Automation:").Image("Submit").Click
If Browser("Accela Automation:_85").Page("Accela Automation:").Image("Add New Document").Exist(10) Then
strInnertext = Browser("Accela Automation:_85").Page("Accela Automation:").WebTable("Edit").GetROProperty("innertext")
If instr(strInnertext,"Agency Testing") <> 0 Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the added document!")
End If
Elseif Browser("Accela Automation:_86").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_86").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_86").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"adding new document failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function DeleteDocument ()
'c. delete the new added document
Call objTestLib.printfile(file,3," c. delete the new added document")
Browser("Accela Automation:_87").Page("Accela Automation:").Image("Delete").Click
Browser("Accela Automation:_87").Dialog("Microsoft Internet").WinButton("OK").Click
If Browser("Accela Automation:_85").Page("Accela Automation:").Image("Add New Document").Exist(10) Then
strInnertext = Browser("Accela Automation:_85").Page("Accela Automation:").WebTable("Edit").GetROProperty("innertext")
If instr(strInnertext,"Agency Testing")=0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"the new document still exists!")
End If
Elseif Browser("Accela Automation:_87").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_87").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_87").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"deleting new comment failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
'Browser("Accela Automation:_84").Page("Accela Automation:_2").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'###############################Section 6: PROPERTY #####################
Call objTestLib.printfile(file,3,"Section 6: PROPERTY")
objmsgbox.SQAMsgbox "Section 6: PROPERTY","AA Auto Test",3,0
'=====1.Parcel
If Browser("Accela Automation:").Page("Accela Automation:").Link("Parcel").Exist Then
Call objTestLib.printfile(file,3," 1. Parcel")
Browser("Accela Automation:").Page("Accela Automation:").Link("Parcel").Click
call SearchParcel ()
If Err_Flag=False Then
call AddOwner()
If Err_Flag=False Then
call RemoveOwner()
End If
call AddAddress()
If Err_Flag=False Then
call RemoveAddress()
End If
End If
Else
Call objTestLib.printfile(file,3," 1. Parcel -- cannot find this link, SKIP")
End If
Function SearchParcel ()
Err_Flag = True
'a. Search all parcels
Call objTestLib.printfile(file,3," a. Search all parcels")
Browser("Accela Automation:_49").Page("Accela Automation:").WebEdit("txtParcel").Set "p"
Browser("Accela Automation:_49").Page("Accela Automation:").Image("Submit").Click
Browser("Accela Automation:_50").Page("Accela Automation:").Sync
If Browser("Accela Automation:_50").Page("Accela Automation:").Image("Select").Exist(10) Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,3," None:No Records exists in system!")
End If
End Function
Function AddOwner ()
Err_Flag = True
'b. select the first parcel and add an existed owner
Call objTestLib.printfile(file,3," b. select the first parcel and add an existed owner")
Browser("Accela Automation:_50").Page("Accela Automation:").Image("Select").Click
Browser("Accela Automation:_51").Page("Accela Automation:_3").Image("Search for Owner").Click
Browser("Accela Automation:_52").Page("Accela Automation:").WebEdit("OwnL1_MAIL_CITY").Set ""
Browser("Accela Automation:_52").Page("Accela Automation:").WebList("OwnB1_MAIL_STATE").Select "#0"
Browser("Accela Automation:_52").Page("Accela Automation:").Image("Submit").Click 31,5
strTemp = Browser("Accela Automation:_53").Page("Accela Automation:").WebTable("Owner Name").GetCellData(3,1)
Browser("Accela Automation:_53").Page("Accela Automation:").Image("Selbtn").Click
if Browser("Browser_20").Dialog("Microsoft Internet").WinButton("OK").Exist(5) then
Browser("Browser_20").Dialog("Microsoft Internet").WinButton("OK").Click
Browser("Accela Automation:_53").Page("Accela Automation:_3").Image("Cancel").Click
end if
If Browser("Accela Automation:_51").Page("Accela Automation:").Image("remove Owner").Exist(10) Then
Err_Flag = False
strInnerText = Browser("Accela Automation:_51").Page("Accela Automation:").WebTable("Owner").GetROProperty("innertext")
If instr(strInnerText,strTemp) <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the new added owner")
End If
Elseif Browser("Browser_15").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Browser_15").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Browser_15").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"cannot add owner, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"cannot add owner, there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function RemoveOwner ()
'c. Remove the new owner
Call objTestLib.printfile(file,3," c. Remove the new owner")
Browser("Accela Automation:_51").Page("Accela Automation:").Image("remove Owner").Click
Browser("Accela Automation:_51").Dialog("Microsoft Internet").WinButton("OK").Click
wait(5)
If Browser("Accela Automation:_51").Page("Accela Automation:").Image("remove Owner").Exist Then
strInnerText = Browser("Accela Automation:_51").Page("Accela Automation:").WebTable("Owner").GetROProperty("innertext")
If instr(strInnerText,strTemp)=0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"the new added owner still exist!")
End If
Elseif Browser("Accela Automation:_51").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_51").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_51").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"cannot add owner, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"cannot remove owner, there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function AddAddress ()
Err_Flag = True
'd. select the first parcel and Add an existed address
Call objTestLib.printfile(file,3," d. select the first parcel and add an existed address")
Browser("Accela Automation:_51").Page("Accela Automation:").Image("Search for address").Click
Browser("Accela Automation:_54").Page("Accela Automation:").Image("Submit").Click
strTemp = Browser("Accela Automation:_55").Page("Accela Automation:").WebTable("Address").GetCellData(4,1)
Browser("Accela Automation:_55").Page("Accela Automation:").Image("Selbtn").Click
wait(5)
if Browser("Browser_21").Dialog("Microsoft Internet").WinButton("OK").Exist(5) then
Browser("Browser_21").Dialog("Microsoft Internet").WinButton("OK").Click
Browser("Accela Automation:_55").Page("Accela Automation:_3").Image("Cancel").Click
end if
If Browser("Accela Automation:_51").Page("Accela Automation:").Image("remove Address").Exist(5) Then
Err_Flag = False
strInnerText = Browser("Accela Automation:_51").Page("Accela Automation:").WebTable("Address").GetROProperty("innertext")
If instr(strInnerText,strTemp) <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the new added address")
End If
Elseif Browser("Browser_16").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Browser_16").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Browser_16").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"cannot add owner, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"cannot add owner, there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function RemoveAddress ()
'e. Remove the new address
Call objTestLib.printfile(file,3," e. Remove the new address")
Browser("Accela Automation:_51").Page("Accela Automation:").Image("remove Address").Click
Browser("Accela Automation:_51").Dialog("Microsoft Internet").WinButton("OK").Click
wait(5)
If Browser("Accela Automation:_51").Page("Accela Automation:").Image("remove Address").Exist Then
strInnerText = Browser("Accela Automation:_51").Page("Accela Automation:").WebTable("Address").GetROProperty("innertext")
If instr(strInnerText,strTemp)=0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"the new added address still exists!")
End If
Elseif Browser("Accela Automation:_51").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_51").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_51").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"cannot add owner, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"cannot remove owner, there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function UpdateParcel (strUpdateValue)
'b. select the first parcel and update it
Call objTestLib.printfile(file,3," b. select the first parcel and update it")
Browser("Accela Automation:_88").Page("Accela Automation:").Image("Select").Click
strOriginalValue = Browser("Accela Automation:_89").Page("Accela Automation:").WebEdit("txt_Tract").GetROProperty("value")
Browser("Accela Automation:_89").Page("Accela Automation:").WebEdit("txt_Tract").Set strUpdateValue
Browser("Accela Automation:_89").Page("Accela Automation:").Image("Submit").Click
wait(5)
Browser("Accela Automation:_88").Page("Accela Automation:").Image("Select").Click
strTemp = Browser("Accela Automation:_89").Page("Accela Automation:").WebEdit("txt_Tract").GetROProperty("value")
If instr(strUpdateValue,strTemp) <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the updated value!")
End If
End Function
Function RevertParcel ()
'c. revert the parcel value with original value
Call objTestLib.printfile(file,3," c. revert the parcel value with original value")
Browser("Accela Automation:_89").Page("Accela Automation:").WebEdit("txt_Tract").Set strOriginalValue
Browser("Accela Automation:_89").Page("Accela Automation:").Image("Submit").Click
End Function
'Browser("Accela Automation:_51").Page("Accela Automation:_2").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====2.Address
If Browser("Accela Automation:").Page("Accela Automation:").Link("Address").Exist Then
Call objTestLib.printfile(file,3," 2. Address")
Browser("Accela Automation:").Page("Accela Automation:").Link("Address").Click
call SearchAddress ()
If Err_Flag=False Then
'call UpdateAddress ("Auto Testing")
'call UpdateAddress (strOriginalValue)
call AddParcel()
If Err_Flag=False Then
call RemoveParcel()
End If
End If
Else
Call objTestLib.printfile(file,3," 2. Address -- cannot find this link, SKIP")
End If
Function SearchAddress ()
Err_Flag = True
'a. Search all Addresses
Call objTestLib.printfile(file,3," a. Search all Addresses")
Browser("Accela Automation:_56").Page("Accela Automation:").WebEdit("txtStrName").Set "a"
Browser("Accela Automation:_56").Page("Accela Automation:").WebList("selState").Select "#0"
Browser("Accela Automation:_56").Page("Accela Automation:").Image("Submit").Click 26,5
If Browser("Accela Automation:_57").Page("Accela Automation:").Image("Select").Exist(10) Then
Browser("Accela Automation:_57").Page("Accela Automation:").Image("Select").Click
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,3," None:No Records exists in system!")
End If
End Function
Function AddParcel ()
Err_Flag = True
'b. select the first address and add an existing parcel
Call objTestLib.printfile(file,3," b. select the first address and add an existing parcel")
'Browser("Accela Automation:_57").Page("Accela Automation:").Image("Select").Click
Browser("Accela Automation:_58").Page("Accela Automation:").Image("Search for Parcel").Click
wait(5)
Browser("Accela Automation:_97").Page("Accela Automation:").WebEdit("txtParcel").Set "p"
Browser("Accela Automation:_97").Page("Accela Automation:").Image("Submit").Click 22,5
wait(5)
strTemp =Browser("Accela Automation:_98").Page("Accela Automation:").WebTable("Parcel No.").GetCellData(4,1)
Browser("Accela Automation:_98").Page("Accela Automation:").Image("Select").Click
wait(5)
If Browser("Accela Automation:_58").Page("Accela Automation:").Image("Edit Address").Exist(5) Then
Err_Flag = False
strInnerText = Browser("Accela Automation:_58").Page("Accela Automation:_2").WebTable("Parcel").GetROProperty("text")
If instr(strInnerText,strTemp) <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the new address!")
End If
Elseif Browser("Browser_17").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Browser_17").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Browser_17").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"add new address failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:_98").Page("Accela Automation:").Image("Cancel").Click
End If
End Function
Function RemoveParcel ()
'c. remove the just added parcel
Call objTestLib.printfile(file,3," c. remove the just added parcel")
Browser("Accela Automation:_58").Page("Accela Automation:_2").Image("Remove Parcel").Click
Browser("Accela Automation:_58").Dialog("Microsoft Internet").WinButton("OK").Click
wait(5)
If Browser("Accela Automation:_58").Page("Accela Automation:").Image("Edit Address").Exist Then
strInnerText = Browser("Accela Automation:_58").Page("Accela Automation:_2").WebTable("Parcel").GetROProperty("innertext")
If instr(strInnerText,strTemp)=0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"the new parcel still exists!")
End If
Elseif Browser("Accela Automation:_58").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_58").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_58").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"add new address failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function UpdateAddress (strUpdateValue)
'b. select the first address and update it
Call objTestLib.printfile(file,3," b. select the first address and update it")
wait(10)
Browser("Accela Automation:_58").Page("Accela Automation:").Image("Edit Address").Click
strOriginalValue = Browser("Accela Automation:_90").Page("Accela Automation:").WebEdit("txtComm").GetROProperty("value")
Browser("Accela Automation:_90").Page("Accela Automation:").WebEdit("txtComm").Set strUpdateValue
Browser("Accela Automation:_90").Page("Accela Automation:").Image("Save").Click
wait(5)
'Browser("Accela Automation:_56").Page("Accela Automation:_2").WebList("selState").Select "#0"
'Browser("Accela Automation:_56").Page("Accela Automation:_2").Image("Submit").Click 31,7
'Browser("Accela Automation:_57").Page("Accela Automation:_2").Image("Select").Click
Browser("Accela Automation:_58").Page("Accela Automation:").Image("Edit Address").Click
strTemp = Browser("Accela Automation:_90").Page("Accela Automation:").WebEdit("txtComm").GetROProperty("value")
If instr(strUpdateValue,strTemp) <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the updated value!")
End If
Browser("Accela Automation:_90").Page("Accela Automation:").Image("Cancel").Click
End Function
Function RevertAddress ()
'c. revert the address value with original value
Call objTestLib.printfile(file,3," c. revert the address value with original value")
Browser("Accela Automation:_90").Page("Accela Automation:").WebEdit("txtComm").Set strOriginalValue
Browser("Accela Automation:_90").Page("Accela Automation:").Image("Save").Click 20,10
End Function
'Browser("Accela Automation:_58").Page("Accela Automation:_3").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====3. Owner
If Browser("Accela Automation:").Page("Accela Automation:").Link("Owner").Exist Then
Call objTestLib.printfile(file,3," 3. Owner")
Browser("Accela Automation:").Page("Accela Automation:").Link("Owner").Click
Call SearchOwner()
If Err_Flag=False Then
call UpdateOwner()
If Err_Flag=False Then
call RevertOwner()
End If
End If
Else
Call objTestLib.printfile(file,3," 3. Owner -- cannot find this link, SKIP")
End If
Function SearchOwner ()
Err_Flag = True
'a. Search all Owners
Call objTestLib.printfile(file,3," a. Search all Owners")
Browser("Accela Automation:_59").Page("Accela Automation:").WebEdit("txtL1_OWNER_FULL_NAM").Set "p"
Browser("Accela Automation:_59").Page("Accela Automation:").WebList("owner_State").Select "#0"
Browser("Accela Automation:_59").Page("Accela Automation:").WebList("selState").Select "#0"
Browser("Accela Automation:_59").Page("Accela Automation:").Image("Submit").Click 24,9
If Browser("Accela Automation:_60").Page("Accela Automation:").Image("Select").Exist(10) Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,3," None:No Records exists in system!")
End If
End Function
Function UpdateOwner ()
Err_Flag = True
'b. Select the first owner and update it
Call objTestLib.printfile(file,3," b. Select the first owner and update it")
Browser("Accela Automation:_60").Page("Accela Automation:").Image("Select").Click
arrOriginalValue(1) = Browser("Accela Automation:_61").Page("Accela Automation:").WebEdit("txt_Address1").GetROProperty("value")
arrOriginalValue(2) = Browser("Accela Automation:_61").Page("Accela Automation:").WebRadioGroup("Primary_Owner").GetROProperty("value")
arrOriginalValue(3) = Browser("Accela Automation:_61").Page("Accela Automation:").WebRadioGroup("Owner_Status").GetROProperty("value")
arrExpectValue = Array("","AGENCT TESTING","N","I")
Call UpdateOwnerValue(arrExpectValue)
If Err_Flag=True Then
Call objTestLib.printfile(file,5,"Updated owner failed" & strMessage)
Else
Browser("Accela Automation:_60").Page("Accela Automation:").Image("Select").Click
Call VerifyOwnerValue(arrExpectValue)
End If
End Function
Function UpdateOwnerValue (arrExpectValue)
Err_Flag = True
Browser("Accela Automation:_61").Page("Accela Automation:").WebEdit("txt_Address1").Set arrExpectValue(1)
Browser("Accela Automation:_61").Page("Accela Automation:").WebRadioGroup("Primary_Owner").Select arrExpectValue(2)
Browser("Accela Automation:_61").Page("Accela Automation:").WebRadioGroup("Owner_Status").Select arrExpectValue(3)
Browser("Accela Automation:_61").Page("Accela Automation:").Image("Save").Click 24,11
If Browser("Accela Automation:_60").Page("Accela Automation:_2").Image("Select").Exist(10) Then
Err_Flag = False
Elseif Browser("Accela Automation:_61").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_61").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_61").Dialog("Microsoft Internet").WinButton("OK").Click
Else
strMessage = "there occurs an unexpected error!"
Browser("Accela Automation:").back
End If
End Function
Function VerifyOwnerValue (arrExpectValue)
wait(5)
arrTempValue(1) = Browser("Accela Automation:_61").Page("Accela Automation:").WebEdit("txt_Address1").GetROProperty("value")
arrTempValue(2) = Browser("Accela Automation:_61").Page("Accela Automation:").WebRadioGroup("Primary_Owner").GetROProperty("value")
arrTempValue(3) = Browser("Accela Automation:_61").Page("Accela Automation:").WebRadioGroup("Owner_Status").GetROProperty("value")
If arrTempValue(1)=arrExpectValue(1) And arrTempValue(2)=arrExpectValue(2) And arrTempValue(3)=arrExpectValue(3) Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the updated value")
End If
End Function
Function RevertOwner ()
'c. revert the first owner with original data
Call objTestLib.printfile(file,3," c. revert the first owner with original data")
Call UpdateOwnerValue(arrOriginalValue)
End Function
'Browser("Accela Automation:_60").Page("Accela Automation:_2").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====4. APO Temple
If Browser("Accela Automation:").Page("Accela Automation:").Link("APO Template").Exist Then
Call objTestLib.printfile(file,3," 4. APO Temple ")
Browser("Accela Automation:").Page("Accela Automation:").Link("APO Template").Click
Call SearchAPOTem()
If Err_Flag=False Then
call UpdateAPOTem()
If Err_Flag=False Then
Call RevertAPOTem()
End If
End If
Else
Call objTestLib.printfile(file,3," 4. APO Temple -- cannot find this link, SKIP")
End If
Function SearchAPOTem ()
Err_Flag = True
'a. Search all APO Temples
Call objTestLib.printfile(file,3," a. Search all APO Temples")
Browser("Accela Automation:_62").Page("Accela Automation:").Image("Submit").Click 32,6
If Browser("Accela Automation:_63").Page("Accela Automation:").Image("Edit").Exist(10) Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,3," None:No Records exists in system!")
End If
End Function
Function UpdateAPOTem ()
Err_Flag = True
'b. Select the first APO Temple and update it
Call objTestLib.printfile(file,3," b. Select the first APO Temple and update it")
Browser("Accela Automation:_63").Page("Accela Automation:").Image("Edit").Click
Browser("Accela Automation:_64").Page("Accela Automation:").Image("Cancel").Click
wait(5)
arrOriginalValue(1) = Browser("Accela Automation:_99").Page("Accela Automation:").WebEdit("AttrTempDes").GetROProperty("value")
arrOriginalValue(2) = Browser("Accela Automation:_99").Page("Accela Automation:").WebRadioGroup("aenableflag").GetROProperty("value")
Browser("Accela Automation:_99").Page("Accela Automation:").WebEdit("AttrTempDes").Set "Agency Testing"
Browser("Accela Automation:_99").Page("Accela Automation:").WebRadioGroup("aenableflag").Select "I"
Browser("Accela Automation:_99").Page("Accela Automation:").Image("submit").Click 37,3
If Browser("Accela Automation:_63").Page("Accela Automation:").Image("Edit").Exist(5) Then
Err_Flag = False
strTemp = trim(Browser("Accela Automation:_64").Page("Accela Automation:").WebTable("Template Information").GetCellData(4,2))
If strTemp="Agency Testing" Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"updated the APO temple failed!")
End If
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function RevertAPOTem ()
'c. revert the first APO temple with original data
Call objTestLib.printfile(file,3," c. revert the first APO temple with original data")
Browser("Accela Automation:_64").Page("Accela Automation:").Image("Cancel").Click
Browser("Accela Automation:_99").Page("Accela Automation:").WebEdit("AttrTempDes").Set arrOriginalValue(1)
Browser("Accela Automation:_99").Page("Accela Automation:").WebRadioGroup("aenableflag").Select arrOriginalValue(2)
Browser("Accela Automation:_99").Page("Accela Automation:").Image("submit").Click 38,6
wait(5)
End Function
'Browser("Accela Automation:_64").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'###############################Section 7: PEOPLE #####################
Call objTestLib.printfile(file,3,"Section 7: PEOPLE ")
objmsgbox.SQAMsgbox "Section 7: PEOPLE","AA Auto Test",3,0
'=====1. Licensed
If Browser("Accela Automation:").Page("Accela Automation:").Link("Licensed").Exist Then
Call objTestLib.printfile(file,3," 1. Licensed")
Browser("Accela Automation:").Page("Accela Automation:").Link("Licensed").Click
Call SearchPeople()
If Err_Flag=False Then
call UpdatePeople()
If Err_Flag=False Then
Call RevertPeople()
End If
End If
Else
Call objTestLib.printfile(file,3," 1. Licensed --cannot find this link, SKIP")
End If
Function SearchPeople ()
Err_Flag = True
'a. Search all licensed people
Call objTestLib.printfile(file,3," a. Search all licensed people")
Browser("Accela Automation:_65").Page("Accela Automation:").Image("Submit").Click 29,9
If Browser("Accela Automation:_66").Page("Accela Automation:").Image("Select").Exist(10) Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,3," None:No Records exists in system!")
End If
End Function
Function UpdatePeople ()
Err_Flag = True
'b. Select the first Licensed Professional and update it
Call objTestLib.printfile(file,3," b. Select the first Licensed Professional and update it")
Browser("Accela Automation:_66").Page("Accela Automation:").Image("Select").Click
arrOriginalValue(1) = Browser("Accela Automation:_67").Page("Accela Automation:").WebEdit("LIC_COMMENT_txt").GetROProperty("value")
arrOriginalValue(2) = Browser("Accela Automation:_67").Page("Accela Automation:").WebRadioGroup("REC_STATUS_txt").GetROProperty("value")
Browser("Accela Automation:_67").Page("Accela Automation:").WebEdit("LIC_COMMENT_txt").Set "Agency Testing"
Browser("Accela Automation:_67").Page("Accela Automation:").WebRadioGroup("REC_STATUS_txt").Select "I"
Browser("Accela Automation:_67").Page("Accela Automation:").Image("Save changes").Click 42,6
If Browser("Accela Automation:_66").Page("Accela Automation:_2").Image("Select").Exist(10) Then
Err_Flag = False
Browser("Accela Automation:_66").Page("Accela Automation:_2").Image("Select").Click
strTemp = Browser("Accela Automation:_67").Page("Accela Automation:").WebEdit("LIC_COMMENT_txt").GetROProperty("value")
If strTemp="Agency Testing" Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the updated value")
End If
Elseif Browser("Accela Automation:_67").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_67").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_67").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"updated the people failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function RevertPeople ()
'c. revert the first Licensed Professional with original data
Call objTestLib.printfile(file,3," c. revert the first Licensed Professional with original data")
Browser("Accela Automation:_67").Page("Accela Automation:").WebEdit("LIC_COMMENT_txt").Set arrOriginalValue(1)
Browser("Accela Automation:_67").Page("Accela Automation:").WebRadioGroup("REC_STATUS_txt").Select arrOriginalValue(2)
Browser("Accela Automation:_67").Page("Accela Automation:").Image("Save changes").Click 26,9
End Function
'Browser("Accela Automation:_66").Page("Accela Automation:_2").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====2. Contact
If Browser("Accela Automation:").Page("Accela Automation:").Link("Contact").Exist Then
Call objTestLib.printfile(file,3," 2. Contact")
Browser("Accela Automation:").Page("Accela Automation:").Link("Contact").Click
Call SearchContact()
If Err_Flag=False Then
call UpdateContact()
If Err_Flag=False Then
Call RevertContact()
End If
End If
Else
Call objTestLib.printfile(file,3," 2. Contact -- cannot find this link, SKIP")
End If
Function SearchContact ()
Err_Flag = True
'a. Search all contact
Call objTestLib.printfile(file,3," a. Search all contact")
Browser("Accela Automation:_68").Page("Accela Automation:").Image("Submit").Click 31,14
If Browser("Accela Automation:_69").Page("Accela Automation:").Image("Select").Exist(10) Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,3," None:No Records exists in system!")
End If
End Function
Function UpdateContact ()
Err_Flag = True
'b. Select the first Licensed Professional and update it
Call objTestLib.printfile(file,3," b. Select the first Licensed Professional and update it")
Browser("Accela Automation:_69").Page("Accela Automation:").Image("Select").Click
arrOriginalValue(1) = Browser("Accela Automation:_70").Page("Accela Automation:").WebEdit("AppG1_COMMENT").GetROProperty("value")
arrOriginalValue(2) = Browser("Accela Automation:_70").Page("Accela Automation:").WebRadioGroup("AppG1_REC_STATUS").GetROProperty("value")
Browser("Accela Automation:_70").Page("Accela Automation:").WebEdit("AppG1_COMMENT").Set "Agency Testing"
Browser("Accela Automation:_70").Page("Accela Automation:").WebRadioGroup("AppG1_REC_STATUS").Select "I"
Browser("Accela Automation:_70").Page("Accela Automation:").Image("Save").Click 17,15
If Browser("Accela Automation:_69").Page("Accela Automation:_2").Image("Select").Exist(10) Then
Err_Flag = False
Browser("Accela Automation:_69").Page("Accela Automation:_2").Image("Select").Click
arrTempValue(1) = Browser("Accela Automation:_70").Page("Accela Automation:").WebEdit("AppG1_COMMENT").GetROProperty("value")
arrTempValue(2) = Browser("Accela Automation:_70").Page("Accela Automation:").WebRadioGroup("AppG1_REC_STATUS").GetROProperty("value")
If arrTempValue(1)="Agency Testing" And arrTempValue(2)="I" Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the updated value")
End If
' Elseif Browser("Accela Automation:_70").Dialog("Microsoft Internet").WinButton("OK").Exist Then
' strMessage= Browser("Accela Automation:_70").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
' Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function RevertContact ()
'c. revert the first contact with original data
Call objTestLib.printfile(file,3," c. revert the first contact with original data")
Browser("Accela Automation:_70").Page("Accela Automation:").WebEdit("AppG1_COMMENT").Set arrOriginalValue(1)
Browser("Accela Automation:_70").Page("Accela Automation:").WebRadioGroup("AppG1_REC_STATUS").Select arrOriginalValue(2)
Browser("Accela Automation:_70").Page("Accela Automation:").Image("Save").Click 12,6
End Function
'Browser("Accela Automation:_69").Page("Accela Automation:_2").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'###############################Section 8: CONDITION #####################
Call objTestLib.printfile(file,3,"Section 8: CONDITION ")
objmsgbox.SQAMsgbox "Section 8: CONDITION","AA Auto Test",3,0
'=====1. Condition type
If Browser("Accela Automation:").Page("Accela Automation:").Link("Condition Type").Exist Then
Call objTestLib.printfile(file,3," 1. Condition type")
Browser("Accela Automation:").Page("Accela Automation:").Link("Condition Type").Click
Call SearchCondType()
If Err_Flag=False Then
call UpdateCondType()
If Err_Flag=False Then
Call RevertCondType()
End If
End If
Else
Call objTestLib.printfile(file,3," 1. Condition type")
End If
Function SearchCondType ()
Err_Flag = True
'a. Search all condition type
Call objTestLib.printfile(file,3," a. Search all condition type")
Browser("Accela Automation:_71").Page("Accela Automation:").Image("Submit").Click 33,3
If Browser("Accela Automation:_72").Page("Accela Automation:").Image("Edit").Exist(10) Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,3," None:No Records exists in system!")
End If
End Function
Function UpdateCondType ()
Err_Flag = True
'b. Select the first condition type and update it
Call objTestLib.printfile(file,3," b. Select the first condition type and update it")
Browser("Accela Automation:_72").Page("Accela Automation:").Image("Edit").Click
strOriginalValue = Browser("Accela Automation:_73").Page("Accela Automation:").WebEdit("VALUE_DESC").GetROProperty("value")
Browser("Accela Automation:_73").Page("Accela Automation:").WebEdit("VALUE_DESC").Set "Agency Testing"
Browser("Accela Automation:_73").Page("Accela Automation:").Image("Save").Click 33,14
If Browser("Accela Automation:_72").Page("Accela Automation:_2").Image("Edit").Exist(10) Then
Err_Flag = False
Browser("Accela Automation:_72").Page("Accela Automation:_2").Image("Edit").Click
strTemp = Browser("Accela Automation:_73").Page("Accela Automation:").WebEdit("VALUE_DESC").GetROProperty("value")
If strTemp="Agency Testing" Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the updated value")
End If
Elseif Browser("Accela Automation:_73").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_73").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_73").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function RevertCondType ()
'c. revert the first condition type with original data
Call objTestLib.printfile(file,3," c. revert the first condition type with original data")
Browser("Accela Automation:_73").Page("Accela Automation:").WebEdit("VALUE_DESC").Set strOriginalValue
Browser("Accela Automation:_73").Page("Accela Automation:").Image("Save").Click 30,9
End Function
'Browser("Accela Automation:_72").Page("Accela Automation:_2").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====2. Standard Conditions
If Browser("Accela Automation:").Page("Accela Automation:").Link("Standard Condition").Exist Then
Call objTestLib.printfile(file,3," 2. Standard Conditions")
Browser("Accela Automation:").Page("Accela Automation:").Link("Standard Condition").Click
call SearchStdCond()
If Err_Flag=False Then
call UpdateStdCond()
If Err_Flag=False Then
Call RevertStdCond()
End If
End If
Else
Call objTestLib.printfile(file,3," 2. Standard Conditions -- cannot find this link, SKIP")
End If
Function SearchStdCond ()
Err_Flag = True
'a. Search all Standard Conditions
Call objTestLib.printfile(file,3," a. Search all Standard Conditions")
Browser("Accela Automation:_74").Page("Accela Automation:").Image("Submit").Click 18,8
If Browser("Accela Automation:_75").Page("Accela Automation:_2").Image("Edit").Exist(10) Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,3," None:No Records exists in system!")
End If
End Function
Function UpdateStdCond ()
Err_Flag = True
'b. Select the first Standard Condition and update it
Call objTestLib.printfile(file,3," b. Select the first Standard Condition and update it")
Browser("Accela Automation:_75").Page("Accela Automation:_2").Image("Edit").Click
strOriginalValue = Browser("Accela Automation:_76").Page("Accela Automation:").WebEdit("R3_CON_COMMENT").GetROProperty("value")
Browser("Accela Automation:_76").Page("Accela Automation:").WebEdit("R3_CON_COMMENT").Set "Agency Testing"
Browser("Accela Automation:_76").Page("Accela Automation:").Image("Save").Click
If Browser("Accela Automation:_75").Page("Accela Automation:_3").Image("Edit").Exist(5) Then
Err_Flag = False
Browser("Accela Automation:_75").Page("Accela Automation:_3").Image("Edit").Click
wait(5)
strTemp = Browser("Accela Automation:_76").Page("Accela Automation:").WebEdit("R3_CON_COMMENT").GetROProperty("value")
If strTemp="Agency Testing" Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the updated value")
End If
Elseif Browser("Accela Automation:_76").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_76").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_76").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function RevertStdCond ()
'c. revert the first Standard Condition with original data
Call objTestLib.printfile(file,3," c. revert the first Standard Condition with original data")
Browser("Accela Automation:_76").Page("Accela Automation:").WebEdit("R3_CON_COMMENT").Set strOriginalValue
Browser("Accela Automation:_76").Page("Accela Automation:").Image("Save").Click
End Function
'Browser("Accela Automation:_75").Page("Accela Automation:_3").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====3. condition status
If Browser("Accela Automation:").Page("Accela Automation:").Link("Condition Status").Exist Then
Call objTestLib.printfile(file,3," 3. condition status")
Browser("Accela Automation:").Page("Accela Automation:").Link("Condition Status").Click
call SearchCondStatus()
If Err_Flag=False Then
call UpdateCondStatus()
If Err_Flag=False Then
Call RevertCondStatus()
End If
End If
Else
Call objTestLib.printfile(file,3," 3. condition status -- cannot find this link, SKIP")
End If
Function SearchCondStatus ()
Err_Flag = True
'a. Search all condition status
Call objTestLib.printfile(file,3," a. Search all condition status")
Browser("Accela Automation:_77").Page("Accela Automation:").Image("Submit").Click 22,3
If Browser("Accela Automation:_78").Page("Accela Automation:").Image("Edit").Exist(10) Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,3," None:No Records exists in system!")
End If
End Function
Function UpdateCondStatus ()
Err_Flag = True
'b. Select the first condition status and update it
Call objTestLib.printfile(file,3," b. Select the first condition status and update it")
Browser("Accela Automation:_78").Page("Accela Automation:").Image("Edit").Click
strOriginalValue = Browser("Accela Automation:_79").Page("Accela Automation:").WebEdit("VALUE_DESC").GetROProperty("value")
Browser("Accela Automation:_79").Page("Accela Automation:").WebEdit("VALUE_DESC").Set "Agency Testing"
Browser("Accela Automation:_79").Page("Accela Automation:").Image("Save").Click 23,9
If Browser("Accela Automation:_78").Page("Accela Automation:_2").Image("Edit").Exist(10) Then
Err_Flag = False
Browser("Accela Automation:_78").Page("Accela Automation:_2").Image("Edit").Click
strTemp = Browser("Accela Automation:_79").Page("Accela Automation:").WebEdit("VALUE_DESC").GetROProperty("value")
If strTemp="Agency Testing" Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the updated value")
End If
Elseif Browser("Accela Automation:_79").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_79").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_79").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function RevertCondStatus ()
'c. revert the first condition status with original data
Call objTestLib.printfile(file,3," c. revert the first condition status with original data")
Browser("Accela Automation:_79").Page("Accela Automation:").WebEdit("VALUE_DESC").Set strOriginalValue
Browser("Accela Automation:_79").Page("Accela Automation:").Image("Save").Click 23,8
End Function
'Browser("Accela Automation:_78").Page("Accela Automation:_2").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====4. Process Validation
If Browser("Accela Automation:").Page("Accela Automation:").Link("Process Validation").Exist Then
Call objTestLib.printfile(file,3," 4. Process Validation")
Browser("Accela Automation:").Page("Accela Automation:").Link("Process Validation").Click
Browser("Accela Automation:_80").Page("Accela Automation:").Image("Submit").Click 21,4
Browser("Accela Automation:_81").Page("Accela Automation:").Image("Edit").Click
Call SearchProValidation()
Call AddProValidation ()
If Err_Flag=False Then
call UpdateProValidation()
Call DeleteProValidation()
End If
Else
Call objTestLib.printfile(file,3," 4. Process Validation -- cannot find this link, SKIP")
End If
Function SearchProValidation ()
'a. Search all Process Validation with first process
Call objTestLib.printfile(file,3," a. Search all Process Validation with first process")
If Browser("Accela Automation:_82").Page("Accela Automation:").WebTable("Validation Setting").Exist(10) Then
If Browser("Accela Automation:_82").Page("Accela Automation:").WebTable("Validation Setting").RowCount > 3 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,3," None:No Records exists in system!")
End If
Else
Call objTestLib.printfile(file,5,"Search allProcess Validation attached the first process failed!")
End If
End Function
Function AddProValidation ()
Err_Flag = True
'b. add a new Process Validation
Call objTestLib.printfile(file,3," b. add a new Process Validation")
Browser("Accela Automation:_82").Page("Accela Automation:").Image("Add Process").Click
wait(5)
strTemp = Browser("Browser_13").Page("Page").WebList("selSD_PRO_DES").GetROProperty("value")
Browser("Accela Automation:_94").Page("Accela Automation:").Image("Submit").Click
If Browser("Accela Automation:_82").Page("Accela Automation:").Image("Update with").Exist(10) Then
Err_Flag = False
strInnerText = Browser("Accela Automation:_82").Page("Accela Automation:").WebTable("Validation Setting").GetROProperty("innertext")
If instr(strInnerText,strTemp) <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"can not find the new process validation")
End If
Elseif Browser("Browser_13").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Browser_13").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Browser_13").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function UpdateProValidation ()
'c. update a new Process Validation
Call objTestLib.printfile(file,3," c. update a new Process Validation")
Set oDesc = Description.Create()
oDesc("micclass").Value = "WebCheckBox"
Set WebCheckBoxs = Browser("Accela Automation:_82").Page("Accela Automation:").ChildObjects(oDesc)
strEditValue = WebCheckBoxs("0").GetROProperty("name")
Browser("Accela Automation:_82").Page("Accela Automation:").WebCheckBox("HOLD_FLAG1073").SetTOProperty "name",strEditValue
strEditValue = WebCheckBoxs("1").GetROProperty("name")
Browser("Accela Automation:_82").Page("Accela Automation:").WebCheckBox("REQUIRED_FLAG1073").SetTOProperty "name",strEditValue
strEditValue = WebCheckBoxs("2").GetROProperty("name")
Browser("Accela Automation:_82").Page("Accela Automation:").WebCheckBox("LOCK_FLAG1073").SetTOProperty "name",strEditValue
Browser("Accela Automation:_82").Page("Accela Automation:").WebCheckBox("LOCK_FLAG1073").Set "ON"
Browser("Accela Automation:_82").Page("Accela Automation:").WebCheckBox("HOLD_FLAG1073").Set "ON"
Browser("Accela Automation:_82").Page("Accela Automation:").WebCheckBox("REQUIRED_FLAG1073").Set "ON"
Browser("Accela Automation:_82").Page("Accela Automation:").Image("Update with").Click
If Browser("Accela Automation:_82").Page("Accela Automation:").Image("Update with").Exist(5) Then
strValue = Browser("Accela Automation:_82").Page("Accela Automation:").WebCheckBox("LOCK_FLAG1073").GetROProperty("checked")
If strValue=1 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"update the new process validation failed!")
End If
Elseif Browser("Accela Automation:_82").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_82").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_82").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function DeleteProValidation ()
'd. delete the new Process Validation
Call objTestLib.printfile(file,3," d. delete the new Process Validation")
Browser("Accela Automation:_82").Page("Accela Automation:_2").Image("Delete").Click
Browser("Accela Automation:_82").Dialog("Microsoft Internet").WinButton("OK").Click
If Browser("Accela Automation:_82").Page("Accela Automation:").Image("Update with").Exist(5) Then
strInnerText = Browser("Accela Automation:_82").Page("Accela Automation:").WebTable("Validation Setting").GetROProperty("innertext")
If instr(strInnerText,strTemp)=0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"the new process validation still exists!")
End If
Elseif Browser("Accela Automation:_82").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_82").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_82").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
'Browser("Accela Automation:_82").Page("Accela Automation:_3").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=================================================================
Call objTestLib.printfile(file,6)
Set objmsgbox = nothing
Set objTestLib = nothing
Set fso = nothing
Set file = nothing
Daily_Side_Script_Part1_0
Option Explicit
'=================================================================
Dim fso,file,filename,objTestLib,objmsgbox,oDesc,Edits,WebCheckBoxs
Dim strMessage,strTemp,strValue,strEditValue,strEditName,NumberOfEdits
Dim strInnertext,intLoop,intFlag,Err_Flag,intNumber,intRowCount
Dim arrExpectValue,arrOriginalValue(5),arrTempValue(5),strOriginalValue
Dim strAppNumber1,strAppNumber2,strAppNumber3,strAppNumberTotal
Dim strAddress,strStreetName,strParcel,strOwner,strLicensed,strBusiness,strInspName1,strInspName2
Dim strFeeBalance,strPayAmount,strFee
'=================================================================
'fetch filename form the global sheet
'filename = "c:/log.txt"
filename = DataTable.RawValue("filename",dtGlobalSheet)
'create a new file system object to output information
Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.OpenTextFile(filename,8,True)
Set objTestLib = createobject("TestLib.CLib")
'create a new sqamsgbox object
Set objmsgbox = CreateObject("SQAMsgbox.CMsgbox")
'=================================================================
Err_Flag = True
'=================================================================
'On Error Resume Next
Call objTestLib.printfile(file,2,"3 -- Script: Daily Activities")
objmsgbox.SQAMsgbox "Part 3 -- Script: Daily Activities","AA Auto Test",3,0
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'###############################Section 1: Application #####################
Call objTestLib.printfile(file,3,"Section 1: Application ")
objmsgbox.SQAMsgbox "Section 1: Application","AA Auto Test",3,0
'=====1. New Application
Call objTestLib.printfile(file,3," 1. New Application ")
objmsgbox.SQAMsgbox "1. New Application","AA Auto Test",3,0
Browser("Accela Automation:").Page("Accela Automation:").Link("New App").Click
'a.click on different folders,click on different items, click on submit to create the application
Call objTestLib.printfile(file,3," a.click on different folders,click on different items, click on submit to create the application")
Browser("Accela Automation:").Page("Accela Automation:").Link("New App").Click
Call SelectAppType("Building","New Building","Residential","Main Post")
If Err_Flag=False Then
Call VerifyNewAppWindow("Building","New Building","Residential","Main Post")
'b.Test the search button in address section
Call objTestLib.printfile(file,3," b.Test the search button in address section")
Call SearchAddress()
'c.Test the Get Parcel & Owner button
Call objTestLib.printfile(file,3," c.Test the Get Parcel & Owner button")
Call GetParcelAndOwner()
'd.Test the get address & owner button in parcel section
Call objTestLib.printfile(file,3," d. Test the get address & owner button in parcel section")
Call GetAddressAndOwner()
'e.Test the search button in parcel section
Call objTestLib.printfile(file,3," e.Test the search button in parcel section")
Call SearchParcel()
'f.Test the search button in Licensed Professional Information section
Call objTestLib.printfile(file,3," f.Test the search button in Licensed Professional Information section")
Call SearchLicensed()
'g.Test the As Lic. Prof button in Applicant Information section
Call objTestLib.printfile(file,3," g.Test the As Lic. Prof button in Applicant Information section")
Call AsLif()
'h.Test the search button in Applicant Information section
Call objTestLib.printfile(file,3," h.Test the search button in Applicant Information section")
Call SearchApplicant()
'i. fill in other additional information and submit
Call objTestLib.printfile(file,3," i. fill in other additional information and submit")
Call FillInSubmit()
'j.Verify new application details info
Call objTestLib.printfile(file,3," j.Verify new application details info")
Call VerifySummary()
End If
Function SelectAppType (strFirstLink,strSecondLink,strThirdLink,strFourthLink)
Err_Flag = True
wait(10)
Browser("Accela Automation:_2").Page("Accela Automation:").Frame("toc").Link("First_Link").SetTOProperty "text",strFirstLink
Browser("Accela Automation:_2").Page("Accela Automation:").Frame("toc").Link("First_Link").Click
Browser("Accela Automation:_2").Page("Accela Automation:").Frame("toc").Link("Second_Link").SetTOProperty "text",strSecondLink
Browser("Accela Automation:_2").Page("Accela Automation:").Frame("toc").Link("Second_Link").Click
Browser("Accela Automation:_2").Page("Accela Automation:").Frame("toc").Link("Third_Link").SetTOProperty "text",strThirdLink
Browser("Accela Automation:_2").Page("Accela Automation:").Frame("toc").Link("Third_Link").Click
Browser("Accela Automation:_2").Page("Accela Automation:").Frame("toc").Link("Fourth_Link").SetTOProperty "text",strFourthLink
Browser("Accela Automation:_2").Page("Accela Automation:").Frame("toc").Link("Fourth_Link").Click
Browser("Accela Automation:_2").Page("Accela Automation:").Frame("content").Image("Submit").Click
If Browser("Accela Automation:_2").Dialog("Microsoft Internet").WinButton("OK").Exist(5)=False Then
Err_Flag = False
Else
strMessage = Browser("Accela Automation:_2").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_2").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
End If
End Function
Function VerifyNewAppWindow (strFirstLink,strSecondLink,strThirdLink,strFourthLink)
Dim p_strResult1,p_strResult2,p_const1,p_const2
p_const1 = "New Application"
p_const2 = strFirstLink & " / " & strSecondLink & " / " & strThirdLink & " / " & strFourthLink
p_strResult1 = Browser("Accela Automation:_3").Page("Accela Automation:").WebTable("New Application").GetCellData(1,2)
p_strResult2 = Browser("Accela Automation:_3").Page("Accela Automation:").WebTable("Application_Type").GetCellData(1,1)
If instr(p_strResult1,p_const1) <> 0 And instr(p_strResult2,p_const2) <> 0 Then
objmsgbox.SQAMsgbox "The Heading is " & p_const1 & " ." & chr(13) & "The app Type is " & p_const2 & " . ","AA Auto Test",3,0
Call objTestLib.printfile(file,4)
Else
objmsgbox.SQAMsgbox "The Heading is " & p_const1 & " ." & chr(13) & "The app Type is " & p_const2 & " . ","AA Auto Test",3,0
Call objTestLib.printfile(file,5,"Cannot find application type")
End If
End Function
Function SearchAddress ()
Browser("Accela Automation:_3").Page("Accela Automation:").Image("Search for Address").Click
Browser("Accela Automation:_4").Page("Accela Automation:").Image("Submit").Click 33,8
intRowCount = Browser("Accela Automation:_5").Page("Accela Automation:").WebTable("Address").RowCount
If intRowCount=2 Then
Call objTestLib.printfile(file,5,"None owner information exists in owner table!")
Browser("Accela Automation:_5").Page("Accela Automation:").Image("Cancel").Click
' Browser("Accela Automation:_3").Page("Accela Automation:").WebEdit("AdrFullAddr").Set "Agency Testing"
Elseif intRowCount > 2 Then
strAddress = Browser("Accela Automation:_5").Page("Accela Automation:").WebTable("Address").GetCellData(3,1)
Browser("Accela Automation:_5").Page("Accela Automation:").Image("Selbtn").Click
wait(5)
Call VerifyAddress(Ucase(strAddress))
Else
Call objTestLib.printfile(file,5,"cannot find Address table!")
End If
End Function
Function VerifyAddress (strAddress)
Dim p_strStreetName
p_strStreetName = Browser("Accela Automation:_3").Page("Accela Automation:").WebEdit("AdrFullAddr").GetROProperty("value")
If len(p_strStreetName) <> 0 Then
If instr(strAddress,p_strStreetName) <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"The street number and name displayed incorrectly!")
End If
Else
Call objTestLib.printfile(file,5,"Get address inforamtion failed!")
End If
End Function
Function GetParcelAndOwner ()
Browser("Accela Automation:_3").Page("Accela Automation:").Image("Get Parcel and").Click
wait(5)
strParcel = Browser("Accela Automation:_3").Page("Accela Automation:").WebEdit("vParB1_PARCEL_NBR").GetROProperty("value")
If len(strParcel) > 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"Get parcel and owner inforamtion failed!")
End If
End Function
Function GetAddressAndOwner ()
Browser("Accela Automation:_3").Page("Accela Automation:").Image("Get Address").Click
if Browser("Browser_6").Dialog("Microsoft Internet").WinButton("OK").Exist(5) then
Broser("Browser_6").Dialog("Microsoft Internet").WinButton("OK").Click
else
wait(5)
strStreetName = Browser("Accela Automation:_3").Page("Accela Automation:").WebEdit("AdrFullAddr").GetROProperty("value")
If len(strStreetName) <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"Get address inforamtion failed!")
End If
end if
End Function
Function SearchParcel ()
Browser("Accela Automation:_3").Page("Accela Automation:").Image("Search for Parcel").Click
Browser("Accela Automation:_6").Page("Accela Automation:").WebEdit("PartxtParcel").Set "p"
Browser("Accela Automation:_6").Page("Accela Automation:").Image("Submit").Click 38,6
strTemp = Browser("Accela Automation:_7").Page("Accela Automation:").WebTable("Parcel").GetCellData(3,1)
Browser("Accela Automation:_7").Page("Accela Automation:").Image("Select Parcel").Click
wait(5)
strParcel = Browser("Accela Automation:_3").Page("Accela Automation:").WebEdit("vParB1_PARCEL_NBR").GetROProperty("value")
If instr(strTemp,strParcel) <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"Get parcel inforamtion failed!")
End If
End Function
Function SearchLicensed ()
Browser("Accela Automation:_3").Page("Accela Automation:").Image("Search for Licensed").Click
Browser("Accela Automation:_8").Page("Accela Automation:").Image("Search").Click 32,13
strTemp = Browser("Accela Automation:_9").Page("Accela Automation:").WebTable("License #").GetCellData(3,1)
Browser("Accela Automation:_9").Page("Accela Automation:").Image("Select Licensed").Click
strLicensed = Browser("Accela Automation:_3").Page("Accela Automation:").WebEdit("CAEB1_LICENSE_NBR").GetROProperty("value")
If instr(strTemp,strLicensed) > 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"Get licensed professional inforamtion failed!")
End If
End Function
Function SearchApplicant ()
Browser("Accela Automation:_3").Page("Accela Automation:").Image("Copy Contact").Click
Browser("Accela Automation:_10").Page("Accela Automation:").WebList("CNT_TYPE").Select "#0"
Browser("Accela Automation:_10").Page("Accela Automation:").Image("Submit").Click 23,10
strTemp = Browser("Accela Automation:_11").Page("Accela Automation:").WebTable("Contact Type").GetCellData(3,2)
Browser("Accela Automation:_11").Page("Accela Automation:").Image("Select Contact").Click
wait(5)
strBusiness = Browser("Accela Automation:_3").Page("Accela Automation:").WebEdit("AppB1_BUSINESS_NAME").GetROProperty("value")
If instr(strTemp,strBusiness) > 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"Get Applicant Information failed!")
End If
End Function
Function AsLif ()
Browser("Accela Automation:_3").Page("Accela Automation:").Image("Copy Licensed").Click
wait(5)
strBusiness = Browser("Accela Automation:_3").Page("Accela Automation:").WebEdit("AppB1_BUSINESS_NAME").GetROProperty("value")
If len(strBusiness) > 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"Get Applicant Information failed!")
End If
End Function
Function FillInSubmit ()
Browser("Accela Automation:_3").Page("Accela Automation:").WebEdit("Adlvaluation").Set "250000"
Browser("Accela Automation:_3").Page("Accela Automation:").WebEdit("AdlHOUSE_COUNT").Set "1"
Browser("Accela Automation:_3").Page("Accela Automation:").WebEdit("AdlBUILDING_COUNT").Set "1"
Browser("Accela Automation:_3").Page("Accela Automation:").WebList("AdlConst_Type_Code").Select "101 - Single Family Houses Detached"
Browser("Accela Automation:_3").Page("Accela Automation:").Image("Submit").Click 28,10
If Browser("Accela Automation:_12").Page("Accela Automation:").Link("Detail").Exist(15) Then
Call objTestLib.printfile(file,4)
Elseif Browser("Accela Automation:_3").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_3").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Call objTestLib.printfile(file,5,"cannot submit this form, the error message is " & strMessage)
Browser("Accela Automation:_3").Dialog("Microsoft Internet").WinButton("OK").Click
'ExitRun(0)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
'ExitRun(0)
End If
End Function
Function VerifySummary ()
'(1)fetch new application number
Call objTestLib.printfile(file,3," (1).fetch new application number")
strAppNumber1 = Browser("Accela Automation:_12").Page("Accela Automation:").WebEdit("PerID1").GetROProperty("value")
strAppNumber2 = Browser("Accela Automation:_12").Page("Accela Automation:").WebEdit("PerID2").GetROProperty("value")
strAppNumber3 = Browser("Accela Automation:_12").Page("Accela Automation:").WebEdit("PerID3").GetROProperty("value")
If len(strAppNumber1) > 0 And len(strAppNumber2) > 0 And len(strAppNumber3) > 0 Then
Call objTestLib.printfile(file,4)
strAppNumberTotal = strAppNumber1 & "-" & strAppNumber2 & "-" & strAppNumber3
DataTable("Appno1",dtGlobalSheet) = "*" & strAppNumber1
DataTable("Appno2",dtGlobalSheet) = "*" & strAppNumber2
DataTable("Appno3",dtGlobalSheet) = "*" & strAppNumber3
objmsgbox.SQAMsgbox "A new application created successfully!! The number is: " & strAppNumberTotal,"AA Auto Test",3,0
Else
objmsgbox.SQAMsgbox "Creating application failed!","AA Auto Test",3,0
Call objTestLib.printfile(file,5,"Creating application failed!")
End If
'(2).verify the detail and comments links
Call objTestLib.printfile(file,3," (2).verify the detail and comments links")
Browser("Accela Automation:_12").Page("Accela Automation:").Link("Detail").Click
wait(5)
strInnerText = Browser("Accela Automation:_13").Page("Accela Automation:").WebTable("Job Value:").GetROProperty("innertext")
If instr(strInnerText,"Job Value:") <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"the detail link is bad!")
End If
Browser("Accela Automation:_13").Back
Browser("Accela Automation:_12").Page("Accela Automation:").Link("Comments").Click
If Browser("Accela Automation:_14").Page("Accela Automation:").Link("New Comment").Exist(5) Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"the detail link is bad!")
End If
Browser("Accela Automation:_43").Page("Accela Automation:").Image("Close").Click
End Function
'Browser("Accela Automation:_12").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====2. Find Application
Call objTestLib.printfile(file,3," 2. Find Application ")
objmsgbox.SQAMsgbox "2. Find Application","AA Auto Test",3,0
Browser("Accela Automation:").Page("Accela Automation:").Link("Find App").Click
Browser("Accela Automation:_15").Page("Accela Automation:").WebEdit("PerID1_TXT").Set strAppNumber1
Browser("Accela Automation:_15").Page("Accela Automation:").WebEdit("PerID2_TXT").Set strAppNumber2
Browser("Accela Automation:_15").Page("Accela Automation:").WebEdit("PerID3_TXT").Set strAppNumber3
Browser("Accela Automation:_15").Page("Accela Automation:").Image("Submit").Click 10,15
wait(5)
strTemp = Trim(Browser("Accela Automation:_16").Page("Accela Automation:").WebTable("Application").GetCellData(2,2))
If Ucase(strTemp)=strAppNumberTotal Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the new created application")
End If
Browser("Accela Automation:_16").Page("Accela Automation:").Image("Select").Click
'=====3. Application Summary
Call objTestLib.printfile(file,3," 3. Application Summary")
objmsgbox.SQAMsgbox "3. Application Summary","AA Auto Test",3,0
'=====a.verify the app number
Call objTestLib.printfile(file,3," a.verify the app number")
strValue = Browser("Accela Automation:_12").Page("Accela Automation:").WebEdit("PerID3").GetROProperty("value")
If len(strValue) <> 0 Then
If instr(strValue,strAppNumber3) <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"The App no :" & strValue & " displayed incorrectly!")
End If
Else
Call objTestLib.printfile(file,5,"cannot find the app number!")
End If
'b.verify the detail and comment links
Call objTestLib.printfile(file,3," b.verify the detail and comment links")
If Browser("Accela Automation:_12").Page("Accela Automation:").Link("Detail").Exist(10) Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"Cannot find detail link!")
End If
If Browser("Accela Automation:_12").Page("Accela Automation:").Link("Comments").Exist Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"Cannot find comments link!")
End If
'=====4. Application Detail
Call objTestLib.printfile(file,3," 4. Application Details")
objmsgbox.SQAMsgbox "4. Application Details","AA Auto Test",3,0
Browser("Accela Automation:_12").Page("Accela Automation:").Link("Detail").Click
arrExpectValue = Array("","$250,000.00","","1","1","N","101")
Call VerifyDetail(arrExpectValue)
Function VerifyDetail (arrExpectValue)
Dim intFlag,arrValue(6)
intFlag = 1
For intRowCount = 1 To 11 Step 2
arrValue(int(intRowCount/2)+1) = trim(Browser("Accela Automation:_13").Page("Accela Automation:").WebTable("Job Value:").GetCellData(intRowCount,2))
If arrValue(int(intRowCount/2)+1)<>arrExpectValue(int(intRowCount/2)+1) Then
intFlag = 0
Exit For
End If
Next
If intFlag=1 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"Details information displayed incorrectly!")
End If
End Function
'Browser("Accela Automation:_12").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====5. Assess Fees
Call objTestLib.printfile(file,3," 5. Assess Fees")
objmsgbox.SQAMsgbox "5. Assess Fees","AA Auto Test",3,0
Browser("Accela Automation:").Page("Accela Automation:").Link("Assess Fees").Click
Call AddTwoFees()
If Err_Flag=False Then
Call DeleteFee()
Call InvoiceFee()
End If
Call ChangeAppNo()
Call ChangeCalFactor()
Function AddTwoFees ()
Err_Flag = True
'a.Add two fee items
Call objTestLib.printfile(file,3," a. Add two fee items")
Browser("Accela Automation:_17").Page("Accela Automation:").Image("Add new Fee").Click
wait(5)
strFee = Trim(Browser("Accela Automation:_42").Page("Accela Automation:").WebTable("Fee Calculator").GetCellData(4,3))
Browser("Accela Automation:_42").Page("Accela Automation:").WebEdit("feeUnitName1").Set "1"
Browser("Accela Automation:_42").Page("Accela Automation:").WebEdit("feeUnitName2").Set "1"
Browser("Accela Automation:_42").Page("Accela Automation:").Image("Submit").Click 12,10
'strFee = Trim(Browser("Browser").Page("Page").WebTable("Fee Calculator").GetCellData(4,3))
'Browser("Browser").Page("Page").WebEdit("feeUnitName1").Set "1"
'Browser("Browser").Page("Page").WebEdit("feeUnitName2").Set "1"
'Browser("Browser").Page("Page").Image("Submit").Click 24,10
wait(10)
If Browser("Accela Automation:_17").Page("Accela Automation:_3").WebRadioGroup("feeCalcFactor").Exist Then
Browser("Accela Automation:_17").Page("Accela Automation:").Link("FeeItem").SetTOProperty "text",strFee
If Browser("Accela Automation:_17").Page("Accela Automation:").Link("FeeItem").Exist Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"Adding a fee failed!")
End If
' Elseif Browser("Browser").Dialog("Microsoft Internet").WinButton("OK").Exist Then
' strMessage= Browser("Browser").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
' Browser("Browser").Dialog("Microsoft Internet").WinButton("OK").Click
' Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function DeleteFee ()
'b. Delete a fee
Call objTestLib.printfile(file,3," b. Delete a fee")
Browser("Accela Automation:_17").Page("Accela Automation:").Image("Delete Fee Item").Click
Browser("Accela Automation:_17").Dialog("Microsoft Internet").WinButton("OK").Click
wait(10)
If Browser("Accela Automation:_17").Page("Accela Automation:_3").WebRadioGroup("feeCalcFactor").Exist Then
Call objTestLib.printfile(file,4)
Elseif Browser("Accela Automation:_17").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_17").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_17").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"delete fee failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function InvoiceFee ()
'c. make invoice for new app
Call objTestLib.printfile(file,3," c. make invoice for new app")
Browser("Accela Automation:_17").Page("Accela Automation:_6").WebCheckBox("chkall").Set "ON"
Browser("Accela Automation:_17").Page("Accela Automation:_6").Image("Invoice Fee").Click
Browser("Accela Automation:_17").Dialog("Microsoft Internet").WinButton("OK").Click
If Browser("Accela Automation:_17").Page("Accela Automation:_3").WebRadioGroup("feeCalcFactor").Exist(5) Then
Call objTestLib.printfile(file,4)
Elseif Browser("Accela Automation:_17").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_17").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_17").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"invoice fee failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function ChangeAppNo ()
'd. Change the application number and back
Call objTestLib.printfile(file,3," d. Change the application number and back")
Browser("Accela Automation:_17").Page("Accela Automation:_3").WebEdit("PerID3").Set String(5-len(int(strAppNumber3)-1),"0") & int(strAppNumber3)-1
Browser("Accela Automation:_17").Page("Accela Automation:_3").Image("Submit").Click
If Browser("Accela Automation:_17").Page("Accela Automation:_3").WebRadioGroup("feeCalcFactor").Exist(5) Then
Call objTestLib.printfile(file,4)
Elseif Browser("Accela Automation:_17").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_17").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_17").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"Change application number failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
Browser("Accela Automation:_17").Page("Accela Automation:_4").WebEdit("PerID3").Set strAppNumber3
Browser("Accela Automation:_17").Page("Accela Automation:_4").Image("Submit").Click
wait(5)
End Function
Function ChangeCalFactor ()
'e. change the Fee calculation factior to contractor and calculator
Call objTestLib.printfile(file,3," e. change the Fee calculation factior to contractor and calculator")
Browser("Accela Automation:_17").Page("Accela Automation:_3").WebRadioGroup("feeCalcFactor").Select "CALC"
wait(5)
Browser("Accela Automation:_17").Page("Accela Automation:_5").WebRadioGroup("feeCalcFactor").Select "CONT"
If Browser("Accela Automation:_17").Page("Accela Automation:_3").WebRadioGroup("feeCalcFactor").Exist(5) Then
Call objTestLib.printfile(file,4)
Elseif Browser("Accela Automation:_17").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_17").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_17").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"Change calculation factior failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
'Browser("Accela Automation:_17").Page("Accela Automation:_6").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====6. Cahier payment
Call objTestLib.printfile(file,3," 6. Cahier payment")
objmsgbox.SQAMsgbox "6. Cahier payment","AA Auto Test",3,0
Browser("Accela Automation:").Page("Accela Automation:").Link("Payment").Click
Call GetBalance40()
If Err_Flag=False Then
Call Payment40()
End If
Function GetBalance40 ()
Err_Flag = True
strValue = Browser("Accela Automation:_18").Page("Accela Automation:").WebTable("Total Invoice").GetCellData(3,2)
strValue = replace(strValue,"$","")
strValue = replace(strValue,",","")
If IsNumeric(strValue)=True Then
Err_Flag = False
End If
End Function
Function Payment40 ()
'a.pay a partial amount and pay all, verify the error
Call objTestLib.printfile(file,3," a.pay a partial amount and pay all, verify the error")
'Browser("Accela Automation:_18").Page("Accela Automation:").Image("Payment").Click
Browser("Accela Automation:_18").Page("Accela Automation:_2").Image("Payment").Click
Browser("Accela Automation:_19").Page("Accela Automation:").WebEdit("vpayment").Set "1"
Browser("Accela Automation:_19").Page("Accela Automation:").WebEdit("CC_EXPIR_DATE1").Set "12/31/"& Year(Date)
Browser("Accela Automation:_19").Page("Accela Automation:").WebList("Payment_Method").Select "Check"
Browser("Accela Automation:_19").Page("Accela Automation:").Image("Submit").Click
Browser("Accela Automation:_20").Page("Accela Automation:").Image("Pay All").Click
Browser("Accela Automation:_20").Page("Accela Automation:").Image("Submit").Click 32,6
If Browser("Accela Automation:_20").Dialog("Microsoft Internet").WinButton("OK").Exist(5) Then
Call objTestLib.printfile(file,4)
Browser("Accela Automation:_20").Dialog("Microsoft Internet").WinButton("OK").Click
Else
Call objTestLib.printfile(file,5,"cannot find error message dialog!")
End If
'b.pay for the partial amount and verify the fee, payment description and history
Call objTestLib.printfile(file,3," b.pay for the partial amount and verify the fee, payment descriptioan and history")
Browser("Accela Automation:_20").Page("Accela Automation:").WebEdit("payamt1").Set "1"
Browser("Accela Automation:_20").Page("Accela Automation:").Image("Submit").Click 20,8
Browser("Accela Automation:_21").Page("Accela Automation:").WebCheckBox("chkPay").Set "ON"
Browser("Accela Automation:_21").Page("Accela Automation:").Image("Submit").Click 24,13
Browser("Accela Automation:_22").Page("Accela Automation:").Sync
strInnerText = Browser("Accela Automation:_22").Page("Accela Automation:").WebTable("Total Invoice").GetROProperty("innertext")
If instr(strInnerText,"$1.00") <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the just payment money!")
End If
Browser("Accela Automation:_22").Close
'c.pay for the rest amount and verify the fee, payment descriptioan and history
Call objTestLib.printfile(file,3," c.pay for the rest amount and verify the fee, payment descriptioan and history")
Browser("Accela Automation:_18").Page("Accela Automation:").Image("Payment").Click
strValue = Browser("Accela Automation:_19").Page("Accela Automation:").WebEdit("vpayment").GetROProperty("text")
Browser("Accela Automation:_19").Page("Accela Automation:").WebList("Payment_Method").Select "Check"
Browser("Accela Automation:_19").Page("Accela Automation:").WebEdit("CC_EXPIR_DATE1").Set "12/31/"& Year(Date)
Browser("Accela Automation:_19").Page("Accela Automation:").Image("Submit").Click
Browser("Accela Automation:_20").Page("Accela Automation:").Image("Pay All").Click
Browser("Accela Automation:_20").Page("Accela Automation:").Image("Submit").Click 25,5
Browser("Accela Automation:_21").Page("Accela Automation:").WebCheckBox("chkPay").Set "ON"
Browser("Accela Automation:_21").Page("Accela Automation:").Image("Submit").Click 18,7
wait(5)
strInnerText = Browser("Accela Automation:_22").Page("Accela Automation:").WebTable("Total Invoice").GetROProperty("text")
If instr(strInnerText,strValue) <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the just payment money!")
End If
Browser("Accela Automation:_22").Close
End Function
'Browser("Accela Automation:_18").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====7. Workflow
Call objTestLib.printfile(file,3," 7. WorkFlow")
objmsgbox.SQAMsgbox "7. WorkFlow","AA Auto Test",3,0
'a.Verify the workflow page exist
Call objTestLib.printfile(file,3," a.Verify the workflow page exist")
Browser("Accela Automation:").Page("Accela Automation:").Link("History").Click
strInnerText = Browser("Accela Automation:_23").Page("Accela Automation:").WebTable("History").GetROProperty("innertext")
If instr(strInnerText,"No Workflow history exists for this Application") <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find workflow history page")
End If
'Browser("Accela Automation:_23").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:_23").Page("Accela Automation:").Image("tab_menu").Click
'b.update the work flow by performing the first task
Call objTestLib.printfile(file,3," b.update the work flow by performing the first task ")
Browser("Accela Automation:").Page("Accela Automation:").Link("Update Workflow").Click
Call UpdateFirstTask(2,"Agency Testing - First Modify")
'c.use the "Supervisor only" button to roll back the task
Call objTestLib.printfile(file,3," c.use the [Supervisor only] button to roll back the task")
Call WFSupervisor()
'd.Edit the first task by changing some information
Call objTestLib.printfile(file,3," d.Edit the first task by changing some information")
Call UpdateFirstTask(3,"Agency Testing - Second Modify")
'Browser("Accela Automation:_25").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'e.Delete the task
Call objTestLib.printfile(file,3," e.Delete the task")
Call DeleteTask()
Function UpdateFirstTask (intNumber,strComment)
Browser("Accela Automation:_24").Page("Accela Automation:").Image("TaskFlag").Click
'(1). select staff by selecting dept & staff
Call objTestLib.printfile(file,3," (1). select staff by selecting dept & staff")
call SelectDept()
call VerifyUser()
'(2). select staff by clicking current user button
Call objTestLib.printfile(file,3," (2). select staff by clicking current user button")
Browser("Accela Automation:_25").Page("Accela Automation:").Image("Select current").Click
wait(5)
call VerifyUser()
'(3). select the first status
Call objTestLib.printfile(file,3," (3). select the first status")
strTemp = Browser("Accela Automation:_25").Page("Accela Automation:").WebList("NEW_SD_APP_DES").GetItem(IntNumber)
Browser("Accela Automation:_25").Page("Accela Automation:").WebList("NEW_SD_APP_DES").Select strTemp
'(4). update the status date and due date and submit
Call objTestLib.printfile(file,3," (4). update the status date and due date and submit")
Browser("Accela Automation:_25").Page("Accela Automation:").WebEdit("StatusDate").Set date+1
Browser("Accela Automation:_25").Page("Accela Automation:").WebEdit("DueDate").Set date+10
Browser("Accela Automation:_25").Page("Accela Automation:_2").WebEdit("Comment").Set strComment
Browser("Accela Automation:_25").Page("Accela Automation:").Image("Save").Click 21,11
If Browser("Accela Automation:_27").Page("Accela Automation:").Image("Cancel").Exist(5) Then
Browser("Accela Automation:_27").Page("Accela Automation:").Image("Cancel").Click
End If
strInnerText = Browser("Accela Automation:_25").Page("Accela Automation:_2").WebTable("Task Details").GetROProperty("innertext")
If instr(strInnerText,strTemp) <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the status in task details table!")
End If
End Function
Function SelectDept ()
Wait(5)
Browser("Accela Automation:_25").Page("Accela Automation:").Image("Select Department").Click
Wait(5)
Browser("Accela Automation:_26").Page("Accela Automation:").Frame("toc").Link("Organization.").Click
Browser("Accela Automation:_26").Page("Accela Automation:").Frame("toc2").Image("Submit").Click 30,6
Browser("Accela Automation:_26").Page("Accela Automation:_2").Frame("toc3").Link("admin admin").Click
End Function
Function VerifyUser ()
Dim strFName,strLName
strFName = Browser("Accela Automation:_25").Page("Accela Automation:").WebEdit("StaffFName").GetROProperty("value")
strLName = Browser("Accela Automation:_25").Page("Accela Automation:").WebEdit("StaffLName").GetROProperty("value")
If Len(strFName) > 0 And len(strLName) > 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"the staff doesn't exist!")
End If
End Function
Function WFSupervisor ()
Browser("Accela Automation:_25").Page("Accela Automation:_2").Image("Supervisor Only").Click
wait(5)
Browser("Accela Automation:_44").Page("Accela Automation:").WebList("TaskActive").Select "YES"
Browser("Accela Automation:_44").Page("Accela Automation:").WebList("taskCompleted").Select "NO"
Browser("Accela Automation:_44").Page("Accela Automation:").Image("Save").Click 17,7
wait(5)
Browser("Accela Automation:_44").Close
If Browser("Accela Automation:_24").Page("Accela Automation:").Image("TaskFlag").Exist(5) Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find a check mark near the first task!")
End If
End Function
Function DeleteTask ()
Browser("Accela Automation:").Page("Accela Automation:").Link("History").Click
While Browser("Accela Automation:_23").Page("Accela Automation:").Image("Delete").Exist(5)
Browser("Accela Automation:_23").Page("Accela Automation:").Image("Delete").Click
Browser("Accela Automation:_23").Dialog("Microsoft Internet").WinButton("OK").Click
wait(5)
Wend
If Browser("Accela Automation:_23").Page("Accela Automation:").Image("Delete").Exist=False Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"can find some tasks!")
End If
End Function
'Browser("Accela Automation:_23").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====8. Permit
Call objTestLib.printfile(file,3," 8. Permit")
objmsgbox.SQAMsgbox "8. Permit","AA Auto Test",3,0
Browser("Accela Automation:").Page("Accela Automation:").Link("App Summary").Click
Browser("Accela Automation:_12").Page("Accela Automation:").Image("tab_non_permit").Click
'Browser("Browser_5").Page("Page").Sync
If Browser("Browser_5").Page("Page").ActiveX("Adobe Acrobat").Exist(20) Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the generated report!")
End If
Do While Instr(Browser("index:=0").GetROProperty("Title"),"Accela Automation")=0
Browser("index:=0").close
Loop
'Browser("Accela Automation:_12").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====9. Inspection
Call objTestLib.printfile(file,3," 9. Inspection")
objmsgbox.SQAMsgbox "9. Inspection","AA Auto Test",3,0
Browser("Accela Automation:").Page("Accela Automation:").Link("Schedule").Click
'a.schedule two inspections
Call objTestLib.printfile(file,3," a.schedule two inspections")
Call ScheduleInspection()
If Err_Flag=False Then
Call RescheduleInspection()
Call CancelInspection()
End If
Call ScheduleInspection()
'Browser("Accela Automation:_28").Page("Accela Automation:_4").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
If Err_Flag=False Then
Call AssignInspection()
End If
'Browser("Accela Automation:_31").Page("Accela Automation:_2").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
Call SearchAllInsp()
'Browser("Accela Automation:_31").Page("Accela Automation:_2").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
Call CheckHistroy()
'Browser("Accela Automation:_34").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
Call CheckRouteSheet()
'Browser("Accela Automation:_40").Page("Accela Automation:_2").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
Call InspSupervisor()
Function ScheduleInspection ()
Err_Flag = True
wait(5)
Set oDesc = Description.Create()
oDesc("micclass").Value = "WebCheckBox"
Set WebCheckBoxs = Browser("Accela Automation:_28").Page("Accela Automation:").ChildObjects(oDesc)
strEditValue = WebCheckBoxs(0).GetROProperty("name")
Browser("Accela Automation:_28").Page("Accela Automation:").WebCheckBox("Insp180081").SetTOProperty "name",strEditValue
strEditValue = WebCheckBoxs(1).GetROProperty("name")
Browser("Accela Automation:_28").Page("Accela Automation:").WebCheckBox("Insp180082").SetTOProperty "name",strEditValue
strInspName1 = Browser("Accela Automation:_28").Page("Accela Automation:").WebTable("Required Inspections").GetCellData(4,2)
strInspName2 = Browser("Accela Automation:_28").Page("Accela Automation:").WebTable("Required Inspections").GetCellData(6,2)
Browser("Accela Automation:_28").Page("Accela Automation:").WebCheckBox("Insp180081").Set "ON"
Browser("Accela Automation:_28").Page("Accela Automation:").WebCheckBox("Insp180082").Set "ON"
Browser("Accela Automation:_28").Page("Accela Automation:").Image("Schedule inspection").Click
Browser("Accela Automation:_29").Page("Accela Automation:").Image("Select today").Click
Browser("Accela Automation:_29").Page("Accela Automation:").WebRadioGroup("G6_ACT_T1").Select "AM"
Browser("Accela Automation:_29").Page("Accela Automation:").Image("Submit").Click
wait(5)
strInnerText = Browser("Accela Automation:_28").Page("Accela Automation:_2").WebTable("Scheduled Inspection").GetROProperty("innertext")
If instr(strInnerText,strInspName1) <> 0 And instr(strInnerText,strInspName2) <> 0 And instr(strInnerText,"AM") <> 0 Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the two inspection items in scheduled inspection table!")
End If
End Function
Function RescheduleInspection ()
'b.reschedule two inspections
Call objTestLib.printfile(file,3," b.reschedule two inspections")
Set oDesc = Description.Create()
oDesc("micclass").Value = "WebCheckBox"
Set WebCheckBoxs = Browser("Accela Automation:_28").Page("Accela Automation:_2").WebTable("Scheduled Inspection").ChildObjects(oDesc)
strEditValue = WebCheckBoxs(0).GetROProperty("name")
Browser("Accela Automation:_28").Page("Accela Automation:_2").WebCheckBox("reInsp117428").SetTOProperty "name",strEditValue
strEditValue = WebCheckBoxs(1).GetROProperty("name")
Browser("Accela Automation:_28").Page("Accela Automation:_2").WebCheckBox("reInsp117427").SetTOProperty "name",strEditValue
Browser("Accela Automation:_28").Page("Accela Automation:_2").WebCheckBox("reInsp117428").Set "ON"
Browser("Accela Automation:_28").Page("Accela Automation:_2").WebCheckBox("reInsp117427").Set "ON"
Browser("Accela Automation:_28").Page("Accela Automation:_2").Image("Reschedule").Click
Browser("Accela Automation:_29").Page("Accela Automation:_2").Image("Select tomorrow").Click
Browser("Accela Automation:_29").Page("Accela Automation:_2").WebRadioGroup("G6_ACT_T1").Select "PM"
Browser("Accela Automation:_29").Page("Accela Automation:_2").Image("Save").Click
wait(5)
strInnerText = Browser("Accela Automation:_28").Page("Accela Automation:_2").WebTable("Scheduled Inspection").GetROProperty("innertext")
If instr(strInnerText,strInspName1) <> 0 And instr(strInnerText,strInspName2) <> 0 And instr(strInnerText,"PM") <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the two inspection items in scheduled inspection table!")
End If
End Function
Function CancelInspection ()
'c. cancel two inspection items
Call objTestLib.printfile(file,3," c. cancel two inspection items")
Set oDesc = Description.Create()
oDesc("micclass").Value = "WebCheckBox"
Set WebCheckBoxs = Browser("Accela Automation:_28").Page("Accela Automation:_2").WebTable("Scheduled Inspection").ChildObjects(oDesc)
strEditValue = WebCheckBoxs(0).GetROProperty("name")
Browser("Accela Automation:_28").Page("Accela Automation:_3").WebCheckBox("reInsp117430").SetTOProperty "name",strEditValue
strEditValue = WebCheckBoxs(1).GetROProperty("name")
Browser("Accela Automation:_28").Page("Accela Automation:_3").WebCheckBox("reInsp117429").SetTOProperty "name",strEditValue
Browser("Accela Automation:_28").Page("Accela Automation:_3").WebCheckBox("reInsp117430").Set "ON"
Browser("Accela Automation:_28").Page("Accela Automation:_3").WebCheckBox("reInsp117429").Set "ON"
Browser("Accela Automation:_28").Page("Accela Automation:_3").Link("Cancel").Click
Browser("Accela Automation:_30").Page("Accela Automation:").Image("Cancel Inspection").Click
wait(6)
strInnerText = Browser("Accela Automation:_28").Page("Accela Automation:_2").WebTable("Scheduled Inspection").GetROProperty("innertext")
If instr(strInnerText,strInspName1)=0 And instr(strInnerText,strInspName2)=0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the two inspection items in scheduled inspection table!")
End If
End Function
Function AssignInspection ()
'd. assign inspection for the second inspection item
Call objTestLib.printfile(file,3," d. assign inspection for the second inspection item")
Browser("Accela Automation:").Page("Accela Automation:").Link("Assign Inspection").Click
Browser("Accela Automation:_31").Page("Accela Automation:").WebCheckBox("SelInspection1").Set "ON"
Browser("Accela Automation:_31").Page("Accela Automation:").WebCheckBox("SelInspection2").Set "ON"
Browser("Accela Automation:_31").Page("Accela Automation:").Image("Select Staff").Click
Browser("Accela Automation:_26").Page("Accela Automation:").Frame("toc").Link("Organization.").Click
Browser("Accela Automation:_26").Page("Accela Automation:").Frame("toc2").Image("Submit").Click 29,8
Browser("Accela Automation:_26").Page("Accela Automation:_3").Frame("toc3").Link("admin admin").Click
Browser("Accela Automation:_31").Page("Accela Automation:").Image("Submit").Click 25,2
If Browser("Accela Automation:_32").Page("Accela Automation:").WebRadioGroup("rbInspAssign").Exist(10) Then
strInnerText = Browser("Accela Automation:_31").Page("Accela Automation:").WebTable("Department:").GetROProperty("innertext")
If instr(strInnerText,strAppNumberTotal)=0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"assign inspection failed!")
End If
' Elseif Browser("Accela Automation:_31").Dialog("Microsoft Internet").WinButton("OK").Exist Then
' strMessage= Browser("Accela Automation:_31").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
' Browser("Accela Automation:_31").Dialog("Microsoft Internet").WinButton("OK").Click
' Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function SearchAllInsp ()
Browser("Accela Automation:").Page("Accela Automation:").Link("Assign Inspection").Click
'e. search all assign inspections
Call objTestLib.printfile(file,3," e. search all assign inspections")
Browser("Accela Automation:_32").Page("Accela Automation:").WebRadioGroup("rbInspAssign").Select "All"
Browser("Accela Automation:_32").Page("Accela Automation:").Image("Search Inspection").Click
Wait(5)
strInnerText = Browser("Accela Automation:_31").Page("Accela Automation:").WebTable("Department:").GetROProperty("innertext")
If instr(strInnerText,strAppNumberTotal) <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"assign inspection failed!")
End If
'f. check the inspection statistics
Call objTestLib.printfile(file,3," f. check the inspection statistics")
Browser("Accela Automation:_31").Page("Accela Automation:_2").Image("Inspection Statistic").Click
If Browser("Accela Automation:_33").Page("Accela Automation:").Exist(20) then
Browser("Accela Automation:_33").Page("Accela Automation:").Sync
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected problem!")
End if
Browser("Accela Automation:_33").Close
End Function
Function CheckHistroy ()
'g. select the first inspection item and click the link to see it scheduled
Browser("Accela Automation:").Page("Accela Automation:").Link("Result").Click
Call objTestLib.printfile(file,3," g. select the first inspection item and click the link to see it scheduled")
Browser("Accela Automation:_34").Page("Accela Automation:_2").Link("Abatement -").SetTOProperty "text",strInspName1
Browser("Accela Automation:_34").Page("Accela Automation:_2").Link("Abatement -").Click
wait(5)
strInnerText = Browser("Accela Automation:_37").Page("Accela Automation:").WebTable("Date").GetROProperty("innertext")
If instr(strInnerText,"Scheduled") <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find [scheduled]!")
End If
Browser("Accela Automation:_37").Page("Accela Automation:").Image("Close window").Click
'h. select the second inspection item and click the result to update the result
Call objTestLib.printfile(file,3," h. select the second inspection item and click the result to update the result")
Browser("Accela Automation:_34").Page("Accela Automation:").Link("Result").Click
Browser("Accela Automation:_35").Page("Accela Automation:").WebEdit("Comment").Set "Agency Testing"
Browser("Accela Automation:_35").Page("Accela Automation:").WebList("Result").Select "Approved"
Browser("Accela Automation:_35").Page("Accela Automation:").Image("Submit").Click
If Browser("Accela Automation:_36").Page("Accela Automation:").Image("Cancel").Exist Then
Browser("Accela Automation:_36").Page("Accela Automation:").Image("Cancel").Click
End If
wait(5)
strInnerText = Browser("Accela Automation:_34").Page("Accela Automation:_2").WebTable("Inspection History").GetROProperty("innertext")
If instr(strInnerText,strInspName2) <> 0 And instr(strInnerText,"AM") <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"update the result failed!")
End If
'i. select the first inspection item and click the guide sheet link
' Call objTestLib.printfile(file,3," i. select the first inspection item and click the guide sheet link")
'Browser("Accela Automation:_34").Page("Accela Automation:_2").Link("Guide Sheet").Click
'strInnerText = Browser("Accela Automation:_38").Page("Accela Automation:").WebTable("Comment").GetROProperty("innertext")
'If Instr(strInnerText,"Comment") <> 0 Then
' Call objTestLib.printfile(file,4)
'Else
' Call objTestLib.printfile(file,5,"cannot find the comment table!")
'End If
'Browser("Accela Automation:_38").Page("Accela Automation:").Image("Back to WorkFlow").Click
End Function
Function CheckRouteSheet ()
'j. search all route sheet inspected by current user
Call objTestLib.printfile(file,3," j. search all route sheet inspected by current user")
Browser("Accela Automation:_39").Page("Accela Automation:").Link("Route Sheet").Click
Browser("Accela Automation:_40").Page("Accela Automation:").Image("Select Dept").Click
Browser("Accela Automation:_26").Page("Accela Automation:").Frame("toc").Link("Organization.").Click
Browser("Accela Automation:_26").Page("Accela Automation:").Frame("toc2").Image("Submit").Click 35,9
Browser("Accela Automation:_26").Page("Accela Automation:_4").Frame("toc3").Link("admin admin").Click
Browser("Accela Automation:_40").Page("Accela Automation:").Image("Search Inspection").Click
If Browser("Accela Automation:_40").Page("Accela Automation:_2").WebEdit("txtg6_rec_typ1").Exist(5) Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot search all route sheet!")
End If
End Function
Function InspSupervisor ()
'l. Supervisor
Call objTestLib.printfile(file,3," l. Supervisor")
Browser("Accela Automation:").Page("Accela Automation:").Link("Schedule").Click
Browser("Accela Automation:_28").Page("Accela Automation:").Image("Delete an historical").Click
If Browser("Accela Automation:_28").Dialog("Microsoft Internet").WinButton("OK").Exist(5) Then
Call objTestLib.printfile(file,4)
Browser("Accela Automation:_28").Dialog("Microsoft Internet").WinButton("OK").Click
Else
Call objTestLib.printfile(file,5,"can not delete the inspection history!")
End If
End Function
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=================================================================
Call objTestLib.printfile(file,6)
Set objmsgbox = nothing
Set objTestLib = nothing
Set fso = nothing
Set file = nothing
Daily_Side_Script_Part2_0
Option Explicit
'=================================================================
Dim fso,file,filename,objTestLib,objmsgbox,oDesc,Edits,WebCheckBoxs
Dim strMessage,strTemp,strValue,strEditValue,strEditName,NumberOfEdits
Dim strInnertext,intFlag,Err_Flag,intNumber,intRowCount,intLoop
Dim arrExpectValue,arrOriginalValue(5),arrTempValue(5),strOriginalValue
Dim strAppNumber1,strAppNumber2,strAppNumber3,strAppNumberTotal
'fetch filename form the global sheet
'filename = "c:/log.txt"
Filename = DataTable.RawValue("filename",dtGlobalSheet)
'=================================================================
'create a new file system object to output information
Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.OpenTextFile(filename,8,True)
Set objTestLib = createobject("TestLib.CLib")
'create a new sqamsgbox object
Set objmsgbox = CreateObject("SQAMsgbox.CMsgbox")
'=================================================================
'Retrieve the App no.
strAppNumber1 = Mid(DataTable.RawValue("Appno1",dtGlobalSheet),2)
strAppNumber2 = Mid(DataTable.RawValue("Appno2",dtGlobalSheet),2)
strAppNumber3 = Mid(DataTable.RawValue("Appno3",dtGlobalSheet),2)
strAppNumberTotal = strAppNumber1 & "-" & strAppNumber2 & "-" & strAppNumber3
'=================================================================
'On error Resume next
'###############################Section 1: Application #####################
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====10. Addtl Info
Call objTestLib.printfile(file,3," 10. Addtl Info")
objmsgbox.SQAMsgbox "10. Addtl Info","AA Auto Test",3,0
Browser("Accela Automation:").Page("Accela Automation:").Link("App Summary").Click
Browser("Accela Automation:_2").Page("Accela Automation:").Image("tab_non_additioninfo").Click
Browser("Accela Automation:_3").Page("Accela Automation:").WebEdit("Adlvaluation").Set "500000"
Browser("Accela Automation:_3").Page("Accela Automation:").WebEdit("AdlHOUSE_COUNT").Set "2"
Browser("Accela Automation:_3").Page("Accela Automation:").WebEdit("AdlBUILDING_COUNT").Set "2"
Browser("Accela Automation:_3").Page("Accela Automation:").WebList("AdlConst_Type_Code").Select "102 - Single Family Houses Attached"
Browser("Accela Automation:_3").Page("Accela Automation:").Image("Save").Click 23,8
If Browser("Accela Automation:_2").Page("Accela Automation:").Link("Detail").Exist(5) Then
strInnerText = Browser("Accela Automation:_2").Page("Accela Automation:").WebTable("Parcel No.:").GetROProperty("innertext")
If instr(strInnerText,"$500,000.00") <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"updated additional info failed")
End If
Elseif Browser("Accela Automation:_3").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_3").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Call objTestLib.printfile(file,5,"cannot update the spec info, the error message is " & strMessage)
Browser("Accela Automation:_3").Dialog("Microsoft Internet").WinButton("OK").Click
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
'Browser("Accela Automation:_2").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====11. App Spec Info
Call objTestLib.printfile(file,3," 11. App Spec Info")
objmsgbox.SQAMsgbox "11. App Spec Info","AA Auto Test",3,0
Browser("Accela Automation:").Page("Accela Automation:").Link("App Summary").Click
Browser("Accela Automation:_2").Page("Accela Automation:").Image("App Specific").Click
'Browser("Accela Automation:_4").Page("Accela Automation:").WebEdit("txtChkBoxComment8").Set "1"
Browser("Accela Automation:_4").Page("Accela Automation:").WebEdit("txtChkBoxComment9").Set "1"
Browser("Accela Automation:_4").Page("Accela Automation:").WebEdit("txtChkBoxComment10").Set "1"
Browser("Accela Automation:_4").Page("Accela Automation:").Image("Save").Click 27,6
If Browser("Accela Automation:_4").Dialog("Microsoft Internet").WinButton("OK").Exist(5) Then
Browser("Accela Automation:_4").Dialog("Microsoft Internet").WinButton("OK").Click
wait(5)
End If
If Browser("Accela Automation:_2").Page("Accela Automation:").Link("Detail").Exist Then
Call objTestLib.printfile(file,4)
Elseif Browser("Accela Automation:_4").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_4").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Call objTestLib.printfile(file,5,"cannot update the spec info, the error message is " & strMessage)
Browser("Accela Automation:_4").Dialog("Microsoft Internet").WinButton("OK").Click
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
'Browser("Accela Automation:_2").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====12. Hearing
Call objTestLib.printfile(file,3," 12. Hearing")
objmsgbox.SQAMsgbox "12. Hearing","AA Auto Test",3,0
Browser("Accela Automation:").Page("Accela Automation:").Link("Hearing Summary").Click
Call AddHearing()
If Err_Flag=False Then
Call CancelHearing()
End If
Function AddHearing ()
Err_Flag = True
'a. add a hearing
Call objTestLib.printfile(file,3," a. add a hearing")
Browser("Accela Automation:_5").Page("Accela Automation:").Image("Schedule").Click
Wait(5)
strInnerText = Browser("Accela Automation:_6").Page("Accela Automation:").WebTable("2. Select Available").GetROProperty("innertext")
If instr(strInnerText,"No Records")=0 Then
'----
Err_Flag = False
Else
Call objTestLib.printfile(file,3," ---None, cannot find any available hearing!")
Browser("Accela Automation:_6").Page("Accela Automation:").Image("Cancel").Click
End If
End Function
Function CancelHearing ()
'b. cancel the new hearing
Call objTestLib.printfile(file,3," b. cancel the new hearing ")
End Function
'Browser("Accela Automation:_5").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====13. Condition
Call objTestLib.printfile(file,3," 13. Condition")
objmsgbox.SQAMsgbox "13. Condition","AA Auto Test",3,0
Browser("Accela Automation:").Page("Accela Automation:").Link("Condition Summary").Click
Call AddCond()
If Err_Flag=False Then
'b. delete the new added condition
Call objTestLib.printfile(file,3," b. delete the new added condition")
Call DeleteCond()
End If
Call AddStdCond()
If Err_Flag=False Then
'd. delete the new added std condition
Call objTestLib.printfile(file,3," d. delete the new added std condition")
Call DeleteCond()
End If
Function AddCond ()
Err_Flag = True
'a. Add a new condition
Call objTestLib.printfile(file,3," a. Add a new condition")
Browser("Accela Automation:_7").Page("Accela Automation:").Image("Add #LCASE(session.C").Click
Browser("Accela Automation:_8").Page("Accela Automation:").WebList("Sel_Type").Select "Condition"
Browser("Accela Automation:_8").Page("Accela Automation:").WebEdit("Condition").Set "Agency Testing"
Browser("Accela Automation:_8").Page("Accela Automation:").WebEdit("Comment").Set "Agency Testing"
Browser("Accela Automation:_8").Page("Accela Automation:").WebList("Sel_Severity").Select "Required"
Browser("Accela Automation:_8").Page("Accela Automation:").Image("Select Date").Click
Browser("Select Date").Page("Select Date").Link("29").SetTOProperty "text",day(date)
Browser("Select Date").Page("Select Date").Link("29").Click
Browser("Accela Automation:_8").Page("Accela Automation:").Image("Select Date_2").Click
Browser("Select Date").Page("Select Date").Link("30").SetTOProperty "text",Trim(day(date+1))
Browser("Select Date").Page("Select Date").Link("30").Click
Browser("Accela Automation:_8").Page("Accela Automation:").Image("Select Date_3").Click
Browser("Select Date").Page("Select Date").Link("31").SetTOProperty "text",Trim(day(date+3))
Browser("Select Date").Page("Select Date").Link("31").Click
Browser("Accela Automation:_8").Page("Accela Automation:").Image("Submit").Click 36,9
wait(10)
If Browser("Accela Automation:_7").Page("Accela Automation:").Image("Add Standard").Exist Then
If Browser("Accela Automation:_7").Page("Accela Automation:").Link("Agency Testing").Exist Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the new created condition")
End If
' Elseif Browser("Accela Automation:_8").Dialog("Microsoft Internet").WinButton("OK").Exist Then
' strMessage= Browser("Accela Automation:_8").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
' Browser("Accela Automation:_8").Dialog("Microsoft Internet").WinButton("OK").Click
' Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function DeleteCond ()
Browser("Accela Automation:_7").Page("Accela Automation:").Image("Delete").Click
Browser("Accela Automation:_7").Dialog("Microsoft Internet").WinButton("OK").Click
wait(10)
If Browser("Accela Automation:_7").Page("Accela Automation:").Image("Add Standard").Exist Then
If Browser("Accela Automation:_7").Page("Accela Automation:").Link("Agency Testing").Exist=False Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"the new created condition still exists!")
End If
Elseif Browser("Accela Automation:_7").Dialog("Microsoft Internet").WinButton("OK").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_7").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_7").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function AddStdCond ()
Err_Flag = True
'c. Add a new std condition
Call objTestLib.printfile(file,3," c. Add a new std condition")
Browser("Accela Automation:_7").Page("Accela Automation:").Image("Add Standard").Click
Browser("Accela Automation:_9").Page("Accela Automation:").Image("Search").Click 31,11
If Browser("Accela Automation:_9").Page("Accela Automation:_2").WebCheckBox("SelCond1").Exist(10) Then
strTemp = Browser("Accela Automation:_9").Page("Accela Automation:_2").WebTable("Type").GetCellData(2,3)
Browser("Accela Automation:_9").Page("Accela Automation:_2").WebCheckBox("SelCond1").Set "ON"
Browser("Accela Automation:_9").Page("Accela Automation:_2").WebEdit("Comment").Set "Agency Testing"
Browser("Accela Automation:_9").Page("Accela Automation:_2").Image("Save").Click 12,6
wait(5)
If Browser("Accela Automation:_7").Page("Accela Automation:").Image("Delete").Exist Then
Browser("Accela Automation:_7").Page("Accela Automation:").Link("Agency Testing").SetTOProperty "text",strTemp
If Browser("Accela Automation:_7").Page("Accela Automation:").Link("Agency Testing").Exist Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the new created condition")
End If
' Elseif Browser("Accela Automation:_9").Dialog("Microsoft Internet").WinButton("OK").Exist Then
' strMessage= Browser("Accela Automation:_9").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
' Browser("Accela Automation:_9").Dialog("Microsoft Internet").WinButton("OK").Click
' Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"cannot find the delete button!")
End If
Else
Call objTestLib.printfile(file,3," ---None: no available std condition exists!")
Browser("Accela Automation:_9").Page("Accela Automation:_2").Image("Cancel").Click 12,6
End If
End Function
'Browser("Accela Automation:_7").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====14. Parcel
Call objTestLib.printfile(file,3," 14. Parcel")
objmsgbox.SQAMsgbox "14. Parcel","AA Auto Test",3,0
Browser("Accela Automation:").Page("Accela Automation:").Link("Parcel").Click
Call AddParcel()
If Err_Flag=False Then
Call DeleteParcel()
End If
Function AddParcel ()
Err_Flag = True
'a. Add a parcel
Call objTestLib.printfile(file,3," a. Add a parcel")
'(1) search an existed parcel
Call objTestLib.printfile(file,3," (1) search an existed parcel")
Browser("Accela Automation:_10").Page("Accela Automation:").Image("Add new Parcel").Click
Browser("Accela Automation:_11").Page("Accela Automation:").Image("Search for Parcel").Click
Browser("Accela Automation:_12").Page("Accela Automation:").WebEdit("PartxtParcel").Set "p"
Browser("Accela Automation:_12").Page("Accela Automation:").Image("Submit").Click 31,14
Browser("Accela Automation:_13").Page("Accela Automation:").Image("Select Parcel").Click
wait(5)
strTemp = Browser("Accela Automation:_11").Page("Accela Automation:").WebEdit("vParB1_PARCEL_NBR").GetROProperty("value")
If len(strTemp) > 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find any parcel!")
End If
'(2) modify the parcel name and submit
Call objTestLib.printfile(file,3," (2) modify the parcel name and submit")
Browser("Accela Automation:_11").Page("Accela Automation:").WebEdit("vParB1_PARCEL_NBR").Set "Agency Testing"
Browser("Accela Automation:_11").Page("Accela Automation:").Image("Save").Click 16,7
If Browser("Accela Automation:_10").Page("Accela Automation:").Image("Add new Parcel").Exist(5) Then
If Browser("Accela Automation:_10").Page("Accela Automation:").Link("Agency Testing").Exist Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the new added parcel!")
End If
' Elseif Browser("Accela Automation:_11").Dialog("Microsoft Internet").WinButton("OK").Exist Then
' strMessage= Browser("Accela Automation:_11").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
' Browser("Accela Automation:_11").Dialog("Microsoft Internet").WinButton("OK").Click
' Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function DeleteParcel ()
'b. delete the new added parcel
Call objTestLib.printfile(file,3," b. delete the new added parcel")
Browser("Accela Automation:_10").Page("Accela Automation:").Image("Delete Parcel").Click
Browser("Accela Automation:_10").Dialog("Microsoft Internet").WinButton("OK").Click
wait(5)
If Browser("Accela Automation:_10").Page("Accela Automation:").Image("Add new Parcel").Exist Then
If Browser("Accela Automation:_10").Page("Accela Automation:").Link("Agency Testing").Exist=False Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"the new added parcel still exists!")
End If
Elseif Browser("Accela Automation:_10").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_10").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_10").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
'Browser("Accela Automation:_10").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====15. Owner
Call objTestLib.printfile(file,3," 15. Owner")
objmsgbox.SQAMsgbox "15. Owner","AA Auto Test",3,0
Browser("Accela Automation:").Page("Accela Automation:").Link("Owner").Click
Call AddOwner()
If Err_Flag=False Then
Call DeleteOwner()
End If
Function AddOwner ()
Err_Flag = True
'a. Add an Owner
Call objTestLib.printfile(file,3," a. Add an Owner ")
'(1) search an existed Owner
Call objTestLib.printfile(file,3," (1) search an existed Owner")
Browser("Accela Automation:_14").Page("Accela Automation:").Image("Add new owner").Click
Browser("Accela Automation:_15").Page("Accela Automation:").Image("Search for Owner").Click
Browser("Accela Automation:_16").Page("Accela Automation:").WebEdit("OwnL1_MAIL_CITY").Set ""
Browser("Accela Automation:_16").Page("Accela Automation:").WebList("OwnB1_MAIL_STATE").Select "#0"
Browser("Accela Automation:_16").Page("Accela Automation:").Image("Submit").Click 23,4
Browser("Accela Automation:_17").Page("Accela Automation:").Image("Selbtn").Click
wait(5)
strTemp = Browser("Accela Automation:_15").Page("Accela Automation:").WebEdit("OwnB1_OWNER_FULL_NAM").GetROProperty("value")
If len(strTemp) > 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find any Owner")
End If
'(2) modify the parcel name and submit
Call objTestLib.printfile(file,3," (2) modify the parcel name and submit")
Browser("Accela Automation:_15").Page("Accela Automation:").WebEdit("OwnB1_OWNER_FULL_NAM").Set "Agency Testing"
Browser("Accela Automation:_15").Page("Accela Automation:").WebRadioGroup("OwnB1_PRIMARY_OWNER").Select "N"
Browser("Accela Automation:_15").Page("Accela Automation:").Image("Save").Click 14,9
If Browser("Accela Automation:_14").Page("Accela Automation:").Image("Add new owner").Exist(5) Then
If Browser("Accela Automation:_14").Page("Accela Automation:").Link("Agency Testing").Exist Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the new added parcel!")
End If
' Elseif Browser("Accela Automation:_15").Dialog("Microsoft Internet").WinButton("OK").Exist Then
' strMessage= Browser("Accela Automation:_15").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
' Browser("Accela Automation:_15").Dialog("Microsoft Internet").WinButton("OK").Click
' Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function DeleteOwner ()
'b. delete the new added owner
Call objTestLib.printfile(file,3," b. delete the new added owner")
Browser("Accela Automation:_14").Page("Accela Automation:").Image("Delete owner").Click
Browser("Accela Automation:_14").Dialog("Microsoft Internet").WinButton("OK").Click
wait(5)
If Browser("Accela Automation:_14").Page("Accela Automation:").Image("Add new owner").Exist Then
If Browser("Accela Automation:_14").Page("Accela Automation:").Link("Agency Testing").Exist=False Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"the new added Owner still exists!")
End If
Elseif Browser("Accela Automation:_14").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_14").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_14").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
'Browser("Accela Automation:_14").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====16. Address
Call objTestLib.printfile(file,3," 16. Address")
objmsgbox.SQAMsgbox "16. Address","AA Auto Test",3,0
Browser("Accela Automation:").Page("Accela Automation:").Link("Address").Click
Call AddAddress()
If Err_Flag=False Then
Call DeleteAddress()
End If
Function AddAddress ()
Err_Flag = True
'a. Add an Address by searching an existed address
Call objTestLib.printfile(file,3," a. Add an Address by searching an existed address")
Browser("Accela Automation:_18").Page("Accela Automation:").Image("Add new Address").Click
Browser("Accela Automation:_19").Page("Accela Automation:").Image("Search for Address").Click
Browser("Accela Automation:_20").Page("Accela Automation:").Image("Submit").Click 22,6
Browser("Accela Automation:_21").Page("Accela Automation:").Image("Selbtn").Click
wait(5)
strTemp = Browser("Accela Automation:_19").Page("Accela Automation:").WebEdit("AdrFullAddr").GetROProperty("value")
Browser("Accela Automation:_19").Page("Accela Automation:").WebRadioGroup("AdrB1_PRIMARY_ADDR_F").Select "N"
Browser("Accela Automation:_19").Page("Accela Automation:").Image("Save").Click 26,5
If Browser("Accela Automation:_18").Page("Accela Automation:").Image("Add new Address").Exist(5) Then
Browser("Accela Automation:_18").Page("Accela Automation:").Link("NewAddress").SetTOProperty "text",strTemp
If Browser("Accela Automation:_18").Page("Accela Automation:").Link("NewAddress").Exist Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"can not find the added address!")
End If
' Elseif Browser("Accela Automation:_19").Dialog("Microsoft Internet").WinButton("OK").Exist Then
' strMessage= Browser("Accela Automation:_19").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
' Browser("Accela Automation:_19").Dialog("Microsoft Internet").WinButton("OK").Click
' Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function DeleteAddress ()
'b. delete the new added Address
Call objTestLib.printfile(file,3," b. delete the new added Address")
Browser("Accela Automation:_18").Page("Accela Automation:").Image("Delete Address").Click
Browser("Accela Automation:_18").Dialog("Microsoft Internet").WinButton("OK").Click
wait(5)
If Browser("Accela Automation:_18").Page("Accela Automation:").Image("Add new Address").Exist Then
If Browser("Accela Automation:_18").Page("Accela Automation:").Link("NewAddress").Exist=False Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"the added address still exists!")
End If
Elseif Browser("Accela Automation:_18").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_18").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_18").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
'Browser("Accela Automation:_18").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====17. Structure
Call objTestLib.printfile(file,3," 17. Structure")
objmsgbox.SQAMsgbox "17. Structure","AA Auto Test",3,0
Browser("Accela Automation:").Page("Accela Automation:").Link("Structure").Click
Call AddStructure()
If Err_Flag=False Then
Call DeleteStructure()
End If
Function AddStructure ()
Err_Flag = True
'a. Add a structure by searching an existed structure
Call objTestLib.printfile(file,3," a. Add a structure by searching an existed structure")
Browser("Accela Automation:_22").Page("Accela Automation:").Image("Add new Structure").Click
Browser("Accela Automation:_38").Page("Accela Automation:").Image("Search Structure").Click
wait(5)
Browser("Accela Automation:_39").Page("Accela Automation:").Image("Submit").Click 16,8
wait(5)
strInnerText = Browser("Browser_2").Page("Page").WebTable("Structure").GetROProperty("innertext")
If instr(strInnerText,"No Records")=0 Then
strTemp = Browser("Browser_2").Page("Page").WebTable("Structure").GetCellData(3,1)
Browser("Browser_2").Page("Page_2").Image("Select").Click
wait(5)
Browser("Accela Automation:_38").Page("Accela Automation:").Image("Save").Click
wait(5)
strInnerText = Browser("Accela Automation:_22").Page("Accela Automation:_2").WebTable("Name").GetROProperty("innertext")
If instr(strInnerText,strTemp) <> 0 Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannnot find the new structure!")
End If
Else
Browser("Browser_2").Page("Page").Image("close window").Click
Call objTestLib.printfile(file,3," ---None, cannot find any structure!")
End If
End Function
Function DeleteStructure ()
'b. delete the new added structure
Call objTestLib.printfile(file,3," b. delete the new added structure")
Browser("Accela Automation:_22").Page("Accela Automation:_2").Image("Delete Structure").Click
Browser("Accela Automation:_22").Dialog("Microsoft Internet").WinButton("OK").Click
wait(5)
If Browser("Accela Automation:_22").Page("Accela Automation:").Image("Add new Structure").Exist Then
strInnerText = Browser("Accela Automation:_22").Page("Accela Automation:_2").WebTable("Name").GetROProperty("innertext")
If instr(strInnerText,strTemp)=0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"the new structure still exist!")
End If
Elseif Browser("Accela Automation:_22").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_22").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_22").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
'Browser("Accela Automation:_22").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====18. Licensed People
Call objTestLib.printfile(file,3," 18. Licensed People")
objmsgbox.SQAMsgbox "18. Licensed People","AA Auto Test",3,0
Browser("Accela Automation:").Page("Accela Automation:").Link("Licensed").Click
Call AddPeople ()
If Err_Flag=False Then
call DeletePeople()
End If
Function AddPeople ()
Err_Flag = True
'a. Add a Licensed People
Call objTestLib.printfile(file,3," a. Add a Licensed People")
'(1) search an existed Licensed People
Call objTestLib.printfile(file,3," (1) search an existed Licensed People")
Browser("Accela Automation:_23").Page("Accela Automation:").Image("Add new Licensed").Click
Browser("Accela Automation:_24").Page("Accela Automation:").Image("Search for Licensed").Click
Browser("Accela Automation:_25").Page("Accela Automation:").Image("Search").Click 44,11
Browser("Accela Automation:_26").Page("Accela Automation:").Image("Select Licensed").Click
wait(5)
strTemp = Browser("Accela Automation:_24").Page("Accela Automation:_2").WebEdit("CAEB1_LICENSE_NBR").GetROProperty("value")
If len(strTemp) <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot search any licensed people!")
End If
'(2) modify the Licensed number and submit
Call objTestLib.printfile(file,3," (2) modify the Licensed number and submit")
Browser("Accela Automation:_24").Page("Accela Automation:_2").WebEdit("CAEB1_LICENSE_NBR").Set "Agency Testing"
Browser("Accela Automation:_24").Page("Accela Automation:").WebRadioGroup("CaeB1_PRINT_FLAG").Select "N"
Browser("Accela Automation:_24").Page("Accela Automation:_2").Image("Save").Click 33,10
If Browser("Accela Automation:_23").Page("Accela Automation:").Image("Add new Licensed").Exist(5)=False Then
Browser("Accela Automation:_37").Page("Accela Automation:").Image("Close window").Click
End If
If Browser("Accela Automation:_23").Page("Accela Automation:").Image("Add new Licensed").Exist Then
If Browser("Accela Automation:_23").Page("Accela Automation:").Link("Agency Testing").Exist Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the new Licensed professional")
End If
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function DeletePeople ()
'b. delete the new added Licensed professional
Call objTestLib.printfile(file,3," b. delete the new added Licensed professional")
Browser("Accela Automation:_23").Page("Accela Automation:").Image("Delete Licensed").Click
Browser("Accela Automation:_23").Dialog("Microsoft Internet").WinButton("OK").Click
wait(5)
If Browser("Accela Automation:_23").Page("Accela Automation:").Image("Add new Licensed").Exist Then
If Browser("Accela Automation:_23").Page("Accela Automation:").Link("Agency Testing").Exist=False Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"the new Licensed professional still exists!")
End If
Elseif Browser("Accela Automation:_23").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_23").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_23").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
'Browser("Accela Automation:_23").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====19. Contact
Call objTestLib.printfile(file,3," 19. Contact")
objmsgbox.SQAMsgbox "19. Contact","AA Auto Test",3,0
Browser("Accela Automation:").Page("Accela Automation:").Link("Contact").Click
Call AddContact()
If Err_Flag=False Then
Call DeleteContact()
End If
Function AddContact ()
Err_Flag = True
'a. Add a Contact
Call objTestLib.printfile(file,3," a. Add a Contact")
'(1) search an existed Contact
Call objTestLib.printfile(file,3," (1) search an existed Contact")
Browser("Accela Automation:_27").Page("Accela Automation:").Image("Add new Contact").Click
Browser("Accela Automation:_28").Page("Accela Automation:").Image("Copy Contact").Click
Browser("Accela Automation:_29").Page("Accela Automation:").WebList("CNT_TYPE").Select "#0"
Browser("Accela Automation:_29").Page("Accela Automation:").Image("Submit").Click 33,0
Browser("Accela Automation:_30").Page("Accela Automation:").Image("Select Contact").Click
wait(5)
strTemp = Browser("Accela Automation:_28").Page("Accela Automation:_2").WebEdit("AppB1_FNAME").GetROProperty("value")
If len(strTemp) <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"search all contact failed!")
End If
'(2) modify the contact name and submit
Call objTestLib.printfile(file,3," (2) modify the contact name and submit")
Browser("Accela Automation:_28").Page("Accela Automation:_2").WebEdit("AppB1_FNAME").Set "Kiki"
Browser("Accela Automation:_28").Page("Accela Automation:_2").WebEdit("AppB1_LNAME").Set "Zhao"
wait(5)
Browser("Accela Automation:_28").Page("Accela Automation:_2").Image("Save").Click 24,6
Browser("Accela Automation:_27").Page("Accela Automation:").Sync
If Browser("Accela Automation:_27").Page("Accela Automation:").Image("Add new Contact").Exist(5) Then
If Browser("Accela Automation:_27").Page("Accela Automation:_2").Link("Kiki Zhao").Exist Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the new contact")
End If
' Elseif Browser("Accela Automation:_28").Dialog("Microsoft Internet").WinButton("OK").Exist Then
' strMessage= Browser("Accela Automation:_28").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
' Browser("Accela Automation:_28").Dialog("Microsoft Internet").WinButton("OK").Click
' Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function DeleteContact ()
'b. delete the new added contact
Call objTestLib.printfile(file,3," b. delete the new added contact")
Browser("Accela Automation:_27").Page("Accela Automation:_2").Image("Delete Applicant").Click
Browser("Accela Automation:_27").Dialog("Microsoft Internet").WinButton("OK").Click
If Browser("Accela Automation:_27").Page("Accela Automation:").Image("Add new Contact").Exist(5) Then
If Browser("Accela Automation:_27").Page("Accela Automation:_2").Link("Kiki Zhao").Exist=False Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"the new Contact still exists")
End If
Elseif Browser("Accela Automation:_27").Dialog("Microsoft Internet").WinButton("OK").Exist Then
strMessage = Browser("Accela Automation:_27").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
Browser("Accela Automation:_27").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
'Browser("Accela Automation:_27").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'###############################Section 2: Set #####################
Call objTestLib.printfile(file,3,"Section 2: Set ")
'###############################Section 3: SMART MANAGER #####################
Call objTestLib.printfile(file,3,"Section 3: SMART MANAGER ")
objmsgbox.SQAMsgbox "Section 2: SMART MANAGER ","AA Auto Test",3,0
'=====1. New Tickler
Call objTestLib.printfile(file,3," 1. New Tickler")
Browser("Accela Automation:").Page("Accela Automation:").Link("Tickler Collection").Click
Call AddTickler()
If Err_Flag=False Then
'=====2. Update the new tickler
Call objTestLib.printfile(file,3," 2. Update the new tickler")
Call UpdateTickler()
'Browser("Accela Automation:_35").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====3. set the new tickler as default tickler, and click tickler
Call objTestLib.printfile(file,3," 3. set the new tickler as default tickler, and click tickler")
Call SetTicklerDefault()
'Browser("Accela Automation:_35").Page("Accela Automation:_2").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'=====4. Delete the new tickler
Call objTestLib.printfile(file,3," 4. Delete the new tickler")
Call DeleteTickler()
End If
Function AddTickler ()
Err_Flag = True
Browser("Accela Automation:_31").Page("Accela Automation:").Image("Add New Tickler").Click
Browser("Accela Automation:_32").Page("Accela Automation:").WebEdit("SCREEN_NAME").Set "Agency Testing"
Browser("Accela Automation:_32").Page("Accela Automation:").Image("Search for Departmen").Click
Browser("Accela Automation:_33").Page("Accela Automation:").Frame("toc").Link("Organization.").Click
Browser("Accela Automation:_33").Page("Accela Automation:").Frame("toc").Link("Organization.").Click
Browser("Accela Automation:_33").Page("Accela Automation:").Frame("toc").Link("BUILDING").Click
Browser("Accela Automation:_33").Page("Accela Automation:").Frame("toc").Link("CONTRACT").Click
'Browser("Accela Automation:_33").Page("Accela Automation:").Frame("toc").Link("MEP").Click
Browser("Accela Automation:_33").Page("Accela Automation:").Frame("toc").Link("NA").Click
Browser("Accela Automation:_33").Page("Accela Automation:").Frame("toc").Link("NA_2").Click
Browser("Accela Automation:_33").Page("Accela Automation:").Frame("toc").Link("NA_3").Click
Browser("Accela Automation:_33").Page("Accela Automation:").Frame("toc2").Image("Submit").Click 25,6
Browser("Accela Automation:_32").Page("Accela Automation:").Image("Submit").Click
If Browser("Accela Automation:_31").Page("Accela Automation:").Image("Add New Tickler").Exist(5) Then
strInnerText = Browser("Accela Automation:_31").Page("Accela Automation:_2").WebTable("Name").GetROProperty("innertext")
If Instr(strInnerText,"Agency Testing") <> 0 Then
Err_Flag = False
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the [agency testing] tickler")
End If
' Elseif Browser("Accela Automation:_32").Dialog("Microsoft Internet").WinButton("OK").Exist Then
' strMessage= Browser("Accela Automation:_32").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
' Browser("Accela Automation:_32").Dialog("Microsoft Internet").WinButton("OK").Click
' Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
Else
Call objTestLib.printfile(file,5,"there occurs an unexpected error!")
Browser("Accela Automation:").back
End If
End Function
Function UpdateTickler ()
Dim strInnerText
Browser("Accela Automation:_31").Page("Accela Automation:_2").Image("Edit Tickler").Click
Browser("Accela Automation:_34").Page("Accela Automation:").WebEdit("SRCH_SD_BEFORE").Set "300"
Browser("Accela Automation:_34").Page("Accela Automation:").WebEdit("SRCH_SD_BEFORE_STAT").Set "300"
Browser("Accela Automation:_34").Page("Accela Automation:").Image("Submit").Click
wait(5)
strInnerText = Browser("Accela Automation:_35").Page("Accela Automation:").WebTable("Name:").GetROProperty("innertext")
If instr(strInnerText,date-300) <> 0 And instr(strInnerText,date-300+60) <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"update the date range failed!")
End If
' Elseif Browser("Accela Automation:_34").Dialog("Microsoft Internet").WinButton("OK").Exist Then
' strMessage= Browser("Accela Automation:_34").Dialog("Microsoft Internet").Static("Warnning").GetROProperty("text")
' Browser("Accela Automation:_34").Dialog("Microsoft Internet").WinButton("OK").Click
' Call objTestLib.printfile(file,5,"updated the Contact failed, the error message is " & strMessage)
End Function
Function SetTicklerDefault ()
Browser("Accela Automation:").Page("Accela Automation:").Link("Preference").Click
Browser("Accela Automation:_36").Page("Accela Automation:").Image("Submit").Click
Browser("Accela Automation:_36").Page("Accela Automation:_2").WebList("DefaultTickler").Select "Agency Testing"
Browser("Accela Automation:_36").Page("Accela Automation:_2").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Link("Tickler").Click
wait(5)
strInnerText = Browser("Accela Automation:_35").Page("Accela Automation:").WebTable("Name:").GetROProperty("innertext")
If instr(strInnerText,"Agency Testing") <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"set the new tickler as default tickler failed!")
End If
End Function
Function DeleteTickler ()
Browser("Accela Automation:").Page("Accela Automation:").Link("Tickler Collection").Click
Browser("Accela Automation:_31").Page("Accela Automation:").Image("Delete Tickler").Click
Browser("Accela Automation:_31").Dialog("Microsoft Internet").WinButton("OK").Click
wait(5)
strInnerText = Browser("Accela Automation:_31").Page("Accela Automation:_2").WebTable("Name").GetROProperty("innertext")
If Instr(strInnerText,"Agency Testing")=0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"the [agency testing] tickler still exists!")
End If
End Function
'Browser("Accela Automation:_31").Page("Accela Automation:").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'###############################Section 3: PREFERENCE #####################
Call objTestLib.printfile(file,3,"Section 3: PREFERENCE")
objmsgbox.SQAMsgbox "Section 3: PREFERENCE","AA Auto Test",3,0
'=====1. Perference
Call objTestLib.printfile(file,3," 1. Perference")
'a. modify the perference
Call objTestLib.printfile(file,3," a. modify the perference")
Browser("Accela Automation:").Page("Accela Automation:").Link("Preference").Click
Browser("Accela Automation:_36").Page("Accela Automation:").WebList("DefaultPage").Select(1)
Browser("Accela Automation:_36").Page("Accela Automation:").Image("Submit").Click
wait(5)
If Browser("Accela Automation:_36").Page("Accela Automation:").WebList("DefaultPage").GetROProperty("value") <> "Accela home" Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"modify the perfernce failed")
End If
'b. modify the perference with original data
Call objTestLib.printfile(file,3," b. modify the perference with original data")
Browser("Accela Automation:_36").Page("Accela Automation:_2").WebList("DefaultPage").Select "Accela home"
Browser("Accela Automation:_36").Page("Accela Automation:_2").Image("Submit").Click
'Browser("Accela Automation:_36").Page("Accela Automation:_2").Image("tab_menu").Click
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
'###############################Section 4: SUPPORT #####################
Call objTestLib.printfile(file,3,"Section 4: SUPPORT")
objmsgbox.SQAMsgbox "Section 4: SUPPORT","AA Auto Test",3,0
'=====1. Contact Accela
Call objTestLib.printfile(file,3," 1. Contact Accela")
Browser("Accela Automation:").Page("Accela Automation:").Link("Contact Accela").Click
If Browser("Browser_3").Page("Page").Link("[email protected]").Exist(10) Then
'Browser("Browser_3").Page("Page").Sync
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find the contact accela page!")
End If
Do While Instr(Browser("index:=0").GetROProperty("Title"),"Accela Automation: Home")=0
Browser("index:=0").close
Loop
Browser("Accela Automation:").Page("Accela Automation:").Image("tab_menu").Click
Call objTestLib.printfile(file,6)
Set objmsgbox = nothing
Set objTestLib = nothing
Set fso = nothing
Set file = nothing
Action_End
Option Explicit
'===========================================
Dim fso,file, filename, objTestLib, objmsgbox,TrueOrFlase
'===========================================
'fetch filename form the global sheet
'filename= "c:/log.txt"
filename= DataTable.RawValue ("filename", dtGlobalSheet)
'===========================================
'create a new file system object to output information
Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.OpenTextFile(filename, 8, True)
set objTestLib=createobject("TestLib.CLib")
'create a new sqamsgbox object
set objmsgbox=CreateObject("SQAMsgbox.CMsgbox")
'===========================================
call objTestLib.printfile(file,3,"The end of all the scripts!")
call objTestLib.printfile(file,7)
Browser("Accela Automation:").Close
Do while("True")
TrueOrFlase = Browser("index:=0").Exist
If(TrueOrFlase = "False") then
Exit do
Else
Browser("index:=0").close
End if
Loop
objmsgbox.SQAMsgbox "The end of all the scripts! We will open the log file...", "AA Auto Test", 3, 0
SystemUtil.Run "notepad.exe",filename
set objmsgbox=nothing
set objTestLib=nothing
Set fso=nothing
Set file =nothing