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

Answer Posted / sumit

Try this Jkarurosu:Use Movedown method

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
fname="C:UsersPublicPicturesSample PicturesKoala.jpg"
fname2="C:UsersPublicPicturesSample PicturesTulips.jpg"
objShape.AddPicture (fname)
objWord.Selection.MoveDown 1,0
objWord.Selection.TypeParagraph()

objShape.AddPicture (fname2)
objWord.Selection.MoveDown 1,0
objWord.Selection.TypeParagraph()

''Save Word File
objDoc.saveas("C:UserssunshineDesktopTest.docx")

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How will you check a web application for broken links using qtp?

541


What VBScript operators, functions, and statements do you use in QuickTest Professional?

2161


How do you configure QTP AND Test director?

1486


Explain how Does Run time data (Parameterization) is handled in QTP?

550


How can you identify the browser and its information using QTP script?

539






explain abt dyanamic changing object with example?

1893


Which environments does qtp support?

666


What Folder Structure following in Keyword Driven Frame work?

2270


How do you know the location Id of an object if you know its index id?

575


how can we do the frame work in qtp

1592


Hi we are running tests remotely from quality center and pushing tests into qtp boxes remotely, and it does execution but while uploading results back into quality center it hangs in qtp box.If any one come across similar problem, please send me details how to handle this. Thanks kris

1737


How smart identification works in qtp ?

570


In the Hybrid framework, data can access the database, excel file, XML etc. Is it true?

554


When using descriptive programming?

623


how did u use automating testing tools in ur job?

1477