📄 script.mts
字号:
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 @@ script infofile_;_ZIP::Submit_ssf84.inf_;_hightlight id_;_Browser("Accela Automation: 21").Page("Accela Automation:").Image("Submit")_;_NFB_;_180753_;_
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 @@ script infofile_;_ZIP::Edit_ssf85.inf_;_hightlight id_;_Browser("Accela Automation: 22").Page("Accela Automation:").Image("Edit")_;_NFB_;_180754_;_
'(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 @@ script infofile_;_ZIP::Add_new_Field_ssf86.inf_;_hightlight id_;_Browser("Accela Automation: 23").Page("Accela Automation:").Image("Add new Field")_;_NFB_;_180755_;_
wait(5)
Browser("Browser_3").Page("Page").WebList("txtR1_CHECKBOX_IND").Select "DropdownList" @@ script infofile_;_ZIP::txtR1_CHECKBOX_IND_ssf87.inf_;_hightlight id_;_Browser("Browser 3").Page("Page").WebList("txtR1 CHECKBOX IND")_;_NFB_;_190756_;_
Browser("Browser_3").Page("Page").WebEdit("txtR1_CHECKBOX_DESC").Set "Agency Testing" @@ script infofile_;_ZIP::txtR1_CHECKBOX_DESC_ssf88.inf_;_hightlight id_;_Browser("Browser 3").Page("Page").WebEdit("txtR1 CHECKBOX DESC")_;_NFB_;_190756_;_
Browser("Browser_3").Page("Page").WebEdit("txtR1_DISPLAY_ORDER").Set "0" @@ script infofile_;_ZIP::txtR1_DISPLAY_ORDER_ssf89.inf_;_hightlight id_;_Browser("Browser 3").Page("Page").WebEdit("txtR1 DISPLAY ORDER")_;_NFB_;_190756_;_
Browser("Browser_3").Page("Page").Image("Submit").Click 36,1 @@ script infofile_;_ZIP::Submit_ssf90.inf_;_hightlight id_;_Browser("Browser 3").Page("Page").Image("Submit")_;_NFB_;_190756_;_
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 @@ script infofile_;_ZIP::Edit_dropdownlist_ssf91.inf_;_hightlight id_;_Browser("Accela Automation: 23").Page("Accela Automation:").Image("Edit dropdownlist")_;_NFB_;_200757_;_
wait(5)
Browser("Browser_3").Page("Page").Image("Add new Field").Click @@ script infofile_;_ZIP::Add_new_Field_ssf92.inf_;_hightlight id_;_Browser("Browser 3").Page("Page").Image("Add new Field")_;_NFB_;_210758_;_
Browser("Browser_3").Page("Page_2").WebEdit("txtR1_CHECKBOX_VALUE").Set "Hello" @@ script infofile_;_ZIP::txtR1_CHECKBOX_VALUE_ssf93.inf_;_hightlight id_;_Browser("Browser 3").Page("Page 2").WebEdit("txtR1 CHECKBOX VALUE")_;_NFB_;_210759_;_
Browser("Browser_3").Page("Page_2").Image("Submit").Click @@ script infofile_;_ZIP::Submit_ssf94.inf_;_hightlight id_;_Browser("Browser 3").Page("Page 2").Image("Submit")_;_NFB_;_210759_;_
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" @@ script infofile_;_ZIP::ab1_ssf95.inf_;_hightlight id_;_Browser("Browser 4").Page("Page").WebEdit("ab1")_;_NFB_;_210760_;_
Browser("Browser_4").Page("Page").Image("Update with").Click @@ script infofile_;_ZIP::Update_with_ssf96.inf_;_hightlight id_;_Browser("Browser 4").Page("Page").Image("Update with")_;_NFB_;_210760_;_
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 @@ script infofile_;_ZIP::Delete_this_ssf97.inf_;_hightlight id_;_Browser("Browser 3").Page("Page 3").Image("Delete this")_;_NFB_;_210761_;_
Browser("Browser_3").Dialog("Microsoft Internet").WinButton("OK").Click @@ script infofile_;_ZIP::Microsoft_Internet_Explorer_ssf98.inf_;_hightlight id_;_2_;_
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 @@ script infofile_;_ZIP::Cancel_ssf99.inf_;_hightlight id_;_Browser("Browser 3").Page("Page 4").Image("Cancel")_;_NFB_;_210762_;_
'(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" @@ script infofile_;_ZIP::cd1_ssf100.inf_;_hightlight id_;_Browser("Accela Automation: 23").Page("Accela Automation:").WebList("cd1")_;_NFB_;_220762_;_
Browser("Accela Automation:_23").Page("Accela Automation:").Image("Update with").Click @@ script infofile_;_ZIP::Update_with_ssf104.inf_;_hightlight id_;_Browser("Accela Automation: 23").Page("Accela Automation:").Image("Update with")_;_NFB_;_220762_;_
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 @@ script infofile_;_ZIP::Delete_Field_ssf105.inf_;_hightlight id_;_Browser("Accela Automation: 23").Page("Accela Automation:").Image("Delete Field")_;_NFB_;_220763_;_
Browser("Accela Automation:_23").Dialog("Microsoft Internet").WinButton("OK").Click @@ script infofile_;_ZIP::Microsoft_Internet_Explorer_ssf106.inf_;_hightlight id_;_2_;_
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 @@ script infofile_;_ZIP::tab_menu_ssf107.inf_;_hightlight id_;_Browser("Accela Automation: 23").Page("Accela Automation: 2").Image("tab menu")_;_NFB_;_220764_;_
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 @@ script infofile_;_ZIP::SmartChoice_ssf109.inf_;_hightlight id_;_Browser("Accela Automation:").Page("Accela Automation:").Link("SmartChoice")_;_NFB_;_220766_;_
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 @@ script infofile_;_ZIP::Submit_ssf110.inf_;_hightlight id_;_Browser("Accela Automation: 24").Page("Accela Automation:").Image("Submit")_;_NFB_;_220767_;_
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 @@ script infofile_;_ZIP::Select_ssf111.inf_;_hightlight id_;_Browser("Accela Automation: 25").Page("Accela Automation:").Image("Select")_;_NFB_;_220768_;_
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) @@ script infofile_;_ZIP::GStrDisplayFlg_ssf112.inf_;_hightlight id_;_Browser("Accela Automation: 26").Page("Accela Automation:").WebRadioGroup("GStrDisplayFlg")_;_NFB_;_220769_;_
Browser("Accela Automation:_26").Page("Accela Automation:").WebRadioGroup("EventDisplayFlg").Select arrExpectValue(2) @@ script infofile_;_ZIP::EventDisplayFlg_ssf113.inf_;_hightlight id_;_Browser("Accela Automation: 26").Page("Accela Automation:").WebRadioGroup("EventDisplayFlg")_;_NFB_;_220769_;_
Browser("Accela Automation:_26").Page("Accela Automation:").Image("Save changes").Click @@ script infofile_;_ZIP::Save_changes_ssf114.inf_;_hightlight id_;_Browser("Accela Automation: 26").Page("Accela Automation:").Image("Save changes")_;_NFB_;_220769_;_
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 @@ script infofile_;_ZIP::tab_menu_ssf119.inf_;_hightlight id_;_Browser("Accela Automation: 25").Page("Accela Automation: 2").Image("tab menu")_;_NFB_;_220772_;_
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 @@ script infofile_;_ZIP::Process_ssf121.inf_;_hightlight id_;_Browser("Accela Automation:").Page("Accela Automation:").Link("Process")_;_NFB_;_220774_;_
Call SearchProcess()
If Err_Flag=False Then
Call SwitchView()
Call AddTask()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -