📄 script.mts
字号:
'=====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:_16").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:_16").Page("Accela Automation:").Link("Detail").Exist Then @@ script infofile_;_ZIP::Accela_Automation__ssf58.inf_;_hightlight id_;_Browser("Accela Automation:_16").Page("Accela Automation:")_;_NFB_;_782250_;_
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"Cannot find detail link!")
End If
If Browser("Accela Automation:_16").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:_16").Page("Accela Automation:").Link("Detail").Click @@ script infofile_;_ZIP::Detail_ssf59.inf_;_hightlight id_;_Browser("Accela Automation: 16").Page("Accela Automation:").Link("Detail")_;_NFB_;_782251_;_
arrexpected = Array("$250,000.00","","1","1","N","101 - Single Family Houses Detached")
Call VerifyDetail(arrexpected)
Function VerifyDetail (arrexpected)
Dim intFlag,arrValue(6),intRow,intRow1
intFlag = 1
intRow1 = 0
For intRow = 1 To 11 Step 2
arrValue(intRow1) = Browser("Accela Automation:_17").Page("Accela Automation:").WebTable("Job Value:").GetCellData(intRow,2)
If instr(arrValue(intRow1),arrexpected(intRow1)) <> 0 Then
intRow1 = intRow1+1
Else
Exit For
intFlag = "0"
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:_17").Page("Accela Automation:").Link("Menu").Click @@ script infofile_;_ZIP::Menu_ssf61.inf_;_hightlight id_;_Browser("Accela Automation: 17").Page("Accela Automation:").Link("Menu")_;_NFB_;_782253_;_
Browser("Accela Automation:").Page("Accela Automation:").Link("Menu").Click
'=====5. Assess Fees
Call objTestLib.printfile(file,3," 5. Assess Fees")
objmsgbox.SQAMsgbox "5. Assess Fees","AA Auto Test",3,0 @@ script infofile_;_ZIP::Accela_Automation__ssf62.inf_;_hightlight id_;_Browser("Accela Automation:").Page("Accela Automation:")_;_NFB_;_782254_;_
Browser("Accela Automation:").Page("Accela Automation:").Link("Assess Fees").Click @@ script infofile_;_ZIP::Assess_Fees_ssf63.inf_;_hightlight id_;_Browser("Accela Automation:").Page("Accela Automation:").Link("Assess Fees")_;_NFB_;_792255_;_
'a.Add a fee
Call objTestLib.printfile(file,3," a.Add a fee")
strFee = AddFee("BLDG-FEE")
Call VerifyFee(strFee)
'b.select different fee schedules and add several fees
Call objTestLib.printfile(file,3," b.select different fee schedules and add several fees")
strFee = AddFee("ENCR-FEE")
Call VerifyFee(strFee)
strFee = AddFee("GRAD-FEE")
Call VerifyFee(strFee)
Function AddFee (strFeeSch)
Browser("Accela Automation:_21").Page("Accela Automation:").Image("Add new Fee").Click @@ script infofile_;_ZIP::Add_new_Fee_ssf64.inf_;_hightlight id_;_Browser("Accela Automation: 21").Page("Accela Automation:").Image("Add new Fee")_;_NFB_;_792256_;_
wait(6)
Browser("Browser").Page("Page").WebList("FeeSched").Select strFeeSch @@ script infofile_;_ZIP::FeeSched_ssf68.inf_;_hightlight id_;_Browser("Browser").Page("Page").WebList("FeeSched")_;_NFB_;_822260_;_
Browser("Browser").Dialog("Microsoft Internet").WinButton("OK").Click
wait(6)
Browser("Browser").Page("Page").WebEdit("feeUnitName1").Set "1" @@ script infofile_;_ZIP::feeUnitName1_ssf65.inf_;_hightlight id_;_Browser("Browser").Page("Page").WebEdit("feeUnitName1")_;_NFB_;_802258_;_
AddFee = Browser("Browser").Page("Page").WebTable("Fee Calculator").GetCellData(4,3)
AddFee = Trim(Mid(AddFee,1,len(AddFee)-1))
Browser("Browser").Page("Page").Image("Submit").Click 24,12 @@ script infofile_;_ZIP::Submit_ssf66.inf_;_hightlight id_;_Browser("Browser").Page("Page").Image("Submit")_;_NFB_;_802258_;_
wait(6)
End Function
Function VerifyFee (strFee)
Browser("Accela Automation:_21").Page("Accela Automation:").Link("FeeItem").SetTOProperty "text",strFee
If Browser("Accela Automation:_21").Page("Accela Automation:").Link("FeeItem").Exist Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"Adding a fee failed!")
End If
End Function
'c. Delete a fee
Call objTestLib.printfile(file,3," c. Delete a fee")
Browser("Accela Automation:_21").Page("Accela Automation:").Image("Delete Fee Item").Click @@ script infofile_;_ZIP::Delete_Fee_Item_ssf77.inf_;_hightlight id_;_Browser("Accela Automation: 21").Page("Accela Automation:").Image("Delete Fee Item")_;_NFB_;_852266_;_
wait(3)
If Browser("Accela Automation:_21").Dialog("Microsoft Internet").WinButton("OK").Exist Then
Browser("Accela Automation:_21").Dialog("Microsoft Internet").WinButton("OK").Click @@ script infofile_;_ZIP::Microsoft_Internet_Explorer_ssf78.inf_;_hightlight id_;_2_;_
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"Deleting the last fee item failed!")
End If
'd. Change the application number and back
Call objTestLib.printfile(file,3," d. Change the application number and back")
Browser("Accela Automation:_21").Page("Accela Automation:_2").WebEdit("PerID3").Set String(5-len(int(strAppNumber3)-1),"0") & int(strAppNumber3)-1 @@ script infofile_;_ZIP::PerID3_ssf80.inf_;_hightlight id_;_Browser("Accela Automation: 21").Page("Accela Automation: 2").WebEdit("PerID3")_;_NFB_;_852269_;_
Browser("Accela Automation:_21").Page("Accela Automation:_2").Image("Submit").Click @@ script infofile_;_ZIP::Submit_ssf81.inf_;_hightlight id_;_Browser("Accela Automation: 21").Page("Accela Automation: 2").Image("Submit")_;_NFB_;_852269_;_
wait(4)
If Browser("Accela Automation:_21").Dialog("Microsoft Internet").WinButton("OK").Exist=False Then
Call objTestLib.printfile(file,4)
Else
Browser("Accela Automation:_21").Dialog("Microsoft Internet").WinButton("OK").Click
Call objTestLib.printfile(file,5,"Change application number failed!")
End If
Browser("Accela Automation:_21").Page("Accela Automation:_2").WebEdit("PerID3").Set strAppNumber3 @@ script infofile_;_ZIP::PerID3_ssf80.inf_;_hightlight id_;_Browser("Accela Automation: 21").Page("Accela Automation: 2").WebEdit("PerID3")_;_NFB_;_852269_;_
Browser("Accela Automation:_21").Page("Accela Automation:_2").Image("Submit").Click @@ script infofile_;_ZIP::Submit_ssf81.inf_;_hightlight id_;_Browser("Accela Automation: 21").Page("Accela Automation: 2").Image("Submit")_;_NFB_;_852269_;_
wait(4)
'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:_21").Page("Accela Automation:_3").WebRadioGroup("feeCalcFactor").Select "CALC" @@ script infofile_;_ZIP::feeCalcFactor_ssf82.inf_;_hightlight id_;_Browser("Accela Automation: 21").Page("Accela Automation: 3").WebRadioGroup("feeCalcFactor")_;_NFB_;_852270_;_
wait(4)
Browser("Accela Automation:_21").Page("Accela Automation:_4").WebRadioGroup("feeCalcFactor").Select "CONT" @@ script infofile_;_ZIP::feeCalcFactor_ssf83.inf_;_hightlight id_;_Browser("Accela Automation: 21").Page("Accela Automation: 4").WebRadioGroup("feeCalcFactor")_;_NFB_;_852271_;_
wait(4) @@ script infofile_;_ZIP::Accela_Automation__5_ssf84.inf_;_hightlight id_;_Browser("Accela Automation:_21").Page("Accela Automation:_5")_;_NFB_;_852272_;_
'f. make invoice for new app
Call objTestLib.printfile(file,3," f. make invoice for new app")
Browser("Accela Automation:_21").Page("Accela Automation:_2").WebCheckBox("chkall").Set "ON" @@ script infofile_;_ZIP::chkall_ssf85.inf_;_hightlight id_;_Browser("Accela Automation: 21").Page("Accela Automation: 2").WebCheckBox("chkall")_;_NFB_;_862273_;_
Browser("Accela Automation:_21").Page("Accela Automation:_2").Image("Invoice Fee").Click @@ script infofile_;_ZIP::Invoice_Fee_ssf86.inf_;_hightlight id_;_Browser("Accela Automation: 21").Page("Accela Automation: 2").Image("Invoice Fee")_;_NFB_;_862273_;_
Browser("Accela Automation:_21").Dialog("Microsoft Internet").WinButton("OK").Click @@ script infofile_;_ZIP::Microsoft_Internet_Explorer_ssf87.inf_;_hightlight id_;_2_;_
'g. void for the first fee item
Call objTestLib.printfile(file,3," g. void for the first fee item ")
Browser("Accela Automation:_21").Page("Accela Automation:_6").Image("Voided Fee Item").Click @@ script infofile_;_ZIP::Voided_Fee_Item_ssf89.inf_;_hightlight id_;_Browser("Accela Automation: 21").Page("Accela Automation: 6").Image("Voided Fee Item")_;_NFB_;_872275_;_
wait(3)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -