'******************************CheckPoint********************** '******result---ReportEvent的狀態 '******stepName---測試的名稱 '******Detail---詳細信息 '******Bool---布爾值,是否截屏並插入圖片至報告中 '***************************************************************** Function
CheckPoint(result,stepName,detail,Bool) TestDir=Environment.Value( "TestDir" ) TestName=Environment.Value( "TestName" ) ActionName=Environment.Value( "ActionName" ) If
Bool Then fileName=Left(createobject( "Scriptlet.TypeLib" ).Guid,38) filePath=TestDir& "\"&TestName&" _ "&ActionName&" _ "&fileName&" .png" Desktop.CaptureBitmap
filePath,true Reporter.ReportEvent
result,stepName,detail,filePath else Reporter.ReportEvent
result,stepName,detail End
If End
Function |
QTP 資源函數庫(Library Files)
標籤:
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.