Contributions
How to handle Failed Checkboints
The requirement is, if any check point is passed/failed, we need to certain actions Here I am using property check point and it on the basis of Pass andfail i am doing some operations. In following code it has iterations and on each iterationi amverifying the check point. It is working fine if check pont is passed, but it on fail it is not moving to else condition and exits form the code and loged as checkpont failed. How to handle failed check point? {VB Script} For i = 1 to NoofGridLines If (aqObject.CheckProperty(Aliases.MaximEyes.ECPMainForm.ECPPatientEncounterForm_PageView.MaximeyesDataBoundGrid_Documents.Item(i, 2), "CellValue", cmpEqual, "My Entered Test Document", False)= True) Then Log.Message("Check Point Verified") { Certain Code for action Block 'A' --- --- } Else Log.Message("Check Point Failed") { Certain Code for action Block 'B' } End IF Next11KViews0likes1CommentVBScript Style used in TestComplete Vs QTP
This is a general curiosity why this way implemented in TC. In QTP when record a script in format set the object and call its method in pure VBScript eg for windows calc Window("Calculator").Activate Window("Calculator").WinButton("5").Click Window("Calculator").WinButton("*").Click Window("Calculator").WinButton("2").Click Window("Calculator").WinButton("=").Click In Test Complete sameactions are recorded in following way Sub Test1 Dim wndCalculator Set wndCalculator = Aliases.calc.wndCalculator Call wndCalculator.Click(143, 14) wndCalculator.btn5.ClickButton wndCalculator.btn.ClickButton wndCalculator.btn2.ClickButton wndCalculator.btn1.ClickButton End Sub In TC it is in more structred/procedural format. Any guesses why it is been developed in such a way?19KViews0likes1Comment