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 |
I have a library function , with that function 100 scripts are being called. The library function is changed(something is added) . how do i update all the scripts.
How to call a test from another test?
Is it possible to change the property value at runtime? How it is possible?
in qtp how can we do test when the build is not ready
How to use userdifined environment variables.Once we created in Environment tab which is at File--> Settings-- >Environment-->Userdifined
VB - Script Training in MUMBAI.
how can we compare descriptive programing with a regular expression
I have 2 Environment variable which holds int. I called into my test and addedup. but output is concatenating the values instead of Sum. Ex. Envi("a")= 10, Envi("b") = 20, c= Envi("a")+ Envi("b"). msgbox c ( Ans.1020). How to overcome this pblm?
cud anybody please tell me the full form's of the extention files that we use in real time---.tsr,.mtr,.qrs
Whats the realtime QTP testing process
There is a very good institute for Automation Testing using QTP.For more details please visit jbslearnings.com.
if you run one test script in internetexplorer the same test you run in mozilla ffirefox is it possible or not how is it.