How to capture screen shots when an error occurs?
Answers were Sorted based on User's Feedback
Answer / lak
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 ? | 3 Yes | 0 No |
Answer / uday kumar_anem
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 ? | 3 Yes | 0 No |
Answer / 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 |
Answer / ram.polavarapu
browser("").page("").webedit("").set"ram@yahoo.com"
browser("").page("").webedit("").set"fbnjvkjnbv"
browser("").page("").webbutton("signin").click
if browser("").page("").exist then
reporter.reportevent 0,"login","login is sucess"
else
browser("").page("").capturebitmap "b.bmp"
reporter.reportevent 1,"login","lgin is not sucess","b1.bmp"
end if
note->give the wrong psw ang you will get the result in
results window
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / laxmi
i am unable to understand can you explain in detail
Is This Answer Correct ? | 0 Yes | 2 No |
What is the use of an object spy tool in qtp?
Which line will be executed 1-B(DP).P(OR.link(DP) 2-B(OR).P(Or).Link(DP)
what are the frame work models of qtp?which frame work you follow in your company?and explain it process?
how do u retrieve data from a database ? i.e. i want to retrieve 2nd record only from a database ? write code for this. by using ADODB connecton, RSOBJ and using a FOR loop we can retrieve all the records( ex: if we give query as select * from emp). but i want only 2nd record. so how to acheive this.
Test Life cycle starts IS it Requirments stage or Test Initiation?
hi testers,one script has three actions , at the of running three actions are running , how to set run only perticular action and what is the use of split the action? when it will be useful?
how will u do database testing in qtp? how will u do the same with descriptive programming?
how to do regression testing in qtp? plz give ans with examples
Suppose there are 100 links in a web page and the number of links will be changing dynamically from time to time. I need code such that every time i had to click on the last link of the web page.
we use a file extension .properties why is it used and where do we use it plz help me out with detailed explanation and navigation of how to use on the QTP 8.2?
Can any one tell the different properties and values of differnt objects like Browser,Page,link,webedit,webcombobox,webradio botton,webcheckbox and web button.Because I am facing a lot of problems in interviews with Descriptive Programing.I never worked on web Application...Pls help any one as soon as possible....
Hello everyone, I am trying to parametrize a script. Its clear to me that, we use data table to enter various text data. but if I want to change the radiobutton (e.g. if for first iteration I selected radio button 'A' and for second iteration I want to use 'B' radio button for second iteration) then how can I make it happen. I have tried to define the question but still if not clear plz tell me. Thanks everyone