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

hi all here i have tab named "Workbench" By clicking on "workbench" tab.it displays 4 tabs like below workbench common cargo commercial charter "common" tab have 10tabs inside,"cargo" tab also haveing 15 tabs inside and remaining two tabs also having few tabs inside. when clicked on "common" tab.it displaying the script like tab("workbench").select"common" if i clicked on "cargo".it displaying the script like tab"workbench_2").select"cargo" if i clicked on "commercial".it displaying the script like tab"workbench_3").select"commercial" if i clicked on "charter".it displaying the script like tab"workbench_4").select"charter" I have used a "FOR LOOP" for common,commercial,cargo,charter tabs.it was stopped at second tab SO, CAN I RECOGNIZE "WORKBENCH_2,_3,_4" AS A SINGLE VARIABLE if not, can anyone plese help me to solve this

1502


What is Cross browser testing? Does UFT support it?

605


how can i pass a "cript"as a parameter in to a function

1446


Whats the realtime QTP testing process

1980


In the application that I'm testing is having a WYSIWIYG editor.QTP is recording editor's body as web element. I want to add some data to this web Element at run time. The problem is that I cant find a method to add contents to this web Element. Can any one come up with an answer for this. Thankx.

1426






How to check which add-ins are associated with a test in qtp?

569


Hi Every body please explain me in steps to use checkpoints and object Repositories in QTP for Flight Reservation application please tell me the steps for this its urgent pls thanx for urs answers

1561


What processes will be required to manage updates to the web site's content, and what are the requirements for maintaining, tracking, and controlling page content, graphics, links, etc.?

592


Give me some real time point of way where exactly we can conduct audits?

1482


Thanks....But can u tell me how i use the QTP for GIS with one Example...

1416


can any boby tell me what is method or steps to connect the remote desk top by using QTP 9.2 version?

1607


If object is not recognized by qtp but the object is standard object what is your approach?

577


Explain the use of action split in qtp?

551


what is object and child object.. explain ..if possible give some example for better understanding ..

1514


how to create flat file datasubmission in qtp

1887