to next step etc....
When to use a Recovery Scenario and when to us on error resume next?
Recovery scenarios are used when you cannot predict at what step the error can occur or when you knowthat error won't occur in your QTP script but could occur in the world outside QTP, again the example would be "out of paper", as thiserror is caused by printer device driver. "Onerror resume next" should be used when you know if an error is expected and dont want to raise it, youmay want to have different actionsdepending upon the error that occurred. Use err.number & err.description to get more details about theerror.
Library Files or VBScript FilesHow do we associate a library file with a test ?
Library files are files containing normal VBScript code. The file can contain function, sub procedure,classes etc.... You can also use executefilefunction to include a file at run-time also. To associate a library file with your script go to Test->Settings...and add your library file to resourcestab.
When to associate a library file with a test and when to use execute file?
When we associate a library file with the test, then all the functions within that library are available to allthe actions present in the test. Butwhen we use Executefile function to load a library file, then the function are available in the action thatcalled executefile. By associated a library toa test we share variables across action (global variables basically), using association also makes it possibleto execute code as soon as the scriptruns because while loading the script on startup QTP executes all the code on the global scope. We can useexecutefile in a library file associatedwith the test to load dynamic files and they will be available to all the actions in the test.
Add-insTest and Run-time ObjectWhat isthe difference betweenTest Objects and Run Time Objects ?
Test objects are basic and generic objects that QTP recognize. Run time object means the actual object towhich a test object maps.
Can i change properties of a test object
Yes. You can use SetTOProperty to change the test object properties. It is recommended that you switch