KabInfo.Net                                               

Q. How to handle Run-time errors?
A. (a) On Error Resume Next : causes execution to continue with the statement immediately following the statement that caused the run-time error, or with the statement immediately following the most recent call out of the procedure containing the On Error Resume Next statement. This allows execution to continue despite a run-time error. You can then build the error-handling routine inline within the procedure.
Using "Err" object msgbox "Error no: " & " " & Err.Number & " " & Err.description & " " & Err.Source & Err.HelpContext
 

Q .How to change the run-time value of a property for an object?

A. SetTOProperty changes the property values used to identify an object during the test run.
Only properties that are included in the test object description can be set
Q. How to retrieve the property of an object?
A.  using "GetRoProperty".
Q. How to open any application during Scripting?
A. SystemUtil , object used to open and close applications and processes during a run session.
(a) A SystemUtil.Run statement is automatically added to your test when you run an application from the Start menu or the Run dialog box while recording a test
E.g : SystemUtil.Run "Notepad.exe"
SystemUtil.CloseDescendentProcesses ( Closes all the processes opened by QTP )

 

Q. Types of properties that Quick Test learns while recording?
A.  (a) Mandatory (b) Assistive .
In addition to recording the mandatory and assistive properties specified in the Object Identification dialog box, QuickTest can also record a backup ordinal identifier for each test object. The ordinal identifier assigns the object a numerical value that indicates its order relative to other objects with an otherwise identical description (objects that have the same values for all properties specified in the mandatory and assistive property lists). This ordered value enables QuickTest to create a unique description when the mandatory and assistive properties are not sufficient to do so.