📄 script.mts
字号:
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 @@ script infofile_;_ZIP::Building_ssf47.inf_;_hightlight id_;_Browser("Accela Automation: 12").Page("Accela Automation:").Frame("toc").Link("Building")_;_NFB_;_130730_;_
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 @@ script infofile_;_ZIP::Repairs_ssf48.inf_;_hightlight id_;_Browser("Accela Automation: 12").Page("Accela Automation:").Frame("toc").Link("Repairs")_;_NFB_;_130730_;_
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 @@ script infofile_;_ZIP::Cultural_ssf49.inf_;_hightlight id_;_Browser("Accela Automation: 12").Page("Accela Automation:").Frame("toc").Link("Cultural")_;_NFB_;_130730_;_
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 @@ script infofile_;_ZIP::Main_Post_ssf50.inf_;_hightlight id_;_Browser("Accela Automation: 12").Page("Accela Automation:").Frame("toc").Link("Main Post")_;_NFB_;_130730_;_
Browser("Accela Automation:_12").Page("Accela Automation:").Frame("content").Image("Edit").Click @@ script infofile_;_ZIP::Edit_ssf51.inf_;_hightlight id_;_Browser("Accela Automation: 12").Page("Accela Automation:").Frame("content").Image("Edit")_;_NFB_;_130730_;_
Wait(5)
End Function
Function UpdateAppValue (arrExpectValue)
Err_Flag = True
Browser("Accela Automation:_13").Page("Accela Automation:").WebList("txtGroupCode").Select arrExpectValue(2) @@ script infofile_;_ZIP::txtGroupCode_ssf52.inf_;_hightlight id_;_Browser("Accela Automation: 13").Page("Accela Automation:").WebList("txtGroupCode")_;_NFB_;_140731_;_
Browser("Accela Automation:_13").Page("Accela Automation:").WebRadioGroup("rbStatus").Select arrExpectValue(1) @@ script infofile_;_ZIP::rbStatus_ssf53.inf_;_hightlight id_;_Browser("Accela Automation: 13").Page("Accela Automation:").WebRadioGroup("rbStatus")_;_NFB_;_140731_;_
Browser("Accela Automation:_13").Page("Accela Automation:").Image("Save").Click @@ script infofile_;_ZIP::Save_ssf54.inf_;_hightlight id_;_Browser("Accela Automation: 13").Page("Accela Automation:").Image("Save")_;_NFB_;_140731_;_
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 @@ script infofile_;_ZIP::Microsoft_Internet_Explorer_ssf378.inf_;_hightlight id_;_1_;_
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 @@ script infofile_;_ZIP::tab_menu_ssf64.inf_;_hightlight id_;_Browser("Accela Automation: 14").Page("Accela Automation:").Image("tab menu")_;_NFB_;_180737_;_
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 ") @@ script infofile_;_ZIP::Accela_Automation__ssf65.inf_;_hightlight id_;_Browser("Accela Automation:").Page("Accela Automation:")_;_NFB_;_180738_;_
Browser("Accela Automation:").Page("Accela Automation:").Link("Inspection").Click @@ script infofile_;_ZIP::Inspection_ssf66.inf_;_hightlight id_;_Browser("Accela Automation:").Page("Accela Automation:").Link("Inspection")_;_NFB_;_180739_;_
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 @@ script infofile_;_ZIP::Search_ssf67.inf_;_hightlight id_;_Browser("Accela Automation: 15").Page("Accela Automation:").Image("Search")_;_NFB_;_180740_;_
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 @@ script infofile_;_ZIP::Edit_ssf68.inf_;_hightlight id_;_Browser("Accela Automation: 16").Page("Accela Automation:").Image("Edit")_;_NFB_;_180741_;_
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 @@ script infofile_;_ZIP::tab_menu_ssf69.inf_;_hightlight id_;_Browser("Accela Automation: 17").Page("Accela Automation:").Image("tab menu")_;_NFB_;_180742_;_
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 @@ script infofile_;_ZIP::Fee_Items_ssf71.inf_;_hightlight id_;_Browser("Accela Automation:").Page("Accela Automation:").Link("Fee Items")_;_NFB_;_180744_;_
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 @@ script infofile_;_ZIP::Submit_ssf72.inf_;_hightlight id_;_Browser("Accela Automation: 18").Page("Accela Automation:").Image("Submit")_;_NFB_;_180745_;_
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 @@ script infofile_;_ZIP::Edit_ssf73.inf_;_hightlight id_;_Browser("Accela Automation: 19").Page("Accela Automation:").Image("Edit")_;_NFB_;_180746_;_
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) @@ script infofile_;_ZIP::txtR1GFDEFAULTFLAG_ssf74.inf_;_hightlight id_;_Browser("Accela Automation: 20").Page("Accela Automation:").WebRadioGroup("txtR1GFDEFAULTFLAG")_;_NFB_;_180747_;_
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) @@ script infofile_;_ZIP::txtRecStatus_ssf75.inf_;_hightlight id_;_Browser("Accela Automation: 20").Page("Accela Automation:").WebRadioGroup("txtRecStatus")_;_NFB_;_180747_;_
Browser("Accela Automation:_20").Page("Accela Automation:").Image("Save").Click 17,9 @@ script infofile_;_ZIP::Save_ssf76.inf_;_hightlight id_;_Browser("Accela Automation: 20").Page("Accela Automation:").Image("Save")_;_NFB_;_180747_;_
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 @@ script infofile_;_ZIP::Microsoft_Internet_Explorer_ssf381.inf_;_hightlight id_;_2_;_
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 @@ script infofile_;_ZIP::tab_menu_ssf81.inf_;_hightlight id_;_Browser("Accela Automation: 19").Page("Accela Automation: 3").Image("tab menu")_;_NFB_;_180750_;_
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 @@ script infofile_;_ZIP::App_Specific_ssf83.inf_;_hightlight id_;_Browser("Accela Automation:").Page("Accela Automation:").Link("App Specific")_;_NFB_;_180752_;_
Call SearchSpecInfo()
If Err_Flag=False Then
call UpdateSpecInfo()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -