更新时间:2022-10-01 11:18:00
Dim url
url="C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe"
if Dialog("text:=Login").Exist(1) then
OptionalStep.Dialog("text:=Login").WinEdit("attached text:=Agent Name:").Set DataTable("p_Text", dtGlobalSheet)
OptionalStep.Dialog("text:=Login").WinEdit("attached text:=Password:").Set DataTable("p_Text1", dtGlobalSheet)
OptionalStep.Dialog("text:=Login").WinButton("text:=OK").Click
wait(1)
else
|
systemUtil.Run url
OptionalStep.Dialog("text:=Login").WinEdit("attached text:=Agent Name:").Set DataTable("p_Text", dtGlobalSheet)
OptionalStep.Dialog("text:=Login").WinEdit("attached text:=Password:").Set DataTable("p_Text1", dtGlobalSheet)
OptionalStep.Dialog("text:=Login").WinButton("text:=OK").Click
wait(1)
end if
|
if Dialog("text:=Login").Dialog("text:=Flight Reservations").Exist(2) then
dim errorinfor,odesc
set desc=description.Create
odesc("text").value=DataTable("error",dtGlobalSheet)
errorinfor=Dialog("text:=Login").Dialog("text:=Flight Reservations").Static(odesc).GetROProperty("text")
Dialog("text:=Login").Dialog("text:=Flight Reservations").WinButton("text:=确定").Click
|
Reporter.ReportEvent micDone,"登陆验证失败,提示信息如下",errorinfor
OptionalStep.Dialog("text:=Login").close
wait(1)
else
|