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...

How to capture screen shots when an error occurs?

Answer Posted / deepak k

Hi use RecoveryFunction to capture the image when error
ocours.

Step1: Create a VBS file using following founction
Function RecoveryFunction1(Object, Method, Arguments,
retVal)

'Find the Test Folder Path
Set qtApp = CreateObject("QuickTest.Application")
testpath = qtApp.Folders.item(1)
'stores the image inside the test folder
image_name= testpath &"\imagename.png"
Desktop.CaptureBitmap image_name
End Function

Step2: Go to Recovery manager
step3: select "On Any error" or select u r own option
Step4: select function to call
step5: call the above mentioned file

Rest QTP will do it for you

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to use Environment parameterization? Explain with an example.

1921


HOW AUTOMATE TEST SCRIPT ? what time it will do? after gneration of basic script or Any , Plz explain detailed?

2141


How you can write contexts to text file in qtp?

1000


How to connect to a database?

1064


Explain the concept of object repository?

932


Can any one explain me what is the procedure to connect the remote desk by using QTP 9.2 ?

1892


What is business process testing(bpt) in qtp?

1070


How to associate shared object repository to test in qtp?

939


How to creating an output value using quicktest professional (qtp)?

958


Could i know how how to explain keyword driven framework in interview? If any body knows plz send the explanation.

2103


What is the synchronization point in qtp?

941


What are private functions in QTP? How they can be called from the function library?

980


What are the things(properties, and other details) will be recorded while recording an object using normal recording?

1920


how can we compare descriptive programing with a regular expression

2334


What is the file extension of the code file and object repository file in QTP?

1033