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

Answer Posted / apurva

I am using the above code only.

''Create word application first
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


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

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


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

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

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many scripts did you have?

1687


How you know that a test case is a regression test case

3047


Can anybody post some real time scenario in qtp? please its very urgent.

1797


How can i use virtual objects? If have i created one new virtual object in a virtual object manager by following instructions.

1432


What contains Data Driven Framework document in qtp?

1454






Do you know how to connect database? Can you tell me the procedures?

539


Hi All, I have QTP installed on my machine but the application under test (AUT) is on remote desktop.My scenarios is like that,it should contain following steps. 1)Automatically it should click on start and then on remote desktop connection. 2)it should enter the IP address and then connect to remote desktop. 3)and then it should be able to record the application in remote machine and then run it also. Can somebody tell me how to record the application which is in remote machine.

1477


what r the main attributes of test automation?

1466


assume i have few url link how will i dynamically call then using descriptive programming?

1588


Is there anyway to automatically update the Datasource name in Database Checkpoints object when we migrate tests to a new release?

3265


In a flight window we have to enter the name and meal request for every passenger.In that window if we give Total passengers=1 then the Psngr1 name field and psngr1 meal request field will reflects.if we give Total passengers=2 then Psngr1 name field and psngr1 meal request field,Psngr2 name field and psngr2 meal request field and so on. how we can handle this scenerio thru Descriptive programming?

1425


how do u manipulating INI, DLL and / or registry files in support of your test environment? actually what do u mean by INI and DLL or registry files. plzzz its urgent do answer

1434


How many ways is to parameterize the value?

608


What are the ways you can synchronize?

574


Without using gui map editor we can recognize the application in winrunner ?

592