How to capture screenshots of Exceptions/Errors during run-
time?
Answers were Sorted based on User's Feedback
Answer / julia
Hello,
In QTP8.2, we can choose the run setting:
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"
| Is This Answer Correct ? | 15 Yes | 2 No |
Answer / anil
There will be a syntax in QTP for capturing
the Exceptions in Runtime by
if (error occurs...) then
capturebitmapimage("c:\....")
end if
| Is This Answer Correct ? | 9 Yes | 0 No |
Answer / ravi_kanakam
When error occurs you can take screenshot of the desktop
and send the bitmap to result file.
if error occurs then
Desktop.CaptureBitmap("c:\bitmap.bmp")
Reporter.ReportEvent micFail, "Error Name", "<<img
src="c:\bitmap.bmp>"
end if
The above code will send the screen shot to the Result File.
| Is This Answer Correct ? | 8 Yes | 1 No |
Answer / arunsingh
By using object.capturebitmap("c:\snap.bmp")
we can capture the screenshots of any screen at runtime.
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / srikanth
Thanks Sridhar,
But im asking in QTP through script without tester
interaction
| Is This Answer Correct ? | 5 Yes | 2 No |
Answer / giridhar reddy
if you QTP is associated with Quality Center then it will
take the screen shot automatically by setting an option in
the settings/run... but I am also looking for with out
Quality center I have come across with an option in
checkpoints properties to capture the screen Image... I am
doing some sort of research once I get thru it I will
definetly let you guys know..
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / mangesh
YOU CHECK IN RESULT OF YOU QTP SCREEN SHOT IS THERE
| Is This Answer Correct ? | 0 Yes | 4 No |
Hey I don't think that it is possible.
After all QTP is automation tool...it doesn't think like
human brain...you have to feed it all the scenarios,then
only it will follow the instructions.
Go to Tools>Recovery scenario manager : here you can give
the instructions to QPT to respond to errors.
| Is This Answer Correct ? | 1 Yes | 8 No |
Hi, is it possible for recording shortcut key during record session? The application on which I am working is web based application. This application has several shortcut key associated with menu option. I have succesfully recorded all menu option but unable to record shortcut key.
i want know iam working 2+ exp in QTP can i do performence testing (eg:loadrunner) yes r no?
what is life cycle of automation testing ?
how to get column count in datatable
I used the below code to open QTP through VBscript?But i can unable to Invoke QTP...PLZ help me with the correct code to invoke QTP through VBS with description of the code aswell. Dim qtApp 'As QuickTest.Application 'Declare the Application object variable Dim qtTest 'As QuickTest.Test 'Declare a Test object variable Dim qtResultsOpt 'Declare a Run Results Options object variable Set qtApp = CreateObject("QuickTest.Application") 'Create the Application object qtApp.Launch 'Start QuickTest qtApp.Visible = False 'Make the QuickTest application visible qtApp.Open "C:\form", True 'Open the test in read-only mode 'set run settings for the test Set qtTest = qtApp.Test qtTest.Run 'Run the test 'WScript.StdOut.Write "Status is: " & qtTest.LastRunResults.Status 'Check the results of the test run qtTest.Close 'Close the test qtApp.quit 'Close QuickTest Pro Set qtResultsOpt = Nothing 'Release the Run Results Options object Set qtTest = Nothing 'Release the Test object Set qtApp = Nothing 'Release the Application object
What are the Mandatory Properties of WebTable Object and Link Object in Web testing using QTP
What is Maximum synchronization time out in QTP(By Default is 20sec). Anybody can answer it. Thanks in advance.
Hi, i run scripts in one machine those r passed.when i run the scripts in client side those r failed.Give me such a scenario when ever u faced?
What are the enhancements u did after recording ur script?
what is the hierachy of Descreptive programming?
How to use library files in QTP? how we can call these files in to script?
requirement is for combo box your expected value is str= "Denver.Frankfurt.London.Los Angeles.Paris.Portland.San Francisco.Seattle.Sydney.Zurich" ar = Window("Flight Reservation").WinComboBox("Fly From:").GetContent your actual value is : that shows data in combo box how can u test the both data is correct or not by using split function