ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
How to capture screen shots when an error occurs?
 Question Submitted By :: Arpillai
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How to capture screen shots when an error occurs?
Answer
# 1
Objectheirarchy.CaptureBitmap "path"

for ex 

to capture any window 

Window("Flight Reservation").CaptureBitmap "C:\pic1.bmp"

to capture combo box(tool) 

Window("Flight Reservation").WinComboBox("Fly 
From:").CaptureBitmap "C:\pic2.bmp"

This is used in QTP.

www.funandknowledge.blogspot.com
 
Is This Answer Correct ?    0 Yes 0 No
Lak
 
  Re: How to capture screen shots when an error occurs?
Answer
# 2
i am unable to understand can you explain in detail
 
Is This Answer Correct ?    0 Yes 1 No
Laxmi
 
 
 
  Re: How to capture screen shots when an error occurs?
Answer
# 3
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 ?    0 Yes 1 No
Deepak K
 
  Re: How to capture screen shots when an error occurs?
Answer
# 4
In QTP8.2, we can choose the run settings
Test -> settings -> Run tab -> set ON save image of desktop
when error occurs checkbox

In QTP 9.2, follow the below navigation:
Tools -> Options -> Run tab -> In the drop down list box "On
Error"(default) is selected for "Save step  screen capture
to results"

And even we can also configure, whether we have to proceed
to next step or stop the test execution by following below
navigation:
File Menu -> Settings -> Run Tab -> Choose the required
action from the "Whenever an error occurs during run
session" drop down list box.
 
Is This Answer Correct ?    1 Yes 0 No
Uday Kumar_anem
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
Tell about descriptive programing in qtp8.2? GE4
Hi This is tanya actually im facing problem in Qtp actully some time QTP doesnot recoznise the recorded object due to which script is going to fail.so can you tell me how we can handle this situation and i have another concerened issue is that at the time of run New errors comes every time so how we can handle this sitauation how we can add Recovery scenarios to the script.some time application runs successfully and some time it produces new error thats why i am facing lot of problem please give me the sugeestion as soon as possible.  2
How to convert non-reusable action into reusable action in QTP?(i know by default QTP will take it as a non-reuable action )(Chandana) plz urgent? Wipro3
what type of application we can select for automation testing and what is the entry criteria for automation  1
How to Install QTP on Citrix Environment? Possible send me the installation steps.. That would be great help  1
your doing one project testing then how u know itis wheather web based application or windows based application?  2
give the code to count child objects (Total) in the page  1
Pls anyone, tell me the script in QTP to find the number of links, and images in a webpage. Verry very urgent. I shall really be very thankful  2
what is batch testing?  1
how to load all resource files(function libraries,object repositories etc) into tests without associating them?  1
Please give me the steps to carry out datadriven in QTP8.2  2
what is the use of VIRTUAL OBJECTS? explain ? TCS10
How we can add objects to the object repository during the running?is it possible or not?explain  3
What is the file extension of the code file & object repository file in QTP?  2
what is framework in QTP? any one give me answer Wipro3
how to re-install QTP 9.0 trial version.  12
What does SPLIT and JOIN commands do in Vbscript? Ordain-Solutions4
Why you are Using Descriptive programming instead of Object Repository?  8
Hi, How to invoke QTP or any application through Command Prompt without using Vb script and batch file.... Reply me Srinivas Excel3
Hi All, I am using QTP for one of the Desktop application which uses Keyboard inputs like 'Tab ,F7 etc' and also mouse (Click). After recording when i am running the Script ,it is not able to recognize the keyboard inputs like F7,Tab and mouse Click because of which either i have to skip that part or manually do the inputs. Please answer how can i make script more flexible so that it will recognize both keyboard and mouse operations.  3
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com