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..??
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / nath t
Yes u have to mention "On Error Resume Next" statement in
the beginning of the script
| Is This Answer Correct ? | 0 Yes | 1 No |
Take a situation when you are working with QTP, suddenly system has crashed.so you again start the system. My questyion is how can QTP directly opened when the system desktop appears.
when will you do debug your script? and explain that process?
What is the process of synchronizing qtp and aut?
Have you worked with QC?
Which object repository we use in real time and can we merge 2 object repostiory and how?
How do you send email with attachment from outlook using qtp ?
how can i use text check point in descriptive programming. or else is there any way to compare the text in the application and the text in data table.
Hi Recently I Attend one interview .The intervier ask on Question in QC 9.2 . The Qus was while ruuning the Batch RUNS scripts in test lab if defect will comes .The defect automaticly wants to genate . How to Configure in QC . Thank You Balaji
How to invoke QTP using Dos prompt ?
Whenever we use GETROPROPERTY function.
Waht is User interface and Integration Testing?
Hello Everybody, Can anyone tell me that in QTP how to count the number of webelements from the object repository. Please provide the code. Thanks in advance, Gaytri