📄 script.mts
字号:
call VerifyUser()
Function SelectDept ()
Browser("Accela Automation:_33").Page("Accela Automation:").Image("Select Department").Click @@ script infofile_;_ZIP::Select_Department_ssf162.inf_;_hightlight id_;_Browser("Accela Automation: 33").Page("Accela Automation:").Image("Select Department")_;_NFB_;_1072339_;_
wait(6)
Browser("Accela Automation:_34").Page("Accela Automation:").Frame("toc").Link("Organization.").Click @@ script infofile_;_ZIP::Organization._ssf168.inf_;_hightlight id_;_Browser("Accela Automation: 34").Page("Accela Automation:").Frame("toc").Link("Organization.")_;_NFB_;_1082340_;_
Browser("Accela Automation:_34").Page("Accela Automation:").Frame("toc2").Image("Submit").Click 28,5 @@ script infofile_;_ZIP::Submit_ssf169.inf_;_hightlight id_;_Browser("Accela Automation: 34").Page("Accela Automation:").Frame("toc2").Image("Submit")_;_NFB_;_1082340_;_
Browser("Accela Automation:_34").Page("Accela Automation:_2").Frame("toc3").Link("ADMINISTRATOR").Click @@ script infofile_;_ZIP::ADMINISTRATOR_ssf170.inf_;_hightlight id_;_Browser("Accela Automation: 34").Page("Accela Automation: 2").Frame("toc3").Link("ADMINISTRATOR")_;_NFB_;_1082341_;_
wait(6)
End Function
Function VerifyUser ()
Dim strFName,strLName
strFName = Browser("Accela Automation:_33").Page("Accela Automation:").WebEdit("StaffFName").GetROProperty("value")
strLName = Browser("Accela Automation:_33").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
'(3). select the first status
Call objTestLib.printfile(file,3," (3). select the first status")
strTemp = Browser("Accela Automation:_33").Page("Accela Automation:").WebList("NEW_SD_APP_DES").GetItem(2)
Browser("Accela Automation:_33").Page("Accela Automation:").WebList("NEW_SD_APP_DES").Select strTemp @@ script infofile_;_ZIP::NEW_SD_APP_DES_ssf171.inf_;_hightlight id_;_Browser("Accela Automation: 33").Page("Accela Automation:").WebList("NEW SD APP DES")_;_NFB_;_1092341_;_
'(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:_33").Page("Accela Automation:").WebEdit("StatusDate").Set date+1 @@ script infofile_;_ZIP::StatusDate_ssf172.inf_;_hightlight id_;_Browser("Accela Automation: 33").Page("Accela Automation:").WebEdit("StatusDate")_;_NFB_;_1092341_;_
Browser("Accela Automation:_33").Page("Accela Automation:").WebEdit("DueDate").Set date+10
Browser("Accela Automation:_33").Page("Accela Automation:").WebEdit("Comment").Set "Agency Testing" @@ script infofile_;_ZIP::Comment_ssf177.inf_;_hightlight id_;_Browser("Accela Automation: 33").Page("Accela Automation:").WebEdit("Comment")_;_NFB_;_1132342_;_
Browser("Accela Automation:_33").Page("Accela Automation:").Image("Save").Click 25,14 @@ script infofile_;_ZIP::Save_ssf178.inf_;_hightlight id_;_Browser("Accela Automation: 33").Page("Accela Automation:").Image("Save")_;_NFB_;_1132342_;_
wait(6)
strInnerText = Browser("Accela Automation:_33").Page("Accela Automation:").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
'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")
Browser("Accela Automation:_33").Page("Accela Automation:").Image("Supervisor Only").Click @@ script infofile_;_ZIP::Supervisor_Only_ssf180.inf_;_hightlight id_;_Browser("Accela Automation: 33").Page("Accela Automation:").Image("Supervisor Only")_;_NFB_;_1132345_;_
wait(6)
Browser("Browser_4").Page("Page").WebList("TaskActive").Select "YES" @@ script infofile_;_ZIP::TaskActive_ssf181.inf_;_hightlight id_;_Browser("Browser 4").Page("Page").WebList("TaskActive")_;_NFB_;_1142346_;_
Browser("Browser_4").Page("Page").WebList("taskCompleted").Select "NO" @@ script infofile_;_ZIP::taskCompleted_ssf182.inf_;_hightlight id_;_Browser("Browser 4").Page("Page").WebList("taskCompleted")_;_NFB_;_1142346_;_
Browser("Browser_4").Page("Page").Image("Save").Click 24,12 @@ script infofile_;_ZIP::Save_ssf183.inf_;_hightlight id_;_Browser("Browser 4").Page("Page").Image("Save")_;_NFB_;_1142346_;_
Browser("Browser_5").Page("Page").Sync @@ script infofile_;_ZIP::Page_ssf184.inf_;_hightlight id_;_Browser("Browser_5").Page("Page")_;_NFB_;_1142348_;_
Browser("Browser_5").Close
wait(2)
If Browser("Accela Automation:_32").Page("Accela Automation:").Image("active").Exist Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"cannot find a check mark near the first task!")
End If
'd.Edit the first task by changing some information
Call objTestLib.printfile(file,3," d.Edit the first task by changing some information")
Browser("Accela Automation:_32").Page("Accela Automation:").Image("active").FireEvent "onmouseover" @@ script infofile_;_ZIP::active_ssf185.inf_;_hightlight id_;_Browser("Accela Automation: 32").Page("Accela Automation:").Image("active")_;_NFB_;_1152349_;_
Browser("Accela Automation:_32").Page("Accela Automation:").Image("active").Click @@ script infofile_;_ZIP::active_ssf186.inf_;_hightlight id_;_Browser("Accela Automation: 32").Page("Accela Automation:").Image("active")_;_NFB_;_1152349_;_
Browser("Accela Automation:_33").Page("Accela Automation:").Image("Select Department").Click @@ script infofile_;_ZIP::Select_Department_ssf187.inf_;_hightlight id_;_Browser("Accela Automation: 33").Page("Accela Automation:").Image("Select Department")_;_NFB_;_1152350_;_
wait(5)
Browser("Accela Automation:_34").Page("Accela Automation:").Frame("toc").Link("Organization.").Click @@ script infofile_;_ZIP::Organization._ssf188.inf_;_hightlight id_;_Browser("Accela Automation: 34").Page("Accela Automation:").Frame("toc").Link("Organization.")_;_NFB_;_1162352_;_
Browser("Accela Automation:_34").Page("Accela Automation:").Frame("toc2").Image("Submit").Click 23,7 @@ script infofile_;_ZIP::Submit_ssf189.inf_;_hightlight id_;_Browser("Accela Automation: 34").Page("Accela Automation:").Frame("toc2").Image("Submit")_;_NFB_;_1162352_;_
Browser("Accela Automation:_34").Page("Accela Automation:_2").Frame("toc3").Link("developer developer").Click @@ script infofile_;_ZIP::ADMINISTRATOR_ssf190.inf_;_hightlight id_;_Browser("Accela Automation: 34").Page("Accela Automation: 2").Frame("toc3").Link("ADMINISTRATOR")_;_NFB_;_1162353_;_
Browser("Accela Automation:_33").Page("Accela Automation:").Image("Save").Click 26,2 @@ script infofile_;_ZIP::Save_ssf192.inf_;_hightlight id_;_Browser("Accela Automation: 33").Page("Accela Automation:").Image("Save")_;_NFB_;_1172353_;_
wait(5)
strInnerText = Browser("Accela Automation:_33").Page("Accela Automation:").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
Browser("Accela Automation:_33").Page("Accela Automation:").Link("Menu").Click @@ script infofile_;_ZIP::Menu_ssf194.inf_;_hightlight id_;_Browser("Accela Automation: 33").Page("Accela Automation: 2").Link("Menu")_;_NFB_;_1182356_;_
'e.Delete the task
Call objTestLib.printfile(file,3," e.Delete the task")
Browser("Accela Automation:").Page("Accela Automation:").Link("History").Click @@ script infofile_;_ZIP::History_ssf195.inf_;_hightlight id_;_Browser("Accela Automation:").Page("Accela Automation:").Link("History")_;_NFB_;_1182357_;_
While Browser("Accela Automation:_31").Page("Accela Automation:").WebTable("Task").RowCount <> 1
Browser("Accela Automation:_31").Page("Accela Automation:").Image("Delete").Click @@ script infofile_;_ZIP::Delete_ssf196.inf_;_hightlight id_;_Browser("Accela Automation: 31").Page("Accela Automation:").Image("Delete")_;_NFB_;_1182358_;_
Browser("Accela Automation:_31").Dialog("Microsoft Internet").WinButton("OK").Click @@ script infofile_;_ZIP::Microsoft_Internet_Explorer_ssf197.inf_;_hightlight id_;_2_;_
Wend
If Browser("Accela Automation:_31").Page("Accela Automation:").WebTable("Task").RowCount=1 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"can find some tasks!")
End If
'Browser("Accela Automation:_31").Page("Accela Automation:").Link("Menu").Click @@ script infofile_;_ZIP::Menu_ssf198.inf_;_hightlight id_;_Browser("Accela Automation: 31").Page("Accela Automation:").Link("Menu")_;_NFB_;_1182359_;_
Browser("Accela Automation:").Page("Accela Automation:").Link("Menu").Click
'=====9. Permit @@ script infofile_;_ZIP::Accela_Automation__ssf199.inf_;_hightlight id_;_Browser("Accela Automation:").Page("Accela Automation:")_;_NFB_;_1182360_;_
Call objTestLib.printfile(file,3," 9. Permit")
objmsgbox.SQAMsgbox "9. Permit","AA Auto Test",3,0
Browser("Accela Automation:").Page("Accela Automation:").Link("App Summary").Click @@ script infofile_;_ZIP::App_Summary_ssf200.inf_;_hightlight id_;_Browser("Accela Automation:").Page("Accela Automation:").Link("App Summary")_;_NFB_;_1182361_;_
Browser("Accela Automation:_16").Page("Accela Automation:").Link("Permit").Click @@ script infofile_;_ZIP::Permit_ssf203.inf_;_hightlight id_;_Browser("Accela Automation: 16").Page("Accela Automation:").Link("Permit")_;_NFB_;_1202366_;_
Browser("LICENSED CONTRACTORS").Page("LICENSED CONTRACTORS").Sync @@ script infofile_;_ZIP::LICENSED_CONTRACTORS_ssf204.inf_;_hightlight id_;_Browser("LICENSED CONTRACTORS").Page("LICENSED CONTRACTORS")_;_NFB_;_1212366_;_
strInnerText = Browser("LICENSED CONTRACTORS").Page("LICENSED CONTRACTORS").WebTable("PermitHeader").GetROProperty("innertext")
If instr(strInnerText,strAppNumberTotal) <> 0 Then
Call objTestLib.printfile(file,4)
Else
Call objTestLib.printfile(file,5,"generated permit failed!")
End If
Browser("LICENSED CONTRACTORS").Close
'Browser("Accela Automation:_16").Page("Accela Automation:").Link("Menu").Click @@ script infofile_;_ZIP::Menu_ssf205.inf_;_hightlight id_;_Browser("Accela Automation: 16").Page("Accela Automation:").Link("Menu")_;_NFB_;_1222366_;_
Browser("Accela Automation:").Page("Accela Automation:").Link("Menu").Click
'=====10. Inspection
Call objTestLib.printfile(file,3," 10. Inspection")
objmsgbox.SQAMsgbox "10. Inspection","AA Auto Test",3,0
Browser("Accela Automation:").Page("Accela Automation:").Link("App Type").Click @@ script infofile_;_ZIP::App_Type_ssf218.inf_;_hightlight id_;_Browser("Accela Automation:").Page("Accela Automation:").Link("App Type")_;_NFB_;_1412433_;_
Browser("Accela Automation:_37").Page("Accela Automation:").Frame("toc").Link("Building").Click @@ script infofile_;_ZIP::Building_ssf219.inf_;_hightlight id_;_Browser("Accela Automation: 37").Page("Accela Automation:").Frame("toc").Link("Building")_;_NFB_;_1422435_;_
Browser("Accela Automation:_37").Page("Accela Automation:").Frame("toc").Link("Building Permit").Click @@ script infofile_;_ZIP::Building_Permit_ssf220.inf_;_hightlight id_;_Browser("Accela Automation: 37").Page("Accela Automation:").Frame("toc").Link("Building Permit")_;_NFB_;_1422435_;_
Browser("Accela Automation:_37").Page("Accela Automation:").Frame("toc").Link("Residential").Click @@ script infofile_;_ZIP::Residential_ssf221.inf_;_hightlight id_;_Browser("Accela Automation: 37").Page("Accela Automation:").Frame("toc").Link("Residential")_;_NFB_;_1422435_;_
Browser("Accela Automation:_37").Page("Accela Automation:").Frame("toc").Link("New Single Family").Click @@ script infofile_;_ZIP::New_Single_Family_ssf222.inf_;_hightlight id_;_Browser("Accela Automation: 37").Page("Accela Automation:").Frame("toc").Link("New Single Family")_;_NFB_;_1422435_;_
Browser("Accela Automation:_37").Page("Accela Automation:").Frame("content").Image("Edit").Click @@ script infofile_;_ZIP::Edit_ssf223.inf_;_hightlight id_;_Browser("Accela Automation: 37").Page("Accela Automation:").Frame("content").Image("Edit")_;_NFB_;_1422435_;_
Browser("Accela Automation:_38").Page("Accela Automation:").WebList("txtinspcode").Select "MECH-INSP" @@ script infofile_;_ZIP::txtinspcode_ssf224.inf_;_hightlight id_;_Browser("Accela Automation: 38").Page("Accela Automation:").WebList("txtinspcode")_;_NFB_;_1432436_;_
Browser("Accela Automation:_38").Page("Accela Automation:").Image("Save").Click @@ script infofile_;_ZIP::Save_ssf225.inf_;_hightlight id_;_Browser("Accela Automation: 38").Page("Accela Automation:").Image("Save")_;_NFB_;_1432436_;_
wait(4)
Browser("Accela Automation:_37").Page("Accela Automation:").Sync @@ script infofile_;_ZIP::Accela_Automation__ssf226.inf_;_hightlight id_;_Browser("Accela Automation:_37").Page("Accela Automation:")_;_NFB_;_1442438_;_
Browser("Accela Automation:_37").Close
Browser("Accela Automation:_39").Page("Accela Automation:").Link("Menu").Click @@ script infofile_;_ZIP::Menu_ssf227.inf_;_hightlight id_;_Browser("Accela Automation: 39").Page("Accela Automation:").Link("Menu")_;_NFB_;_1452438_;_
'a.schedule two inspections
Call objTestLib.printfile(file,3," a.schedule two inspections")
Browser("Accela Automation:").Page("Accela Automation:").Link("Schedule").Click @@ script infofile_;_ZIP::Schedule_ssf229.inf_;_hightlight id_;_Browser("Accela Automation:").Page("Accela Automation:").Link("Schedule")_;_NFB_;_1452441_;_
wait(5)
Set oDesc = Description.Create()
oDesc("micclass").Value = "WebCheckBox"
Set WebCheckBoxs = Browser("Accela Automation:_36").Page("Accela Automation:").ChildObjects(oDesc)
strEditValue = WebCheckBoxs(0).GetROProperty("name")
Browser("Accela Automation:_36").Page("Accela Automation:").WebCheckBox("Insp636").SetTOProperty "name",strEditValue
strEditValue = WebCheckBoxs(1).GetROProperty("name")
Browser("Accela Automation:_36").Page("Accela Automation:").WebCheckBox("Insp637").SetTOProperty "name",strEditValue
strInspName1 = Browser("Accela Automation:_36").Page("Accela Automation:").WebTable("Required Inspections").GetCellData(4,2)
strInspName2 = Browser("Accela Automation:_36").Page("Accela Automation:").WebTable("Required Inspections").GetCellData(6,2)
Browser("Accela Automation:_36").Page("Accela Automation:").WebCheckBox("Insp636").Set "ON" @@ script infofile_;_ZIP::Insp636_ssf230.inf_;_hightlight id_;_Browser("Accela Automation: 36").Page("Accela Automation:").WebCheckBox("Insp636")_;_NFB_;_1452442_;_
Browser("Accela Automation:_36").Page("Accela Automation:").WebCheckBox("Insp637").Set "ON" @@ script infofile_;_ZIP::Insp637_ssf231.inf_;_hightlight id_;_Browser("Accela Automation: 36").Page("Accela Automation:").WebCheckBox("Insp637")_;_NFB_;_1452442_;_
Browser("Accela Automation:_36").Page("Accela Automation:").Image("Schedule Inspection").Click @@ script infofile_;_ZIP::Schedule_Inspection_ssf232.inf_;_hightlight id_;_Browser("Accela Automation: 36").Page("Accela Automation:").Image("Schedule Inspection")_;_NFB_;_1452442_;_
Browser("Accela Automation:_40").Page("Accela Automation:").Image("Select today").Click @@ script infofile_;_ZIP::Select_today_ssf233.inf_;_hightlight id_;_Browser("Accela Automation: 40").Page("Accela Automation:").Image("Select today")_;_NFB_;_1452443_;_
Browser("Accela Automation:_40").Page("Accela Automation:").WebRadioGroup("G6_ACT_T1").Select "AM" @@ script infofile_;_ZIP::G6_ACT_T1_ssf234.inf_;_hightlight id_;_Browser("Accela Automation: 40").Page("Accela Automation:").WebRadioGroup("G6 ACT T1")_;_NFB_;_1452443_;_
Browser("Accela Automation:_40").Page("Accela Automation:").Image("Select Department").Click @@ script infofile_;_ZIP::Select_Department_ssf235.inf_;_hightli
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -