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 |
how we connect oracle or sql data server database to qtp. Hi Ram I was your answer for this. Can you kindly let me know in details steps on How we can connect to database. i am using QTP9.2 and SQL Server Database. I am new for QTP and this would be of great help.Thanks
what is qtp automation framework, what is the purpose of the framework and which folders included in this framework pls tell me with brief description
How does QTP identifies the object in the application?
Explain key word driven frame work?How to use in real time?
How would you parameterize the text field "Country" and the same "country" when it appears as combo field on other page with text field city and same with City combo field?
you written some code in qtp for opening google.com browser and entered some text inthe search text box and clicked search button. this is ur script.. before running this script i have already opened two google.com browsers. now am running the script what will happen? script will run or what?? Thanks... Nani
How to do Laod testing for web based Application?
In a webtable,a list of values are there,rightnow one values shows,later random another values shows,but how to retrieve the random value in webtable.
There are 3 types of frame works in QTP 1. Linear frame work 2. Modular frame work 3. Key word driven frame work. Can any body explain the above 3 frame work models. y2k_ram2000@yahoo.com
6 Answers Fidelity, GDS, IBM, TCS, Wipro,
What is a Run-Time Data Table? Where can I find and view this table?
After creating testcases, how do you start testing in QTP? what methodology will follow?
7 Answers Actran, American Well,
How do you capture tooltip using QTP?