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 |
How can you find Local Host Name by Using QTP?
Scripts for Ascending order in qtp.
What is the difference between Datadriven and Parameterization?
write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object..
give me the code to save all messages of inbox of gmail into a folder and notepad
How would you export a script from one pc to another in qtp?
i've installed qtp9.2 on Windows 7. Recording and everything no problem. But when i am saving the test, it is not happening. it says 'general error while saving'. But teh test is getting saved but as a folder with lock icon. When i wanted to open it, it is jst showing as a locked folder but not as a test. Somebody help me out plz
How to use setroproperty?
what is risks of testing a project?
I want to test my vb.net solution file using qtp. Does Qtp test only .exe file?
How vl i prioritize the actions when i have 10 actions A1, A2, A3......A10. I want to run action as follows A1,A5,A6 and A10. How i can do it. Thanks in Advance to u.
How to remove associated function library?