HI How to take screenshots of a Webpage and saving it in a
external word document using QTP.

Answer Posted / jegan

''Capture Currently display web page
Browser(objBrow).Page(objPag).CaptureBitmap "C:\Test.bmp",True

''Create word application
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection

Set objRang = objDoc.Range()
Set objShape = objDoc.inlineShapes

''Add Picture to word file
objShape.AddPicture ("C:\Test" & ".bmp ")
objWord.Selection.TypeParagraph()

''Save Word File
objDoc.saveas("C:\Test.doc")

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what you mean by artifact,milestone...

1485


Which environments are supported by hp qtp?

586


What are the five challenges you faced in QTP?

2741


what are the frame work models of qtp?which frame work you follow in your company?and explain it process?

1943


how could i download qtp in which i get add-in support for 'oracle' is there any way to get it? i finding but not getting pls help me out :)

1419






HI Everybody, I am using QTP 9.2, I have a problem and hope everybody help me solve it. Now I need to use mouse wheel event to zoom in or zoom out in web client, but QTP can't catch this event. I look forward helping of everybody. Thank you very much.

1610


What is smart identification in QTP?

614


How we can use the database checkpoint on a java web based application in which the database connectivity is done using JDBC->Pure Java type (in this type there is no need to create a DSN). At present in QTP we can fetch database values using checkpoint only through DSN. Is there any programming for this if we don't have DSN (ODBC)

1834


What are the types of object repository in qtp?

552


What is the pros and cons between QTP and Rational Robot

3269


How to record a qtp script ?

542


What are table and db checkpoints?

580


Dear Friends, I having total 3+year experience in manual testing including automation testing QTP, if i am attending any interview what kind of question will i get? please help me out

1569


Call to copy of an action and call to existing action… i know the diff but in real project how to use..? i want live scenario.pls help me..

1269


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