How to capture screen shots when an error occurs?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is test case write?

586


Did the scripts need lot of maintenance? If yes, why?

3310


How to creating an output value using quicktest professional?

553


What is QTP testing process?

643


How to call a test from another test?

700






How do we handle run-time errors?

596


Hi any body pls help me for QTP 11.0 software free demo version. i have to practice. Kindly send the link.or where i have to download.

1718


What is expert view in qtp?

601


What is the difference between the keyword view and expert view?

532


Explain about Test Fusion Report of QTP?

629


How can I check if a environment variable exist or not?

553


Where we can use the analog mode and where we can use the low – level mode?

580


how to i add the values using the check points property?( i.e valid data(for valid data it's giving the footer message:value is added) and for invalid data: special chars, spaces,Duplicates and null values (in my page when ever we enter special chars, spaces and null values, it's giving the proper warning message and for Duplicates it's giving the footer message:"value already exists)?

1430


How to find a window is minimized or not

1459


What is QTP scenario.

1747