When we use 'ERR' object to handle the exceptions in the
script, do we need to include any statement in the
beginning of the script..??
Answer Posted / uday kumar _ anem
Generally, when QTP encounters a run time error during
running the scripts, it shows the error message in a pop up
window and the script execution will stops.
If you wish to display your own error message and you wish
to continue with the script, then we will use Err object.
We have to use "On Error Resume Next" statement before the
runtime error is returned.
The general usage of the Err object is like:
On Error Resume Next
dim fileSysObj
fileSysObj=createobject("Scripting.FileSystemObject")
fileSysObj.folderexists("c:\uday") 'assume this folder
doesnt exist
'QTP shows the error message here itself and stops
execution, if "On Error Resume Next" statement doesnt exists
If Err.Number <>0 then
msgbox("Here it prints") 'Because of Err object we can give
our own error message
end if
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is the purpose of loading qtp add-ins?
how can we do the frame work in qtp
What is the difference between shared and local object repository?
If the weblist is identified as webelement,and by clicking on webelement if the values are displayed,and if the values the values also identified as webelement.then how to fetch the values through script?
Can any body please tell me the steps of keyword driven framework of QTP.
What is use of object spy?
Please guide me release notes of Automation once scripts are completed
In qtp, how you can remove the spaces from string?
Write a script to verify font style and color of a windows object using descriptive programming
The structure of keyword driven frame work is like a folder structure the different sub folder are 1-functional libray folder 2-object repository folder 3- database folder 4-appliction1.xls 5-initalzation vbs file 6-sequence file 7-driver script 8-test case list file My question is whether these are in a local server machine or in our pc.((whether It like Vss). can u give example of driver script(code)
wht type of User defined functions or Java Releated functions do we write in VB scripting
Hi iam shankar here, right now iam working on manual testing. i want to switch over automation tool qtp, right now iam taking training class outside on qtp, please let me know the cost of QTP tool for full version, wether it's an annual subscription or monthly subscription.
I want to know what are QTP functons and what are VB script functions. What is the difference between them.When we have to use these functions.
How do you compare the structure of 2 tables in database and check whether they are similar using qtp.
If u r using library files (Instead of Check Points) , How do u do bitmap check ?