Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



When we use 'ERR' object to handle the exceptions in the script, do we need to include a..

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

When we use 'ERR' object to handle the exceptions in the script, do we need to include a..

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

Post New Answer

More QTP Interview Questions

What is Expert view?

4 Answers  


How QTP recognizes Objects in AUT?

1 Answers   Crea,


In what situations QTP will not recognize the Objects?

6 Answers   Wipro,


Can we call a parameter from an action to other action?

4 Answers  


What will be happen if i load object repository at run time, but it has already associated.

0 Answers   NTT Data,


How can we make a shared object repository in QTP 9?

3 Answers   Kanbay, Ordain Solutions,


If u r using library files (Instead of Check Points) , How do u do bitmap check ?

0 Answers  


How to get the column count and column name from the resultset in the database connection program?

6 Answers  


hi Action 1 and action2 if we save it in C:, what folders will be created explain plz

3 Answers   iFlex,


what is Automation frame work and how do u used this for your project?

3 Answers  


Hi cud you plz answer my question.. what is the size of Object Repository?

8 Answers   TCS,


For QTP Test Engineer, What is his contribution to the Project? Means, As as automation test engineer what is his role in the current project?

0 Answers   V2 Solutions,


Categories