axmol/tools/JenkinsScript/Windows/win32/qtp_win32/Error_Sub.vbs

33 lines
2.3 KiB
Plaintext
Raw Normal View History

<EFBFBD><EFBFBD>Function RecoveryFunction2(Object, Method, Arguments, retVal)
Class_Templates = Pathfinder.Locate("Class Templates.VBS")
Engines_Path = Pathfinder.Locate("Engines.VBS")
Filters_Path = Pathfinder.Locate("Filters.VBS")
ReporterManager_Path = Pathfinder.Locate("ReporterManager.VBS")
ExecuteFile Class_Templates
ExecuteFile Engines_Path
ExecuteFile Filters_Path
ExecuteFile ReporterManager_Path
If Dialog("TestCpp.exe").Exist(3) Then
Dialog("TestCpp.exe").Activate
Dialog("TestCpp.exe").Move 872,177
Dialog("TestCpp.exe").WinObject("DirectUIHWND").Click 21,235
End If
Dim FileName ,TimeNow, ResPath
ResPath = "D:\"
TestNameNow=environment.Value("TestName")
FileName = ResPath & ""&TestNameNow & ".png"
desktop.CaptureBitmap filename,True
systemutil.closedescendentprocesses
If Dialog("TestCpp.exe").Exist(3) Then
'Call oReporterManager.Report ("Fail", "Step 3" ,"Window Should Open" ,"App. Crashed", "Please check Error-datetime.png file")
Dialog("TestCpp.exe").WinObject("sQ<73><51> z<>^").Click
Else
Call oReporterManager.Report ("Fail", "Step 3" ,"Window Should Open" ,"App. Crashed", "App close by accident")
End If
End Function